kooplearn: A Scikit-Learn Compatible Library of Algorithms for Evolution Operator Learning

Giacomo Turri, Grégoire Pacreau, Giacomo Meanti, Timothée Devergne, Daniel Ordonez, Erfan Mirzaei, Bruno Belucci, Karim Lounici, Vladimir Kostic, Massimiliano Pontil, Pietro NovelliarXiv 2025 · DOI

Introduction

Dynamical systems—ranging from fluid dynamics to protein folding—are notoriously difficult to model due to their high-dimensional and non-linear nature. Traditional approaches often struggle to capture the underlying physics without becoming computationally intractable. kooplearn addresses this challenge by providing a high-performance Python library for evolution operator learning, integrated directly into the scikit-learn ecosystem.

The Evolution Operator Framework

The core philosophy of kooplearn is the linearization of non-linear dynamics through the "Evolution Operator" framework (encompassing Koopman and Transfer operators). Instead of tracking the state of a system $x_t$ directly, the framework examines how functions of that state evolve. In a sufficiently rich functional space, even chaotic dynamics can be represented as a linear operator.

The evolution operator framework maps non-linear observations into a latent space where dynamics are linear.

As shown in the figure above, a non-linear representation $\phi$ maps observations $x_t$ into a latent space $z_t$. In this space, the evolution is governed by a linear map $E$, such that $z_{t+1} = E z_t$. This transformation allows researchers to apply powerful linear algebra tools, such as spectral decomposition, to complex non-linear systems.

Implementation and Methods

kooplearn offers a unified interface for several classes of estimators:

  • Linear & Kernel Estimators: Beyond standard Ridge regression, it introduces Reduced Rank Regression (RRR). RRR is mathematically optimized to approximate an operator's spectrum more accurately than traditional Dynamic Mode Decomposition (DMD).
  • Deep Learning Estimators: For high-dimensional datasets, the library leverages PyTorch and JAX to learn optimal non-linear representations using VAMP and spectral contrastive losses.
  • Continuous-Time Modeling: It supports infinitesimal generator models for Stochastic Differential Equations (SDEs), enabling the construction of physics-informed models from static data.

A key advantage is the library's full compatibility with scikit-learn's fit, predict, and transform API, making it easy to integrate into existing ML pipelines.

Benchmarking and Datasets

To facilitate rigorous testing, kooplearn includes a dedicated datasets module. This includes classic deterministic chaos (Lorenz-63, Logistic Map), stochastic systems (Langevin dynamics), and high-dimensional structured data like Ordered MNIST. These benchmarks allow users to verify spectral accuracy against known ground truths.

Performance Results

The library is designed for efficiency. By utilizing randomized sketching and Nyström-based estimators, kooplearn significantly reduces the computational overhead typically associated with kernel methods.

Benchmark comparing fitting times of kooplearn against other popular operator learning libraries.

In comparative benchmarks, kooplearn demonstrates a substantial speed advantage. For a dataset of 5,000 observations, kooplearn's kernel models fit in approximately one second, while competing libraries like pykoopman and PyDMD require over 20 seconds. Furthermore, the use of Reduced Rank Regression ensures that this speed does not come at the cost of accuracy, providing superior approximations of leading eigenfunctions compared to standard kDMD.

Conclusion and Future Work

kooplearn provides a robust, scalable, and user-friendly toolkit for the dynamical systems community. While the library simplifies the application of evolution operators, future development will focus on automating representation learning and integrating deeper physics-based constraints, such as energy conservation, to further enhance model reliability in complex physical domains.

Summary updated

BibTeX
@misc{turri2025kooplearn,
  author = {Giacomo Turri and Grégoire Pacreau and Giacomo Meanti and Timothée Devergne and Daniel Ordonez and Erfan Mirzaei and Bruno Belucci and Karim Lounici and Vladimir Kostic and Massimiliano Pontil and Pietro Novelli},
  title = {{kooplearn: A Scikit-Learn Compatible Library of Algorithms for Evolution Operator Learning}},
  year = {2025},
  eprint = {2512.21409},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.21409},
}
Figure