Download README.md from codewithyug/certified-safe-neural-control: direct link, hf CLI and curl.
- Browser
- Download file 4.85 kB
-
https://huggingface.co/codewithyug/certified-safe-neural-control/resolve/main/README.md
- Command line
-
hf download hf://codewithyug/certified-safe-neural-control/README.md
-
curl -L -o README.md https://huggingface.co/codewithyug/certified-safe-neural-control/resolve/main/README.md
license: mit
library_name: pytorch
pipeline_tag: robotics
tags:
- robotics
- safe-rl
- control-barrier-functions
- conformal-prediction
- formal-verification
- autonomous-systems
- pytorch
Certified-Safe Neural Control Under Closed-Loop Distribution Shift
Official model weights and certification framework for Certified-Safe Neural Control Under Closed-Loop Distribution Shift, coupling formally verified Neural Control Barrier Functions (Neural CBFs) with online non-exchangeable adaptive conformal calibration (AdaptNC).
- Interactive Space Demo: Certified-Safe Neural Control Space
- Paper: Certified-Safe Neural Control Under Closed-Loop Distribution Shift (2026)
- License: MIT
π¦ Checkpoints Included
| Checkpoint File | Physical Embodiment | State Dim | Control Dim | Network Architecture | Max Frequency | Safety Verification |
|---|---|---|---|---|---|---|
checkpoints/cbf_dubins.pt |
4D Mobile Ground Robot (AMR) | ββ΄ | βΒ² | MLP [64, 64] Tanh | 884 Hz | Formally Verified (BaB) |
checkpoints/cbf_dubins_production.pt |
4D High-Capacity AMR | ββ΄ | βΒ² | MLP [128, 128, 64] Tanh | 850 Hz | Formally Verified (BaB) |
checkpoints/cbf_quadrotor.pt |
12D SE(3) Quadrotor Drone | βΒΉΒ² | ββ΄ | MLP [64, 64] Tanh | 820 Hz | Formally Verified (BaB) |
π Quickstart: 5-Line Usage Snippet
Install dependencies:
pip install torch cvxpy osqp numpy
git clone https://huggingface.co/codewithyug/certified-safe-neural-control
cd certified-safe-neural-control
Run real-time certified safety filtering:
import numpy as np
from src.pipeline import CertifiedSafetyPipeline
# 1. Load pretrained Certified Safety Pipeline
pipeline = CertifiedSafetyPipeline.from_pretrained(
checkpoint_path="checkpoints/cbf_dubins.pt",
system_type="dubins",
)
# 2. Filter unsafe nominal control action in real-time (< 2ms)
state = np.array([1.5, 0.0, 0.0, 1.5], dtype=np.float32) # Heading directly into hazard
u_nominal = np.array([0.0, 1.5], dtype=np.float32) # Unsafe: zero steering, full throttle
u_safe, info = pipeline.filter_action(state=state, u_nominal=u_nominal)
print("Nominal command: ", u_nominal)
print("Certified safe action:", u_safe) # Active avoidance: steers +1.50 rad/s, brakes -2.00 m/s^2
print("Solve time: ", f"{info['solve_time_ms']:.2f} ms")
π Benchmark Results
Evaluated across non-stationary closed-loop distribution shifts up to $\kappa = 2.0$ (lateral wind gusts, surface friction degradation, unmodeled payload mass shifts):
| Method | Safety Violation Rate (%) | Empirical Safety Coverage (%) | Mean Solve Rate (Hz) | Min Clearance $h_{\min}$ (m) |
|---|---|---|---|---|
| Nominal (Unfiltered Policy) | 41.82% |
58.18% |
N/A | -0.284 (Collision) |
| Standard CBF-QP (Non-Adaptive) | 10.36% |
89.64% |
892 Hz |
-0.071 (Collision) |
| Worst-Case Conservative CBF | 0.00% |
100.0% |
874 Hz |
+0.412 (Over-conservative) |
| Proposed Adaptive Conformal CBF | 0.00% |
99.55% |
884 Hz |
+0.148 (Certified Optimal) |
π¬ Mathematical Formulation
Control-Affine Dynamics
where $w(t)$ is the unmodeled non-stationary closed-loop distribution shift.
Online Adaptive Conformal Margin ($\gamma_t$)
Real-Time Convex Quadratic Program (OSQP)
Whole-Body Multi-Link Manipulator Barrier Formulation
Enforcing link barriers simultaneously guarantees zero physical collisions across the entire rigid body geometry of the robot manipulator under unmodeled load shifts and non-stationary disturbances.
π Citation
@article{certified_safe_neural_control_2026,
title={Certified-Safe Neural Control Under Closed-Loop Distribution Shift},
author={Certified Safe AI & Robotics Research Team},
journal={arXiv preprint},
year={2026}
}