# Weak Koopman Latent Dynamics

- ID: 1425
- Canonical URL: https://synthcore.org/idea/1425/weak-koopman-latent-dynamics
- API JSON: https://synthcore.org/api/idea/1425.json
- API Markdown: https://synthcore.org/api/idea/1425.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.25950](https://arxiv.org/abs/2607.25950)
- Category: dynamics
- Solves: stability, accuracy, generalization
- ML areas: ssm, rnn, world-model, training-dynamics, regularization
- Math tags: dynamical-systems, functional-analysis, linear-algebra, statistics, numerical-analysis
- Ratings: usefulness 8/10; difficulty 5/10; novelty 7/10

## Idea description

Replace noisy pointwise derivative matching in a neural state-space model with a weak-form Koopman-generator residual. An encoder maps observations to latent observables, while a learned matrix generator propagates those observables. Integration by parts removes the need to differentiate noisy trajectories and provides a controllable noise-averaging mechanism.

## Mathematical statement

For a dynamical system \(\dot{x}=f(x)\) and observable \(g(x)\), the Koopman generator is \(\mathcal{L}g=f(x)\cdot\nabla g(x)\), with \(\frac{d}{dt}g(x(t))=\mathcal{L}g(x(t))\). For a smooth test function \(\psi(t)\) vanishing at both endpoints of \([a,b]\), integration by parts gives \(\int_a^b\psi(t)\mathcal{L}g(x(t))dt=-\int_a^b\psi'(t)g(x(t))dt\). For latent observables \(z(t)=E_\theta(x(t))\in\mathbb{R}^d\), define \(G_{j\ell}=\int\psi_j(t)z_\ell(t)dt\) and \(B_{j\ell}=-\int\psi_j'(t)z_\ell(t)dt\). Fit a latent generator \(A\in\mathbb{R}^{d\times d}\) through \(B\approx GA^\top\). With independent observation noise of variance \(\sigma^2\), the variance of a discrete weak estimate is \(\sigma^2\sum_i(w'_{j,i})^2\), whereas a forward finite difference has variance \(2\sigma^2/\Delta t^2\).

## Key formulas

- $$\mathcal{L}g(x)=f(x)\cdot\nabla g(x),\qquad \frac{d}{dt}g(x(t))=\mathcal{L}g(x(t)).$$
- $$\int_a^b\psi_j(t)\mathcal{L}g(x(t))\,dt=-\int_a^b\psi_j'(t)g(x(t))\,dt,\qquad \psi_j(a)=\psi_j(b)=0.$$
- $$G_{j\ell}=\int_a^b\psi_j(t)z_\ell(t)\,dt,\qquad B_{j\ell}=-\int_a^b\psi_j'(t)z_\ell(t)\,dt,\qquad A=\operatorname*{arg\,min}_A\|B-GA^\top\|_F^2.$$
- $$\operatorname{Var}(\widehat{B}_j^{\mathrm{noise}})=\sigma^2\sum_i(w'_{j,i})^2,\qquad \operatorname{Var}\left(\frac{\epsilon_{i+1}-\epsilon_i}{\Delta t}\right)=\frac{2\sigma^2}{\Delta t^2}.$$

## Implementation notes

1. Exact integration point: use this as the dynamics module of a neural ODE, recurrent state-space model, or world model. Let an encoder \(E_\theta\) map each noisy observation \(x_i\) to \(z_i\in\mathbb{R}^d\), and optionally use a decoder to reconstruct observations. Sample trajectory windows and use compactly supported Hann or cubic B-spline test functions \(\psi_j\). 2. Pseudocode: compute \(z_i=E_\theta(x_i)\); compute \(G[j,:]=\sum_iq_i\psi_j(t_i)z_i\) and \(B[j,:]=-\sum_iq_i\psi'_j(t_i)z_i\); solve the ridge generator update \(A^\top=(G^\top G+\lambda I)^{-1}G^\top B\); minimize \(L=L_{\mathrm{recon}}+\alpha\|B-GA^\top\|_F^2+\beta\sum_i\|z_{i+1}-\exp(\Delta tA)z_i\|^2\). Alternate between solving for \(A\) and updating encoder parameters, or differentiate through the ridge solution. Forecast with \(z_{t+k\Delta t}=\exp(k\Delta tA)z_t\). 3. Computed from the paper: the weak identity, quadrature construction, and generator regression. Estimated empirically: encoder parameters, generator dimension, window width, noise variance, and test-function family. For a stable latent model, monitor the spectral abscissa \(\alpha(A)=\max_i\operatorname{Re}\lambda_i(A)\) and reject or project updates with \(\alpha(A)>0\), unless the physical system is known to be unstable. 4. First cheap experiment: use noisy Lorenz-63 or damped-pendulum trajectories, an MLP encoder with latent dimension \(d=8\), and compare finite-difference derivative loss, ordinary EDMD, and weak-form loss at noise levels \(\sigma\in\{0,0.05,0.1,0.2\}\). For each test-function width, estimate the residual variance over repeated noisy trajectories. The quantitative prediction is that weak residual variance matches \(\sigma^2\sum_i(w'_{j,i})^2\) within 20 percent, while finite-difference variance scales as \(2\sigma^2/\Delta t^2\) and increases as sampling becomes finer. The method is falsified if this scaling fails or if weak-form training does not reduce multi-step forecast error at nonzero noise.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: no_effect
- Verdict: Built a reproducible weak Koopman generator MVP with Hann test functions, quadrature-based G/B construction, integration-by-parts verification, analytic noise-variance predictions, and a finite-difference baseline. The weak identity error was 1.13e-6; measured weak and finite-difference noise variances matched theory within about 2.3%, with scaling slopes weak-vs-dt=+1.000, finite-difference-vs-dt=-1.999, and weak-vs-window=-0.995. In the oscillator generator fit at sigma=0.15, weak regression error was 0.223 versus 0.408 for finite differences, a 45.4% reduction, so the proposed noise-averaging mechanism manifested clearly in this toy setting.

### Mechanism check

- Verdict: Built a reproducible weak Koopman generator MVP with Hann test functions, quadrature-based G/B construction, integration-by-parts verification, analytic noise-variance predictions, and a finite-difference baseline. The weak identity error was 1.13e-6; measured weak and finite-difference noise variances matched theory within about 2.3%, with scaling slopes weak-vs-dt=+1.000, finite-difference-vs-dt=-1.999, and weak-vs-window=-0.995. In the oscillator generator fit at sigma=0.15, weak regression error was 0.223 versus 0.408 for finite differences, a 45.4% reduction, so the proposed noise-averaging mechanism manifested clearly in this toy setting.
- Confidence: 9/10
- Limitations: This is a small linear oscillator experiment with directly observed two-dimensional observables, not a learned neural encoder or Lorenz-63/world-model task. It does not test decoder reconstruction, nonlinear latent representations, multi-step forecasting, stability projection, correlated or colored noise, or computational cost at neural-network scale.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.969
- Paired wins: 4/8
- Benchmark verdict: no measurable effect

## Artifacts

- [bench_report.json](https://synthcore.org/code/365/bench_report.json)
- [bench_weak_koopman.py](https://synthcore.org/code/365/bench_weak_koopman.py)
- [report.md](https://synthcore.org/code/365/report.md)
- [report_bench_2026-08-31T093845.md](https://synthcore.org/code/365/report_bench_2026-08-31T093845.md)
- [results.json](https://synthcore.org/code/365/results.json)
- [weak_koopman_experiment.py](https://synthcore.org/code/365/weak_koopman_experiment.py)
- [Download all files as ZIP](https://synthcore.org/download/365)

## Disclaimer

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