Definitionadvanced
Widely applicable information criterion
Also called WAIC, Watanabe-Akaike information criterion.
An estimate of out-of-sample predictive accuracy for Bayesian models. It is the log pointwise posterior predictive density minus the posterior variance of the log likelihood.
The widely applicable information criterion (WAIC) estimates how well a fitted Bayesian model will predict new data points from the same source. It takes the log of each point's posterior predictive density, sums over the data, and subtracts a penalty: the sum over the points of the posterior variance of the log likelihood. Watanabe (2010) defined it and proved that it is asymptotically equivalent to Bayesian leave-one-out cross-validation, also for singular models such as mixtures and neural networks where the posterior is not close to normal. It is computed from posterior draws, like PSIS-LOO, which estimates the same target.
Definition
Let be the data, the density of one point given the parameter, and the posterior. Write and for the mean and variance over .
The target is the expected log pointwise predictive density for new data drawn from the true distribution :
Up to a term that does not depend on the model, is the Kullback-Leibler divergence from to the posterior predictive distribution, so a larger elpd means a predictive closer to the truth.
WAIC. With the log pointwise predictive density and the penalty
the estimate of elpd is
The factor puts WAIC on the deviance scale of AIC, where smaller is better. Watanabe's own definition is per observation and without the : the Bayes training loss plus the functional variance divided by . All three scales order models in the same way.
From draws. With posterior draws , replace by , computed as a log-sum-exp, and by the sample variance of . The standard error of is times the standard deviation of the pointwise terms. The function waic of the PSIS-LOO implementation computes exactly this.
Effective number of parameters. plays the role of the parameter count in AIC. An older form, , has the same limit in regular models; Gelman, Hwang and Vehtari (2014) recommend the variance form.
What is proved and what is not. Watanabe (2010) proved that the expectation of WAIC over data sets equals that of the generalization loss up to , and that WAIC and Bayesian leave-one-out cross-validation differ by per observation, under conditions that include singular models. These are asymptotic results. For a given finite data set, WAIC is an estimate whose error is only measured, and Vehtari, Gelman and Gabry (2017) found that it is less reliable than PSIS-LOO when some observations are very influential.
Examples and non-examples
Example: a normal mean, exact. Let , and a flat prior on . The posterior is with and . Write , so .
- The posterior predictive of a point is , so .
- Since with , . The pointwise penalties are , and .
- So and .
The exact leave-one-out value is , close to WAIC. The outlying point carries the largest penalty. With , and posterior draws from random.Random(1), the estimates from draws are , and ; the Monte Carlo error is in the penalty, not in the lppd.
Example: the penalty tracks the fit of the model. In the same model with , the expected penalty over data sets is about , the number of parameters, when the data really have variance 1. If the data have variance 4, the model's likelihood is too narrow and goes to about ; for points drawn by random.Random(5) it is for variance 1 and for variance 4. AIC would still charge . This is the case where the posterior variance penalty, like Takeuchi's criterion, is the more honest one.
Non-example: AIC. AIC uses the maximum likelihood plug-in, not the posterior, and the count , not a variance. In the example, and . AIC estimates the predictive accuracy of the plug-in density ; WAIC estimates that of the posterior predictive. See Akaike information criterion.
Non-example: BIC. approximates , the log marginal likelihood. Its target is the posterior probability of a model, not predictive accuracy, and its penalty grows with . See Bayesian information criterion. Watanabe's WBIC (2013) is the singular-model counterpart of BIC and is a different criterion from WAIC.
Non-example: DIC. The deviance information criterion plugs in the posterior mean, with . It uses the joint likelihood of all the data, not a sum of pointwise terms, and it is not invariant to reparametrization. In the example and , against .
Non-example: the Bayes factor. A Bayes factor compares how well models predicted all the data from the prior. WAIC compares how well they predict each point from the posterior. A Bayes factor changes without limit as a prior becomes more diffuse; WAIC changes very little.
Related definitions
- PSIS-LOO. Estimates the same elpd by importance sampling for each left-out point, and its values flag the points where the estimate is unreliable. WAIC has no such diagnostic.
- Cross-validation. Exact leave-one-out cross-validation refits the model times. WAIC and PSIS-LOO are two ways to avoid that.
- Akaike information criterion. The plug-in, regular-model ancestor. In a regular model with a weak prior and much data, when the model is correct and WAIC is close to AIC.
- Bayesian information criterion. A different target: model probability rather than prediction.
- Deviance statistic. WAIC on the scale is a penalized deviance.
- Stacking. Uses pointwise predictive densities like those of WAIC or PSIS-LOO to choose weights for combining models.
- Posterior predictive check. Asks whether the data look like draws from the predictive, not how well the model will predict new data.
References
- Watanabe 2010, pages 3571 to 3594 (the definition of WAIC as the Bayes training loss plus the functional variance over n, and its asymptotic equivalence with Bayes leave-one-out cross-validation; general locator)
- Andrew Gelman, Jessica Hwang and Aki Vehtari, Understanding predictive information criteria for Bayesian models, Statistics and Computing 24(6), 2014, the comparison of AIC, DIC, WAIC and leave-one-out cross-validation, the two penalties p_WAIC1 and p_WAIC2, and the deviance scale (general locator)
- Aki Vehtari, Andrew Gelman and Jonah Gabry, Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC, Statistics and Computing 27(5), 2017, pages 1413 to 1432 (the estimates from posterior draws, their standard errors, and the cases where WAIC is less reliable than PSIS-LOO; general locator)
- Andrew Gelman, John B. Carlin, Hal S. Stern, David B. Dunson, Aki Vehtari and Donald B. Rubin, Bayesian Data Analysis, 3rd edition, CRC Press, 2013, Chapter 7, Sections 7.1 and 7.2 (log predictive density, AIC, DIC and WAIC)
- Watanabe 2013, WBIC, an approximation to the log marginal likelihood that is a different criterion from WAIC (general locator)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag TPJ777 Edit this page History Report an error Markdown