{
 "artifacts": [
  {
   "name": "anytime_pd.py",
   "url": "https://synthcore.org/code/1131/anytime_pd.py"
  },
  {
   "name": "benchmark.py",
   "url": "https://synthcore.org/code/1131/benchmark.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1131/report.md"
  },
  {
   "name": "run_experiment.py",
   "url": "https://synthcore.org/code/1131/run_experiment.py"
  }
 ],
 "category": "theory",
 "description": "Estimate the largest certified input perturbation radius for a neural network using nested reduced primal and dual linear programs rather than solving the complete verification LP immediately. The primal sequence gives certified feasible robustness reserves, while the dual sequence gives valid upper bounds; verification may stop as soon as the interval width is below a prescribed tolerance.",
 "download_zip": "https://synthcore.org/download/1131",
 "formulas_latex": [
  "$$r^{\\star}=\\max_{v}\\ c^{\\mathsf T}v\\quad\\text{s.t.}\\quad Av\\leq b,$$",
  "$$L_j=\\max_{\\theta}\\ c^{\\mathsf T}S_j\\theta\\quad\\text{s.t.}\\quad AS_j\\theta\\leq b,\\qquad L_j\\leq r^{\\star},$$",
  "$$U_j=\\min_{\\alpha\\geq0}\\ b^{\\mathsf T}T_j\\alpha\\quad\\text{s.t.}\\quad A^{\\mathsf T}T_j\\alpha=c,\\qquad r^{\\star}\\leq U_j,$$",
  "$$L_j\\leq L_{j+1}\\leq r^{\\star}\\leq U_{j+1}\\leq U_j,\\qquad W_j=U_j-L_j.$$"
 ],
 "id": 2930,
 "implementation": "Integrate this into a verifier for a trained ReLU MLP or CNN whose local robustness problem can be expressed as an LP relaxation. For input x and a target class margin, build a sound linear relaxation: input variables satisfy perturbation constraints, affine layers contribute equality constraints, and each ReLU contributes convex-hull inequalities using preactivation bounds. Put all variables and the radius r into v, construct A, b, and c, and initialize S0 from nominal forward-path variables and T0 from dual multipliers associated with input and output-margin constraints. Pseudocode is: build (A,b,c); initialize S,T; repeat solve max c^T S theta subject to AS theta\u003c=b; solve min b^T T alpha subject to A^T T alpha=c and alpha\u003e=0; record [L,U]; if U-L\u003c=tau*max(1,abs(U)), stop; otherwise add variables with largest primal reduced-cost or constraint-violation score and dual directions with largest residual, then expand S and T. The neural LP relaxation is standard; the transferred mechanism is the independently valid, monotone primal-dual hierarchy. Compute all certificate inequalities in the reduced solver and directly check their residuals in the full space. Test first on small MNIST ReLU networks against a full LP verifier and a warm-started full solve under equal time budgets. Include primal-only and dual-only ablations. The preregistered signature is monotone L_j and U_j with nonincreasing W_j at every expansion, at least 99.9% interval coverage of the full LP optimum, and at least 2x median speedup to a 2% relative width. Reject the transfer if any certificate excludes the full optimum, if W_j increases on more than 1% of expansions, or if target-width time is not lower than the warm-started baseline.",
 "math_summary": "Represent a sound convex relaxation of a neural network and a desired output-margin constraint as the parametric LP $r^{\\star}=\\max_{v} c^{\\mathsf T}v$ subject to $Av\\leq b$, where $v$ contains neuron bounds, relaxation variables, and the perturbation radius $r$, $c$ extracts $r$, $A$ is the relaxation constraint matrix, and $b$ contains input, activation, and margin limits. For a primal subspace $v=S_j\\theta$, with basis matrix $S_j$, any feasible reduced solution gives $L_j=c^{\\mathsf T}S_j\\theta_j\\leq r^{\\star}$. The dual LP is $U^{\\star}=\\min_{y\\geq0}b^{\\mathsf T}y$ subject to $A^{\\mathsf T}y=c$, where $y$ contains nonnegative constraint multipliers. Restricting the dual to $y=T_j\\alpha$ gives a feasible dual point and upper bound $U_j=b^{\\mathsf T}T_j\\alpha_j\\geq r^{\\star}$. Nested spaces imply $L_{j+1}\\geq L_j$ and $U_{j+1}\\leq U_j$. The verifier stops when $U_j-L_j\\leq\\tau\\max(1,|U_j|)$; exact primal and dual spaces yield equality by strong LP duality.",
 "math_tags": [
  "optimization",
  "linear-algebra",
  "control-theory",
  "dynamical-systems"
 ],
 "ml_areas": [
  "mlp",
  "cnn",
  "transformer",
  "regularization"
 ],
 "paper": {
  "arxiv_id": "2608.28056",
  "arxiv_url": "https://arxiv.org/abs/2608.28056",
  "summary_what_math_gives_to_ml": "The paper provides a transferable anytime-certification mechanism: solve a constrained reserve problem through nested primal and dual correction spaces, producing monotone lower and upper certificates even when the active set changes. The key asset for neural networks is not robust MPC itself, but the fact that every reduced solve is already safe, while expanding primal and dual subspaces monotonically contracts the certificate interval and becomes exact after finitely many basis directions. A strong transfer is certified adversarial-radius estimation for neural networks, where reduced LP-relaxation solves can provide valid robustness certificates before the full verification problem is completed.",
  "title": "Anytime Primal--Dual Certification of the Maximum Disturbance Radius in Robust MPC",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 6,
  "novelty": 6,
  "usefulness": 8
 },
 "solves": [
  "stability",
  "accuracy",
  "speedup"
 ],
 "title": "Anytime Primal-Dual Neural Robustness Radius",
 "url": "https://synthcore.org/idea/2930/anytime-primal-dual-neural-robustness-radius",
 "verification": {
  "peer_reviewed": false,
  "stage1_mechanism_check": {
   "worked": false,
   "confidence": 9,
   "verdict": "Built a generic reduced primal-dual LP hierarchy with explicit full-space residual and coverage checks, plus deterministic toy verification and repeated timing benchmark. The claimed certificate behavior was observed: all intervals covered the full optimum, lower bounds increased, upper bounds and widths were nonincreasing, and the final level attained strong duality. However, the MVP did not demonstrate the promised speedup: median cumulative hierarchy time was 0.0742 s versus 0.00692 s for a full solve, and the 2% width target was reached only at the final level; moreover, the dual hierarchy was oracle-seeded with the full dual optimizer.",
   "metrics": {
    "baseline": "Full LP: median 0.00692 s across 5 trials; exact optimum solved directly.",
    "idea": "Oracle-seeded reduced hierarchy: median 0.0742 s for all levels, 10.7x slower; 2% relative-width stopping occurred at level 11/11 in every trial. Toy checks showed 100% coverage and monotonicity across tested levels."
   },
   "how_to_run": "python3 run_experiment.py \u0026\u0026 /home/maxwelhelp/main/bin/python3 benchmark.py",
   "files": [
    "anytime_pd.py",
    "run_experiment.py",
    "benchmark.py"
   ],
   "limitations": "No ReLU MLP/CNN relaxation was built, no MNIST experiment was run, and no fair non-oracle dual-space initialization or warm-started solver comparison was implemented. The benchmark is small and uses SciPy HiGHS, so it does not establish neural verification performance."
  },
  "status": "mechanism_failed",
  "status_label": "Mechanism failed",
  "updated_at": "2026-09-02T12:05:03",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)",
  "verification_axes": {
   "benchmark_mechanism": {
    "confirmed": null,
    "tested": false
   },
   "practical_benchmark": {
    "beats_baseline": null,
    "tested": false
   },
   "toy_mechanism_gate": {
    "confirmed": false,
    "tested": true
   }
  }
 }
}
