Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Typical Sets: What They Are and How to (Hopefully) Find Them

Josh Speagle
September 20, 2017

Typical Sets: What They Are and How to (Hopefully) Find Them

Although typical sets are important in understanding how/why sampling algorithms (do not) work, they are rarely taught when most astronomers are introduced to sampling methods such as Markov Chain Monte Carlo (MCMC). I introduce the idea of typical sets using some basic examples and show why they make sampling difficult in higher dimensions. I then outline how their behavior shapes various MCMC algorithms such as (Adaptive) Metropolis-Hastings, ensemble sampling, and Hamiltonian Monte Carlo. See https://github.com/joshspeagle/typical_sets for additional resources.

Josh Speagle

September 20, 2017
Tweet

More Decks by Josh Speagle

Other Decks in Research

Transcript

  1. Typical Sets: What They Are and How to (Hopefully) Find

    Them Josh Speagle [email protected] Based on this talk by Michael Betancourt at StanCon.
  2. Intended Audience • Some experience with the basics of Bayesian

    statistics. • Some experience using MCMC for research.
  3. Intended Audience • Some experience with the basics of Bayesian

    statistics. • Some experience using MCMC for research. • Have heard of ensemble sampling methods such as emcee.
  4. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem
  5. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem Parameters
  6. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem Data Parameters
  7. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem Data Parameters Model
  8. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem
  9. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem Prior
  10. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem Prior Likelihood
  11. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem Prior Likelihood Posterior
  12. Bayesian Inference Pr , M = Pr , M Pr

    |M Pr M Bayes’ Theorem Prior Likelihood Posterior Evidence
  13. = Where is the posterior? ≡ 0 ∞ “Typical Set”

    MCMC wants to draw samples from this “shell”
  14. Tension in the Metropolis Update ′ = min 1, ′

    ′ ′ “Volume” “Amplitude”
  15. Ideal Metropolis-Hastings ′ = Normal ′ = , = s

    Typical Separation Adaptive M-H
  16. emcee ′ = min 1, ′ −1 ~ = 1

    from 1 , 0 otherwise “Stretch” factor
  17. emcee ′ = min 1, ′ −1 ~ = 1

    from 1 , 0 otherwise “Stretch” factor
  18. emcee ′ = min 1, ′ −1 ~ = 1

    from 1 , 0 otherwise “Stretch” factor 
  19. Summary • Volume scales as . • The posterior density

    depends on both volume and amplitude. • Most of the posterior is concentrated in a “shell” around the best solution called the typical set. • MCMC draws samples from the typical set.
  20. Hamiltonian Monte Carlo Treat the particle at position q as

    a point mass with mass matrix M and momentum p. Pr , ∝ , = − −1 2 Hamiltonian
  21. Hamiltonian Monte Carlo Pr , ∝ , = − −1

    2 Treat the particle at position q as a point mass with mass matrix M and momentum p. = = −1 = − = ln Hamiltonian Hamilton’s Equations
  22. Hamiltonian Monte Carlo ′, −′ , = min 1, Pr

    ′, −′ Pr , ∼ Normal = , =