Researchers from DeepMind and UCL have introduced Expected Eligibility Traces (ET), a novel approach to reinforcement learning (RL) presented at AAAI-2021. This method enhances the traditional eligibility trace—a cornerstone of RL credit assignment—by allowing agents to learn from all potential paths to a reward, rather than just the specific trajectory experienced.
The Credit Assignment Problem
In RL, the "credit assignment problem" involves identifying which past states and actions are responsible for a received reward. Standard Temporal Difference (TD) learning propagates credit slowly, one step at a time. Eligibility traces, denoted as the $\lambda$ in TD($\lambda$), accelerate this by maintaining a decaying record of recently visited states, allowing rewards to be broadcast back across a trajectory.
However, traditional eligibility traces are instantaneous and noisy. They only credit the exact sequence of events that occurred. If multiple paths lead to the same reward, a standard agent must experience each path multiple times to assign credit to all of them. While model-based RL can simulate these counterfactuals, building accurate models in complex environments remains a significant challenge.
Methodology: Learning the Expected Trace
Expected Eligibility Traces (ET) address this by learning a function $z_\theta(s)$ that predicts the expected trace for a given state: $z(s) \approx \mathbb{E}[e_t | S_t = s]$. Instead of relying on a noisy, single-trajectory trace, the agent uses supervised learning to approximate the average trace over all possible histories.
Key components of the ET framework include:
- The ET($\lambda, \eta$) Algorithm: A mixing parameter $\eta$ allows the algorithm to interpolate between standard TD($\lambda$) (when $\eta=1$) and purely expected traces (when $\eta=0$).
- Predecessor Feature Trick: To scale to deep neural networks, the authors separate the network into a representation layer and a value head. They then learn a linear expected trace on top of the learned features, effectively viewing expected traces as time-reversed "Successor Features."
- Implicit Preconditioning: In linear settings, the learned trace matrix acts as a preconditioner for the gradient, making ET($\lambda$) more efficient at navigating the optimization landscape, similar to second-order optimization methods.
Key Insights and Visualizing Credit
The most significant advantage of ET is its ability to provide counterfactual credit. Because the agent learns the expected trace, it can update states from previous episodes that did not lead to a reward at the time, recognizing that they could have led to the current successful state.
Furthermore, the authors prove that if the state is Markov, the ET update has the same expectation as the TD update but strictly lower variance. This provides a more stable optimization signal without introducing mathematical bias.
Empirical Results
The algorithm was evaluated across grid-worlds, multi-chain environments, and Atari 2600 games (Pong and Ms. Pac-Man).
In the Multi-Chain experiment, which tests environments with multiple parallel paths to a single bottleneck, ET($\lambda$) demonstrated superior scalability. While TD($\lambda$)'s error increased significantly with the number of parallel paths, ET($\lambda$) maintained low error and high stability.
In Atari games, the Q-learning variant (QET) consistently outperformed standard Q($\lambda$) baselines. Notably, these results were achieved in a single-stream online setting without an experience replay buffer, highlighting the algorithm's efficiency and stability.
Conclusion and Future Work
Expected Eligibility Traces offer a "free lunch" in RL optimization by reducing variance while maintaining an unbiased update. While the method introduces some computational overhead for learning the trace and requires careful management of non-stationarity in deep RL, it represents a powerful step toward more efficient credit assignment. Future research may explore the full implications of ET for off-policy learning and its integration with more complex architectures.
Summary updated