We propose a new method to approximate the posterior distribution of probabilistic programs by means of computing guaranteed bounds. The starting point of our work is an interval-based trace semantics for a recursive, higher-order probabilistic programming language with continuous distributions. Taking the form of (super-/subadditive) measures, these lower/upper bounds are non-stochastic and provably correct: using the semantics, we prove that the actual posterior of a given program is sandwiched between the lower and upper bounds (soundness); moreover the bounds converge to the posterior (completeness). As a practical and sound approximation, we introduce a weight-aware interval type system, which automatically infers interval bounds on not just the return value but also weight of program executions, simultaneously. We have built a tool implementation, called GuBPI, which automatically computes these posterior lower/upper bounds. Our evaluation on examples from the literature shows that the bounds are useful, and can even be used to recognise wrong outputs from stochastic posterior inference procedures.
翻译:我们提出一种新的方法,通过计算有保证的界限来估计概率程序后期分布。我们工作的出发点是用于连续分布的循环性、更高阶级概率性编程语言的基于间隔的痕量语义。采取(超级/次追加)措施的形式,这些较低/上限是非随机的,而且可以理解的正确性:使用语义,我们证明一个特定程序的实际后继器是在下界和上界(声音);此外,与后界(完整)汇合的界限。作为一个实用和健全的近似,我们采用了一个重觉间距间隔类型系统,它自动推断出不仅仅是返回值,而且是程序执行权重的间隔。我们建立了一种工具实施,称为 GuBPI,它自动对后端/上界进行编译。我们对文献中的例子的评估表明,约束是有用的,甚至可以用来识别从随机远端图像程序中得出的错误输出。