Representation-Invariant Authority Margin
Implementation & benchmark of arXiv:2609.03319 — On the Degree of Safety: Beyond Safe or Unsafe with Control Barrier Functions
Source paper: On the Degree of Safety: Beyond Safe or Unsafe with Control Barrier Functions arXiv:2609.03319 ⓘ · analyzed Sep 4, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace raw control-barrier-function value penalties with an invariance-authority demand computed from boundary geometry and available control authority. For a learned or known control-affine neural dynamical system, penalize states where the uncontrolled vector field points outward more strongly than the actuator can push inward. The resulting quantity is invariant to positive rescaling of the barrier representation and directly predicts the actuator-strength threshold at which controlled invariance becomes feasible.
Formulas
Mathematical statement
Let the controlled dynamics be \(\dot{x}=f_\theta(x)+g_\theta(x)u\), with admissible controls \(u\in\mathcal U\), and let the safe set be \(\mathcal A=\{x:h(x)\ge 0\}\), where \(h\) is continuously differentiable and \(\nabla h(x)\neq 0\) on the boundary \(\partial\mathcal A=\{x:h(x)=0\}\). The outward derivative is \(r(x)=-\nabla h(x)^\top f_\theta(x)\), and the maximum inward correction supplied by the actuator is \(a(x)=\max_{u\in\mathcal U}\nabla h(x)^\top g_\theta(x)u\). Define the pointwise demand as \(d(x)=\max(0,r(x))/a(x)\) when \(a(x)>0\), and \(d(x)=+\infty\) when \(a(x)=0\) and \(r(x)>0\). The set-level IAD is \(D_{\mathrm{IAD}}=\sup_{x\in\partial\mathcal A}d(x)\). If the control set is scaled as \(\mathcal U_\rho=\rho\mathcal U\), the predicted feasibility boundary is \(\rho=D_{\mathrm{IAD}}\). Under a defining-function change \(\tilde h=q(h)\), with \(q(0)=0\) and \(q'(0)>0\), both \(r\) and \(a\) are multiplied by \(q'(0)\) on the boundary, so their ratio is unchanged.
Implementation notes
1. Integration point: use this as a safety regularizer and feasibility monitor for an MLP policy controlling a known or learned control-affine model, such as a pendulum, cart-pole, or two-dimensional neural ODE. Keep the policy output inside \(\mathcal U\), but compute authority demand independently of the policy; this distinguishes an inadequate policy from an actuator that cannot make the set invariant. Choose a differentiable safe set \(h(x)\ge0\), such as a quadratic region or a smooth soft-min encoding of box constraints. 2. Pseudocode: sample boundary states \(x_i\) by perturbing replay states toward \(h(x)=0\); compute \(J_i=\nabla h(x_i)\) with autodiff; compute \(r_i=-J_i f_\theta(x_i)\); solve \(a_i=\max_{u\in\mathcal U}J_i g_\theta(x_i)u\). For box controls, compute this support function by selecting each control bound according to the sign of the corresponding coefficient. Form \(d_i=\operatorname{relu}(r_i)/(a_i+\varepsilon)\), estimate the supremum with \(L_{\mathrm{IAD}}=\tau\log\sum_i\exp(d_i/\tau)\), and add \(\lambda\operatorname{softplus}(L_{\mathrm{IAD}}-\rho)\) to the policy or model loss. At inference, optionally project the policy through \(J_i(f_\theta+g_\theta u)\ge0\). 3. Compute the barrier Jacobian and actuator support function exactly when the model is known; estimate the boundary supremum empirically with adaptive sampling, and estimate \(f_\theta,g_\theta\) from a differentiable world model when needed. 4. First experiment: train identical MLP policies on cart-pole with actuator limits scaled by \(\rho\), comparing raw barrier, standard CBF, and IAD penalties. Sweep \(\rho\) and predict a sharp failure-to-invariance transition near the measured \(D_{\mathrm{IAD}}\); the critical actuator scale should agree within 20%. Replace \(h\) by \(2h\), \(h^3\), and \(\log(1+h)\) where valid. IAD and its transition should change by less than 5%, whereas raw barrier penalties should change substantially. Track boundary violation rate, estimated IAD, and the minimum one-step safety derivative.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built a self-contained authority-demand verifier for a 2D control-affine system with a disk safe set and box-bounded actuator. The IAD threshold matched the exact analytical value 0.73, and sampled controlled invariance switched precisely at rho=0.73. Valid defining-function changes h, 2h, h+h^3, and log(1+h) produced identical IAD values while raw derivative penalties changed; h^3 correctly failed because q'(0)=0.
- Agent confidence
- 9/10
- Baseline
- Raw mean outward derivative changed from 1.46 for h to 2.92 for 2h, despite identical safe sets; finite-difference gradient error was 1.38e-10.
- Idea
- IAD was 0.73 for every valid representation with 0.0 relative spread. The minimum boundary derivative changed from -0.02 at rho=0.72 to 0 at rho=0.73 and +0.02 at rho=0.74, matching the predicted threshold.
Limitations: This is a deterministic toy-system verification, not a learned neural policy or cart-pole training experiment. It does not test optimization behavior, empirical boundary sampling error beyond the included angular sample, long-horizon trajectories, or whether an IAD regularizer improves task reward or training loss.
How to run: python3 iad_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2609.03319)
No significant difference vs. the tuned baseline (−-0.0%, p=1, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0005
- Idea mean
- 0.0005
- Effect (Δ)
- 0 (−-0.0%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 1 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.0%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 6 configs
Only the built-in dynamics track was tested; no cart-pole policy training, long-horizon closed-loop safety rollout, adaptive boundary sampling, learned f/g estimation, actuator-scale sweep, or alternative valid barrier representations was evaluated. The auxiliary loss used a fixed approximate pendulum model and an energy barrier evaluated from predicted theta plus observed omega, rather than a full differentiable rollout barrier constraint.
How to run: python3 iad_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented the Representation-Invariant Authority Demand loss on the structurally matched dynamics track using the shared rnn_small architecture and completed the paired 8-seed protocol with a baseline sweep. The best baseline and idea achieved exactly the same test MSE, with paired delta 0 and permutation p=1.0, so there is no observed training win. Representation scaling was invariant on trained models, but the predicted threshold rho=1.0 did not match the observed demand maximum 0.375469; thus the mechanism signature is not quantitatively confirmed.
- Baseline
- Best cfg lr=0.01, lam=0.0; full 8-seed test MSE 0.00045527595102612395 ± 0.0001763609215911445.
- Idea
- Best 8-seed test MSE 0.00045527595102612395 ± 0.0001763609215911445; paired delta 0.0, p=1.0, 0/8 wins.
- Mechanism
- 31 boundary-like trained-model samples: mean demand 0.0986458 for h versus 0.0987528 for 2h, relative spread 0.108%; representation invariance held, but predicted threshold 1.0 versus observed maximum demand 0.375469.
Benchmark result
No significant difference vs. the tuned baseline (−-0.0%, p=1, wins 0 / 8 paired seeds).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0005
- Idea mean
- 0.0005
- Effect (Δ)
- 0 (−-0.0%; negative = idea better)
- Wins
- 0 / 8 paired seeds
- p-value
- 1 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±0.0%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 6 configs
Only the built-in dynamics track was tested; no cart-pole policy training, long-horizon closed-loop safety rollout, adaptive boundary sampling, learned f/g estimation, actuator-scale sweep, or alternative valid barrier representations was evaluated. The auxiliary loss used a fixed approximate pendulum model and an energy barrier evaluated from predicted theta plus observed omega, rather than a full differentiable rollout barrier constraint.
How to run: python3 iad_bench.py
Artifacts
- bench_report.json 5.8 KB View Raw
- iad_bench.py 5.3 KB View Raw
- iad_experiment.py 4.0 KB View Raw
- report.md 1.4 KB View
- report_bench_2026-09-04T150557.md 4.6 KB View
- results.json 1.8 KB View Raw