Skip to main content
QUICK REVIEW

[Paper Review] An Application of Computable Distributions to the Semantics of Probabilistic Programs

Daniel Huang, Greg Morrisett|arXiv (Cornell University)|Jun 20, 2018
Computability, Logic, AI AlgorithmsComputer Science44 references5 citations
TL;DR

This paper proposes a Type-2 computable semantics for probabilistic programs with continuous distributions using computable distributions and topological domains. It demonstrates how to implement sampling and distributional semantics in a Haskell-like language, showing that conditioning is not generally computable, and connects the framework to realizability and constructive mathematics.

ABSTRACT

In this chapter, we explore how (Type-2) computable distributions can be used to give both (algorithmic) sampling and distributional semantics to probabilistic programs with continuous distributions. Towards this end, we sketch an encoding of computable distributions in a fragment of Haskell and show how topological domains can be used to model the resulting PCF-like language. We also examine the implications that a (Type-2) computable semantics has for implementing conditioning. We hope to draw out the connection between an approach based on (Type-2) computability and ordinary programming throughout the chapter as well as highlight the relation with constructive mathematics (via realizability).

Motivation & Objective

  • To address the tension between continuous distributions in probabilistic modeling and the discrete nature of computation.
  • To develop a semantics for probabilistic programs that supports both algorithmic sampling and distributional reasoning using computable distributions.
  • To model the semantics of a core PCF-like language extended with reals and continuous distributions using topological domains.
  • To investigate the computability of conditioning in probabilistic programs and show it is not generally Type-2 computable.
  • To connect the framework to constructive mathematics via realizability and demonstrate its relevance to practical programming in a functional language.

Proposed method

  • Uses Type-2 computability to represent reals and continuous distributions as converging sequences of discrete approximations.
  • Encodes computable distributions in a fragment of Haskell without relying on black-box primitives for reals or distributions.
  • Employs topological domains as a mathematical foundation to model the semantics of the language, supporting domain-theoretic constructions.
  • Introduces a core language λ_CD with a probability monad to support sampling and distributional semantics over countably based spaces.
  • Establishes a computable isomorphism between samplable and computable distributions using functions like sampToComp and compToSamp.
  • Uses effective Lebesgue integration via integrateBndDom and integrateBnd to compute expectations over computable distributions.

Experimental results

Research questions

  • RQ1How can (Type-2) computable distributions be used to give both sampling and distributional semantics to probabilistic programs with continuous distributions?
  • RQ2What mathematical structures, such as topological domains, can faithfully model the semantics of a functional language with continuous distributions?
  • RQ3To what extent is conditioning computable in a Type-2 computable framework, and what are the limitations?
  • RQ4How does the framework connect to constructive mathematics and realizability in the context of probabilistic programming?
  • RQ5Can a Turing-complete probabilistic programming language be fully abstract and universal in the sense of expressing all Type-2 computable distributions?

Key findings

  • Conditioning is not (Type-2) computable in general, meaning that not all conditional queries on probabilistic models can be computed algorithmically.
  • The language λ_CD supports both algorithmic sampling and distributional semantics, enabling equational reasoning over probabilistic programs.
  • A computable isomorphism exists between samplable and computable distributions under the assumption of full-measure distributions.
  • Topological domains provide a suitable mathematical foundation for modeling computable reals and continuous distributions in a denotational semantics.
  • The framework avoids the Borel paradox by not allowing equality on reals to return true for non-equal values—equality diverges if not provably unequal.
  • Effective Lebesgue integration is implemented via functions like integrateBndDom and integrateBnd, enabling computation of expectations on computable distributions.

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.