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:
- Graph Representation: Logical components are transformed into colored graphs where nodes represent clauses and literals.
- Canonical Labeling: Utilizing the
NAUTYlibrary, 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. - Probabilistic Caching (PSCC): To maintain efficiency, canonical labels are hashed into a compact representation, allowing for high cache hit rates with negligible error risk.
- 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).
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.
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