Skip to main content
QUICK REVIEW

[Paper Review] LF-PPL: A Low-Level First Order Probabilistic Programming Language for Non-Differentiable Models

Yuan Zhou, Bradley Gram-Hansen|arXiv (Cornell University)|Mar 6, 2019
Bayesian Modeling and Causal InferenceComputer Science10 citations
TL;DR

This paper introduces LF-PPL, a low-level first-order probabilistic programming language designed for models with continuous, discrete, and piecewise-continuous variables. By enforcing mathematical constraints that ensure discontinuities in the target density have measure zero, LF-PPL enables automatic detection of discontinuity boundaries and supports efficient inference via a specialized Discontinuous Hamiltonian Monte Carlo (DHMC) engine, significantly improving performance on non-differentiable models compared to standard HMC.

ABSTRACT

We develop a new Low-level, First-order Probabilistic Programming Language (LF-PPL) suited for models containing a mix of continuous, discrete, and/or piecewise-continuous variables. The key success of this language and its compilation scheme is in its ability to automatically distinguish parameters the density function is discontinuous with respect to, while further providing runtime checks for boundary crossings. This enables the introduction of new inference engines that are able to exploit gradient information, while remaining efficient for models which are not everywhere differentiable. We demonstrate this ability by incorporating a discontinuous Hamiltonian Monte Carlo (DHMC) inference engine that is able to deliver automated and efficient inference for non-differentiable models. Our system is backed up by a mathematical formalism that ensures that any model expressed in this language has a density with measure zero discontinuities to maintain the validity of the inference engine.

Motivation & Objective

  • To address the challenge of efficient inference in probabilistic models with non-differentiable densities, especially those arising from discrete or piecewise-continuous variables.
  • To design a low-level probabilistic programming language that formally guarantees measure-zero discontinuities in the target density, ensuring compatibility with advanced inference algorithms.
  • To develop a compilation scheme that automatically classifies continuous and discontinuous variables and detects boundary crossings at runtime.
  • To enable the integration of specialized inference engines—such as DHMC—into probabilistic programming systems without manual specification of discontinuity locations.
  • To demonstrate the practical effectiveness of the framework through empirical evaluation on Gaussian Mixture Models and heavy-tailed piecewise distributions.

Proposed method

  • LF-PPL enforces mathematical constraints on model syntax to ensure that any discontinuities in the joint density function are of measure zero, preserving validity for discontinuity-aware inference algorithms.
  • The language uses a first-order, low-level syntax with explicit control flow (e.g., if-else statements) to represent models with mixed variable types, including discrete and continuous variables.
  • A novel compilation scheme statically analyzes models to classify which variables the density is discontinuous with respect to, and instruments runtime checks for boundary crossings.
  • The framework supports the implementation of inference engines like Discontinuous Hamiltonian Monte Carlo (DHMC), which uses coordinate-wise integrators to maintain efficiency in the presence of discontinuities.
  • The compilation pipeline translates LF-PPL programs into executable inference code, enabling integration with existing probabilistic programming backends.
  • The system is formally verified via translation rules to ensure semantic correctness and measure-zero discontinuity guarantees.

Experimental results

Research questions

  • RQ1Can a low-level probabilistic programming language be designed to formally guarantee that discontinuities in the target density are of measure zero?
  • RQ2Can a compilation scheme automatically identify which variables induce discontinuities in the density function of a probabilistic model?
  • RQ3Can runtime detection of discontinuity boundary crossings be achieved in a way that enables efficient inference for non-differentiable models?
  • RQ4Can specialized inference engines like DHMC be effectively automated within a PPL using such a compilation pipeline?
  • RQ5Does the integration of DHMC in LF-PPL lead to measurable performance improvements over standard HMC and other baselines on non-differentiable models?

Key findings

  • The DHMC inference engine implemented in LF-PPL achieves performance comparable to NUTS with Metropolis-within-Gibbs in PyMC3 on a Gaussian Mixture Model, with similar Mean Squared Error (MSE) over 10^5 samples.
  • On high-dimensional piecewise models with discontinuities, DHMC outperforms standard HMC in terms of worst mean absolute error (WMAE), especially as dimensionality increases.
  • The performance degradation of standard HMC is rapid with increasing dimension, while DHMC maintains stable per-sample efficiency due to its coordinate-wise integrator design.
  • The compilation scheme successfully detects discontinuity boundaries at runtime, enabling correct operation of DHMC without manual user annotation of discontinuity locations.
  • The formal semantics of LF-PPL ensure that all models written in the language have densities with measure-zero discontinuities, validating the use of discontinuity-aware inference algorithms.
  • Empirical results confirm that LF-PPL enables automated, efficient inference for non-differentiable models, demonstrating the feasibility of integrating advanced inference engines into PPLs.

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.