Worst-Case Switched Residual Stability Certificate
Implementation & benchmark of arXiv:2607.12189 — Stability and Bifurcations of Planar Switched Linear and Homogeneous Systems
Source paper: Stability and Bifurcations of Planar Switched Linear and Homogeneous Systems arXiv:2607.12189 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Model a residual network, recurrent update, or optimizer as a switched linearized system in which each layer type, token, data batch, or optimizer regime selects a matrix mode. Constrain the worst-case product growth over admissible switches, rather than merely constraining every individual Jacobian, so arbitrary mode sequences remain contractive.
Formulas
Mathematical statement
For modes p in {1,...,m}, the switched perturbation dynamics are eₖ₊₁ = Mₛₖ eₖ, where Mₚ is the linearized update matrix and sₖ is the active switching signal. The joint spectral radius is ρ̂(M) = limsupₖ→∞ max over mode sequences of ||Mₛₖ₋₁ ... Mₛ₀||^(1/k). Uniform exponential stability under arbitrary switching requires ρ̂(M) < 1, while ρ̂(M) = 1 is the stability bifurcation boundary. For a continuous-time system, the analogous worst-case exponent is λsw = limsupT→∞ T⁻¹ maxσ log ||Φσ(T)||, where Φσ(T) is the state-transition matrix under switching; stability requires λsw < 0.
Implementation notes
Integrate the certificate at the Jacobian level of a residual MLP, RNN, or optimizer. For a block Fₚ(x) = x + h fₚ(x), compute the local Jacobian Mₚ(x) = I + h times the Jacobian of fₚ with respect to x. Modes can represent layer types, attention regimes, optimizer states, or batch-dependent activation regimes. During calibration, collect representative mode Jacobians using automatic differentiation. Estimate worst-case products with beam search: initialize B = {I}; for each horizon r, form every product MₚB for p in the mode set and B in the current beam; score each product by log spectral norm; retain the top K products; record gᵣ = max log norm divided by r and ρ̂ᵣ = exp(gᵣ). Pseudocode: B=[I]; for r=1,...,R: C={M[p] @ B0 for p in modes and B0 in B}; B=top_K(C, score=log_norm); rho[r]=exp(max_score/r). Exact matrices may be replaced by Jacobian-vector products and power iteration. The first experiment should use a two-dimensional residual network with two noncommuting matrices, followed by a small CIFAR-10 ResNet with two block modes. Sweep residual scale h or a global scale s and compare against individual spectral normalization. The quantitative prediction is a transition from decaying to growing perturbations when measured ρ̂R crosses one; increasing beam horizon should move the estimated threshold by less than 20 percent.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built an exact 2D two-mode switched residual stability verifier plus a finite-width beam-search certificate in switched_stability.py. Scaling all modes by s scaled the estimated joint growth rate by s exactly, and the observed decay-to-growth transition occurred at the predicted finite-horizon boundary s≈0.8865. The horizon-estimated boundary moved from 0.8507 at r=4 to 0.8865 at r=16, a 4.2% change within the predicted 20% tolerance; the switched-product criterion allowed a 1.186x larger scale than the individual spectral-norm rule.
- Agent confidence
- 9/10
- Baseline
- Individual spectral-norm constraint: maximum mode norm=1.33757, allowable global scale boundary=0.74763.
- Idea
- Finite-horizon switched certificate: rho_hat_16=1.12804 at unit scale, boundary=0.88649. At 0.99 times the boundary, log growth per step=-0.01005 and product norm after 16 steps=0.85146; at 1.01 times the boundary, log growth per step=+0.00995 and product norm=1.17258. Beam width 16 matched exact enumeration at horizons 4, 8, 12, and 16.
Limitations: Only a 2D linear toy system was tested. No residual MLP, RNN, optimizer, automatic-differentiation Jacobian collection, CIFAR-10 model, training-loss comparison, FLOP or speed measurement, or larger-mode beam approximation was evaluated. The joint spectral radius estimates are finite-horizon quantities, and exact enumeration is practical here only because there are two modes and horizon 16.
How to run: python3 switched_stability.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.12189)
No significant difference vs. the tuned baseline (+0.0%, p=0.7508, wins 2 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0038
- Idea mean
- 0.0038
- Effect (Δ)
- 0 (+0.0%; negative = idea better)
- Wins
- 2 / 8 paired seeds
- p-value
- 0.7508 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.0%
- Mechanism
- Not confirmed ✗
- Practical effect
- No effect
- Baseline tuning
- swept over 6 configs
Only the registered built-in dynamics track was tested. The intervention used a representative local recurrent Jacobian and a conservative single-mode spectral penalty rather than a fully differentiable worst-case product over all sampled modes; the mechanism signature used four trained models and a short hidden-state probe rather than long-horizon rollout stability.
How to run: python3 bench_switched.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
The matched dynamics/rnn_small benchmark completed with the mandated baseline sweep, shared learning-rate search space, idea sweep, and eight paired seeds. Baseline test MSE was 0.0038480483 versus 0.0038480595 for the idea, paired delta +1.12e-08 with permutation p=0.75075, so there was no significant win. The trained-model mechanism signature was also not confirmed: predicted rho=0.8613 but observed hidden-state ratio=1.4026.
- Baseline
- test MSE mean 0.003848048327199649, std 0.0019871782432351525, best lr=0.003 wd=0.0001
- Idea
- test MSE mean 0.003848059532174375, std 0.0019871702370856054, selected lr=0.003 wd=0.0001 lam=0.001; delta +1.1204974725842476e-08, p=0.75075
Benchmark result
No significant difference vs. the tuned baseline (+0.0%, p=0.7508, wins 2 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0038
- Idea mean
- 0.0038
- Effect (Δ)
- 0 (+0.0%; negative = idea better)
- Wins
- 2 / 8 paired seeds
- p-value
- 0.7508 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.0%
- Mechanism
- Not confirmed ✗
- Practical effect
- No effect
- Baseline tuning
- swept over 6 configs
Only the registered built-in dynamics track was tested. The intervention used a representative local recurrent Jacobian and a conservative single-mode spectral penalty rather than a fully differentiable worst-case product over all sampled modes; the mechanism signature used four trained models and a short hidden-state probe rather than long-horizon rollout stability.
How to run: python3 bench_switched.py
Artifacts
- bench_report.json 3.8 KB View Raw
- bench_switched.py 5.6 KB View Raw
- report.md 1.7 KB View
- report_bench_2026-08-30T181448.md 4.7 KB View
- results.json 3.3 KB View Raw
- switched_stability.py 4.2 KB View Raw