TL;DR
Animals don’t learn by replaying raw sensory tapes in their sleep; they learn on the fly from streaming reality. In deep reinforcement learning (RL), doing this requires eligibility traces—short-term memories of which neural weights were recently active—but standard deep learning optimizers like Adam mathematically break how these traces work. This paper reveals why Adam fails here and introduces a new optimizer, Function-Space Distance (FSD), allowing buffer-free, streaming RL agents to match or beat heavyweight buffered algorithms like PPO.
What Problem Does This Paper Address?
Modern deep RL has a hoarding problem. Most popular algorithms (like DQN or PPO) store thousands or millions of past experiences in a "replay buffer" and sample them randomly to train neural networks. While effective, buffers are memory-heavy, delay learning until an experience is sampled, and scramble the natural timeline of events, making long-term cause-and-effect (credit assignment) sluggish.
Decades ago, RL pioneers solved streaming credit assignment using eligibility traces. Think of an eligibility trace as a fading breadcrumbs trail on your network weights: if a weight helps predict a value now, it stays "eligible" to receive credit (or blame) for rewards that arrive several steps later. Mathematically, updating step-by-step with traces (the backward view) is equivalent to waiting until the end of an episode to look at all future rewards (the forward view).
For years, conventional wisdom held that eligibility traces didn't play nice with deep neural networks. Recent streaming RL breakthroughs proved they can work, yet they rely on simple scalar learning rates rather than modern adaptive vector optimizers (like Adam or RMSProp) that give every weight its own dynamic step size. How do you properly combine per-parameter adaptive step sizes with eligibility traces without breaking the underlying math?
Methods
First, the authors tackle step-size placement. If you naively multiply your final trace update by an adaptive step size at the end of the step, you break the mathematical equivalence to the forward view. To preserve it, the adaptive step size must be baked inside the eligibility trace as it accumulates over time.
However, this creates a causality paradox for optimizers like Adam. Adam scales step sizes using running averages of squared loss gradients. In the forward view, that gradient includes future reward errors ($\delta_t^\lambda$). To put Adam's step size inside an online trace at step $t$, you would need information from the future!
To escape this trap, the authors introduce the Function-Space Distance (FSD) optimizer. Instead of adapting step sizes based on loss gradients (which contain future errors), FSD constrains how much the output of the function is allowed to change at each step—similar in spirit to natural gradient descent:
- For Value Networks: FSD measures the expected squared change in predicted values, approximated locally using the squared gradients of the value function itself: $(\nabla \hat{v})^2$.
- For Policy Networks: FSD uses a local approximation of the KL divergence between the old and new policies, relying on the squared gradients of the log-policy: $(\nabla \ln \pi)^2$.
Because FSD only tracks exponential moving averages of function gradients—which are completely known at time $t$ without waiting for rewards—it produces an adaptive vector step size that slots cleanly inside the eligibility trace. The authors pair FSD with existing trace algorithms—AC($\lambda$), Q($\lambda$), QRC($\lambda$)—and introduce ARC($\lambda$), a new streaming actor-critic method using gradient temporal-difference learning for stability.
Datasets
Because this is reinforcement learning, agents are evaluated on interactive simulation benchmarks rather than static datasets (no new benchmarks are introduced):
- MuJoCo (7 environments): Continuous-control robotics tasks (Ant, HalfCheetah, Hopper, Humanoid, HumanoidStandup, Reacher, Walker2d), run for 5 million steps each.
- MinAtar (5 environments): Miniaturized, discrete-action Atari games (Asterix, Breakout, Freeway, SpaceInvaders, Seaquest), also run for 5 million steps.
Key Insights and Ideas
- Naive step-size placement moves the goalposts: Using linear TD($\lambda$) analysis, the authors prove that putting a non-constant step size outside the trace doesn't just add noise—it actually alters the mathematical fixed point the algorithm converges to. The error scales with how rapidly the optimizer changes step sizes between consecutive frames.
- Decoupling geometry from error: Common optimizers conflate local network curvature with prediction error ($\delta$). By separating the two, FSD acts like an online diagonal Gauss-Newton preconditioner that respects the arrow of time.
- Closing the Semi-Gradient Gap: Historically, "gradient TD" methods (like ARC($\lambda$)) were needed to prevent divergence in deep streaming RL, outperforming simpler "semi-gradient" methods (like AC($\lambda$)). With FSD stabilizing the updates, simpler semi-gradient AC($\lambda$) performs just as well or better.
Key Results
Across both continuous and discrete benchmarks, FSD consistently outperforms standard SGD and naively applied Adam.
- Optimizer Showdown: In MuJoCo with AC($\lambda$), SGD and naive Adam completely fail to learn in Humanoid and suffer severe instability in Reacher, whereas FSD learns smoothly and achieves the highest returns across all 7 tasks. In MinAtar with Q($\lambda$), FSD achieves the highest return in 4 out of 5 games.
- Streaming vs. Buffered Baselines: Without storing a single past transition in a buffer, AC($\lambda$) and ARC($\lambda$) with FSD learn faster than all baselines in Ant and Humanoid, achieve the highest overall returns in HalfCheetah, HumanoidStandup, and Reacher, and remain competitive with buffered PPO across the board (trailing PPO mainly in Hopper and Walker2d).
- Discrete Control: On MinAtar, Q($\lambda$) and QRC($\lambda$) with FSD beat the state-of-the-art streaming baseline (StreamQ) in all 5 games, and match or beat replay-buffer DQN in 3 out of 5 games (Seaquest, Freeway, and SpaceInvaders). Notably, FSD worked out-of-the-box using standard Adam-like hyperparameters ($\alpha = 10^{-4}, \beta = 0.999$) without per-environment tuning.
Limitations and Future Work
- Diagonal Approximation: To keep computation cheap, FSD discards off-diagonal elements of its preconditioner matrix. In neural networks where parameter gradients are heavily correlated, ignoring this cross-parameter curvature could limit performance.
- Scale and Scope: The experiments use relatively compact networks on standard physics and grid-world games. Testing FSD on massive architectures, complex visual environments, and exploring how it interacts with different normalization schemes and sparse weight initializations remain wide-open next steps.
Summary updated