TL;DR
Robots learning from human demonstrations typically suffer from digital amnesia—they either forget crucial early clues over long tasks or run out of memory trying to process everything at once. This paper introduces Keyframe Mnemonics, a self-supervised method that exploits the natural "laziness" of neural networks to automatically cherry-pick and store only the decision-critical moments in a compact working memory. Because the robot holds onto exact snapshots rather than blurry, compressed summaries, a policy trained on 5-second tasks can effortlessly generalize to horizons orders of magnitude longer without losing the plot.
What Problem Does This Paper Address?
In Behavior Cloning (BC), we teach robots by having them imitate expert demonstrations. When all necessary information is visible right now (a Markovian world), standard policies shine. Real life, however, is partially observable (non-Markovian): if someone flashes a red card now and asks you to press the matching button five minutes later, looking only at the present moment won't help.
Existing fixes struggle when stretched across time:
- Recurrent models (like LSTMs) continually compress history into a single hidden vector. Over long stretches, this representation blurs—a phenomenon called hidden-state collapse—and training gradients become unstable.
- Transformers look directly at past frames, avoiding compression blur, but suffer from finite context windows and quadratic compute costs.
Worse, both architectures tend to fail catastrophically the moment a test episode runs longer than the demonstrations they saw during training. How do we build a policy that remembers critical cues indefinitely—achieving horizon-invariance—without human-labeled "remember this!" tags?
Methods
Instead of building a bigger monolith to process all of history, the authors decouple memory management from action generation across three clever stages:
- Proxy Policy Training (The Novel Trick): First, they train a "proxy" network to predict expert actions given a tiny buffer of randomly sampled past observations (up to budget $k$). Random temporal masking creates a combinatorially massive set of input combinations. Memorizing noisy background frames across all those combinations is way too complex, so the network falls back on its simplicity bias—its built-in preference for simple rules—and latches onto true keyframes that reliably predict actions. Once frozen, this proxy's prediction error acts as a self-supervised "keyframe detector": feed it informative frames, and its loss drops.
- Selector Policy Training: Next, a lightweight reinforcement learning agent (trained via PPO) watches trajectories frame-by-frame, assigning priority scores to manage a fixed-size priority queue. Its reward comes directly from minimizing the frozen proxy's loss, weighted by a "surprise" term that emphasizes high-uncertainty decision points.
- Behavior Cloning: Finally, a standard BC architecture (MLP, CNN, Transformer, or Diffusion/Flow-matching) is trained to act using only the current observation and the compact buffer of mnemonics curated by the selector.
Datasets
The authors evaluate across four tiers of environments (no new benchmarks are introduced, though a custom real-world task is collected):
- Synthetic sequence tasks: Add, Scattered Copy, and Active T-Maze.
- Visual grid worlds: MiniGrid-Memory and LTMB-Hallway.
- Simulated robot manipulation: MIKASA-Robo (32 memory-intensive tabletop tasks, plus time-delayed RememberColor3-$\Delta T$) and Robomimic (Lift, Can, Square—standard Markovian tasks to ensure memory conditioning doesn't hurt normal control).
- Real-world robotics: 30 VR-teleoperated demonstrations of RememberColor2-$\Delta T$, where a robot sees a colored cube, waits through an empty-table delay, and must reach for the matching cube.
Key Insights and Ideas
- Weaponizing simplicity bias as a temporal filter: Deep networks naturally favor Kolmogorov-simple input-output mappings. By feeding the proxy policy randomly masked histories, learning spurious correlations with background frames becomes intractably complex, forcing the network to isolate causal keyframes purely from action statistics.
- Discrete selection beats continuous compression: Compressed recurrent states inevitably decay as time ticks on. By framing memory as a discrete priority queue of raw observations, a cue saved at step 2 looks identical at step 2 or step 1,000,000—unlocking true horizon-invariance.
- Swapping queue rules between training and testing: Using a First-In-First-Out (FIFO) tie-breaker during training penalizes the selector if it fails to assign strictly higher priorities to long-term cues, while switching to Last-In-First-Out (LIFO) at test time protects high-priority keyframes from ever being evicted.
Key Results
- Extreme Horizon Scaling: On synthetic and grid tasks, Keyframe Mnemonics achieves 100% success rates (SR) and holds steady way past training horizons—even out to $10^5$ and $10^6$ timesteps on synthetic tasks, where LSTMs, Mamba, and memory transformers collapse to noise.
- Simulated Manipulation: Across 23 visual MIKASA-Robo tasks, KM beats the strongest hybrid-memory baseline (ELMUR) on 17 tasks, boosting average absolute SR by +13.9%. When trained with a 15-step delay on RememberColor3-$\Delta T$, ELMUR collapses to ~0% by step 35, whereas KM sustains its ~70% training SR all the way to 250 steps. On Markovian Robomimic tasks, KM matches standard Diffusion Policy (e.g., 1.00 vs. 0.99 on Lift).
- Real-World Generalization: Trained on ~5-second delays, KM retains 80% SR when tested at ~100-second delays ($20\times$ longer horizons), while Diffusion Policy drops from 45% to 10% and frame-subsampling (PTP) drops from 80% to 0%.
Limitations and Future Work
- Fixed Memory Budget ($k$): Guessing the buffer size $k$ upfront is tricky; setting it poorly can create redundant buffer states or cap how many distinct cues the agent can hold.
- No "Play" or Multi-Task Data Yet: The math assumes every demonstration contains at least one keyframe, limiting its use on unstructured "play" data or multi-task datasets where memory needs vary wildly.
- High-Capacity Memory: Scaling horizon-invariant mechanisms to tasks requiring dense, high-capacity working memory remains an open frontier.
Summary updated