Zubov Invariant Head for Stable Latent Dynamics
Implementation & benchmark of arXiv:2608.01018 — Data-Driven Domain of Attraction Estimation via Convergent Koopman-Zubov Approximation
Source paper: Data-Driven Domain of Attraction Estimation via Convergent Koopman-Zubov Approximation arXiv:2608.01018 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Attach a scalar Zubov head to a neural ODE, state-space model, or recurrent world model and train it to be invariant under a discounted Koopman action. The head should be near one for trajectories attracted to the target equilibrium and near zero for states with large accumulated deviation, providing a long-horizon stability signal and an off-distribution failure detector.
Formulas
Mathematical statement
For a continuous system \(\dot{x}=f(x)\) with flow \(S_f^t(x)\), the domain of attraction is \(\mathbb{A}=\{x:\lim_{t\to\infty}S_f^t(x)=0\}\). Choose a nonnegative cost \(q(x)\), with \(q(0)=0\) and \(q(x)>0\) away from the equilibrium, and define \(u(x)=\exp[-\int_0^\infty q(S_f^s(x))\,ds]\). Splitting the integral at \(\Delta t\) gives the invariant relation \(u(x)=\exp[-\int_0^{\Delta t}q(S_f^s(x))ds]u(S_f^{\Delta t}(x))\). For a learned transition \(F_\theta\), define \(\mathcal{T}_\theta u(x)=\gamma_\theta(x)u(F_\theta(x))\), with \(\gamma_\theta(x)=\exp[-\Delta t q(x)]\) or a path-integral quadrature estimate. The RKHS construction in the paper makes the Zubov-Koopman operator spectrally contractive, \(\rho(\mathcal{T})<1\), after constant-function augmentation, so operator iteration converges.
Implementation notes
Use a neural ODE, RSSM, S4-like state-space model, or GRU world model with latent state \(z_t\) and transition \(z_{t+1}=F_\theta(z_t,a_t)\). Add an MLP scalar head \(u_\phi(z)\in(0,1)\), implemented with a sigmoid, and designate the target latent equilibrium \(z_*\). Set \(q(z)=\|z-z_*\|^2/(\sigma_q^2+\|z-z_*\|^2)\). For each minibatch state, compute \(z'_i=F_\theta(z_i,a_i)\), \(\gamma_i=\exp[-\Delta t q(z_i)]\), and minimize the ordinary prediction loss plus \(\mathcal{L}_{\mathrm{Z}}=B^{-1}\sum_i[u_\phi(z_i)-\gamma_i u_\phi(z'_i)]^2\). Add \(\lambda(u_\phi(z_*)-1)^2\). During warmup, stop gradients through \(F_\theta\) in the Zubov term to avoid trivial co-adaptation. The paper supplies the invariant relation and RKHS spectral-contraction mechanism; estimate the learned operator radius empirically by power iteration on sampled transitions or by measuring successive probe-function norms. First test a two-layer GRU on damped nonlinear-pendulum trajectories, comparing ordinary training with Zubov regularization. The prediction is geometric decay \(\|\mathcal{T}^kg-u\|\lesssim C\rho^k\), with log-error slope \(\log\hat\rho\), and a sharp rollout-stability change near \(\hat\rho=1\). The measured slope should agree with \(\log\hat\rho\) within 20 percent.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significantly worse ✗
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a reproducible Zubov invariant-head experiment in experiment.py. The mechanism manifested in the toy checks: the trapezoidal invariant residual scaled as dt^2.994 versus the predicted dt^3, shell contraction matched exp(-dt q(r)) with maximum absolute error 0, and gamma scaling approached q(x)=0.6098 with 0.3%-2.4% relative error. However, the mini-experiment showed no prediction or rollout win, and the learned head did not meaningfully separate equilibrium from a far state, so this validates the mechanism but not practical benefit.
- Agent confidence
- 8/10
- Baseline
- Prediction MSE 0.0091455; 30-step rollout mean norm 1.4937; head values at equilibrium/far state 0.4639/0.4888.
- Idea
- Prediction MSE 0.0091455; 30-step rollout mean norm 1.4937; head values at equilibrium/far state 0.9802/0.9472. Math checks: invariant residual log-log slope 2.994 vs 3.0 predicted, contraction error 0, gamma relative errors 0.3%-2.4%.
Limitations: Only a small one-step MLP transition experiment was run rather than a true two-layer GRU or neural ODE. The transition was detached in the Zubov term, no off-distribution or unstable trajectories were evaluated, and there were no repeated seeds, hyperparameter sweeps, or statistically powered comparisons.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.01018)
Significantly WORSE than the tuned baseline (+257155.6%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0003
- Idea mean
- 0.7641
- Effect (Δ)
- 0.7638 (+257155.6%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±12422.9%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 6 configs
The benchmark used the fixed built-in dynamics dataset with 800 training and 300 test samples, 12 epochs, and the standard task MSE as the primary metric. Long-horizon rollout stability and off-distribution detection were not primary benchmark comparisons; the custom intervention loop was required because train_model cannot expose latent transitions to the Zubov loss. The baseline sweep used six lr/weight-decay configurations and the idea used three learning rates at the selected baseline weight decay.
How to run: python3 bench_zubov.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 10/10
Implemented the Zubov invariant head on the structurally matched dynamics track using rnn_small-style GRU dynamics and an intervention-specific training loop. The mechanism signature was confirmed on trained models: observed u_next/u was 0.9922 versus predicted gamma 0.9713, a 2.15% relative error, within the 20% criterion. However, the idea's test MSE was 0.7641 versus baseline 0.0002970; the paired delta was +0.7638 with permutation p=0.0081, so it was significantly worse and worked=false.
- Baseline
- dynamics/rnn_small, best cfg lr=0.01 weight_decay=0.0; 8-seed test MSE mean=0.0002970023, std=0.0001354145, per-seed=[0.0004619254,0.0004434233,0.0001734050,0.0002728092,0.0001412739,0.0003290406,0.0001095533,0.0004445875]
- Idea
- Zubov GRU, selected cfg lr=0.003 weight_decay=0.0; 8-seed test MSE mean=0.7640551, std=0.0412730, per-seed=[0.7298374,0.8162738,0.7819153,0.8400847,0.7549812,0.7326415,0.7308232,0.7258837]; paired delta=+0.7637581, p=0.0081, idea_wins=0/8
- Mechanism signature
- predicted_gamma_mean=0.9712826; observed_u_next_over_u_mean=0.9921579; relative_error=0.0214925; mean_invariant_residual=0.00218160; confirmed=true
Benchmark result
Significantly WORSE than the tuned baseline (+257155.6%, p=0.0081, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0003
- Idea mean
- 0.7641
- Effect (Δ)
- 0.7638 (+257155.6%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±12422.9%
- Mechanism
- Confirmed ✓
- Practical effect
- Hurts
- Baseline tuning
- swept over 6 configs
The benchmark used the fixed built-in dynamics dataset with 800 training and 300 test samples, 12 epochs, and the standard task MSE as the primary metric. Long-horizon rollout stability and off-distribution detection were not primary benchmark comparisons; the custom intervention loop was required because train_model cannot expose latent transitions to the Zubov loss. The baseline sweep used six lr/weight-decay configurations and the idea used three learning rates at the selected baseline weight decay.
How to run: python3 bench_zubov.py
Artifacts
- bench_report.json 3.3 KB View Raw
- bench_zubov.py 7.1 KB View Raw
- experiment.py 5.0 KB View Raw
- report.md 1.5 KB View
- report_bench_2026-08-31T172626.md 5.7 KB View
- results.json 3.3 KB View Raw