# Bernstein-Certified Scheduled Recurrent Core

- ID: 1743
- Canonical URL: https://synthcore.org/idea/1743/bernstein-certified-scheduled-recurrent-core
- API JSON: https://synthcore.org/api/idea/1743.json
- API Markdown: https://synthcore.org/api/idea/1743.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2608.03175](https://arxiv.org/abs/2608.03175)
- Category: dynamics
- Solves: stability, accuracy
- ML areas: rnn, ssm, training-dynamics, optimizer
- Math tags: control-theory, dynamical-systems, linear-algebra, optimization, numerical-analysis
- Ratings: usefulness 8/10; difficulty 7/10; novelty 7/10

## Idea description

Build a recurrent or state-space neural module with a transition matrix A_theta(rho) that is affine in a context or scheduling vector rho, and certify contraction using a continuous piecewise-polynomial Lyapunov matrix P(rho). Instead of checking stability only at sampled contexts, use Bernstein coefficient inequalities on every grid cell and every vertex of the allowed context-rate box, producing a finite certificate for all continuous trajectories within the domain.

## Mathematical statement

Let the recurrent state evolve as dot{x} = A_theta(rho)x + B_theta(rho)u and let rho_dot belong to the box R = {v: v_i in [v_i^-,v_i^+]}. Choose a symmetric piecewise-polynomial P(rho) represented on cell c by P^(c)(alpha) = sum_i B_i^m(alpha)P^(c)[i], where alpha maps the physical cell to [0,1]^ell, B_i^m are tensor Bernstein basis functions, and P^(c)[i] are symmetric certificate matrices. The continuous-time contraction condition is F(rho,v) = sum_s v_s partial P/partial rho_s + P(rho)A_theta(rho) + A_theta(rho)^T P(rho) + 2 alpha P(rho) <= 0, with alpha > 0 the desired decay rate. Require P(rho) >= epsilon I for epsilon > 0. If F is assembled into Bernstein coefficients F^(c)[i,v], imposing F^(c)[i,v] <= 0 for every coefficient i, cell c, and rate-box vertex v is sufficient because Bernstein basis functions are nonnegative and sum to one. Shared face coefficients enforce continuity of P. At an interface, Clarke generalized derivatives are convex combinations of adjacent one-sided derivatives, so checking adjacent-cell derivative cases covers nonsmooth boundaries.

## Key formulas

- $$\dot{x}=A_{\theta}(\rho)x+B_{\theta}(\rho)u,\qquad P^{(c)}(\alpha)=\sum_{\mathbf{i}\in\{0,\ldots,m\}^{\ell}}B_{\mathbf{i}}^{m}(\alpha)P^{(c)}[\mathbf{i}],$$
- $$F(\rho,v)=\sum_{s=1}^{\ell}v_s\frac{\partial P}{\partial\rho_s}+P(\rho)A_{\theta}(\rho)+A_{\theta}(\rho)^TP(\rho)+2\alpha P(\rho)\preceq0,\qquad P(\rho)\succeq\varepsilon I,$$
- $$F^{(c)}[\mathbf{i},v]\preceq0\ \forall\mathbf{i},c,v\in\operatorname{vert}(\mathcal R)\quad\Longrightarrow\quad F(\rho,v)\preceq0\ \forall\rho\in\mathcal P,\ v\in\mathcal R,$$
- $$\partial_{\mathcal P}^{\circ}P(\bar\rho)=\operatorname{co}\left\{\lim_{\rho\to\bar\rho,\ \rho\in\operatorname{int}(\mathcal H_c)}\nabla P(\rho):c\text{ adjacent to }\bar\rho\right\}.$$

## Implementation notes

1. Exact integration point: implement a continuous-time latent state-space block inside a sequence model, with dot{x} = A_theta(rho)x + B_theta(rho)u and y = C_theta x. Start with A_theta(rho) = A_0 + sum_s rho_s A_s, where rho is a normalized context such as timestep, operating condition, or a low-dimensional encoder output. Use matrix exponentials or a stable ODE discretization for rollout. 2. Pseudocode: create a rectangular grid over rho; introduce symmetric Bernstein coefficients P for every cell; impose P_coeff - epsilon*I >> 0; for every cell and every rate-box vertex v, symbolically assemble the Bernstein coefficients of v dot grad(P) + P A + A^T P + 2 alpha P and impose each coefficient << 0; impose equality of Bernstein coefficients on shared faces; solve the SDP for P and, optionally, A when A enters affinely. During neural training, either freeze A and periodically recertify P, or alternate several gradient steps on the predictor with an SDP feasibility solve and reject updates that destroy the certificate. 3. Computed versus estimated: Bernstein coefficient matrices, derivatives, face equalities, and rate vertices are computed exactly from polynomial coefficients; neural approximation error, discretization error, and whether rho remains in the declared box are estimated empirically. 4. First cheap experiment: use a 2- or 4-dimensional latent linear SSM on Copy Memory and sequential MNIST, comparing unconstrained, spectral-normalized, and certified models. Sweep maximum context-rate bound r and polynomial degree m. The quantitative prediction is a feasibility transition: the SDP becomes infeasible near the largest admissible rate r_star, while increasing m or grid-cell count should weakly increase feasible r_star and reduce long-horizon hidden-state error. Validate by dense random sampling and require every sampled largest eigenvalue of F to be nonpositive, with the observed boundary agreeing with the SDP prediction within 20%.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: harms
- Verdict: Built a readable scalar MVP of the Bernstein-certified scheduled recurrent core, including exact Bernstein derivative, product, and degree-elevation operations plus LP feasibility for the scalar SDP special case. The mechanism was verified: Bernstein coefficient inequalities produced zero violations in 500 random convex-hull checks and dense sampling remained nonpositive. The decay feasibility boundary matched the predicted worst-case condition alpha <= a - b*rho_max, approximately 0.30, while the rate bound had no finite boundary in this uniformly stable scalar system, correctly showing that rate dependence is not universal. The certified rollout decayed to 5.90e-29, whereas the unstable baseline grew to 3.27e6.

### Mechanism check

- Verdict: Built a readable scalar MVP of the Bernstein-certified scheduled recurrent core, including exact Bernstein derivative, product, and degree-elevation operations plus LP feasibility for the scalar SDP special case. The mechanism was verified: Bernstein coefficient inequalities produced zero violations in 500 random convex-hull checks and dense sampling remained nonpositive. The decay feasibility boundary matched the predicted worst-case condition alpha <= a - b*rho_max, approximately 0.30, while the rate bound had no finite boundary in this uniformly stable scalar system, correctly showing that rate dependence is not universal. The certified rollout decayed to 5.90e-29, whereas the unstable baseline grew to 3.27e6.
- Confidence: 8/10
- Limitations: Only a scalar one-cell continuous-time system was implemented. Matrix-valued LMIs, multiple grid cells, shared-face continuity constraints, neural training, input/output maps, discretization effects, and sequential-memory benchmarks were not tested. The exact alpha=0.30 boundary is non-strict and accepted at machine precision; strict positive margins become infeasible immediately above it.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 0/8
- Benchmark verdict: idea worse (significant)

## Artifacts

- [bench_report.json](https://synthcore.org/code/553/bench_report.json)
- [bernstein_certified_ssm.py](https://synthcore.org/code/553/bernstein_certified_ssm.py)
- [report.md](https://synthcore.org/code/553/report.md)
- [report_bench_2026-08-31T174317.md](https://synthcore.org/code/553/report_bench_2026-08-31T174317.md)
- [results.json](https://synthcore.org/code/553/results.json)
- [run_experiment.py](https://synthcore.org/code/553/run_experiment.py)
- [stage2_bench.py](https://synthcore.org/code/553/stage2_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/553)

## Disclaimer

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