X28: write-up with the MIMO repair result
Browse files- docs/icml_r3_x28.md +26 -8
docs/icml_r3_x28.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
---
|
| 2 |
-
title: Generating the spline nonlinearity together with the controller (X28). SISO
|
| 3 |
date: 2026-11-14
|
| 4 |
-
status: complete (SISO; MIMO optimum, spline-class study, labels, generators, paired test, new directions)
|
| 5 |
claim: X28 (Matteo 2026-11-05): the July method (the diffusion model generates the 11-knot spline phi with the linear part) against the October setting (SISO phi = sat_1, X21; MIMO identity actuator, X27). If the spline loses, the measured loss documents why the setting changed.
|
| 6 |
maps_to: SISO section (why phi is fixed to sat_1), MIMO section (actuator class); no paper edit until Matteo agrees the claim
|
| 7 |
-
scripts: nonlinear/experiments/x28_siso.py (S1 gate, control, diagnostics, symmetric gate, S2 labels), nonlinear/training/train_x28.py (S3), nonlinear/experiments/x28_eval.py (S3 validation, S4 test), nonlinear/experiments/x28_paired.py (S4 paired test, fresh directions); nonlinear/mimo_unstable/x28_mimo.py (MIMO certificate, rollout, optimizer, gate, fresh directions, spline classes), nonlinear/mimo_unstable/x28_study_pick.py (class selection), nonlinear/mimo_unstable/x28_mimo_gen.py (MIMO datasets, generator jobs, sample, evaluate, paired test, new directions), nonlinear/mimo_unstable/mh_train.py (MIMO generator training, X27 trainer)
|
| 8 |
-
artifacts: results/icml_r3/X28/{PREREG.md, gate_report.txt, control_report.txt, diag_report.txt, gate_sym_report.txt, labels_train/, labels_test/, eval_val_report.txt, val_clip_choice.json, eval_test/, eval_test_report.txt, eval_test_paired.txt, eval_test_fresh.txt}; results/icml_r3/X28/mimo/{selfcheck_m*.json, gate_*.txt, fresh_*.txt, study_m*/, study_choice.txt, lab0_m2/, lab0_m3/, lab1_m3/, ds/, gen/, gen_paired_m*.txt, gen_fresh_m*.txt, gen_fresh_m*.npz}; models/x28_{clS_s0,clS_s1,clS_s2,coefS_s0}/, models/x28m/; HF matCercola18/DiffusionControl commits 268d7a3 (labels, models, gate), c6dfe66 (S4 test, study), d339e9b (MIMO labels, generators, S4)
|
| 9 |
---
|
| 10 |
|
| 11 |
# Generating the spline nonlinearity together with the controller (X28)
|
|
@@ -13,8 +13,8 @@ artifacts: results/icml_r3/X28/{PREREG.md, gate_report.txt, control_report.txt,
|
|
| 13 |
## TL;DR
|
| 14 |
- **Question:** In July the diffusion model generated the nonlinearity phi (an 11-knot spline) together with the linear part. In October phi was fixed (SISO: sat_1; MIMO: identity). Does generating phi buy anything, and if not, what does it cost?
|
| 15 |
- **SISO answer:** No gain. At each plant's optimum the spline is cheaper than sat_1 by a median 2.84%, but all of it is knot asymmetry fitted to the 4 fixed initial directions of the cost: on 64 new directions it is no better (-0.36%), and an odd spline gains 0.00%. On the 199 test plants the spline generator ties the X21 sat_1 generator at 16 samples ("no measurable difference" on all 3 seed pairs), certifies 6 to 16 points fewer plants at 1 and 4 samples, and is 1.3% to 1.5% more expensive on new directions.
|
| 16 |
-
- **MIMO answer:** At the optimum every spline class beats identity by a median 4.5% to 6.6%, but only odd (sign-symmetric) classes keep a gain on new initial directions; free knots lose 2% to 6%. A pre-registered study over five classes picks odd piecewise-linear knots at |x| = 1, 3, 5 (3 numbers per channel)
|
| 17 |
-
- **So what:**
|
| 18 |
|
| 19 |
## 1. Problem / Goal
|
| 20 |
- **SISO setting (X21):** open-loop-unstable plants, bounded actuator, controller u = -phi(clip(F y, +-5)) with a dynamic filter F. X21 fixed phi = sat_1 and generated F. X28 generates F and the 10 nonzero knots of phi (|phi| <= 1, phi(0) = 0) with the same recipe.
|
|
@@ -31,6 +31,7 @@ artifacts: results/icml_r3/X28/{PREREG.md, gate_report.txt, control_report.txt,
|
|
| 31 |
- **MIMO S2 labels:** 7,936 bank plants at m = 3 (indices 64 to 8,000) and 3,936 at m = 2 (64 to 4,000), identity at c = 1 and `so3` at c = 1, 2, 5, 400 Adam steps each (rollout gradient checkpointing, same math). Label (a) is the identity gain K. Label (b) is the cheapest of the three `so3` starts and identity, stored as K plus log r_i(1), log r_i(3), log r_i(5) per channel with no gauge normalization (PREREG correction 2026-11-13: with knots at fixed positions, scaling a row of K is not a symmetry).
|
| 32 |
- **MIMO S3 generators:** X27 recipe (DDPM-500, MLP 256 x 5, 96k steps, batch 64, lr 2e-4, EMA 0.999), 3 seeds per arm and m, 12 models.
|
| 33 |
- **MIMO S4 test:** the 120 held-out plants per m, 16 samples per plant (clip 1, seed = model seed). Arm (a) is certified by the Lyapunov LMI (alpha = beta = 1), arm (b) by the circle LMI. Cost on the 2m unit directions, J* = min of all held-out labels of the gate, and the SISO verdict rule on seed j against seed j. Diagnostic: the best certified 16-sample controller per plant on the 64 new directions of seed (7575, id), against (a) seed 0.
|
|
|
|
| 34 |
|
| 35 |
## 3. Results
|
| 36 |
|
|
@@ -103,7 +104,24 @@ Source: `gen_paired_m*.txt`. Paired (seed j vs seed j; positive means the spline
|
|
| 103 |
- **b = 4:** certified 7.5 to 14.2 points fewer (McNemar p 1.5e-05 to 0.035); regret difference between -0.42 and +1.29 points (Holm p >= 0.097).
|
| 104 |
- **New directions** (`gen_fresh_m*.txt`, best certified b = 16 sample per plant, 64 directions, against (a) seed 0, plants where both certify): at m = 2, (b) +2.08% [+0.55, +3.13], +1.69% [+0.60, +2.60], +1.57% [+0.68, +2.77], against -0.07% and -0.07% for (a) seeds 1 and 2. At m = 3, (b) +0.44% [-1.13, +1.97], +0.66% [-0.35, +2.52], +0.04% [-1.01, +1.67], against +0.26% and +0.33% for (a) seeds 1 and 2. Non-convergent rollouts: 0 to 41 per seed for (b), 0 to 64 for (a), of 7,232 to 7,680.
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
## 4. Conclusion
|
| 107 |
- **SISO:** generating phi does not pay. The optimum-level gain is a fit to the cost's initial directions, the generator ties sat_1 at 16 samples, loses certified plants at small budgets, and does worse on new directions. This is the measured reason for the October setting phi = sat_1.
|
| 108 |
-
- **MIMO:** a free spline repeats the SISO artifact. An odd spline with 3 knots per channel keeps a gain on new initial directions at the optimum (held-out: +2.96% at m = 2, +0.94% at m = 3).
|
| 109 |
-
- **Caveats:** the SISO certificate is order dependent across calls (passes stand, fails prove nothing); the MIMO cost uses only positive unit directions, which is why the new-direction checks carry the conclusions; the 64-sample SISO result is one seed and was measured on the cost directions only; the paired rank test scores an uncertified plant as regret 1e3, so a few certification failures outweigh many small cost gains (the pre-registered rule, the same on SISO and MIMO); the MIMO new-direction comparison covers only plants where both generators certify.
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Generating the spline nonlinearity together with the controller (X28). SISO, no gain over phi = sat_1. MIMO, as registered no measurable difference at 16 samples; with the July-style projection of the knots the odd 3-knot spline generator is better at m = 3, cheaper but not significant at m = 2, and worse at 1 sample
|
| 3 |
date: 2026-11-14
|
| 4 |
+
status: complete (SISO; MIMO optimum, spline-class study, labels, generators, paired test, new directions, test with repair)
|
| 5 |
claim: X28 (Matteo 2026-11-05): the July method (the diffusion model generates the 11-knot spline phi with the linear part) against the October setting (SISO phi = sat_1, X21; MIMO identity actuator, X27). If the spline loses, the measured loss documents why the setting changed.
|
| 6 |
maps_to: SISO section (why phi is fixed to sat_1), MIMO section (actuator class); no paper edit until Matteo agrees the claim
|
| 7 |
+
scripts: nonlinear/experiments/x28_siso.py (S1 gate, control, diagnostics, symmetric gate, S2 labels), nonlinear/training/train_x28.py (S3), nonlinear/experiments/x28_eval.py (S3 validation, S4 test), nonlinear/experiments/x28_paired.py (S4 paired test, fresh directions); nonlinear/mimo_unstable/x28_mimo.py (MIMO certificate, rollout, optimizer, gate, fresh directions, spline classes), nonlinear/mimo_unstable/x28_study_pick.py (class selection), nonlinear/mimo_unstable/x28_mimo_gen.py (MIMO datasets, generator jobs, sample, evaluate, paired test, new directions), nonlinear/mimo_unstable/mh_train.py (MIMO generator training, X27 trainer), nonlinear/mimo_unstable/x28_repair.py (MIMO test with repair: Popov LMI, knot flattening, validation choice, held-out test, loss tails)
|
| 8 |
+
artifacts: results/icml_r3/X28/{PREREG.md, gate_report.txt, control_report.txt, diag_report.txt, gate_sym_report.txt, labels_train/, labels_test/, eval_val_report.txt, val_clip_choice.json, eval_test/, eval_test_report.txt, eval_test_paired.txt, eval_test_fresh.txt}; results/icml_r3/X28/mimo/{selfcheck_m*.json, gate_*.txt, fresh_*.txt, study_m*/, study_choice.txt, lab0_m2/, lab0_m3/, lab1_m3/, ds/, gen/, gen_paired_m*.txt, gen_fresh_m*.txt, gen_fresh_m*.npz, gen_rep/, rep_selfcheck.txt, rep_val_choice.txt, gen_rep_paired_m*.txt, gen_rep_fresh_m*.txt, gen_rep_fresh_m*.npz, rep_tails.txt}; models/x28_{clS_s0,clS_s1,clS_s2,coefS_s0}/, models/x28m/; HF matCercola18/DiffusionControl commits 268d7a3 (labels, models, gate), c6dfe66 (S4 test, study), d339e9b (MIMO labels, generators, S4), cad6165 (S4 with repair)
|
| 9 |
---
|
| 10 |
|
| 11 |
# Generating the spline nonlinearity together with the controller (X28)
|
|
|
|
| 13 |
## TL;DR
|
| 14 |
- **Question:** In July the diffusion model generated the nonlinearity phi (an 11-knot spline) together with the linear part. In October phi was fixed (SISO: sat_1; MIMO: identity). Does generating phi buy anything, and if not, what does it cost?
|
| 15 |
- **SISO answer:** No gain. At each plant's optimum the spline is cheaper than sat_1 by a median 2.84%, but all of it is knot asymmetry fitted to the 4 fixed initial directions of the cost: on 64 new directions it is no better (-0.36%), and an odd spline gains 0.00%. On the 199 test plants the spline generator ties the X21 sat_1 generator at 16 samples ("no measurable difference" on all 3 seed pairs), certifies 6 to 16 points fewer plants at 1 and 4 samples, and is 1.3% to 1.5% more expensive on new directions.
|
| 16 |
+
- **MIMO answer:** At the optimum every spline class beats identity by a median 4.5% to 6.6%, but only odd (sign-symmetric) classes keep a gain on new initial directions; free knots lose 2% to 6%. A pre-registered study over five classes picks odd piecewise-linear knots at |x| = 1, 3, 5 (3 numbers per channel). As registered, the generator of K and these knots ties the identity generator at 16 samples ("no measurable difference" at m = 2 and m = 3). Its paired median regret is 1.1 to 2.4 points lower, but it certifies only 57% to 76% of its samples against 93% to 99.5%. July certified every spline by projecting it into a safe sector, so a follow-up test, filed before any number, gives the spline generator that step: a rejected sample's knots are flattened until it certifies. With it, the spline generator certifies 99.2% to 100% of plants at 16 samples, like identity, and is better at m = 3 ("spline better" on 2 of 3 seed pairs: +1.3 and +1.8 points, Holm p 0.042). At m = 2 it is cheaper on all 3 pairs (+1.9 to +2.5 points, CIs above 0), but the rank test misses (Holm p 0.11), because it is worse by more than 10 points on 15 to 19 of 120 plants. At 1 sample it still certifies 12 to 20 points fewer plants. On new directions it is cheaper at m = 2 (+1.3% to +2.0%) and within the seed spread at m = 3.
|
| 17 |
+
- **So what:** On SISO, generating phi buys nothing, which supports phi = sat_1. On MIMO, generating the odd 3-knot shape pays at 16 samples once each sample is projected to a certified one, as in July: equal certification, about 2 points lower regret, significant at m = 3. Identity stays better at 1 sample, and on the plants where few spline samples certify.
|
| 18 |
|
| 19 |
## 1. Problem / Goal
|
| 20 |
- **SISO setting (X21):** open-loop-unstable plants, bounded actuator, controller u = -phi(clip(F y, +-5)) with a dynamic filter F. X21 fixed phi = sat_1 and generated F. X28 generates F and the 10 nonzero knots of phi (|phi| <= 1, phi(0) = 0) with the same recipe.
|
|
|
|
| 31 |
- **MIMO S2 labels:** 7,936 bank plants at m = 3 (indices 64 to 8,000) and 3,936 at m = 2 (64 to 4,000), identity at c = 1 and `so3` at c = 1, 2, 5, 400 Adam steps each (rollout gradient checkpointing, same math). Label (a) is the identity gain K. Label (b) is the cheapest of the three `so3` starts and identity, stored as K plus log r_i(1), log r_i(3), log r_i(5) per channel with no gauge normalization (PREREG correction 2026-11-13: with knots at fixed positions, scaling a row of K is not a symmetry).
|
| 32 |
- **MIMO S3 generators:** X27 recipe (DDPM-500, MLP 256 x 5, 96k steps, batch 64, lr 2e-4, EMA 0.999), 3 seeds per arm and m, 12 models.
|
| 33 |
- **MIMO S4 test:** the 120 held-out plants per m, 16 samples per plant (clip 1, seed = model seed). Arm (a) is certified by the Lyapunov LMI (alpha = beta = 1), arm (b) by the circle LMI. Cost on the 2m unit directions, J* = min of all held-out labels of the gate, and the SISO verdict rule on seed j against seed j. Diagnostic: the best certified 16-sample controller per plant on the 64 new directions of seed (7575, id), against (a) seed 0.
|
| 34 |
+
- **MIMO S4 with repair (PREREG addendum 2026-11-14; Matteo asked whether July was tested at its best, then "Yes, make it work"):** for a rejected arm (b) sample, the log knot ratios of each channel move toward a center g by a factor lam in {0.75, 0.5, 0.25, 0}, K is kept, and the largest certified lam wins. lam = 0 is the linear controller u = -diag(g) K y. Each sample yields one repaired controller, so the budget is unchanged. The center (geometric mean of r(1), r(3), r(5), or r(1)) was chosen on the 64 validation bank plants. A Popov certificate was planned next to the circle LMI, subject to two self-checks. Same samples, arm (a) results, J* and rule as S4-M.
|
| 35 |
|
| 36 |
## 3. Results
|
| 37 |
|
|
|
|
| 104 |
- **b = 4:** certified 7.5 to 14.2 points fewer (McNemar p 1.5e-05 to 0.035); regret difference between -0.42 and +1.29 points (Holm p >= 0.097).
|
| 105 |
- **New directions** (`gen_fresh_m*.txt`, best certified b = 16 sample per plant, 64 directions, against (a) seed 0, plants where both certify): at m = 2, (b) +2.08% [+0.55, +3.13], +1.69% [+0.60, +2.60], +1.57% [+0.68, +2.77], against -0.07% and -0.07% for (a) seeds 1 and 2. At m = 3, (b) +0.44% [-1.13, +1.97], +0.66% [-0.35, +2.52], +0.04% [-1.01, +1.67], against +0.26% and +0.33% for (a) seeds 1 and 2. Non-convergent rollouts: 0 to 41 per seed for (b), 0 to 64 for (a), of 7,232 to 7,680.
|
| 106 |
|
| 107 |
+
### 3.5 MIMO, generators with the July projection (repair)
|
| 108 |
+
Self-checks (`rep_selfcheck.txt`): the Popov LMI accepts all 400 circle-certified validation samples and certifies 51 of 1,876 circle-rejected ones. Simulated for 60 s from 64 directions at radii 1 and 5, 24 of those 6,528 rollouts do not shrink (circle-certified controls: 0 of 25,600), so by the rule the test uses the circle LMI alone. The cause is not diagnosed: it could be a fault in the Popov code, or RK4 at dt = 0.01 on the wide-sector loops that Popov admits. Popov enters no result. Validation (`rep_val_choice.txt`): both centers certify 99.5% of plants at 16 samples (identity 100%); r(1) has the lower median regret (6.46% against 6.52%) and is used.
|
| 109 |
+
|
| 110 |
+
| m | arm, seeds 0 / 1 / 2 | certified per sample | b = 1 certified | b = 16 certified | b = 16 regret vs J* |
|
| 111 |
+
|---|---|---|---|---|---|
|
| 112 |
+
| 3 | (a) identity | 96.0 / 96.6 / 93.4% | 95.0 / 97.5 / 94.2% | 100 / 100 / 100% | 10.66 / 10.46 / 10.56% |
|
| 113 |
+
| 3 | (b) `so3`, repaired | 79.3 / 79.3 / 82.6% | 83.3 / 80.0 / 80.8% | 99.2 / 100 / 100% | 8.25 / 8.51 / 9.04% |
|
| 114 |
+
| 2 | (a) identity | 99.5 / 98.8 / 99.0% | 100.0 / 98.3 / 99.2% | 100 / 100 / 100% | 8.22 / 7.95 / 7.99% |
|
| 115 |
+
| 2 | (b) `so3`, repaired | 88.2 / 87.5 / 85.0% | 86.7 / 86.7 / 79.2% | 100 / 100 / 100% | 4.76 / 4.79 / 5.27% |
|
| 116 |
+
|
| 117 |
+
Source: `gen_rep_paired_m*.txt`; lam per sample in `gen_rep/eval_primary_*.npz`. Flattening certifies another 20.7% to 22.1% of the samples at m = 3 and 11.5% to 12.3% at m = 2 (1.4% to 2.4% only at lam = 0, the linear controller); 17.4% to 20.7% (m = 3) and 11.8% to 15.0% (m = 2) stay uncertified. Paired (positive means the spline is cheaper):
|
| 118 |
+
- **b = 16 (primary):** (a) - (b) median regret difference +1.91 [+0.45, +2.71], +1.33 [+0.29, +3.40], +1.80 [+0.30, +4.11] points at m = 3 (Holm p 0.11, 0.042, 0.042) and +2.52 [+1.56, +3.47], +1.94 [+0.63, +2.66], +1.96 [+0.91, +2.93] at m = 2 (Holm p 0.11 on all three); certified -0.8, 0.0, 0.0 points (m = 3) and 0.0 on all three (m = 2). **Verdict: spline better at m = 3 (seed pairs 1 and 2), no measurable difference at m = 2.**
|
| 119 |
+
- **Why m = 2 misses** (`rep_tails.txt`): the spline is better by more than 5 points on 36 to 37 plants, but worse by more than 10 on 15 to 19. The rank test gives p 0.036, 0.050, 0.111 before Holm, so none passes after Holm. The large losses sit on plants where few samples certify as sampled (median 3 to 6 of 16, against 15.5 to 16 where the spline wins). There its best certified sample costs 35% to 41% regret, against 7% to 10% for identity. m = 3 shows the same pattern on 12 to 17 plants (median 2 to 3 of 16 certified as sampled).
|
| 120 |
+
- **b = 1:** the spline generator still certifies 11.7 to 17.5 points fewer plants at m = 3 and 11.7 to 20.0 at m = 2 (McNemar p <= 0.0043), and its regret is higher by 2.14 to 4.18 points (m = 3) and 2.01 to 3.54 (m = 2), Holm p <= 0.019.
|
| 121 |
+
- **b = 4:** regret difference +0.32 to +1.48 points (Holm p >= 0.62); certified -5.8 to +1.7 points.
|
| 122 |
+
- **New directions** (`gen_rep_fresh_m*.txt`): at m = 2, (b) +2.03% [+0.40, +3.08], +1.69% [+0.51, +2.54], +1.29% [+0.49, +2.41], against -0.07% and -0.07% for (a) seeds 1 and 2. At m = 3, (b) +0.21% [-1.10, +2.12], +0.66% [-0.24, +2.72], +0.07% [-1.08, +1.67], against +0.26% and +0.33%. Non-convergent rollouts of the repaired arm: 42 to 123 of 7,680 at m = 2 and 0 to 58 at m = 3 (identity 0 to 64).
|
| 123 |
+
|
| 124 |
## 4. Conclusion
|
| 125 |
- **SISO:** generating phi does not pay. The optimum-level gain is a fit to the cost's initial directions, the generator ties sat_1 at 16 samples, loses certified plants at small budgets, and does worse on new directions. This is the measured reason for the October setting phi = sat_1.
|
| 126 |
+
- **MIMO:** a free spline repeats the SISO artifact. An odd spline with 3 knots per channel keeps a gain on new initial directions at the optimum (held-out: +2.96% at m = 2, +0.94% at m = 3). As registered, its generator ties identity at 16 samples, because it certifies far fewer samples (57% to 76% against 93% to 99.5%). Given July's projection step (flatten a rejected sample until it certifies), it certifies as many plants as identity at 16 samples and is cheaper by a paired median 1.3 to 2.5 points. That is "spline better" at m = 3; at m = 2 it is cheaper on all three pairs but not significant after Holm, because it loses big on the 15 to 19 plants where few of its samples certify. Identity stays better at 1 sample. So on MIMO the July idea pays at the 16-sample budget once each sample is projected to a certified one. Its weak point is the plants where the generator rarely produces a certifiable spline.
|
| 127 |
+
- **Caveats:** the SISO certificate is order dependent across calls (passes stand, fails prove nothing); the MIMO cost uses only positive unit directions, which is why the new-direction checks carry the conclusions; the 64-sample SISO result is one seed and was measured on the cost directions only; the paired rank test scores an uncertified plant as regret 1e3, so a few certification failures outweigh many small cost gains (the pre-registered rule, the same on SISO and MIMO); the MIMO new-direction comparison covers only plants where both generators certify; the repair test was filed after the registered S4-M result was known (it answers whether July was tested at its best) and is reported next to that verdict, not instead of it.
|