🌐 Website | 📄 Paper | 🤗 BiD + LeRobot | 🤖 BiD + Diffusion
Bidirectional Decoding: Improving Action Chunking via Guided Test-Time Sampling
International Conference on Learning Representations (ICLR) 2025
Yuejiang Liu*,
Jubayer Ibn Hamid*,
Annie Xie,
Yoonho Lee,
Maximilian Du,
Chelsea Finn
IRIS Lab, Stanford University
Bidirectional Decoding (BID) samples multiple action chunks at each time step and searches for the optimal action based on two criteria:
- backward coherence, which favors actions close to the decision made in the previous time step
- forward contrast, which favors actions close to near-optimal plans and far from sub-optimal ones
BID improves temporal consistency over multiple time steps, while maintaining high reactivity to stochastic dynamics.
Install dependencies of the diffusion policy (approx. 20 min)
mamba env create -f conda_environment.yaml
mamba activate bid
Install additional dependencies
pip install -r requirement.txt
Download pre-trained checkpoints
gdown https://drive.google.com/drive/folders/1o8rf2Lq91D_DCq7RqZVyFAP-eMcLOAP2 -O . --folder
Download online data (optional, required only for model training)
bash script/download_dataset.sh
The sampler folder contains a collection of test-time sampling/decoding algorithms.
- Vanilla Sampling Baseline
bash script/eval_random.sh
- Warmstart Diffusion Baseline
bash script/eval_warmstart.sh
- Temporal Ensembling Baseline (EMA)
bash script/eval_ema.sh
- Our Bidirectional Decoding (BID)
bash script/eval_bid.sh
- Dynamic object animations
bash script/animate_eval.sh
The separate.ipynb script summarizes representative results from different algorithms on the Pust-T task.
| Deterministic (noise=0.0) | Stochastic (noise=1.0) | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
The animation folder contains sample videos of different algorithms on the Pust-T task with a dynamic block (perturb=1.0).
| Vanilla Open-Loop | Vanilla Closed-Loop | EMA Closed-Loop | BID Closed-Loop |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
The aggregate.ipynb script summarizes the results of different algorithms on seven simulation tasks over three runs.
BID offers increasing performance gains with larger sample sizes and complements other existing methods, e.g., EMA.
If you find this code useful for your research, please consider citing our paper:
@inproceedings{liu2024bid,
title={Bidirectional Decoding: Improving Action Chunking via Guided Test-Time Sampling},
author={Yuejiang Liu and Jubayer Ibn Hamid and Annie Xie and Yoonho Lee and Max Du and Chelsea Finn},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=qZmn2hkuzw}
}Our implementation is built upon the Diffusion Policy codebase






