Canard-Canceling Runge-Kutta Neural ODE
Implementation & benchmark of arXiv:2608.04304 — Local maximal-canard threshold shifts under Runge--Kutta discretization: an observable-specific order condition
Source paper: Local maximal-canard threshold shifts under Runge--Kutta discretization: an observable-specific order condition arXiv:2608.04304 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Use a second-order Runge-Kutta integrator satisfying the chain-tree condition b^T A c = 1/6 when the neural ODE output is an event threshold or separatrix crossing. The method remains only second order for general trajectories, but the paper predicts cancellation of the leading discretization bias in this nonlinear observable, potentially allowing larger inference steps at fixed threshold accuracy.
Formulas
Mathematical statement
For a Runge-Kutta tableau (A,b), let 1 be the all-ones vector and let c = A1 be the vector of stage abscissae. Classical order two requires b^T1 = 1 and b^Tc = 1/2. The two order-three defects are the bushy defect delta_bushy = b^T(c elementwise-multiplied-by-c) - 1/3 and the chain defect delta_chain = b^TAc - 1/6. Gaussian transport through the fold maps defect coefficients (alpha,beta) to -(3/8) beta Xi(J), so the bushy direction is annihilated while the chain direction remains. Here Xi(J) is a functional of the local fold jet J. For normalized step h and singular scale epsilon, the threshold displacement is lambda_RK - lambda_f = K_theta(J) h^2 epsilon^2 + o(h^2 epsilon^2), with the leading coefficient proportional to the chain defect.
Implementation notes
Integrate this mechanism at the neural-ODE solver used during inference or training whenever the prediction is an event value: for example, the parameter lambda at which a latent trajectory crosses a classifier surface, loses stability, reaches a terminal manifold, or changes attractor. Start with a two-stage explicit Runge-Kutta family. For each candidate tableau, compute c = A1, reject tableaux violating b^T1 = 1 or b^Tc = 1/2, and prefer tableaux satisfying b^TAc = 1/6. The forward update is: compute stage derivatives k_i = f_theta(z_n + h sum_j A_ij k_j, lambda), then set z_(n+1) = z_n + h sum_i b_i k_i. Estimate the event threshold by bisection over lambda, using step refinement or dense interpolation to locate the crossing. The paper supplies the cancellation law, but the fold-jet coefficient Xi(J) and the proportionality constant for a generic network must be estimated empirically. The first cheap experiment should use a two-dimensional hand-designed fast-slow neural ODE with a fold and a tunable separatrix. Compare explicit midpoint, Heun, Ralston, and a third-order method at matched function-evaluation budgets. For several epsilon values and step sizes h, measure event-threshold error against a very fine-step reference. The falsifiable prediction is that threshold bias divided by h^2 epsilon^2 is approximately linear in b^TAc - 1/6, while methods satisfying b^TAc = 1/6 have a strongly reduced leading coefficient. The linear slope should remain approximately constant across sufficiently small h and epsilon, with agreement within about 20 percent.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
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 7/10
Built a fast-slow fold event-threshold solver with midpoint, Heun, Ralston, a chain-canceling second-order tableau, and Kutta-3. All order-2 conditions were verified to numerical precision, and the proposed tableau had zero chain defect with nonzero bushy defect. It reduced threshold error by roughly 2.5x–10.3x versus midpoint at the finest tested step, while epsilon-scaled behavior was more stable, though the h²epsilon² asymptotic prediction was only partially confirmed.
- Agent confidence
- 7/10
- Baseline
- At h=0.005, midpoint absolute threshold errors were 3.65e-6, 1.11e-5, and 1.08e-5 for epsilon=0.05, 0.1, and 0.2; Heun errors were 6.68e-6, 1.67e-5, and 2.33e-5.
- Idea
- The chain-canceling method errors were 8.20e-7, 1.61e-6, and 4.01e-6 for epsilon=0.05, 0.1, and 0.2. Order-condition residual was 1.1e-16; cross-epsilon spread of the scaled coefficient was 1.48 versus 5.9–7.0 for two-stage baselines; chain-defect regression at epsilon=0.1 had R²=0.925.
Limitations: Only a hand-designed two-dimensional fold ODE was tested, not a trained neural ODE or classifier/separatrix event. The reference used scipy DOP853, the epsilon and step-size sweeps were small, and equal-function-evaluation comparisons or larger neural systems were not tested.
How to run: cd /home/maxwelhelp/all/math2nn/experiments/exp1784_canard-canceling-runge-kutta-neural-ode && /home/maxwelhelp/main/bin/python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.04304)
Ahead of the baseline (−6.9%) but not statistically significant (p=0.5262, wins 5 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rk_latent_shared_vector_field
- Paired seeds
- 8
- Baseline mean
- 0.0024
- Idea mean
- 0.0022
- Effect (Δ)
- -0.0002 (−6.9%; negative = idea better)
- Wins
- 5 / 8 paired seeds
- p-value
- 0.5262 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 6 configs
Tested only the built-in actuated-pendulum dynamics track, not a learned neural ODE with explicit event-threshold labels or a separatrix-crossing task. The signature measures substep prediction sensitivity rather than direct event-threshold error, and the eight-seed result was underpowered for the modest MSE difference.
How to run: cd /home/maxwelhelp/all/math2nn/experiments/exp1784_canard-canceling-runge-kutta-neural-ode && /home/maxwelhelp/main/bin/python3 bench_experiment.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 an end-to-end dynamics benchmark with identical learned latent vector fields and training conditions, differing only in the midpoint versus chain-canceling RK tableau. The idea reduced test MSE modestly and reduced trained-model one-versus-two-substep prediction sensitivity by 84.3%, confirming the mechanism signal. However, the paired permutation test was not significant (delta=-0.00016608, p=0.52615), so the benchmark-defined success criterion was not met.
- Baseline
- 8-seed test MSE mean 0.00239425146, std 0.00190510796; best lr=0.003, weight_decay=0.0001.
- Idea
- 8-seed test MSE mean 0.00222817557, std 0.00169414995; best lr=0.003, weight_decay=0.0; paired delta=-0.00016607589, p=0.52615, 5/8 wins.
- Mechanism
- Mean absolute prediction change from one to two substeps: baseline 0.00951840, idea 0.00149528, ratio 0.15709; confirmed=true.
Benchmark result
Ahead of the baseline (−6.9%) but not statistically significant (p=0.5262, wins 5 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rk_latent_shared_vector_field
- Paired seeds
- 8
- Baseline mean
- 0.0024
- Idea mean
- 0.0022
- Effect (Δ)
- -0.0002 (−6.9%; negative = idea better)
- Wins
- 5 / 8 paired seeds
- p-value
- 0.5262 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 6 configs
Tested only the built-in actuated-pendulum dynamics track, not a learned neural ODE with explicit event-threshold labels or a separatrix-crossing task. The signature measures substep prediction sensitivity rather than direct event-threshold error, and the eight-seed result was underpowered for the modest MSE difference.
How to run: cd /home/maxwelhelp/all/math2nn/experiments/exp1784_canard-canceling-runge-kutta-neural-ode && /home/maxwelhelp/main/bin/python3 bench_experiment.py
Artifacts
- bench_experiment.py 7.1 KB View Raw
- bench_report.json 6.2 KB View Raw
- experiment.py 4.3 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-31T210638.md 5.0 KB View
- results.json 6.2 KB View Raw