Prabin Kumar Rath1,
Omkar Patil1,
Nakul Gopalan1
1Arizona State University
- 🦾 Real-world rollouts
- 🧰 Installation
- 📦 Data generation
- ⚙️ Training
- 📊 Evaluation
- 🧭 Domains
- 📜 License
- 🙏 Acknowledgement
- 📝 Citation
The robot is shown a red or green cube for 3–5s. The cue is then removed, and after a delay two cubes appear 30 cm apart — the robot must reach for the color it was shown. Demonstrations were collected at a ~5s cue-to-choice delay; the policy is evaluated at delays 20× longer with frozen parameters. Videos play at 4×; the panel on the left shows the mnemonic buffer (orange) and the current observation (blue).
| Δt = 3–5s · training horizon | Δt = 100–120s · 20× out-of-distribution |
|---|---|
![]() |
![]() |
| 20 / 20 success | 16 / 20 success |
NOTE: The real-robot domain lives on the
lerobotbranch, and the on-hardware deployment code in our LeRobot fork.
Tested on Ubuntu 22.04 with an NVIDIA RTX 3090. Install a CUDA build of PyTorch first.
pip install torch==2.7.1 torchvision==0.22.1 --index-url https://download.pytorch.org/whl/cu126Base install — synthetic domains (
tmaze,add,scattered_copy)
pip install -e .Extras — grid and robot domains, both installable in the same env
pip install -e ".[grid]" # minigrid, imageio, LTMB
pip install -e ".[mikasa]" # mani_skill, lerobot, diffusers, rerun-sdk, mikasa_robo_suite
bash problems/mikasa_robo_problem/setup_assets.sh # ManiSkill YCB assets, after .[mikasa]Run every command from the repository root.
| Domain | Source |
|---|---|
tmaze, add, scattered_copy |
generated on the fly, no external data |
ltmb |
expert demos generated locally — problems/ltmb_problem/README.md |
mikasa_robo |
demos downloaded and converted to a proxy H5 — problems/mikasa_robo_problem/README.md |
real_robot |
a collected LeRobot dataset converted to a proxy H5 — see problems/real_robot_problem/README.md on the lerobot branch |
Three sequential stages, orchestrated by keyframe_mnemonics/train.py:
-
Proxy
$f_\theta$ — predicts expert actions from randomly sampled memory buffers. -
Selector
$\pi_\mathrm{s}$ — PPO policy that decides, per timestep, whether an observation enters the fixed-size buffer. Rewarded by the frozen proxy's prediction loss. -
Policy
$\pi_\mathrm{BC}$ — BC policy trained on buffers curated by the frozen selector + current observation.
Run the full pipeline
python -m keyframe_mnemonics.train --experiment_name tmazeRun a subset of stages, chaining from existing checkpoints
python -m keyframe_mnemonics.train --experiment_name tmaze --stages selector,policy --proxy_checkpoint tmaze_<TAG>
python -m keyframe_mnemonics.train --experiment_name tmaze --stages policy --selector_checkpoint tmaze_<TAG>Each stage is also runnable standalone
python -m keyframe_mnemonics.train_proxy --experiment_name tmaze
python -m keyframe_mnemonics.train_selector --experiment_name tmaze --proxy_checkpoint tmaze_<TAG>
python -m keyframe_mnemonics.train_policy --experiment_name tmaze --selector_checkpoint tmaze_<TAG>Swap --experiment_name for any config in conf/ (e.g. ltmb_Hallway, mikasa_robo_RememberColor3).
A run writes one folder, checkpoints/<experiment>_<TAG>/. The --proxy_checkpoint / --selector_checkpoint / --policy_checkpoint arguments all take this folder name.
checkpoints/tmaze_<TAG>/
├── proxy/ tmaze_proxy_<N>.pth (per save_interval) + config.yaml + train.log
├── selector/ tmaze_selector.zip + frozen source proxy + config.yaml + train.log
├── policy/ tmaze_policy_<N>.pth (per save_interval) + config.yaml + train.log
├── proxy_cache/ proxy rollout H5, only when proxy.cache_path is set (removed after stage 1)
└── policy_dataset/ selector-curated dataset, when policy.cache_path is set or the lerobot backend is used
Each simulated domain has two scripts under rollout/<domain>/, both taking the run folder name:
# Trace the selector's priority and buffer state per step.
python rollout/tmaze/test_selector.py --checkpoint_path tmaze_<TAG>
# Evaluate selector + policy end-to-end on task metrics.
python rollout/tmaze/eval_policy.py --policy_checkpoint tmaze_<TAG>| Domain | Config | Proxy dataset | Policy dataset |
|---|---|---|---|
tmaze |
conf/tmaze.yaml |
rollout | h5 |
add |
conf/add.yaml |
rollout | h5 |
scattered_copy |
conf/scattered_copy.yaml |
rollout | h5 |
ltmb |
conf/ltmb/*.yaml |
rollout | h5 |
mikasa_robo |
conf/mikasa_robo/*.yaml |
demos | lerobot |
real_robot † |
conf/real_robot/*.yaml |
demos | lerobot |
† on the lerobot branch.
Set in each config's pipeline block. rollout replays Process episodes into a fixed dataset, demos samples buffers from an on-disk demonstration H5; h5 stores flat buffers, lerobot a LeRobot video dataset.
Released under CC BY-NC-SA 4.0 — see LICENSE.
MIKASA-Robo • ManiSkill • LTMB • MiniGrid • LeRobot • Stable-Baselines3
If you find this work useful, please cite our paper:
@inproceedings{rath2026keyframe,
title = {Self-Supervised Keyframe Discovery for Horizon-Invariant Behavior Cloning},
author = {Rath, Prabin Kumar and Patil, Omkar and Gopalan, Nakul},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026}
}


