arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.05348cs.PLcs.LOstat.CO
收藏

概率程序中高效可编程推理的增量计算

Incremental Computation for Efficient Programmable Inference in Probabilistic Programs

Massachusetts Institute of Technology(麻省理工学院);Yale University(耶鲁大学)

Fabian Zaiser, Jack Czenszak, Martin C. Rinard, Vikash K. Mansinghka, Alexander K. Lew

AI总结:

提出基于增量计算的方法,将概率程序编译为确定性密度函数,并通过增量λ演算实现函数式程序的增量计算,以加速蒙特卡洛推理,支持非参数模型,并保证正确性。

摘要:

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

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑