Long-horizon agents face the challenge of growing context size during interaction with environment, which degrades the performance and stability. Existing methods typically introduce the external memory module and look up the relevant information from the stored memory, which prevents the model itself from proactively managing its memory content and aligning with the agent's overarching task objectives. To address these limitations, we propose the self-memory policy optimization algorithm (MemPO), which enables the agent (policy model) to autonomously summarize and manage their memory during interaction with environment. By improving the credit assignment mechanism based on memory effectiveness, the policy model can selectively retain crucial information, significantly reducing token consumption while preserving task performance. Extensive experiments and analyses confirm that MemPO achieves absolute F1 score gains of 25.98 over the base model and 7.1 over the previous SOTA baseline, while reducing token usage by 67.58% and 73.12%. The code is released at https://github.com/TheNewBeeKing/MemPO.
翻译:长时域智能体在环境交互过程中面临上下文规模持续增长的挑战,这会导致性能与稳定性下降。现有方法通常引入外部记忆模块并从存储记忆中检索相关信息,但该方法无法使模型主动管理其记忆内容,也无法与智能体的全局任务目标对齐。为解决上述局限,我们提出自我记忆策略优化算法(MemPO),该算法使智能体(策略模型)能够在环境交互过程中自主总结和管理记忆。通过基于记忆有效性改进信用分配机制,策略模型能够选择性保留关键信息,在维持任务性能的同时显著降低Token消耗。大量实验与分析表明,MemPO在基础模型上实现25.98的F1分数绝对提升,相较于此前最优基线取得7.1的提升,同时分别减少67.58%与73.12%的Token使用量。相关代码已开源至https://github.com/TheNewBeeKing/MemPO。