efficient probabilistic inference in the quest for
play

Efficient Probabilistic Inference in the Quest for Physics Beyond - PowerPoint PPT Presentation

Efficient Probabilistic Inference in the Quest for Physics Beyond the Standard Model Atlm Gne Baydin , Lukas Heinrich, Wahid Bhimji, Lei Shao, Saeid Naderiparizi, Andreas Munk, Jialin Liu, Bradley Gram-Hansen, Gilles Louppe, Lawrence


  1. Efficient Probabilistic Inference in the Quest for Physics Beyond the Standard Model Atılım Güneş Baydin , Lukas Heinrich, Wahid Bhimji, Lei Shao, Saeid Naderiparizi, Andreas Munk, Jialin Liu, Bradley Gram-Hansen, Gilles Louppe, Lawrence Meadows, Philip Torr, Victor Lee, Prabhat, Kyle Cranmer, Frank Wood

  2. Probabilistic programming

  3. Deep learning Model is learned from data as a differentiable transformation Inputs Outputs Neural network 3

  4. Deep learning Model is learned from data as a differentiable transformation Inputs Outputs Neural network (differentiable program) Difficult to interpret the actual learned model 4

  5. Deep learning Model is learned from data as a differentiable transformation Inputs Outputs Neural network (differentiable program) Probabilistic programming Model is defined as a structured generative program Inputs Outputs Model / probabilistic program / simulator 5

  6. Probabilistic programming Inputs Outputs Model / probabilistic program / simulator Probabilistic model: a joint distribution of random variables Latent (hidden, unobserved) variables ● Observed variables (data) ● 6

  7. Probabilistic programming Inputs Outputs Model / probabilistic program / simulator Probabilistic model: a joint distribution of random variables Latent (hidden, unobserved) variables ● Observed variables (data) ● Probabilistic graphical models use graphs to express conditional dependence Bayesian networks ● Markov random fields (undirected) ● 7

  8. Probabilistic programming Inputs Outputs Model / probabilistic program / simulator Probabilistic model: a joint distribution of random variables Latent (hidden, unobserved) variables ● Observed variables (data) ● Probabilistic programming extends this to “ordinary programming with two added constructs” Sampling from distributions ● Conditioning by specifying observed values ● 8

  9. Inference Inputs Outputs Model / probabilistic program / simulator Use your model to analyze (explain) some given data as the posterior distribution of latents conditioned on observations Likelihood: How do data depend on latents? Posterior: Prior, describes latents Distribution of latents describing given data 9 See Edward tutorials for a good intro: http://edwardlib.org/tutorials/

  10. Inference Inputs Simulated data Model / probabilistic program / simulator Run many times ● Record execution traces , ● Approximate the posterior ● Observed data 10

  11. Inference Inputs Simulated data Model / probabilistic program / simulator Run many times ● Record execution traces , ● This is importance sampling, other Approximate the posterior ● Observed inference engines run differently data 11

  12. Inference reverses the generative process Inputs Simulated data (detector response) Generative model / simulator (e.g., Sherpa, Geant) Inputs Observed data (detector response) 12 Real world system

  13. Inference Live demo 13

  14. Inference engines Markov chain Monte Carlo ● Probprog-specific: ○ prior proposal Lightweight ■ Metropolis–Hastings Random-walk ■ posterior Metropolis–Hastings Sequential ○ Autocorrelation in samples ○ “Burn in” period ○ Importance sampling ● We sample in trace space: Propose from prior ○ each sample (trace) is one full execution of Use learned proposal ○ the model/simulator! parameterized by observations No autocorrelation or burn in ○ Each sample is independent (parallelizable) ○ Others: variational inference, Hamiltonian Monte Carlo, etc. ● 14

  15. Inference engines Markov chain Monte Carlo ● Probprog-specific: ○ prior proposal Lightweight ■ Metropolis–Hastings Random-walk ■ posterior Metropolis–Hastings Sequential ○ Autocorrelation in samples ○ “Burn in” period ○ Importance sampling ● We sample in trace space: Propose from prior ○ each sample (trace) is one full execution of Use learned proposal ○ the model/simulator! parameterized by observations No autocorrelation or burn in ○ Each sample is independent (parallelizable) ○ Others: variational inference, Hamiltonian Monte Carlo, etc. ● 15

  16. Inference engines Markov chain Monte Carlo ● Probprog-specific: ○ prior proposal Lightweight ■ Metropolis–Hastings Random-walk ■ posterior Metropolis–Hastings Sequential ○ Autocorrelation in samples ○ “Burn in” period ○ Importance sampling ● We sample in trace space: Propose from prior ○ each sample (trace) is one full execution of Use learned proposal ○ the model/simulator! parameterized by observations No autocorrelation or burn in ○ Each sample is independent (parallelizable) ○ Others: variational inference, Hamiltonian Monte Carlo, etc. ● 16

  17. Inference engines Markov chain Monte Carlo ● Probprog-specific: ○ prior proposal Lightweight ■ Metropolis–Hastings Random-walk ■ posterior Metropolis–Hastings Sequential ○ Autocorrelation in samples ○ “Burn in” period ○ Importance sampling ● We sample in trace space: Propose from prior ○ each sample (trace) is one full execution of Use learned proposal ○ the model/simulator! parameterized by observations No autocorrelation or burn in ○ Each sample is independent (parallelizable) ○ Others: variational inference, Hamiltonian Monte Carlo, etc. ● 17

  18. Probabilistic programming languages (PPLs) Anglican (Clojure) ● Church (Scheme) ● Edward, TensorFlow Probability (Python, TensorFlow) ● Pyro (Python, PyTorch) ● Figaro (Scala) ● Infer.NET (C#) ● LibBi (C++ template library) ● PyMC3 (Python) ● Stan (C++) ● WebPPL (JavaScript) ● For more, see http://probabilistic-programming.org 18

  19. Existing simulators as probabilistic programs

  20. Execute existing simulators as probprog A stochastic simulator implicitly defines a probability distribution by sampling (pseudo-)random numbers → already satisfying one requirement for probprog Key idea: Interpret all RNG calls as sampling from a prior distribution ● Introduce conditioning functionality to the simulator ● Execute under the control of general-purpose inference engines ● Get posterior distributions over all simulator latents ● conditioned on observations 20

  21. Execute existing simulators as probprog A stochastic simulator implicitly defines a probability distribution by sampling (pseudo-)random numbers → already satisfying one requirement for probprog Advantages: Vast body of existing scientific simulators (accurate generative models) with years of development: MadGraph, Sherpa, Geant4 Enable model-based (Bayesian) machine learning in these ● Explainable predictions directly reaching into the simulator ● (simulator is not used as a black box) Results are still from the simulator and meaningful ● 21

  22. Coupling probprog and simulators Several things are needed: A PPL with with simulator control incorporated into design ● A language-agnostic interface for connecting PPLs to simulators ● Front ends in languages commonly used for coding simulators ● 22

  23. Coupling probprog and simulators Several things are needed: A PPL with with simulator control incorporated into design ● pyprob A language-agnostic interface for connecting PPLs to simulators ● PPX - the P robabilistic P rogramming e X ecution protocol Front ends in languages commonly used for coding simulators ● pyprob_cpp 23

  24. pyprob https://github.com/probprog/pyprob A PyTorch-based PPL Inference engines: Markov chain Monte Carlo ● Lightweight Metropolis Hastings (LMH) ○ Random-walk Metropolis Hastings (RMH) ○ Importance Sampling ● Regular (proposals from prior) ○ Inference compilation (IC) ○ Hamiltonian Monte Carlo (in progress) ● 24

  25. pyprob https://github.com/probprog/pyprob A PyTorch-based PPL Inference engines: Markov chain Monte Carlo ● Lightweight Metropolis Hastings (LMH) ○ Random-walk Metropolis Hastings (RMH) ○ Importance Sampling ● Regular (proposals from prior) ○ Inference compilation (IC) ○ Le, Baydin and Wood. Inference Compilation and Universal Probabilistic Programming. AISTATS 2017 25

  26. 26

  27. PPX https://github.com/probprog/ppx P robabilistic P rogramming e X ecution protocol Cross-platform, via flatbuffers: http://google.github.io/flatbuffers/ ● Supported languages: C++, C#, Go, Java, JavaScript, PHP, Python, ● TypeScript, Rust, Lua Similar to Open Neural Network Exchange (ONNX) for deep learning ● Enables inference engines and simulators to be implemented in different programming languages ● executed in separate processes, separate machines across networks ● 27

  28. E.g., SHERPA, GEANT 28

  29. PPX 29

  30. pyprob_cpp https://github.com/probprog/pyprob_cpp A lightweight C++ front end for PPX 30

  31. Probprog and high-energy physics “etalumis” simulate

  32. etalumis | simulate Andreas Wahid Lei Lukas Atılım Güneş Munk Bhimji Shao Heinrich Baydin Saeid Larry Bradley Gilles Jialin Naderiparizi Meadows Gram-Hansen Louppe Liu Victor Kyle Prabhat Phil Frank Lee Cranmer Torr Wood Cori supercomputer, Lawrence Berkeley Lab 2,388 Haswell nodes (32 cores per node) 32 9,688 KNL nodes (68 cores per node)

  33. pyprob_cpp and Sherpa 33

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend