Learning What to Remember: Long-horizon Counterfactual Memory Optimization
Abstract
Persistent textual memory allows language models to carry information across long interactions, but learning what to remember is fundamentally a credit-assignment problem. A memory rewrite may only become useful many steps later, while much of the observed utility may be inherited from information already stored before the rewrite. We introduce Memory Gain Policy Optimization (MGPO), which isolates the incremental value of each memory rewrite by crediting it for its marginal contribution to current and future downstream utility. This turns delayed memory utility into a direct learning signal for optimizing what information should persist. We study MGPO on document-level information extraction, where structured supervision makes the effects of individual memory updates directly measurable. MGPO improves extraction while reducing average memory length by nearly 80% relative to the initial memory policy before optimization. The learned memory policy also supports reuse and transfer across domains, downstream models without further training. These results show that effective memory learning depends not only on preserving useful information, but on identifying which memory updates create lasting incremental value.
Create a lesson
Metadata
- Categories
- cs.CL, cs.LG
Related papers
Traverse: Learning When to Remember, Reset, and Redirect for Long-Horizon Web Search
Shared title terminologycs.CLJingyuan Ma, Lynx Aster, He Zhang et al.
CoT-Proxy: Cross-Format Transfer for Distilling Long-Horizon Policies
Shared title terminologycs.CLDawid J. Kopiczko, Tijmen Blankevoort, Yuki M. Asano
Context Injection and Long-Horizon Reliability: Separating Duplicate Recognition, Local Processing, and Counter Tracking
Shared title terminologycs.CLThomas Serval
MemFold: Learning Compact Soft Memory for Long-Context Personalization via On-Policy Optimization
Shared title terminologycs.CLJingxuan Wu, Yuzhe Yang, Yiqiao Huang et al.
Can LLMs Reason Over Long Horizons? An Empirical Evaluation of Context Strategies for Longitudinal Clinical Reasoning
Shared title terminologycs.CLTaye Akinrele, Noorbakhsh Amiri Golilarz, Subash Neupane et al.
LatentHarness: Learning Latent Actions for Memory and Reasoning via Counterfactual Policy Distillation
Shared title terminologycs.CLXiaoqiang Wang, Suyuchen Wang, Bang Liu