🤖 AI Summary
Discrete probabilistic program (DPP) inference faces PSPACE-hard complexity due to its high expressiveness. This work proposes a novel approach based on graph-structural analysis, leveraging string diagram algebraization and tree decomposition techniques to achieve the first fixed-parameter tractable inference for DPPs under bounded treewidth and exponentially small rejection probabilities. By assuming structural simplicity, the method reduces inference complexity to polynomial time, substantially overcoming the performance limitations of existing algorithms. The framework is further shown to generalize to practical applications such as relational database query evaluation and attack tree–based risk assessment, demonstrating its broad applicability beyond theoretical settings.
📝 Abstract
Discrete probabilistic programs (DPPs) provide a highly expressive formalism for compactly defining arbitrary finite probabilistic models. This expressivity comes at a price: DPP inference is PSPACE-hard. In this work, we show that DPP inference only takes polynomial time for programs that are 'structurally simple'. More precisely, inference can be performed in polynomial time when the primal graph of each function appearing in the probabilistic program has bounded treewidth, and the inverse acceptance probability is at most exponential in the size of the probabilistic program. Existing algorithms do not achieve this performance guarantee. Our method relies on finding suitable decompositions, algebraisations, of the string diagrams underlying DPPs, employing existing algorithms for tree decompositions. This is independent of the probabilistic setting of DPPs and has direct applications to many problems, such as evaluating queries on relational databases and cybersecurity risk assessment via attack trees.