Goal-only normalisation retrains, Table 5 filter rows, rule check, verdict; trace page
54233af verified |
Download README.md from herooooooooo/repro-generative-control-as-optimization: direct link, hf CLI and curl.
- Browser
- Download file 17.1 kB
-
https://huggingface.co/spaces/herooooooooo/repro-generative-control-as-optimization/resolve/main/README.md
- Command line
-
hf download hf://spaces/herooooooooo/repro-generative-control-as-optimization/README.md
-
curl -L -o README.md https://huggingface.co/spaces/herooooooooo/repro-generative-control-as-optimization/resolve/main/README.md
17.1 kB
| title: "Reproduction: GeCO OOD detection on a VLA" | |
| emoji: π€ | |
| colorFrom: blue | |
| colorTo: gray | |
| sdk: static | |
| app_file: index.html | |
| pinned: false | |
| license: apache-2.0 | |
| short_description: GeCO OOD claim (arXiv 2603.17834) tested on SmolVLA | |
| # Reproduction: Generative Control as Optimization (GeCO), Table 5 | |
| **Paper:** Zhang, Huang, Liu, Zhu, Mou, Zhao. *Generative Control as Optimization: Time Unconditional Flow Matching | |
| for Adaptive and Robust Robotic Control.* arXiv [2603.17834](https://arxiv.org/abs/2603.17834), 2026. The authors' | |
| code is not released ("Code soon" on the [project page](https://hrh6666.github.io/GeCO/); the GitHub repository | |
| holds only the webpage), so this is a reimplementation from the paper's text. | |
| **Claim tested (Table 5):** a policy trained on LIBERO-Goal with GeCO's time-unconditional flow matching flags | |
| LIBERO-Spatial planning calls as out-of-distribution from the final field norm alone: **AUROC 0.93**, against **0.53** | |
| for a flow-matching-loss baseline (Diff-DAgger style). The paper pairs this OOD claim with "seamless scaling to | |
| pi0-series VLA models" as a "plug-and-play replacement for standard flow-matching heads", but its OOD experiment uses | |
| a non-VLA policy (a DiT-style transformer on frozen DINOv2 + T5 features). We test the claim on a VLA, SmolVLA, with | |
| the paper's own VLA recipe (fixed time input t = 0). | |
| ## Verdict: verified on a VLA at the paper's absolute level; the paper's margin does not carry over | |
| **Over two independently trained seeds, GeCO's final residual beats the flow-matching-loss baseline as an OOD | |
| detector on SmolVLA by +0.064 AUROC [+0.033, +0.095]** (paired over the same starting scenes), and at the same 90% ID | |
| retention it flags 21 points more OOD planning calls [+9, +32]. This holds once SmolVLA's padded action dimensions | |
| are handled and with the paper's VLA step sizes (App. E). The paper's own model is not released, so its exact 0.93 | |
| vs 0.53 was not tested. On a VLA the baseline is much stronger (its pretrained vision-language backbone already | |
| reacts to unseen scenes and instructions), so the margin is about 0.06 rather than 0.40, and the paper's online | |
| filters and adaptive early stopping do not carry over (the stopping threshold never fires on our scale). | |
| **Against the task's falsification rule.** The task that set this reproduction counts the claim as falsified if the | |
| final residual gives AUROC below about 0.8, *or* if the flow-matching-loss baseline comes within about 0.1 AUROC of | |
| GeCO. The first condition is not met (0.832 and 0.849). The second is: the GeCO-minus-baseline gap is +0.066 [+0.028, | |
| +0.098] over the two seeds (and +0.063 [+0.033, +0.095] with Goal-only statistics), entirely below 0.1. Read | |
| literally, the rule is met on the margin, and we report that. We judge the rule does not apply cleanly here: it | |
| compares GeCO with the baseline *on the paper's model*, and we changed the model. On SmolVLA GeCO reaches the paper's | |
| absolute level (0.917 against 0.93 with Goal-only statistics), while the baseline is far stronger than the paper's | |
| (0.85 against 0.53), so the gap is small because the baseline is good, not because GeCO is weak. That the strong | |
| baseline comes from SmolVLA's pretrained backbone is our reading; we did not train the paper's model to test it. With Table 5's filters (below) the gap is | |
| +0.106 [+0.071, +0.135], straddling the line. | |
| **Table 5's filter rows.** The paper's AUROC (0.93 in both GeCO rows) is computed on the raw final residual of each | |
| planning call (App. D); the moving-average and leaky-bucket filters run over the residuals of the refinement steps | |
| *inside* a call and set the operating point and Time Saved. Their absolute thresholds stop every episode on SmolVLA's | |
| scale, so we keep their shape and calibrate their scale with the paper's own rule (about 90% of ID calls kept). | |
| Calibrated, GeCO's filters flag 75-93% of OOD calls (paper: 82-84%), but at that operating point about a third of ID | |
| episodes would also be stopped, which the paper does not report. Full table, both seeds, with intervals: | |
| `results/geco_filters.json`, made by `code/experiments/lerobot/geco_filters.py`. | |
| | Calibrated filter rows, both seeds (ID kept β 90%) | per-call AUROC | OOD flagged | ID episodes also stopped | | |
| |---|---|---|---| | |
| | Paper: GeCO, moving average / leaky bucket | 0.93 (raw score) | 82.4% / 84.0% | not reported | | |
| | Paper: baseline, moving average | 0.53 | 14.4% (at 27.8% ID kept) | not reported | | |
| | Ours: GeCO, moving average (seed 1000 / 2000) | 0.952 / 0.961 | 88.6% / 93.3% | 36% / 32% | | |
| | Ours: GeCO, leaky bucket (seed 1000 / 2000) | 0.933 / 0.948 | 74.7% / 85.4% | 33% / 33% | | |
| | Ours: baseline, moving average over calls (our reading; seed 1000 / 2000) | 0.847 / 0.823 | 39.7% / 37.8% | 30% / 33% | | |
| The paper does not define "Baseline (Moving Avg)": its baseline has one number per call, so we average over the last | |
| five calls. Applying the same cross-call average to GeCO's raw score leaves the gap about where it was (+0.054 | |
| AUROC), so the large filtered gap comes from GeCO having a sequence of residuals inside each call, not from the | |
| averaging. Time Saved is computed (`geco_filters.json`) but not compared: at a per-call threshold, OOD episodes stop | |
| within their first few calls, which is not the regime of the paper's 42-44%. | |
| | Closed loop, LIBERO-Goal (ID) vs LIBERO-Spatial (OOD), K_max = 10 | AUROC [95% CI] | equal-weight AUROC | OOD flagged at 90% ID kept | Goal success | | |
| |---|---|---|---|---| | |
| | Paper: GeCO | 0.93 | β | 82.4-84.0% | β | | |
| | Paper: baseline (FM loss, t = 1) | 0.53 | β | 14.4% (at 27.8% ID kept) | β | | |
| | **Ours, seed 1000: GeCO (G2: padded dims at 0, App. E step sizes)** | **0.832 [0.790, 0.867]** | 0.857 | **44.0%** | 82% | | |
| | **Ours, seed 1000: baseline (G0: FM loss, t = 1)** | **0.787 [0.754, 0.822]** | 0.813 | 27.3% | 84% | | |
| | **Seed 2000 (independent re-run): GeCO G2** | **0.849 [0.810, 0.885]** | 0.869 | **50.8%** | 80% | | |
| | **Seed 2000 (independent re-run): baseline G0** | **0.761 [0.726, 0.798]** | 0.791 | 24.5% | 83% | | |
| | G2 β G0, paired: seed 1000 / seed 2000 / mean of both | +0.045 [β0.003, +0.086] / +0.088 [+0.041, +0.131] / **+0.064 [+0.033, +0.095]** | | +17 / +26 / **+21** pts | | | |
| | Ours: GeCO, G1 (padding leaks), App. E step sizes | 0.798 [0.765, 0.841] | 0.832 | 26.2% | 59% | | |
| | Ours: GeCO, G2, App. A.3 step sizes | 0.440 [0.402, 0.490] | 0.466 | 5.5% | 79% | | |
| | Ours: GeCO, G1, App. A.3 step sizes (first run) | 0.455 [0.390, 0.525] | 0.505 | 0.0% | 73% | | |
| | Ours: GeCO, G1, App. A.3, K_max 30 / 100 | 0.657 / 0.752 | 0.715 / 0.757 | 2.9% / 14.3% | 74% / 55% | | |
| The seed-2000 runs were trained and evaluated by a second agent (Lor) on its own GPUs from the published code only, | |
| which also confirms the code reproduces. The paired interval resamples the same episode indices for both models; the | |
| mean-of-seeds interval covers episode noise given these four trained models, not between-seed variation (the gap | |
| moved from 0.045 to 0.088 between seeds). Four GeCO configurations were compared before choosing G2 with App. E | |
| step sizes as the headline; seed 2000 re-tests that configuration after the choice. Scripts and outputs: | |
| `review/` (paired and pooled bootstraps, the full review). | |
| AUROC: 20 planning calls sampled per episode as in the paper (all calls when fewer), 95% interval from a bootstrap | |
| over episodes (2,000 resamples, the subsample redrawn each time); equal-weight AUROC gives every episode the same | |
| weight. 100 ID and 100 OOD episodes per row. Neither policy solves any Spatial episode (expected: unseen layouts and | |
| instructions). The paper's absolute filter thresholds (App. D) flag every episode in every run: our residuals live on | |
| a different scale (50 x 7 chunk); the calibrated filter rows are above. | |
| **What 100 episodes per suite can and cannot establish.** The paper scores 500 + 500 episodes; we score 100 + 100. | |
| Calls inside an episode are correlated, so the episode count sets the precision: our per-run AUROC intervals are | |
| about Β±0.04, the paper's design would give about Β±0.02. Settled at our scale: the direction of the GeCO-minus-baseline | |
| gap (two seeds, pooled interval clear of zero) and the failure of App. A.3's step sizes. Not settled: the gap's size to | |
| better than about Β±0.03, which matters because the falsification rule sits at 0.1, and its variation between training | |
| runs, which two seeds cannot estimate. | |
| **Compute.** No compute estimate was written down before the first run (a gap in the record; the plan was sized by | |
| the Modal credit budget). Spent, from the logs: about 50 min per model to train (one L40S), about 1.5 h per model to | |
| evaluate 100 + 100 episodes at K_max = 10 (one L4), about 20 min per offline sweep; on the order of 15 GPU-hours for | |
| G0, G1 and G2 with all evaluations. The independent seed-2000 run cost $66.91 on two H100s. The paper's 500 + 500 | |
| episodes would add about 6 GPU-hours of evaluation per model. | |
| **Normalisation statistics.** A later leakage audit found that LeRobot normalised state and action with statistics of | |
| the whole LIBERO dataset (LIBERO-Spatial, the OOD suite, included) even though the models train on LIBERO-Goal only. | |
| Both arms share the same normaliser, so the paired comparison is like for like, but the OOD suite was not entirely | |
| unseen by the pipeline. G0n and G2n retrain G0 and G2 (seed 1000) with Goal-only statistics (`train_variant.py | |
| --train-stats`). Both detectors improve: the baseline from 0.787 to 0.854 [0.822, 0.882], GeCO from 0.832 to **0.917 | |
| [0.894, 0.934]** (the paper: 0.93), with GeCO's Goal success up from 82% to 97%. The paired gap stays at **+0.063 | |
| [+0.033, +0.095]**, about where it was. So the leak does not explain the result, and removing it brings GeCO to the | |
| paper's absolute level but not to the paper's margin: the baseline rises with it. One seed. Results: | |
| `results/G0n_20261204T041622Z`, `results/G2n_20261204T002253Z`; filter rows in `results/geco_filters.json`. | |
| ## How we got there: an independent review, two problems, a second seed | |
| Our first run reported AUROC 0.455 and the verdict "falsified". An independent review of this Space by another agent | |
| (Lor), run in its own environment, re-derived every number and pointed at two causes. We checked both, and a | |
| second review then ran the paired test and the second seed above: | |
| 1. **Step sizes (the main one).** The paper never states the step sizes for Table 5. We had used App. A.3's general | |
| schedule (0.1, then 0.05, then 0.02); App. E's VLA schedule starts at 0.25 and decays to 0.02. With A.3's small | |
| steps the optimisation is nowhere near converged after 10 steps, and the residual mostly measures the random | |
| starting noise (AUROC β 0.45 in both G1 and G2). With App. E's it converges and the score works (0.80-0.83). | |
| 2. **SmolVLA's padded action dimensions.** SmolVLA pads actions from 7 to 32 dimensions and trains only the first 7. | |
| In G1 the 25 padded dimensions of the noisy input carried (1-Ξ³)Ξ΅, a clean read-out of the noise level for a model | |
| that is meant to infer it, and inference moved them with untrained outputs. G2 holds them at 0 in training and at | |
| every step: the residual after 10 steps drops from β 16.5 to β 2.8 on ID frames, the field at the expert chunk | |
| separates the suites (AUROC 0.96 vs 0.82), and task success recovers (59% β 82%). | |
| **Checking the step-size choice without peeking.** We evaluated App. E's schedule because it is the paper's only VLA | |
| setting; the closed-loop runs with it were launched before any sweep. Afterwards, to check that choice, we swept 16 | |
| schedules on G2 offline (`results/G2_*/geco_diagnose_schede_sweep.json`) and ranked them by how close the optimised | |
| chunk ends to the expert's on **in-distribution frames only**. App. E's schedule came first, but only narrowly | |
| (distance 10.02; next 10.05, a 0.3% difference), so the sweep confirms the choice rather than making it. Any schedule whose early steps are about 0.1 or larger scores 0.87-0.94 offline; App. A.3's is | |
| the outlier (0.49). Choosing by the OOD column would have inflated the result. | |
| ## What is different from the paper (scale and setup) | |
| | | Paper | Ours | | |
| |---|---|---| | |
| | Model | DiT-style 1D transformer policy (12 layers, width 384) on frozen DINOv2-base + T5-base features; not a VLA | SmolVLA (450M; SmolVLM2 frozen, 100M flow-matching action expert trained), from `lerobot/smolvla_base` | | |
| | Training | not stated for this policy (LIBERO policies: 30k steps) | **10k steps**, batch 16 (β 3 epochs of LIBERO-Goal), one seed per model | | |
| | Action chunk | 16 (8 executed) | 50 (10 executed) | | |
| | Episodes per suite | 500 | **100** (10 per task) | | |
| | Step sizes Ξ·_k | **not stated for Table 5**. App. A.3 (general sampler): 0.1 / 0.05 / 0.02 / 0.01, K_max 30, Ο 0.4. App. E (real-robot VLA): 0.25 decaying to 0.02 (law not given), K_max 10, Ο 1.5 | App. E with a geometric decay over 10 steps (the paper's VLA setting; ranked first, narrowly, by a later ID-only sweep); A.3 also reported | | |
| | K_max for OOD | 10 (Sec. 4.3) | 10; 30 and 100 as diagnostics | | |
| | Ξ±β (onset of the target decay) | **conflicting**: App. A.4 says 0.1; Sec. 4.4 / Table 6 call Ξ± = 0.8 best | 0.1 (App. A.4) | | |
| | Padded action dims | none | SmolVLA pads 7 β 32; G2 holds the padded dims at 0 (train and inference) | | |
| | Online filters | moving average / leaky bucket over the residuals of the refinement steps inside one planning call (App. D), absolute thresholds (0.6; 0.5, 0, 0.7) | implemented as in App. D; the absolute thresholds stop every episode on our scale, so each filter's scale is calibrated to keep β 90% of ID calls (the paper's operating-point rule) | | |
| | Baseline (Moving Avg) | not defined | causal average over the last 5 planning calls (ours) | | |
| | Normalisation statistics | not stated | dataset-wide (LeRobot default, includes the OOD suite) in G0-G2; Goal-only in G0n, G2n | | |
| ## Contents | |
| | Path | What | | |
| |---|---| | |
| | `index.html` | the full report: method from first principles, results, the review and both fixes, figures (AUROC forest plot, ROC curves, score distributions, step-by-step residuals, step-size sweep, per-task success) and a rollout gallery with videos | | |
| | `trace.html` | the agent session (filtered to the GeCO work, scrubbed), as a readable page with filters and search | | |
| | `episodes.html` | **every rollout** of the final GeCO policy (100 ID + 100 OOD): video, task, outcome, and GeCO's score at every planning call, with filters | | |
| | `media/` | the rollout videos behind `episodes.html` | | |
| | `learn/` | **explainer pages from the companion book**, rendered from the same sources: `flow-matching.html` (flow matching from first principles: what GeCO changes), `chunk-policy.html` (train and sample a flow-matching chunk policy on a CPU), `tiny-vla.html` (assemble a tiny vision-language-action model and flip each input), `run-reports.html` (every training run behind the verdict: loss curves, success with intervals, per-task bars, rule-picked rollouts with videos) | | |
| | `code/run_geco.sh` | **one script, start to finish**: data β train G0, G1, G2 β closed-loop evals (A.3 and App. E) β step-size sweep β report | | |
| | `code/experiments/lerobot/` | the implementation: `variants.py` (`patch_geco` with `zero_pad`, `geco_step_sizes`, `patch_fm_score`), `run.py` (runs G0, G1, G2), `train_variant.py`, `eval_variant.py`, `geco_diagnose.py` (offline diagnosis and sweep), `geco_report.py`, `modal/app.py` | | |
| | `code/src/behavior_course/metrics/geco.py` | AUROC (plain and equal-weight), operating point, bootstrap, App. D filters, Time Saved, the calibrated filters | | |
| | `code/experiments/lerobot/geco_filters.py` | Table 5's three rows (and the raw scores) on both seeds, with paired bootstrap intervals β `results/geco_filters.json` | | |
| | `code/experiments/lerobot/modal/requirements.txt` | **environment**: exact package versions (lerobot 0.7.0, torch 2.11.0+cu128, Python 3.12); the Modal image is defined in `modal/app.py` | | |
| | `review/` | the independent review: `REVIEW.md`, `SEED2000.md`, `paired_bootstrap.py`, `pooled_seeds.py` and their JSON outputs, logs of the seed-2000 runs | | |
| | `results/` | per run and setting (G0, G1, G2 at seed 1000; G0, G2 at seed 2000): `eval_info.json` (success), `ood_scores.json` (one score per planning call; G2 also every step), `run.json` (exact commands), `geco_diagnose*.json`, `geco_report.json` | | |
| | `logs/` | full output of every run, including failures: a missing LIBERO config crashed the first evaluations; a dropped client connection stopped two Modal runs, which were resumed from checkpoints; smoke runs in `logs/smoke/` | | |
| Hardware: Modal, L40S for training (β 50 min per model), L4 for evaluation and diagnosis. Personal data (email, | |
| local paths, workspace names) was removed from logs with `scrub.py`. | |
| ## Agent | |
| Built with **Claude Code** (Anthropic), with the human directing scope and decisions, and an independent review by a | |
| second agent (Lor). The agent session is in the Hub dataset | |
| [herooooooooo/repro-generative-control-as-optimization-trace](https://huggingface.co/datasets/herooooooooo/repro-generative-control-as-optimization-trace) | |
| (scrubbed of personal data), and readable as a page in `trace.html`. | |