Reinforcement Learning vs Optimal Control: Sparse Nonlinear Dynamical Systems Between Theory and Practice

Davide Maran, Gianmarco Tedeschi, Enea Gusmeroli, Marcello RestelliEWRL 2025

TL;DR

This paper bridges the gap between reinforcement learning (RL) and optimal control by developing a model-based RL algorithm that leverages sparsity in nonlinear dynamical systems. The proposed method, OSCAR, achieves strong theoretical guarantees and demonstrates superior performance on challenging control tasks by intelligently balancing exploration and exploitation.

What Problem Does This Paper Address?

Model-based reinforcement learning aims to improve sample efficiency by learning a model of the environment's dynamics. However, accurately modeling complex, nonlinear systems often requires a vast amount of data or makes strong assumptions about the system's structure. This paper addresses the challenge of learning in environments with sparse nonlinear dynamics, where the system's behavior can be described by a simple underlying structure despite a potentially complex observable behavior. This sparsity is inspired by the SINDy framework, which identifies governing equations from data by assuming a parsimonious set of relevant terms from a larger dictionary of possible functions. The authors aim to develop an RL algorithm that can effectively exploit this sparsity for both theoretical guarantees and practical performance, going beyond existing methods that often assume linear dynamics or Gaussian noise.

Methods

The paper introduces two main algorithms:

  • DPCBE (Dynamic Planner with Confidence-Based Estimation): This is the theoretically grounded algorithm. It combines:
  • Online Sparse Regression: Using a method called SEQSEW, it learns the system's dynamics while enforcing sparsity.
  • Confidence Set Construction: It maintains a "confidence ball" around the estimated system parameters. This ball represents the range of plausible true system dynamics.
  • Optimistic Planning: The agent plans its actions by considering the most optimistic system dynamics within the confidence ball. This encourages exploration by acting as if the system is as favorable as possible, while also providing a mechanism to gather information to shrink the confidence ball.
  • Relaxed Noise Assumptions: Unlike many prior works, DPCBE handles general subgaussian noise with bounded variation densities, broadening the applicability of the theoretical results. It also extends to misspecified models, where the dynamics are only approximately sparse.
  • OSCAR (Optimistic Simulation with Confidence-Ball Regression): This is a practical, computationally efficient variant of DPCBE.
  • Ensemble SINDy: It replaces the computationally heavy SEQSEW with the SINDy framework (specifically, Ensemble-SINDy) for learning the sparse dynamics model.
  • Dyna-style Framework: It uses a Dyna-style approach, alternating between interactions with the real environment and simulations using the learned model.
  • Soft Actor-Critic (SAC): It integrates SAC for policy optimization, leveraging its ability to handle continuous action spaces and its off-policy nature.
  • Extended State for Planning: To handle planning over multiple models within the confidence ball, OSCAR uses an extended state representation that includes both the environment state and the dynamical system parameters.

Datasets

The paper does not introduce new datasets. Instead, it evaluates its algorithms on standard continuous control benchmarks from the Gymnasium suite and dm_control:

  • Acrobot
  • Continuous Mountain Car
  • Cartpole Swing-Up

Key Insights and Ideas

  • Sparsity is Key for Efficient RL in Nonlinear Systems: The paper demonstrates that exploiting sparsity in the underlying dynamics of nonlinear systems is crucial for achieving both theoretical guarantees (regret bounds) and practical performance in RL.
  • Optimism as an Exploration Driver: The "optimism in the face of uncertainty" principle, implemented through confidence sets and optimistic planning, is shown to be effective for guiding exploration in complex environments, especially those with sparse rewards.
  • Bridging Theory and Practice: The development of OSCAR shows a successful translation of theoretical insights (DPCBE) into a practical algorithm that leverages modern machine learning techniques (SINDy, SAC) to overcome computational bottlenecks.
  • Generalizing Noise and Model Assumptions: The theoretical framework is extended to handle more general noise distributions and model misspecification, making it more robust and applicable to real-world scenarios.

Key Results

  • Theoretical Guarantees: DPCBE provides the first regret bounds for sparse nonlinear dynamics, showing that regret scales with the sparsity level ($d_0$). It also relaxes Gaussian noise assumptions and extends to misspecified models.
  • Empirical Performance: OSCAR consistently outperforms baseline methods (SAC, model-based SAC with SINDy) on the tested continuous control tasks.
  • Swing-Up: OSCAR converges to the optimal policy with significantly fewer iterations.
  • Acrobot: OSCAR converges faster and achieves better performance, especially in finding the optimal policy.
  • Mountain Car: OSCAR is the only approach that successfully reaches the goal, highlighting its effectiveness in tasks requiring significant exploration.
  • Impact of Confidence Ball Size (λ): Experiments show that the scale factor λ, which controls the size of the confidence ball, plays a critical role. An intermediate value balances exploration and model reliability, leading to optimal performance. Too small a value leads to conservative behavior, while too large a value can slow down learning by querying uncertain models.

Limitations and Future Work

  • Computational Efficiency of Theoretical Algorithm: The theoretically grounded algorithm DPCBE is not computationally efficient due to its reliance on a heavy online regression method.
  • Misspecification Amplification: While the paper addresses model misspecification, it notes that the term $\sqrt{d}\xi_\infty$ in the regret bound (where $d$ is the feature map dimension and $\xi_\infty$ is the misspecification error) remains a challenge. This "misspecification amplification" is a known issue in RL with linear function approximation and is an open problem.
  • Future Work: The authors suggest that their approach can be parallelized to reduce computation time. The paper also implies that further research could explore ways to mitigate the misspecification amplification problem.

Summary updated

BibTeX
@inproceedings{maran2025reinforcement,
  author = {Davide Maran and Gianmarco Tedeschi and Enea Gusmeroli and Marcello Restelli},
  title = {{Reinforcement Learning vs Optimal Control: Sparse Nonlinear Dynamical Systems Between Theory and Practice}},
  booktitle = {EWRL},
  year = {2025},
  url = {https://openreview.net/forum?id=wc69fDpg3R},
}
Figure