Safely Learning Controlled Stochastic Dynamics

Luc Brogat-Motte, Alessandro Rudi, Riccardo Bonalli

Introduction

In safety-critical domains such as robotics, finance, and biomedicine, controlling systems with partially unknown physics is a recurring challenge. To optimize performance, agents must explore their environment to gather data and refine their understanding of system dynamics. However, in environments like a drone navigating turbulence or a financial portfolio avoiding insolvency, unconstrained exploration is inherently risky. This creates a fundamental "chicken-and-egg" problem: safe data collection requires knowledge of the system's limits, yet these limits can only be accurately identified through data collection.

This paper introduces a provably safe framework for learning the dynamics of controlled stochastic differential equations (SDEs) from discrete-time observations. By iteratively expanding a "safe" control set using kernel-based confidence bounds, the proposed method ensures that system trajectories remain within predefined safe regions during both the learning phase and subsequent deployment.

Methodology

The proposed approach is grounded in an iterative algorithm utilizing the Safe Upper Confidence Bound (UCB) framework. The methodology integrates three core components to balance exploration and safety.

Joint Modeling via Kernel Ridge Regression

The framework employs Kernel Ridge Regression to learn three distinct models:

  1. Dynamics Model: Predicts the evolution of state densities over time.
  2. Safety Model: Estimates the probability that a given trajectory remains within the designated "safe" region.
  3. Reset Model: Estimates the likelihood that the system can be successfully returned to its initial state. This is a critical addition, as it prevents the agent from entering "dead-end" states where it is safe but unable to continue exploration.

Uncertainty Quantification and Sobolev Regularity

Rather than relying solely on mean predictions, the algorithm calculates uncertainty bounds. A new control input is only attempted if the Lower Confidence Bound (LCB) for both safety and reset feasibility exceeds a predefined threshold.

To derive adaptive learning rates, the authors assume the underlying dynamics belong to a Sobolev space. This mathematical assumption of smoothness allows the algorithm to derive optimal convergence rates; essentially, the smoother the system, the faster and more accurately the algorithm can learn. The algorithm starts with a small, known safe set of controls and incrementally "grows" this set by targeting the most uncertain points that still meet the safety certification.

Experimental Evaluation

The researchers evaluated the framework on a synthetic 2D second-order stochastic dynamical system. The agent was tasked with navigating a bounded environment ($[-10, 10]^2$) containing a "high turbulence" region characterized by spatially dependent noise. This setup tests the model's ability to handle unpredictable trajectories and varying safety thresholds.

Key Results

  • Provable Safety: The authors provide mathematical proofs that all trajectories selected during training satisfy safety constraints with high probability.
  • Convergence and Efficiency: For systems with sufficient smoothness, the algorithm terminates in $N = O(\eta^{-3})$ iterations for a desired accuracy $\eta$. In practice, the method proved computationally efficient; an end-to-end run of 1,000 iterations—including simulation, model updates, and candidate selection—was completed in under 32 minutes on a standard laptop (Apple M3 Pro).
  • Accuracy Trade-offs: The experiments highlighted a clear relationship between safety constraints and model accuracy. As constraints were relaxed, the model explored more of the state space, resulting in a significant drop in Mean Squared Error (MSE) from approximately 0.7 to 0.002.

Discussion and Future Work

A significant insight from this work is the explicit modeling of the "reset" region, which ensures long-term operational viability by avoiding irreversible states. Furthermore, the identification of "bottlenecks"—areas near the boundaries of safe regions where uncertainty is highest—demonstrates that the algorithm correctly prioritizes caution where the cost of error is greatest.

Despite its strengths, the framework has limitations. It requires an initial non-empty set of known safe controls and assumes the dynamics are smooth, which may not hold in systems with "jump processes" or abrupt environmental changes. Future work aims to scale these kernel methods using "sketching" techniques and extend the framework to handle non-diffusive disturbances, such as sudden mechanical failures or traffic jumps.

Summary updated

BibTeX
@inproceedings{brogatmotte2025safely,
  author = {Luc Brogat-Motte and Alessandro Rudi and Riccardo Bonalli},
  title = {{Safely Learning Controlled Stochastic Dynamics}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=QQybz4enRc},
}
Figure