Exact Probabilistic Inference via Binary Decision Diagrams

16 concepts11 papers2 proposals

In probabilistic logic and programming, we often want to know the probability that a specific query is true. However, a single query can often be proven in multiple ways. If these proofs were independent, we could simply sum their probabilities. But in reality, proofs often overlap—they share the same underlying random facts. This creates the disjoint-sum problem: how do we calculate the probability of a logical union without exponentially overcounting the intersections?

Research across probabilistic logic programming and knowledge compilation has converged on a powerful solution: representing these complex logical relationships as Binary Decision Diagrams (BDDs). By compiling logical proofs into this specific graphical structure, researchers have transformed a #P-complete computational nightmare into a linear-time graph traversal.

The Challenge of Overlapping Proofs

Imagine a large biological network where links between proteins are probabilistic. As De Raedt et al. (2007) describe in the development of ProbLog, determining if two nodes are connected involves finding all possible paths between them. Each path is a "proof" of connection.

The naive way to find the total probability is the inclusion-exclusion principle, but this scales exponentially with the number of paths. As Kimmig et al. (2010) explain, the core difficulty is that these paths are not mutually exclusive. If two paths share an edge, the state where that edge exists contributes to the success of both proofs. To get the correct answer, we must solve the disjoint-sum problem—calculating the probability of a Disjunctive Normal Form (DNF) formula where the terms are not disjoint.

BDDs as a Solution for Disjointness

A Binary Decision Diagram (BDD) is a directed acyclic graph that represents a Boolean function. The magic of BDDs in this context is that they naturally decompose a complex formula into a set of mutually exclusive paths.

When we compile logical explanations into a BDD, every path from the root to a "True" leaf represents a unique, disjoint set of conditions under which the query holds. As Riguzzi et al. (2015) and Zese (2015) demonstrate, once this compilation is complete, calculating the exact probability becomes a simple, linear-time traversal of the graph. You start at the leaves and work upward, weighting each branch by the probability of the corresponding random variable.

This approach allows systems like BUNDLE and TRILL to perform exact reasoning over uncertain ontologies and description logics, turning what would be an exhaustive search of "possible worlds" into an efficient structural calculation.

Scaling to General Probabilistic Programs

While early work focused on logic programming, the BDD approach has proven remarkably versatile for general-purpose probabilistic programming. Holtzen et al. (2020) introduced Dice, a language that scales exact inference to programs with hundreds of thousands of variables. Dice treats the entire program as a large Boolean circuit and uses BDDs to perform Weighted Model Counting (WMC). By exploiting the program's logical structure and conditional independence, the BDD can stay compact even when the state space is massive.

This scaling extends even to arithmetic. Cao et al. (2023) showed that by encoding integers as bit-vectors, BDDs can handle complex probabilistic arithmetic and comparisons. The BDD identifies and merges redundant computational paths in the arithmetic logic, allowing for exact inference on distributions that were previously only reachable via approximate sampling.

A Unified Framework for Reasoning

The utility of BDDs goes beyond simple probability. In Kimmig et al. (2011), the authors proposed aProbLog, which generalizes the BDD approach to any commutative semiring.

By swapping the underlying math, the same BDD structure used for probability can be used to:

  • Find the shortest path in a graph.
  • Perform sensitivity analysis on a model.
  • Compute gradients for machine learning.

This highlights the true power of the research direction: BDDs serve as a "compiled" version of the problem's logic. Once you have the BDD, you have a reusable, compact map of all possible outcomes, allowing you to answer many different types of questions about an uncertain system with high efficiency. Whether modeling biological networks (De Raedt et al. 2008) or dynamic game environments (Thon et al. 2011), the BDD remains the central engine for turning logical complexity into probabilistic clarity.

Key Foundational Work

ProbLog: A Probabilistic Prolog and Its Application in Link Discovery (2007) — contributed 2 concept elements to this direction.
Compressing probabilistic Prolog programs (2008) — contributed 1 concept elements to this direction.
History & citationVersion 2 · 2026-10-04

Current · Permanent link

  1. Version 2 (latest) · 2026-10-04 · 11 papers
  2. Version 1 · 2026-10-04 · 16 papers
Cite this direction

Latest version (a living page):

@misc{lacuna_disjoint_sum_problem_resolution_65af36bd,
  title = {disjoint-sum problem resolution},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/disjoint-sum-problem-resolution/rdr_65af36bdbe3d4f6683e3b02906839c77},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-27},
}

This exact version (version 2, frozen text):

@misc{lacuna_disjoint_sum_problem_resolution_65af36bd_v2,
  title = {disjoint-sum problem resolution},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/disjoint-sum-problem-resolution/rdr_65af36bdbe3d4f6683e3b02906839c77/v/2},
  note = {Version 2, frozen 2026-10-04. Accessed 2026-11-27},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake