DiffusionControl / docs /icml_r3_x30.md
matCercola18's picture
X30 write-up (items 1, 3; item 2 pending) and SISO notes
34907c6 verified
|
Raw History Blame Contribute Delete
15.4 kB
---
title: C+phi next to C-only on the three deck results that were C-only (X30). In SISO [34] and full-state [53] C+phi certifies no more plants than C-only; it is cheaper on SISO; the per-plant SDP stays convex with fixed knots. Actuator [50]-[52] pending.
date: 2026-11-20
status: items 1 (SISO [34]) and 3 (full-state [53]) complete; item 2 (actuator [50]-[52], X29 step 3B) running, results expected overnight
claim: X30 (Matteo, relayed by dc_presentation on 2026-11-20, "Do the experiments"; to the move-HPC session, "You can take a GPU node if you want or CPU whatever you need"). No main-talk result in the advisor deck should stay C-only. Each setup stays identical to the existing C-only run, with only C+phi added.
maps_to: deck slide 17 (former [34]), [53], [50] to [52]. No paper edit until Matteo agrees the claim.
scripts: nonlinear/experiments/x28_eval.py (SISO sampling and scoring), nonlinear/experiments/x30_siso.py (SISO report), nonlinear/experiments/x30_siso_notes.py (SISO self-check and clip note), nonlinear/mimo_unstable/x30_fs.py (full state), nonlinear/mimo_unstable/x30_act.py (actuator)
artifacts: results/icml_r3/X30/{PREREG.md, PREREG_fs.md}; results/icml_r3/X30/siso/{report.txt, numbers.json, notes.txt, notes.json, eval_test/, eval_test_report.txt}; results/icml_r3/X30/fs/{report.txt, numbers.json, sdp.json, cand_*.npz, ds_info.json}; results/icml_r3/X30/act/selfcheck_identity_m{3,4,5}.json. Git 519a02e (SISO final), 663a462 (full state); HF 5f24446 (SISO), 8b6e813 (full state)
---
# C+phi next to C-only on the three deck results that were C-only (X30)
## TL;DR
- **Question:** when the model also generates the spline phi (C+phi), do the three deck results that were C-only change?
- **Answer:** not in certification.
- SISO [34]: at 16 candidates C+phi certifies 96.5% (poles) and 73.9% (coefficients), against 96.6% and 74.7% for C-only.
- Full state [53]: C+phi certifies fewer plants, 82.8% against 96.1% at 1 candidate (iid).
- C+phi is cheaper in SISO: 8.84% against 10.28% above J* on poles, and 26.50% against 32.04% on coefficients.
- With the knots fixed, the per-plant SDP stays convex and certifies 180 of 180 test plants in 15.4 ms (iid median).
- **So what:** the [34] message (poles certify about 22 points more than coefficients) holds for both variants at sampler clip 1. It depends on the clip, though: at its validation-chosen clip, the C+phi coefficient model certifies 95.0%, as poles do. Item 2 (actuator) is pending.
## 1. Problem / Goal
Three results in the advisor deck were shown for C-only only:
- [34], SISO closed-loop poles against controller coefficients;
- [50] to [52], the actuator setting against the 48-start solver;
- [53], the full-state 2x2 family.
Matteo asked for C+phi on each, with the setup otherwise unchanged.
**Falsification.** Under a sector certificate, a certified pair (K, psi) implies a certified linear gain inside the same sector (`PREREG.md` section 2, structural note). At the per-plant optimum, C+phi therefore cannot certify a plant that C-only cannot.
- A generated C+phi can still certify fewer plants, because any knot spread widens the composed sector.
- So the testable outcomes per slide are: does C+phi match C-only's certified share, and does it change the cost?
- For [34], the extra question is whether the poles-over-coefficients gap holds for C+phi too.
## 2. Method
*Common terms.*
- **C-only:** the model generates the linear part. phi is fixed: sat_1 in SISO, the identity in MIMO.
- **C+phi:** the model generates the linear part and the 10 nonzero knots of a piecewise-linear phi (SISO), or the so3 knots of psi (MIMO: odd, knots at |x| = 1, 3, 5).
- **Candidates, b:** the first b of the generated samples per plant.
- **Certified %:** the share of plants with at least one certified candidate among the first b.
- **Regret:** (J - J*) / J* for the cheapest certified candidate, as the median over plants. Uncertified plants count as 1e3 (X29's convention) unless the row says "median over certified plants" (X27 and T9).
### 2.1 Item 1: SISO coordinates (deck [34])
- **Plants:** the 199 X21 test plants (open-loop unstable, seed 8282).
- Loop: u = -phi(clip(F y, -5, 5)) with a generated dynamic filter F.
- **Certificate:** X21's regional circle criterion. A candidate is certified at s if its radius r* is at least s (`siso_x20_unstable.rstar`, line 201).
- **The F check:** all poles of F have real part below -0.01 (`siso_x20_unstable.f_ok`, line 351).
- **Arms:** 16 candidates, guidance 1, sampler clip 1, sampling seed 4242, all scored by `x28_eval`.
| variant | coordinates | models (seeds 0, 1, 2) | t-repair, primary block |
|---|---|---|---|
| C-only | poles | X21 clL | yes |
| C-only | coefficients | X21 base (`x21_fgen`) | no |
| C+phi | poles | X28 clS | yes |
| C+phi | coefficients | X28 coefS (seeds 1, 2 trained for X30 with seed 0's recipe) | no |
- **t-repair** (`x28_eval.py:86`): a candidate that fails the F check is moved along the null vector of the loop, linearized at gain k = phi'(0). The passing point closest to the original is kept. Candidates that pass the F check are unchanged.
- **Blocks:**
- primary: the [34] setup, with t-repair on the poles arms only;
- secondary: t-repair on every arm (both coefficient arms re-run with it).
- **Cost reference:**
- J* = min(J_Fonly, X28 test joint labels), as on the SISO baselines slides (X29);
- also J_Fonly, the reference of the original [34] bars.
- **Paired differences:** plant-paired, seed j against seed j, bootstrap 95% CIs. They are descriptive, with no decision rule.
- **Self-check, pre-registered:** `x28_eval` on X21 clL seed 0 must reproduce the stored X21 output. It failed: the sampled F differ, and 794 of 3,184 candidates differ in certification (`siso/notes.txt`). As pre-registered, every C-only arm was therefore re-run through `x28_eval`, and the stored X21 numbers are shown next to the re-runs.
- **How to run** (one model at a time, 4 workers, on move-hpc-07-gpu):
```bash
X28_EVAL_OUT=results/icml_r3/X30/siso X21_CLIP=1 X28_K=16 X21_TREPAIR=1 PYTHONPATH=. python -m nonlinear.experiments.x28_eval models/x21_fgen_clL/best.pth test
PYTHONPATH=. python -m nonlinear.experiments.x30_siso # report.txt, numbers.json
PYTHONPATH=. python -m nonlinear.experiments.x30_siso_notes # notes.txt: self-check, clip comparison
```
### 2.2 Item 3: full-state feedback (deck [53]; `PREREG_fs.md`, run by a fork session)
- **Family** (T9): n = 4 states, m = 2 inputs, u = -Phi(psi(K x)), Phi_i in [0.4, 2.2].
- **Plants:** a 6,000-plant bank, 120 iid test plants and 60 out-of-distribution (ood) plants.
- **Certificate:** the circle LMI on the composed sector [0.4 alpha_i, 2.2 beta_i], where alpha_i and beta_i are the min and max knot ratio of psi_i. At identity knots it agrees with `family.verify` on 200 of 200 gains.
- **Labels:** Adam from each bank plant's SDP gain, with so3 starts at c = 1, 2, 5 and 100 steps. The label is the cheapest certified snapshot.
- **Arms:**
- generator: T9 recipe, diffusion, 3 seeds;
- regression twin: 3 seeds;
- lookup: the 16 nearest bank labels.
- The C-only arms are T9's stored candidates, re-scored.
- **Fixed-knot SDP:** with psi's knots fixed at each test plant's so3 label, the synthesis stays a convex program. It combines a circle LMI at the composed design sector with an S-procedure guaranteed-cost LMI (`PREREG_fs.md` section 6).
### 2.3 Item 2: actuator setting (deck [50] to [52]; X29 step 3B; `PREREG.md` section 2)
- **Setting** (X27): output feedback u = -Phi(psi(K y)) with m = 3, 4, 5 inputs, Phi_i in [0.4, 2.2], psi in the so3 class.
- **Certificate:** the circle LMI on the composed sector [0.4 alpha_i, 2.2 beta_i].
- **Labels:** every certified row of X27's training banks: 18,733 / 18,451 / 33,961 rows at m = 3 / 4 / 5.
- Per row: Adam with so3 starts at c = 1, 2, 5, 100 steps; the label is the cheapest certified snapshot.
- **Generators:** X27's recipe (diffusion, 96k steps x batch 64), seeds 0, 1, 2 per m.
- **Pipeline:** X27's filter on the composed sector, in four stages:
- raw b = 1 / 4 / 16;
- filt: a 7-gain Hurwitz filter, then the LMI;
- rep b = 16: flatten log r toward log r(1);
- ref n = 3 / 10: `x7_solver.refine` with the knots fixed.
- **KPIs:** certified %, regret against X29's J*_A, CPU per plant, X27's YES rule, and the X28 S4 paired rule.
- **Self-check:** at identity knots the new pipeline reproduces X27's published certified shares in 54 of 54 cells (`act/selfcheck_identity_m{3,4,5}.json`).
## 3. Results
**C+phi matches C-only's certified share in SISO and certifies fewer full-state plants. Its only gain is cost, in SISO.**
### 3.1 Item 1: SISO coordinates
Per arm, 3-seed mean [range] (`siso/report.txt`):
| variant | coordinates | t-repair | certified, b = 1 | certified, b = 16 | regret vs J*, b = 16 | regret vs J_Fonly, b = 16 |
|---|---|---|---|---|---|---|
| C-only | poles | yes | 68.7% [67.8, 69.8] | 96.6% [96.0, 97.0] | 10.28% [9.63, 10.80] | 3.27% [3.10, 3.60] |
| C-only | coefficients | no | 50.4% [49.7, 51.3] | 74.7% [73.9, 75.4] | 32.04% [31.64, 32.30] | 23.21% [19.93, 26.61] |
| C-only | coefficients | yes | 50.4% [49.7, 51.3] | 74.7% [73.9, 75.4] | 32.04% [31.64, 32.30] | 23.21% [19.93, 26.61] |
| C+phi | poles | yes | 56.3% [55.3, 56.8] | 96.5% [95.0, 98.0] | 8.84% [7.86, 9.42] | 4.15% [3.71, 4.43] |
| C+phi | coefficients | no | 46.7% [44.2, 49.7] | 73.9% [72.9, 74.4] | 26.50% [25.81, 27.78] | 21.68% [21.09, 22.06] |
| C+phi | coefficients | yes | 48.7% [46.7, 51.8] | 73.9% [72.9, 74.4] | 25.91% [24.15, 27.78] | 21.58% [21.09, 22.06] |
The stored X21 C-only outputs, scored the same way, certify 97.5 / 97.5 / 96.5% (poles) and 75.9 / 74.4 / 75.9% (coefficients) at b = 16.
Paired differences at b = 16, seeds 0 / 1 / 2, primary block:
| effect | certified points | regret points on the plants both certify |
|---|---|---|
| coordinates (poles minus coefficients), C-only | +21.6 / +22.1 / +22.1 | +4.15 / +2.79 / +2.29 (all CIs exclude 0) |
| coordinates, C+phi | +20.6 / +23.6 / +23.6 | +3.38 / +4.83 / +2.55 (all CIs exclude 0) |
| variant (C+phi minus C-only), poles | -2.0 / +2.0 / -0.5 (all CIs include 0) | -0.29 / +0.88 / +0.27 (all CIs include 0) |
| variant, coefficients | -1.0 / +0.5 / -2.0 (all CIs include 0) | +1.23 / +0.27 / +1.60 (only seed 2's CI excludes 0) |
- The regret column uses the plants both arms certify. About a quarter of the plants are uncertified by both coefficient arms, and at 1e3 they tie at 0, so the all-plant median of the paired difference is exactly 0 for the variant rows.
- The secondary block gives the same coordinate effects: +21.6 / +22.1 / +22.1 (C-only) and +20.6 / +23.6 / +23.6 (C+phi) certified points.
- On the coefficient arms, t-repair acts on very few candidates. Of 3,184 candidates per seed, it gains 7 / 4 / 9 (C-only) and 29 / 32 / 30 (C+phi). It changes no plant's certification at b = 16, and the cheapest certified cost on 0 (C-only) and 1 / 3 / 1 plants (C+phi).
The sampler clip, same checkpoints and t-repair on every row (`siso/notes.txt`; X28's stored test runs at the validation-chosen clip of `results/icml_r3/X28/val_clip_choice.json`):
| arm | clip 1 (X30): certified, regret vs J* | validation-chosen clip | at that clip: certified, regret vs J* |
|---|---|---|---|
| C-only poles, seeds 0 / 1 / 2 | 97.0 / 96.0 / 97.0%; 10.42 / 9.63 / 10.80% | 1.5 | 98.5 / 98.0 / 97.5%; 6.79 / 6.62 / 6.81% |
| C+phi poles, seeds 0 / 1 / 2 | 95.0 / 98.0 / 96.5%; 9.25 / 7.86 / 9.42% | 1.5 | 95.0 / 96.5 / 95.5%; 7.14 / 6.33 / 6.30% |
| C+phi coefficients, seed 0 | 74.4%; 24.15% | 3 | 95.0%; 10.58% |
| C-only coefficients | see the table above | never validated | not run |
### 3.2 Item 3: full state
Certified % at b = 1 / 4 / 16, 3-seed mean (`fs/report.txt`):
| split | arm | C+phi | C-only |
|---|---|---|---|
| iid (120) | generator | 82.8 / 95.8 / 98.3 | 96.1 / 99.7 / 100.0 |
| iid | twin | 72.2 / 81.9 / 91.1 | 96.9 / 97.2 / 98.3 |
| iid | lookup | 42.5 / 70.0 / 83.3 | 43.3 / 70.0 / 83.3 |
| ood (60) | generator | 45.6 / 61.1 / 70.0 | 58.9 / 69.4 / 74.4 |
| ood | twin | 31.7 / 44.4 / 53.3 | 61.1 / 62.8 / 63.9 |
| ood | lookup | 33.3 / 46.7 / 55.0 | 35.0 / 48.3 / 55.0 |
- **Regret** at b = 16 against J*_FS, median over certified plants (iid): C+phi generator -0.25% against C-only -0.26%.
- **Fixed-knot SDP:**
- feasible and certified on the composed sector on 120 of 120 iid and 60 of 60 ood plants, including the 28 and 37 plants whose knots are not a constant ratio;
- CPU 15.38 ms per plant (iid median), against 15.17 ms for the C-only SDP re-timed in the same run;
- bound over simulated cost 1.0002.
- **The labels are mostly linear:** 4,858 of the 6,000 bank labels are the SDP gain with identity knots, and the median cost gain over the SDP gain is -0.00%.
### 3.3 Item 2: actuator
<!-- TODO: pending. Labels at step 50 (m = 3) and 25 (m = 4, 5) of 100 at 12:30 UTC on 2026-11-20; then certify, dataset, 3 generators per m, sampling, pipeline, latency, report (results/icml_r3/X30/act/report_m{3,4,5}.txt). -->
**Reading.**
- In SISO, C+phi changes no certified share by more than 2 points. Its cost is lower: 1.44 points on poles and 5.54 points on coefficients, as 3-seed means against J*.
- Against J_Fonly, C+phi poles are 0.88 points dearer (4.15% against 3.27%). So the two references rank the variants differently on poles. J* also contains the joint (C+phi) labels; which plants drive the flip was not checked.
- The poles-over-coefficients gap is about 22 points for both variants at clip 1. t-repair explains none of it.
- The gap depends on the sampler clip. At clip 3, which its validation chose, the C+phi coefficient model certifies 95.0%, the same as C+phi poles at their clip (seed 0).
- In the full-state family, C+phi certifies fewer plants than C-only on every learned arm, as the structural note predicts for generated knots. The per-plant optimum gains nothing: most labels are linear.
## 4. Conclusion / Interpretation
- **What it means:**
- The deck can draw C+phi next to C-only on [34] and [53] without changing either message's direction.
- Generating phi does not buy certification in these settings, and it costs some at small b.
- In SISO it buys a lower cost, and only against J*.
- **Scope / caveats:**
- The SISO clip-1 setup is the original [34] setup, not the validated protocol of the baselines slides. The C-only coefficient models were never clip-validated.
- The SISO C-only numbers are re-runs, because the stored X21 draws could not be reproduced on this cluster. The two agree within about 1 point.
- Full-state ood is 60 plants.
- The full-state self-checks and runs were done by a fork session, and its report was verified by this session.
- **Claim status change:** none for the paper. For the deck:
- slide 17 keeps its numbers, with a clip caveat;
- [53] shows C+phi below C-only on certified share;
- the fixed-knot SDP answers dc_presentation's convexity question.
- **Next:** Matteo decides whether to run the coefficient clip validation (about 8 to 10 CPU-hours, no training). Item 2 lands overnight.
<!-- Related: [[icml_r3_x29]] (docs/icml_r3_x29.md, the C+phi baselines); [[icml_r3_x28]] (docs/icml_r3_x28.md, the spline generators); [[icml_r3_x31]] (docs/icml_r3_x31.md, the pendulum screen of the same day) -->