Learning Safety-Critical Residuals for Control Barrier Functions

This direction is merged into another direction: model-plant mismatch (unmodeled dynamics). Its last version stays readable and citable here.

Version 1 of 110 papers24 conceptsfrozen 2026-10-04

In safety-critical robotics, the stakes of model uncertainty are high. A controller that assumes a perfect mathematical model of a robot's physics might inadvertently drive a Segway into a wall or cause a bipedal robot to lose its balance if the real-world friction or mass differs from the simulation.

Traditional methods use Control Barrier Functions (CBFs) to provide formal safety guarantees. A CBF defines a "safe set" of states and ensures that the system remains within this set by enforcing a specific constraint on the system's dynamics. However, these guarantees are only as good as the underlying physics model. When the model is wrong, the safety guarantee evaporates.

The research direction pioneered by Andrew Singletary, Aaron D. Ames, and their colleagues addresses this by using machine learning not to replace the physics model, but to surgically correct the parts of it that matter for safety.

The Dimensionality Trick: Learning Less to Do More

The central intuition across these papers is that learning the entire physics of a robot is an overkill for safety.

If you have a high-dimensional system (like a 12-jointed bipedal robot), learning the full state-transition model $f(x, u)$ is computationally expensive and requires massive amounts of data. However, safety is often defined by a scalar function $h(x)$—for example, "is the robot upright?" or "is the robot 10cm away from the wall?"

As Andrew Singletary and Andrew J. Taylor argue in Learning for Safety-Critical Control with Control Barrier Functions, we only need to know how model uncertainty affects the time derivative of this safety function, $\dot{h}$. By focusing exclusively on the error terms of safety-critical derivatives, researchers can map high-dimensional system disturbances into a lower-dimensional space. This reduction simplifies the learning task from a complex manifold-fitting problem to a much simpler regression of a scalar residual.

Closing the Safety Gap with PSSf

To turn this intuition into a formal guarantee, Andrew Singletary et al. introduced Projection-to-State Safety (PSSf) in A Control Barrier Perspective on Episodic Learning via Projection-to-State Safety.

PSSf provides the mathematical bridge between machine learning performance and safety. It quantifies the "safety gap"—the distance between the theoretical safe set and the actual behavior caused by model error. By using episodic learning to iteratively refine the estimate of the safety function's derivative, the controller can "shrink" this gap. In practice, this means a robot can start with a conservative safety margin and, as it collects data about its own inaccuracies, safely expand its operating envelope.

Probabilistic Safety and Online Adaptation

While episodic learning works well for repeated tasks, some environments require real-time adaptation. Fernando Castañeda and Claire J. Tomlin extended this idea to online learning in Probabilistic Safe Online Learning with Control Barrier Functions.

Instead of simple regression, they use Gaussian Processes (GPs) to model the uncertainty in the safety function's derivative. This allows the controller to be "aware" of its own ignorance. When the GP is uncertain, the controller acts more conservatively; as more data is collected, the uncertainty narrows, and the robot can act more decisively.

Similarly, Athindran Ramesh Kumar and Jaime F. Fisac developed ProBF (ProBF: Learning Probabilistic Safety Certificates with Barrier Functions), which transforms these probabilistic safety constraints into convex optimization problems. This ensures that the "safety filter" can run in real-time control loops, providing a high-frequency shield against model violations.

From Theory to Hardware

The power of this "residual learning" approach is most evident in physical experiments. In Episodic Learning for Safe Bipedal Locomotion with Control Barrier Functions and Projection-to-State Safety, Noel Csomay-Shanklin and Ryan K. Cosner applied these concepts to a bipedal robot.

Bipedal walking is notoriously difficult to model perfectly due to complex contact dynamics and impacts. By learning only the projection of these unmodeled disturbances onto the safety constraints (like foot placement boundaries), the researchers reduced placement errors by over 75%. This demonstrates that you don't need a perfect model of a robot's entire body to achieve remarkably precise and safe movement; you just need to learn exactly how the world deviates from your safety expectations.

Papers in this version

History & citationVersion 1 · 2026-10-04

Merged into another direction · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_learning_safety_critical_residuals_for_c_b717c892,
  title = {Learning Safety-Critical Residuals for Control Barrier Functions},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/learning-safety-critical-residuals-for-control-barrier-functions/rdr_b717c892c561487cbeb56b034372808b},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-19},
}

This exact version (version 1, frozen text):

@misc{lacuna_learning_safety_critical_residuals_for_c_b717c892_v1,
  title = {Learning Safety-Critical Residuals for Control Barrier Functions},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/learning-safety-critical-residuals-for-control-barrier-functions/rdr_b717c892c561487cbeb56b034372808b/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-19},
}