---
language:
- en
license: apache-2.0
library_name: transformers
pipeline_tag: robotics
base_model:
- Qwen/Qwen3-VL-8B-Instruct
- HuggingFaceTB/SmolVLM2-500M-Video-Instruct
datasets:
- brandonbaek/selective-undo-benchmark
tags:
- robotics
- vision-language-action
- selective-undo
- causal-provenance
- flow-matching
- mujoco
- robosuite
- franka-panda
- droid
- habit
---
# UndoVLA: Causal Provenance Grounding for Selective Physical Undo
**Selective physical undo** requires a robot in a shared human–robot workspace to reverse *its own* completed mistake while preserving later human work, abstaining when an action is incomplete or overwritten, and asking permission before disturbing blocking protective barriers.
Standard visuomotor policies and monolithic vision-language models (VLMs) fail systematically on this task because they conflate **final visual state** with **causal action history** (*Markovian blindness*). Across all three VLM families evaluated blindly on our zero-leakage suite, direct prompting achieves **`0/32` (`0.0%`)** paired timing/state accuracy and triggers **`20/20` (`100%`) false early interventions** on incomplete clips.
**UndoVLA** unifies two complementary regimes built on explicit **causal provenance factorization**:
1. **Real World (`astpg/` — Flagship Training-Free `ASTPG` over `Qwen3-VL-8B-Instruct`):** Zero task training, zero camera calibration, and zero HSV thresholds (`126/159 = 79.2%` frozen `v1.0`, `151/195 = 77.4%` combined across all real cohorts, exact McNemar `p = 3.13 × 10^-8` vs. Direct VLM `50.8%`; `28/36 = 77.8%` zero-shot on OOD Franka Panda `DROID-100`).
2. **Simulation (`weights/` — Learned `TPDE + Epistemic Gate + OT-CFM / Keypoint Servo` over `SmolVLM2-500M`):** Closed-loop visuomotor policies that decode ordered causal transitions, hold zero motion while querying humans under ambiguity, and physically execute continuous repairs (`243/243` MuJoCo hybrid checks; `20/20` 7-DoF Franka Panda runs with `0.047 mm` max drift on human-touched objects).
---
## Visual Showcase
| Clarified Spatial Undo (MuJoCo) | 7-DoF Franka Panda Repair (`Robosuite`) | Real-World Barrier Preservation (`HABIT`) |
| :---: | :---: | :---: |
|
|
|
|
| Same final frame, opposite intent: human reply selects *tray-coupled* vs. *world-spot* preservation. | `20/20` seeds delivered with `0.047 mm` max human-carton drift. | Detects robot placement *before* human tape seal → outputs **`ask`**. |
---
## Measured Performance
### 1. Real-World Zero-Calibration Results (`ASTPG` + `Qwen3-VL-8B-Instruct`)
| Benchmark Split | Direct VLM | ASTPG (Ours) | Key Highlight |
| --- | ---: | ---: | --- |
| **`universal_real` `v3`** (`6` HABIT cohorts, `n=63`) | `38/63` (`60.3%`) | **`53/63 (84.1%)`** | `7/8` unseen `novel` pairs (`0` early FP); `0` barrier violations |
| **Virgin `sealed_ood`** (`n=96`: HABIT + OOD `DROID-100`) | `44/96` (`45.8%`) | **`73/96 (76.0%)`** | `18/32` pairs (`0/32` Direct); `p = 2.49 × 10^-5` |
| **↳ OOD Franka Panda `DROID-100`** (`n=36`, zero-shot) | `21/36` (`0/12` pairs) | **`28/36 (77.8%)`** | `7/12` timing pairs; `2/12` early FP vs. `12/12` Direct |
| **Untouched `confirm_v2`** (`12` virgin sessions, `n=36`) | `17/36` (`47.2%`) | **`25/36 (69.4%)`** | `9/12` alternate-target pairs vs. `2/12` Direct; CI `[52.8%, 83.3%]` |
| **Pooled `v1.0` (`n=159`)** | `82/159` (`51.6%`) | **`126/159 (79.2%)`** | 95% CI `[73.0%, 84.9%]`; McNemar **`p = 2.55 × 10^-7`** |
| **All Real Clips Combined (`n=195`)** | `99/195` (`50.8%`) | **`151/195 (77.4%)`** | 95% CI `[71.3%, 83.1%]`; McNemar **`p = 3.13 × 10^-8`** |
| **Suite 6 `shift`** (`48` jaw cycles, 0 cal, 0 HSV) | — | **`8/8 (4B)` · `5/8 (8B)`** | `32/32` (`4B`) & `26/32` (`8B`) placement pairs; `0` false updates |
### 2. Cross-Backbone Blind `sealed_ood` (`n=96`) & `v1.1` Ablation
| VLM Backbone | Direct VLM | ASTPG `v1.0` | ASTPG `v1.1` (Shared Stage-1) | `v1.1` vs. Direct `p` |
| --- | ---: | ---: | ---: | ---: |
| **`Qwen3-VL-8B-Instruct`** | `44/96` (`45.8%`) | `73/96` (`76.0%`) | **`75/96 (78.1%)`** (`0` viol., `2/4` prot) | **`3.12 × 10^-6`** |
| **`Qwen2.5-VL-7B-Instruct`** | `40/96` (`41.7%`) | `50/96` (`52.1%`) | **`54/96 (56.2%)`** (`+4.17 pp`, `0` viol.) | **`1.25 × 10^-2`** |
| **`InternVL3-8B-hf`** | `37/96` (`38.5%`) | **`53/96 (55.2%)`** | `50/96` (`52.1%`, `7/8` Contact FP) | `4.70 × 10^-2` |
### 3. Simulation Provenance & Closed-Loop Robotics (`weights/`)
| Evaluation Tier | Baseline / Pure CFM | UndoVLA (Ours) | Key Highlight |
| --- | ---: | ---: | --- |
| **Marked Challenge** (`27` clips, unseen views) | `1/27` (`3.7%`) | **`27/27 (100.0%)`** | 3-seed: `90.1 ± 2.1%` vs. `3.7 ± 3.7%` |
| **Unmarked Challenge** (`27` clips, no markers) | `0/27` (`0.0%`) | **`24/27 (88.9%)`** | 3-seed: `84.0 ± 5.7%` vs. `3.7 ± 3.7%` |
| **Actor-Withheld Abstention** (`144` clips) | — | **`144/144 (100%)`** | `0` false motion authorizations |
| **Unseen Rotational Families** (`lid`, `turntable`) | `62/96` (`2/36` chal.) | **`75/96` (`19/36` chal.)** | Lid `41/48`, Turntable `34/48` |
| **MuJoCo Tabletop Closed-Loop** (`243` checks) | `207/243` → `240/243` | **`243/243 (100%)`** | `126/126` repairs; `9/9` pre-reply zero motion |
| **7-DoF Franka Panda** (`Robosuite`, `20` seeds) | `16/20` (`0.046 mm`) | **`20/20 (100%)`** | **`0.047 mm`** max (`0.036 mm` median) drift |
---
## Repository Layout
| Path | Contents |
| --- | --- |
| [`astpg/astpg.py`](astpg/astpg.py) | Frozen real-world 4-stage engine (`SHA-256: 0df2a43e02e08abe6fff332a88351eb4353cbcde175ab0029f979ff12dd9dbeb`) |
| [`astpg/astpg_ablation.py`](astpg/astpg_ablation.py) | `v1.1` decoupled Stage-1 schema + occluded-barrier probe ablation |
| [`astpg/run_astpg_demo.py`](astpg/run_astpg_demo.py) | Single-video CLI running `ASTPG` with `Qwen/Qwen3-VL-8B-Instruct` |
| [`astpg/real_eval_summary.json`](astpg/real_eval_summary.json) | Machine-readable real-world metrics across `n=195` clips + Suite 6 `shift` |
| [`weights/undovla_provenance.safetensors`](weights/undovla_provenance.safetensors) | `TPDE` + epistemic gate weights over frozen `SmolVLM2-500M-Video-Instruct` (~42 MB) |
| [`weights/undovla_cfm_expert.safetensors`](weights/undovla_cfm_expert.safetensors) | MuJoCo tabletop DAgger-r2 OT-CFM action expert (~3.9 MB) |
| [`weights/panda_cfm_expert.safetensors`](weights/panda_cfm_expert.safetensors) | 7-DoF Franka Panda OT-CFM + dual-camera keypoint servo checkpoint (~4.8 MB) |
| [`weights/habit_change_verifier.safetensors`](weights/habit_change_verifier.safetensors) | Experimental HABIT temporal verifier weights (~1.0 MB) |
| [`weights/config.json`](weights/config.json) | Model dimensions, epistemic thresholds, and pinned backbone revision |
| [`weights/sim_eval_summary.json`](weights/sim_eval_summary.json) | Simulation metrics, 3-seed logs, and checkpoint SHA-256 digests |
---
## Quickstart
### A. Run Zero-Calibration `ASTPG` on Any Real-World `.mp4`
Requires Python 3.10+, `torch`, `transformers >= 4.57`, `opencv-python`, and a multimodal VLM such as `Qwen/Qwen3-VL-8B-Instruct`:
```bash
huggingface-cli download brandonbaek/UndoVLA --include "astpg/*" --local-dir ./UndoVLA
python UndoVLA/astpg/run_astpg_demo.py \
--video /path/to/episode.mp4 \
--request "Undo the robot placing the item into the container if that placement was completed." \
--repair "Remove the item and return it to the table." \
--ask "Ask the person before opening the sealed container." \
--model Qwen/Qwen3-VL-8B-Instruct
```
### B. Load Simulation Provenance & Control Weights (`weights/`)
```python
from huggingface_hub import snapshot_download
local_dir = snapshot_download("brandonbaek/UndoVLA", allow_patterns=["weights/*"])
print("Downloaded weights to:", f"{local_dir}/weights")
```
With the Selective Undo source checkout:
```python
from undovla.model import UndoVLA
model = UndoVLA.from_pretrained("UndoVLA/weights")
result = model.predict_video("sim/clips/d0e2a87956a1.mp4")
print(result["decision"], result["motor_gate"])
```
---
## Honest Scope & Limitations
- **Physical Hardware Boundary:** Closed-loop continuous motor execution is evaluated in MuJoCo and 7-DoF Franka Panda (`Robosuite`) simulation. Real-world evaluations validate zero-calibration perception, causal attribution, confirmation gating, and unsupervised RANSAC localization on recorded robot video (`HABIT` and `DROID-100`); closed-loop actuation on physical hardware remains future work.
- **Visual Sensitivity:** `v1.1` resolved opaque tape-seal barrier detection (`0` protected violations on `sealed_habit_tv`), whereas translucent container lids and subtle in-place shifts remain challenging for single-tile 8B VLMs.
- **Safety Disclaimer:** Experimental research software and weights; not certified for safety-critical physical robot deployment without external safety interlocks.
---
## Citation & Upstream Attribution
Real-world cohorts incorporate trimmed segments derived from **HABIT** (`configinc/HABIT`, CC BY 4.0) and **DROID** (`lerobot/droid_100`, Apache 2.0). Full split provenance, SHA-256 digests, and per-episode attributions live in [brandonbaek/selective-undo-benchmark](https://huggingface.co/datasets/brandonbaek/selective-undo-benchmark).
```bibtex
@misc{baek2026undovla,
title = {Causal Provenance Grounding for Selective Physical Undo Across Simulation and Zero-Calibration Real Robots},
author = {Brandon Baek},
year = {2026},
doi = {10.5281/zenodo.24767132},
url = {https://doi.org/10.5281/zenodo.24767132}
}
```