# Caustic-Aware Hamiltonian Feedback Layer

- ID: 1777
- Canonical URL: https://synthcore.org/idea/1777/caustic-aware-hamiltonian-feedback-layer
- API JSON: https://synthcore.org/api/idea/1777.json
- API Markdown: https://synthcore.org/api/idea/1777.md
- Verification status: beats_baseline
- Source: [arXiv:2608.04172](https://arxiv.org/abs/2608.04172)
- Category: dynamics
- Solves: stability, accuracy
- ML areas: optimizer, training-dynamics, rl, world-model
- Math tags: control-theory, dynamical-systems, differential-geometry, geometry
- Ratings: usefulness 8/10; difficulty 6/10; novelty 7/10

## 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.

## 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.

## Key formulas

- $$\mu(x,p)=\arg\max_{u\in\mathcal U}\left[p^{\mathsf T}f(x,u)-\ell(x,u)\right],\qquad \dot{x}=f(x,\mu(x,p)),\qquad \dot{p}=\nabla_x\ell(x,\mu)-[D_xf(x,\mu)]^{\mathsf T}p.$$
- $$\Lambda=W^s(N)=\left\{(x,p):\lim_{t\to\infty}\varphi_t(x,p)\in N\right\},\qquad \text{smooth feedback requires }\operatorname{rank}D_zx(z)=n.$$
- $$\mathcal L_{\mathrm{inv}}(\phi)=\mathbb E_z\left\|D_zp_\phi(z)\,\dot z-\nabla_x\ell(x_\phi(z),u_\phi(z))+[D_xf(x_\phi(z),u_\phi(z))]^{\mathsf T}p_\phi(z)\right\|^2,$$
- $$\mathcal L_{\mathrm{cau}}(\phi)=\mathbb E_z\left[\max\left(0,\tau-\sigma_{\min}(D_zx_\phi(z))\right)^2\right],\qquad u_\phi(z)=\mu(x_\phi(z),p_\phi(z)).$$

## 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

- Status: beats_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: helps
- Verdict: 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.

### Mechanism check

- Verdict: 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.
- Confidence: 9/10
- 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.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0392
- Paired wins: 6/8
- Benchmark verdict: idea better (significant)

## Artifacts

- [bench_report.json](https://synthcore.org/code/646/bench_report.json)
- [caustic_mvp.py](https://synthcore.org/code/646/caustic_mvp.py)
- [report.md](https://synthcore.org/code/646/report.md)
- [report_bench_2026-08-31T210535.md](https://synthcore.org/code/646/report_bench_2026-08-31T210535.md)
- [results.json](https://synthcore.org/code/646/results.json)
- [stage2_caustic_bench.py](https://synthcore.org/code/646/stage2_caustic_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/646)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
