Skip to main content
QUICK REVIEW

[Paper Review] Pyro: Deep Universal Probabilistic Programming

Eli Bingham, Jonathan P. Chen|arXiv (Cornell University)|Oct 18, 2018
Gaussian Processes and Bayesian InferenceComputer Science9 references589 citations
TL;DR

Pyro is a Python-based probabilistic programming language built on PyTorch that enables scalable, flexible inference for complex AI models via stochastic variational inference and modular effect handlers (Poutine).

ABSTRACT

Pyro is a probabilistic programming language built on Python as a platform for developing advanced probabilistic models in AI research. To scale to large datasets and high-dimensional models, Pyro uses stochastic variational inference algorithms and probability distributions built on top of PyTorch, a modern GPU-accelerated deep learning framework. To accommodate complex or model-specific algorithmic behavior, Pyro leverages Poutine, a library of composable building blocks for modifying the behavior of probabilistic programs.

Motivation & Objective

  • Motivate a PPL design that is expressive, scalable, flexible, and minimal for AI research.
  • Present Pyro as an embedded Python PPL built on PyTorch to support large datasets and high-dimensional models.
  • Introduce Poutine for composable program transformations to separate model, inference, and runtime concerns.
  • Demonstrate practical scalability and flexibility through VAE and Deep Markov Model experiments.
  • Highlight openness and ecosystem collaboration, including PyTorch distributions integration.

Proposed method

  • Embed Pyro in Python with two primitives: pyro.sample for randomness and pyro.param for learnable parameters.
  • Use stochastic variational inference (SVI) with gradient-based optimization to approximate posteriors.
  • Leverage PyTorch for GPU-accelerated tensor math and reverse-mode autodiff.
  • Utilize Poutine to provide effect handlers that modify program behavior and separate inference code from language semantics.
  • Support arbitrary Python control flow within models, including data-dependent structure and unnormalized models via obs in sample.
  • Provide guides (approximate posteriors) that can depend on the model and use the same inputs as the model.

Experimental results

Research questions

  • RQ1How can a probabilistic programming language balance expressivity, scalability, flexibility, and minimality for AI research?
  • RQ2Can a PyTorch-backed PPL support complex, high-dimensional, non-conjugate models with scalable inference?
  • RQ3What abstractions (like Poutine) enable flexible, model-specific inference without constraining expressivity?
  • RQ4How does Pyro perform on representative deep generative models (e.g., VAE, DMM) in terms of correctness and efficiency?
  • RQ5What is the impact of integrating Pyro with existing ecosystems (e.g., PyTorch distributions) on usability and performance?

Key findings

  • Pyro enables expressive models with data-dependent control flow and unnormalized models while remaining scalable via GPU-accelerated computation and mini-batch SVI.
  • SVI with gradient-based optimization is a primary inference engine, supported by PyTorch autodiff and GPU acceleration.
  • Poutine provides a modular set of effect handlers to separate model, inference, and runtime concerns, enabling model-specific inference strategies.
  • Pyro’s VAE and DMM experiments demonstrate comparable results to reference implementations and show scalability to high-dimensional models.
  • Autoregressive flows (IAFs) can be incorporated with minimal code, improving expressiveness of approximate posteriors without substantial computational overhead.
  • Pyro and PyTorch Distributions integration enhances practical usability and contributes to the broader ecosystem.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.