让语言代理在测试时动态调整记忆,提升长期任务适应性。
AdaMEM: Test-Time Adaptive Memory for Language Agents

- 用长短结合的记忆架构,动态生成策略记忆以指导决策
- 在ALFWorld和WebShop上相对基线提升最高13%和11%
- 无需在线更新参数,适合部署后持续优化的智能体
语言代理的核心挑战在于如何利用过往经验适应测试时的动态变化。现有方法通常仅在任务启动时检索记忆,导致静态引导随长程任务推进逐渐失准。为此,我们提出自适应记忆代理(AdaMEM),一种无需在线更新模型参数的测试时自适应框架。它采用混合记忆结构:保留离线收集的原始经验作为长期轨迹记忆,同时实时生成动态短期策略记忆以指导决策。该机制实现了不同推理计算水平下的令牌效率与适应性平衡。实验表明,AdaMEM显著优于静态记忆基线,在ALFWorld和WebShop上分别实现最高13%和11%的相对提升,并在HotpotQA的智能搜索任务中保持领先。为进一步增强适应能力,我们提出分步记忆微调(STEP-MFT),训练策略从检索经验中合成高质量决策方案,带来额外性能增益。本工作为语言代理记忆开辟了新的可扩展维度,支持真实环境中部署后的持续推理与自我演进。代码已开源:https://github.com/yunx-z/AdaMEM。
原文摘要 · Abstract (English)
A central challenge for language agents is utilizing past experience to adapt to dynamic test-time conditions. While recent work demonstrates the promise of agentic memory mechanisms, most systems restrict retrieval to episode initiation. Consequently, agents are forced to rely on static guidance that becomes increasingly misaligned as long-horizon tasks unfold. To address this rigidity, we propose the Adaptive Memory Agent (AdaMEM), a novel framework for agent test-time adaptation. Without updating model parameters online, AdaMEM adapts agent behavior via a hybrid memory architecture: it maintains a long-term trajectory memory of raw experiences collected offline while generating dynamic short-term strategy memory on-the-fly to guide decision-making. This mechanism enables the trade-off between token efficiency and adaptability across varying inference-time compute levels. Empirically, AdaMEM significantly outperforms static memory baselines, achieving relative gains of up to 13% on ALFWorld and 11% on WebShop, with consistent leading performance extending to agentic search on HotpotQA. To further enhance this adaptation, we develop STEP-MFT, a Step-wise Memory Fine-Tuning technique that trains the policy to synthesize high-quality strategies from retrieved experiences, yielding additional performance gains. Our work establishes a new scaling dimension for agentic memory, supporting continuous reasoning and self-evolution post-deployment in real-world environments. Our code is available at https://github.com/yunx-z/AdaMEM.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。