Weighted model counting with conditional weights for Bayesian networks

Paulius Dilkas, Vaishak BelleUAI 2021

Abstract

Weighted Model Counting (WMC) is a foundational framework for probabilistic inference, typically constrained by "literal-based" weight assignments. This paper introduces conditional weights (cw), a novel encoding that bypasses the succinctness limitations of traditional factored representations. By integrating this encoding with the ADDMC solver, the authors demonstrate significant performance gains—often exceeding two orders of magnitude—across a diverse set of Bayesian network benchmarks.

Introduction

Weighted Model Counting (WMC) generalizes the #SAT problem by assigning weights to models of a propositional formula and computing their sum. While powerful, most existing WMC solvers are restricted to "literal-based" weights, where the weight of a model is the product of weights assigned to individual literals. This restriction often necessitates complex encodings with numerous auxiliary variables and clauses to represent non-factored probability distributions, leading to "encoding bloat" that hampers solver efficiency.

Methodology

The authors propose a measure-theoretic approach to WMC, introducing conditional weights (cw). This method allows for a more direct representation of Conditional Probability Tables (CPTs) in Bayesian networks.

Conditional Weight Encoding

Unlike traditional encodings (e.g., c05, sbk05) that require auxiliary variables to force distributions into a factored format, the cw encoding represents weights as functions on Boolean algebras. This approach is mathematically more succinct; for a network with $n$ variables and maximum in-degree $d$, cw requires $O(nv)$ variables, significantly fewer than the $O(nv^{d+1})$ typically required by traditional methods.

Solver Integration

The state-of-the-art ADDMC solver, which utilizes Algebraic Decision Diagrams (ADDs), was adapted to support this new format. Because ADDs naturally manipulate functions, they are well-suited for conditional weights. The adaptation involved updating the solver's primal graph construction and variable-ordering heuristics to account for multi-variable weight functions.

Experimental Evaluation

The proposed ADDMC + cw approach was evaluated against 1,466 benchmark instances, including DQMR networks, grid networks, and classic Bayesian networks like alarm and pigs.

Performance and Dominance

The results indicate that ADDMC + cw is highly effective. It was the fastest solver-encoding combination for 770 out of 1,466 instances, more than triple the success rate of the next best competitor.

Cumulative distribution of instances solved over time across various algorithm and encoding combinations.

Comparative Analysis

Head-to-head comparisons reveal that cw often improves performance by one to two orders of magnitude. For instance, DQMR instances that were previously challenging for ADD-based solvers were solved in under a second using the new encoding.

Scatter plots comparing the execution time of ADDMC + cw against Ace + cd06 (left) and ADDMC + sbk05 (right). Points below the diagonal indicate instances where ADDMC + cw is faster.

Discussion and Conclusion

The primary advantage of conditional weights lies in reducing the complexity of the "primal graph," which enhances the effectiveness of variable-ordering heuristics. While ADDMC + cw dominates many benchmarks, search-based solvers like Ace + cd06 still perform better on certain logic-heavy problems like Mastermind.

Future work will explore extending conditional weights to probabilistic programs and adapting search-based solvers to handle non-factored weight formats. This research highlights the importance of moving beyond syntactic constraints in WMC to achieve more efficient probabilistic inference.

Summary updated

BibTeX
@inproceedings{dilkas2021weighted,
  author = {Paulius Dilkas and Vaishak Belle},
  title = {{Weighted model counting with conditional weights for Bayesian networks}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2021},
}
Figure