{
 "artifacts": [
  {
   "name": "adaptive_shield_experiment.py",
   "url": "https://synthcore.org/code/1087/adaptive_shield_experiment.py"
  },
  {
   "name": "bench_report.json",
   "url": "https://synthcore.org/code/1087/bench_report.json"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1087/report.md"
  },
  {
   "name": "report_bench_2026-09-02T001641.md",
   "url": "https://synthcore.org/code/1087/report_bench_2026-09-02T001641.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1087/results.json"
  },
  {
   "name": "stage2_bench.py",
   "url": "https://synthcore.org/code/1087/stage2_bench.py"
  }
 ],
 "category": "dynamics",
 "description": "Wrap a neural policy with an online disturbance estimator and a zonotopic reachability shield. Instead of rejecting actions using a permanently worst-case disturbance set, update the disturbance zonotope from observed transition residuals and accept an action only when the resulting reachable set remains inside the safe region.",
 "download_zip": "https://synthcore.org/download/1087",
 "formulas_latex": [
  "x_(t+1) = f(x_t, u_t, w_t),   X_(t+1) = A_t X_t plus B_t u_t plus d_t plus W_t",
  "X_t = c_x,t + G_x,t [-1,1]^p,   W_t = c_w,t + G_w,t [-1,1]^q",
  "c_x,(t+1) = A_t c_x,t + B_t u_t + d_t + c_w,t,   G_x,(t+1) = [A_t G_x,t, G_w,t]",
  "u_t is accepted if and only if X_(t+1)(u_t) is a subset of S;   q_j \u003c- max((1-beta)q_j, max_(i in batch) |r_i,j - c_w,j| + epsilon)"
 ],
 "id": 2753,
 "implementation": "1. Integration point: place the shield between a policy network pi_theta and the environment, and optionally use the same reachable-set violation as a policy-training penalty. For a proposed action, linearize a differentiable simulator around the current state, or estimate A_t and B_t with finite differences or a small local dynamics model. 2. Pseudocode: propose u = policy(x); after the next state is observed, compute residual r = x_next - f_nom(x,u); update c_w and q using the robust batch rule above; construct X_next from the current state zonotope and W; if X_next is outside S, project u toward a backup action u_safe or replace it with the action minimizing zonotope constraint violation. During training, add lambda times normalized reachable-set violation to the policy loss. 3. Computed from the paper mechanism: zonotope propagation, set containment, and online disturbance refinement. Estimated empirically: local Jacobians, residual statistics, epsilon, and the probability that the estimated disturbance set covers future residuals. Maintain a held-out residual-coverage monitor and never shrink q below a calibrated quantile plus epsilon. 4. First cheap experiment: train PPO on a two-dimensional point mass with unknown bounded acceleration disturbances, comparing PPO, a fixed worst-case box shield, and the adaptive shield. Sweep disturbance magnitude and adaptation rate. The quantitative prediction is that the adaptive shield's reachable-set generator norm and action-rejection rate decrease after residual burn-in while empirical disturbance coverage remains above 1 minus delta. If the true disturbance scale jumps beyond the learned set, coverage should fail within one batch and q should expand. Measure the largest disturbance magnitude with zero constraint violations over 1000 episodes; the adaptive method should approach the fixed-shield safety boundary within 20 percent while rejecting fewer actions.",
 "math_summary": "For a discrete-time plant x_(t+1) = f(x_t, u_t, w_t), use a local affine model x_(t+1) approximately equals A_t x_t + B_t u_t + d_t + w_t, where x_t is the state, u_t is the neural-policy action, A_t and B_t are local Jacobians or fitted linear dynamics, d_t is a nominal offset, and w_t is bounded disturbance. Represent the current state and disturbance as zonotopes X_t = c_x,t + G_x,t [-1,1]^p and W_t = c_w,t + G_w,t [-1,1]^q. The one-step reachable set is X_(t+1) = A_t X_t plus B_t u_t plus d_t plus W_t, with center c_x,(t+1) = A_t c_x,t + B_t u_t + d_t + c_w,t and generator matrix G_x,(t+1) = [A_t G_x,t, G_w,t]. Given a safety set S, accept the action only if an over-approximation of X_(t+1) is contained in S. For observed residuals r_i = x_(i+1) - f_nom(x_i,u_i), update the disturbance center and axis-aligned radii using c_w,j \u003c- (1-alpha)c_w,j + alpha median_i(r_i,j) and q_j \u003c- max((1-beta)q_j, max_i |r_i,j - c_w,j| + epsilon), where q_j defines W_t = c_w + diag(q) zeta with ||zeta||_infinity \u003c= 1, alpha and beta are adaptation rates, and epsilon is a robustness margin.",
 "math_tags": [
  "control-theory",
  "dynamical-systems",
  "linear-algebra",
  "geometry"
 ],
 "ml_areas": [
  "rl",
  "optimizer",
  "training-dynamics"
 ],
 "paper": {
  "arxiv_id": "2608.26852",
  "arxiv_url": "https://arxiv.org/abs/2608.26852",
  "summary_what_math_gives_to_ml": "The paper provides a constructive mechanism for reducing the conservativeness of formally safe learning: maintain an initially broad bounded disturbance set, refine it online from observed state-transition residuals, and recompute a zonotopic reachable set for the candidate controller. The transferable asset is an adaptive uncertainty shield that replaces fixed worst-case uncertainty with data-supported uncertainty while retaining a computable safety test. In neural networks, this can be inserted as a training-time trust region or inference-time action filter for policy networks, with a falsifiable tradeoff between exploration and certified reachable-set size.",
  "title": "Towards Safe Reinforcement Learning with Reduced Conservativeness: A Case Study on Drone Flight Control",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 6,
  "novelty": 7,
  "usefulness": 7
 },
 "solves": [
  "stability",
  "accuracy",
  "sample-efficiency"
 ],
 "title": "Adaptive Zonotope Safety Shield",
 "url": "https://synthcore.org/idea/2753/adaptive-zonotope-safety-shield",
 "verification": {
  "benchmark": {
   "track": "dynamics",
   "model": "rnn_small",
   "n_seeds": 8,
   "metric_direction": "lower is better",
   "comparison": {
    "baseline_mean": 0,
    "idea_mean": 0.0026812993455678225,
    "delta_mean": -0.00009459593275096267,
    "per_seed_diffs": [],
    "idea_wins": 4,
    "n_pairs": 8,
    "p_value": 0.58435,
    "mde": 0,
    "mde_rel_pct": null,
    "verdict": "no significant win",
    "system_worked": false
   },
   "baseline": {
    "best_cfg": {
     "epochs": 10,
     "lr": 0.01
    },
    "sweep": null,
    "full": {
     "mean": 0,
     "std": 0,
     "per_seed": null,
     "n": 0
    }
   },
   "idea": {
    "mean": 0.0026812993455678225,
    "std": 0,
    "per_seed": [],
    "n": 0
   },
   "mechanism_signature": {
    "confirmed": false,
    "heldout_residual_coverage": 1,
    "observed_residual_center": 0.0000196993350982666,
    "observed_residual_radius_q": 3.6635516929626464,
    "unsafe_point_prediction_rate": 0.06,
    "unsafe_reachable_interval_rate": 1
   },
   "custom_track": null
  },
  "mechanism_confirmed": false,
  "peer_reviewed": false,
  "practical_verdict": "no_effect",
  "stage1_mechanism_check": {
   "worked": true,
   "confidence": 8,
   "verdict": "Built and numerically verified an adaptive axis-aligned disturbance zonotope shield with affine reachability and online median/max-radius updates. The mechanism manifested: zonotope box containment had 0 disagreements over 3000 cases, learned q tracked disturbance amplitude plus epsilon within 0.00292, and a disturbance jump expanded q in the first batch with 100% coverage. However, the tiny shield comparison showed no efficiency or safety win: adaptive rejection was 70.08% versus fixed 66.86%, with violation rates 67.49% versus 66.86%.",
   "metrics": {
    "baseline": "Fixed disturbance box: rejection_rate=0.6686, violation_rate=0.6686",
    "idea": "Adaptive disturbance box: rejection_rate=0.7008, violation_rate=0.6749; scaling q maximum absolute error=0.0029165, minimum held-out coverage=1.0; jump q=0.10362 to 0.31315 in one batch"
   },
   "how_to_run": "python3 adaptive_shield_experiment.py",
   "files": [
    "adaptive_shield_experiment.py",
    "results.json"
   ],
   "limitations": "This is a deterministic toy affine point-mass experiment, not PPO or a learned nonlinear dynamics model. It uses axis-aligned disturbance generators, a zero-action backup, short finite episodes, and does not test multi-step reachability, calibration under distribution shift beyond one jump, computational overhead, or statistically repeated seeds."
  },
  "status": "failed_benchmark",
  "status_label": "Failed on benchmark",
  "updated_at": "2026-09-02T00:16:41",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)"
 }
}
