The Power of Literal Equivalence in Model Counting

Yong Lai, Kuldeep S. Meel, Roland H. C. Yap

Introduction

Model Counting (#SAT) is the computationally intensive task of determining the exact number of satisfying assignments for a Boolean formula. While Boolean Satisfiability (SAT) is NP-complete, #SAT belongs to the even more challenging #P-complete complexity class. Its applications are vast, spanning probabilistic reasoning, network reliability, and formal verification.

Current state-of-the-art counters generally utilize either search-based techniques (exploring a decision tree) or compilation-based methods (transforming formulas into tractable circuits). However, existing representations like Decision-DNNF often fail to efficiently capture literal equivalences—scenarios where variables are logically constrained to be equal or opposite (e.g., $x \leftrightarrow y$). Standard solvers frequently perform redundant work by branching on these variables independently.

Methodology: CCDD and ExactMC

To address this inefficiency, researchers introduced ExactMC, a model counter built upon a new representation language: CCDD (Constrained Conjunction & Decision Diagram).

The CCDD Language

CCDD generalizes Decision-DNNF by incorporating kernelized conjunction nodes. These nodes explicitly store literal equivalences, allowing the representation to remain compact even when complex variable relationships exist. Crucially, the authors demonstrated that model counting on CCDD remains linear in the size of the graph.

The ExactMC Algorithm

ExactMC operates as a search-based counter with an integrated "in-processing" step. During search, the algorithm employs a heuristic called SHOULDKERNELIZE to identify when to pause and extract literal equivalences. This process, known as kernelization, effectively reduces the problem's dimensionality by merging equivalent variables. To further optimize search, ExactMC uses the DLCP (Dynamic Combined Largest Product) variable ordering heuristic, designed to prioritize branches that are likely to reveal additional equivalences.

Experimental Evaluation

The authors evaluated ExactMC against six leading model counters—Ganak, D4, c2d, Dsharp, miniC2D, and ADDMC—using a comprehensive suite of 1,114 benchmarks. These instances cover diverse domains including Bayesian networks, program synthesis, and hardware model checking.

Performance comparison of ExactMC against state-of-the-art model counters.

Key Results

ExactMC demonstrated a significant leap in performance, solving 885 instances—42 more than the previous state-of-the-art, Ganak. The tool showed particular strength in domains like Program Synthesis and Planning, where literal equivalences are prevalent.

Number of instances solved by various counters across different benchmark domains.

The impact of kernelization was evident in specific benchmarks. For instance, in the sygus_09A-1 benchmark, ExactMC performed over 21,000 kernelizations, enabling it to solve problems that were previously intractable for other tools. This confirms that literal equivalences are abundant in real-world problems and that exploiting them is key to performance.

Conclusion and Future Directions

The success of ExactMC highlights the power of improving the underlying language of a solver's execution trace. By making the trace more expressive through CCDD, the search process becomes inherently more efficient.

Future work may involve refining the SHOULDKERNELIZE heuristic using machine learning to better predict when kernelization will be most beneficial. Additionally, exploring new caching schemes that recognize equivalent CCDD sub-structures could further enhance performance. The introduction of CCDD paves the way for discovering even more expressive, tractable languages for complex counting problems.

Summary updated

BibTeX
@inproceedings{lai2021power,
  author = {Yong Lai and Kuldeep S. Meel and Roland H. C. Yap},
  title = {{The Power of Literal Equivalence in Model Counting}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i5.16503},
}
Figure