{
 "artifacts": [
  {
   "name": "barrier_experiment.py",
   "url": "https://synthcore.org/code/1057/barrier_experiment.py"
  },
  {
   "name": "bench_report.json",
   "url": "https://synthcore.org/code/1057/bench_report.json"
  },
  {
   "name": "obb_bench.py",
   "url": "https://synthcore.org/code/1057/obb_bench.py"
  },
  {
   "name": "obb_track.py",
   "url": "https://synthcore.org/code/1057/obb_track.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1057/report.md"
  },
  {
   "name": "report_bench_2026-09-01T232304.md",
   "url": "https://synthcore.org/code/1057/report_bench_2026-09-01T232304.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1057/results.json"
  }
 ],
 "category": "regularization",
 "description": "Add a geometric barrier loss to a neural trajectory generator or scorer using separating-axis margins between ego and predicted-agent oriented bounding boxes. The barrier is differentiable almost everywhere and has direct collision meaning, unlike an arbitrary proximity penalty.",
 "download_zip": "https://synthcore.org/download/1057",
 "formulas_latex": [
  "$$r_A(n)=a_A|u_A^T n|+b_A|v_A^T n|,\\qquad r_B(n)=a_B|u_B^T n|+b_B|v_B^T n|.$$",
  "$$g_n=|n^T(c_B-c_A)|-r_A(n)-r_B(n),\\qquad b(A,B)=\\max_{n\\in\\{u_A,v_A,u_B,v_B\\}}g_n.$$",
  "$$\\widetilde b_\\tau=\\tau\\log\\left(\\sum_n\\exp(g_n/\\tau)\\right),\\qquad \\mathcal{L}_{barrier}=\\sum_{t,j}\\operatorname{softplus}\\left((m_0-\\widetilde b_{\\tau,tj})/\\beta\\right).$$"
 ],
 "id": 2746,
 "implementation": "1. Integration point: make a neural planner output ego poses and box dimensions over a horizon, or output a score for each candidate trajectory. Obtain surrounding-agent boxes from logged future states, a learned predictor, or a simulator. Compute the barrier at every time and for every agent, and add lambda_b times the barrier loss to imitation learning, supervised trajectory prediction, or the RL objective. At inference, report the minimum barrier and reject or rerank candidates below threshold m_0. 2. Pseudocode: construct the four axes from the two box orientations; compute smoothed absolute projections, projected radii, and g_n; compute the log-sum-exp margin; accumulate softplus((m_0-margin)/beta); backpropagate through the trajectory network. Start with tau=0.1 meters and beta=0.05 meters. 3. Computed from the mechanism: axes, projections, radii, barrier values, and gradients. Estimated empirically: lambda_b, m_0, beta, and prediction error in other-agent boxes. 4. First experiment: train a small MLP or transformer on nuScenes or nuPlan with and without this loss, then evaluate exact polygon or OBB signed clearance independently. The predicted signature is b(A,B)\u003c=d_exact(A,B) for separated boxes and a sharp increase in collision rate when the minimum barrier crosses zero. At least 95 percent of positive-barrier cases should have nonnegative exact clearance, and the smoothed zero crossing should be within 0.1 meters of the exact SAT crossing.",
 "math_summary": "For rectangles A and B, let c_A,c_B be centers, u_A,v_A,u_B,v_B unit body axes, and a_A,b_A,a_B,b_B half-lengths and half-widths. For each separating-axis candidate n in {u_A,v_A,u_B,v_B}, the projected half-width is r_A(n)=a_A|u_A^T n|+b_A|v_A^T n| and similarly for B. The signed projection gap is g_n=|n^T(c_B-c_A)|-r_A(n)-r_B(n). The separating-axis margin is b(A,B)=max_n g_n. For separated convex rectangles, positive b is a conservative lower bound on Euclidean clearance; b\u003c=0 indicates that no tested axis certifies separation. Smooth absolute values and maxima permit backpropagation.",
 "math_tags": [
  "geometry",
  "optimization",
  "control-theory"
 ],
 "ml_areas": [
  "optimizer",
  "rl",
  "world-model"
 ],
 "paper": {
  "arxiv_id": "2608.26533",
  "arxiv_url": "https://arxiv.org/abs/2608.26533",
  "summary_what_math_gives_to_ml": "The paper provides two transferable mechanisms for neural trajectory systems: a differentiable separating-axis barrier margin that lower-bounds exact oriented-box clearance, and split conformal calibration that converts an imperfect predicted margin into a statistically valid lower safety certificate. The barrier can be used as a training loss or inference-time rejection criterion for trajectory generators, scorers, world models, and reinforcement-learning policies. The conformal procedure can calibrate the margin of the actually selected neural trajectory without requiring the predictor itself to be statistically correct. Both mechanisms produce falsifiable signatures: the geometric barrier should conservatively track exact collision clearance, while held-out coverage should approach or exceed the target level under exchangeable episodes.",
  "title": "Barrier Function Conformal Safety Clearance Certification with CVaR for Driving Trajectory Selection",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 5,
  "novelty": 6,
  "usefulness": 8
 },
 "solves": [
  "stability",
  "accuracy",
  "generalization"
 ],
 "title": "Differentiable Separating-Axis Clearance Barrier",
 "url": "https://synthcore.org/idea/2746/differentiable-separating-axis-clearance-barrier",
 "verification": {
  "benchmark": {
   "track": "obb_clearance_trajectory",
   "model": "mlp_tiny",
   "n_seeds": 8,
   "metric_direction": "lower is better",
   "comparison": {
    "baseline_mean": 0.1175788217,
    "idea_mean": 0.1973940274,
    "delta_mean": 0.0798152057,
    "per_seed_diffs": [
     0.0090347528,
     0.0072152764,
     0.1178882979,
     0.0579231009,
     0.0704892874,
     0.3186583668,
     -0.0088993609,
     0.06621192396
    ],
    "idea_wins": 1,
    "n_pairs": 8,
    "p_value": 0.02415,
    "mde": 0,
    "mde_rel_pct": null,
    "verdict": "idea worse (significant)",
    "system_worked": false
   },
   "baseline": {
    "best_cfg": {
     "epochs": 24,
     "lr": 0.01
    },
    "sweep": [
     {
      "cfg": {
       "epochs": 24,
       "lr": 0.001
      },
      "mean": 2.5900412798
     },
     {
      "cfg": {
       "epochs": 24,
       "lr": 0.003
      },
      "mean": 1.0762107968
     },
     {
      "cfg": {
       "epochs": 24,
       "lr": 0.01
      },
      "mean": 0.0882154824
     }
    ],
    "full": {
     "mean": 0.1175788217,
     "std": 0.0498898437,
     "per_seed": [
      0.1170619577,
      0.1304021031,
      0.0387990363,
      0.0665988326,
      0.1332305372,
      0.2189174742,
      0.1324296296,
      0.1031910032
     ],
     "n": 8
    }
   },
   "idea": {
    "mean": 0.1973940274,
    "std": 0.1311616229,
    "per_seed": [
     0.1260967106,
     0.1376173794,
     0.1566873342,
     0.1245219335,
     0.2037198246,
     0.537575841,
     0.1235302687,
     0.1694029272
    ],
    "n": 8
   },
   "mechanism_signature": {
    "confirmed": true,
    "math_check": {
     "observed_exact_zero_m": 1.1,
     "observed_smooth_zero_m": 1.03,
     "predicted_exact_zero_m": 1.1,
     "smoothing_bound_holds": true
    },
    "predicted_vs_observed": {
     "observed_collision_fraction": 0.3025781,
     "observed_exact_sat_margin_mean": -0.4316907,
     "predicted_smoothed_margin_mean": 0.2649075
    },
    "prediction": "barrier should reduce collision fraction and move margins upward"
   },
   "custom_track": {
    "domain": "geometric_collision_avoidance",
    "file": "obb_track.py",
    "name": "obb_clearance_trajectory"
   }
  },
  "mechanism_confirmed": true,
  "peer_reviewed": false,
  "practical_verdict": "harms",
  "stage1_mechanism_check": {
   "worked": true,
   "confidence": 8,
   "verdict": "Built a differentiable oriented-box SAT barrier with smooth absolute projections, log-sum-exp margin, and softplus clearance loss. The exact axis-aligned zero crossing occurred at 2.00 m as predicted, while the tau=0.1 smoothed crossing was 1.95 m (0.05 m bias, within the 0.1 m target); smoothing errors stayed below tau*log(4), and gradients approached 1.0 on the active separating axis. In the tiny planner experiment, the barrier reduced collision fraction from 88.9% to 3.5% and improved minimum margin from -0.998 to -0.133, but increased imitation MSE from 2.7e-5 to 0.309, so the safety effect is real but not a Pareto win under this weighting.",
   "metrics": {
    "baseline": "MSE 2.71e-05; minimum SAT margin -0.998 m; collision fraction 88.9%",
    "idea": "MSE 0.309; minimum SAT margin -0.133 m; collision fraction 3.52%; exact crossing 2.00 m; smoothed crossing 1.95 m; smoothing bound and gradients verified"
   },
   "how_to_run": "python3 barrier_experiment.py",
   "files": [
    "barrier_experiment.py",
    "results.json"
   ],
   "limitations": "Only a synthetic axis-aligned obstacle and a small MLP were tested; no nuScenes/nuPlan data, rotated-box polygon benchmark, multi-agent forecasting, hyperparameter sweep, FLOP-normalized comparison, or inference reranking evaluation was performed."
  },
  "status": "mech_ok_no_baseline",
  "status_label": "Mechanism confirmed, baseline not beaten",
  "updated_at": "2026-09-01T23:23:04",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)"
 }
}
