{
 "artifacts": [
  {
   "name": "README.md",
   "url": "https://synthcore.org/code/1007/README.md"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1007/report.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1007/results.json"
  },
  {
   "name": "shield_experiment.py",
   "url": "https://synthcore.org/code/1007/shield_experiment.py"
  }
 ],
 "category": "dynamics",
 "description": "Wrap a neural controller with an explicit robust-MPC shield represented by affine feedback laws indexed by polyhedral state regions. The neural action is accepted when it satisfies robust one-step constraints and a decrease condition; otherwise the shield applies the precomputed affine MPC action or the smallest correction toward it. This gives neural control fixed inference time and a verifiable fallback without solving an online quadratic program.",
 "download_zip": "https://synthcore.org/download/1007",
 "formulas_latex": [
  "$$x_{k+1}=Ax_k+Bu_k+w_k,\\qquad w_k\\in\\mathcal W,$$",
  "$$\\mathcal P_i=\\{x:H_i x\\le h_i\\},\\qquad u_{\\mathrm{MPC}}(x)=K_i x+g_i\\quad\\text{for }x\\in\\mathcal P_i,$$",
  "$$F_x(Ax+Bu)+\\max_{w\\in\\mathcal W}F_xw\\le f_x,$$",
  "$$V(Ax+B\\pi(x)+w)-V(x)\\le-\\alpha\\|x-x_*\\|_2^2\\quad\\forall x\\in\\mathcal R_i,\\;w\\in\\mathcal W.$$"
 ],
 "id": 2685,
 "implementation": "Integrate this as an inference-time wrapper around a continuous-control MLP, actor network, or RL policy. First solve robust finite-horizon QPs offline with a multiparametric-QP solver, retaining every polyhedral region $H_i x\\le h_i$, affine action coefficient pair $(K_i,g_i)$, terminal or invariant-set certificate, and disturbance support value $d_j=\\max_{w\\in\\mathcal W}F_{x,j}w$. Build a region lookup structure using a decision tree, active-set hash, or vectorized half-space tests. At runtime, compute $u_\\theta=\\pi_\\theta(x)$, identify the region containing $x$, and evaluate input bounds, robust next-state inequalities, and the Lyapunov decrease margin. If any condition fails, return $u=K_i x+g_i$; alternatively find the smallest $\\lambda\\in[0,1]$ such that $u=(1-\\lambda)u_\\theta+\\lambda u_i$ is certified. Pseudocode: `i=find_region(x); u_nn=pi(x); if not safe(x,u_nn): u=K[i]@x+g[i]; else: u=u_nn`. The paper supplies the explicit regions, affine laws, disturbance set, and reachability certificate; neural action statistics and fallback frequency are measured empirically. First test on a 2D double integrator with an MLP actor, bounded uniform disturbances, and robust MPC teacher, sweeping disturbance radius $\\gamma$ and policy gain. The predicted signature is a sharp safety boundary: violations remain zero below the certified disturbance bound, while the unshielded policy violates constraints earlier. The shielded loop should enter the terminal set by the precomputed horizon $N$, within numerical tolerance, and fallback frequency should increase when the policy leaves certified regions.",
 "math_summary": "For the disturbed linear plant $x_{k+1}=Ax_k+Bu_k+w_k$, with $w_k\\in\\mathcal W$, precompute explicit MPC regions $\\mathcal P_i=\\{x:H_i x\\le h_i\\}$ and affine controls $u_i(x)=K_i x+g_i$. The shield selects region $i$ and uses $u_i(x)$ whenever the learned action $u_\\theta(x)$ is unsafe. A robust one-step constraint $F_x(Ax+Bu)+\\max_{w\\in\\mathcal W}F_xw\\le f_x$ guarantees $x_{k+1}\\in\\mathcal X$ for every disturbance. If a robust terminal or Lyapunov condition $V(Ax+Bu+w)-V(x)\\le-\\alpha\\|x-x_*\\|^2$ holds on every reachable region, then the shielded loop contracts toward the target. Here $A,B$ are plant matrices, $F_xx\\le f_x$ defines the state polytope, $K_i,g_i$ are stored controller coefficients, $u_\\theta$ is the neural action, $V$ is positive definite, and $\\alpha\u003e0$ is the contraction margin.",
 "math_tags": [
  "control-theory",
  "dynamical-systems",
  "optimization",
  "geometry"
 ],
 "ml_areas": [
  "optimizer",
  "rl",
  "training-dynamics"
 ],
 "paper": {
  "arxiv_id": "2608.22458",
  "arxiv_url": "https://arxiv.org/abs/2608.22458",
  "summary_what_math_gives_to_ml": "The paper provides a concrete pipeline for converting finite-horizon robust MPC into a fixed-time piecewise-affine controller and certifying disturbed closed-loop behavior offline with hybrid-zonotope reachability. Its transferable asset is the combination of region-indexed affine feedback, bounded-disturbance set propagation, and a finite-horizon terminal or invariant-set certificate. A neural policy can use the explicit controller as a hard safety shield, a teacher for region-aware distillation, or a locally affine fallback around an unconstrained learned policy. The key falsifiable prediction is that certified reachable sets remain inside constraints and enter the terminal set after a predicted number of steps, while an unshielded network violates these boundaries when disturbance magnitude or policy gain crosses a measurable threshold.",
  "title": "Certifiable Explicit Model Predictive Control for Spacecraft Rendezvous under Bounded Disturbances",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 5,
  "novelty": 5,
  "usefulness": 8
 },
 "solves": [
  "stability",
  "accuracy",
  "sample-efficiency"
 ],
 "title": "Explicit-MPC Safety Shield for Neural Policies",
 "url": "https://synthcore.org/idea/2685/explicit-mpc-safety-shield-for-neural-policies",
 "verification": {
  "peer_reviewed": false,
  "stage1_mechanism_check": {
   "worked": false,
   "confidence": 9,
   "verdict": "Built an explicit affine-MPC-style safety shield for a disturbed 2D double integrator, including exact box-disturbance support checks, robust one-step screening, fallback control, and correction toward the fallback. The support-function error was 0 and the predicted local disturbance boundary gamma=2.0 matched the observed boundary 2.0; fallback frequency increased from 0.020 at policy scale 0.5 to 0.404 at scale 3.0. The overall safety win was not observed: at gamma=0.3 and 0.6, shield violation rates were 0.0087 and 0.173 versus 0.0027 and 0.136 unshielded, so this MVP does not justify claiming success.",
   "metrics": {
    "baseline": "Unshielded violation rates by gamma [0, 0.1, 0.3, 0.6, 1.0]: [0.000, 0.000, 0.0027, 0.1357, 0.5027].",
    "idea": "Shielded violation rates: [0.000, 0.000, 0.0087, 0.1727, 0.5180]; fallback rates: [0.0617, 0.0700, 0.2850, 0.5817, 0.8553]. Support error was 0; predicted/observed boundary was 2.0/2.0; closed-loop spectral radius was 0.6762."
   },
   "how_to_run": "python3 shield_experiment.py",
   "files": [
    "shield_experiment.py",
    "results.json",
    "README.md"
   ],
   "limitations": "This is not a true multiparametric-QP explicit-MPC partition: it uses one affine LQR fallback as a degenerate region and does not compute offline robust invariant or terminal sets. The correction uses a finite grid, the policy is synthetic rather than trained, disturbance rollouts are small, and no runtime/FLOP comparison or higher-dimensional benchmark was tested."
  },
  "status": "mechanism_failed",
  "status_label": "Mechanism failed",
  "updated_at": "2026-09-01T18:02:17",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)"
 }
}
