# Extended-Symplectic Neural Optimizer

- ID: 834
- Canonical URL: https://synthcore.org/idea/834/extended-symplectic-neural-optimizer
- API JSON: https://synthcore.org/api/idea/834.json
- API Markdown: https://synthcore.org/api/idea/834.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.12914](https://arxiv.org/abs/2607.12914)
- Category: dynamics
- Solves: stability, accuracy, generalization
- ML areas: optimizer, training-dynamics, scheduler
- Math tags: dynamical-systems, control-theory, numerical-analysis, optimization, linear-algebra
- Ratings: usefulness 8/10; difficulty 5/10; novelty 6/10

## Idea description

Replace a dissipative optimizer update with a canonical discrete flow on the extended state $(\theta,p,t,e)$, where $\theta$ are network parameters, $p$ is momentum, $t$ is training time, and $e$ is its conjugate energy variable. Use a symmetric composition of exact Hamiltonian subflows for kinetic energy, loss, and time translation; this preserves the extended symplectic form and avoids artificial phase-volume collapse. Weak restarts or occasional damping can be added separately if convergence rather than conservative exploration is required.

## Mathematical statement

Let $\theta\in\mathbb{R}^{d}$ be neural-network parameters, $p\in\mathbb{R}^{d}$ canonical momentum, $t\in\mathbb{R}$ training time, $e\in\mathbb{R}$ conjugate time momentum, $M\succ0$ a mass matrix, and $L(\theta,t)$ the loss. Define $H_{\mathrm{ext}}(\theta,p,t,e)=e+T(p)+L(\theta,t)$ with $T(p)=\frac12p^{\mathsf T}M^{-1}p$. The extended canonical form is $\Omega=d\theta\wedge dp+dt\wedge de$. Exact subflows of the separable Hamiltonian terms are symplectomorphisms, so their composition satisfies $(D\Psi_h)^{\mathsf T}J(D\Psi_h)=J$ and has determinant one. For a locally quadratic loss with Hessian $K\succeq0$, the symmetric position-momentum update is linearly stable when $h^2\lambda_{\max}(M^{-1}K)<4$.

## Key formulas

- $$H_{\mathrm{ext}}(\theta,p,t,e)=e+\frac12p^{\mathsf T}M^{-1}p+L(\theta,t),\qquad \Omega=d\theta\wedge dp+dt\wedge de.$$
- $$A_{\tau}:\ t\leftarrow t+\tau;\qquad B_{\tau}:\ \theta\leftarrow\theta+\tau M^{-1}p;\qquad C_{\tau}:\ p\leftarrow p-\tau\nabla_{\theta}L(\theta,t),\quad e\leftarrow e-\tau\partial_tL(\theta,t).$$
- $$\Psi_h=A_{h/2}\circ B_{h/2}\circ C_h\circ B_{h/2}\circ A_{h/2},\qquad (D\Psi_h)^{\mathsf T}J(D\Psi_h)=J,\quad \det(D\Psi_h)=1,$$ $$J=\begin{bmatrix}0&I&0&0\\-I&0&0&0\\0&0&0&1\\0&0&-1&0\end{bmatrix}.$$
- $$h<h_{\mathrm{crit}}=\frac{2}{\sqrt{\lambda_{\max}(M^{-1}K)}}\quad\Longleftrightarrow\quad h^2\lambda_{\max}(M^{-1}K)<4.$$

## Implementation notes

1. Exact integration point: implement a PyTorch optimizer maintaining parameter tensors $\theta$, momentum tensors $p$, scalar time $t$, and scalar $e$. Begin with full-batch deterministic losses so that the canonical map can be tested without minibatch noise. Choose $M=mI$ or a diagonal mass estimated once from gradient statistics.

2. Pseudocode: initialize $p=0$, $t=0$, and $e=0$. For step size $h$, perform $t\leftarrow t+h/2$; then $\theta\leftarrow\theta+(h/2)M^{-1}p$; evaluate $g=\nabla_\theta L(\theta,t)$ and, if available, $\ell_t=\partial_tL(\theta,t)$; update $p\leftarrow p-hg$ and $e\leftarrow e-h\ell_t$; perform $\theta\leftarrow\theta+(h/2)M^{-1}p$; finally update $t\leftarrow t+h/2$. For a time-independent loss, set $\ell_t=0$. A practical implementation can omit $e$ from parameter updates but should retain it for energy diagnostics.

3. Derived versus estimated quantities: the Hamiltonian split, subflow updates, symplectic identity, and stability inequality are the structure-preserving construction. Estimate $\lambda_{\max}(M^{-1}K)$ using 5--10 Hessian-vector power iterations. Estimate the Jacobian symplectic residual with finite differences or automatic differentiation on a small model: $r=\|J^{\mathsf T}(D\Psi_h)^{\mathsf T}J(D\Psi_h)-J\|_F/\|J\|_F$. Avoid Adam-style damping in the first test because damping intentionally breaks volume preservation.

4. First cheap experiment: use a two-dimensional quadratic $L(\theta)=\frac12\theta^{\mathsf T}K\theta$ with known eigenvalues, followed by a two-layer MLP on MNIST. Compare the proposed optimizer against SGD with momentum and Adam while sweeping $h$ around $h_{\mathrm{crit}}=2/\sqrt{\lambda_{\max}(M^{-1}K)}$. The quantitative prediction is bounded oscillatory trajectories below the threshold and exponential divergence above it; the observed boundary should agree within 20%. The finite-step Jacobian should have determinant $1+O(10^{-5})$ in float64, and the symplectic residual should decrease approximately as $O(h^2)$ for the symmetric composition. On the MLP, measure long-horizon parameter norms, gradient norms, validation loss, and phase-space volume over 10,000 steps.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: harms
- Verdict: Built a PyTorch ExtendedSymplectic optimizer using the symmetric A-B-C-B-A split, retaining canonical momentum and extended time state, plus deterministic numerical tests. The toy mechanism manifested clearly: the predicted hcrit=1.0 was bracketed by 0.99/1.01, mass-scaled thresholds were observed at 0.475, 0.975, and 1.95 versus predictions 0.5, 1.0, and 2.0, and determinant/symplectic residuals were at 1e-16/zero roundoff. It did not beat practical baselines in the small logistic experiment: its final loss was 0.514 versus 0.2255 for momentum SGD and 0.2255 for Adam, with a much larger parameter norm.

### Mechanism check

- Verdict: Built a PyTorch ExtendedSymplectic optimizer using the symmetric A-B-C-B-A split, retaining canonical momentum and extended time state, plus deterministic numerical tests. The toy mechanism manifested clearly: the predicted hcrit=1.0 was bracketed by 0.99/1.01, mass-scaled thresholds were observed at 0.475, 0.975, and 1.95 versus predictions 0.5, 1.0, and 2.0, and determinant/symplectic residuals were at 1e-16/zero roundoff. It did not beat practical baselines in the small logistic experiment: its final loss was 0.514 versus 0.2255 for momentum SGD and 0.2255 for Adam, with a much larger parameter norm.
- Confidence: 9/10
- Limitations: Only a full-batch 2D quadratic and tiny logistic-regression task were tested; no MNIST/MLP, minibatch noise, long-horizon 10,000-step study, GPU benchmark, nontrivial time-dependent loss, or learned/diagonal mass matrix was evaluated. The optimizer currently assumes static losses for the energy conjugate and requires a closure.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 0/8
- Benchmark verdict: idea worse (significant)

## Artifacts

- [experiment.py](https://synthcore.org/code/154/experiment.py)
- [extended_symplectic.py](https://synthcore.org/code/154/extended_symplectic.py)
- [report.md](https://synthcore.org/code/154/report.md)
- [report_bench_2026-08-30T174809.md](https://synthcore.org/code/154/report_bench_2026-08-30T174809.md)
- [stage2_bench.py](https://synthcore.org/code/154/stage2_bench.py)
- [stage2_report.json](https://synthcore.org/code/154/stage2_report.json)
- [Download all files as ZIP](https://synthcore.org/download/154)

## Disclaimer

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