arXiv:2609.09473stat.MLSep 2026

Manuscript Offprint

arXiv:2609.09473

Mode Coverage in Normalizing Flow Boltzmann Generators via Log-Ratio Variation

Qi Feng, Rongjie Lai, Di Qi, Xuda Ye

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Normalizing flow Boltzmann generators retain a tractable pushforward density, but training with forward KL depends on target samples that may be biased or omit modes. As a result, a flow can miss target mass while its observed importance weights give a high effective sample size. We introduce the log-ratio variation Xω\mathrm{X}_{\omega}, the mean absolute pairwise difference of the target-to-pushforward log-density ratio under a weighting measure ω\omega, and use it to define KLXX, a new loss function. Two log-ratio variations are added to the forward KL (denoted by the two X's): one weighted by the target to improve accuracy, the other by a mixture of quench and temper samples with pushforward samples to search candidate modes. We derive the Fisher–Rao gradient flow of KLXX, where both variations contribute nonpositive dissipation, and a fixed-surrogate error bound for KLXX. We use KLXX in an adaptive-staging Boltzmann generator, with importance reweighting at every stage. We bound the sampling error of its inference scheme when the stage weights are essentially bounded, and prove it asymptotically unbiased in the sample size. In the numerical tests, KLXX improves mode coverage over forward KL. It also improves the generator's per-stage diagnostics against the loss that built the schedule. The observables the generator recovers are close to independent references. The log-ratio variations thus supply information that the forward KL loss usually omits.

KLXX: one forward KL, two log-ratio variations (XX)

Figure

1 Introduction

Sampling from a target distribution π∝exp⁡(−U)\pi \propto \exp(-U) on RdR^d is a recurring problem in many fields including molecular simulation, Bayesian inference, and statistical physics (Frenkel and Smit, 2002; Robert and Casella, 2004; Landau and Binder, 2014). When π\pi is high-dimensional and multimodal, its mass splits among basins of U separated by barriers. Classical Monte Carlo methods are usually local. Metropolis–Hastings (Metropolis et al., 1953; Hastings, 1970), Langevin dynamics (Langevin, 1908; Leimkuhler and Matthews, 2015), Nosé–Hoover dynamics (Nosé, 1984; Hoover, 1985), and Hamiltonian Monte Carlo (Duane et al., 1987) all evolve from the initial configuration, and over an accessible simulation time they can stay in the basin where they started. When this occurs, finite-time estimates are biased toward the visited basin and give no direct account of the mass that was never reached. Tempering and particle methods widen the reach by connecting a tractable distribution to π\pi through intermediate distributions, but a basin that none of their chains has visited still cannot enter the target ensemble (Woodard et al., 2009; Chehab et al., 2025). Every one of these samplers learns the target only where it has been, and the mass it never reached is invisible to it.

A more universal strategy is to learn a global transport from an easily sampled reference to the target, which generates independent, nonlocal proposals. Boltzmann generators do this with a learned transport map (Noé et al., 2019), dropping the long-time Monte Carlo iterations entirely. Let π0∝exp⁡(−U0)\pi_0 \propto \exp(-U_0) be an easily sampled reference distribution, usually Gaussian. We train an invertible normalizing flow GG (Rezende and Mohamed, 2015; Papamakarios et al., 2017; Kingma and Dhariwal, 2018) on the domain of the target, written Rd\mathbb{R}^d throughout and a box or a torus in the experiments below, to fit the target-to-source transport relation G#π≈π0G_{\#} \pi \approx \pi_0. The inverse map then sends independent source draws toward the target, and their pushforward distribution is ν:=(G−1)#π0\nu := (G^{-1})_{\#} \pi_0. Its density is

ν(y)=π0(G(y))∣det⁡JG(y)∣,(1)\nu(y)=\pi_{0}(G(y))\left|\det J_{G}(y)\right|, \tag{1}

where JG(y)J_G(y) is the Jacobian matrix of GG at yy. The importance weight w(y):=π(y)/ν(y)w(y) := \pi(y)/\nu(y) is the ratio of the target density to the pushforward density. Reweighting by ww corrects the estimates from pushforward samples, so an imperfect flow still gives the right answer wherever it places samples. What the weights cannot correct is a region the flow never reaches, and that is the failure this paper is about. Throughout the paper we also use the log-ratio:

z(y):=log⁡w(y)=log⁡π(y)ν(y)=U0(G(y))−U(y)−log⁡∣det⁡JG(y)∣+const.(2)z(y):=\log w(y)=\log\frac{\pi(y)}{\nu(y)}=U_{0}(G(y))-U(y)-\log|\det J_{G}(y)|+\mathrm{const}. \tag{2}

The same weights define the effective sample size (ESS), a diagnostic of density agreement on the support reached by ν\nu (Liu, 2001; Doucet et al., 2001; Elvira et al., 2022). A high ESS indicates accuracy in the regions the flow reaches, but says nothing about the modes of U it does not reach. We call this phenomenon a fake ESS; it is also reported in Noé et al. (2019) and Midgley et al. (2023).

The fake ESS can arise from various loss functions. The original Boltzmann generator (Noé et al., 2019) and its variational-inference predecessor (Rezende and Mohamed, 2015) minimize the reverse Kullback–Leibler (KL) divergence

(reverse)KL(ν∥π)=∫Rdν(y)log⁡ν(y)π(y)dy=−Ey∼ν[z(y)],(3)\begin{array}{r l}{\mathrm{(r e v e r s e)}}&{{}\mathrm{K L}(\nu\|\pi)=\int_{\mathbb{R}^{d}}\nu(y)\log\frac{\nu(y)}{\pi(y)}\mathrm{d}y=-\mathbb{E}_{y\sim\nu}\big[z(y)\big],}\end{array} \tag{3}

which needs samples only from ν\nu and evaluations of U. The empirical gradient is therefore accessible, but the divergence is mode-seeking (Wainwright and Jordan, 2008): a mode absent from ν\nu contributes no samples and hence no gradient. A flow can then collapse onto a subset of the target modes (Wu et al., 2020; Felardos et al., 2023). Existing approaches interleave Markov chain Monte Carlo (MCMC) kernels with deterministic layers, encode target symmetries in the architecture, reduce gradient variance near the optimum, or anneal from a smoother potential (Wu et al., 2020; Köhler et al., 2020; Vaitl et al., 2022; Schopmans and Friederich, 2025). These changes can improve exploration, but their success still depends on whether the resulting sampler reaches each relevant mode.

The opposing loss minimizes the forward KL,

(forward)KL(π∥ν)=∫Rdπ(y)log⁡π(y)ν(y)dy=Ey∼π[z(y)],\begin{array}{r l}{\mathrm{(f o r w a r d)}}&{{}\mathrm{K L}(\pi\|\nu)=\int_{\mathbb{R}^{d}}\pi(y)\log\frac{\pi(y)}{\nu(y)}\mathrm{d}y=\mathbb{E}_{y\sim\pi}\big[z(y)\big],}\end{array}

(4) which is mass-covering for exact distributions: it diverges if ν\nu vanishes where π\pi has positive mass (Wainwright and Jordan, 2008). Its empirical form, however, needs samples from the target distribution π\pi. Existing work resolves this circularity in several ways. Maximum likelihood uses configurations from a reference thermodynamic state (Wirnsberger et al., 2020); adaptive flow samplers train on a running Markov chain and use the flow as a global proposal (Gabrié et al., 2022); molecular flows can fit a molecular-dynamics trajectory (Klein et al., 2023); and transferable architectures amortize coverage across related molecules (Klein and Noé, 2024). Persistent chains and coupled-target regression provide other approximations to the missing target expectation (Naesseth et al., 2020; Rehman et al., 2026a). Because an empirical loss reflects only the regions represented by its sample source, the mass-covering property of the exact divergence does not prevent empirical mode omission. This tension motivates a loss that retains forward KL while using samples from more than one distribution.

The sampled forward KL leaves three distinct gaps. First, a mode absent from its target surrogate contributes no training points. If the flow also misses that mode, the observed weights can be nearly uniform on the reached support, so the ESS can be close to one even though target mass is absent, which is the fake ESS above. Second, a finite or biased target surrogate distorts the sampled loss, and the fitted flow can inherit that error. Third, target samples give little information where the pushforward distribution places excess mass, allowing leakage between modes or into target-poor regions. Addressing one of these failures does not by itself resolve the other two.

Previous remedies change the loss to favor discovery: flow annealed importance sampling bootstrap (FAB) (Midgley et al., 2023) minimizes the 2-divergence, whose stronger tail penalty is estimated by annealing toward π2/ν\pi^{2}/\nu. This paper overcomes mode collapse in a different way, keeping the forward KL and adding what it lacks. First, a quench and temper (QT) construction finds candidate modes of U beyond the reach of the source. It takes three steps. Each source sample is melted by Gaussian noise, which carries it past the region the source covers; quenched by gradient descent on U, which drives it into a local basin; and tempered by a short Langevin run, which spreads it around that basin. Second, a log-ratio variation, the mean absolute pairwise difference of the target-to-pushforward log-density ratio under a chosen weighting measure, carries the mode information into the loss: the log-ratio is constant on the support of that measure exactly when the pushforward matches the target there, and pairwise differences cancel the unknown normalizers. Two such variations are appended to the forward KL, one weighted by the target to improve accuracy, the other weighted by the mixture of the QT distribution and the detached pushforward distribution to search candidate modes and to restrain leakage between them. The result is the KLXX loss, named for its two X's; Section 2 gives the construction. Our contributions are as follows:

  1. We introduce a new KLXX loss (6), whose components mix QT and pushforward distributions. Pairwise differences remove the unknown target normalizer, and the log-ratio variation retains ν=π\nu = \pi as a minimizer. The target variation reuses the forward KL batch, while the mixture variation supplies candidate-mode and pushforward support information absent from that batch.

  2. We derive the Fisher–Rao flow of the generalized KLXX loss under a general choice of parameters, and identify the dissipation it induces: the two log-ratio variations enter as nonpositive terms, and as strictly negative ones at positive coefficients unless the importance weight is already constant. For a biased target surrogate, the two log-ratio variations improve the KL bound at the stationary distribution of the biased KLXX loss, and Theorem 1 exhibits that improvement under mild conditions.

  3. We demonstrate that QT can reach target basins outside the regions covered by the source and by the sequential Monte Carlo (SMC) surrogate. In the Himmelblau and Sparse tests, forward KL, KL+X π\pi and FAB each miss modes, while both QT-based losses recover every mode; mixing QT and pushforward samples also reduces visible intermodal leakage (Figures 4 and 5). We therefore report ESS together with coverage, since uniform weights on reached modes do not imply complete coverage.

  4. We build an adaptive-staging Boltzmann generator based on KLXX that uses only oracle access to the target potential U(x)U(x) and its gradient ∇U(x)\nabla U(x), with SMC and QT generating the required samples on the fly. We compare KLXX against KL+XπKL+X_{\pi} on this construction, and measure the weight degeneracy by the product of its per-stage ESS factors. Each training step draws its own samples and never differentiates through an MCMC transition, since the mixture measure is detached. We also bound the error of the sample set it returns. Following the standard non-asymptotic analysis (Del Moral, 2004;

Chopin and Papaspiliopoulos, 2020), Theorem 2 controls the error at rate N−1/2N^{-1/2} for every bounded observable with a constant independent of N, so the scheme is asymptotically unbiased, provided each stage weight is essentially bounded. Reading that constant stagewise defines the propagation factors, which summarize the weight degeneracy of the composed stage maps; the experiments report the computable factor F^\hat{F}, assembled from the per-stage ESS.

The rest of the paper is organized as follows: Section 2 constructs the KLXX loss and compares it with related work. Section 3 analyzes the generalized KLXX loss in Fisher–Rao geometry, deriving its gradient flow and the accuracy bound it reaches under a biased target surrogate; Appendices A and B give the proofs. Section 4 gives the training algorithm. Section 5 proposes the adaptive-staging Boltzmann generator and bounds the error of the sample set it returns; Appendix C gives the proof. Section 6 reports the numerical results. Section 7 gives the conclusion.

References (84)