Massive Redundancy in Gradient Transport Enables Sparse Online Learning
Organizations: Independent Researcher
Abstract
Real-time recurrent learning (RTRL) computes exact online gradients by propagating a Jacobian tensor forward through recurrent dynamics, but at O(n^4) cost per step. Prior work has sought structured approximations (rank-1 compression, graph-based sparsity, Kronecker factorization). We show that, in the continuous error signal regime, the recurrent Jacobian is massively redundant:propagating through a random 6% of paths (k=4 of n=64) recovers 84 +/- 6% of full RTRL's adaptation ability across five seeds, and the absolute count k=4 remains effective from n=64 to n=256 (6% to 1.6%, recovery 84 to 78%), meaning sparse RTRL becomes relatively cheaper as networks grow. In RNNs, the recovery is selection-invariant (even adversarial path selection works) and exhibits a step-function transition from zero to any nonzero propagation. Spectral analysis reveals the mechanism: the Jacobian is full-rank but near-isotropic (condition numbers 2.6-6.5), so any random subset provides a directionally representative gradient estimate. On chaotic dynamics (Lorenz attractor), sparse propagation is more numerically stable than full RTRL (CV 13% vs. 88%), as subsampling avoids amplifying pathological spectral modes. The redundancy extends to LSTMs (k=4 matches full RTRL) and to transformers via sparse gradient transport (50% head sparsity outperforms the dense reference; 33% is borderline), with higher thresholds reflecting head specialization rather than isotropy. On real primate neural data, sparse RTRL (k=4) adapts online to cross-session electrode drift (80 +/- 11% recovery, 5 seeds), where sparse propagation is again more stable than full RTRL. Without continuous error signal, Jacobian propagation accumulates numerical drift and degrades all RTRL variants, a scope condition for all forward-mode methods. Results hold with SGD (92 +/- 1% recovery), suggesting independence from optimizer choice.
Figures & tables
| Method | Mechanism | Cost | Constraint |
|---|---|---|---|
| UORO ( Tallec and Ollivier, 2018 ) | Rank-1 compression | High variance | |
| SnAp ( Menick et al., 2021 ) | Graph-structured sparsity | Weight-sparse RNN | |
| OK ( Benzing et al., 2019 ) | Kronecker-sum approx | None | |
| Element-wise ( Irie et al., 2024 ) | Kill inter-neuron recurrence | Architectural change | |
| RFLO ( Murray, 2019 ) | Drop Jacobian term | eligibility traces |
| Method | Cost per step | Notes |
|---|---|---|
| Full RTRL | Exact forward-mode gradients | |
| Sparse RTRL ( neighbors) | ; dense weights | |
| Eligibility traces | No Jacobian propagation | |
| UORO | Rank-1, high variance | |
| SnAp | = propagation steps; weight-sparse |
| Fraction | Post-shift MSE | Recovery (%) | |
|---|---|---|---|
| 0 (traces) | 0% | 0 | |
| 4 | 6% | ||
| 8 | 12.5% | ||
| 16 | 25% | ||
| 32 | 50% | ||
| 64 (full) | 100% | 100 |
| Seed | Full RTRL | Full RTRL | ||
|---|---|---|---|---|
| 42 | 0.015 | 0.015 | 0.016 | 0.067 |
| 123 | 0.016 | 0.011 | 0.015 | 0.021 |
| 7 | 0.018 | 0.046 | 0.015 | 0.876 |
| 2024 | 0.012 | 0.013 | 0.018 | 0.063 |
| 31337 | 0.014 | 0.093 | 0.018 | 0.012 |
| Seed | Traces | Full RTRL | Recovery (%) | |
|---|---|---|---|---|
| 42 | 0.100 | 0.0072 | 0.0022 | 69 |
| 123 | 0.178 | 0.0037 | 0.0019 | 85 |
| 7 | 0.202 | 0.0028 | 0.0020 | 93 |
| 2024 | 0.040 | 0.0057 | 0.0020 | 65 |
| 31337 | 0.100 | 0.0035 | 0.0023 | 89 |
| Mean s.d. |
| Task | Ring | Random | Oracle | Anti-oracle | Dynamic |
|---|---|---|---|---|---|
| Sine | |||||
| Lorenz |
| Method | Copy T=5 (accuracy ) | Adding T=50 (MSE ) |
|---|---|---|
| Trivial baseline | 0.125 (chance) | 0.167 (predict mean) |
| BPTT | 0.289 | 0.189 |
| (traces) | 0.239 | 0.284 |
| 0.239 | 0.281 | |
| 0.292 | 0.278 | |
| (full RTRL) | 0.130 | 0.289 (worst) |
| Seed | Traces | Full RTRL | Notes | |
|---|---|---|---|---|
| 42 | 0.508 | 0.004 | 0.002 | Clean |
| 123 | 0.002 | 0.001 | 0.015 | Inverted |
| 7 | 0.548 | 0.003 | 0.015 | beats full |
| 2024 | 0.220 | 0.001 | 0.0002 | Clean |
| 31337 | 0.090 | 0.001 | 0.004 | beats full |
| Mean s.d. |
| Seed | post-shift MSE | (full) | Recovery (%) |
|---|---|---|---|
| 42 | 0.0036 | 0.0003 | 66 |
| 123 | 0.0054 | 0.0003 | 62 |
| 7 | 0.0036 | 0.0010 | 80 |
| 2024 | 0.0034 | 0.0003 | 68 |
| 31337 | 0.0032 | 0.0065 | 116 |
| Mean s.d. |
| Avg Accuracy | ||||||
|---|---|---|---|---|---|---|
| Method | Seed 42 | Seed 43 | Seed 44 | Mean | Recovery | |
| bptt_ref | 12/12 | 0.407 | 0.397 | 0.374 | 0.393 | — |
| dense_ref | 12/12 | 0.403 | 0.389 | 0.401 | 0.398 | 100% |
| sparse | 6/12 | 0.406 | 0.382 | 0.415 | 0.401 | 107% |
| sparse | 4/12 | 0.387 | 0.376 | 0.384 | 0.383 | 77% |
| sparse | 2/12 | 0.353 | 0.325 | 0.336 | 0.338 | 8% |
| Recovery (%) | ||||||
|---|---|---|---|---|---|---|
| Method | Seed 7 | Seed 42 | Seed 43 | Seed 44 | Seed 2024 | Mean |
| Fisher oracle (top-6) | 96.9 | 97.6 | 93.7 | 89.2 | 99.1 | 95.3 |
| Entropy oracle (top-6) | 58.0 | 70.0 | 76.9 | 87.8 | 89.5 | 76.4 |
| Random | 84.0 | 84.2 | 66.3 | 80.6 | 72.5 | 77.5 |
| Entropy anti (bottom-6) | 82.3 | 61.1 | 82.8 | 66.9 | 85.3 | 75.7 |
| Fisher anti (bottom-6) | 70.1 | 63.3 | 69.7 | 63.7 | 88.3 | 71.0 |
| Late session B MSE | |||||
|---|---|---|---|---|---|
| Method | Seed 42 | Seed 123 | Seed 31337 | Seed 7 | Seed 2024 |
| Frozen (no adapt.) | 0.734 | 0.547 | 0.674 | 0.628 | 0.580 |
| (traces) | 0.479 | 0.360 | 0.432 | 0.464 | 0.423 |
| (6%) | 0.400 | 0.328 | 0.386 | 0.306 | 0.360 |
| (full RTRL) | 0.303 | 0.406 | 0.390 | 0.347 | 0.466 |
| BPTT (ref) | 0.351 | 0.329 | 0.330 | 0.317 | 0.333 |
| Task | Seeds | Cond. ( ) | ||
|---|---|---|---|---|
| Sine | 64 | 5 | ||
| Lorenz | 64 | 3 † | ||
| Sine | 128 | 5 | ||
| Sine | 256 | 3 | ||
| † 3 of 5 seeds; 2 seeds diverged (condition number ; see text). | ||||
| Architecture | Transport unit | Threshold | Recovery at threshold | Degenerate |
|---|---|---|---|---|
| Vanilla RNN | Neuron | /64 (6%) | (fails) | |
| LSTM | Gate Jacobian | /64 (6%) | 100% | (fails) |
| Transformer | Attention head | –6/12 (33–50%) | 77–107% † | (0%) |
| † is borderline (high seed variance); is robust (107% recovery, 3 seeds). | ||||