Saved in:
Bibliographic Details
Main Authors: Liu, Yang, Wang, Enxi, Gao, Yufei, Zhang, Weixin, Wang, Bo, Zeng, Zhiyuan, Zhang, Yikai, Zheng, Yining, Qiu, Xipeng
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2604.11297
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908959944736768
author Liu, Yang
Wang, Enxi
Gao, Yufei
Zhang, Weixin
Wang, Bo
Zeng, Zhiyuan
Zhang, Yikai
Zheng, Yining
Qiu, Xipeng
author_facet Liu, Yang
Wang, Enxi
Gao, Yufei
Zhang, Weixin
Wang, Bo
Zeng, Zhiyuan
Zhang, Yikai
Zheng, Yining
Qiu, Xipeng
contents Despite the success of reinforcement learning for large language models, a common failure mode is reduced sampling diversity, where the policy repeatedly generates similar erroneous behaviors. Classical entropy regularization encourages randomness under the current policy, but does not explicitly discourage recurrent failure patterns across rollouts. We propose MEDS, a Memory-Enhanced Dynamic reward Shaping framework that incorporates historical behavioral signals into reward design. By storing and leveraging intermediate model representations, we capture features of past rollouts and use density-based clustering to identify frequently recurring error patterns. Rollouts assigned to more prevalent error clusters are penalized more heavily, encouraging broader exploration while reducing repeated mistakes. 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. Additional analyses using both LLM-based annotations and quantitative diversity metrics show that MEDS increases behavioral diversity during sampling.
format Preprint
id arxiv_https___arxiv_org_abs_2604_11297
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle The Past Is Not Past: Memory-Enhanced Dynamic Reward Shaping
Liu, Yang
Wang, Enxi
Gao, Yufei
Zhang, Weixin
Wang, Bo
Zeng, Zhiyuan
Zhang, Yikai
Zheng, Yining
Qiu, Xipeng
Machine Learning
Artificial Intelligence
Computation and Language
Despite the success of reinforcement learning for large language models, a common failure mode is reduced sampling diversity, where the policy repeatedly generates similar erroneous behaviors. Classical entropy regularization encourages randomness under the current policy, but does not explicitly discourage recurrent failure patterns across rollouts. We propose MEDS, a Memory-Enhanced Dynamic reward Shaping framework that incorporates historical behavioral signals into reward design. By storing and leveraging intermediate model representations, we capture features of past rollouts and use density-based clustering to identify frequently recurring error patterns. Rollouts assigned to more prevalent error clusters are penalized more heavily, encouraging broader exploration while reducing repeated mistakes. 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. Additional analyses using both LLM-based annotations and quantitative diversity metrics show that MEDS increases behavioral diversity during sampling.
title The Past Is Not Past: Memory-Enhanced Dynamic Reward Shaping
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2604.11297