Haodong Yang1,*
Runhan Huang1,*,†
Bowen Zhang1,2,*
Iofai Lei1,*
Zunzhe Zhang1
Xiangcheng Zhang1
Shaoting Zhu1,2
Linzhan Mou3
Yicheng Liu1,2
Hang Zhao1,2,‡
1Tsinghua University 2Galaxea AI 3Princeton University
*Equal contribution, random order †Project lead ‡Corresponding author
Equilibrium Energy Control (EqC) equips generative robot policies with an explicit conditional energy landscape. Actions are generated by gradient-based refinement on this landscape, and the geometry of the refinement path tells whether the policy is still within its competence. When it is not, the robot asks for expert takeover and learns from the recovery data (Energy-Gated DAgger).
This repository is the official implementation of EqC.
- EqC with Diffusion Transformer (DiT) policy on LIBERO
- EqC with flow-matching VLA policies
- OOD / failure detection with energy consistency
- Real-world deployment with Galaxea G0.5
- Real-world deployment with π0.5
The code is tested with Python 3.10 and CUDA-enabled PyTorch.
conda create -n eqc python=3.10 && conda activate eqc
pip install -r requirements.txt
# CleanDiffuser (lightning branch)
git clone -b lightning https://github.com/CleanDiffuserTeam/CleanDiffuser.git
pip install -e CleanDiffuserThen install LIBERO following the CleanDiffuser documentation. The pretrained T5 and DINOv2 encoders are downloaded from Hugging Face on the first run.
Convert the LIBERO datasets to the CleanDiffuser .zarr format and place them under a single directory:
DATASET_ROOT/
├── libero_goal.zarr
├── libero_spatial.zarr
├── libero_object.zarr
└── libero_10.zarr
Supported task suites: libero_goal, libero_spatial, libero_object, and libero_10.
bash scripts/train_libero.sh DATASET_ROOT RUNS_DIR TASK_SUITE GPU_IDS [HYDRA_OVERRIDES...]
# example
bash scripts/train_libero.sh /path/to/libero_zarr ./runs libero_goal 0 training.steps=40000The script is a thin wrapper around the Hydra entry point; the equivalent direct call is
python eqc.py mode=training task_suite=libero_goal \
paths.dataset_root=/path/to/libero_zarr paths.save_root=./runsCommon overrides:
| Override | Description |
|---|---|
training.steps=40000 |
Number of training steps |
training.dataloader.batch_size=128 |
Global batch size (default 256) |
training.resume_ckpt=/path/to/ckpt |
Resume from a checkpoint |
seed=1 |
Random seed |
devices='[0,1]' |
Multi-GPU training (also set GPU_IDS=0,1) |
wandb.enabled=true wandb.mode=online |
Log to Weights & Biases (disabled by default) |
bash scripts/eval_libero.sh DATASET_ROOT CHECKPOINT TASK_SUITE GPU_IDS [HYDRA_OVERRIDES...]
# example
bash scripts/eval_libero.sh /path/to/libero_zarr ./runs/libero_goal/checkpoints/step=40000.ckpt libero_goal 0The script reports the success of each trial, per-task success counts, and the overall success rate. For a quick sanity check, evaluate a single task and initial state:
bash scripts/eval_libero.sh /path/to/libero_zarr /path/to/step=40000.ckpt libero_goal 0 \
'inference.task_ids=[0]' inference.max_init_states=1At inference, EqC starts from noise and refines the whole action chunk by gradient ascent on the learned energy,
x ← x + η_k ∇_x E(x | o). The relevant settings in conf/config.yaml are:
sampler_config:gd, energy-gradient refinement;scheduler_config:custom, a fixed 32-step step-size scheduleη_k(decaying from 0.039 to 0.010);stopper_config:null, always uses the full refinement budget.
eqc.py Hydra entry point
conf/config.yaml Training and inference configuration
eqc/model.py Energy model, EqC objective, and action refinement
eqc/pipeline.py LIBERO data loading, training, and evaluation
policy/eqc/ Transport and interpolation utilities
policy/eqc_samplers/ Energy-gradient refinement sampler
policy/eqc_step_schedulers/ Step-size schedule
policy/eqc_stoppers/ Stopping criterion
scripts/ Training and evaluation wrappers
BibTeX coming soon.
This project is released under the MIT License.
For questions about the paper or code, please open an issue or contact Runhan Huang ([email protected]).
This implementation builds on CleanDiffuser and LIBERO.
