Symmetric Component Caching for Model Counting on Combinatorial Instances

Timothy van Bremen, Vincent Derkinderen, Shubham Sharma, Subhajit Roy, Kuldeep S. Meel

Introduction

Model counting, or #SAT, is the task of determining the number of satisfying assignments for a given Boolean formula. While standard SAT solving is NP-complete, model counting is #P-complete, making it significantly more computationally demanding. Modern solvers rely heavily on component caching, where independent sub-problems (components) encountered during search are stored and reused. However, traditional caching is limited to exact literal matches, failing to recognize structurally identical sub-problems that differ only in variable naming—a common occurrence in combinatorial domains like N-Queens or Sudoku.

Symmetric Component Caching in SYMGANAK

To address this limitation, researchers have developed SYMGANAK, a model counter that implements Symmetric Component Caching. The core innovation lies in identifying symmetries between sub-formulas through graph isomorphism, allowing the solver to recognize a "familiar face" even when variables are permuted.

Methodology

The SYMGANAK workflow consists of several key stages:

  1. Graph Representation: Logical components are transformed into colored graphs where nodes represent clauses and literals.
  2. Canonical Labeling: Utilizing the NAUTY library, the solver computes a canonical label for each component's graph. Two components are symmetric if and only if they produce the same canonical label.
  3. Probabilistic Caching (PSCC): To maintain efficiency, canonical labels are hashed into a compact representation, allowing for high cache hit rates with negligible error risk.
  4. Hybrid Thresholding: Because symmetry detection introduces CPU overhead, SYMGANAK employs a hybrid approach, applying symmetry detection only to components of medium size (typically 10 to 250 variables).

Experimental Results

The performance of SYMGANAK was evaluated against the state-of-the-art solver GANAK using 212 hard combinatorial instances, including grid Bayesian networks, graph k-coloring, and Latin square completion.

Overall Performance

SYMGANAK demonstrated a clear advantage in solving capacity. Within a 5000-second timeout, it solved 16 more instances than GANAK, achieving a significant reduction in penalized average runtime (PAR-2).

Figure 4: Comparison of instances solved over time between SYMGANAK and GANAK.

Cache Efficiency and Quality

A critical insight from the experiments is that SYMGANAK does not just increase the quantity of cache hits, but also their quality. By recognizing structural identity, the solver can reuse results for significantly larger sub-problems. On average, SYMGANAK’s cache hits involved components with 79.7 variables, compared to 58.2 for GANAK. This allows the solver to bypass much larger branches of the search tree.

Figure 5: Distribution of cache hits by component size, comparing symmetric caching (Symm) to standard caching (No-Symm).

Discussion and Conclusion

The results confirm that symmetry is often "local" and emerges dynamically during the search process. While the overhead of graph canonization remains a factor, the ability to bypass large portions of the search tree through symmetric hits provides a substantial performance boost. Future work will focus on refining variable selection heuristics (such as ICSVSADS) to better preserve symmetry and extending these techniques to Weighted Model Counting (WMC) for broader applications in probabilistic inference.

Summary updated

BibTeX
@inproceedings{bremen2021symmetric,
  author = {Timothy van Bremen and Vincent Derkinderen and Shubham Sharma and Subhajit Roy and Kuldeep S. Meel},
  title = {{Symmetric Component Caching for Model Counting on Combinatorial Instances}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i5.16511},
}
Figure