Adaptive Physics-Lifted Koopman State Space
Implementation & benchmark of arXiv:2609.02534 — Physics-based Online Adaptive Koopman Model Predictive Attitude Control for Combined Spacecraft with Dynamic Uncertainties
Source paper: Physics-based Online Adaptive Koopman Model Predictive Attitude Control for Combined Spacecraft with Dynamic Uncertainties arXiv:2609.02534 ⓘ · analyzed Sep 3, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace a purely nonlinear recurrent transition with a learned observable map followed by an explicitly linear latent evolution model. Include the original latent state and a small set of nonlinear observables, and update the linear transition online with forgetting-factor recursive least squares when the environment or task dynamics change.
Formulas
Mathematical statement
Let x_t be the encoder state, u_t an optional action or conditioning input, and phi(x_t) a learned or hand-designed observable vector. Define the lifted state z_t=[x_t^T,phi(x_t)^T]^T. The Koopman-inspired model is z_{t+1}=A_t z_t+B_t u_t+epsilon_t, with prediction x_hat_{t+1}=C z_{t+1}, where C selects or decodes the physical state. Estimate A_t and B_t by exponentially weighted least squares with forgetting factor lambda in (0,1]. For discrete-time rollout stability, impose or monitor rho(A_t)<=r<1 after removing known marginal modes; rho is the spectral radius and r is a chosen contraction margin. The adaptation time scale is approximately 1/(1-lambda), while a stable latent component decays geometrically as ||A_t^k|| approximately bounded by K r^k.
Implementation notes
Use this as the transition module of a compact recurrent state-space model or world model. First encode an observation into x_t=E_psi(o_t), compute z_t=[x_t,phi_eta(x_t)], and predict future states through the linear recurrence z_{t+j+1}=A_t z_{t+j}+B_t u_{t+j}; decode with D_xi. Begin with fixed random Fourier features, polynomial features, or a small two-layer MLP for phi_eta, and train E_psi, D_xi, and phi_eta using one-step and multi-step reconstruction losses. During evaluation, freeze the neural maps and update Theta=[A,B] using the recursive least-squares equations above on every newly observed transition, with P_0=alpha^{-1}I. After each update, estimate the largest eigenvalue of A. If rho(A)>r, project eigenvalues outside radius r back to r exp(i arg(mu)), or reject the update and use a damped update. Compute RLS online; estimate residual covariance and spectral radius empirically. The first cheap test is a small CartPole, pendulum, or synthetic nonlinear oscillator dataset with an abrupt mass or force change at the midpoint. Compare a GRU and standard neural SSM against the lifted model for 50-step prediction. The predicted signature is that after the shift, prediction error falls approximately exponentially with an adaptation horizon near 1/(1-lambda); for rho(A)<1, rollout error should decay or saturate, whereas allowing rho(A)>1 should produce an abrupt long-horizon divergence boundary. Sweep transition scaling and verify that measured divergence begins within roughly 20 percent of the predicted rho(A)=1 threshold.
Verification
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 adaptive lifted Koopman-style transition using [x,x^2] observables and forgetting-factor RLS, with numerical stability and adaptation checks. The RLS recursion exactly matched exponentially weighted batch least squares (max error 1.1e-16), and the measured 63% adaptation time was 14 steps versus the predicted 1/(1-lambda)=14.29. After the dynamics shift, adaptive lifting achieved RMSE 0.0235 in the first 20 steps and 8.28e-5 in the last 100, versus 0.0277 and 0.00379 for adaptive linear; its 50-step rollout MSE was 0.000203 versus 0.00438 frozen. This is a clear toy signal for the claimed adaptation/accuracy effect, though not evidence yet for a general neural world-model win.
- Agent confidence
- 8/10
- Baseline
- Adaptive linear lambda=0.95: post-shift RMSE first20=0.027690, last100=0.003789; frozen lifted 50-step post-shift rollout MSE=0.004381
- Idea
- Adaptive lifted [x,x^2] lambda=0.95: post-shift RMSE first20=0.023485, last100=0.0000828; 50-step rollout MSE=0.000203; max measured lifted spectral radius=0.928
- Math
- RLS-vs-batch max absolute error=1.11e-16; lambda=0.93 predicted adaptation timescale=14.286, measured 63% timescale=14; scalar rho=0.8 power-29=0.001547
Limitations: Only a deterministic scalar nonlinear synthetic system was tested. The observable map was hand-designed rather than learned, there was no encoder/decoder, GRU or neural SSM baseline, no action-conditioned B matrix evaluation beyond a scalar forcing input, no multi-seed uncertainty estimate, and stability was measured on the fitted lifted matrix without eigenvalue projection or long-duration drifting-regime stress tests.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2609.02534)
Beats the tuned baseline by 63.9% (p=0.0231, wins 7 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0007
- Idea mean
- 0.0002
- Effect (Δ)
- -0.0004 (−63.9%; negative = idea better)
- Wins
- 7 / 8 paired seeds
- p-value
- 0.0231 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
Only the built-in actuated pendulum dynamics track was tested. Explicit online forgetting-factor RLS updates during benchmark evaluation, long-horizon rollout scoring, real-world dynamics, CartPole, eigenvalue-by-eigenvalue projection, and a learned nonlinear observable MLP sweep 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 and evaluated a learned quadratic Koopman lift with a spectrally bounded linear controlled transition on the structurally matched dynamics track against the standard rnn_small GRU. Across 8 paired seeds, the idea achieved MSE 0.0002450490 versus 0.0006787698 for the tuned baseline, with paired delta -0.0004337208, 7/8 wins, and permutation p=0.0231, meeting the significant-win criterion. The trained-model signature confirmed contraction: observed late rollout norm ratio 0.8156 versus trained A spectral radius 0.7978.
- Baseline
- rnn_small GRU; best lr=0.01 from sweep; 8-seed mean MSE=0.0006787698, std=0.0001831161
- Idea
- Learned [h,h^2] Koopman transition with spectral contraction; best lr=0.01; 8-seed mean MSE=0.0002450490, std=0.0001979633
- Math check
- RLS versus exponentially weighted batch least squares max absolute error=5.55e-17; predicted forgetting timescale=14.2857 steps
- Mechanism signature
- trained A spectral radius=0.7977779; observed mean final-three norm ratio=0.8155919; confirmed=true
- Paired comparison
- delta_mean=-0.0004337208; idea_wins=7/8; permutation_p_value=0.0231
Benchmark result
Beats the tuned baseline by 63.9% (p=0.0231, wins 7 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0007
- Idea mean
- 0.0002
- Effect (Δ)
- -0.0004 (−63.9%; negative = idea better)
- Wins
- 7 / 8 paired seeds
- p-value
- 0.0231 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
Only the built-in actuated pendulum dynamics track was tested. Explicit online forgetting-factor RLS updates during benchmark evaluation, long-horizon rollout scoring, real-world dynamics, CartPole, eigenvalue-by-eigenvalue projection, and a learned nonlinear observable MLP sweep were not tested.
How to run: python3 stage2_bench.py
Artifacts
- bench_report.json 3.9 KB View Raw
- experiment.py 4.1 KB View Raw
- report.md 1.9 KB View
- report_bench_2026-09-03T121411.md 3.5 KB View
- results.json 2.0 KB View Raw
- stage2_bench.py 4.6 KB View Raw