# Work-trained neural Hamiltonian bridge

- ID: 973
- Canonical URL: https://synthcore.org/idea/973/work-trained-neural-hamiltonian-bridge
- API JSON: https://synthcore.org/api/idea/973.json
- API Markdown: https://synthcore.org/api/idea/973.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2607.15682](https://arxiv.org/abs/2607.15682)
- Category: sampling
- Solves: accuracy, sample-efficiency, stability
- ML areas: diffusion-sampling, optimizer, training
- Math tags: hamiltonian, stochastic-processes, probability, information-theory
- Ratings: usefulness 7/10; difficulty 6/10; novelty 7/10

## Idea description

Train a neural finite-time Hamiltonian-style path from an easy base density to a Boltzmann target by minimizing its generalized nonequilibrium work. The work is a path-space log-density ratio, so its mean is a forward KL divergence up to a constant and the endpoint marginal mismatch is bounded by the same quantity. Unlike an uncorrected neural sampler, this produces a global proposal whose bias and overlap can be measured quantitatively.

## Mathematical statement

The target configuration density is \(\pi(x)=Z^{-1}\exp[-E(x)]\), where \(x\) is the configuration, \(E(x)\) is its energy, and \(Z=\int\exp[-E(x)]dx\) is the unknown normalizer. Let \(\rho_0(z)\) be a tractable base density over an augmented state \(z=(x,p)\), let \(Q_\theta(\tau)\) be the normalized density of a complete neural trajectory \(\tau=(z_0,z_1,\ldots,z_T)\), and let \(R(\tilde\tau)\) be the density of a time-reversed reference trajectory \(\tilde\tau=(\mathcal Rz_T,\ldots,\mathcal Rz_0)\), where \(\mathcal R(x,p)=(x,-p)\). The generalized work is the computable path ratio \(W_\theta(\tau)=\log Q_\theta(\tau)-\log R(\tilde\tau)+E(x_T)-E(x_0)\), up to a parameter-independent free-energy constant. If \(P^*(\tau)\propto R(\tilde\tau)\exp[-E(x_T)+E(x_0)]\) is the reverse-compatible target path law, then \(\mathbb E_{Q_\theta}[W_\theta]=\mathrm{KL}(Q_\theta\|P^*)+C\), with \(C\) independent of \(\theta\). By data processing, \(\mathrm{KL}(q_{\theta,T}\|\pi)\leq\mathrm{KL}(Q_\theta\|P^*)\), where \(q_{\theta,T}\) is the endpoint density.

## Key formulas

- $$\pi(x)=\frac{1}{Z}\exp[-E(x)]$$
- $$W_\theta(\tau)=\log Q_\theta(\tau)-\log R(\tilde\tau)+E(x_T)-E(x_0)$$
- $$\mathbb{E}_{Q_\theta}[W_\theta]=\mathrm{KL}(Q_\theta\|P^*)+C,\qquad \mathrm{KL}(q_{\theta,T}\|\pi)\leq\mathrm{KL}(Q_\theta\|P^*)$$
- $$\theta\leftarrow\theta-\eta\nabla_\theta\frac{1}{B}\sum_{b=1}^{B}W_\theta(\tau^{(b)})$$

## Implementation notes

Integrate this at the sampler level. Use an augmented state \(z_t=(x_t,p_t)\), sample \(z_0\sim\rho_0\), and run \(T\) learned transitions. A simple starting transition is \(p_{t+1}=p_t-\epsilon_t\nabla_xE(x_t)-\epsilon_t f_\theta(x_t,p_t,t)+\sigma_t\xi_t\) followed by \(x_{t+1}=x_t+\epsilon_t p_{t+1}\), with \(\xi_t\sim\mathcal N(0,I)\). Accumulate \(\log Q_\theta(\tau)=\log\rho_0(z_0)+\sum_t\log q_\theta(z_{t+1}|z_t)\). Define a fixed reverse transition \(r(z_t|z_{t+1})\), accumulate \(\log R(\tilde\tau)=\sum_t\log r(\mathcal Rz_t|\mathcal Rz_{t+1})+\log\rho_T(\mathcal Rz_T)\), and compute the stated work from the two path log densities and endpoint energies. Backpropagate the minibatch mean work through reparameterized Gaussian noise. The exact mathematical quantities are path log probabilities, endpoint energy differences, and work; endpoint KL and mixing must be estimated empirically. First test on a 2-D double-well and a 2-D Gaussian mixture, comparing against HMC and an uncorrected neural proposal at equal energy-gradient calls. Success means lower mean and variance of work, more frequent mode switching, and lower endpoint MMD. Failure signals are exploding work variance, momentum collapse, or endpoint mode imbalance.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: no_effect
- Verdict: Implemented a reparameterized neural Hamiltonian-style bridge and an exact Gaussian path-law sanity check. The mechanism manifested: mean work scaled quadratically with displacement (observed slope 0.5366 versus predicted 0.5346, 0.36% error), the endpoint/path KL ratio matched 0.9352, and the endpoint KL bound held with zero violation. In the double-well mini-experiment, training reduced mean work and energy versus the uncorrected proposal, but work variance remained very large and the training loss was not consistently decreasing, so this is mechanism validation rather than a robust sampler win.

### Mechanism check

- Verdict: Implemented a reparameterized neural Hamiltonian-style bridge and an exact Gaussian path-law sanity check. The mechanism manifested: mean work scaled quadratically with displacement (observed slope 0.5366 versus predicted 0.5346, 0.36% error), the endpoint/path KL ratio matched 0.9352, and the endpoint KL bound held with zero violation. In the double-well mini-experiment, training reduced mean work and energy versus the uncorrected proposal, but work variance remained very large and the training loss was not consistently decreasing, so this is mechanism validation rather than a robust sampler win.
- Confidence: 8/10
- Limitations: The path/reference construction is a small toy approximation rather than an exactly reversible Hamiltonian target path law. Only a 2-D double-well was used for the sampler comparison; HMC, Gaussian-mixture experiments, MMD, effective sample size, and longer stability or mode-mixing studies were not tested. Work variance remained high and optimization was not monotonic.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 1
- Paired wins: 0/8
- Benchmark verdict: no measurable effect

## Artifacts

- [bench_experiment.py](https://synthcore.org/code/407/bench_experiment.py)
- [bench_report.json](https://synthcore.org/code/407/bench_report.json)
- [experiment.py](https://synthcore.org/code/407/experiment.py)
- [report.md](https://synthcore.org/code/407/report.md)
- [report_bench_2026-08-31T112830.md](https://synthcore.org/code/407/report_bench_2026-08-31T112830.md)
- [results.json](https://synthcore.org/code/407/results.json)
- [Download all files as ZIP](https://synthcore.org/download/407)

## Disclaimer

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