NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Sample-efficient Safe Learning for Online Nonlinear Control with Control Barrier Functions

Wenhao Luo, Wen Sun, Ashish Kapoor

TL;DR

This paper introduces a provably sample-efficient framework for safe reinforcement learning in unknown, nonlinear dynamical systems. By integrating stochastic Control Barrier Functions (CBFs) with an optimism-based exploration strategy, the authors achieve high-probability safety guarantees alongside a sublinear regret bound, ensuring the agent learns to perform tasks optimally without violating safety constraints.

What Problem Does This Paper Address?

Reinforcement Learning (RL) excels at solving complex control tasks, but its "trial-and-error" nature is a liability in safety-critical applications like robotics or autonomous driving. Traditional safe RL often faces a catch-22: to ensure safety, the agent must know the system dynamics, but to learn the dynamics, the agent must explore—potentially into unsafe territory.

Existing methods typically fall into two camps:

  1. Control-theoretic approaches (like CBFs): These provide rigorous safety guarantees but often require a perfectly known model or are overly conservative when faced with uncertainty.
  2. Safe RL algorithms: These focus on reward but often lack "sample efficiency"—a measure of how quickly an agent reaches optimal performance. Specifically, few methods provide a formal regret bound (a theoretical guarantee on performance loss during learning) for nonlinear systems with unknown dynamics.

The authors bridge this gap by creating a framework that is both safe during the learning process and mathematically guaranteed to be efficient.

Methods

The proposed framework, Optimism-based Safe Learning for Control, relies on three main pillars:

  • Stochastic Discrete-Time CBFs: Standard CBFs are designed for deterministic systems. The authors extend this to a stochastic setting, accounting for Gaussian noise. They define a safety condition that ensures the system remains within a "safe set" with high probability ($1-\delta$), even when the model is still being learned.
  • Optimism in the Face of Uncertainty (OFU): Borrowing from the LC3 algorithm, the framework maintains a "confidence ball" of possible system models. Instead of picking the most likely model, the agent optimistically picks a model within that ball that yields the highest potential reward. This encourages the agent to explore areas where it is uncertain but where high rewards might exist.
  • Safe MPC Planning: At each time step, the agent uses Model Predictive Path Integral (MPPI) control to plan a trajectory based on its sampled model. This plan is then passed through a Quadratic Programming (QP) safety filter based on the stochastic CBF. This filter minimally adjusts the control input to ensure the safety constraint is never violated.

Datasets

As is standard in control research, the algorithm was evaluated on simulated physical environments rather than static datasets:

  1. Mobile Robot Navigation: A unicycle robot navigating a 2D space containing a hidden, non-uniform "wind field" (representing unmodeled dynamics) and static obstacles.
  2. Inverted Pendulum: A modified OpenAI Gym environment where the agent must balance a pole while staying within specific angular limits. The simulation introduced 80% error in initial model parameters (mass and length) and added stochastic disturbances.

Key Insights and Ideas

  • Safety vs. Exploration: The core "aha moment" is that safety and exploration don't have to be at odds. By using the optimism principle, the agent is "brave" enough to explore high-reward areas but is "tethered" by the CBF filter, which acts as a hard mathematical floor for safety.
  • Stochastic Robustness: The transition to stochastic CBFs is vital. By incorporating the Lipschitz constant of the safety function and the noise variance directly into the barrier constraint, the authors provide a buffer that handles unbounded Gaussian noise.
  • Provable Efficiency: The paper proves a sublinear regret bound: $\tilde{O}(H\sqrt{Hr(r+n+H)T})$. In plain English, this means that as the number of episodes ($T$) increases, the gap between the learner's performance and the optimal controller's performance shrinks significantly, proving the agent doesn't just stay safe—it actually learns the best way to solve the task.

Key Results

  • Safety Performance: In the inverted pendulum task, the proposed method successfully kept the pole within the safe angular region throughout the learning process. In contrast, baselines like standard MPPI and the unconstrained LC3 algorithm severely violated safety limits.
  • Sample Efficiency: In the robot navigation task, the optimism-based exploration found a near-optimal path through a complex wind field in just 10 episodes. A version of the algorithm that used "exploitation only" (no optimism) got stuck in a local minimum, failing to discover the most efficient path.
  • Theoretical Validation: The authors provided formal proofs for both the high-probability safety (Proposition 1) and the episodic regret bound (Theorem 2), marking a significant contribution to the theory of safe nonlinear control.

Limitations and Future Work

  • Computational Complexity: Solving a QP filter and running MPPI at every time step can be computationally expensive, potentially limiting real-time application on low-power hardware.
  • Feasibility Issues: The authors acknowledge that the QP filter can become "infeasible" if the system starts too close to the boundary of the safe set or if the dynamics are too volatile. They point toward "nominal evading maneuvers" as a potential fix.
  • High-Dimensional Scaling: While effective for unicycles and pendulums, the authors note that future work is needed to scale this sample-efficient learning to more complex, high-dimensional systems like multi-legged robots or full-scale autonomous vehicles.

Summary updated

BibTeX
@inproceedings{luo2022sample,
  author = {Wenhao Luo and Wen Sun and Ashish Kapoor},
  title = {{Sample-efficient Safe Learning for Online Nonlinear Control with Control Barrier Functions}},
  booktitle = {WAFR},
  year = {2022},
  doi = {10.1007/978-3-031-21090-7\_25},
}
Figure