Composing Diffusion Priors with Explicit Physical Context via Generative Gibbs Sampling

Weizhou Wang, Jonathan Weare, Aaron DinnerNeurIPS 2026

TL;DR

Training a single generative AI to predict how a molecule behaves in every possible solvent, ion bath, or multiprotein complex is combinatorially impossible. This paper introduces Generative Gibbs for Physics-Aware Sampling (GG-PA), a training-free method that snaps pretrained diffusion models together like Lego bricks alongside explicit physics simulators. By alternating between AI denoising and classical physics updates, it predicts emergent, collective phenomena—like phase transitions and spontaneous molecule pairing—that the original AI models never saw during training.

What Problem Does This Paper Address?

Diffusion models are fantastic at learning the shapes and equilibrium states of isolated scientific systems, like a single protein backbone in a vacuum. The catch? Nature doesn't happen in a vacuum. Drop that protein into salty water or introduce a binding partner, and its behavior shifts dramatically.

Because the number of possible environments grows combinatorially, we will never have enough data to train one monolithic model covering every scenario. Existing inference-time workarounds (like classifier guidance or standard posterior sampling) require squashing all external variables—like thousands of surrounding water molecules—into an "effective" energy function defined only on the AI's variables. Calculating that marginalized energy is usually intractable, and frankly redundant when classical physics force fields already model solvents and ions quite well. The challenge is composing partial AI priors with explicit physical environments on the fly.

Methods

GG-PA solves this by expanding the workspace rather than squashing it. It defines an augmented state space containing both the explicit full-system state (e.g., all atoms, ions, and solvent) and separate variables for each pretrained diffusion prior, linked via simple mathematical projections.

To sample from this joint space, GG-PA uses Gibbs sampling—a classic statistical technique that updates groups of variables one at a time while holding the others fixed—alternating between two steps:

  1. Parallel Denoising (The AI Step): Looking at the current full-system state, each pretrained diffusion model independently denoises its assigned substructure from a chosen diffusion noise level $t$ down to $0$. Because they are conditionally independent given the full system, multiple priors run in parallel.
  2. Context-Aware Aggregation (The Physics Step): Holding the AI's freshly proposed substructures as soft restraints, the full system updates under an explicit physical simulator (like Langevin dynamics or Metropolis-Hastings) governed by classical force fields.

There is a catch with choosing the noise level $t$: near $t=0$, the coupling is mathematically faithful to the true physics, but the landscape becomes stiff and samples get stuck. At high $t$, the system explores freely, but the noise blurs accuracy. To get the best of both worlds, the authors introduce GG-PA-RE, running parallel replicas across different diffusion times $t$ and periodically swapping states—where the intractable diffusion priors conveniently cancel out of the swap probability!

Datasets

Rather than static benchmark datasets, the authors train isolated component priors and evaluate against ground-truth physical simulations across three systems:

  • 1D/2D Coupled Double-Well: A synthetic 1D symmetric double-well potential coupled to a harmonic environment variable that tilts the landscape.
  • 2D Ginzburg-Landau $\phi^4$ Lattice: A $32 \times 32$ scalar field grid used to test collective phase transitions, built from $1,024$ copies of an isolated single-site double-well prior.
  • Atomistic Alanine Dipeptide (AD): Priors trained on backbone torsion angles $(\phi, \psi)$ of a single AD monomer in vacuum at $300\text{ K}$, evaluated in two new contexts via Molecular Dynamics (MD): coordinated with an explicit sodium ion ($\text{AD–Na}^+$), and paired into a hydrogen-bonded AD Dimer.

Key Insights and Ideas

  • Exactness Without Zero-Noise Stiffness: While GG-PA is asymptotically exact as diffusion noise $t \to 0$, the authors prove that when interactions between components are quadratic, exactness holds even at finite noise ($t > 0$) via Gaussian deconvolution—up to a critical physical noise bound $t_{\max}$ where generative noise overwhelms thermal uncertainty.
  • A Free Fix for Inverse Problems: As a mathematical bonus, their finite-$t$ theorem exposes and fixes a subtle covariance-inflation bias in existing plug-and-play split Gibbs samplers used in linear imaging inverse problems, at zero extra computational cost.
  • Diffusion Noise Acts Like Temperature: In replica exchange, cranking up the diffusion time $t$ softens local energy barriers and weakens effective intersite couplings. High-noise replicas act just like high-temperature replicas in parallel tempering, letting molecules jump across steep barriers and pass those discoveries down to low-noise replicas.
Figure 1: Coupled double-well system. (a) The environment induces an asymmetric potential. (b) Marginal density of xsys. GG-PA (blue solid) and GG-PA-RE (purple solid) capture the asymmetry despite their symmetric prior (Direct Diffusion; green dotted). (c) Jensen-Shannon divergence versus t. Below the diffusion time bound (t ≤0.28), GG-PA-RE remains consistently near the minimum observed error, whereas fixed-t GG-PA rebounds at t = 0.1 due to poor mixing. (d) Integrated autocorrelation time τint. Replica exchange significantly accelerates mixing.

Key Results

  • Double-Well Benchmark: Despite using a purely symmetric prior, GG-PA accurately recovers the environment-induced tilt. Below the theoretical bound ($t_{\max} = 0.28$), GG-PA-RE maintains minimal Jensen-Shannon divergence ($\approx 0.01$) even at $t=0.1$, where standard fixed-$t$ GG-PA stalls due to slow mixing.
  • Emergent Critical Physics: Composing $32 \times 32$ isolated priors on a lattice reproduces spontaneous symmetry breaking and the exact critical coupling peak ($J_c \approx 0.436$) of the 2D Ising universality class, with replica exchange delivering orders-of-magnitude speedups in autocorrelation time near the phase transition.
Figure 2: 2D Ginzburg-Landau ϕ4 model across the phase transition. (a–c): Representative field configurations at h = 0. (d–e): Zero-field thermodynamic observables. GG-PA tracks the MC phase transition. (f): Integrated autocorrelation time τint. GG-PA-RE yields orders-of-magnitude speedups close to Jc (dotted line). (g–i): Scaling and universal data collapse, confirming that GG-PA reproduces the expected critical behavior.
  • Zero-Shot Peptide Assembly: GG-PA-RE captures the sharp carbonyl oxygen distance shift when AD coordinates with $\text{Na}^+$. When composing two monomer priors into an AD dimer, it discovers emergent symmetry-breaking—strongly favoring specific torsional states ($LL$ for anti-parallel, $LR/RL$ for parallel topologies). Switching between dimer topologies takes ~17 CPU seconds with GG-PA-RE (including all replicas) versus ~120 seconds with standard MD.

Limitations and Future Work

  • Non-Quadratic Approximation Error: Exact finite-$t$ recovery relies on quadratic/linear-Gaussian interactions; complex atomistic force fields still incur slight approximation errors at finite $t$.
  • Double Counting & Decomposition Quality: If a prior is trained on all-atom MD data, some internal forces are baked into both the AI prior and the explicit force field, causing slight deviations (seen in dimer topology balances).
  • Replica Overhead: While replica exchange fixes slow MCMC mixing, it requires simulating multiple parallel copies.

Future directions include designing annealed context schedules for non-quadratic physics, scaling up to full pretrained protein backbone models in explicit water/ion baths, and assembling large molecular complexes from fragment-level diffusion priors.

Summary updated

Abstract

Pretrained diffusion models provide powerful learned priors, but in scientific sampling the target distribution often depends on physical context that a single generative model can neither fully represent nor learn from scarce joint-system data. We introduce Generative Gibbs for Physics-Aware Sampling (GG-PA), a training-free framework that composes learned partial priors with explicit physical context through Gibbs sampling. We prove that this sampler is asymptotically exact as the diffusion time vanishes and remains exact at finite diffusion time for quadratic interactions. As a special case, the finite-time result corrects a finite-noise bias in plug-and-play split Gibbs samplers for linear inverse problems at no additional cost. We further introduce replica exchange over diffusion time to accelerate mixing. In experiments, a one-dimensional double-well prior recovers a context-induced distribution shift when coupled to an environment, and copies of such a prior composed on a lattice reproduce the emergent collective behavior of the $\phi^4$ model. In atomistic peptide systems, GG-PA captures a context-induced distribution shift and the spontaneous formation of hydrogen-bonded dimers from two copies of a prior trained only on the monomer.
BibTeX
@inproceedings{wang2026composing,
  author = {Weizhou Wang and Jonathan Weare and Aaron Dinner},
  title = {{Composing Diffusion Priors with Explicit Physical Context via Generative Gibbs Sampling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=VBX4P5bFbr},
}
Figure