{
 "artifacts": [
  {
   "name": "proper_kernel_experiment.py",
   "url": "https://synthcore.org/code/1134/proper_kernel_experiment.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1134/report.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1134/results.json"
  }
 ],
 "category": "dynamics",
 "description": "Attach a dynamic space-time barrier filter to a neural policy instead of directly imposing a noisy, memoryless CBF constraint on its action. The filter state integrates recent barrier residuals with a proper low-pass kernel, while the online safety QP continues to depend affinely on the policy correction, so high-frequency observation noise is attenuated without removing control authority.",
 "download_zip": "https://synthcore.org/download/1134",
 "formulas_latex": [
  "$$q(x,u)=\\nabla h(x)^{\\top}\\left[f(x)+g(x)u\\right]+\\alpha h(x),\\qquad \\mathcal{C}=\\{x:h(x)\\geq0\\}.$$",
  "$$z(t)=\\int_{0}^{t}ae^{-a(t-s)}q(x(s),u(s))\\,ds+e^{-at}z(0),\\qquad \\dot z=-az+aq.$$",
  "$$\\dot z+\\kappa z\\geq0\\quad\\Longleftrightarrow\\quad \\nabla h(x)^{\\top}g(x)u\\geq-\\nabla h(x)^{\\top}f(x)-\\alpha h(x)+(1-\\kappa/a)z.$$",
  "$$|K_a(i\\omega)|=\\frac{a}{\\sqrt{a^2+\\omega^2}},\\qquad \\mathrm{TV}(u)\\text{ should decrease mainly for }\\omega\\gg a.$$"
 ],
 "id": 2961,
 "implementation": "1. Integration point: use a differentiable MLP or recurrent policy $\\pi_\\theta(o_t)$ in a simulated robot or low-dimensional continuous-control environment. At every control step, estimate $h(x_t)$ and its gradient, maintain one scalar filter state $z_t$ per safety constraint, and solve a projection QP that finds the smallest correction $\\Delta u_t$ to the policy action. 2. Pseudocode: compute $u_\\pi=\\pi_\\theta(o_t)$; estimate $q_\\pi=\\nabla h(x_t)^T[f(x_t)+g(x_t)u_\\pi]+\\alpha h(x_t)$; update $z\\leftarrow e^{-a\\Delta t}z+(1-e^{-a\\Delta t})q_\\pi$; solve $\\min_{u}\\|u-u_\\pi\\|_2^2+\\rho\\|s\\|^2$ subject to $\\nabla h^Tg u\\geq-\\nabla h^Tf-\\alpha h+(1-\\kappa/a)z+\\varepsilon-s$, $h\\geq\\delta-s$, and $\\|u\\|_\\infty\\leq u_{\\max}$. Apply $u$ and update the filter with the executed residual. 3. Computed from the paper's mechanism: the exponential proper kernel, dynamic barrier state, affine-QP structure, and robust error margin. Estimated empirically: $f,g$, the observation-noise bound $\\varepsilon$, and the useful bandwidth $a$. 4. First experiment: use third-order double-integrator-like dynamics with noisy state observations, comparing equal-network and equal-control-rate baselines: an unconstrained policy, an ordinary memoryless CBF-QP, and the proposed filtered CBF-QP. Sweep $a\\in\\{0.1,0.3,1,3,10\\}$ and noise amplitude while holding training steps and action limits fixed. 5. Preregistered signature: for sinusoidal barrier-residual noise at frequency $\\omega$, measured residual amplitude must follow $a/\\sqrt{a^2+\\omega^2}$ within 20%, and action total variation must fall by at least 50% when $\\omega\\geq5a$. The safety violation rate must remain below the calibrated error-bound rate of the memoryless robust baseline. Reject the transfer if the frequency response misses 20% or if filtered safety-QP infeasibility increases by more than 5% relative to the ordinary CBF-QP.",
 "math_summary": "Let the learned policy propose $u_{\\pi}=\\pi_{\\theta}(o)$ for plant state $x$, with dynamics $\\dot{x}=f(x)+g(x)u$. For a safe set $\\mathcal{C}=\\{x:h(x)\\geq0\\}$, define the ordinary relative-degree-one barrier residual $q(x,u)=\\nabla h(x)^{\\top}[f(x)+g(x)u]+\\alpha h(x)$, where $\\alpha\u003e0$. Introduce the proper temporal kernel $k_a(t)=ae^{-at}$, bandwidth $a\u003e0$, and filtered residual $z(t)=\\int_{0}^{t}k_a(t-s)q(x(s),u(s))\\,ds+e^{-at}z(0)$, which obeys $\\dot z=-az+aq$. Enforce the filtered barrier condition $\\dot z+\\kappa z\\geq0$, equivalently $q(x,u)\\geq(1-\\kappa/a)z$, where $\\kappa\u003e0$. Since $q$ is affine in $u$, the constraint remains a linear inequality in the QP. With bounded residual-estimation error $|\\widehat q-q|\\leq\\varepsilon$, replace the right side by $(1-\\kappa/a)z+\\varepsilon$ and retain a direct margin $h\\geq\\delta$; the robust invariance claim is falsified if the resulting safe set is violated under the assumed error bound. The kernel has frequency response $|K_a(i\\omega)|=a/\\sqrt{a^2+\\omega^2}$, predicting attenuation proportional to $\\omega^{-1}$ above the cutoff.",
 "math_tags": [
  "control-theory",
  "dynamical-systems",
  "linear-algebra",
  "stochastic-processes"
 ],
 "ml_areas": [
  "rl",
  "mlp",
  "rnn",
  "training-dynamics"
 ],
 "paper": {
  "arxiv_id": "2609.00079",
  "arxiv_url": "https://arxiv.org/abs/2609.00079",
  "summary_what_math_gives_to_ml": "The paper offers a constructive replacement for memoryless control-barrier operators with proper space-time kernels that attenuate high-frequency measurement noise while retaining affine dependence on the control input. Its central transferable mechanism is a dynamic barrier state whose invariance condition can still be enforced by a small quadratic program, together with a robust forward-invariance guarantee. The most direct neural-network transfer is a safety layer for learned robot policies: filter the noisy barrier residual rather than filtering the neural action after the fact. This predicts a measurable frequency-dependent reduction in action chattering and a feasibility boundary determined by the filter bandwidth and actuator limits.",
  "title": "The Space-Time Transform: Memory-Augmented Control Barrier Functions",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 5,
  "novelty": 7,
  "usefulness": 8
 },
 "solves": [
  "stability",
  "accuracy",
  "sample-efficiency"
 ],
 "title": "Proper-Kernel Neural Safety Layer",
 "url": "https://synthcore.org/idea/2961/proper-kernel-neural-safety-layer",
 "verification": {
  "peer_reviewed": false,
  "stage1_mechanism_check": {
   "worked": false,
   "confidence": 9,
   "verdict": "Built a scalar proper-kernel safety-layer MVP with exact exponential filtering, affine projection, robust residual margin, direct state-margin safeguard, and matched noisy-control evaluation. The frequency-response claim was verified: measured attenuation matched a/sqrt(a^2+omega^2) within 0.42% across tested bandwidths and frequencies. However, the proposed controller did not produce a control-smoothing win: total variation was essentially unchanged for a\u003c=1 and increased for a=3 and a=10, while both methods had zero safety violations.",
   "metrics": {
    "baseline": "Memoryless robust CBF: TV=9.16996, violation rate=0.0, infeasibility rate=0.0 for all tested a.",
    "idea": "Filtered robust CBF: TV=9.16903 at a=0.3, 9.16945 at a=1, 9.19096 at a=3, and 9.48870 at a=10; violation and infeasibility rates were 0.0 for all tested a. Maximum frequency-response relative error was 0.00410."
   },
   "how_to_run": "python3 proper_kernel_experiment.py",
   "files": [
    "proper_kernel_experiment.py",
    "results.json"
   ],
   "limitations": "Only a scalar xdot=u toy plant and hand-designed noisy policy were tested; no learned MLP/RNN, third-order dynamics, true QP solver, multi-constraint setting, parameter/noise sweep, or GPU experiment was run. The direct h\u003e=delta safeguard is represented by a one-step viability clamp rather than a full slack-variable QP."
  },
  "status": "mechanism_failed",
  "status_label": "Mechanism failed",
  "updated_at": "2026-09-02T12:06:43",
  "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
   }
  }
 }
}
