METTA: Memory-Enhanced Test-Time Adaptation for Meta-Reinforcement Learning
Organizations: Department of Computer Engineering Sharif University of Technology
Abstract
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 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.
Figures & tables
| Method | Coverage | Episode Jaccard | Steps |
|---|---|---|---|
| Metta | |||
| ECET | |||
| TrMRL |
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Meta-World | MuJoCo | PointMaze | ||
|---|---|---|---|---|---|
| ML1 | ML10 | ML45 | |||
| Training | |||||
| num_envs | 50 | 50 | 180 | 50 | 25 |
| rollout_steps | 500 | 100 | 500 | ||
| trial_length | 5 | 5 | 10 | ||
| TTT | |||||
| Method | Per-decision computation | Full-trial computation | History memory |
|---|---|---|---|
| TrMRL | |||
| ECET | |||
| Metta + Attention | |||
| Metta + EMA |
| Metta | TrMRL | ECET ( ) | ECET ( ) | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Metric | TTT-MLP | TTT-Linear | ||||||||||||
| Time (ms/step) | 2.159 | 1.616 | 0.551 | 0.639 | 1.061 | 9.223 | 0.761 | 0.991 | 2.119 | 21.713 | 1.035 | 2.151 | 7.599 | 105.403 |
| Memory (MiB) | 5.034 | 2.397 | 0.335 | 0.356 | 0.570 | 5.333 | 0.792 | 0.863 | 1.701 | 21.388 | 2.534 | 2.857 | 6.813 | 101.115 |
Meta-Reinforcement Learning
Meta-reinforcement learning trains agents across tasks so they can adapt quickly to new environments or objectives.
See all 40 papers