TL;DR
ELMUR (External Layer Memory with Update/Rewrite) is a novel Transformer architecture that solves the "forgetting" problem in long-horizon robotic tasks. By equipping each layer with a structured external memory managed by a Least Recently Used (LRU) update rule, ELMUR can retain critical information across horizons 100,000 times longer than its attention window, achieving a 100% success rate on million-step memory tasks.
The Challenge of Long-Horizon Dependencies
In Reinforcement Learning (RL) and robotics, agents often face partial observability—the robot cannot see everything at once and must remember past events to make current decisions. Imagine a robot cooking: it needs to remember if it already added salt to a pot, even if the salt has long since dissolved.
Current architectures struggle with this:
- Standard Transformers have a fixed "context window." Once an event falls out of that window, it is gone forever.
- Recurrent Neural Networks (RNNs) suffer from vanishing gradients and "forgetting" as sequences grow long.
- Naive memory extensions often fail to scale or become "noisy" when trying to store thousands of steps of history.
The authors tackle a critical question: how can a policy remember a single, crucial cue from 1,000,000 steps ago without the computational explosion of a massive attention window?
Methods: A Dual-Track Architecture
ELMUR introduces a "dual-track" transformer architecture. Alongside the standard Token Track (which processes the current observation), there is a parallel Memory Track that persists across time segments.
Key technical innovations include:
- Layer-Local External Memory: Instead of one global memory, each transformer layer maintains its own set of memory embeddings. This allows different layers to store different types of information (e.g., low-level visual features vs. high-level task goals).
- Bidirectional Cross-Attention: Tokens "read" from memory via
mem2tokblocks and "write" updates back viatok2memblocks. - LRU-Based Update/Rewrite: To keep memory bounded, ELMUR uses a Least Recently Used (LRU) logic. When the memory is full, it identifies the "oldest" slot. Instead of just deleting it, it uses convex blending—mixing a fraction ($\lambda$) of the new information with the old—to ensure a smooth transition and theoretical stability.
- Relative Temporal Bias: The model uses a learned bias based on the distance between the current time and a memory slot's "anchor" (the last time it was updated), helping the agent maintain a sense of chronology.
Key Insights and Ideas
- Selective Persistence: ELMUR proves that you do not need to attend to everything in the past. By using an LRU policy, the model learns to "park" important information in specific memory slots and leave them untouched for hundreds of thousands of steps.
- The Power of Convex Blending: Theoretical analysis shows that this blending approach provides a "half-life" for information, preventing the sudden "catastrophic forgetting" seen in simpler buffer-clearing methods.
- Decoupling Complexity from Horizon: Because the memory size is fixed per layer, the computational cost of ELMUR scales with the number of memory slots, not the length of the trajectory. This makes "infinite" horizons computationally feasible.
Key Results
The authors evaluated ELMUR across a rigorous battery of benchmarks, including synthetic memory tests, robotic manipulation suites (MIKASA-Robo), and POMDP environments (POPGym).
- T-Maze Dominance: ELMUR achieved a 100% success rate on T-Maze corridors of 1,000,000 steps. For context, its attention window was only 10 steps—meaning it carried information 100,000x further than its native "sight."
- Robotic Manipulation: On the MIKASA-Robo benchmark (sparse-reward tasks with visual observations), ELMUR improved the aggregate success rate by ~70% over the previous state-of-the-art (RATE). It nearly doubled the performance of strong baselines on tasks like "RememberColor".
- POPGym Leaderboard: It achieved the top score on 24 out of 48 tasks, outperforming specialized models like DMamba and Recurrent Action Transformers.
- Efficiency: Despite having more parameters than a standard Decision Transformer, ELMUR ran faster per step (6.8ms vs 10.7ms) because it maintains a much smaller, more efficient attention window.
Limitations and Future Work
- Fixed Hyperparameters: The blending factor ($\lambda$) and memory size ($M$) are currently fixed hyperparameters. Making these adaptive or learned could further improve performance.
- Imitation Learning Focus: This paper primarily tests ELMUR in an Offline RL / Imitation Learning setting (learning from demonstrations). Extending this to online, "from-scratch" reinforcement learning is a logical next step.
- Segment-Level Recurrence: While efficient, the segment-based processing still requires careful tuning of segment lengths to balance recurrence overhead and local context.
Summary updated