# Conformal-symplectic sandwich layer

- ID: 392
- Canonical URL: https://synthcore.org/idea/392/conformal-symplectic-sandwich-layer
- API JSON: https://synthcore.org/api/idea/392.json
- API Markdown: https://synthcore.org/api/idea/392.md
- Verification status: beats_baseline
- Source: [arXiv:2607.03339](https://arxiv.org/abs/2607.03339)
- Category: architecture
- Solves: stability, accuracy, generalization
- ML areas: world-model, ssm, dynamics, initialization
- Math tags: symplectic, geometry, dynamical-systems, linear-algebra
- Ratings: usefulness 7/10; difficulty 5/10; novelty 7/10

## Idea description

Replace an unconstrained one-step transition network with a symmetric damping–symplectic-core–damping composition. The damping strength is one learned scalar rate and is applied through positive exponential diagonal factors, so every step has a known contraction law while the neural core models nonlinear conservative transport.

## Mathematical statement

The paper defines a conformally symplectic map F by (DF(z))^T J DF(z) = lambda*(t) J, where z=(q,p) is a 2d-dimensional canonical state, DF is the Jacobian, J=[[0,I_d],[-I_d,0]] is the canonical symplectic matrix, and lambda*(t)>0 is the dissipation factor. Use an exact symplectic core C_theta satisfying (DC_theta(z))^T J DC_theta(z)=J. Let D_h(gamma)=a_h(gamma)I_{2d}, with a_h(gamma)=exp(-gamma h/4), h the step size, and gamma>=0 the learned damping rate. Since D_h^T J D_h=a_h^2 J, the symmetric sandwich F_{theta,gamma,h}=D_h(gamma) C_theta D_h(gamma) satisfies (DF)^T J DF= a_h^4 J=exp(-gamma h)J. Thus its conformal factor is exactly lambda_h=exp(-gamma h), independently of the neural-core parameters. For an implementable symplectic core, compose canonical shears: Q=q+epsilon grad_p V_phi(p), P=p, followed by Q=q, P=p-epsilon grad_q T_psi(q). Each shear has unit symplectic Jacobian, so their composition is symplectic. The scalar gamma is trained jointly from snapshot pairs and is identifiable across irregular step sizes because log(lambda_h)=-gamma h.

## Key formulas

- $$\big(\mathrm{D}\Phi_t(z)\big)^{\top}J\mathrm{D}\Phi_t(z)=\lambda^{\star}(t)J,\qquad z=(q,p),\quad J=\begin{bmatrix}0&I_d\\-I_d&0\end{bmatrix},\quad \lambda^{\star}(t)>0.$$
- $$F_{\theta,\gamma,h}=D_h(\gamma)\circ C_\theta\circ D_h(\gamma),\qquad D_h(\gamma)=e^{-\gamma h/4}I_{2d},\qquad (DC_\theta)^\top J(DC_\theta)=J.$$
- $$(DF_{\theta,\gamma,h})^\top JDF_{\theta,\gamma,h}=e^{-\gamma h}J,\qquad \lambda_h=e^{-\gamma h},\qquad \gamma\ge 0.$$
- $$Q=q+\varepsilon\nabla_pV_\phi(p),\ P=p;\qquad Q=q,\ P=p-\varepsilon\nabla_qT_\psi(q).$$

## Implementation notes

(1) Integration point: use this module as the transition function in a latent world model or state-space model. The input is a latent vector z_t of even dimension 2d, split into q_t and p_t, together with the observed step size h_t; the output is z_{t+1}. Do not apply a generic MLP after the structured map, since that would destroy the guarantee.

(2) Pseudocode:
```
raw_rate = gamma_parameter
gamma = softplus(raw_rate) + 1e-6
a = exp(-gamma * h / 4)
z0 = a * z_t
(q,p) = split(z0)
for k in range(K):
    q = q + eps * grad_p(V_k(p))       # symplectic q-shear
    p = p - eps * grad_q(T_k(q))       # symplectic p-shear
z_pred = a * concat(q,p)
loss = mse(z_pred, z_next) + optional_observation_loss
```
Use small MLPs for scalar potentials V_k and T_k; calculate their input gradients with automatic differentiation. For a simpler MVP, use one V/T pair and K=2 alternating shear blocks.

(3) Computed from the paper's mathematics: the exponential positive damping factor, sandwich ordering, and exact predicted conformal factor lambda_h=exp(-gamma h). Estimated empirically: gamma, potential-network parameters, and model errors. Validate the structural identity numerically by computing explicit Jacobians on a small batch and measuring ||DF^T J DF-exp(-gamma h)J||_F. Train with mixed step sizes so gamma cannot absorb a fixed discretization artifact.

(4) First experiment: train on 2D and 20D damped harmonic oscillators from snapshot pairs, using 10%, 25%, and 100% of trajectories. Compare against an equal-parameter MLP transition and an unconstrained symplectic-core model at matched one-step FLOPs. Evaluate one-step MSE, rollout error over 100–1000 steps, recovered gamma, and contraction-law error from log singular-volume change versus h. The expected signal is lower long-horizon error and less drift in data-scarce training, with recovered log contraction approximately linear in h and slope -gamma. Also test random irregular h; success requires stable extrapolation to unseen step sizes and a Jacobian residual near numerical precision rather than merely a low training loss.

## Verification

- Status: beats_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: helps
- Verdict: Built a differentiable conformal-symplectic sandwich with learned nonnegative damping and alternating potential-gradient shears. Across gamma={0.05,0.35,1.0} and h={0.03,0.2,0.8}, the measured Jacobian residual was 4.1e-8 to 1.1e-6 and determinant errors were 3.0e-8 to 7.7e-7, confirming the predicted factor exp(-gamma h). The sweep also confirmed log-volume slope -gamma and fixed-h sensitivity -h essentially exactly. However, on the small damped-oscillator fit the MLP was better (one-step 0.00145 vs 0.00281; 80-step rollout 0.0141 vs 0.0360), so there is no observed performance win in this MVP.

### Mechanism check

- Verdict: Built a differentiable conformal-symplectic sandwich with learned nonnegative damping and alternating potential-gradient shears. Across gamma={0.05,0.35,1.0} and h={0.03,0.2,0.8}, the measured Jacobian residual was 4.1e-8 to 1.1e-6 and determinant errors were 3.0e-8 to 7.7e-7, confirming the predicted factor exp(-gamma h). The sweep also confirmed log-volume slope -gamma and fixed-h sensitivity -h essentially exactly. However, on the small damped-oscillator fit the MLP was better (one-step 0.00145 vs 0.00281; 80-step rollout 0.0141 vs 0.0360), so there is no observed performance win in this MVP.
- Confidence: 8/10
- Limitations: Only a 2D damped oscillator and one small fixed-seed training run were compared; the planned 20D, data-fraction, irregular-step extrapolation, matched-FLOP, and longer 1000-step evaluations were not tested. The sweep verifies the analytic law using the implemented layer rather than estimating contraction from noisy learned trajectories.

### Practical benchmark

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

## Artifacts

- [bench_report.json](https://synthcore.org/code/203/bench_report.json)
- [bench_round.py](https://synthcore.org/code/203/bench_round.py)
- [bench_run.py](https://synthcore.org/code/203/bench_run.py)
- [experiment.py](https://synthcore.org/code/203/experiment.py)
- [report.md](https://synthcore.org/code/203/report.md)
- [report_bench_2026-08-30T204451.md](https://synthcore.org/code/203/report_bench_2026-08-30T204451.md)
- [results.json](https://synthcore.org/code/203/results.json)
- [Download all files as ZIP](https://synthcore.org/download/203)

## Disclaimer

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