Model-Based Reinforcement Learning with SINDy

Rushiv Arora, Eliot Moss, Bruno Castro da Silva · DOI

TL;DR

This paper introduces a novel approach to model-based reinforcement learning (RL) by leveraging SINDy, a physics-inspired method for discovering system dynamics. By learning accurate, low-dimensional, and interpretable dynamics models from minimal real-world interaction data, their method achieves near-optimal policies with significantly faster learning times compared to existing state-of-the-art model-free and model-based RL techniques.

What Problem Does This Paper Address?

Reinforcement learning (RL) often faces a trade-off between model-free methods, which are sample-inefficient but don't require a model, and model-based methods, which can learn faster but rely on accurate dynamics models that are notoriously difficult to learn. For systems with underlying physics-based dynamics (like robotics), learning a good model is crucial for efficient RL. However, traditional model learning approaches often require vast amounts of data to capture complex, non-linear dynamics, negating the potential speedup benefits of model-based RL. This paper aims to bridge this gap by proposing a method that can learn accurate physics-based dynamics models from very limited real-world interaction data, enabling faster and more efficient RL.

Methods

The core of the proposed method lies in using SINDy (Sparse Identification of Non-linear Dynamics). SINDy is a technique from the physics community that extracts governing differential equations from time-series data. It works by assuming that the system's dynamics can be represented as a sparse linear combination of a predefined set of "feature functions" (which can be non-linear combinations of state and action variables). SINDy then uses sparse regression to find the minimal set of features and their coefficients that accurately describe the observed dynamics.

The paper integrates SINDy into a Dyna-style RL framework. This means that after collecting a small amount of real-world data (rollouts), SINDy is used to learn a dynamics model. This learned model is then used to generate simulated rollouts, which are used to train the RL policy using a model-free algorithm. This process is repeated, with occasional real-world interactions to update the SINDy model and policy. The key novelty is using SINDy for model learning, which is known for its ability to find parsimonious and interpretable models from limited data.

Datasets

The paper evaluates its method on four classic control tasks:

  • Cart Pole: A discrete action environment.
  • Mountain Car: A continuous action environment.
  • Pendulum Swing Up: A continuous action environment.
  • Inverted Pendulum (Mujoco): A more realistic physics simulation environment with damping and friction.

The data for training the SINDy model was collected from these environments using a random or pseudo-random policy. For evaluation, the learned policies were deployed on the actual physical systems.

Key Insights and Ideas

  • Physics-informed model learning is powerful: By leveraging SINDy, which is designed to find interpretable, equation-based models of physical systems, the authors demonstrate that accurate dynamics can be learned with remarkably little data.
  • Parsimony leads to efficiency: SINDy's "sparse" nature means it seeks the simplest possible model. This results in models with very few parameters, making them easier to learn and generalize better.
  • Bridging the model-to-real gap: The learned SINDy models, even when approximate, were found to be accurate enough to train policies that perform well on the actual physical system, effectively closing the loop between simulation and reality.
  • Interpretability matters: Unlike black-box neural network models, SINDy provides explicit equations, offering insights into the system's dynamics and making the learned model interpretable.

Key Results

The proposed SINDy-based RL method significantly outperforms state-of-the-art model-based (MBPO) and model-free (SAC) methods in terms of learning speed and sample efficiency.

  • Sample Efficiency: The method required as little as one rollout (with $\leq 30$ time steps) to identify high-accuracy dynamics models for tasks like Cart Pole.
  • Speedup: The paper reports speedups of 4x-100x against MBPO and 15x-500x against SAC across the tested environments.
  • Parameter Efficiency: SINDy models have significantly fewer parameters (n*F, where n is state dimensionality and F is the number of features) compared to MBPO's neural network model (613,036 parameters).
  • Performance: Policies trained using the SINDy models achieved asymptotic performance comparable to or exceeding existing methods, demonstrating the accuracy and utility of the learned dynamics.

Limitations and Future Work

  • Assumes Physics-Based Dynamics: The method is most effective for systems that can be described by relatively simple, possibly non-linear, differential or difference equations. It is not presented as a general solution for arbitrary data sets.
  • Feature Engineering: While SINDy automates the selection of terms, the initial set of potential "feature functions" still requires some domain knowledge or educated guessing.
  • Future Work: The authors suggest exploring more complex robotic systems, particularly those supported by the Mujoco physics simulator. They also mention the possibility of extending the Dyna-style algorithm to periodically retrain the SINDy model if beneficial.

Summary updated

BibTeX
@misc{arora2022model,
  author = {Rushiv Arora and Eliot Moss and Bruno Castro da Silva},
  title = {{Model-Based Reinforcement Learning with SINDy}},
  year = {2022},
  eprint = {2208.14501},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.14501},
}
Figure