{
 "artifacts": [
  {
   "name": "dual_gate_experiment.py",
   "url": "https://synthcore.org/code/1225/dual_gate_experiment.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1225/report.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1225/results.json"
  }
 ],
 "category": "dynamics",
 "description": "Attach two independent critics to a learned controller: an empirical probability that executing the controller reaches a desired terminal set, and a recoverability value estimating whether the current state remains inside a safe reach-avoid region. Execute the learned controller only when both critics pass their thresholds; otherwise route to a conservative fallback policy or expert.",
 "download_zip": "https://synthcore.org/download/1225",
 "formulas_latex": [
  "$$\\mathcal{G}_{\\mathrm{stop}}\\subset\\mathcal{S},\\qquad \\mathcal{F}\\subset\\mathcal{S}$$",
  "$$\\pi_{\\mathrm{SS}}(s_t)=\\pi_{\\mathrm{stop}}(s_t)\\quad\\mathrm{iff}\\quad \\hat P_{\\phi}(s_t)\\geq\\eta_p\\ \\text{and}\\ \\hat V_{\\psi}(s_t)\\leq\\eta_r$$",
  "$$g(s)=\\mathbf{1}\\!\\left[\\hat P_{\\phi}(s)\\geq\\eta_p\\ \\land\\ \\hat V_{\\psi}(s)\\leq\\eta_r\\right],\\qquad a_t=g(s_t)\\pi(s_t)+(1-g(s_t))\\pi_{\\mathrm{fallback}}(s_t)$$",
  "$$\\mathcal{L}_{P}=-y\\log \\hat P_{\\phi}(s)-(1-y)\\log(1-\\hat P_{\\phi}(s))$$"
 ],
 "id": 3048,
 "implementation": "(1) Integration point: place the gate immediately before action execution in an RL policy, diffusion-action sampler, or MoE router. The primary policy produces the proposed action, while a conservative fallback produces an alternative. Feed both critics the same normalized state features, including velocity, recent actions, proprioception, contact indicators, and task context if relevant. (2) Pseudocode: sample states from several upstream policies; from each state execute the primary policy for a short horizon; set \\(y=1\\) iff the rollout reaches \\(\\mathcal G\\) without entering \\(\\mathcal F\\); update \\(\\phi\\) with the displayed binary cross-entropy. Separately roll out a fallback policy or learned dynamics model and construct a conservative reach-avoid target for \\(\\psi\\). At inference compute \\(p=\\hat P_\\phi(s)\\) and \\(v=\\hat V_\\psi(s)\\); execute the primary action iff \\(p\\geq\\eta_p\\) and \\(v\\leq\\eta_r\\), otherwise execute fallback. (3) The Boolean gate and threshold logic come directly from the paper; probabilities, recoverability targets, and thresholds are estimated. Calibrate \\(p\\) on held-out trajectories and select thresholds to meet a target failure rate while maximizing primary-policy coverage. (4) First experiment: use PPO on MuJoCo Hopper or Walker2d as the primary controller and a damping or robust-policy controller as fallback. Evaluate under mass perturbations, action delays, observation noise, and initial-state shifts. Compare no gate, one critic, and the dual gate. Success is lower catastrophic-failure rate at equal reward, higher reward at a fixed failure rate, or higher safe primary-policy coverage with similar critic overhead.",
 "math_summary": "The paper defines a safe stopped-state set \\(\\mathcal{G}_{\\mathrm{stop}}\\subset\\mathcal{S}\\), a failure set \\(\\mathcal{F}\\subset\\mathcal{S}\\), a stop-probability estimator \\(\\hat P_{\\phi}(s)\\), and a reach-avoid estimator \\(\\hat V_{\\psi}(s)\\). The first predicts the probability that the primary policy reaches \\(\\mathcal{G}_{\\mathrm{stop}}\\) rather than \\(\\mathcal{F}\\); the second estimates physical recoverability, with lower values safer under the paper's threshold convention. Here \\(s\\) is the current state, \\(\\phi\\) and \\(\\psi\\) are critic parameters, and \\(\\eta_p,\\eta_r\\) are thresholds. The complementary critics are the transferable asset: \\(\\hat P_\\phi\\) captures the actual controller's behavior, while \\(\\hat V_\\psi\\) supplies a controller-independent feasibility signal. For a general policy, define \\(y=1\\) if a rollout reaches goal set \\(\\mathcal G\\) without entering failure set \\(\\mathcal F\\), train \\(\\hat P_\\phi(s)\\approx\\Pr(y=1\\mid s,\\pi)\\), and train \\(\\hat V_\\psi\\) using conservative model or fallback-policy reach-avoid backups. The deployment gate is their conjunction.",
 "math_tags": [
  "control-theory",
  "dynamical-systems",
  "probability"
 ],
 "ml_areas": [
  "rl",
  "world-model",
  "moe-routing"
 ],
 "paper": {
  "arxiv_id": "2609.02358",
  "arxiv_url": "https://arxiv.org/abs/2609.02358",
  "summary_what_math_gives_to_ml": "The paper treats emergency stopping as a reach-avoid decision and combines two complementary learned signals: empirical success probability for a fixed controller and a physical-state recoverability value. The transferable contribution is a conservative policy-switching gate that does not rely on the upstream behavior policy and is therefore suitable under distribution shift. A neural-network adaptation is to enable a primary policy, expert, or action sampler only when both an outcome critic and a dynamics-based recoverability critic agree, with temporal persistence suppressing transient false positives.",
  "title": "Humanoid Safe Stop via Learned Stoppability Value",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 6,
  "novelty": 6,
  "usefulness": 7
 },
 "solves": [
  "stability",
  "accuracy",
  "generalization"
 ],
 "title": "Dual recoverability gate for policy switching",
 "url": "https://synthcore.org/idea/3048/dual-recoverability-gate-for-policy-switching",
 "verification": {
  "peer_reviewed": false,
  "stage1_mechanism_check": {
   "worked": false,
   "confidence": 9,
   "verdict": "Built a reproducible toy dual-recoverability policy gate with learned primary-success and fallback-failure critics, plus ungated and probability-only baselines. The formula check passed exactly and stricter thresholds produced a subset, while probability gating reduced catastrophic failure from 65.80% to 13.28%; however, the dual gate was identical to the probability-only gate (13.28% failure, 81.16% success, 41.44% primary coverage), so the independent recoverability critic showed no incremental effect in this experiment.",
   "metrics": {
    "baseline": "Ungated primary: catastrophic_failure_rate=0.6580, goal_success_rate=0.3382, primary_coverage=1.0000",
    "idea": "Dual gate: catastrophic_failure_rate=0.1328, goal_success_rate=0.8116, primary_coverage=0.4144; probability-only gate had exactly the same metrics"
   },
   "how_to_run": "python3 dual_gate_experiment.py",
   "files": [
    "dual_gate_experiment.py",
    "results.json"
   ],
   "limitations": "This is a one-dimensional synthetic control task, not PPO/MuJoCo, and uses logistic critics with hand-designed policies and fixed thresholds. It does not test calibration, delayed observations, multiple disturbances, learned dynamics, compute overhead, or whether a better independent recoverability estimator would add value."
  },
  "status": "mechanism_failed",
  "status_label": "Mechanism failed",
  "updated_at": "2026-09-03T12:53:36",
  "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
   }
  }
 }
}
