ROER: Regularized Optimal Experience Replay

Changling Li, Zhang-Wei Hong, Pulkit Agrawal, Divyansh Garg, Joni Pajarinen

Introduction

In off-policy Reinforcement Learning (RL), agents rely on a replay buffer to store and reuse past experiences. While Prioritized Experience Replay (PER)—sampling transitions with high Temporal Difference (TD) errors—is widely used, it often lacks a rigorous theoretical foundation and struggles with distribution shift. ROER (Regularized Optimal Experience Replay) addresses these issues by linking experience prioritization to occupancy optimization through a KL-divergence regularized objective.

The Challenge of Distribution Shift

The primary hurdle in off-policy RL is that the data in the replay buffer is often collected by outdated versions of the agent's policy. When the current policy diverges significantly from the buffer's data, TD-error estimates become inaccurate, leading to biased updates. This is particularly evident in "offline-to-online" fine-tuning, where an agent must transition from a static dataset to active learning in a real environment.

ROER: A Theoretical Foundation for Prioritization

ROER derives its prioritization mechanism from first principles, viewing the problem as finding an optimal occupancy distribution. By adding a KL-divergence regularizer, the objective penalizes target distributions that stray too far from the available buffer data.

The resulting dual optimization problem reveals that the mathematically optimal weight for an experience is proportional to the exponential of its TD-error: $e^{\delta / \beta}$. To implement this effectively, ROER utilizes:

  • ExtremeV Loss: A separate value network provides stable TD-error estimates.
  • Convergence Parameter ($\lambda$): Ensures stable priority updates over time.

Experimental Results

ROER was evaluated against standard baselines like Uniform Replay, PER, and LaBER across MuJoCo, DeepMind Control Suite, and D4RL Antmaze benchmarks.

Mitigating Estimation Bias

A key advantage of ROER is its ability to reduce underestimation bias. In many continuous control tasks, standard SAC suffers from significant bias, whereas ROER converges to true value estimates much faster.

Value estimation bias across various MuJoCo environments. ROER (red) consistently maintains lower bias compared to baselines.

Performance Breakthroughs

  • Antmaze: In the challenging Antmaze-Medium task, ROER achieved scores of 31.3 and 26.3, while all other baselines failed completely (scoring 0.0).
  • Continuous Control: ROER outperformed or matched state-of-the-art methods in 11 different tasks, nearly doubling performance in environments like "Hopper-stand."

Conclusion

ROER provides a robust theoretical bridge between TD-error-based reweighting and optimal occupancy optimization. By treating regularization as a "safety rail," it effectively filters misleading data and mitigates distribution shift, making it a powerful tool for complex RL tasks and offline-to-online fine-tuning. Future work may explore adaptive loss temperatures to further automate hyperparameter tuning.

Summary updated

BibTeX
@inproceedings{li2024roer,
  author = {Changling Li and Zhang-Wei Hong and Pulkit Agrawal and Divyansh Garg and Joni Pajarinen},
  title = {{ROER: Regularized Optimal Experience Replay}},
  booktitle = {RLC},
  year = {2024},
  url = {https://openreview.net/forum?id=03FzXd8ZeE},
}
Figure