{
 "artifacts": [
  {
   "name": "bench_report.json",
   "url": "https://synthcore.org/code/1230/bench_report.json"
  },
  {
   "name": "koopman_mpc_experiment.py",
   "url": "https://synthcore.org/code/1230/koopman_mpc_experiment.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1230/report.md"
  },
  {
   "name": "report_bench_2026-09-03T132246.md",
   "url": "https://synthcore.org/code/1230/report_bench_2026-09-03T132246.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1230/results.json"
  },
  {
   "name": "stage2_bench.py",
   "url": "https://synthcore.org/code/1230/stage2_bench.py"
  }
 ],
 "category": "dynamics",
 "description": "Use the adapted linear latent model as a cheap receding-horizon planner or training-time controller around a nonlinear neural predictor. Optimize a short sequence of latent corrections with a quadratic objective, while constraining latent states and inputs to remain inside the region where the Koopman approximation has been identified and its transition spectrum is stable.",
 "download_zip": "https://synthcore.org/download/1230",
 "formulas_latex": [
  "$$z_{k+1}=Az_k+Bv_k,\\qquad Z=\\mathcal{A}z_0+\\mathcal{B}V.$$",
  "$$J(V,e)=\\sum_{k=0}^{N-1}\\left[(z_k-z_k^{\\star})^{\\top}Q(z_k-z_k^{\\star})+v_k^{\\top}Rv_k\\right]+(z_N-z_N^{\\star})^{\\top}Q_f(z_N-z_N^{\\star})+\\lambda_e\\|e\\|_2^2.$$",
  "$$\\|z_k-z_{\\mathrm{data},k}\\|_2\\leq\\delta,\\qquad \\|v_k\\|_2\\leq v_{\\max},\\qquad \\rho(A)\\leq r\u003c1.$$",
  "$$\\mathcal{A}=\\begin{bmatrix}A\\\\A^2\\\\\\vdots\\\\A^N\\end{bmatrix},\\qquad \\mathcal{B}=\\begin{bmatrix}0\u00260\u0026\\cdots\u00260\\\\B\u00260\u0026\\cdots\u00260\\\\AB\u0026B\u0026\\cdots\u00260\\\\\\vdots\u0026\\vdots\u0026\\ddots\u0026\\vdots\\end{bmatrix}.$$"
 ],
 "id": 3064,
 "implementation": "Integrate this module after the encoder and before the decoder of a neural world model, or attach it to the action head of an offline RL agent. At each timestep, encode the current observation into z_0, identify or refresh A and B from a recent replay-buffer window, and construct the stacked prediction matrices mathcal{A} and mathcal{B}. Solve the quadratic program for V=[v_0,...,v_{N-1}] with Q,Q_f positive semidefinite, R positive definite, bounded residuals, and a trust-region constraint around recently observed latent states. Apply only v_0, observe the next state, and repeat. For a pure predictor, make the residual correction additive: z_{t+1}=Az_t+Bv_t+f_theta(z_t), but constrain ||f_theta(z_t)||\u003c=epsilon using spectral normalization or clipping. The paper supplies the lifted linear rollout and condensed QP construction; estimate A, B, the trust radius delta, residual bound epsilon, and spectral radius from data. The first cheap experiment is a nonlinear pendulum or Lorenz forecasting task with a 20-step horizon. Compare unconstrained neural rollout, constrained rollout, and QP-guided rollout at equal parameter count. Sweep the spectral cap r and trust radius delta. The quantitative prediction is a sharp degradation when r crosses one, while enforcing r\u003c=0.95 should substantially reduce 100-step latent norm growth. Shrinking delta should lower extrapolation error until approximation bias dominates, producing a measurable U-shaped error curve.",
 "math_summary": "Let z_{k+1}=A z_k+B v_k be the adapted lifted dynamics, where z_k is a latent state and v_k is a control, residual, or steering input produced by the neural model. Over horizon N, stack states and controls as Z=mathcal{A}z_0+mathcal{B}V. Minimize a quadratic tracking objective with control cost and terminal slack. Here Q and Q_f are positive semidefinite state weights, R is positive definite, e is a terminal or model-mismatch slack, and mathcal{A} and mathcal{B} are the standard powers-of-A prediction matrices. In a neural rollout, v_k can be a bounded residual correction or gating signal. The trust region ||z_k-z_data,k||\u003c=delta and spectral condition rho(A)\u003c=r\u003c1 limit extrapolation and unstable surrogate behavior.",
 "math_tags": [
  "control-theory",
  "optimization",
  "dynamical-systems",
  "linear-algebra"
 ],
 "ml_areas": [
  "world-model",
  "rl",
  "ssm",
  "inference-speedup"
 ],
 "paper": {
  "arxiv_id": "2609.02534",
  "arxiv_url": "https://arxiv.org/abs/2609.02534",
  "summary_what_math_gives_to_ml": "The paper combines physics-informed observable lifting, finite-dimensional Koopman linearization, online adaptation, and receding-horizon quadratic programming for nonlinear attitude dynamics with abruptly changing inertia and disturbances. Its transferable asset is the mechanism of representing nonlinear dynamics in a lifted coordinate system whose evolution is approximately linear, then updating the lifted dynamics online when the data distribution changes. For neural sequence models and world models, this suggests a latent state-space architecture with explicit linear multi-step propagation, physics-inspired observables, and recursive adaptation of the latent transition operator. The key falsifiable signatures are a measurable spectral stability boundary for long rollouts and an adaptation time scale determined by the forgetting factor.",
  "title": "Physics-based Online Adaptive Koopman Model Predictive Attitude Control for Combined Spacecraft with Dynamic Uncertainties",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 7,
  "novelty": 7,
  "usefulness": 7
 },
 "solves": [
  "stability",
  "accuracy",
  "speedup"
 ],
 "title": "Koopman-MPC Trust Region for Neural Rollouts",
 "url": "https://synthcore.org/idea/3064/koopman-mpc-trust-region-for-neural-rollouts",
 "verification": {
  "benchmark": {
   "track": "dynamics",
   "model": "rnn_small",
   "n_seeds": 8,
   "metric_direction": "lower is better",
   "comparison": {
    "baseline_mean": 0.000024103710074996343,
    "idea_mean": 0.0000329756971950701,
    "delta_mean": 0.000008871987120073754,
    "per_seed_diffs": [
     -0.00001334670014330186,
     0.00001729820905893575,
     -0.0000013941644283477217,
     0.00001508946115791332,
     0.000014417350030271336,
     0.00001365860771329607,
     0.00002000341919483617,
     0.000005249714376986958
    ],
    "idea_wins": 2,
    "n_pairs": 8,
    "p_value": 0.06005,
    "mde": 0.000009478008368122907,
    "mde_rel_pct": 39.32178215981278,
    "verdict": "no significant win",
    "system_worked": false
   },
   "baseline": {
    "best_cfg": {
     "lr": 0.01,
     "weight_decay": 0
    },
    "sweep": [
     {
      "cfg": {
       "lr": 0.001,
       "weight_decay": 0
      },
      "mean": 0.0006648988055530936
     },
     {
      "cfg": {
       "lr": 0.003,
       "weight_decay": 0
      },
      "mean": 0.00014707197260577232
     },
     {
      "cfg": {
       "lr": 0.01,
       "weight_decay": 0
      },
      "mean": 0.00002476238842064049
     }
    ],
    "full": {
     "mean": 0.000024103710074996343,
     "std": 0.000009965204787101785,
     "per_seed": [
      0.0000482606228615623,
      0.000018373453713138588,
      0.000016678590327501297,
      0.00001573688678035978,
      0.00001862385761342011,
      0.000028347380066406913,
      0.000024800614482956007,
      0.000022008274754625745
     ],
     "n": 8
    }
   },
   "idea": {
    "mean": 0.0000329756971950701,
    "std": 0.00000853505931418874,
    "per_seed": [
     0.00003491392271826044,
     0.00003567166277207434,
     0.00001528442589915357,
     0.0000308263479382731,
     0.00003304120764369145,
     0.00004200598777970299,
     0.00004480403367483718,
     0.000027257989131612703
    ],
    "n": 8
   },
   "mechanism_signature": {
    "baseline": {
     "koopman_abs": 0.03589034453034401,
     "prediction_abs": 0.005701124202460051,
     "rho_capped": 0.9499999284744263,
     "rho_raw": 0.993781371389095
    },
    "confirmed": true,
    "idea": {
     "koopman_abs": 0.03153369948267937,
     "prediction_abs": 0.004197320435196161,
     "rho_capped": 0.9499999284744263,
     "rho_raw": 0.993781371389095
    },
    "predicted_effect": "spectral cap keeps fitted transition rho \u003c= 0.95 and lowers NN deviation from the fitted stable forecast"
   },
   "custom_track": null
  },
  "mechanism_confirmed": true,
  "peer_reviewed": false,
  "practical_verdict": "inconclusive",
  "stage1_mechanism_check": {
   "worked": true,
   "confidence": 7,
   "verdict": "Built a compact Koopman-MPC trust-region toy implementation for a nonlinear damped pendulum, including condensed prediction matrices, spectral-radius capping, bounded corrections, and trust-region projection. The condensed rollout identity was verified to numerical precision (max error 9.9e-10), and capping the fitted model at rho=0.95 reduced 100-step state growth from 1.45x to 0.0083x. In the fixed-seed forecasting test, the MPC version reduced mean 60-step error from 1.983 to 1.457 and predicted-state norm from 2.928 to 0.585, so this toy experiment shows a promising but potentially over-conservative effect.",
   "metrics": {
    "baseline": "Mean 60-step rollout error 1.9831; mean predicted norm 2.9284; unconstrained fitted-model 100-step growth 1.4544x.",
    "idea": "Mean 60-step rollout error 1.4572; mean predicted norm 0.5849; capped-model 100-step growth 0.00830x; condensed-matrix max error 9.93e-10. Trust-radius sweep errors for delta=[0.15,0.3,0.55,1.0,2.0] were [0.7994,0.8028,0.8028,0.8028,0.8028]."
   },
   "how_to_run": "python3 koopman_mpc_experiment.py",
   "files": [
    "koopman_mpc_experiment.py",
    "results.json"
   ],
   "limitations": "Only a small damped-pendulum toy system was tested, with a linear least-squares model in the observed two-dimensional state rather than a learned lifted latent representation. The controller uses a bounded first-step correction and radial trust-region projection, not a general-purpose inequality-constrained QP solver; no wall-clock speedup, action-conditioned B model, slack variable, spectral-cap sweep, or multi-seed statistical test was evaluated."
  },
  "status": "mech_ok_no_baseline",
  "status_label": "Mechanism confirmed, baseline not beaten",
  "updated_at": "2026-09-03T13:22:46",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)",
  "verification_axes": {
   "benchmark_mechanism": {
    "confirmed": true,
    "tested": true
   },
   "practical_benchmark": {
    "beats_baseline": false,
    "tested": true,
    "verdict": "inconclusive"
   },
   "toy_mechanism_gate": {
    "confirmed": true,
    "tested": true
   }
  }
 }
}
