Fixed-Parameter Tractable Inference for Discrete Probabilistic Programs, via String Diagram Algebraisation
Benedikt Peterseim, Milan Lopuhaä-Zwakenberg
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
Lineage
Builds on2
Related papers
- On the Structural Hardness of Answer Set Programming: Can Structure Efficiently Confine the Power of Disjunctions?Markus Hecher, Rafael KieselAAAI 2024
- Variance Computation for Weighted Model Counting with Knowledge Compilation ApproachKengo Nakamura, Masaaki Nishino, Norihito YasudaAAAI 2026
- On the Expressive Power of Tree-Structured Probabilistic CircuitsLang Yin, Han ZhaoNeurIPS 2024 · 4 citations
- Belief Propagation with Local Structure and Its Applications in Program AnalysisYiqian Wu, Yifan Chen, Yingfei Xiong, Xin ZhangASE 2025 · 1 citation
- Exact Bayesian Inference for Loopy Probabilistic Programs using Generating FunctionsLutz Klinkenberg, Christian Blumenthal, Mingshuai Chen, Darion Haase et al.OOPSLA 2024 · 11 citations
