Spike-and-Slab Priors
A prior for regression coefficients built from two pieces glued together, a sharp spike at exactly zero for 'this predictor probably doesn't matter,' and a wide, flat slab for 'if it does matter, its size is anyone's guess', used to let Bayesian regression decide which predictors to include, not just how to weight them.
Prerequisites: Bayesian Linear Regression, Prior Elicitation and Prior Choice
You've assembled 40 candidate factors that might predict a stock's return, but you strongly suspect only a handful actually matter, most are noise. An ordinary Bayesian regression with a normal prior on every coefficient shrinks the useless ones toward zero, but never quite to zero; every coefficient ends up with some small nonzero posterior estimate, leaving you to eyeball which ones "really" matter. A spike-and-slab prior answers a sharper question directly: for each coefficient, is it plausibly exactly zero, or genuinely nonzero and if so how big?
An analogy: a suspect lineup with a genuine option for "not present"
Ordinary variable selection via shrinkage is a bit like a police lineup where every suspect is assumed at least a little guilty, and the only question is how guilty each looks, nobody is ever fully cleared. A spike-and-slab prior instead gives each suspect a genuine possibility of being cleared entirely (the "spike": a point of pure innocence, coefficient exactly zero) versus being a real suspect whose degree of guilt is estimated on its own wide scale (the "slab"). The model doesn't just shrink everyone toward "probably not guilty", it makes an actual binary call, in probability terms, about whether each predictor belongs in the model at all.
The maths, one symbol at a time
For each coefficient , the spike-and-slab prior is a mixture:
with a latent inclusion indicator, itself given a prior probability (the prior belief that predictor belongs in the model at all). In words: with probability , coefficient is drawn from , a "spike" that places all its mass exactly at zero, the predictor is excluded. With probability , it's drawn from a wide normal "slab" , the predictor is included, and its size is estimated with real uncertainty. Fitting the model (typically via MCMC) produces, for every predictor, a posterior inclusion probability , a direct, interpretable answer to "how likely is it that this predictor actually belongs in the model," alongside a posterior distribution over its size conditional on being included.
Worked example 1: sorting real signal from noise among candidate factors
Fit a spike-and-slab regression with 10 candidate factors on 300 months of returns, using prior inclusion probability per factor. Suppose the posterior inclusion probabilities come out as: factor A, ; factor B, ; factor C, ; and the remaining seven below . This reads cleanly: A and B are almost certainly real, the rest almost certainly noise, with no ambiguous middle ground, a much sharper statement than a ridge regression's shrunk-but-nonzero coefficients on all ten would give.
Worked example 2: a borderline factor and what it means to sit near 50%
Suppose an eleventh factor, "overnight gap size," gets a posterior inclusion probability of , right near the coin-flip line. This is itself informative: the data genuinely can't decide whether this factor belongs, a meaningfully different conclusion from either "definitely include" (0.94) or "definitely exclude" (0.05). A quant seeing 0.52 knows to treat it as speculative, worth revisiting once more data accumulates, rather than committing to it or discarding it outright, a distinction a plain shrinkage coefficient wouldn't communicate nearly as clearly.
Each factor's inclusion probability is itself a mini Bayesian update, prior belief in combined with how much the data favors "real" over "noise", the same posterior-updating mechanic shown in the explorer above, just run once per candidate predictor.
What this means in practice
Spike-and-slab priors are used in quant research wherever the question is genuinely "which of these candidate predictors belong in the model," not just "how should I weight them", factor screening across a large candidate universe, or deciding which of many technical indicators to retain in a trading signal. Compared to lasso-style sparsity (see ridge and lasso regularization), which also zeroes out coefficients but gives no probability attached to that decision, spike-and-slab gives a genuine posterior probability of inclusion, useful when you want to communicate confidence in the selection itself, not just report a final sparse model.
A spike-and-slab prior treats "should this predictor be in the model" as its own explicit random variable, mixing a spike at exactly zero with a wide slab for genuine effect sizes, fitting it yields a posterior inclusion probability per predictor, giving a direct, interpretable confidence level for variable selection rather than the all-shrunk-but-nonzero coefficients an ordinary Bayesian regression produces.
The prior inclusion probability acts like an implicit multiple-testing correction, and setting it carelessly changes results a lot, a close to 1 (expecting most predictors to matter) will flag noise factors as "included" too readily, while a close to 0 (expecting almost nothing to matter) can suppress real but modest factors. With a large candidate set (as in factor screening with dozens of candidates), should typically be set small and, ideally, itself estimated from the data rather than fixed by hand, treating it as a free, unexamined tuning knob is the most common way spike-and-slab results get quietly overstated or understated.
Discussion
💡 Discussion rules
- Ask and answer about this concept. Off-topic gets removed.
- No homework dumps. Show what you tried first.
- Corrections are welcome. Cite a source when you claim an error.
Loading discussion…
Related concepts
Practice in interviews
Further reading
- Mitchell and Beauchamp, 'Bayesian Variable Selection in Linear Regression' (1988)
- George and McCulloch, 'Variable Selection via Gibbs Sampling' (1993)