# Defect-and-Jacobian Residual Dynamics

- ID: 1358
- Canonical URL: https://synthcore.org/idea/1358/defect-and-jacobian-residual-dynamics
- API JSON: https://synthcore.org/api/idea/1358.json
- API Markdown: https://synthcore.org/api/idea/1358.md
- Verification status: beats_baseline
- Source: [arXiv:2607.24345](https://arxiv.org/abs/2607.24345)
- Category: dynamics
- Solves: accuracy, speedup, stability
- ML areas: ssm, world-model, training, diffusion
- Math tags: pde, dynamical-systems, approximation-theory, spectral-theory
- Ratings: usefulness 8/10; difficulty 5/10; novelty 6/10

## Idea description

Replace full-state prediction in a neural simulator or neural operator with prediction of a perturbation around a cheap structured background trajectory. Compute the background defect and known linearized or nonlinear corrections explicitly, and let the neural closure model only the remaining residual. Add a residual-magnitude gate so the learned closure is suppressed when the structured solver already explains the target dynamics.

## Mathematical statement

The paper decomposes the full state as h(t)=h_bg(t)+h_tilde(t), where h_bg is a low-fidelity background state and h_tilde is the unresolved perturbation. For the Klein-Gordon system, u_t=v and v_t=u_xx-m sin(u), with spatial coordinate x, time t, and scalar parameter m. Writing u=u_bg+u_tilde gives u_tilde_t=v_tilde and v_tilde_t=u_tilde_xx-m u_tilde+R_bg-m[cos(u_bg)-1]u_tilde-m r_2, where R_bg=u_bg,xx-m sin(u_bg)-v_bg,t is the background defect and r_2=sin(u_bg+u_tilde)-sin(u_bg)-cos(u_bg)u_tilde is the Taylor remainder. The term -m u_tilde is a fixed linear operator, -m[cos(u_bg)-1]u_tilde is a background-dependent correction, and r_2 is the unresolved nonlinear remainder. For a general known dynamical system partial_t h=F(h), use R_bg=F(h_bg)-partial_t h_bg, a chosen Jacobian or linear operator J_bg, and train a closure N_theta for the nonlinear remainder: partial_t h_tilde=J_bg h_tilde+R_bg+N_theta(h_bg,h_tilde).

## Key formulas

- $$h(t)=h_{\mathrm{bg}}(t)+\widetilde{h}(t).$$
- $$u_t=v,\qquad v_t=u_{xx}-m\sin u.$$
- $$\widetilde{u}_t=\widetilde{v},\qquad \widetilde{v}_t=\widetilde{u}_{xx}-m\widetilde{u}+R_{\mathrm{bg}}-m[\cos(u_{\mathrm{bg}})-1]\widetilde{u}-m r_2,$$ $$R_{\mathrm{bg}}=u_{\mathrm{bg},xx}-m\sin(u_{\mathrm{bg}})-v_{\mathrm{bg},t},\qquad r_2=\sin(u_{\mathrm{bg}}+\widetilde{u})-\sin(u_{\mathrm{bg}})-\cos(u_{\mathrm{bg}})\widetilde{u}.$$
- $$\partial_t h=F(h),\qquad \partial_t\widetilde h=J_{\mathrm{bg}}\widetilde h+R_{\mathrm{bg}}+N_\theta(h_{\mathrm{bg}},\widetilde h),\quad R_{\mathrm{bg}}=F(h_{\mathrm{bg}})-\partial_t h_{\mathrm{bg}}.$$

## Implementation notes

(1) Integration point: use this transition rule inside a neural PDE solver, latent world model, or continuous-time state-space model. Maintain a cheap background state h_bg at every step using a coarse finite-difference, spectral, linear, or low-resolution neural solver. Maintain the perturbation h_tilde=h-h_bg, and make the network predict only the unresolved derivative or next-step perturbation. A concrete first implementation is the one-dimensional periodic Klein-Gordon system, with FFT evaluation of u_xx and an Euler or RK2 background integrator. (2) Pseudocode: `bg_next = background_step(bg, dt)`; `defect = F(bg) - bg_derivative`; `linear_u = residual_v`; `linear_v = laplacian(residual_u) - m*residual_u`; `correction_v = -m*(cos(bg_u)-1)*residual_u`; `closure = net(concat(bg, residual, defect))`; `gate = sigmoid(a*(log(norm(defect)+eps)-b))`; `residual_derivative = linear + defect + correction + gate*closure`; `residual_next = integrator(residual, residual_derivative, dt)`; `state_next = bg_next + residual_next`. (3) Compute FFT derivatives, the background defect, and the Jacobian correction analytically. Estimate only normalization statistics and gate parameters a and b from training data. Train with state and derivative losses, such as `||state_pred-state_true||_2^2 + lambda*||residual_derivative-residual_derivative_true||_2^2`, plus a small penalty on closure energy when the defect norm is small. (4) First experiment: train a small Fourier neural operator or four-layer CNN on one-dimensional Klein-Gordon trajectories. Compare full-state prediction against the perturbative model at equal parameter count and FLOPs, sweeping background resolution from very coarse to nearly exact. Measure one-step error, long-horizon rollout error, training loss versus optimizer steps, and closure norm versus background accuracy. Success means lower rollout error or faster loss descent at equal compute, with the closure norm decreasing as background resolution improves. Falsification is a neutral or negative result for all background resolutions, or instability caused by the residual integration.

## Verification

- Status: beats_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: helps
- Verdict: Built and ran a gated defect/Jacobian residual dynamics module for a reduced Klein–Gordon oscillator. The residual identity error was 0, the Taylor remainder log-log slope was 2.003 versus the predicted 2, its quadratic coefficient was 0.33345 versus 0.33343, and the gate midpoint/slope were 0.08035/3.000 versus predicted 0.08000/3. The residual model also improved one-step RMSE from 0.02396 to 0.01416 and 60-step rollout RMSE from 0.37699 to 0.24086, so the mechanism manifested in this toy test.

### Mechanism check

- Verdict: Built and ran a gated defect/Jacobian residual dynamics module for a reduced Klein–Gordon oscillator. The residual identity error was 0, the Taylor remainder log-log slope was 2.003 versus the predicted 2, its quadratic coefficient was 0.33345 versus 0.33343, and the gate midpoint/slope were 0.08035/3.000 versus predicted 0.08000/3. The residual model also improved one-step RMSE from 0.02396 to 0.01416 and 60-step rollout RMSE from 0.37699 to 0.24086, so the mechanism manifested in this toy test.
- Confidence: 8/10
- Limitations: This is a single Fourier-mode/reduced Klein–Gordon toy rather than a spatial PDE with FFT derivatives or a resolution sweep. It uses one fixed random seed, a small MLP, short training, and does not establish scaling, FLOP parity, or gains on a neural operator or high-dimensional simulator.

### Practical benchmark

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

## Artifacts

- [bench_experiment.py](https://synthcore.org/code/360/bench_experiment.py)
- [bench_report.json](https://synthcore.org/code/360/bench_report.json)
- [experiment.py](https://synthcore.org/code/360/experiment.py)
- [report.md](https://synthcore.org/code/360/report.md)
- [report_bench_2026-08-31T092200.md](https://synthcore.org/code/360/report_bench_2026-08-31T092200.md)
- [results.json](https://synthcore.org/code/360/results.json)
- [Download all files as ZIP](https://synthcore.org/download/360)

## Disclaimer

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