deep koopman
**Deep Koopman** methods are a **data-driven approach to nonlinear dynamical systems that uses deep neural networks to discover a nonlinear embedding of the system state in which the dynamics become globally linear — enabling linear prediction, analysis, and control of complex nonlinear systems through the mathematical framework of Koopman operator theory** — transforming intractable nonlinear control problems into tractable linear ones by lifting the state into a high-dimensional observable space where the evolution of the system is described by a linear operator.
**What Is the Koopman Operator?**
- **Mathematical Foundation**: The Koopman operator K is an infinite-dimensional linear operator that acts on observable functions g(x) of the system state x, propagating them forward in time: (K g)(x) = g(f(x)) where f is the nonlinear flow map.
- **Key Insight**: Although f is nonlinear, K is linear — if we work in the space of observables (functions of state) rather than in state space, the dynamics are linear.
- **Eigenfunctions**: The Koopman operator has eigenfunctions φ_i(x) such that K φ_i = λ_i φ_i — these eigenfunctions evolve linearly: φ_i(x_{t+1}) = λ_i φ_i(x_t).
- **Finite Approximation**: In practice, Deep Koopman learns a finite-dimensional basis of observables (the embedding) that approximately linearizes the dynamics — enabling linear algebra over what was a nonlinear system.
**Why Deep Koopman Matters**
- **Linear Control Theory on Nonlinear Systems**: Once dynamics are linear in the observable space, all classical linear control tools (LQR, Kalman filters, PID, eigenvalue placement) become applicable to fundamentally nonlinear systems.
- **Global vs. Local Linearization**: Traditional linearization (Taylor expansion) only works near an operating point. Koopman methods aim for globally linear representations — valid across the full state space.
- **Physics-Informed Representation**: The learned embedding encodes system structure, not just fitting observations — making models more generalizable to new conditions.
- **Long-Horizon Prediction**: Linear dynamics enable efficient, exact long-horizon predictions via matrix exponentiation — avoiding the compounding errors of iterative nonlinear rolling.
- **Interpretability**: Koopman eigenfunctions reveal the natural modes of the dynamical system — analogous to Fourier modes for vibration or PCA modes for variability.
**Deep Koopman Architecture**
| Component | Role | Implementation |
|-----------|------|---------------|
| **Encoder Network** | Maps state x to observable embedding g(x) | Deep MLP or CNN |
| **Koopman Matrix K** | Linear dynamics in observable space | Learned matrix (N × N) |
| **Decoder Network** | Maps embedding back to state (for training) | MLP, optional |
| **Auxiliary Predictor** | Predicts reward/output from embedding | Linear layer |
Training objectives typically combine: (1) prediction error in observable space, (2) reconstruction accuracy back to state, (3) linearity enforcement (K should evolve the embedding faithfully).
**Applications**
- **Fluid Dynamics**: Koopman decompositions of turbulent flows — identifying dominant coherent structures (like von Kármán vortex shedding modes).
- **Robotics**: Learning approximate linear models of legged robots for fast MPC computation — deep Koopman models enable real-time nonlinear locomotion control.
- **Power Systems**: Linearizing stable manifolds of power grids for transient stability analysis.
- **Molecular Dynamics**: Identifying slow collective variables (reaction coordinates) in protein folding — deep Koopman reveals the slow dynamics of complex molecular systems.
- **Neuroscience**: Finding linear patterns in neural population dynamics.
Deep Koopman methods are **the bridge between data-driven machine learning and classical dynamical systems theory** — promising a future where the full toolkit of linear analysis and control can be applied to any complex nonlinear system simply by learning the right embedding from data.