# Observer-Reconstructed Neural Safety Filter

- ID: 991
- Canonical URL: https://synthcore.org/idea/991/observer-reconstructed-neural-safety-filter
- API JSON: https://synthcore.org/api/idea/991.json
- API Markdown: https://synthcore.org/api/idea/991.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.15961](https://arxiv.org/abs/2607.15961)
- Category: dynamics
- Solves: stability, accuracy, generalization
- ML areas: rl, optimizer, training-dynamics
- Math tags: control-theory, dynamical-systems, optimization
- Ratings: usefulness 8/10; difficulty 6/10; novelty 6/10

## Idea description

Wrap a neural policy with a control-barrier safety layer whose constraints use an online estimate of model mismatch or environmental disturbance. Instead of enforcing a fixed worst-case bound at every state, the layer reconstructs the current effective dynamics from an extended state observer and adds only the margin required by the remaining estimation error.

## Mathematical statement

Let the learned policy output a nominal action $u_{\mathrm{NN}}(x)$ for state $x$, and let the unknown dynamics error be represented by an additive disturbance $d$. An extended observer estimates $d$ as $\hat d$ and provides an error bound $\|d-\hat d\|\leq\varepsilon_d$. For a scalar safety function $h(x)\geq0$ with relative degree two, define $\psi_0=h$, $\psi_1=\dot h+\lambda_1h$, and $\psi_2=\dot\psi_1+\lambda_2\psi_1$, where $\lambda_1,\lambda_2>0$. The safety filter chooses the action closest to the neural action subject to $\hat\psi_2(x,\hat d,u)\geq\kappa\varepsilon_d$, where $\kappa$ bounds the disturbance-to-barrier channel. If the observer error bound is valid and the filter remains feasible, the positive set defined by $h\geq0$ and $\psi_1\geq0$ is forward invariant. The adaptive term $\kappa\varepsilon_d$ reduces conservatism while protecting against observer error.

## Key formulas

- $$\psi_0(x)=h(x),\qquad \psi_1(x)=\dot h(x)+\lambda_1h(x),\qquad \psi_2(x,u)=\dot\psi_1(x,u)+\lambda_2\psi_1(x).$$
- $$u^*=\arg\min_{u}\frac{1}{2}\|u-u_{\mathrm{NN}}(x)\|_2^2\quad\mathrm{s.t.}\quad \hat\psi_2(x,\hat d,u)\geq\kappa\varepsilon_d,\quad u\in\mathcal U.$$$
- $$\|d-\hat d\|\leq\varepsilon_d\quad\Longrightarrow\quad \psi_2(x,u)\geq0\ \text{whenever}\ \hat\psi_2(x,\hat d,u)\geq\kappa\varepsilon_d.$$$

## Implementation notes

Use this as the final action layer for an RL policy, model-based controller, or neural inverse-dynamics policy. The network receives observation $x$ and outputs $u_{\mathrm{NN}}$; an observer maintains an estimate of the unmodeled force and a QP projects the action into the reconstructed safe set. For a first implementation, use a two-dimensional point mass or pendulum with a learned residual dynamics model. At each step, update an augmented observer using $\dot{\hat x}=f_\theta(\hat x,u)+\hat d+L_x(x-\hat x)$ and $\dot{\hat d}=L_d(x-\hat x)$, compute $\hat\psi_2$, and solve the QP above. The HOCBF derivatives and QP are computed online; $\hat d$ is estimated, while $\varepsilon_d$ is calibrated from a validation disturbance stream using a high quantile of $\|d-\hat d\|$. The first cheap experiment should compare PPO or SAC with no filter, a fixed-margin robust CBF, and this observer-reconstructed filter on a point mass with switching bounded disturbances. Measure violations, tracking error, and projection norm while sweeping disturbance amplitude and observer gain. The predicted signature is zero violations while the empirical residual satisfies $\|d-\hat d\|\leq\varepsilon_d$ and a lower intervention norm than the fixed-margin filter. Underestimated margins should produce a sharp failure boundary when the residual exceeds $\varepsilon_d$.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: no_effect
- Verdict: Built and numerically tested an observer-reconstructed HOCBF filter for a disturbed double integrator, including a 1D projection QP, disturbance observer, calibration, and parameter sweeps. The core implication passed 200,000 valid-bound Monte Carlo cases with 0 failures; underestimating the residual bound produced a 50.0% algebraic failure rate. The predicted mechanism appeared clearly: observer gain reduced q95 residual from 1.925 at gain 0.02 to 0.000006 at gain 0.8, and true barrier violations fell from 35 at 0.25x the maximum residual to 0 at 1.0x. However, the q95 calibration was not conservative enough in this switching-disturbance toy and caused 35 true barrier-channel violations, so this is evidence for the mechanism rather than a demonstrated practical win over the fixed robust filter.

### Mechanism check

- Verdict: Built and numerically tested an observer-reconstructed HOCBF filter for a disturbed double integrator, including a 1D projection QP, disturbance observer, calibration, and parameter sweeps. The core implication passed 200,000 valid-bound Monte Carlo cases with 0 failures; underestimating the residual bound produced a 50.0% algebraic failure rate. The predicted mechanism appeared clearly: observer gain reduced q95 residual from 1.925 at gain 0.02 to 0.000006 at gain 0.8, and true barrier violations fell from 35 at 0.25x the maximum residual to 0 at 1.0x. However, the q95 calibration was not conservative enough in this switching-disturbance toy and caused 35 true barrier-channel violations, so this is evidence for the mechanism rather than a demonstrated practical win over the fixed robust filter.
- Confidence: 8/10
- Limitations: Only a scalar double-integrator was tested, with exact disturbance observation and a simplified discrete observer rather than a full noisy extended-state observer. No PPO/SAC training, learned residual model, continuous multidimensional QP, measurement noise, feasibility stress test, or wall-clock comparison was evaluated; q95 calibration was not validated against the worst-case switching residual.

### Practical benchmark

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

## Artifacts

- [bench_report.json](https://synthcore.org/code/179/bench_report.json)
- [bench_run.py](https://synthcore.org/code/179/bench_run.py)
- [observer_cbf_experiment.py](https://synthcore.org/code/179/observer_cbf_experiment.py)
- [report.md](https://synthcore.org/code/179/report.md)
- [report_bench_2026-08-30T193014.md](https://synthcore.org/code/179/report_bench_2026-08-30T193014.md)
- [results.json](https://synthcore.org/code/179/results.json)
- [Download all files as ZIP](https://synthcore.org/download/179)

## Disclaimer

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