The Past Is Not Past: Memory-Enhanced Dynamic Reward Shaping

Yang Liu, Enxi Wang, Yufei Gao, Weixin Zhang, Bo Wang, Zhiyuan Zeng, Yikai Zhang, Yining Zheng, Xipeng Qiu


Abstract
Despite the remarkable progress of reinforcement learning for large language models, effective exploration remains a persistent challenge, as policies may collapse into recurrent failure modes and repeatedly generate similar erroneous behaviors across rollouts. While classical entropy regularization promotes randomness under the current policy, it provides limited mechanisms for recognizing and suppressing such recurrent failure patterns over time. To address this limitation, we propose MEDS, a Memory-Enhanced Dynamic reward Shaping framework that augments the reward signal with informative cues from historical behaviors. MEDS turns intermediate model representations into a lightweight behavioral memory that captures reasoning patterns from past rollouts, enabling dynamic reward shaping that steers the policy away from recurrent failure modes and toward alternative solution paths. Across five datasets and three base models, MEDS consistently improves average performance over existing baselines, achieving gains of up to 4.13 Pass@1 points and 4.37 Pass@128 points. LLM-based annotations and diversity metrics further confirm that MEDS promotes more diverse sampling behaviors. Our code is available at https://github.com/Linxi000/MEDS.
Anthology ID:
2026.emnlp-main.1975
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Hung-Yi Lee, Sunipa Dev, Jessy Li, Desmond Elliott
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
44948–44971
Language:
URL:
https://aclanthology.org/2026.emnlp-main.1975/
DOI:
Bibkey:
Cite (ACL):
Yang Liu, Enxi Wang, Yufei Gao, Weixin Zhang, Bo Wang, Zhiyuan Zeng, Yikai Zhang, Yining Zheng, and Xipeng Qiu. 2026. The Past Is Not Past: Memory-Enhanced Dynamic Reward Shaping. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 44948–44971, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
The Past Is Not Past: Memory-Enhanced Dynamic Reward Shaping (Liu et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-main.1975.pdf