Edinburgh Team's BIS Cuts Bayesian Sampling Budget by 95% Using Bandit Strategy
A new framework treats sample selection as a multi-armed bandit problem, cutting target density evaluations by roughly 95% for expensive Bayesian inference.
ProTakeaways
- Bandit Importance Sampling frames sample selection as a multi-armed bandit, avoiding costly proposal-density optimization on expensive black-box targets.
- The GP-UJB criterion uses a Gaussian process surrogate with an exploitation-exploration decomposition to pick informative sample locations.
- Reported ~95% reduction in samples needed versus standard importance sampling on benchmark densities.
- Convergence to the target is proven for any bandit strategy, enabling safe experimentation with custom criteria.
- Validated on Lorenz-96 weather inference, g-and-k models, and a large US precipitation Markov random field.
- Source code is available on GitHub; the method targets low-dimensional expensive densities, not high-dimensional problems.
Sampling from a probability distribution sounds routine until each evaluation of that distribution takes minutes or hours to compute. That is the daily reality for anyone doing Bayesian inference on weather models, spatial statistics, or simulator-based likelihoods, where a single density evaluation might involve solving differential equations or inverting massive matrices. A team from Edinburgh, Imperial, and Manchester has proposed a fresh angle on this bottleneck: treat sample selection as a bandit problem.
Their method, called Bandit Importance Sampling (BIS), reframes the classical importance sampling procedure so that samples are picked sequentially by a bandit strategy rather than drawn randomly from a proposal distribution. Source code is on GitHub, and the paper reports roughly a 95% reduction in the sample budget needed to hit the same approximation error as standard importance sampling.
Why sampling gets stuck on black-box densities
Conventional sampling methods like MCMC need extensive evaluations of the target density to explore the parameter space, and the cumulative cost becomes prohibitive when each evaluation is expensive. Importance sampling gives you tight control over the evaluation budget because you only evaluate the target at pre-chosen points, but it has a well-known weakness: if most samples land in low-probability regions, they get negligible weights and contribute almost nothing to the estimate.
The usual fix, adaptive importance sampling, optimizes the proposal distribution itself. That approach breaks in the expensive-density setting because optimizing the proposal reintroduces the need for many target-density evaluations, defeating the whole point.

Sampling as a bandit game
BIS flips the problem. Instead of tuning a proposal density, it directly optimizes the set of samples. The algorithm maintains a pool of well-dispersed candidate points (defaulting to a Halton quasi-Monte Carlo sequence, which fills space more evenly than random draws) and picks one point per iteration using a bandit criterion. Once a point is picked, it is never revisited, which prevents the samples from clustering around modes and preserves the convergence guarantees of importance sampling.
The key innovation is the point-selection criterion, dubbed GP-UJB. It fits a Gaussian process surrogate to the log of the unnormalized density using the evaluations gathered so far, then picks the next point by maximizing the expected value of the density under that surrogate. That expectation decomposes cleanly into an exploitation term (the current best estimate of where the mass is) and a Jensen-gap exploration term (where the GP is most uncertain about the density value).

Crucially, the authors prove that the weighted samples converge to the target regardless of the specific bandit strategy used. That means practitioners can swap in bespoke selection criteria without worrying about introducing sampling bias, a rare property for adaptive methods.
How it performs
The paper benchmarks BIS on three synthetic two-dimensional targets (unimodal Gaussian, bimodal, banana-shaped) and three real inference problems:
- Lorenz-96 weather model: Bayesian inference via synthetic likelihoods, where each likelihood evaluation runs simulations of a 40-dimensional stochastic system. BIS achieved an MMD of 0.008 to the ground-truth posterior with only 100 samples.
- G-and-k distribution: A heavy-tailed model whose density requires numerical inversion of its quantile function per data point. BIS produced accurate posteriors from 400 samples versus 320,000 for the baseline.
- US precipitation anomalies: A Gaussian Markov random field over 7,352 weather stations where each likelihood evaluation requires determinants and inverses of massive sparse precision matrices. BIS matched an MCMC baseline using just 200 evaluations.
When to reach for it, and when not to
BIS is aimed at a specific regime: expensive black-box densities on low-dimensional parameter spaces, typically the two-to-five-dimensional hyperparameter tier of hierarchical models. The authors are explicit about the ceiling: the scalability and accuracy limitations of Gaussian processes in high-dimensional spaces remain open challenges, so GP-UJB inherits that limitation. If your parameter vector is genuinely high-dimensional, this is not the tool.
The sweet spot is exactly where a lot of applied Bayesian work lives: models where a high-dimensional latent field can be marginalized analytically, leaving a handful of hyperparameters whose posterior is still numerically expensive. For those problems, cutting the evaluation budget by an order of magnitude is a meaningful practical win, and the flexibility to plug in custom bandit strategies leaves room for the framework to evolve beyond GP surrogates.