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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Independent audit of the baseline and recovery regressions
|
| 2 |
+
|
| 3 |
+
This audit reads the local code and evaluation JSON, plus the actual baseline and
|
| 4 |
+
both recovery datasets' action tables/metadata from `Machanize/playful`. It also
|
| 5 |
+
reads the published baseline's config and saved normalization tensors. No model
|
| 6 |
+
was trained, no pod started, and no remote artifact changed.
|
| 7 |
+
|
| 8 |
+
## Conclusion
|
| 9 |
+
|
| 10 |
+
The evidence supports a narrow, orientation-dependent grasp tolerance and an
|
| 11 |
+
inaccurate learned approach. It does not establish that changing the recovery
|
| 12 |
+
teacher alone caused both regressions. The fine-tuning recipe also changes the
|
| 13 |
+
normalization and restarts optimization. Several diagnostic labels overstate
|
| 14 |
+
what was measured. Control these confounds before collecting more recovery data.
|
| 15 |
+
|
| 16 |
+
## 1. The paired regression is real; precision did not improve enough
|
| 17 |
+
|
| 18 |
+
Recomputed from `baseline_dev/eval_results.json` and `v2_dev/eval_results.json`:
|
| 19 |
+
|
| 20 |
+
| Metric, same 60 trials | Baseline | Recovery v2 |
|
| 21 |
+
|---|---:|---:|
|
| 22 |
+
| Full success | 31 | 18 |
|
| 23 |
+
| Both models succeed | 12 | 12 |
|
| 24 |
+
| Unique successes | 19 | 6 |
|
| 25 |
+
| Closing error <= 2 mm | 9 | 9 |
|
| 26 |
+
| Target ever lifted > 8 mm | 44 | 37 |
|
| 27 |
+
| Another piece displaced > 2 mm at end | 11 | 11 |
|
| 28 |
+
| Pawn lift / success, 42 trials | 26 / 20 | 20 / 12 |
|
| 29 |
+
| Knight lift / success, 18 trials | 18 / 11 | 17 / 6 |
|
| 30 |
+
|
| 31 |
+
The two-sided exact paired McNemar test on 19 losses versus 6 gains gives
|
| 32 |
+
p = 0.01463. This is evidence of a regression on this test set, not an estimate
|
| 33 |
+
of performance on arbitrary boards. Repeated checkpoint selection on this set
|
| 34 |
+
would require a separate confirmation set.
|
| 35 |
+
|
| 36 |
+
The drop is not solely failure to initially lift: 17/18 knights lift under v2,
|
| 37 |
+
but only 6 finish. Transport, release and disturbance need their own phase labels.
|
| 38 |
+
The 26/37 toppled-target counts must not be confused with the 11/11 displaced-
|
| 39 |
+
neighbor counts, or interpreted as proof of when each toppling occurred.
|
| 40 |
+
|
| 41 |
+
## 2. Fine-tuning changes the coordinate system as well as the examples
|
| 42 |
+
|
| 43 |
+
`sim/train_policy.sh` loads weights through `--policy.path`; it does not resume
|
| 44 |
+
optimizer state or specify a reduced fine-tuning learning rate. The published
|
| 45 |
+
baseline config has optimizer peak LR 1e-4 and decay LR 2.5e-6. The installed
|
| 46 |
+
LeRobot 0.4.4 scheduler scales its schedule to the requested run length. A new
|
| 47 |
+
4,000-step run with these settings ramps back toward 1e-4, rather than continuing
|
| 48 |
+
the baseline's final low learning rate.
|
| 49 |
+
|
| 50 |
+
More importantly, installed `lerobot/scripts/lerobot_train.py:251-287` passes
|
| 51 |
+
the new dataset's statistics as overrides to both normalizer and unnormalizer.
|
| 52 |
+
`lerobot/processor/normalize_processor.py:171-200` explicitly gives supplied
|
| 53 |
+
statistics precedence over the saved tensors. This occurs when loading a
|
| 54 |
+
pretrained policy, including a fine-tuned baseline.
|
| 55 |
+
|
| 56 |
+
The baseline's published action normalization agrees with its original dataset
|
| 57 |
+
statistics to < 1e-5. Combining the recovery tables with the original changes
|
| 58 |
+
those statistics. To isolate the output-scaling effect, for each original action
|
| 59 |
+
`a` compute:
|
| 60 |
+
|
| 61 |
+
```
|
| 62 |
+
z = (a - baseline_mean) / baseline_std
|
| 63 |
+
a_reinterpreted = z * merged_std + merged_mean
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
This holds the normalized output fixed. It is NOT a forward pass of the policy:
|
| 67 |
+
the changed state normalization would also affect network predictions, and
|
| 68 |
+
training can adapt to the new statistics.
|
| 69 |
+
|
| 70 |
+
| Output-scaling diagnostic | Recovery v1 mixture | Recovery v2 mixture |
|
| 71 |
+
|---|---:|---:|
|
| 72 |
+
| Median abs shoulder-lift target shift, all baseline rows | 2.120 deg | 1.146 deg |
|
| 73 |
+
| Median abs wrist-flex target shift, all baseline rows | 0.540 deg | 1.066 deg |
|
| 74 |
+
| Median XY shift of gripper reference site at closing | 4.877 mm | 1.532 mm |
|
| 75 |
+
| Median 3D shift of gripper reference site at closing | 5.556 mm | 2.773 mm |
|
| 76 |
+
| 95th percentile 3D reference-site shift at closing | 6.748 mm | 3.393 mm |
|
| 77 |
+
|
| 78 |
+
FK used the actual `gripperframe` site in `sim/chess_scene.xml`, evaluated at the
|
| 79 |
+
first recorded command below 3 after a command above 4 in each of the 300 baseline
|
| 80 |
+
episodes. It is a reference point near the fingertips, not a measurement of the
|
| 81 |
+
actual contact surface or policy rollout. All FK results were finite. The merged
|
| 82 |
+
statistics were calculated directly from 89,008 baseline rows plus 36,645 v1 or
|
| 83 |
+
29,044 v2 rows.
|
| 84 |
+
|
| 85 |
+
These are meaningful perturbations relative to the grasp tolerance. This is a
|
| 86 |
+
confirmed property of the current recipe and saved datasets, not proof that it
|
| 87 |
+
caused the historical policy regressions. The v2 checkpoint/config was not saved
|
| 88 |
+
on the Hub, so its exact runtime processors cannot be independently inspected.
|
| 89 |
+
|
| 90 |
+
## 3. The simple teacher is not a single canonical trajectory per move
|
| 91 |
+
|
| 92 |
+
The 300 baseline episode records include these grasp orientations:
|
| 93 |
+
|
| 94 |
+
| Move | Expert jaw yaw counts |
|
| 95 |
+
|---|---|
|
| 96 |
+
| e7-e5 | -45 deg: 11; +45 deg: 12 |
|
| 97 |
+
| g8-f6 | -45 deg: 14; +45 deg: 17 |
|
| 98 |
+
| g1-f3 | -45 deg: 16; +45 deg: 17 |
|
| 99 |
+
| c2-c4 | -135 deg: 15; +135 deg: 14 |
|
| 100 |
+
|
| 101 |
+
Eight of the ten moves have two recorded yaw choices. Home joint jitter remains
|
| 102 |
+
0.06 radians and motion-speed scaling remains 0.8-1.2 in the inherited config.
|
| 103 |
+
These alternatives can be valid demonstrations; they are not inherently wrong.
|
| 104 |
+
However, changing between incompatible orientation choices across predicted
|
| 105 |
+
chunks is a plausible failure mode that should be measured.
|
| 106 |
+
|
| 107 |
+
The existing 20-episode grasp report shows median absolute yaw errors of 30.6 deg
|
| 108 |
+
for toppled cases, 41.6 deg for closed/not-lifted cases, and 81 deg for the two
|
| 109 |
+
lifted/dropped cases. It is not justified to reduce the diagnosis to XY error
|
| 110 |
+
alone. These errors are relative to one expert grasp; a different orientation
|
| 111 |
+
can sometimes be valid, so the measurements do not prove mode switching.
|
| 112 |
+
|
| 113 |
+
The saved model has one observation step and executes 50 actions per prediction:
|
| 114 |
+
1.67 seconds at 30 Hz. In the expert, closing plus holding is about 0.7 seconds
|
| 115 |
+
before speed scaling. The prior 10-step replan result was only 4/15, on a different
|
| 116 |
+
test protocol, so it does not establish that more frequent feedback is useless.
|
| 117 |
+
|
| 118 |
+
## 4. Both recovery paths require more precision than the policy demonstrates
|
| 119 |
+
|
| 120 |
+
`collect_recovery.py:73-106` chooses the lowest collision-free correction height
|
| 121 |
+
for the exact simulated state. Of the 120 v2 records, 74 request zero additional
|
| 122 |
+
rise. Nominal collision-free planning is not robustness to a 4-5 mm position
|
| 123 |
+
error or a large wrist-angle error. Increasing jaw opening moves one jaw; it
|
| 124 |
+
does not remove the fixed jaw's very small clearance (`fixed_gap_mm = 0.8`).
|
| 125 |
+
|
| 126 |
+
The jaw test isolates fixed pose offsets with an expert orientation, descent,
|
| 127 |
+
closure and lift. It does not reproduce the learned policy's simultaneous yaw,
|
| 128 |
+
velocity, height and timing errors. Its tolerance percentages cannot be applied
|
| 129 |
+
directly to a scalar median policy closing error.
|
| 130 |
+
|
| 131 |
+
Also, 23,000 of v2's 29,044 rows occur after the first below-3 close threshold.
|
| 132 |
+
Only 3,598 rows lie in the one second before it. With ordinary uniform frame
|
| 133 |
+
sampling, adding 120 correction episodes is not equivalent to making precise
|
| 134 |
+
pre-contact alignment the main training objective. This does not mean those
|
| 135 |
+
later frames are useless; grasp, lift and placement must all be preserved.
|
| 136 |
+
|
| 137 |
+
## 5. Measurement limitations and a unit error
|
| 138 |
+
|
| 139 |
+
- `eval_policy.py:135-147` invokes the measurement callback AFTER applying and
|
| 140 |
+
stepping the action. The close event at lines 227-235 is a command crossing
|
| 141 |
+
below 3, not the physical onset of closing or first contact.
|
| 142 |
+
- Five of the seven toppled cases in the older 20-episode inspection were already
|
| 143 |
+
tilted >45 deg at that recorded close event. Thus these records do not establish
|
| 144 |
+
whether approach, rotation, or early closing first caused the collision.
|
| 145 |
+
- Closing position is compared to the initial expert grasp point, not a newly
|
| 146 |
+
measured grasp on a potentially displaced piece. Along/across axes use expert
|
| 147 |
+
yaw rather than the actual jaw direction. The yaw diagnostic also wraps modulo
|
| 148 |
+
180 deg, which loses fixed-versus-moving-jaw orientation information.
|
| 149 |
+
- `jaw_tolerance.py` labels `1000 * (grasp.open_q - lo)` as `open_width_mm`.
|
| 150 |
+
This is an angle multiplied by 1000, not a physical width. It does not invalidate
|
| 151 |
+
the success outcomes or the input opening-margin settings, but those reported
|
| 152 |
+
width values must not be used for hardware calibration.
|
| 153 |
+
- The exported feature shapes mention 256x256, but the policy's actual image
|
| 154 |
+
preparation resizes incoming images to 512x512 with padding. The absent third
|
| 155 |
+
camera is skipped with `empty_cameras=0`; neither fact alone is evidence of a
|
| 156 |
+
missing-camera or 256-pixel inference bug.
|
| 157 |
+
- The baseline has both `freeze_vision_encoder=true` and `train_expert_only=true`.
|
| 158 |
+
Disabling only the first flag would still leave the VLM frozen in this version.
|
| 159 |
+
|
| 160 |
+
## Recommended next experiment
|
| 161 |
+
|
| 162 |
+
1. Before training, verify that the candidate fine-tuning pipeline reproduces
|
| 163 |
+
baseline outputs with zero updates: identical weights, observations, RNG,
|
| 164 |
+
action queue, saved normalization and processor settings. Separately evaluate
|
| 165 |
+
the effect of substituting merged normalization with unchanged weights.
|
| 166 |
+
2. Hold the original state/action normalization fixed for a controlled continuation.
|
| 167 |
+
Make optimizer/schedule restart and LR explicit. Compare original-data-only
|
| 168 |
+
versus original-plus-corrections with the SAME initial checkpoint, LR schedule,
|
| 169 |
+
update budget and evaluation seeds. A baseline-only control under the current
|
| 170 |
+
recipe tests optimization but does not isolate the merged-normalization effect.
|
| 171 |
+
3. Instrument the rollout before any new recovery-data design: actual jaw pose,
|
| 172 |
+
orientation, physical opening, target-relative error, first unintended contact,
|
| 173 |
+
first tilt, and action-chunk boundaries. Separate successful lift, retention,
|
| 174 |
+
transport and release.
|
| 175 |
+
4. If the preserved-normalization correction run still fails, test a canonical
|
| 176 |
+
grasp orientation per move and an approach clearance tolerant of measured pose
|
| 177 |
+
errors. Change these independently and validate the expert before regeneration.
|
| 178 |
+
5. Keep the baseline. Do not start a 1,000-episode regeneration or vision-unfreezing
|
| 179 |
+
run merely because the previous corrections failed. Choose the next change
|
| 180 |
+
from these diagnostic results.
|
| 181 |
+
|
| 182 |
+
## Limits
|
| 183 |
+
|
| 184 |
+
No GPU inference or new policy rollout was run in this audit. The actual v2 model
|
| 185 |
+
and its optimizer/processor state were unavailable after pod deletion. Current
|
| 186 |
+
local LeRobot source and saved artifacts support the findings, but reconstructing
|
| 187 |
+
the precise historical training environment would require its code revision and
|
| 188 |
+
full configuration. Private source tables and small model metadata were cached
|
| 189 |
+
under `/private/tmp/chess-regression-audit`; no weight file was downloaded.
|