The posterior in probabilistic programs with stochastic support decomposes as a weighted sum of the local posterior distributions associated with each possible program path. We show that making predictions with this full posterior implicitly performs a Bayesian model averaging (BMA) over paths. This is potentially problematic, as model misspecification can cause the BMA weights to prematurely collapse onto a single path, leading to sub-optimal predictions in turn. To remedy this issue, we propose alternative mechanisms for path weighting: one based on stacking and one based on ideas from PAC-Bayes. We show how both can be implemented as a cheap post-processing step on top of existing inference engines. In our experiments, we find them to be more robust and lead to better predictions compared to the default BMA weights.
翻译:具有随机支持的概率程序的后验分布可分解为与每条可能程序路径相关的局部后验分布的加权和。我们证明,使用该全后验进行预测会隐式地执行路径上的贝叶斯模型平均(BMA)。这存在潜在问题——模型误设定可能导致BMA权重过早坍缩至单一路径,进而产生次优预测。为解决该问题,我们提出两种替代路径加权机制:基于堆叠的方法和基于PAC-贝叶斯思想的方法。我们证明这两种方法均可作为现有推理引擎的低成本后处理步骤实现。实验表明,与默认BMA权重相比,所提方法具有更强的鲁棒性,并能获得更优的预测性能。