In traditional logic, a formula is either satisfiable or it isn't. In probabilistic reasoning, we ask a more nuanced question: how likely is the formula to be true? For decades, these two worlds—symbolic logic and probabilistic graphical models—were treated as separate domains with distinct algorithms.
However, a powerful realization has unified them: probabilistic inference can be framed as Weighted Model Counting (WMC). By transforming probability problems into logical formulas where each satisfying assignment (model) has an associated weight, researchers can leverage the massive efficiency gains of modern SAT solvers to solve complex probabilistic tasks.
From Counting to Probability
To understand WMC, start with standard model counting (#SAT). In #SAT, the goal is to count the number of truth assignments that satisfy a Boolean formula. WMC generalizes this by assigning a numerical weight to each literal. The weight of a complete assignment is the product of the weights of its literals, and the "count" is the sum of weights across all satisfying assignments.
As Tian Sang, Paul Beame, and Henry A. Kautz demonstrated in Performing Bayesian Inference by Weighted Model Counting, a Bayesian network can be translated into a weighted formula such that the WMC of that formula corresponds exactly to the probability of an observation. This reduction allows us to treat "probability" not as a measure over a massive state-space graph, but as a sum over the solutions of a logical constraint problem.
Why Logic Solvers Excel at Probability
Traditional probabilistic methods, like join-tree algorithms, often struggle with "deterministic" relationships—rules that are always true or always false. These rules create "holes" in the probability space that traditional solvers must navigate laboriously.
In contrast, SAT-based WMC solvers thrive on these constraints. Tools like Cachet use logical reasoning techniques such as clause learning (remembering why a certain path failed) and component caching (recognizing when a sub-problem has been solved before) to prune the search space. This makes WMC particularly effective for highly structured domains like plan recognition or medical diagnosis, where logical dependencies are dense.
This efficiency extends beyond simple Bayesian networks. Daan Fierens, Luc De Raedt, and Guy Van den Broeck showed in Inference in Probabilistic Logic Programs using Weighted CNF's that even complex probabilistic logic programs can be reduced to weighted Conjunctive Normal Form (CNF), allowing general-purpose Boolean solvers to outperform specialized logic programming tools.
Lifting to the First-Order Level
Real-world problems often involve many identical objects (e.g., thousands of people in a social network). Grounding these into individual Boolean variables leads to an exponential explosion. Weighted First-Order Model Counting (WFOMC) solves this by performing "lifted" inference.
Instead of counting assignments to individual variables, WFOMC counts the number of ways to satisfy a first-order formula. Guy Van den Broeck and colleagues in Lifted Probabilistic Inference by First-Order Knowledge Compilation introduced techniques to compile these theories into circuits (like First-Order d-DNNFs) that exploit symmetries. If a rule applies to "any person," the solver can calculate the result once and use combinatorics to scale it to any population size, achieving polynomial time complexity where traditional methods would be exponential.
A Unifying Computational Substrate
The power of WMC lies in its role as a "common language" for AI. As noted by Giuseppe Marra and Luc De Raedt in From Statistical Relational to Neural Symbolic Artificial Intelligence, WMC serves as the underlying engine that bridges:
- Statistical Relational AI: Handling complex relationships and uncertainty.
- Neurosymbolic AI: Integrating neural network outputs as weights within a logical framework.
- Formal Verification: Tools like Rubicon use WMC to check reachability in Markov chains, treating path probabilities as logical counts (Steven Holtzen et al., Model Checking Finite-Horizon Markov Chains with Probabilistic Inference).
By reducing diverse problems—from Markov Logic Networks to neural network verification—into the shared format of weighted counting, the field has created a standardized pipeline for reasoning. Improvements in SAT solving or circuit compilation immediately translate into faster, more robust probabilistic AI across all these domains.