# Worst-Case Switched Residual Stability Certificate

- ID: 789
- Canonical URL: https://synthcore.org/idea/789/worst-case-switched-residual-stability-certificate
- API JSON: https://synthcore.org/api/idea/789.json
- API Markdown: https://synthcore.org/api/idea/789.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.12189](https://arxiv.org/abs/2607.12189)
- Category: dynamics
- Solves: stability, accuracy
- ML areas: optimizer, mlp, rnn, training-dynamics
- Math tags: dynamical-systems, control-theory, linear-algebra, spectral-theory
- Ratings: usefulness 8/10; difficulty 6/10; novelty 7/10

## 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.

## 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.

## Key formulas

- eₖ₊₁ = Mₛₖ eₖ,    Mₚ = I + hAₚ,    eₖ = Mₛₖ₋₁ ... Mₛ₀ e₀
- ρ̂(M) = limsupₖ→∞ max₍ₚ₀,...,ₚₖ₋₁₎ ||Mₚₖ₋₁ ... Mₚ₀||^(1/k)
- ρ̂(M) < 1 implies ||eₖ|| ≤ C qᵏ ||e₀|| for constants C > 0 and 0 < q < 1
- ρ̂(M) = 1 is the predicted switching-stability boundary; λsw = 0 is the equivalent continuous-time boundary

## 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

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: no_effect
- Verdict: 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.

### Mechanism check

- Verdict: 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.
- Confidence: 9/10
- 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.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.75075
- Paired wins: 2/8
- Benchmark verdict: no measurable effect

## Artifacts

- [bench_report.json](https://synthcore.org/code/149/bench_report.json)
- [bench_switched.py](https://synthcore.org/code/149/bench_switched.py)
- [report.md](https://synthcore.org/code/149/report.md)
- [report_bench_2026-08-30T181448.md](https://synthcore.org/code/149/report_bench_2026-08-30T181448.md)
- [results.json](https://synthcore.org/code/149/results.json)
- [switched_stability.py](https://synthcore.org/code/149/switched_stability.py)
- [Download all files as ZIP](https://synthcore.org/download/149)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
