Definitionresearch
Horseshoe prior
Also called horseshoe shrinkage prior.
A continuous shrinkage prior that is a normal scale mixture with half-Cauchy local scales. It pulls noise strongly to zero and leaves large signals almost unshrunk.
The horseshoe prior is a prior for a vector of coefficients that are believed to be mostly zero or near zero, with a few large ones. Each coefficient is normal given its own scale, and the scales have half-Cauchy distributions, so the prior has an infinitely tall peak at zero and heavy tails. In the normal means problem, the amount by which the posterior mean shrinks an observation has a Beta prior law, whose density looks like a horseshoe: almost all mass is near "shrink completely" or near "do not shrink". It behaves like a spike-and-slab prior in its posterior mean, but it is continuous and has no indicators.
Definition
Let be coefficients, for example the means in or the coefficients of a linear regression. The horseshoe prior with global scale is
where is the half-Cauchy law with density on . The are the local scales. The global scale is either fixed or given its own prior, usually . So the horseshoe is a two-level hierarchical model for the scales.
Shrinkage coefficient. In the normal means problem , given and the prior of is normal, so
and . The value means "set to zero" and means "keep ".
The horseshoe law of . If , then has the Beta law, with density and distribution function
Proof. The map is a decreasing bijection from to with inverse and . Since , the change of variables gives
which is the Beta density because . The substitution gives the distribution function.
The density is unbounded at both ends, which gives the name. For a general ratio the same change of variables gives
so a small moves the mass toward , that is, toward more shrinkage.
Posterior of . With , , so
At this is Beta, with mean . For large the factor makes approximately exponential with mean , so : the shrinkage of a large signal goes to 0.
The marginal density. The prior density of has no closed form. Carvalho, Polson and Scott (2010, Theorem 1) show that with it is unbounded at 0 and satisfies
so it has a logarithmic pole at 0 and tails like . This bound is cited, not proved here; a numerical integration agrees with it at , for example between and .
Examples and non-examples
Example: the normal means rule. With , numerical integration of gives
| 0 | 0.5 | 1 | 2 | 3 | 5 | 10 | |
|---|---|---|---|---|---|---|---|
| 0.667 | 0.655 | 0.620 | 0.469 | 0.263 | 0.084 | 0.020 | |
| 0 | 0.172 | 0.380 | 1.063 | 2.210 | 4.579 | 9.798 |
At , is close to . The table on the spike-and-slab prior page puts this rule next to the spike-and-slab and normal rules.
Example: a Monte Carlo check of the law of . Draw with uniform, which is half-Cauchy, times with random.Random(2024), and set . The Kolmogorov-Smirnov distance to is , so , below the 5% critical value . This is a check of the proof above, not a replacement for it.
Example: sparse regression. For a regression with coefficients of which about are expected to be nonzero, Piironen and Vehtari (2017) suggest the global scale , so that the prior expected number of effectively nonzero coefficients is about .
Non-example: the Laplace prior. The Bayesian version of the lasso uses Laplace, which is a normal scale mixture with exponential mixing on . Its density is bounded at 0 and its tails are exponential, so it shrinks small values less than the horseshoe and large values by a constant amount that does not vanish.
Non-example: a normal prior. A fixed scale, , gives the normal prior of ridge regression, with the same for every coefficient. There is no adaptation to the size of each signal.
Non-example: the spike-and-slab prior. The spike-and-slab prior has a point mass at 0 and gives inclusion probabilities. The horseshoe has neither: every is nonzero with probability 1. Values of are often used like inclusion probabilities, but they are shrinkage weights.
Related definitions
- Global-local shrinkage priors. The horseshoe is the main example of the family with a heavy-tailed law for the local scales and a small global scale . The global scale sets the overall level of sparsity; the local scales let single coefficients escape.
- The global scale. Polson and Scott (2012) argue for , or after scaling. Estimating by maximizing the marginal likelihood is empirical Bayes, and the estimate can collapse to 0, which shrinks every coefficient to zero.
- Regularized horseshoe. Piironen and Vehtari (2017) replace by . Small coefficients are treated as before, and large ones see a normal slab of width , which helps when the data do not identify the large coefficients well, as in logistic regression with separation.
- Theory. Van der Pas, Kleijn and van der Vaart (2014) show that, for a suitable choice of depending on the number of nonzero means, the posterior contracts around a sparse mean vector at the minimax rate up to a constant.
- Computation. Given the scales, the model is a Bayesian linear regression, so Gibbs sampling alternates between the coefficients and the scales, often with auxiliary inverse gamma variables for the half-Cauchy laws. Hamiltonian Monte Carlo also works, but the funnel shape between and needs a non-centred form, with .
- Relation to James-Stein. With one common scale and no local scales, the normal means rule shrinks every coordinate by the same factor, as the James-Stein estimator does; the local scales are what let the horseshoe treat noise and signals differently.
References
- Carlos M. Carvalho, Nicholas G. Polson and James G. Scott, The horseshoe estimator for sparse signals, Biometrika 97(2), 2010, pages 465 to 480; the shrinkage coefficient kappa and its Beta(1/2, 1/2) law, and Theorem 1 (the bounds K/2 log(1 + 4/theta^2) < p(theta) < K log(1 + 2/theta^2) on the marginal density, K = 1/sqrt(2 pi^3))
- Juho Piironen and Aki Vehtari, Sparsity information and regularization in the horseshoe and other shrinkage priors, Electronic Journal of Statistics 11(2), 2017, the effective number of nonzero coefficients, the reference value tau0 = p0/(D - p0) sigma/sqrt(n) for the global scale, and the regularized horseshoe (general locator)
- Polson and Scott 2012, the half-Cauchy prior for the global scale tau (general locator)
- van der Pas, Kleijn and van der Vaart 2014, posterior contraction at the near-minimax rate for a suitable global scale (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 1R00W2 Edit this page History Report an error Markdown