MemBuilder: Reinforcing LLMs for Long-Term Memory Construction via Attributed Dense Rewards

Zhiyu Shen, Ziming Wu, Fuming Lai, Shaobing Lian, Yanghui Rao
1/9/2026
cs.CL

No official code found. Best implementation: Zh1yuShen/MemBuilder (16 stars, MIT, last commit 2026-04-07).

Abstract

Maintaining consistency in long-term dialogues remains a fundamental challenge for LLMs, as standard retrieval mechanisms often fail to capture the temporal evolution of historical states. While memory-augmented frameworks offer a structured alternative, current systems rely on static prompting of closed-source models or suffer from ineffective training paradigms with sparse rewards. We introduce MemBuilder, a reinforcement learning framework that trains models to orchestrate multi-dimensional memory construction with attributed dense rewards. MemBuilder addresses two key challenges: (1) Sparse Trajectory-Level Rewards: we employ synthetic session-level question generation to provide dense intermediate rewards across extended trajectories; and (2) Multi-Dimensional Memory Attribution: we introduce contribution-aware gradient weighting that scales policy updates based on each component's downstream impact. Experimental results show that MemBuilder enables a 4B-parameter model to outperform state-of-the-art closed-source baselines, exhibiting strong generalization across long-term dialogue benchmarks.

View on arXivView PDF

Code Implementations(1)

MIT

Code of "MemBuilder: Reinforcing LLMs for Long-Term Memory Construction via Attributed Dense Rewards"

160Shell, PythonJan 30, 20266 months agoMIT
llmlong-term-memoryprmreinforcement-learning

Similar Papers

Cite this paper

@article{shen2026membuilder,
  title  = {MemBuilder: Reinforcing LLMs for Long-Term Memory Construction via Attributed Dense Rewards},
  author = {Zhiyu Shen and Ziming Wu and Fuming Lai and Shaobing Lian and Yanghui Rao},
  year   = {2026},
  eprint = {2601.05488},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.05488v2}
}

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/2601.05488.svg)](https://codeofpaper.com/paper/2601.05488)

Discussion