TL;DR
Prioritized Experience Replay (PER) is a staple in reinforcement learning, but it relies on heuristic temporal-difference (TD) error reweighting that lacks a solid theoretical foundation and suffers from distribution shifts. This paper introduces ROER (Regularized Optimal Experience Replay), a principled framework that links experience prioritization to occupancy optimization via $f$-divergences. By mathematically shifting the replay buffer's distribution toward the optimal on-policy distribution, ROER significantly reduces value underestimation and excels in challenging continuous control and offline-to-online fine-tuning tasks.
What Problem Does This Paper Address?
Deep reinforcement learning (RL) relies heavily on experience replay buffers to break temporal correlations and improve data efficiency. Prioritized Experience Replay (PER) improves on uniform sampling by prioritizing transitions with high TD errors, assuming these transitions offer the most learning value.
However, PER is largely a heuristic. It suffers from a major flaw: as the policy updates, a massive distribution shift occurs between the old data stored in the replay buffer and the current policy. This shift leads to highly inaccurate TD error estimations, causing biased prioritization that can actually degrade performance. The authors address this lack of theoretical foundation and the vulnerability to distribution shifts by reframing experience replay through the lens of optimization theory.
Methods
The authors reframe experience prioritization as an occupancy optimization problem. Instead of guessing weights, they maximize a regularized RL objective that includes an $f$-divergence penalty between the replay buffer's off-policy distribution and the optimal on-policy distribution. By deriving the dual form of this objective, they mathematically prove that the optimal data distribution shift is directly determined by a TD-error-based occupancy ratio.
When using Kullback-Leibler (KL) divergence as the regularizer, this ratio takes an exponential form ($e^{\delta_Q/\beta}$), giving rise to ROER. To implement this practically without introducing out-of-distribution action bias, they introduce a separate value network trained using the ExtremeV loss (derived from Extreme Q-learning). Priorities in the replay buffer are then smoothly and stably updated at each step using a convergence parameter $\lambda$.
Datasets
The authors evaluated ROER across three major benchmark suites:
- MuJoCo (OpenAI Gym v2): Standard continuous control tasks including Ant-v2, HalfCheetah-v2, Hopper-v2, Humanoid-v2, and Walker2d-v2.
- DeepMind Control Suite (DM Control): Tasks like Fish-swim, Hopper-hop, Hopper-stand, Humanoid-run, Humanoid-stand, and Quadruped-run.
- D4RL Antmaze: Highly challenging sparse-reward environments (umaze-v2, umaze-diverse-v2, medium-play-v2, medium-diverse-v2) used to test offline-to-online fine-tuning capabilities.
Key Insights and Ideas
- The Theoretical Link: TD-error prioritization isn't just a good trick—it's the exact mathematical mechanism needed to guide an off-policy data distribution toward an optimal on-policy distribution under a regularized objective.
- Regularization as a Shield: The $f$-divergence regularizer naturally penalizes transitions where the replay buffer distribution deviates too drastically from the current policy, mitigating the harmful effects of distribution shift.
- Fixing Underestimation: By pairing ROER with a separate value network using the regularized objective, the algorithm successfully counteracts the notorious value underestimation bias found in modern actor-critic methods like Soft Actor-Critic (SAC).
Key Results
- Online Performance: Integrated with SAC, ROER outperformed state-of-the-art baselines (Uniform sampling, PER, and LaBER) in 6 out of 11 continuous control tasks, while matching performance in the remaining tasks. Notably, on DM Control's
Hopper-stand, ROER nearly doubled the performance of standard SAC. - Mitigating Bias: Value estimation analysis showed that ROER converges to true values much faster than baselines, effectively eliminating the underestimation bias in environments like
Hopper-v2andHumanoid-v2.
- Offline-to-Online Fine-Tuning: On the highly challenging D4RL Antmaze benchmarks, standard SAC, PER, and LaBER completely failed to receive any reward signal (0.0% success) on the
mediumtasks. ROER broke through, achieving a 31.3% success rate on medium-play and 26.3% on medium-diverse.
Limitations and Future Work
- Convergence Guarantees: While ROER performs exceptionally well empirically, the paper lacks rigorous theoretical guarantees ensuring convergence within fully online settings.
- Hyperparameter Sensitivity: ROER introduces several new hyperparameters, most notably the loss temperature $\beta$ and the convergence rate $\lambda$. The optimal value of $\beta$ varies between domains (e.g., $\beta=4$ for MuJoCo vs. $\beta=1$ for DM Control), meaning it requires careful tuning.
- Future Directions: The authors suggest developing an adaptive loss temperature to dynamically tune the regularization strength as training progresses, as well as explicitly extending the framework to purely offline RL settings.
Summary updated