---
title: Bayesian Hamiltonian Learning
url: https://www.emergentmind.com/topics/bayesian-hamiltonian-learning-bhl
type: topic
---

# Bayesian Hamiltonian Learning

Bayesian Hamiltonian Learning (BHL) is a rigorous statistical framework for inferring unknown Hamiltonians and their associated dynamics from experimental or simulated data by treating all model parameters, latent states, noise sources, and often the structure of the Hamiltonian itself as random variables within a hierarchical probabilistic model. BHL integrates prior physical constraints, data fidelity, and noise modeling into a unified posterior that quantifies uncertainty and guides adaptive experiment design, system identification, and predictive simulation. BHL methodologies are applied to quantum, classical, and dissipative systems, and have enabled scalable learning with uncertainty quantification, robustness to structured and heavy-tailed noise, and physical structure preservation in high-dimensional settings.

## 1. Hamiltonian Learning Problem: Formulations and Models

The Hamiltonian learning problem involves estimating the unknown parameters or functional form of a Hamiltonian $H$ governing a dynamical system, given observed data. Systems of interest include classical mechanics, quantum dynamics (especially spin systems and superconducting qubits), nonseparable and separable Hamiltonian systems, as well as generalized dissipative and port-Hamiltonian models [1912.07636, 2305.09017, 2401.12476].

### Nonseparable Hamiltonian Systems

For a system with positions $q \in \mathbb{R}^d$, momenta $p \in \mathbb{R}^d$, and state $x=(q^\top,p^\top)^\top\in\mathbb{R}^{2d}$, the general Hamiltonian model is
$$
\dot q = \frac{\partial H(q,p;\theta)}{\partial p}, \quad
\dot p = -\frac{\partial H(q,p;\theta)}{\partial q},
$$
where $H$ may be parameterized as a sum of a quadratic form and a nonlinear function (neural network expansion or polynomial), with parameters $\theta$ [2401.12476].

### Generalized and Dissipative Systems

For dissipative or port-Hamiltonian systems,
$$
\dot x = [J(x)-R(x)]\nabla H(x) + G(x)u,
$$
where $J$ is skew-symmetric, $R$ is positive semi-definite, and $G$ parameterizes input-port couplings [2305.09017, 2511.05330]. Both classical and quantum models are encompassed.

### Measurement Models and Noise

Observations $y_k$ are modeled as
$$
y_k = h(x_k;\phi)\odot \eta_{m,k} + \eta_{a,k},
$$
where $\eta_{m,k}$ (multiplicative noise) and $\eta_{a,k}$ (additive noise) are vector-valued and may be statistically dependent [2401.12476]. Non-Gaussian, structured, and correlated noise models are directly supported in Bayesian formulations.

### Quantum Hamiltonian Parameterizations

For quantum systems, especially $k$-body models,
$$
H_0 = \sum_{j=1}^m c_j P_j,
$$
where $P_j$ are Pauli strings of weight $\leq k$. Control Hamiltonians and state preparation augment identifiability [1912.07636].

## 2. Bayesian Inference: Posterior Structure and Noise Marginalization

The cornerstone of BHL is the explicit construction and inference of joint posteriors over all unknowns:
$$
p(\theta,\psi|Y) \propto L(\theta,\psi;Y) p(\theta) p(\psi),
$$
where $Y$ is the observed data, $\theta$ are Hamiltonian and possibly dynamical parameters, $\psi$ collects hyperparameters governing noise processes, priors enforce structure or domain knowledge, and $L$ is the noisy-data likelihood [2401.12476].

### Likelihood Construction

- For systems with measurement and process noise (multiplicative and additive), Gaussian filter approximations yield tractable marginal likelihoods for hidden Markov models, using predicted and updated means/covariances in a Kalman/unscented-Kalman framework [2401.12476, 2501.18808].
- For quantum measurement, Bayesian updates are performed via the Born-rule likelihood or constraint equations derived from commutation relations of observables [1912.07636].

### Priors and Hyperpriors

- Flat, uninformative, or Gaussian priors are used for $\theta$.
- Hyperpriors (e.g., half-normal over variances) enforce positivity and regularize high-dimensional parameterizations [2401.12476].
- Physics-informed priors (e.g., Gaussian process priors on $H$) embed smoothness and invariance constraints [2305.09017].

### Posterior Inference Algorithms

| Algorithm               | Use Case                         | Complexity/Remarks                                                      |
|-------------------------|----------------------------------|-------------------------------------------------------------------------|
| Gaussian filtering      | Nonlinear SSMs, additive/mult. noise | $O(N(n^3 + m^3))$, reduced to $O(N r^3)$ in ROM                       |
| Sequential Monte Carlo  | Online quantum parameter learning | Tunable by particles/resampling, adaptive experimental design           |
| MCMC/Metropolis-Gibbs   | Parameter/hyperparameter sampling | Suitable for MAP and full posterior uncertainty quantification           |
| Particle Gibbs/PGAS     | Joint state and parameter inference | Enables tractable full Bayesian inference for latent SSMs             |

Computations are enabled by differentiable likelihoods (for gradient-based MAP), analytical conjugacy (for GPs), and reduced-rank surrogates for scalability [1912.07636, 2511.05330, 2401.12476].

## 3. Structure Preservation, Reduced-Order and GP Surrogates

### Structure-Preserving Integrators

- Parametrizing the flow through a Hamiltonian and employing explicit symplectic integrators (e.g., Tao's explicit scheme for nonseparable systems) ensures learned models are symplectic, preserving energy and phase-space properties [2401.12476].
- For generalized Hamiltonian flows, structure-preserving kernels or basis expansions (e.g., symplectic SVD, random Fourier features) ensure volume preservation and dissipativity where required [2509.07280].

### Reduced-Order Modeling

- For high-dimensional systems (e.g., discretized PDEs on $n\gg1$ state variables), BHL employs reduced-order projection:
  - Cotangent-lifted symplectic SVD yields a symplectic basis $V \in \mathbb{R}^{2d\times 2r}$ ($r \ll d$), projecting dynamics and measurements for fast learning and filtering [2401.12476].
  - Hamiltonian operator inference (H-OpInf) can recover the quadratic part analytically, reducing the burden on the nonlinear surrogate.

### Gaussian Process and Random Feature Surrogates

- Hamiltonians are modeled nonparametrically by GPs:
  - For port-Hamiltonian and input–output systems, the Hamiltonian $H(x)$ is given a GP prior. Uncertainty in $H$ and its derivatives propagates through trajectories, yielding a full posterior over future states and outputs [2305.09017, 2511.05330].
  - Sparse random Fourier feature expansions of GPs yield scalable surrogates, facilitating variational Bayesian inference with physics-informed regularization [2509.07280].

## 4. Online, Adaptive, and Data-Efficient Bayesian Protocols

### Adaptive Experiment Design

- BHL protocols for quantum systems employ Bayesian experimental design: utilities such as information gain or expected risk determine optimal next experiments, using current posterior estimates—substantially accelerating information gain per data point [1207.1655, 1806.02427].
- Online updating of the posterior as data accrue allows real-time feedback and efficient control [1912.07636, 2501.18808].

### Data Efficiency and Robustness

- BHL approaches are robust to small, noisy, and highly corrupted datasets (e.g., datasets with $10\%$ or $20\%$ multiplicative noise), outperforming standard ML (e.g., deep HNNs) by orders of magnitude in mean squared error for Hamiltonian inference [2401.12476].
- Training in reduced or projected spaces yields $10^2$–$10^3$ computational speedups without loss of physical interpretability.
- The Bayesian posterior naturally quantifies uncertainty and expands credibly as noise or data sparsity increases.

## 5. Empirical Performance and Benchmarks

- On canonical nonseparable Hamiltonian benchmarks, BHL achieves up to $724\times$ lower Hamiltonian mean squared error than standard HNN objectives with $10\%$ multiplicative noise [2401.12476].
- In chaotic, underdetermined, or high-dimensional settings (e.g., double pendulum, NLSE PDEs), BHL methods robustly capture phase-space structure, provide credible predictive envelopes, and maintain conservation laws under out-of-sample trajectory continuation [2401.12476, 2305.09017].
- For quantum many-body spin chains (up to $100$ qubits), the scalability of BHL is demonstrated: the posterior quickly concentrates as the number of control fields increases, and credible intervals match empirical errors [1912.07636].

## 6. Physical Consistency, Extensions, and Limitations

- BHL intrinsically enforces physical correctness through structure-preserving learning (symplecticity, passivity, conservation, stability) [2401.12476, 2305.09017, 2509.07280].
- Extensions include hierarchical models for time-varying parameters, hyperparameter learning, non-conservative and input–output system identification, and compositional port-Hamiltonian networks [2511.05330, 2305.09017].
- Computational scaling depends on surrogate and filtering strategies: cubic in data for full GPs, $\mathcal{O}(r^3)$ in projected spaces, and linear in time and particle number for SMC/PGAS approaches.
- Current limitations include scaling of dense GP models to large datasets and identifiability for some structural parameters in input–output settings [2511.05330].

---

In summary, Bayesian Hamiltonian Learning provides a holistic, physics-informed statistical apparatus for identifying, simulating, and controlling complex Hamiltonian systems under uncertainty. Its strength lies in the principled integration of measurement noise, physical constraints, reduced-order modeling, uncertainty quantification, and adaptive design, with applications across quantum, classical, conservative, and dissipative regimes [2401.12476, 1912.07636, 2305.09017, 2509.07280, 2511.05330].

Source: https://www.emergentmind.com/topics/bayesian-hamiltonian-learning-bhl