Source-linked AI summary

METALICA: METAdynamics and repLICA exchange for enhanced diffusion sampling

Alireza Omidi, Jiajun He, Jörg Gsponer, Saifuddin Syed

arXiv:2609.17823v1stat.MLcs.LGphysics.bio-phphysics.chem-ph

TL;DR

Protein transitions involve conformational states that diffusion sampling may rarely visit, while batch-based enhanced sampling can be inefficient under realistic memory and compute constraints. METALICA combines metadynamics with replica exchange, carrying one chain across bias updates. Its accuracy is set by chain length rather than memory, making free-energy estimation affordable under memory constraints.

  • Problem

    Batch-based enhanced diffusion sampling can require large batches and small denoising steps, making rare-event sampling inefficient under realistic memory and compute constraints.

    Source: §1 · p. 2
  • Method

    METALICA combines metadynamics with replica exchange, carrying a single chain across bias updates and refining its target in place.

    Source: §3 · p. 4
  • Results

    METALICA's accuracy is set by chain length rather than memory, making free-energy estimation affordable under memory constraints.

    Source: §3 · p. 4, §5 · p. 6
  • Takeaways & Limitations

    For memory-limited sampling, METALICA trades longer wall-clock time for more chain steps without increasing memory.

    Source: §3 · p. 4

    The method assumes the diffusion-model score ∇x log pt is available.

    Source: §2.2 · p. 2

Abstract

from arXiv · show

Many proteins function through transitions between conformational states, yet rare states are rarely sampled by diffusion models trained on an equilibrium ensemble, demanding better sampling methods. We introduce METALICA, which implements Metadynamics on a pretrained diffusion model via Replica Exchange. It accumulates a bias potential along a Collective Variable, repels new samples from previous ones through biased sampling, and reweights samples onto the unbiased distribution. METALICA holds one replica per diffusion level, forming a Markov Chain that evolves through inter-replica communication and is refined in place as the bias grows. METALICA is the dual of sequential control, in which Sequential Monte Carlo parallelizes the sampler over a batch of particles. Parallelism over the levels of the diffusion-time schedule instead allows METALICA to generate samples from long chains, essential for the discovery of rare events, with accuracy set by run length rather than by the memory available. We validate on a bimodal target with known free energies, then apply METALICA to the unfolding of a protein. At a budget for which sequential control yields no unfolded structure, METALICA populates the basin and resolves a second free energy minimum.

1 Introduction

Protein ensembles capture functionally important conformational transitions, but molecular dynamics can struggle to explore complex energy landscapes and diffusion models can miss rare states. METALICA addresses rare-state sampling by combining metadynamics with replica exchange in diffusion models.

1 Introduction

  • Molecular dynamics often struggles with complex energy landscapes, while its trajectory-derived samples are inherently correlated.Enhanced sampling methods bias along predefined collective variables to encourage sampling of under-populated regions, but remain computationally demanding.Source: §1 · p. 1
  • Diffusion models sample the learned equilibrium distribution, so rare but functionally important conformations can remain hard to capture without prohibitively many samples.Recent diffusion-based enhanced-sampling approaches tilt the target and use sequential Monte Carlo, then pool biased samples with MBAR or WHAM to reconstruct the unbiased distribution.Source: §1 · pp. 1–2
  • METALICA replaces batch sampling with a single Markov chain whose replicas at different denoising steps communicate in parallel.It integrates metadynamics into diffusion models through replica exchange.Source: §1 · p. 2

2 Background

The background defines free energies and metadynamics on a collective-variable space, then presents inference-time control methods for diffusion models. These methods correct tilted sampling either sequentially with particle batches or in parallel with replica exchange.

2.1 Free energy differences and Metadynamics

  • A collective variable maps a conformation to a lower-dimensional space chosen to separate metastable states, where free-energy surfaces and differences describe state probabilities.The free-energy difference compares the probability of a populated region with that of a rare region.Source: §2.1 · p. 2
  • Metadynamics accumulates a bias that penalizes sampled regions, using increments that can shrink as the bias grows; pooled biased samples are reweighted to the unbiased distribution with MBAR.Well-Tempered Metadynamics uses Gaussian hills whose height decays as the bias grows.Source: §2.1 · p. 2

2.2 Inference-time control of diffusion models

  • Inference-time control targets a reward-tilted diffusion path, but guided reverse-SDE marginals do not equal the target path and therefore require correction.The denoiser is estimated from the score, and a decreasing guidance schedule takes the path from noise toward the target.Source: §2.2 · p. 3
  • Sequential control uses a batch of particles propagated through diffusion levels with incremental weights, and finite-batch self-normalized estimates are biased but consistent as the batch grows.The cited methods include FKC and TDS; the correction weight compares the tilted path density with the proposal density.Source: §2.2 · p. 3
  • Parallel control uses one particle per diffusion level in a replica-exchange chain, recording target-level samples whose averages retain burn-in bias but are consistent as the run grows.Adjacent levels propose forward and backward moves, with alternating pairs proposed in parallel and the reference particle redrawn from noise.Source: §2.2 · p. 3

3 Method

METALICA applies metadynamics to diffusion-model sampling by alternating biased inference-time sampling with bias deposition, then reweighting pooled samples. Its replica-exchange chain is carried across bias updates, enabling online refinement without restarting from noise.

3 Method

  • METALICA and MetaDiff both alternate sampling under the current metadynamics bias with depositing a new increment, then reweight pooled samples onto the unbiased distribution with MBAR.Algorithm 1 distinguishes their sampling procedures: MetaDiff runs fresh SMC particles, whereas METALICA advances a carried replica-exchange chain.Source: §3 · pp. 3–4
  • At each iteration, METALICA advances the chain against the current tilted path, deposits a bias increment from its visited target particles, and updates the cumulative bias.The experiments use the Well-Tempered rule, and the pooled samples are returned with MBAR weights.Source: §3 · p. 4
  • Small bias increments let METALICA carry its replica-exchange chain into the next target without fresh burn-in, unlike sequential control, which restarts from noise.The chain is refined in place as the bias grows.Source: §3 · p. 4
  • The two methods parallelize over different axes: sequential control uses more particles, while METALICA uses more steps of one chain.They spend the same NM score evaluations per iteration; sequential control trades memory for shorter wall-clock time, while METALICA keeps memory fixed as chain length increases.Source: §3 · p. 4

4 Experiments

The experiments test METALICA on a bimodal toy distribution and apply it to protein unfolding. On 1BTA, METALICA generates unfolded structures and reconstructs a double-basin free-energy landscape.

1D Toy

  • The toy test uses a bimodal Gaussian mixture with the data coordinate as its collective variable and compares METALICA with MetaDiff and unbiased sampling.The rare mode is ten million times less probable than the likelier one; the study tracks free-energy error and reconstructed profiles as samples accumulate.Source: §4 · pp. 4–5, Figure 1 · p. 5
  • With total sampling fixed at 100,000, the experiments vary iteration size up to 20,000, examine reconstruction quality, memory and computation time, and test additional rarity levels.They also examine how reconstruction changes with more iterations while holding iteration size fixed.Source: §4 · p. 5

Proteins

  • 6,000 METALICA samples produced many unfolded 1BTA structures, including about 680 rare samples, and a double-basin landscape with ΔˆF ξ = 13.3; 20,000 unbiased draws contained one unfolded structure.Figure 2 shows the folded and unfolded structures and the reconstructed free-energy surface; its shaded band marks ξ < 0.5.Source: Figure 2 · p. 5, §4 · p. 5

5 Discussion

METALICA combines a growing Metadynamics bias with a Replica Exchange chain that is carried across bias updates. Its parallelism over diffusion levels supports long runs without making accuracy depend on batch size, while pooled samples are reweighted to the unbiased model distribution.

5 Discussion

  • Replica parallelism lets METALICA run long chains under memory constraints, refine the target in place as the bias grows, and estimate the generating model’s free-energy landscape; samples are consecutive states, not independent draws.The method requires collective variables that separate the states of interest.Source: §5 · p. 6

A Well-Tempered Metadynamics

  • Well-Tempered Metadynamics shrinks hills where bias has accumulated, so the bias converges; METALICA deposits hills in order within each block to keep deposition tempered across and within iterations.The free-energy estimate comes from MBAR rather than reading the converged bias directly.Source: A Well-Tempered Metadynamics · p. 9

B Sequential and parallel control of tilted diffusion paths

  • Parallel control targets the product of distributions across diffusion levels and communicates between adjacent levels using corrected proposals; exchanges run in parallel on alternating level pairs.The top level is refreshed from p1 at each step, and the bottom-level state is recorded as a sample. Each chain step costs on the order of M score evaluations, and the chain carries over between bias updates without a fresh burn-in.Source: B Sequential and parallel control of… · p. 10

C Path recursion

  • Substituting the accumulated bias increment into the prior target expression gives the next iteration’s tilted path.The update expresses the new path as the current path multiplied by a factor determined by the increment and guidance schedule.Source: C Path recursion · p. 10

D MBAR reweighting

  • MBAR pools samples from the biased thermodynamic states and estimates their dimensionless free energies, then weights samples to estimate observables and the collective-variable free-energy profile under the unbiased target.Because the model’s reduced potential cancels, its density is not needed for the reweighting.Source: D MBAR reweighting · p. 11

E METALICA implementation details

The implementation uses a guidance schedule to shape intermediate targets and retains the chain as the bias changes. Its exchanges use Euler–Maruyama proposals and a closed-form correction from score evaluations.

E METALICA implementation details

  • The guidance schedule changes intermediate targets and mixing across levels, but leaves the target at t = 0 unchanged.The schedule comes from a power family; larger ρ concentrates the bias nearer the data.Source: E METALICA implementation details · p. 11
  • The chain is initialized by one reverse pass from p1 and retained at later iterations, where only its target changes by the bias increment.Only the initial iteration begins from the unmodified path.Source: E METALICA implementation details · p. 11
  • Adjacent-level exchanges use Euler–Maruyama proposals, and their acceptance correction is available in closed form from score evaluations already used to make the proposals.The pretrained and tilted backward kernels share a drift and variance but differ in their mean displacement; each kernel uses the variance at its own conditioning time.Source: E METALICA implementation details · p. 11

F Experimental Details

The appendix provides technical details and additional results for the experiments.

F Experimental Details

F.1 Toy diffusion model

The toy target is a two-component Gaussian mixture with a rare second mode, enabling an analytic diffusion path and score for evaluation without learned-score approximation error.

  • The toy target is a Gaussian mixture with means −3 and 3, σmix = 0.5, and mixture weights c1/c2 = 10η; the second mode is rare.Source: §F.1 · p. 12
  • Its variance-preserving forward map yields a two-component Gaussian-mixture marginal whose means contract toward the origin as noise increases.Source: §F.1 · p. 12
  • A responsibility-weighted average of component scores gives the score function in closed form, avoiding learned-network approximation error.Source: §F.1 · p. 12
  • The experiments use a cosine VP-SDE schedule and Euler–Maruyama inference with 100 discrete steps.The CV grid spans [−8, 8] on 321 points, with figures drawn over [−6, 6].Source: §F.1 · p. 12

F.2 Protein diffusion model

The protein experiment uses BioEmu and compares MetaDiff with METALICA under a shared sampling budget. Both use the same tilt exponent and bias settings.

  • BioEmu is a sequence-conditioned diffusion model trained on protein structures and fine-tuned on MD trajectories, representing proteins as residue frames with separately noised positions and orientations.Source: §F.2 · p. 12
  • MetaDiff attaches an FKC correction to the solver steps, evaluates reward on the predicted clean structure, and resamples when ESS falls below half the batch.Source: §F.2 · p. 12
  • METALICA places one replica at each of 101 solver times and integrates exchange proposals with Euler–Maruyama.The position kernels are Gaussian with closed-form densities.Source: §F.2 · pp. 12–13
  • MetaDiff and METALICA use γ = 10, initial height h = 1, hill width σhill = 0.03 in FNC units, a 200-point CV grid, and draw 40 iterations of 150 samples from the same seed.Source: §F.2 · p. 13

F.3 Additional results for the toy experiments

The toy-results figures examine reconstruction quality, computational cost, reconstruction over cumulative samples, and performance at additional rarity levels. An exact analytical-sampler control provides an upper bound on performance.

  • The exact control uses an inverse-CDF analytical sampler rather than a diffusion model and serves as an upper bound on performance.Source: §F.3 · p. 13
  • Figure 3 varies iteration sample size at fixed sample budget and plots grid coverage, free-energy RMSE, and error in the free-energy difference.Coverage distinguishes the whole window from the rare basin; boxes show seeds and joined markers show their means.Source: Figure 3 · p. 13
  • Figure 4 compares peak GPU memory and sampling time across iteration sample sizes at fixed total budget, with both costs on logarithmic axes.Boxes show seeds and joined markers show their means.Source: Figure 4 · p. 13
  • Figure 5 shows reconstructed surfaces by method and cumulative sample count against the true surface at ΔFξ = 16.1.Each cell is one run truncated to its first n draws at a fixed iteration sample size.Source: Figure 5 · p. 13
  • Figure 6 compares three rarity levels and adds Exact as a fourth profile column, showing free-energy-difference error over cumulative samples and reconstructed profiles at the deposition budget.The profiles are compared with the true free-energy surface.Source: Figure 6 · p. 14

F.4 Additional results for the protein experiment

At a matched budget of 6,000 samples, METALICA sampled the rare basin while MetaDiff did not.

  • With 6,000 samples in 40 iterations of 150 on one GPU, METALICA sampled the rare basin; matched-budget MetaDiff produced no samples below ω = 0.5 and had unbounded free-energy-difference error.Source: §F.4 · p. 14
Loading 2609.17823v1…