Skip to content

enyolanev-bit/sample-efficient-imitation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sample-Efficient Imitation Learning

Under a small budget of demonstrations, does aggressive regularization buy sample-efficiency for imitation-learning policies? A controlled study on PushT — Diffusion Policy, trained & evaluated on AMD ROCm.

🇬🇧 English · 🇫🇷 Français · 🎯 Live results page


It works — watch the policy solve the task

A Diffusion Policy trained on 200 teleoperated demos drives the block (grey) onto the target (green). Episodes end the instant coverage crosses 95%. These are real evaluation rollouts:

Standard recipe Enhanced recipe

The question

Imitation learning is data-scarce by nature: every demonstration is a human teleoperating the robot — slow and expensive. So the field would gain enormously from policies that reach the same performance with fewer demos. Inspired by Konwoo et al. (data-constrained LM pre-training), we ask whether aggressive regularization buys that data-efficiency for imitation policies.

The hypothesis: regularization should help most when data is scarce (few demos), and matter little when data is plentiful.

Findings so far

Diffusion Policy on PushT, 150k steps, seed 0, evaluated on 100 episodes.

Demos Standard Enhanced Δ
200 29% 29% 0 pts
100 8% 19% +11 pts

Preliminary evidence suggests that, under a 100-demo budget, enhanced regularization improves PushT success from 8% to 19% (+11 pts), while showing no gain at 200 demos (29% = 29%). This is consistent with regularization helping most when demonstrations are scarce. Single seed — a strong signal, not yet a settled claim (see scope). Live results: results page · HF Space · HF model checkpoints.

Honest scope. Preliminary: single seed, one GPU, and a baseline that plateaus below the published reference (~65%) — the remaining gap is batch size (8 vs ~64). Enough to show the signal, not yet to publish. See the roadmap below.

Method

We orchestrate LeRobot's trainer (lerobot-train, which does training + simulated eval in one run) and sweep demos × recipe × seed.

  • Policy: Diffusion Policy (the reference for contact-rich, multimodal PushT — ACT reaches only ~4% here, see the pivot note).
  • standard — LeRobot defaults.
  • enhanced — aggressive regularization: weight decay 1e-3 + image-transform data augmentation.
  • Task / eval: gym-pusht; success = block coverage ≥ 95%; metrics pc_success, avg_max_reward.
  • Hardware: AMD Radeon AI PRO R9700 (gfx1201), ROCm — --device cuda. ~11 steps/s, ~3h48 per run.

The pivot (why Diffusion, not ACT)

The study started on ACT. Methodically ruling out budget, GPU/ROCm, and eval as causes, ACT topped out at ~4% on PushT at full budget — it is the wrong tool for this contact-rich, multimodal task. Diffusion Policy reaches 29%+ at the same budget (×8). The lesson: never measure an intervention on a broken substrate.

Reproduce

# One data-efficiency run (GPU / ROCm)
python data_efficiency.py --policy-type diffusion \
    --demos 200 --recipes standard --seeds 0 \
    --steps 150000 --eval-episodes 100 --device cuda --out results.csv

# Larger effective batch to close the baseline gap (~29% → ~65%):
#   --batch-size 64                      # direct, if it fits in VRAM
#   --batch-size 8 --grad-accum-steps 8  # effective 64 at the VRAM cost of 8
# --steps counts optimizer steps; see docs/batch64-grad-accum.md

# Turn results into visuals (curve + policy-rollout GIFs; no ffmpeg needed)
python make_visuals.py gifs --run runs/de_diffusion_standard_n200_s0 --prefix std
python make_visuals.py figure --csv results.csv --out results/curve.png

# Assemble the shareable results page
python build_artifact.py --csv sweep_b.csv sweep_b_r2.csv --out results/index.html

Dependencies: lerobot[pusht] (0.5.1) + PyTorch (ROCm build for AMD). Training is GPU-bound.

Roadmap

  • Multiple seeds + error bars — turn the standard-vs-enhanced delta from a signal into a claim.
  • Close the 29% → 65% baseline gap — gradient accumulation to simulate batch 64 without a bigger GPU.
  • Ablate the lever — weight-decay vs augmentation, separately.
  • Ship to the edge — export a policy and run few-shot manipulation on a Jetson.

Research grounding

  • Konwoo et al., "Pre-training under infinite compute" (arXiv:2509.14786, Stanford) — in data-constrained LM pre-training, aggressive regularization + ensembling + distillation yield ~5.17× data-efficiency; distilling an 8-model ensemble into one keeps ~83% of the gain. This repo asks whether the same levers transfer to imitation learning.
  • Wilson, "Deep Learning is Not So Mysterious or Different" — inductive biases (i.e. regularization) are a primary lever of sample efficiency; theoretical backing for why the enhanced recipe should help.

🇫🇷 Français

Sous un petit budget de démonstrations, la régularisation agressive achète-t-elle de l'efficacité-donnée aux politiques d'imitation ? Une étude contrôlée sur PushT — Diffusion Policy, entraînée et évaluée sur AMD ROCm.

🇬🇧 English · 🎯 Page de résultats live

Ça marche — la politique résout la tâche

Une Diffusion Policy entraînée sur 200 démos téléopérées pousse le bloc (gris) sur la cible (vert). L'épisode s'arrête dès que le recouvrement dépasse 95%. Vraies vidéos d'évaluation :

Recette standard Recette enhanced

La question

L'imitation est data-scarce par nature : chaque démo, c'est un humain qui téléopère le robot — lent et coûteux. Inspiré de Konwoo et al. (pré-entraînement LM sous contrainte de données), on demande si la régularisation agressive achète cette efficacité-donnée. Hypothèse : la reg devrait aider surtout quand les données sont rares, et peu quand elles sont abondantes.

Résultats à ce stade

Diffusion Policy sur PushT, 150k steps, seed 0, éval 100 épisodes.

Démos Standard Enhanced Δ
200 29% 29% 0 pts
100 8% 19% +11 pts

Évidence préliminaire : sous un budget de 100 démos, la régularisation enhanced améliore le succès sur PushT de 8% à 19% (+11 pts), sans gain à 200 démos (29% = 29%). Cohérent avec l'idée que la régularisation aide surtout quand les démonstrations sont rares. Un seul seed — signal fort, pas encore une revendication établie (cf. portée). Résultats live : page · HF Space.

Portée honnête. Préliminaire : un seed, un GPU, une baseline sous la référence publiée (~65%) — l'écart restant = le batch size (8 vs ~64). Assez pour montrer le signal, pas encore pour publier.

Méthode

On orchestre le trainer LeRobot (lerobot-train = entraînement + éval simulée en un run) et on balaie démos × recette × seed.

  • Politique : Diffusion Policy (la référence pour PushT, tâche contact-rich/multimodale — ACT n'atteint que ~4%, voir le pivot).
  • standard — défauts LeRobot.
  • enhanced — régularisation agressive : weight decay 1e-3 + data augmentation.
  • Tâche / éval : gym-pusht ; succès = recouvrement ≥ 95%.
  • Matériel : AMD Radeon AI PRO R9700 (gfx1201), ROCm — --device cuda. ~11 steps/s, ~3h48 par run.

Le pivot (pourquoi Diffusion et pas ACT)

L'étude a démarré sur ACT. En éliminant méthodiquement le budget, le GPU/ROCm et l'éval, ACT plafonnait à ~4% sur PushT — le mauvais outil pour cette tâche. Diffusion Policy atteint 29%+ au même budget (×8). La leçon : ne jamais mesurer une intervention sur un substrat cassé.

Feuille de route

  • Plusieurs seeds + barres d'erreur — transformer le delta en revendication.
  • Combler l'écart 29% → 65% — gradient accumulation pour simuler un batch 64 sans changer de GPU.
  • Isoler le levier — weight-decay vs augmentation, séparément.
  • Embarqué — exporter une politique et tourner en few-shot sur un Jetson.

Trained & evaluated on AMD ROCm — Radeon AI PRO R9700. Built with LeRobot · gym-pusht. MIT License.

About

Sample-efficiency study for Diffusion Policy on PushT, trained on AMD ROCm. Preliminary: regularization improves 100-demo success 8→19%, with no gain at 200 demos.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages