Inference in probabilistic programs generally requires evaluating many possible program executions to find those of high posterior density. To scale inference to large datasets, it is crucial that expensive intermediate results are shared across these many evaluations, rather than recomputed from scratch. This paper presents a new approach to realizing this sharing, based on \textit{incremental computation}, a technique for efficiently recomputing (deterministic) program outputs when program inputs change. First, we show how expressive probabilistic programs can be compiled to deterministic ones that compute their density functions. Then, building on the incremental $λ$-calculus, we develop a general technique for compositionally incrementalizing expressive functional programs, and apply it to these densities. The resulting incremental densities can be used to accelerate a broad range of Monte Carlo inference algorithms, including for nonparametric models not well supported by existing systems. Furthermore, our decomposition of incremental density computation into separate density and incrementalization steps allows for modular reasoning about correctness -- a key pain point in existing systems, where ad-hoc incrementalization features are a known source of soundness bugs. We develop denotational logical relations arguments for the correctness of each step independently, and implement the approach in a Julia prototype, finding that it leads to asymptotic runtime improvements in the size of the dataset on a range of models and inference algorithms.


翻译:概率程序的推理通常需要评估大量可能的程序执行路径,以寻找后验密度较高的执行路径。为了将推理扩展到大规模数据集,关键在于这些多次评估中应当共享昂贵的中间结果,而非从头重新计算。本文提出了一种实现这种共享的新方法,其基础是增量计算技术——一种在程序输入变化时高效地重新计算(确定性)程序输出的技术。首先,我们展示了如何将表达能力强的概率程序编译为可计算其密度函数的确定性程序。随后,基于增量λ演算,我们发展了一种通用技术,用于组合式地增量计算表达能力强的函数式程序,并将其应用于这些密度函数。由此产生的增量密度函数可用于加速广泛的蒙特卡洛推理算法,包括现有系统支持不佳的非参数模型。此外,我们将增量密度计算分解为独立的密度计算和增量计算步骤,这使得我们可以对正确性进行模块化推理——这是现有系统中的一个关键痛点,其中特设的增量计算特性是已知的可靠性错误来源。我们分别为每个步骤开发了基于指称逻辑关系的正确性论证,并在Julia原型中实现了该方法。实验发现,在一系列模型和推理算法上,该方法在数据集大小上带来了渐近运行时的改进。

0
下载
关闭预览

相关内容

本话题关于日常用语「概率」,用于讨论生活中的运气、机会,及赌博、彩票、游戏中的「技巧」。关于抽象数学概念「概率」的讨论,请转 概率(数学)话题。
大模型数学推理数据合成相关方法
专知会员服务
36+阅读 · 2025年1月19日
【NeurIPS2023】强化学习中的概率推理:正确的方法
专知会员服务
28+阅读 · 2023年11月25日
【MIT博士论文】非参数因果推理的算法方法,424页pdf
专知会员服务
84+阅读 · 2022年9月20日
「因果推理」概述论文,13页pdf
专知
16+阅读 · 2021年3月20日
因果推理学习算法资源大列表
专知
27+阅读 · 2019年3月3日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
26+阅读 · 2011年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
国家自然科学基金
26+阅读 · 2011年12月31日
Top
微信扫码咨询专知VIP会员