RLEP: Reinforcement Learning with Experience Replay for LLM Reasoning

Hongzhi Zhang, Jia Fu, Jingyuan Zhang, Kai Fu, Qi Wang +2 more
7/10/2025
cs.CL

Official code: Kwai-Klear/RLEP (59 stars, Apache-2.0, last commit 2025-07-27).

Abstract

Reinforcement learning (RL) for large language models is an energy-intensive endeavor: training can be unstable, and the policy may gradually drift away from its pretrained weights. We present \emph{RLEP}\, -- \,Reinforcement Learning with Experience rePlay\, -- \,a two-phase framework that first collects verified trajectories and then replays them during subsequent training. At every update step, the policy is optimized on mini-batches that blend newly generated rollouts with these replayed successes. By replaying high-quality examples, RLEP steers the model away from fruitless exploration, focuses learning on promising reasoning paths, and delivers both faster convergence and stronger final performance. On the Qwen2.5-Math-7B base model, RLEP reaches baseline peak accuracy with substantially fewer updates and ultimately surpasses it, improving accuracy on AIME-2024 from 38.2% to 39.9%, on AIME-2025 from 19.8% to 22.3%, and on AMC-2023 from 77.0% to 82.2%. Our code, datasets, and checkpoints are publicly available at https://github.com/Kwai-Klear/RLEP to facilitate reproducibility and further research.

View on arXivView PDF

Code Implementations(1)

Kwai-Klear/RLEPOfficial100%
Apache-2.0

RL with Experience Replay

592Roff, ShellJun 26, 20251 years agoApache-2.0

Cite this paper

@article{zhang2025rlep,
  title  = {RLEP: Reinforcement Learning with Experience Replay for LLM Reasoning},
  author = {Hongzhi Zhang and Jia Fu and Jingyuan Zhang and Kai Fu and Qi Wang and Fuzheng Zhang and Guorui Zhou},
  year   = {2025},
  eprint = {2507.07451},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.07451v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.07451.svg)](https://codeofpaper.com/paper/2507.07451)

Discussion