arXiv:2610.16736stat.MLOct 2026

Manuscript Offprint

arXiv:2610.16736

Amortised adaptive importance sampling

Arran Carter, Víctor Elvira, Esmeralda S. Whitammer

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

Abstract

Monte Carlo sampling algorithms aim to produce samples from a target distribution with a given unnormalised probability density function. The high cost of running Monte Carlo algorithms, with many simulation steps or particles needed to obtain a good empirical approximation to the target, can be reduced by introducing learnable components into the sampler – a form of amortisation. Once these components are trained, amortised samplers can produce high-quality samples with less computation at sampling time than training-free algorithms would require. We propose an amortised sampler built upon the framework of adaptive importance sampling – a hierarchical importance sampling procedure where the proposal is iteratively adapted. Our amortised adaptive importance sampling algorithm fits a lightweight neural network that adapts the proposal using information obtained over the course of sampling. By training our sampler over many different targets taken from the same family of distributions, we obtain a sampler that can adapt to a specific target at sampling time without a priori access to the target's parameters. We show that our procedure can efficiently sample from targets within the family the sampler was trained on, giving improvements over target-specific amortised samplers and training-free adaptive importance sampling algorithms. We also explore the potential for generalisation, where the trained sampler is used to sample from targets outwith its training family.

1 INTRODUCTION

We consider the problem of sampling from a distribution over RdR^{d} with probability density function

p(x)=1Zπ(x),Z=∫Rdπ(x)dx,(1)p(x)=\frac{1}{Z}\pi(x),\quad Z=\int_{\mathbb{R}^{d}}\pi(x)\mathrm{d}x, \tag{1}

where we assume that we only have access to an un-normalised density π∝p\pi \propto p. We also consider the related problem of estimating integrals of the form:

I=Ex∼p[f(x)]=∫Rdf(x)p(x)dx.(2)I=\mathbb{E}_{x\sim p}\left[f(x)\right]=\int_{\mathbb{R}^{d}}f(x)p(x)\mathrm{d}x. \tag{2}

(We use the same notation for an absolutely continuous distribution and its density.) These problems are of key importance in many applications, including Bayesian inference (Gelman et al., 1995) and statistical mechanics (Noé et al., 2019). One may want to solve both problems for many related distributions p and test functions f.

Monte Carlo Methods Monte Carlo methods are a commonly used solution to sampling problems. These methods form an empirical approximation to a single target distribution by performing a stochastic simulation. Many such methods simulate a Markov chain whose stationary distribution is the target, known as Markov chain Monte Carlo (Metropolis et al., 1953; Hastings, 1970; Roberts and Rosenthal, 2004; Neal, 2003, 2011). Another common category of Monte Carlo methods are importance sampling algorithms, which sample particles from some proposal distribution and reweight them (Elvira and Martino, 2021).

There are various iterative versions of importance sampling, with multiple rounds of particle reweighting, including annealed importance sampling (Neal, 2001), sequential Monte Carlo (Del Moral et al., 2006), and methods that adapt the proposal towards the target, known as adaptive importance sampling (AIS; Cappé et al., 2004, 2008; Bugallo et al., 2017). The adaptation of the proposal in AIS algorithms uses information obtained about the target at sampling time. Various adaptation rules have been proposed (Cappé et al., 2004,

∗^{*}Correspondence to arran.carter@ed.ac.uk. Code available here.

Figure

Figure 1: Amortisation of a proposal adaptation over a family of targets. Each row shows sequential adaptation of the importance sampling proposal in our implementation of amortised adaptive importance sampling. The samples and importance weights from each iteration's proposal qt−1q_{t-1} are supplied to a neural network that predicts the parameters of the next iteration's proposal qtq_t. During training, the neural network is updated to minimise a divergence between all steps' proposals and the target distribution p. Training is over many distributions from a family; once trained, the sampler can be used for new targets in the same family.

2008; Elvira et al., 2023; Akyildiz and Míquez, 2021; Paananen et al., 2021; Elvira and Chouzenoux, 2022).

Amortised Sampling The progress of deep learning methods has spurred the development of amortised sampling, wherein learnt components are introduced into sampling algorithms. Amortised sampling algorithms range from those that aim to learn MCMC transitions parametrised by a normalising flow (Gabrié et al., 2022) to expressive dynamics-based approaches (Berner et al., 2026). Amortised importance sampling methods include Müller et al. (2019), who parametrise the proposal using normalising flows. See Gabrié (2026) for a recent review of amortised sampling.

Many approaches to amortised sampling only consider sampling from a single distribution. Target-specific training becomes unattractive when sampling must be repeated across many related targets, since training cost is incurred separately for each target. Recently, there has been interest in algorithms that amortise over multiple Monte Carlo problems, for example, producing samples for many distributions from the same family (e.g., Bayesian posteriors conditioned on different observations). Advances made in this direction include those of Golinski et al. (2019); Sun et al. (2023b); Klein et al. (2023); Klein and Noé (2024).

Our Contribution We formulate a way to incorporate target-specific information into importance sampling proposals at sampling time by learning the adaptation rule in AIS ( §3\S3). We obtain an algorithm that can efficiently adapt a starting proposal to any target within a family of distributions without requiring information that specifies the target in advance (Fig. 1). Empirically, we show the benefit of amortisation within an AIS procedure over AIS algorithms with static adaptation rules (Fig. 2).

The only target-specific information required by our amortised adaptive importance sampling (AAIS) algorithm is obtained during the sampling procedure, for example, through pointwise evaluations of the (possibly unnormalised) target density function and possibly its derivatives. This allows AAIS to sample from multiple different targets within the family it was trained on, but it can also be run on targets outwith its training family. We investigate this promising direction and show that AAIS can still perform efficiently when the evaluation family differs from the training family.

References (44)