# Adaptive conformal safety margins

- ID: 2068
- Canonical URL: https://synthcore.org/idea/2068/adaptive-conformal-safety-margins
- API JSON: https://synthcore.org/api/idea/2068.json
- API Markdown: https://synthcore.org/api/idea/2068.md
- Verification status: failed_benchmark
- Source: [arXiv:2608.10056](https://arxiv.org/abs/2608.10056)
- Category: training
- Solves: stability, accuracy, generalization
- ML areas: world-model, rl, training
- Math tags: statistics, probability, optimization
- Ratings: usefulness 7/10; difficulty 4/10; novelty 5/10

## Idea description

Attach an adaptive conformal error radius to every predicted agent and forecast horizon, then use that radius to inflate collision constraints or mask unsafe actions in a learned policy. Unlike a fixed heuristic margin, the radius automatically grows after systematic prediction failures and shrinks when the predictor is accurate, providing an explicit accuracy-versus-conservatism control.

## Mathematical statement

The paper defines the k-step prediction error for human h at time t as \(\delta_{h,k}(t)=\|\mathbf{p}_{h}(t)-\mathbf{p}_{h,k}(t-k)\|_2\), where \(\mathbf{p}_{h}(t)\in\mathbb{R}^2\) is the observed position and \(\mathbf{p}_{h,k}(t-k)\) is the position predicted k steps earlier. For each human h, horizon k, and estimator m, adaptive conformal inference maintains a radius \(\hat{\delta}^{(m)}_{h,k}(t)\) using \(\hat{\delta}^{(m)}_{h,k}(t+1)=\hat{\delta}^{(m)}_{h,k}(t)+\gamma^{(m)}(\mathbf{1}[\delta_{h,k}(t)>\hat{\delta}^{(m)}_{h,k}(t)]-\alpha)\), where \(\gamma^{(m)}>0\) is the update step and \(\alpha\in(0,1)\) is the target miscoverage rate. The update increases the radius by \(\gamma^{(m)}(1-\alpha)\) on an exceedance and decreases it by \(\gamma^{(m)}\alpha\) otherwise, so the radius tracks a desired exceedance frequency under distribution shift. In the neural-network adaptation, define a conservative radius \(r_{h,k}(t)=Q_{1-\beta}(\{\hat{\delta}^{(m)}_{h,k}(t)\}_{m=1}^M)\), where \(Q_{1-\beta}\) is the empirical upper quantile across the M estimators and \(\beta\) controls ensemble conservatism. A predicted collision cost is then \(c_{h,k}=\mathbf{1}[\|\hat{\mathbf{p}}_{h,k}-\mathbf{p}_{\mathrm{robot},k}\|_2\leq R_{\mathrm{robot}}+R_h+r_{h,k}]\), with robot radius \(R_{\mathrm{robot}}\), human radius \(R_h\), and predicted robot position \(\mathbf{p}_{\mathrm{robot},k}\).

## Key formulas

- $$\delta_{h,k}(t)=\left\|\mathbf{p}_{h}(t)-\mathbf{p}_{h,k}(t-k)\right\|_{2}$$
- $$\hat{\delta}^{(m)}_{h,k}(t+1)=\hat{\delta}^{(m)}_{h,k}(t)+\gamma^{(m)}\left(\mathbf{1}\left[\delta_{h,k}(t)>\hat{\delta}^{(m)}_{h,k}(t)\right]-\alpha\right)$$
- $$r_{h,k}(t)=Q_{1-\beta}\left(\left\{\hat{\delta}^{(m)}_{h,k}(t)\right\}_{m=1}^{M}\right),\qquad c_{h,k}=\mathbf{1}\!\left[\left\|\hat{\mathbf{p}}_{h,k}-\mathbf{p}_{\mathrm{robot},k}\right\|_2\le R_{\mathrm{robot}}+R_h+r_{h,k}\right]$$
- $$\mathcal{L}_{\mathrm{policy}}=\mathcal{L}_{\mathrm{task}}+\sum_{j=1}^{J}\lambda_j\left(\frac{1}{H}\sum_{k=1}^{H}c_{j,k}-\tau_j\right),\qquad \lambda_j\leftarrow\left[\lambda_j+\eta_\lambda\left(\frac{1}{H}\sum_{k=1}^{H}c_{j,k}-\tau_j\right)\right]_+$$

## Implementation notes

Integrate the mechanism between the human-motion predictor and the learned action generator. The predictor may be an LSTM, transformer, graph neural network, or diffusion trajectory model producing \(\hat{\mathbf p}_{h,k}\) for humans h and horizons k=1,...,H; the policy or planner receives these predictions and the calibrated radii as additional features, while the collision-cost layer uses them to reject or penalize actions. Maintain a tensor `radius[h,k,m]` and a FIFO buffer of predictions made at previous times. At timestep t: (1) for every delayed forecast with horizon k, retrieve the stored prediction from t-k and compute `delta = norm(observed_position[h,t] - stored_prediction[h,k])`; (2) for each m, update `radius[h,k,m] += gamma[m] * ((delta > radius[h,k,m]) - alpha)`; optionally clamp radii to nonnegative values; (3) compute `r[h,k]` as the empirical `(1-beta)` quantile over m; (4) append the current predictions to the buffer; (5) inflate each collision threshold by `r[h,k]` and either add the resulting costs to the policy loss or hard-mask actions whose predicted cost exceeds a threshold. If training with constraints, estimate each batch cost and update the nonnegative multiplier `lambda[j]` using the displayed projected ascent rule. The mathematical quantities are the delayed errors, online radius recursion, and cost inflation; choose `gamma[m]`, `alpha`, and `beta` by validation. The first cheap test is a small PPO policy with a pretrained 2D pedestrian predictor in a simulated crossing scenario, compared against fixed margins and uncalibrated predictions. Measure empirical miscoverage, collision rate, target-reaching rate, average path length, and policy-gradient variance. Success means the calibrated system maintains collision probability near the selected budget under shifted pedestrian speeds while losing less proximity or task reward than a fixed conservative margin.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: inconclusive
- Verdict: Built and verified an adaptive conformal radius simulator with nonnegative projection, ensemble upper-quantile support, and a shifted crossing safety comparison. The mechanism manifested: stationary exceedance matched target alpha within 0.00009, while post-shift growth and recovery matched inverse-gamma predictions exactly across all sweeps. In the toy crossing scenario, adaptive margins reduced false-safe frames from 80/80 for a small fixed margin to 4/80 while rejecting 20 safe frames versus 120/120 for the conservative fixed margin; this is promising but not evidence of a learned-policy win.

### Mechanism check

- Verdict: Built and verified an adaptive conformal radius simulator with nonnegative projection, ensemble upper-quantile support, and a shifted crossing safety comparison. The mechanism manifested: stationary exceedance matched target alpha within 0.00009, while post-shift growth and recovery matched inverse-gamma predictions exactly across all sweeps. In the toy crossing scenario, adaptive margins reduced false-safe frames from 80/80 for a small fixed margin to 4/80 while rejecting 20 safe frames versus 120/120 for the conservative fixed margin; this is promising but not evidence of a learned-policy win.
- Confidence: 8/10
- Limitations: Only a synthetic one-dimensional crossing proxy was tested; no neural predictor, PPO or policy training, multi-agent trajectories, delayed FIFO prediction buffer, computational-cost measurement, formal finite-sample conformal guarantee, or realistic distribution shifts were evaluated.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.1888
- Paired wins: 3/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_experiment.py](https://synthcore.org/code/832/bench_experiment.py)
- [bench_report.json](https://synthcore.org/code/832/bench_report.json)
- [experiment.py](https://synthcore.org/code/832/experiment.py)
- [report.md](https://synthcore.org/code/832/report.md)
- [report_bench_2026-09-01T113436.md](https://synthcore.org/code/832/report_bench_2026-09-01T113436.md)
- [results.json](https://synthcore.org/code/832/results.json)
- [Download all files as ZIP](https://synthcore.org/download/832)

## Disclaimer

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