✓✓ Beats tuned baseline 2026

Online Taylor Residual World Model

Implementation & benchmark of arXiv:2609.03351 — Taylor-Informed Predictive Cost Adaptive Control for Quadrotors with Online Gravity-Trim Adaptation

Usefulness8/10
Difficulty5/10
Novelty6/10

Source paper: Taylor-Informed Predictive Cost Adaptive Control for Quadrotors with Online Gravity-Trim Adaptation arXiv:2609.03351 ⓘ · analyzed Sep 4, 2026

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

Idea description

Augment a neural dynamics model with a sparse local Taylor residual whose coefficients are updated online by recursive least squares. Use the neural model for global behavior and the Taylor model for short-horizon prediction, where local adaptation can correct payload, friction, actuator, or environment changes without retraining the network.

Formulas

$$\dot p=v,\qquad m\dot v=-mge_3+fRe_3,\qquad \dot R=R\omega^{\times},\qquad J\dot\omega=-\omega^{\times}J\omega+\tau.$$
$$\phi_r(z)=\left[1,\{z_i\}_{|\alpha|=1},\{z^{\alpha}\}_{2\leq |\alpha|\leq r}\right]^{\top},\qquad z=\begin{bmatrix}x-x_0\\u-u_0\end{bmatrix}.$$
$$\hat{x}_{k+1}=\hat{F}_{\theta}(x_k,u_k)+W_k\phi_r(z_k),\qquad A_k=\left.\frac{\partial\hat{x}_{k+1}}{\partial x_k}\right|_{(x_0,u_0)},\qquad B_k=\left.\frac{\partial\hat{x}_{k+1}}{\partial u_k}\right|_{(x_0,u_0)}.$$
$$K_k=\frac{P_{k-1}\phi_k}{\lambda_k+\phi_k^{\top}P_{k-1}\phi_k},\qquad W_k=W_{k-1}+K_k\left(y_k-W_{k-1}\phi_k\right)^{\top},\qquad P_k=\frac{P_{k-1}-K_k\phi_k^{\top}P_{k-1}}{\lambda_k}.$$

Mathematical statement

For observed transitions $x_{k+1}=F(x_k,u_k)+\epsilon_k$, define deviations $\delta x=x-x_0$ and $\delta u=u-u_0$ around an operating point $(x_0,u_0)$. Let $z=[\delta x^\top,\delta u^\top]^\top$ and let $\phi_r(z)$ contain every monomial of total degree at most $r$. The local residual model is $\hat{x}_{k+1}=\hat{F}_{\theta}(x_k,u_k)+W_k\phi_r(z_k)$, where $\hat{F}_{\theta}$ is a neural predictor and $W_k$ is an online coefficient matrix. For each output row, recursive least squares uses covariance $P_k$, coefficient row $w_k$, forgetting factor $\lambda_k\in(0,1]$, gain $K_k$, and residual target $y_k=x_{k+1}-\hat{F}_{\theta}(x_k,u_k)$. The paper's horizon approximation freezes the local Jacobian $A_k$ and input matrix $B_k$ during an $H$-step rollout. The mechanism is time-scale separation: fast local adaptation handles mismatch while the neural model remains a slow global prior.

Implementation notes

1. Integration point: attach this module to a pretrained neural dynamics model used by a Dyna agent, MPC planner, or trajectory optimizer. Initially freeze the neural parameters. Maintain an operating point $(x_0,u_0)$, construct monomials through degree $r=1$, $2$, or $3$, and maintain one RLS covariance and coefficient matrix per output dimension. 2. Pseudocode: observe $(x_k,u_k,x_{k+1})$; compute $z_k=[x_k-x_0,u_k-u_0]$ and $\phi_k=\phi_r(z_k)$; calculate residual target $y_k=x_{k+1}-\hat{F}_{\theta}(x_k,u_k)$; apply the displayed RLS update; predict with $\hat{F}_{\theta}+W_k\phi_r$; calculate $A_k$ and $B_k$ by automatic differentiation; freeze them for the next $H$ planning steps; recenter $(x_0,u_0)$ when $\|z_k\|$ exceeds a threshold. 3. Computed directly: monomials, RLS gains, covariance, and Jacobians. Estimated empirically: the forgetting schedule, covariance initialization, recentering threshold, and useful Taylor order. 4. First cheap experiment: train a small MLP world model on CartPole or Pendulum, then inject an abrupt mass or actuator-scale change. Compare neural-only, order-1, order-2, and order-3 residual models inside an MPC controller with horizon $H=10$. Measure one-step error, ten-step error, rollout divergence, and recovery time. The quantitative prediction is that effective adaptation memory is approximately $N_{\mathrm{eff}}\approx1/(1-\lambda)$: recovery time should scale with this quantity, while stationary variance should increase as $\lambda$ decreases. Degree two should reduce local multi-step error over degree one only within a neighborhood where its quadratic term exceeds measurement noise; degree three should help only in a smaller, sufficiently excited neighborhood.

Verification

Beats tuned baseline

Stage 1 · Toy mechanism gate: Passed ✓

Stage 2 · Mechanism transferred to benchmark: Confirmed ✓

Stage 2 · Practical benchmark result: Significant win ✓

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 an online Taylor residual world-model module with explicit monomial features and recursive least squares updates. RLS matched batch least squares closely, and the forgetting-factor test showed faster recovery for lower lambda at the cost of higher variance. In the frozen-MLP toy dynamics experiment, residual adaptation substantially improved one-step and 10-step errors; degree 3 performed best in this smooth setting, but this is not evidence of an MPC or real-world control win.

Agent confidence
8/10
Baseline
Frozen MLP: one-step MAE 0.2046, early post-shift MAE 0.2618, 10-step rollout MAE 0.6165
Idea
Degree 1: 0.0495 / 0.0655 / 0.1436; degree 2: 0.0331 / 0.0428 / 0.1103; degree 3: 0.0230 / 0.0282 / 0.0770 for one-step / early post-shift / 10-step MAE. Forgetting test: lambda=0.90 recovered at step 49 versus 150 for lambda=0.99, with post-adaptation standard deviation 0.0154 versus 0.0024.

Limitations: Only a small deterministic 1D synthetic system was tested, with a frozen scikit-learn MLP and random open-loop inputs. No CartPole/Pendulum benchmark, MPC controller, GPU implementation, recentering logic, multi-output physical model, measurement-noise sweep, or repeated-seed statistical comparison was tested.

How to run: python3 online_taylor_experiment.py

Stage 2 — Benchmark vs. tuned baseline (arXiv:2609.03351)

Beats the tuned baseline by 98.2% (p=0.0047, wins 8 / 8 paired seeds; metric: lower is better).

Benchmark
Dynamics forecasting
Model
rnn_small
Paired seeds
8
Baseline mean
0.0454
Idea mean
0.0008
Effect (Δ)
-0.0446 (−98.2%; negative = idea better)
Wins
8 / 8 paired seeds
p-value
0.0047 (permutation test, 20 000 shuffles)
Smallest detectable effect
±23.1%
Mechanism
Confirmed ✓
Practical effect
Helps
Baseline tuning
swept over 3 configs
Limitations:

Only the registered dynamics track was tested. The adaptation pass used observed training transitions offline rather than a live online deployment or MPC loop; abrupt distribution shifts, measurement-noise sweeps, recentering, higher Taylor orders, and latency were not tested.

How to run: python3 stage2_bench.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Stage 2 — Benchmark latest Worked ✓

Agent confidence: 8/10

Implemented a matched rnn_small dynamics system with an online degree-1 Taylor residual updated by recursive least squares. The idea achieved significantly lower test MSE than the tuned neural-only baseline across all 8 paired seeds. The mechanism signature measured on trained benchmark models confirmed the expected local residual correction effect, though the test used offline adaptation over observed training transitions rather than a live MPC deployment.

Baseline
Tuned rnn_small, lr=0.006: mean test MSE 0.04543822933919728, std 0.014322681353099428
Idea
Matched rnn_small plus Taylor/RLS residual, lr=0.006, lambda=0.995, p0=10: mean test MSE 0.0008183727071746211, std 0.0005857487704347297; paired delta -0.044619856632022656, 8/8 wins, permutation p=0.00475

Benchmark result

Beats the tuned baseline by 98.2% (p=0.0047, wins 8 / 8 paired seeds; metric: lower is better).

Benchmark
Dynamics forecasting
Model
rnn_small
Paired seeds
8
Baseline mean
0.0454
Idea mean
0.0008
Effect (Δ)
-0.0446 (−98.2%; negative = idea better)
Wins
8 / 8 paired seeds
p-value
0.0047 (permutation test, 20 000 shuffles)
Smallest detectable effect
±23.1%
Mechanism
Confirmed ✓
Practical effect
Helps
Baseline tuning
swept over 3 configs
Limitations:

Only the registered dynamics track was tested. The adaptation pass used observed training transitions offline rather than a live online deployment or MPC loop; abrupt distribution shifts, measurement-noise sweeps, recentering, higher Taylor orders, and latency were not tested.

How to run: python3 stage2_bench.py

Artifacts

Implementation overview ⬇ Download all as ZIP 6 files · code, reports and structured results