arXiv:2609.15894stat.MLSep 2026

Manuscript Offprint

arXiv:2609.15894

Quenched Ensemble Sampling

David Yallup

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

ABSTRACT

Some of the sharpest challenges in sampling from the energy functions of physical systems arise at phase transitions, where the density of states changes abruptly and many sampling algorithms stall. Nested sampling is a particle method that traverses the density of states under a hard energy constraint and is known to be robust to such transitions, but its application in high dimension is limited by the difficulty of sampling under that constraint. In this work we introduce Quenched Ensemble Sampling, which generalises the hard constraint to a family of repulsive potentials at the energy boundary. This preserves the quenched path of monotonically decreasing energy while making the constrained target amenable to scalable gradient-based kernels. We demonstrate on synthetic models of phase transitions that our method estimates the marginal likelihood and draws posterior samples across a first-order transition where popular alternatives such as tempering fail. We apply the procedure to marginal likelihood estimation in Bayesian neural networks, enabling model comparison between network architectures. Finally, in a high-dimensional continuous lattice field theory, we show that this method traverses a first-order transition and estimates the partition function.

1 INTRODUCTION

Estimating the marginal likelihood is a central problem in Bayesian inference, and is particularly challenging for sampling algorithms. The marginal likelihood is defined as the integral, Z=∫L(x)π(x) dxZ = \int \mathcal{L}(x) \pi(x) \, dx, of a likelihood L\mathcal{L} over a prior π\pi on parameters xx. In Bayesian inference this is the normalising constant of the posterior, and is central to Bayesian model comparison (Llorente et al., 2023). Estimation of this integral is typically performed by introducing a series of interpolating distributions between the prior and posterior, where the integral can then be approximated by a series of ratios of normalising constants along this path. The most common approach is to use a temperature ladder, where the interpolating distributions are proportional to Lβk(x)π(x)\mathcal{L}^{\beta_k}(x) \pi(x) for a discrete schedule of inverse temperatures 0=β0<β1<⋯<βK=10 = \beta_0 < \beta_1 < \cdots < \beta_K = 1. This ladder is traversed sequentially in annealed importance sampling (AIS) (Neal, 2001) and sequential Monte Carlo (SMC) (Doucet et al., 2001), or held concurrently as exchanging replicas in parallel tempering (Swendsen & Wang, 1986). This makes the integral numerically tractable, and brings additional benefits for exploring the posterior landscape: at high temperatures the interpolating distributions flatten the energy barriers between modes, allowing transitions that are inaccessible at β=1\beta = 1 (Syed et al., 2022).

Complementary to these approaches, it is possible to formulate a vertical path through the density of states, rather than a horizontal path through temperature (Polson & Scott, 2015). This is the basis of nested sampling (Skilling, 2006), which has been applied to a wide range of problems in physics (Pártay et al., 2010; Ashton et al., 2022). This approach writes the marginal likelihood as an integral over the prior volume at monotonically increasing values of the likelihood; we review this construction in detail in Section 2. The path of increasing likelihood is notably robust to first-order phase transitions, allowing the path of distributions to traverse regions of parameter space that hold a vanishing fraction of the prior mass, and which are therefore inaccessible to tempering methods. However, its practical implementation relies on sampling under a hard constraint, which degrades the efficiency of gradient-based MCMC kernels (Kroupa et al., 2025).

*dy297@cam.ac.uk

In this work we introduce Quenched Ensemble Sampling, a method that preserves the attractive features of the path of increasing likelihood level sets, while incorporating a family of repulsive potentials at the hard constraint that allow the particles to efficiently move in high-dimensional spaces with standard gradient-based MCMC kernels (Fearnhead et al., 2025). This path follows a trajectory of monotonically decreasing energy in an extended state space, which when implemented with an ensemble of particles, allows for a Sequential Monte Carlo sampler to be constructed that is robust to first order phase transitions. We formulate this procedure using motivations from statistical physics, highlighting the importance of this quenched path in the context of sampling from Boltzmann distributions, and demonstrate its performance on a range of problems, including synthetic models of phase transitions, a high-dimensional lattice field theory problem, and marginal likelihood estimation in Bayesian neural networks.

The key contributions of this work are:

• We formulate an adaptive SMC sampler over a quenched family of distributions, and show that a family of repulsive potentials at the energy level defines a soft microcanonical ensemble, admitting gradient-based MCMC mutation kernels.

• We demonstrate that this formulation connects classic nested sampling and tempering, with a family of potentials that interpolates between the two, generalising the nested sampling path to a broader family of distributions that hold a distribution of effective temperatures, rather than a hard constraint or isothermal ensemble (Appendix B).

• We provide a practical implementation that incorporates a well-tuned local gradient-based Metropolis-adjusted Langevin Algorithm (MALA) MCMC kernel (Roberts & Tweedie, 1996) using the particle ensemble, and directly contrast with the tempering path on challenging black box high dimensional inference problems, which are inaccessible to standard nested sampling implementations.

References (91)