Characteristic-Invariant BT Monitor
Implementation & benchmark of arXiv:2608.19018 — The Bogdanov--Takens normal-form coefficients in $\mathbb{R}^n$ as directional derivatives of the characteristic invariants
Source paper: The Bogdanov--Takens normal-form coefficients in $\mathbb{R}^n$ as directional derivatives of the characteristic invariants arXiv:2608.19018 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Add a local bifurcation monitor to a neural ODE, continuous-time RNN, or state-space model by computing the central determinant and central trace from characteristic invariants of the state Jacobian. Their directional derivatives along the zero-eigenvalue direction estimate the BT coefficients and predict whether the model is approaching a codimension-two transition, allowing training to avoid destructive criticality or intentionally preserve a useful long-memory regime.
Formulas
Mathematical statement
Let the neural vector field be $\dot z=f_\theta(z,x)$ with equilibrium $f_\theta(z_*,x_*)=0$ and Jacobian $J=D_zf_\theta(z_*,x_*)\in\mathbb{R}^{n\times n}$. Define $e_k(J)$ as the sum of all principal $k\times k$ minors, so that $\det(\lambda I-J)=\sum_{k=0}^n(-1)^ke_k(J)\lambda^{n-k}$. At a BT point, $J$ has a zero eigenvalue of algebraic multiplicity two, rank $n-1$, and an invertible transverse block, represented by $e_{n-2}(J)\neq0$. For a nonzero $q_0\in\ker J$, define $D_{q_0}e_k=\nabla_z[e_k(D_zf_\theta(z,x_*))]_{z=z_*}^{\mathsf T}q_0$. The BT coefficients are $a=-\frac12D_{q_0}e_n/e_{n-2}$ and $b=D_{q_0}e_{n-1}/e_{n-2}-e_{n-3}D_{q_0}e_n/e_{n-2}^2$. Equivalently, $\delta=e_n/e_{n-2}$ and $\tau=(e_{n-1}e_{n-2}-e_ne_{n-3})/e_{n-2}^2$ satisfy $a=-\frac12D_{q_0}\delta$ and $b=D_{q_0}\tau$.
Implementation notes
Use a continuous-time RNN or neural ODE with hidden state $z\in\mathbb{R}^n$ and dynamics $\dot z=f_\theta(z,x)$. At validation checkpoints, find an equilibrium $z_*$ by integrating with fixed input or solving $f_\theta(z_*,x)=0$ with Newton iterations. Compute $J=D_zf_\theta(z_*,x)$ using automatic differentiation. Obtain characteristic-polynomial coefficients and hence $e_k(J)$; for small models, direct principal-minor computation is acceptable, while larger models can use traces or polynomial algorithms. Estimate $q_0$ as the smallest right singular vector of $J$, normalize it, and use JVPs to compute directional derivatives of $e_k(D_zf_\theta(z,x))$ at $z_*$. Then evaluate $\delta$, $\tau$, $a$, and $b$. Add $L_{BT}=\rho_\delta\delta^2+\rho_\tau\tau^2$ when targeting criticality, or a barrier $L_{safe}=\rho/(e_{n-2}^2+\epsilon)$ when avoiding singular transverse blocks. The paper supplies the invariant formulas; equilibrium locations, null vectors, and derivatives are estimated numerically. First test a two- or four-dimensional tanh continuous-time RNN on damped-oscillator sequences, comparing unconstrained training with the monitor. Sweep a recurrent gain. The predicted signature is simultaneous zero crossing of measured $\delta$ and $\tau$ at the BT candidate, with trajectory fits recovering $\dot u_1\approx u_2$ and $\dot u_2\approx au_1^2+bu_1u_2$ within roughly 20 percent.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not reproduced ✗
Stage 2 · Practical benchmark result: Inconclusive
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 readable 2D continuous-time BT monitor with characteristic invariants, differentiable directional derivatives, finite-difference validation, and a baseline comparison. The three toy predictions manifested exactly: over 81 unfolding points delta=-mu and tau=nu with maximum error 0, and across four coefficient settings autodiff recovered a=alpha and b=beta with zero error; the candidate grid isolated delta=tau=0 at (mu,nu)=(0,0). The monitor optimization reached invariant loss 1.09e-12 versus 2.03 for the spectral-abscissa baseline, although this is a deliberately simple canonical system rather than evidence of a neural-network training win.
- Agent confidence
- 8/10
- Baseline
- Spectral-abscissa penalty: final mu=-0.351995, nu=-1.379715, delta=0.351995, tau=-1.379715, delta^2+tau^2=2.027515.
- Idea
- Invariant target penalty: final mu=-9.59e-7, nu=4.18e-7, delta=9.59e-7, tau=4.18e-7, delta^2+tau^2=1.094e-12. Identity sweep and coefficient sweep maximum errors were both 0.
Limitations: Only a 2D analytic canonical BT family was tested; no learned neural ODE or continuous-time RNN, equilibrium solver, noisy Jacobian estimation, higher-dimensional principal-minor implementation, trajectory-fit validation, GPU path, or runtime/FLOP comparison was evaluated. The n=2 transverse invariant is trivially e0=1, so transverse-block conditioning was not meaningfully stressed.
How to run: python3 bt_monitor_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.19018)
Ahead of the baseline (−2.2%) but not statistically significant (p=0.1825, wins 6 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0041
- Idea mean
- 0.004
- Effect (Δ)
- -0.0001 (−2.2%; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.1825 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±3.5%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 6 configs
Only the built-in dynamics pendulum track was tested. The monitor used a two-dimensional local chart of the 64-dimensional GRU state; equilibrium solving, full higher-dimensional invariant computation, trajectory normal-form fitting, longer training, and separate criticality-avoidance targets were not tested.
How to run: python3 bt_bench.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
Implemented the Characteristic-Invariant BT Monitor as a differentiable training regularizer on the registered dynamics track with the shared rnn_small architecture. Mean test MSE improved slightly from 0.0041140872 to 0.0040236821, but the paired permutation test was non-significant (p=0.1825), so the benchmark does not establish a win; the trained-model mechanism signature was also not confirmed.
- Baseline
- Mean MSE 0.004114087234484032 over 8 seeds; tuned lr=0.01, weight_decay=0.0001, epochs=8.
- Idea
- Mean MSE 0.004023682136903517 over 8 seeds; lr=0.01, weight_decay=0.0001, epochs=8, rho=0.05; paired delta=-0.000090405148051485, p=0.1825.
Benchmark result
Ahead of the baseline (−2.2%) but not statistically significant (p=0.1825, wins 6 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0041
- Idea mean
- 0.004
- Effect (Δ)
- -0.0001 (−2.2%; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.1825 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±3.5%
- Mechanism
- Not confirmed ✗
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 6 configs
Only the built-in dynamics pendulum track was tested. The monitor used a two-dimensional local chart of the 64-dimensional GRU state; equilibrium solving, full higher-dimensional invariant computation, trajectory normal-form fitting, longer training, and separate criticality-avoidance targets were not tested.
How to run: python3 bt_bench.py
Artifacts
- bench_report.json 3.5 KB View Raw
- bt_bench.py 5.9 KB View Raw
- bt_monitor_experiment.py 4.5 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-09-01T172317.md 5.2 KB View
- results.json 2.3 KB View Raw