论文标题
通过打字有条件独立性
Conditional independence by typing
论文作者
论文摘要
概率编程语言(PPLS)的核心目标是将建模与推理分开。但是,在实践中很难实现这一目标。用户通常被迫重写其模型,以提高推理效率或达到PPL施加的限制。参数之间的条件独立性(CI)关系是概率模型的关键方面,这些模型捕获了指定模型的定性摘要,并且可以促进更有效的推断。我们提出了一个用于概率编程的信息流类型系统,该系统捕获条件独立性(CI)关系,并表明,对于我们系统中良好的程序,它实施的分布将具有某些CI关系。此外,通过使用类型推理,我们可以静态地推断指定模型中存在哪些CI-Properties。作为一种实际应用,我们考虑了如何对具有混合离散和连续参数的模型进行推断的问题。在许多现有的PPL中,对此类模型的推断都是有挑战性的,但是可以通过解决方案来改进,在这种方法中,由于手动模型重写为代价,在这种方法中,分散参数被隐式使用。我们提出了一个源代源语义传播的转换,该转换使用我们的CI-Type系统通过消除概率程序中的离散参数来自动化此解决方法。结果程序可以看作是原始程序上的混合推理算法,在该程序中可以使用有效的基于梯度的推理方法绘制连续参数,而使用变量消除来推断离散参数。我们在Slicstan中实施了CI-Type系统及其示例应用程序:Stan的组成变体。
A central goal of probabilistic programming languages (PPLs) is to separate modelling from inference. However, this goal is hard to achieve in practice. Users are often forced to re-write their models in order to improve efficiency of inference or meet restrictions imposed by the PPL. Conditional independence (CI) relationships among parameters are a crucial aspect of probabilistic models that capture a qualitative summary of the specified model and can facilitate more efficient inference. We present an information flow type system for probabilistic programming that captures conditional independence (CI) relationships, and show that, for a well-typed program in our system, the distribution it implements is guaranteed to have certain CI-relationships. Further, by using type inference, we can statically deduce which CI-properties are present in a specified model. As a practical application, we consider the problem of how to perform inference on models with mixed discrete and continuous parameters. Inference on such models is challenging in many existing PPLs, but can be improved through a workaround, where the discrete parameters are used implicitly, at the expense of manual model re-writing. We present a source-to-source semantics-preserving transformation, which uses our CI-type system to automate this workaround by eliminating the discrete parameters from a probabilistic program. The resulting program can be seen as a hybrid inference algorithm on the original program, where continuous parameters can be drawn using efficient gradient-based inference methods, while the discrete parameters are inferred using variable elimination. We implement our CI-type system and its example application in SlicStan: a compositional variant of Stan.