This book is a graduate-level introduction to probabilistic programming. It not only provides a thorough background for anyone wishing to use a probabilistic programming system, but also introduces the techniques needed to design and build these systems. It is aimed at people who have an undergraduate-level understanding of either or, ideally, both probabilistic machine learning and programming languages. We start with a discussion of model-based reasoning and explain why conditioning is a foundational computation central to the fields of probabilistic machine learning and artificial intelligence. We then introduce a first-order probabilistic programming language (PPL) whose programs correspond to graphical models with a known, finite, set of random variables. In the context of this PPL we introduce fundamental inference algorithms and describe how they can be implemented. We then turn to higher-order probabilistic programming languages. Programs in such languages can define models with dynamic computation graphs, which may not instantiate the same set of random variables in each execution. Inference requires methods that generate samples by repeatedly evaluating the program. Foundational algorithms for this kind of language are discussed in the context of an interface between program executions and an inference controller. Finally we consider the intersection of probabilistic and differentiable programming. We begin with a discussion of automatic differentiation, and how it can be used to implement efficient inference methods based on Hamiltonian Monte Carlo. We then discuss gradient-based maximum likelihood estimation in programs that are parameterized using neural networks, how to amortize inference using by learning neural approximations to the program posterior, and how language features impact the design of deep probabilistic programming systems.
翻译:这本书是对概率性编程的研究生级介绍。 它不仅为任何希望使用概率性编程系统的任何人提供一个完整的背景, 而且还为设计和建立这些系统提供了必要的技术。 它针对的是本科一级了解机能学习和编程语言的人。 我们首先讨论基于模型的推理, 并解释为什么调节是概率性机器学习和人工智能领域的基础计算核心。 然后我们引入了第一个级的概率性编程语言( PPL), 其程序与已知、 有限、 一组随机变量的图形模型相对应。 在这个 PPL 的背景下, 我们引入基本的精确度算法, 并描述这些算法是如何执行的。 然后我们转而转而使用更高级的概率性机能性编程语言。 这种语言的程序可以用动态的计算图来定义模型, 这也许不会在每次执行过程中即时即发生相同的随机变量。 我们的推论要求通过反复评估程序生成样本的方法。 用于这种语言的基础性缩略图的缩略语法, 在深度性编程中, 我们使用一个更精确性编程的编程中, 如何在使用我们使用一个不同的编程中, 使用一个不同的编程中, 来考虑一个不同的编程方法。