# Uncertainty-Inflated CBF Safety Layer

- ID: 1803
- Canonical URL: https://synthcore.org/idea/1803/uncertainty-inflated-cbf-safety-layer
- API JSON: https://synthcore.org/api/idea/1803.json
- API Markdown: https://synthcore.org/api/idea/1803.md
- Verification status: failed_benchmark
- Source: [arXiv:2608.04732](https://arxiv.org/abs/2608.04732)
- Category: dynamics
- Solves: stability, accuracy
- ML areas: rl, world-model, optimizer, training-dynamics
- Math tags: control-theory, dynamical-systems, probability, optimization
- Ratings: usefulness 7/10; difficulty 5/10; novelty 7/10

## Idea description

Attach an online uncertainty estimator to the perception or dynamics model and inflate every obstacle constraint by a confidence radius before applying the control-barrier-function filter. The actor still proposes the nominal action, but the executed action is the closest admissible action satisfying the uncertainty-adjusted barrier inequality, producing a tunable safety-versus-intervention mechanism.

## Mathematical statement

Let the true safety function be h(x) >= 0, its estimate be h_hat(x), and its estimation error be e_h(x) = h(x) - h_hat(x). If the estimator supplies a high-probability bound |e_h(x)| <= epsilon(x), then enforcing h_hat(x) >= epsilon(x) implies h(x) >= 0. For relative-degree-one dynamics x_dot = f(x) + g(x)u + d, use the robust CBF constraint grad(h_hat)(x)^T [f(x) + g(x)u] + alpha [h_hat(x) - epsilon(x)] >= ||grad(h_hat)(x)|| delta_max, where alpha > 0 is a class-K gain and delta_max bounds the disturbance projection. The safety filter solves a quadratic program minimizing deviation from the actor action subject to this constraint and actuator bounds.

## Key formulas

- h_hat(x) >= epsilon(x) implies h(x) = h_hat(x) + e_h(x) >= 0 whenever |e_h(x)| <= epsilon(x).
- grad(h_hat)(x)^T [f(x) + g(x)u] + alpha [h_hat(x) - epsilon(x)] >= ||grad(h_hat)(x)|| delta_max.
- u_exec = argmin over u in U of 0.5 ||u - u_nom||_R^2, subject to the robust CBF inequality, where U = {u : |u_i| <= ubar_i}.

## Implementation notes

1. Integration point: place the module between the actor and the environment. The actor outputs u_nom = pi_theta(o); an uncertainty head outputs either a standard deviation sigma(o) or an ensemble variance for obstacle distance and, optionally, dynamics residuals. Convert it to a margin epsilon(o) = k sigma(o), with k selected from a calibration quantile. 2. Pseudocode: estimate h_hat, grad(h_hat), and epsilon; form the robust CBF linear inequality; solve a small quadratic program for u_exec; step the environment with u_exec; store both u_nom and u_exec. Train the uncertainty head from held-out sensor truth or ensemble disagreement. 3. Computed versus estimated: f, g, grad(h_hat), and the quadratic program are computed online; epsilon, delta_max, and calibration coverage are estimated from validation residuals. If no analytical dynamics model exists, finite-difference or learned Jacobians can be used, but this weakens the certificate. 4. First cheap experiment: use SAC on a two-dimensional point-mass navigation task with Gaussian obstacle-position noise, comparing no filter, nominal CBF, and uncertainty-inflated CBF. Sweep k in {0, 1, 2, 3} and several noise levels. The prediction is a sharp reduction in contacts once k sigma exceeds the empirical 95th-percentile distance residual; for calibrated errors, contact probability should be below roughly 5 percent, while intervention rate and path cost increase monotonically with k. Measure whether the observed safe-set violation rate tracks the uncovered calibration fraction.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: no_effect
- Verdict: Built an exact 1-D uncertainty-inflated CBF safety layer with actuator-bounded QP projection, numerical math checks, and noisy obstacle rollouts. The safety implication had zero violations for all tested bounded-error margins; intervention began at the predicted epsilon threshold of 0.35, observed between 0.3 and 0.4, and had the predicted slope of 2.0. Increasing k reduced contacts monotonically while increasing intervention and filter cost, demonstrating the intended safety-versus-intervention mechanism.

### Mechanism check

- Verdict: Built an exact 1-D uncertainty-inflated CBF safety layer with actuator-bounded QP projection, numerical math checks, and noisy obstacle rollouts. The safety implication had zero violations for all tested bounded-error margins; intervention began at the predicted epsilon threshold of 0.35, observed between 0.3 and 0.4, and had the predicted slope of 2.0. Increasing k reduced contacts monotonically while increasing intervention and filter cost, demonstrating the intended safety-versus-intervention mechanism.
- Confidence: 9/10
- Limitations: This is a toy 1-D relative-degree-one system rather than SAC or a 2-D navigation environment. The uncertainty is a fixed Gaussian obstacle-position error, not a learned online estimator or calibrated neural uncertainty head; multi-dimensional QPs, learned dynamics, sensor simulation, and long-horizon RL training were not tested.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 1
- Paired wins: 0/8
- Benchmark verdict: no measurable effect

## Artifacts

- [bench_report.json](https://synthcore.org/code/673/bench_report.json)
- [report.md](https://synthcore.org/code/673/report.md)
- [report_bench_2026-08-31T213436.md](https://synthcore.org/code/673/report_bench_2026-08-31T213436.md)
- [results.json](https://synthcore.org/code/673/results.json)
- [stage2_bench.py](https://synthcore.org/code/673/stage2_bench.py)
- [stage2_official.py](https://synthcore.org/code/673/stage2_official.py)
- [uncertainty_cbf_experiment.py](https://synthcore.org/code/673/uncertainty_cbf_experiment.py)
- [Download all files as ZIP](https://synthcore.org/download/673)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
