Deep Probabilistic Programming Languages: A Qualitative Study

Guillaume Baudart, Martin Hirzel, Louis MandelarXiv 2018

Abstract

Deep Probabilistic Programming Languages (Deep PPLs) represent a convergence of Bayesian statistics and deep learning. This study provides a qualitative roadmap by comparing modern frameworks like Edward and Pyro against traditional baselines. We characterize the current state of the art, identify "leaky abstractions" in these multi-layered stacks, and demonstrate how these tools enable uncertainty-aware modeling through variational inference.

Introduction

Machine learning is currently bifurcated into two powerful paradigms: Deep Learning (DL) and Probabilistic Programming Languages (PPLs). DL excels at high-dimensional feature learning but often lacks uncertainty quantification. Conversely, PPLs offer explainable models with explicit uncertainty handling but struggle to scale. Deep PPLs aim to bridge this gap, yet they impose a high barrier to entry due to the required expertise in statistics, programming language theory, and deep learning. This paper addresses this barrier through a comparative tutorial and architectural analysis of the current state of the art.

Methodology and Comparative Frameworks

The authors evaluate three frameworks: Stan (a mature, traditional PPL), Edward (a Deep PPL built on TensorFlow), and Pyro (a Deep PPL built on PyTorch). The study progresses through three examples of increasing complexity:

  1. Biased Coin: A basic latent variable model used to introduce priors and posteriors.
  2. Probabilistic MLP: A Bayesian Neural Network where weights and biases are treated as probability distributions.
  3. Variational Autoencoder (VAE): A model integrating non-probabilistic deep learning components (encoder/decoder) within a probabilistic framework.
Graphical model of a Probabilistic MLP, illustrating the integration of neural network components with probabilistic variables.

The evaluation utilizes synthetic data for the coin toss and the MNIST handwritten digit dataset for the MLP and VAE tasks.

Key Insights: The Stack of Abstractions

A central finding is the "tower of abstraction" inherent in Deep PPLs. Users must navigate multiple layers simultaneously (e.g., Pyro, PyTorch, NumPy, and Python). This leads to "leaky abstractions" where low-level tensor dimension errors manifest as cryptic mathematical failures in the PPL layer.

Deep PPLs primarily utilize Variational Inference (VI) to turn inference into an optimization problem, leveraging the gradient descent infrastructure of deep learning. While Edward offers conciseness, Pyro's foundation in PyTorch allows for more natural use of native Python control flow, such as loops and conditional statements.

Side-by-side comparison of VAE implementations in Edward and Pyro, illustrating the different coding paradigms and the underlying graphical model.

Results and Discussion

Deep PPLs successfully enable composability, allowing models to be built from reusable neural network layers. They provide overt uncertainty, allowing a model to express confidence levels—a critical feature for high-stakes decision-making. However, the "tuning burden" remains significant; users must manually design "guides" (approximate posteriors) for variational inference, a task that is not yet fully automated and requires deep domain expertise.

Conclusion and Future Work

While Deep PPLs are powerful, they are not yet "watertight." Future work should focus on reducing the boilerplate code for priors and guides, improving MCMC support to match traditional PPLs, and rigorously benchmarking these tools on diverse real-world small-data scenarios. Careful language design is needed to mitigate the complexity of the multi-layered technology stack and reduce the manual burden on the researcher.

Summary updated

BibTeX
@misc{baudart2018deep,
  author = {Guillaume Baudart and Martin Hirzel and Louis Mandel},
  title = {{Deep Probabilistic Programming Languages: A Qualitative Study}},
  year = {2018},
  eprint = {1804.06458},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1804.06458},
}
Figure