TL;DR
Refitting a Bayesian model once for every held-out data point is too slow for most real models. This paper shows that leave-one-out predictive accuracy can be estimated from a single set of posterior draws by reweighting them, with the weights smoothed by a Pareto tail fit. The method also reports when its own estimate is unreliable. WAIC, a cheaper penalised-fit criterion, is presented alongside it.
Where you'll see it: in the loo package used to compare Bayesian models fitted with Stan, and in routine model checking of regression and multilevel models.
The problem
A Bayesian model is fitted once, and its posterior draws describe the parameters given the data. A natural question follows: how well would this model predict new data it has not seen? The usual answer is Cross-Validation. Hold out some data, refit the model on the rest, and score the predictions. For a Bayesian model with expensive posterior sampling, refitting once for every held-out point is often impractical. If a model takes an hour to fit and the dataset has a thousand points, leave-one-out cross-validation means a thousand hours of computation.
Information criteria offer a shortcut. The Akaike information criterion (AIC) and the deviance information criterion (DIC) estimate out-of-sample fit from a single fit. DIC is awkward for Bayesian work: it uses a point estimate of the parameters, can give negative estimates of the effective number of parameters, and is not defined for some singular models. Practitioners needed a method that was fully Bayesian, cheap to compute from existing posterior draws, and honest about when its own approximation failed.
Key idea
The paper's central object is the expected log pointwise predictive density, written elpd. For each data point, it is the log of the probability the model assigns to that point, averaged over new data drawn from the truth. Summing over the data points gives a single number for the model, and higher is better.
Leave-one-out cross-validation estimates this by asking, for each point , how well the model fitted to all the other points predicts point . Doing that exactly needs refits. The paper shows that the answer can be approximated from one set of posterior draws by reweighting them. It uses importance sampling, which reuses draws from one distribution to estimate expectations under another, and it stabilises the weights with a Pareto tail fit. The name for this is Pareto-smoothed importance sampling leave-one-out (PSIS-LOO).
WAIC takes a different route. It adds a penalty to the average fit on the observed data, and the penalty is computed from how much each point's log-likelihood varies across posterior draws. For a model that is well behaved, WAIC and LOO agree closely.
The picture to keep in mind is a student who has one practice exam and wants to predict the score on a different exam. Rather than sitting it again each time with one question removed, the student reweights the answers already written to estimate what would happen if each question had been left out, and checks whether that reweighting can be trusted.
The method
Leave-one-out from posterior draws
Let denote the parameters, the data, and the posterior. The exact leave-one-out quantity for point is , the probability of under a posterior fitted to every other point. The summed quantity is
The posterior with point removed is related to the full posterior by a factor . Averaging over the full-posterior draws for gives the raw importance sampling estimate:
This is the harmonic mean of the likelihoods of point across the draws. It is easy to compute, but it is unstable. When one draw gives a point a very small likelihood, its reciprocal is very large and dominates the sum. The weights can have infinite variance.
Smoothing the weights with a Pareto tail
PSIS replaces the largest weights for each point with values from a fitted generalised Pareto distribution. The tail of the weight distribution is modelled with a shape parameter , and the largest weights are replaced by quantiles of that fitted distribution. The fit is then used in place of the raw extreme values.
The shape parameter is also a diagnostic. The paper gives these working guides for interpreting it:
- : the estimate has finite variance and is reliable.
- : the estimate is still useful in practice, but there is a warning.
- : the estimate is unreliable for that point. The paper recommends refitting or sampling directly from the leave-one-out posterior for those points, and using -fold cross-validation when there are many such points.
This is the key practical contribution. The method does not only give an answer. It says when that answer should not be trusted.
WAIC
WAIC estimates the same elpd as the sum of two pieces: a fit term and a penalty term.
The fit term is the log pointwise predictive density on the observed data, averaged over the draws:
The penalty is an estimate of the effective number of parameters. It is the sum over points of the sample variance, across draws, of the log-likelihood of each point:
Each point's variance is computed separately and then summed. The paper notes that this is more stable than DIC's single-variance version. WAIC is asymptotically equal to Bayesian leave-one-out cross-validation, but it can fail in finite samples. The paper reports that it starts to fail when the posterior variance of the log predictive density for some point exceeds about 0.4, which is a sign of a point the model finds very influential.
Comparing two models
Comparing two models uses the difference of their elpd values. Because both models were evaluated on the same data, the standard error of the difference can be computed from the pointwise differences:
A difference that is several standard errors wide is a real difference in predictive accuracy. A difference smaller than one standard error means the data do not clearly separate the models.
Results
The paper tests the methods on several examples fitted with Stan. They include a hierarchical model of eight schools, a regression of stack loss, a logistic model of leukaemia survival and a multilevel model of radon measurements, among others. For each example the authors computed exact leave-one-out values by refitting, and then compared each approximation against that reference over repeated simulations of the whole fitting process.
The main finding is that PSIS-LOO has the lowest root mean squared error across the examples. Raw importance sampling is unstable where the weights have high variance. Truncated importance sampling and WAIC are biased in some examples. -fold cross-validation needs additional refits, which PSIS-LOO avoids. When the diagnostic flags a few problem points, sampling directly for those points, as in the PSIS-LOO+ variant, improves the result at a modest extra cost.
The standard error results matter for applied work. They let a researcher report not just which model predicts better, but whether the difference is distinguishable from noise.
Why it mattered
The paper turned leave-one-out cross-validation from a method that was too costly for most Bayesian work into a routine step. The loo package in R, and ports in other languages, computes these quantities directly from the log-likelihood matrix that a Stan or similar fit already stores. The diagnostic, which flags points where the approximation cannot be trusted, made the method safe to use without expert tuning.
It also put WAIC and PSIS-LOO side by side with clear guidance. Practitioners now have a default, PSIS-LOO, with a check built in, and a faster alternative, WAIC, for cases where the diagnostics are clean. Model comparison in Bayesian workflows, including model averaging, typically starts from these pointwise quantities.
Reading guide
Read the prerequisites in this order, matched to the paper sections:
- Posterior Distribution and Likelihood Function: needed for the method sections, where the log-likelihood of each point is evaluated at each posterior draw.
- Posterior Predictive Distribution: needed for the definition of elpd, which is an expected log predictive density.
- Train, Validation and Test Sets and Cross-Validation: needed for the motivation and for the -fold comparison.
- Markov Chain Monte Carlo: needed to understand where the posterior draws come from, and why the method treats them as the input.
- Importance Sampling: needed for the core computation of leave-one-out from draws and the Pareto smoothing that follows.
- Kullback–Leibler Divergence and Bias-Variance Tradeoff: useful for the discussion of how predictive accuracy and model complexity trade off.
- Bayesian Model Averaging: useful for the model comparison ideas.
For the Results section you need items 1, 3 and 5. Item 4 helps with the reference computations.