METTA: Memory-Enhanced Test-Time Adaptation for Meta-Reinforcement Learning

Agent Agent Memory ML RL ML
2026年10月22日
元强化学习旨在训练智能体,使其仅通过少量交互即可快速适应未曾见过的新任务;但这一目标要求智能体能够对较长交互历史中的任务线索进行有效表征。传统循环神经网络类智能体将经验压缩为隐状态,而基于Transformer的智能体则需从过往轨迹中检索信息,其内存与计算开销均为序列长度的平方级。本文提出一种面向元强化学习的记忆增强型测试时自适应方法(Memory-Enhanced Test-Time Adaptation, METTA)。该方法将快速自适应阶段解耦为两个时间尺度:其一,采用具备因果性的神经记忆模块,以线性序列复杂度实现细粒度的“单回合内”(within-episode)自适应;其二,借助紧凑的“回合级”摘要表示,支持跨回合的长程任务推断,无需对全部交互历史执行注意力计算。此外,为智能体配备神经记忆不仅提供了充分的表达能力,还赋予其在测试阶段持续训练的能力,从而使其在元测试阶段能高效适应未见过的预留任务及任务族。在未见过的Meta-World ML10/45预留测试环境中,METTA在保持较低训练预算与较短实际运行时间的前提下,成功率达50%以上;在长上下文、稀疏奖励的PointMaze任务上,METTA展现出更具结构化的探索行为,性能显著优于基于Transformer的基线方法。上述结果表明,METTA为构建更自适应、更可扩展的长上下文元强化学习系统提供了一条高效可行的技术路径。
Meta-reinforcement learning aims to train agents that adapt quickly to unseen tasks from limited interaction, but this requires representing task evidence over long interaction histories. Classical recurrent agents compress experience into hidden states, while transformer-based agents retrieve from past trajectories at quadratic memory and computation cost. In this work, we propose Memory-Enhanced Test-Time Adaptation (METTA) for meta-reinforcement learning. It decomposes the fast adaptation phase into two temporal scales: a causal neural memory performs fine-grained within-episode adaptation with linear sequence complexity, while compact episode-level summaries support long-range cross-episode task inference without attending over the full interaction history. Moreover, equipping agents with neural memory provides sufficient expressive capacity and test-time training capability, enabling effective adaptation to unseen held-out tasks and task families at meta-test time. On unseen held-out Meta-World ML10/45 test environments, METTA achieves a success rate over $50\%$ while maintaining a low training budget and short wall-clock time. On long-context sparse-reward PointMaze tasks, it outperforms transformer-based baselines by exhibiting more structured exploration behavior. These results show that METTA provides an efficient path toward more adaptive and scalable long-context meta-RL.
许愿