# Robust Barrier Projection for Learned Dynamics

- ID: 2198
- Canonical URL: https://synthcore.org/idea/2198/robust-barrier-projection-for-learned-dynamics
- API JSON: https://synthcore.org/api/idea/2198.json
- API Markdown: https://synthcore.org/api/idea/2198.md
- Verification status: failed_benchmark
- Source: [arXiv:2608.12638](https://arxiv.org/abs/2608.12638)
- Category: dynamics
- Solves: stability, accuracy, generalization
- ML areas: rl, world-model, optimizer, training-dynamics
- Math tags: control-theory, dynamical-systems, optimization, linear-algebra
- Ratings: usefulness 8/10; difficulty 5/10; novelty 5/10

## Idea description

Wrap a learned neural controller or world-model policy with a quadratic-program projection that enforces a robust higher-order control barrier condition. The projection uses a neural estimate of hidden state variables and a certified bound on model and estimator residuals, so the nominal policy is changed only when it approaches a learned safety boundary.

## Mathematical statement

Consider a control-affine learned or physical system $\dot{x}=f(x)+g(x)u$ with an unknown additive residual represented in the $r$-th barrier derivative by $\Delta_r(x,t)$. Let $B(x)\geq 0$ define the safe set, let $r$ be its relative degree, and define $\eta(x)=[B(x),L_fB(x),\ldots,L_f^{r-1}B(x)]^\top$. Choose $K_\alpha=[\alpha_1,\ldots,\alpha_r]$ so that the companion error matrix $F-GK_\alpha$ is Hurwitz. Enforce $L_f^rB(x)+L_gL_f^{r-1}B(x)u-\overline{\Delta}_r\geq-K_\alpha\eta(x)$, where $\Delta_r(x,t)\geq-\overline{\Delta}_r$. The robust inequality implies the nominal higher-order barrier condition despite the residual, and hence forward invariance of $B(x)\geq0$ under the usual regularity assumptions. In a neural implementation, $x$ may be replaced by an estimator $\hat{x}$ and $\overline{\Delta}_r$ must include both learned-dynamics error and state-estimation error.

## Key formulas

- $$\eta(x)=\begin{bmatrix}B(x)&L_fB(x)&\cdots&L_f^{r-1}B(x)\end{bmatrix}^{\top},\qquad F-GK_\alpha\ \text{Hurwitz},$$
- $$B^{(r)}(x,u)\geq -K_\alpha\eta(x),$$
- $$L_f^rB(x)+L_gL_f^{r-1}B(x)u+\Delta_r(x,t)\geq-K_\alpha\eta(x),$$
- $$L_f^rB(x)+L_gL_f^{r-1}B(x)u-\overline{\Delta}_r\geq-K_\alpha\eta(x),\qquad \Delta_r(x,t)\geq-\overline{\Delta}_r.$$

## Implementation notes

1. Integration point: use this as an inference-time safety wrapper around a neural policy $u_{\mathrm{nom}}=\pi_\theta(o_t)$, or around the action emitted by a world model or reinforcement-learning agent. Define a differentiable safety function $B(x)$, such as a distance-to-obstacle margin, actuator-temperature margin, maximum latent-state norm margin, or predicted rollout constraint. A KAN, MLP, encoder, or recurrent estimator produces $\hat{x}$ from observations. 2. Pseudocode: compute $\hat{x}=E_\phi(o_t)$; evaluate $B(\hat{x})$ and its Lie derivatives using automatic differentiation through a learned vector field $\hat f_\psi$ and input matrix $\hat g_\psi$; form $\eta(\hat{x})$; solve $u^*=\arg\min_u\|u-u_{\mathrm{nom}}\|_R^2$ subject to $L_{\hat f}^rB+L_{\hat g}L_{\hat f}^{r-1}B\,u-\bar\Delta_r\geq-K_\alpha\eta(\hat{x})$ and actuator bounds. Apply $u^*$ and log the unconstrained and projected actions. 3. Compute versus estimate: $K_\alpha$ is selected offline by checking Hurwitz eigenvalues; Lie derivatives are computed by autodiff; $\bar\Delta_r$ is estimated from held-out transition residuals using a high quantile, then inflated by the observed estimator error and a safety factor. The paper supplies the robust inequality, while the residual bound must be calibrated empirically or with a confidence method. 4. First cheap experiment: train a small neural state-space model and PPO policy on a two-dimensional obstacle-avoidance or cart-pole task with hidden velocity and a hard state constraint. Compare an unconstrained policy, nominal CBF projection, and robust projection. Sweep the safety-bound multiplier $c$ in $\bar\Delta_r=cq_{0.999}(|\widehat{\Delta}_r|)$. The quantitative prediction is a sharp safety transition: for $c\geq1$ and no residual exceeding the bound, constraint violations should be zero up to numerical tolerance; for $c<1$, violations should begin specifically on trajectories where $\Delta_r<-\bar\Delta_r$. Also measure projection magnitude: it should remain near zero far from the boundary and grow approximately linearly with the barrier deficit near activation.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: harms
- Verdict: The robust barrier projection mechanism was verified in a scalar relative-degree-one toy system. The safety transition occurred at c=1 as predicted, boundary correction scaled with slope 0.25, and active projection versus state had slope -2.0.

### Mechanism check

- Verdict: The robust barrier projection mechanism was verified in a scalar relative-degree-one toy system. The safety transition occurred at c=1 as predicted, boundary correction scaled with slope 0.25, and active projection versus state had slope -2.0.
- Confidence: 9/10
- Limitations: Only a deterministic scalar relative-degree-one system was tested. Neural state estimation, learned dynamics, higher-order barriers, multidimensional QPs, stochastic residuals, and actuator infeasibility were not tested.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 0/8
- Benchmark verdict: idea worse (significant)

## Artifacts

- [bench_report.json](https://synthcore.org/code/790/bench_report.json)
- [report.md](https://synthcore.org/code/790/report.md)
- [report_bench_2026-09-01T103334.md](https://synthcore.org/code/790/report_bench_2026-09-01T103334.md)
- [results.json](https://synthcore.org/code/790/results.json)
- [robust_barrier_bench.py](https://synthcore.org/code/790/robust_barrier_bench.py)
- [robust_barrier_experiment.py](https://synthcore.org/code/790/robust_barrier_experiment.py)
- [Download all files as ZIP](https://synthcore.org/download/790)

## Disclaimer

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