arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2112.00364cs.PL
收藏

编译具备高效并行序贯蒙特卡洛推理的通用概率编程语言

Compiling Universal Probabilistic Programming Languages with Efficient Parallel Sequential Monte Carlo Inference

Daniel Lundén, Joey Öhman, Jan Kudlicka, Viktor Senderov, Fredrik Ronquist, David Broman

AI总结:

针对现有概率编程语言难以充分利用并行性、无法高效编译至GPU的问题,研究提出PPL控制流图方法,构建底层并行SMC推理的RootPPL,实现通用高层PPL到GPU的编译,实测最高6倍提速。

摘要:

概率编程语言(PPL)允许用户对任意推理问题进行编码,且PPL的实现可为这些问题提供通用的自动推理能力。但对许多现实问题而言,构建足够高效的推理实现颇具挑战,这通常是因为PPL未能充分利用可用的并行化与优化机会。例如,许多主流PPL通过续体传递风格变换或非抢占式多任务处理来处理PPL中的概率检查点,这种方式往往无法编译为GPU等高性能平台所需的底层语言。为解决检查点问题,我们提出了PPL控制流图(PCFG)的概念——这是一种在底层语言中实现检查点的简洁高效方法。我们基于该方法实现了RootPPL:这是一款构建于CUDA和带OpenMP的C++之上的底层PPL,可提供高效的大规模并行SMC(序贯蒙特卡洛)推理。我们还提出了一种将通用高层PPL编译为PCFG的通用方法,并展示了将高层通用PPL——Miking CorePPL编译为RootPPL时的应用场景。该方法是首个将通用PPL编译到GPU并实现SMC推理的方案。我们通过系统发育学和流行病学领域的一组现实实验对RootPPL及CorePPL编译器进行了评估,结果表明,其速度相较于实现了SMC推理的最先进PPL最高可达6倍。

英文摘要:

Probabilistic programming languages (PPLs) allow users to encode arbitrary inference problems, and PPL implementations provide general-purpose automatic inference for these problems. However, constructing inference implementations that are efficient enough is challenging for many real-world problems. Often, this is due to PPLs not fully exploiting available parallelization and optimization opportunities. For example, handling probabilistic checkpoints in PPLs through continuation-passing style transformations or non-preemptive multitasking -- as is done in many popular PPLs -- often disallows compilation to low-level languages required for high-performance platforms such as GPUs. To solve the checkpoint problem, we introduce the concept of PPL control-flow graphs (PCFGs) -- a simple and efficient approach to checkpoints in low-level languages. We use this approach to implement RootPPL: a low-level PPL built on CUDA and C++ with OpenMP, providing highly efficient and massively parallel SMC inference. We also introduce a general method of compiling universal high-level PPLs to PCFGs and illustrate its application when compiling Miking CorePPL -- a high-level universal PPL -- to RootPPL. The approach is the first to compile a universal PPL to GPUs with SMC inference. We evaluate RootPPL and the CorePPL compiler through a set of real-world experiments in the domains of phylogenetics and epidemiology, demonstrating up to 6x speedups over state-of-the-art PPLs implementing SMC inference.

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

↑