Skip to main content
QUICK REVIEW

[Paper Review] Deep Probabilistic Programming Languages: A Qualitative Study

Guillaume Baudart, Martin Hirzel|arXiv (Cornell University)|Apr 17, 2018
Machine Learning and Data ClassificationComputer Science22 references8 citations
TL;DR

This paper provides a qualitative comparative study of two leading deep probabilistic programming languages, Edward and Pyro, analyzing their design, usability, and expressiveness in combining probabilistic modeling with deep learning. It identifies key challenges in abstraction leakage, conciseness, and inference extensibility, while highlighting their strengths in composability, uncertainty modeling, and hierarchical representation learning.

ABSTRACT

Deep probabilistic programming languages try to combine the advantages of deep learning with those of probabilistic programming languages. If successful, this would be a big step forward in machine learning and programming languages. Unfortunately, as of now, this new crop of languages is hard to use and understand. This paper addresses this problem directly by explaining deep probabilistic programming languages and indirectly by characterizing their current strengths and weaknesses.

Motivation & Objective

  • To lower the barrier to entry for researchers and practitioners in deep probabilistic programming by providing a clear, code-driven comparison of Edward and Pyro.
  • To identify and characterize the current strengths and weaknesses of deep PPLs, especially in terms of language design, abstraction, and usability.
  • To guide future research by highlighting gaps in expressiveness, conciseness, watertight abstractions, and support for small-data and high-accuracy learning.
  • To position deep PPLs as a promising fusion of probabilistic programming, deep learning, and programming language principles, with a focus on explainability and uncertainty modeling.

Proposed method

  • Uses Edward (built on TensorFlow) and Pyro (built on PyTorch) as representative deep PPLs, with code examples in both languages using consistent terminology.
  • Employs a comparative tutorial approach, presenting increasingly complex models in both languages to highlight differences in syntax, control flow, and abstraction.
  • Analyzes language-level features such as support for dynamic control structures (e.g., loops and conditionals), leveraging PyTorch’s dynamic computation graph vs. TensorFlow’s static graph in Edward.
  • Evaluates abstraction quality by examining how well deep PPLs hide low-level implementation details, especially in error messages and tensor dimension tracking.
  • Compares the role of priors and guides in variational inference, assessing the verbosity and structure of model and guide definitions.
  • Assesses the composability of models and inference procedures, particularly in Edward’s support for composing both models and inference algorithms.

Experimental results

Research questions

  • RQ1How do Edward and Pyro differ in their support for dynamic control structures like loops and conditionals in probabilistic models?
  • RQ2To what extent do deep PPLs provide watertight abstractions that prevent low-level implementation details (e.g., tensor dimensions) from leaking into user code?
  • RQ3How do the design choices in Edward and Pyro affect the conciseness and readability of probabilistic models and guides?
  • RQ4What are the current limitations in supporting small-data learning and high-accuracy training in deep PPLs, despite theoretical feasibility?
  • RQ5How can deep PPLs better integrate the strengths of probabilistic modeling (uncertainty, explainability) with deep learning (automatic feature learning, scalability)?

Key findings

  • Pyro supports native Python control structures (e.g., loops and conditionals) more naturally than Edward due to its foundation on PyTorch’s dynamic computation graph.
  • Edward’s reliance on TensorFlow’s static computational graph requires special APIs to embed dynamic control flow, making such constructs more verbose and less intuitive.
  • Both Edward and Pyro suffer from leaky abstractions: error messages often obscure the source of dimension mismatches, and variable names are erased in computational graphs, complicating debugging.
  • Edward is more concise than Pyro in writing models and guides, but Pyro’s use of functions and classes enhances structure and enables efficient co-routine-based inference.
  • Despite being Turing complete, Edward’s current implementation limits the expressiveness of dynamic constructs, suggesting a need for better integration with modern dynamic deep learning features.
  • The field lacks robust support for Monte Carlo inference in Pyro, which currently emphasizes variational inference, indicating a key area for future extension.

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.