Forecasting Sequential Data Using Consistent Koopman Autoencoders

Omri Azencot, N. Benjamin Erichson, Vanessa Lin, Michael W. Mahoney

Forecasting complex sequential data, such as weather patterns or fluid dynamics, is traditionally handled by Recurrent Neural Networks (RNNs). However, RNNs often struggle with vanishing or exploding gradients and typically ignore the underlying physical laws governing the systems they model. This paper introduces the Consistent Koopman Autoencoder, a physics-constrained deep learning model designed to forecast complex nonlinear dynamics by learning a linear latent representation. By enforcing mathematical consistency between forward and backward time evolution, the model achieves superior stability and accuracy, particularly in noisy environments and over long prediction horizons.

The Challenge of Nonlinear Dynamics

An alternative to standard RNNs is Koopman theory, which posits that any nonlinear dynamical system can be represented as a linear system if mapped into a sufficiently high-dimensional functional space. Recent "Koopman Autoencoders" use neural networks to discover this mapping. However, they typically only model forward in time. This unidirectional approach often yields models that are numerically unstable or fail to capture the inherent time-reversibility present in many physical systems.

A Physics-Constrained Architecture

To address these limitations, the authors propose a Physics Constrained Learning (PCL) framework.

Consistent Koopman Autoencoder Architecture

The architecture consists of:

  1. Encoder/Decoder: A standard autoencoder maps high-dimensional input data into a low-dimensional latent space.
  2. Linear Dynamics: Within the latent space, dynamics are governed by two linear matrices: $C$ (the forward Koopman operator) and $D$ (the backward Koopman operator).
  3. Consistency Loss: This is the core innovation. Instead of merely requiring $D$ to be the inverse of $C$, the authors derive a sophisticated penalty based on discrete-space Koopman theory. This loss encourages the forward and backward paths to be mathematically consistent across different scales of the latent representation.

The total training loss balances reconstruction accuracy, forward prediction error, backward prediction error, and this novel consistency penalty.

Key Insights: Stability via Consistency

By forcing the model to learn how to go backward in time as effectively as it goes forward, the authors provide a powerful "physics prior" that regularizes the network.

Eigenvalue stability comparison

Traditional Koopman models often suffer from eigenvalues that "explode" (modulus > 1), leading to diverging forecasts over time. The consistency loss naturally pushes the eigenvalues toward the unit circle, promoting "quasi-stable" models that do not blow up over long horizons. Furthermore, the authors prove that the condition for consistency in a discrete, sampled space is more complex than in a continuous one, leading directly to their hierarchical Frobenius norm penalty.

Experimental Results

The model was evaluated on four distinct dynamical systems: a nonlinear pendulum, fluid flow past a cylinder, vortex flow on a sphere, and real-world Sea Surface Temperature (SST) climate data.

  • Robustness to Noise: On the noisy pendulum task, the Consistent Koopman model significantly outperformed standard Dynamic Autoencoders (DAEs) and RNNs, maintaining low error even as the prediction horizon increased.
  • Long-Term Accuracy: In the SST task, the model's forecasts for the 120th and 175th days were visually and quantitatively much closer to the ground truth than the DAE baseline.
  • Reduced Variance: The model demonstrated much more consistent performance across different random initializations compared to baselines, suggesting a more stable optimization landscape.
  • Efficiency: Despite the additional loss terms, computational requirements remain comparable to existing Koopman-based baselines.

Limitations and Future Directions

The model assumes the existence of a backward-in-time map. While true for many mechanical systems, it may not hold for purely diffusive or irreversible processes (e.g., heat equations), where high diffusion can lead to inferior predictions. Additionally, tuning the hyperparameters that weight the various loss terms might be non-trivial for highly divergent datasets.

Ultimately, this consistency framework offers a robust path forward for sequence modeling. The authors suggest it could be integrated into more complex architectures, combining the expressivity of RNNs with the rigorous stability of Koopman theory.

Summary updated

BibTeX
@inproceedings{azencot2020forecasting,
  author = {Omri Azencot and N. Benjamin Erichson and Vanessa Lin and Michael W. Mahoney},
  title = {{Forecasting Sequential Data Using Consistent Koopman Autoencoders}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=say8ltArYPb},
}
Figure