Lune

LICS2026Top-tier venue

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Builds on2

  1. Scaling exact inference for discrete probabilistic programsSteven Holtzen, Guy Van den Broeck, Todd D. MillsteinOOPSLA 2020 · 85 citations
  2. A Single-Exponential Time 2-Approximation Algorithm for TreewidthTuukka KorhonenFOCS 2021 · 49 citations

Related papers

  1. On the Structural Hardness of Answer Set Programming: Can Structure Efficiently Confine the Power of Disjunctions?Markus Hecher, Rafael KieselAAAI 2024
  2. Variance Computation for Weighted Model Counting with Knowledge Compilation ApproachKengo Nakamura, Masaaki Nishino, Norihito YasudaAAAI 2026
  3. On the Expressive Power of Tree-Structured Probabilistic CircuitsLang Yin, Han ZhaoNeurIPS 2024 · 4 citations
  4. Belief Propagation with Local Structure and Its Applications in Program AnalysisYiqian Wu, Yifan Chen, Yingfei Xiong, Xin ZhangASE 2025 · 1 citation
  5. Exact Bayesian Inference for Loopy Probabilistic Programs using Generating FunctionsLutz Klinkenberg, Christian Blumenthal, Mingshuai Chen, Darion Haase et al.OOPSLA 2024 · 11 citations
Dusk over the sea between two cliffs drawn in fine vertical lines