Introduction
Ensuring safety in autonomous systems is a fundamental challenge, particularly for hybrid systems. These systems exhibit behaviors that switch abruptly between continuous motion (flows) and discrete transitions (jumps). A classic example is a walking robot, where a leg swings through the air (continuous flow) until it strikes the ground (a discrete jump). While Control Barrier Functions (CBFs) are a powerful tool for maintaining safety in continuous systems, extending them to hybrid domains—Hybrid Control Barrier Functions (HCBFs)—traditionally requires complex manual derivation or computationally expensive "Sum-of-Squares" programming that fails to scale to high-dimensional systems.
This paper introduces a framework for learning HCBFs directly from safe expert data. By combining deep learning with formal control theory, the authors provide a systematic way to synthesize provably safe controllers for complex systems that switch between continuous and discrete states.
Methodology: Learning Safety from Data
The proposed approach shifts the burden of safety certificate design from manual derivation to data-driven optimization. The core idea is to define a safe region $\mathcal{C}$ such that any trajectory starting within it remains within it during both flows and jumps.
Parameterizing HCBFs
The authors parameterize the HCBF as a Deep Neural Network (DNN). The network is trained to satisfy the fundamental HCBF conditions: ensuring the system stays safe during continuous movement and remains safe after every discrete transition.
Neighbor-based Unsafe Trajectory Sampling (NUTS)
A significant challenge in learning safety functions is identifying the "danger zone." In high-dimensional spaces, uniform sampling is impossible. The authors introduced the Neighbor-based Unsafe Trajectory Sampling (NUTS) algorithm. NUTS identifies the boundaries of the safe expert data, allowing the optimization process to penalize the model for violating safety conditions near the edge of the known safe region.
Formal Guarantees
Unlike standard "black-box" machine learning, this framework provides mathematical proofs of safety. By utilizing Lipschitz continuity, the authors demonstrate that if the training data is sufficiently dense, the resulting neural network is guaranteed to be a valid safety certificate for the entire system, providing a bridge between the flexibility of DNNs and the rigor of formal verification.
Experimental Evaluation
The method was evaluated on two simulated benchmarks representing different levels of hybrid complexity.
The Bouncing Ball
The bouncing ball serves as a fundamental test case for hybrid dynamics. The training dataset consisted of 5,000 safe state-action pairs. To define the velocity limits, the NUTS algorithm generated 4,560 unsafe samples to help the model learn where the danger zone begins.
In simulation, the learned HCBF successfully enforced velocity constraints. When used as a "safety filter," it modified the commands of a nominal controller to keep the ball within safe bounds, performing with comparable effectiveness to a hand-calculated analytical version.
The Compass Gait Walker
The framework was also applied to a 4-dimensional model of a bipedal robot walking down a slope. This system is notoriously sensitive to initial conditions. Using 100,000 states from 500 expert rollouts, the framework learned an HCBF that allowed a "zero-torque" controller—which would normally fail immediately—to maintain a safe walking gait for many steps by intervening only when the robot was about to reach an unrecoverable state.
Results and Conclusion
In post-training verification, the learned functions satisfied formal HCBF conditions on 95-100% of test data points. This high satisfaction rate confirms the robustness of the optimization approach. The primary insight of this work is that safe expert data can act as a "map" for safety; the optimization process "carves out" a safe region based on these hints, creating a safety shield that can filter potentially dangerous commands from any high-performance controller.
While promising, the method currently relies on the training data being "dense" enough to support formal proofs, which may become a bottleneck in very high-dimensional systems. Future research will explore learning system dynamics and safety functions simultaneously, as well as extending the framework to handle more complex physical phenomena like friction and stiction.
Summary updated