Caustic-Aware Hamiltonian Feedback Layer
Implementation & benchmark of arXiv:2608.04172 — A Dynamical Systems view of Feedback Synthesis
Source paper: A Dynamical Systems view of Feedback Synthesis arXiv:2608.04172 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Represent a neural controller as the projection of a learned Hamiltonian stable manifold rather than learning a state-to-action map without geometric constraints. Train a manifold chart together with its invariance equation, and reject or branch-switch near points where the manifold projection becomes singular. The resulting controller exposes a measurable boundary between single-valued smooth feedback and multivalued or hysteretic feedback.
Formulas
Mathematical statement
For a controlled state x in R^n with dynamics dot{x}=f(x,u) and running cost ell(x,u), define the Hamiltonian H(x,p)=max_{u in U}[p^T f(x,u)-ell(x,u)]. The characteristic equations are dot{x}=f(x,mu(x,p)) and dot{p}=nabla_x ell(x,mu)-[D_x f(x,mu)]^T p, where p is the costate and mu(x,p)=argmax_u[p^T f(x,u)-ell(x,u)]. The feedback manifold is the stable set Lambda=W^s(N) of a target invariant manifold N in phase space. A smooth feedback exists locally only when the projection pi:Lambda to x is locally invertible. If a chart z maps to (x(z),p(z)), its caustic indicator is sigma_min(D_z x); a caustic occurs when sigma_min(D_z x)=0. The neural adaptation learns a chart (x_phi(z),p_phi(z)) using the Hamiltonian invariance residual and penalizes small projection singular values.
Implementation notes
Use this first as a controlled neural ODE layer or as a parameter-space optimizer. Let x be the plant state and let an MLP parameterize a phase-space chart (x_phi(z),p_phi(z)). Compute the action with the analytic maximizer u=mu(x,p) whenever possible; otherwise use a differentiable inner optimization over u. For each minibatch, sample chart coordinates z, evaluate x and p, compute u, use automatic differentiation to obtain D_z x, D_z p, and D_x f, and add the invariance residual from the displayed equation. Add a terminal-attraction loss that pulls integrated trajectories toward the target manifold N, plus the caustic barrier L_cau. The paper supplies the Hamiltonian equations, stable-manifold construction, isotropic-manifold result, and projection criterion; the network estimates the manifold chart and its Jacobians. The first cheap experiment should reproduce the scalar system dot{x}=x-4u^3+6u with ell=3u^2(1-u^2), for which H=px-p^4+3p^2, u=p, and Lambda is x=p^3-3p. Train a one-dimensional MLP chart and compare it with a direct MLP controller and policy-gradient control. The predicted signature is projection degeneracy at p=+/-1, since dx/dp=3p^2-3=0, giving caustic state locations x=+/-2. For -2<x<2, three controller branches should exist, while one globally smooth branch is impossible. Measure the smallest singular value, branch count, action variance, and rollout discontinuities. The learned caustic locations should agree with +/-2 within 20 percent, and instability or branch switching should increase sharply as sigma_min(D_z x) approaches zero.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significant win ✓
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built a scalar Hamiltonian-chart MVP with analytic maximizer u=p, Hamiltonian invariance training, projection-Jacobian monitoring, and a direct single-branch MLP baseline. The mechanism manifested: fold locations matched |x_c|=2·scale across five scales, branch counts changed from 3 inside to 1 outside the predicted threshold, and inverse sensitivity had observed log-log slope -0.511 versus predicted -0.5. The learned chart recovered folds at x≈+1.99998 and -1.99930 with near-zero projection Jacobians.
- Agent confidence
- 9/10
- Baseline
- Direct single-valued MLP trained on the p>=1 branch: branch RMSE 0.01870699; it cannot represent the three-branch geometry.
- Idea
- Hamiltonian chart: chart RMSE 0.00279665, invariance RMSE 0.03046788; learned fold estimates x=1.99998 and -1.99930, with projection singular values 0.00923 and 0.0000147. Exact sweeps matched fold scaling 2·scale for scales 0.5, 0.75, 1, 1.5, and 2; branch counts were 3 inside and 1 outside; sensitivity exponent was -0.5106 versus -0.5 predicted.
Limitations: This is a controlled scalar toy verification rather than a full stable-manifold computation or closed-loop plant benchmark. The learned chart uses supervised access to the known analytic manifold and only a lightweight caustic penalty; policy-gradient control, hysteresis rollouts, noisy observations, multidimensional systems, and speed/FLOP comparisons were not tested.
How to run: python3 caustic_mvp.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.04172)
Beats the tuned baseline by 26.7% (p=0.0392, wins 6 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0005
- Idea mean
- 0.0004
- Effect (Δ)
- -0.0001 (−26.7%; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.0392 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±26.6%
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
The benchmark used a pendulum-inspired characteristic proxy rather than the exact full Hamiltonian stable-manifold equations, and the chart coordinate was tied to the final observed angle rather than learned as a complete manifold parameterization. No closed-loop control intervention, explicit branch switching/rejection rollout, multidimensional caustic localization, FLOP/speed comparison, noise robustness study, or independent replication beyond the required 8 seeds was tested. The idea loop ran on CPU after a shared-GPU cuDNN host-allocation failure.
How to run: python3 stage2_caustic_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Worked ✓
Agent confidence: 8/10
Implemented the Caustic-Aware Hamiltonian Feedback Layer as a chart head and invariance/caustic training intervention on the structurally matched controlled-pendulum dynamics track, using the same GRU prediction backbone as the baseline. Across 8 paired seeds, the idea achieved lower test MSE (0.00040158 vs 0.00054805), with delta_mean=-0.00014647, 6/8 wins, and permutation p=0.0392, so the benchmark verdict is a significant win. The trained-model behavior signature also showed low/high projection sensitivity means of 0.2335 and 7.5508 respectively, although this signature is a coarse sensitivity check rather than a full learned caustic-location recovery.
- Baseline
- Tuned rnn_small, best lr=0.01; 8-seed test MSE mean=0.0005480458421516232, std=0.00018509222651529256.
- Idea
- ChartRNN with Hamiltonian-inspired invariance residual and projection barrier, best lr=0.01; 8-seed test MSE mean=0.00040157669718610123, std=0.00016981613192450023; paired delta=-0.000146469144965522; p=0.0392; 6/8 wins.
- Mechanism signature
- map[confirmed:true observed_high_sigma_mean:7.550766348838806 observed_low_sigma_mean:0.23353336192667484 predicted:low projection sensitivity should be identifiable in the trained phase-space chart]
Benchmark result
Beats the tuned baseline by 26.7% (p=0.0392, wins 6 / 8 paired seeds; metric: lower is better).
- Benchmark
- Dynamics forecasting
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0005
- Idea mean
- 0.0004
- Effect (Δ)
- -0.0001 (−26.7%; negative = idea better)
- Wins
- 6 / 8 paired seeds
- p-value
- 0.0392 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±26.6%
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 3 configs
The benchmark used a pendulum-inspired characteristic proxy rather than the exact full Hamiltonian stable-manifold equations, and the chart coordinate was tied to the final observed angle rather than learned as a complete manifold parameterization. No closed-loop control intervention, explicit branch switching/rejection rollout, multidimensional caustic localization, FLOP/speed comparison, noise robustness study, or independent replication beyond the required 8 seeds was tested. The idea loop ran on CPU after a shared-GPU cuDNN host-allocation failure.
How to run: python3 stage2_caustic_bench.py
Artifacts
- bench_report.json 4.2 KB View Raw
- caustic_mvp.py 6.0 KB View Raw
- report.md 1.7 KB View
- report_bench_2026-08-31T210535.md 6.9 KB View
- results.json 2.3 KB View Raw
- stage2_caustic_bench.py 6.2 KB View Raw