Reproduce “SAM: State-Adaptive Memory for Long-Horizon Reasoning Agent” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yuyang Hu, Hongjin Qian, Shuting Wang, Jiongnan Liu, Ziliang Zhao, Jiejun Tan, Zheng Liu, Zhicheng Dou

An external framework, State-Adaptive Memory (SAM), enhances large language model agents' capabilities in long-horizon reasoning by dynamically managing interaction history through a cue-page architecture. This system consistently outscored baseline context management methods by up to 2.6 points on average across various agent benchmarks, demonstrating robust performance and generalizability.

Key insights

  • An agent's need for past information is dynamic and context-dependent, requiring a 'state-adaptive' memory system that supports intent-driven information recovery.
  • Decoupling the concise representation of past interactions (cues) from their detailed content (pages) enables efficient context window management and precise, on-demand information retrieval.
  • Optimizing memory with a combination of expert supervision and reinforcement learning, incorporating both task outcome and oracle-anchored recoverability rewards, is effective for long-term utility in complex reasoning tasks.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.