概率规划的可验证随机变分推理
Towards Verified Stochastic Variational Inference for Probabilistic Programs
摘要:
概率编程是使用程序符号从统计和机器学习中编写模型,并使用通用推理引擎对这些模型进行推理的思想。最近,它与深度学习的结合得到了深入的探索,导致了深度概率程序设计语言(如Pyro)的发展。在这个发展的核心在于推理机的基础上随机变分推理算法。当被要求找到用这种语言编写的模型的后验分布信息时,这些算法将后验推理查询转换为优化问题,并通过梯度上升近似求解。在本文中,我们分析了一个最基本的和通用的变分推理算法,称为得分估计,使用工具从指称语义和程序分析。我们正式表示该算法的程序表示的模型,并揭示了隐式的算法所作的假设。违反这些假设可能导致未定义的优化目标或优化过程的收敛保证的损失。然后,我们描述的规则来证明这些假设,这可以自动化的静态程序分析。我们的一些规则使用连续数学中的重要事实,让我们用涉及微分或有界性的条件来代替假设中关于积分的要求,这些条件更容易自动证明。按照我们的一般方法,我们已经为Pyro开发了一个静态程序分析,旨在消除我们称之为模型指导支持匹配的假设。应用于Pyro网页上的八个代表性模型-指南对,我们的分析在其中一个案例中发现了一个错误,在另一个案例中揭示了推理引擎的非标准使用,并显示在其余案例中满足了假设。
英文摘要:
Probabilistic programming is the idea of writing models from statistics and machine learning using program notations and reasoning about these models using generic inference engines. Recently its combination with deep learning has been explored intensely, leading to the development of deep probabilistic programming languages such as Pyro. At the core of this development lie inference engines based on stochastic variational inference algorithms. When asked to find information about the posterior distribution of a model written in such a language, these algorithms convert this posterior-inference query into an optimisation problem and solve it approximately by gradient ascent. In this paper, we analyse one of the most fundamental and versatile variational inference algorithms, called score estimator, using tools from denotational semantics and program analysis. We formally express what this algorithm does on models denoted by programs, and expose implicit assumptions made by the algorithm. The violation of these assumptions may lead to an undefined optimisation objective or the loss of convergence guarantee of the optimisation process. We then describe rules for proving these assumptions, which can be automated by static program analyses. Some of our rules use nontrivial facts from continuous mathematics, and let us replace requirements about integrals in the assumptions, by conditions involving differentiation or boundedness, which are much easier to prove automatically. Following our general methodology, we have developed a static program analysis for Pyro that aims at discharging the assumption about what we call model-guide support match. Applied to the eight representative model-guide pairs from the Pyro webpage, our analysis finds a bug in one of these cases, reveals a non-standard use of an inference engine in another, and shows the assumptions are met in the remaining cases.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。