Introduction
In Reinforcement Learning (RL), agents often face a dilemma: should they learn from actual observed sequences of rewards (Monte Carlo returns) or estimate future rewards based on their current guesses (bootstrapping)? Learning from returns is excellent for stability but becomes difficult when the data is off-policy. This occurs when the agent learns about a "target" policy while actually behaving according to a different "behavior" policy—a common scenario in techniques like experience replay.
Existing solutions to this off-policy dilemma have traditionally suffered from major flaws:
- Importance Sampling (IS): Corrects for the difference between policies but suffers from "variance explosion," where updates can become infinitely large and unstable.
- Tree-Backup (TB($\lambda$)): Is safe and stable but inefficient. It "cuts the traces" (ignores future data) too aggressively whenever the behavior doesn't perfectly match the target, wasting valuable information.
- $Q^\pi(\lambda)$: Is efficient but unsafe. It only works if the behavior and target policies are very similar; otherwise, it diverges.
To solve this, researchers introduced Retrace($\lambda$), a novel RL algorithm designed to be both safe (guaranteed to converge for any behavior policy) and efficient (using as much data as possible from observed rewards).
The Retrace($\lambda$) Algorithm
The authors propose a new way to calculate "traces"—the coefficients that determine how much weight to give to future rewards in an update.
The core of Retrace($\lambda$) is its trace coefficient: $$c_s = \lambda \min\left(1, \frac{\pi(a_s|x_s)}{\mu(a_s|x_s)}\right)$$ Where $\pi$ is the target policy and $\mu$ is the behavior policy.
Unlike standard Importance Sampling, which uses the raw ratio $\frac{\pi}{\mu}$, Retrace truncates the ratio at 1.
- Safety: If the behavior policy is more likely to take an action than the target policy, the ratio is less than 1, and the update is downweighted.
- Stability and Efficiency: If the target policy is more likely, the ratio is clipped at 1. This prevents the product of these ratios from exploding over time while still allowing the agent to learn from the full return when the policies are aligned.
Key Theoretical Insights
Retrace($\lambda$) successfully bridges the gap between the conservative Tree-Backup and the aggressive Importance Sampling, keeping the stability of TB and the data-efficiency of $Q^\pi(\lambda)$.
Furthermore, it achieves two major theoretical milestones:
- No GLIE Required: Most off-policy control algorithms require a "Greedy in the Limit with Infinite Exploration" (GLIE) assumption, meaning exploration must slowly cease to guarantee convergence. Retrace($\lambda$) is the first return-based algorithm shown to converge to the optimal $Q^*$ without this restrictive assumption.
- Solving a 27-Year-Old Mystery: By proving the convergence of Retrace($\lambda$), the authors provided the first formal proof of convergence for Watkins’ $Q(\lambda)$, an algorithm proposed in 1989 that had remained an open theoretical problem for decades.
Empirical Results
The researchers evaluated Retrace($\lambda$) using the Arcade Learning Environment (ALE), a standard benchmark of 60 Atari 2600 games where agents learn directly from raw pixel input.
Retrace($\lambda$) significantly outperformed standard $Q$-learning (the basis for DQN) and Tree-Backup. When comparing scores across all 60 games, Retrace($\lambda$) was the top performer in 30 games, whereas Tree-Backup was the best in only 15. Additionally, the authors found that using "full returns" ($\lambda=1$) generally worked best for Retrace, whereas other algorithms often require tuning $\lambda$ to lower values to prevent divergence.
Limitations and Future Work
While powerful, Retrace($\lambda$) has a few limitations:
- Commuting Assumption: The online convergence proof relies on a technical assumption that the transition operators for the target and behavior policies "commute" at the limit. This holds for $\epsilon$-greedy policies but might be harder to prove for more complex, dynamic behavior policies.
- Markovian Traces: The current analysis assumes traces depend only on the current state and action. Relaxing this to allow traces to depend on the full history could lead to even more powerful algorithms.
- Behavior Estimation: The algorithm requires knowing the behavior policy $\mu$. In real-world scenarios (like learning from a fixed dataset of human behavior), $\mu$ is unknown and must be estimated, adding complexity.
Summary updated