Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Bayesian›Slice Sampling
Bayesian methods

Slice Sampling

Slice Sampling MCMC · Also known as: slice sampler, Neal slice sampler, uniform slice sampling, auxiliary variable slice sampler

Slice sampling is a Markov chain Monte Carlo (MCMC) algorithm introduced by Radford M. Neal in his 2003 Annals of Statistics paper. It generates samples from a target distribution by drawing uniformly from the region under the density curve — called the 'slice' — without requiring the user to specify a step-size or proposal distribution, making it self-tuning and broadly applicable for Bayesian posterior inference.

ScholarGate
  1. Bayesian methods
  2. v1
  3. 3 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Slice Sampling
Bayesian RegressionGibbs SamplingHamiltonian Monte CarloMCMCMetropolis-Hastings Algo…

When to use it

Slice sampling is well suited to unimodal or weakly multimodal continuous posteriors where Metropolis–Hastings performs poorly because of sensitivity to step-size tuning. It is particularly attractive when the posterior is defined up to a normalising constant (as in most Bayesian models), because only evaluations of the unnormalised density f(θ) are needed. It is available out-of-the-box in PyMC and Stan-adjacent samplers, making it accessible without custom implementation. It is less effective for high-dimensional problems (curse of dimensionality) or sharply multimodal posteriors where the slice may fragment into disconnected regions.

Strengths & limitations

Strengths
  • Self-tuning: requires no step-size or proposal distribution specification, removing the most common tuning burden of Metropolis–Hastings.
  • Guaranteed detailed balance: the shrinkage procedure maintains the correct invariant distribution without accept/reject overhead.
  • Efficient for low-to-moderate dimensions: the adaptive bracket expands to match the local scale of the posterior automatically.
  • Requires only unnormalised density evaluations, so it works directly with Bayesian posteriors defined up to a constant.
Limitations
  • Performance degrades in high dimensions because the univariate slice must be applied coordinate-by-coordinate or via hyperplane slices, making mixing slow.
  • Fragmented or sharply multimodal posteriors may trap the sampler in a single mode if the modes are separated by low-density regions below the current slice height.
  • Each iteration may require multiple density evaluations during the stepping-out and shrinkage phases, making it more expensive per sample than a simple Metropolis step when the density is costly to evaluate.
  • The univariate version does not exploit posterior geometry (gradients), so it is generally less efficient than Hamiltonian Monte Carlo for smooth, high-dimensional targets.

Frequently asked

How does slice sampling differ from Metropolis–Hastings?

Metropolis–Hastings proposes a candidate from a user-specified proposal distribution and accepts or rejects it. Its efficiency depends critically on choosing a good proposal scale. Slice sampling eliminates this choice: it constructs the proposal region (the slice and bracket) automatically from the density itself, and every candidate that lies inside the slice is accepted. This makes slice sampling easier to apply but does not make it universally faster — for smooth, high-dimensional posteriors, HMC typically outperforms both.

Does slice sampling always converge to the correct posterior?

Yes, under mild regularity conditions. Neal (2003) proved that the stepping-out and shrinkage procedures maintain detailed balance with respect to the target distribution, guaranteeing that the chain's stationary distribution is the target. Geometric ergodicity — meaning the chain converges at an exponential rate — holds for log-concave targets. As with all MCMC, convergence is asymptotic, so convergence diagnostics (R-hat, ESS) must be checked in practice.

Can slice sampling handle multimodal posteriors?

Only partially. If the posterior has well-separated modes and the density between them falls below the current slice height, the sampler may be unable to jump between modes — the slice becomes disconnected. Extensions such as parallel tempering or combining slice sampling with a global jump proposal are needed for reliable exploration of multimodal posteriors.

What is the 'stepping-out' width parameter and how do I set it?

The width w is an initial guess for the bracket size around the current point. Neal (2003) shows the algorithm is correct for any positive w: if w is too small the bracket is expanded (stepped out) until it covers the slice; if too large it is shrunk. A reasonable default is a fraction of the prior standard deviation. In PyMC the width is adapted automatically during tuning, so manual specification is rarely needed.

Sources

  1. Neal, R. M. (2003). Slice sampling (with discussion). Annals of Statistics, 31(3), 705–767. DOI: 10.1214/aos/1056562461 ↗
  2. Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian Data Analysis (3rd ed.). CRC Press. ISBN: 978-1439840955
  3. Robert, C. P., & Casella, G. (2004). Monte Carlo Statistical Methods (2nd ed.). Springer. ISBN: 978-0387212395

How to cite this page

ScholarGate. (2026, June 3). Slice Sampling MCMC. ScholarGate. https://scholargate.app/en/bayesian/slice-sampling

Related methods

Bayesian RegressionGibbs SamplingHamiltonian Monte CarloMCMC

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Bayesian RegressionBayesian↔ compare
  • Gibbs SamplingBayesian↔ compare
  • Hamiltonian Monte CarloBayesian↔ compare
  • MCMCBayesian↔ compare
Compare side by side →

Referenced by

Metropolis-Hastings Algorithm

Similar methods

Metropolis-Hastings AlgorithmMarkov Chain Monte CarloGibbs SamplingMCMCHamiltonian Monte CarloMultilevel Metropolis-HastingsHierarchical Hamiltonian Monte CarloRobust Markov chain Monte Carlo

Related reference concepts

Hamiltonian Monte CarloBayesian Computation and MCMCMetropolis-Hastings AlgorithmMarkov Chain Monte CarloRejection SamplingGibbs Sampling

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Slice Sampling (Slice Sampling MCMC). Retrieved 2026-07-21 from https://scholargate.app/en/bayesian/slice-sampling · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Radford M. Neal
Year
2003
Family
Bayesian / MCMC
Type
MCMC sampling algorithm
Purpose
posterior sampling
Inference
exact (in distribution), auxiliary-variable
Tuning
minimal — no step-size parameter required
Outputs
posterior samples
Related methods
Bayesian RegressionGibbs SamplingHamiltonian Monte CarloMCMC
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account