Abstract
Given a formula F, the problem of model counting, also known as #SAT, is to compute the number of satisfying assignments of F. While model counting has emerged as a crucial primitive in diverse domains from quantitative information flow analysis to neural network verification, scalability remains a fundamental challenge despite advances in both exact and approximate counting techniques.
Introduction
The problem of model counting, or #SAT, asks: "Given a Boolean formula, exactly how many ways can we assign true/false to its variables to make the whole thing true?" While a standard SAT solver just needs to find a single solution, a model counter must explore the entire solution space, making it a #P-complete problem. This foundational tool is essential for verifying neural network robustness, analyzing network reliability, and performing probabilistic inference. However, as real-world formulas grow in complexity, existing counters often encounter memory exhaustion or timeouts.
Ganak2 is a new probabilistic exact model counter that significantly pushes the scalability frontier of #SAT solving. By decoupling decision variables from SAT-eligibility and adapting chronological backtracking for counting, it solves nearly 9% more industry-standard benchmarks than the previous state-of-the-art, often with a much smaller memory footprint.
Methodology
Ganak2 introduces three major technical innovations to the existing Ganak framework, focusing on efficient search and structural complexity reduction.
Dual Independent Set Framework
The core conceptual shift in Ganak2 is the decoupling of variables used for branching from those used to define the solution space. Traditionally, solvers use a single set of variables for both. Ganak2 splits these into:
- S-set (SAT-eligibility): A minimized set that allows the solver to transition to faster SAT-solving modes as early as possible.
- D-set (Decision): An expanded set that gives the solver more flexibility in choosing branching variables, which helps keep the "treewidth" (structural complexity) of sub-problems low.
By allowing the D-set to be larger than the S-set, Ganak2 explores the search space more efficiently without delaying the handoff to the SAT solver.
Chronological Backtracking (ChronoBT)
In standard counters, conflict-driven clause learning often involves "jumping" back many levels, which can discard valuable counting information. Ganak2 adapts ChronoBT to model counting, allowing it to backtrack more surgically. This prevents the solver from re-learning the same facts or re-counting the same sub-problems repeatedly.
Adapting ChronoBT to weighted model counting is particularly challenging, as it risks double-counting variable weights. The authors address this with a "weight fixing" algorithm that tracks which components have already contributed to the total count.
Enhanced Residual Formula Processing
Ganak2 integrates modern SAT-solving heuristics—such as VSIDS scoring, Luby-based restarts, and polarity caching—directly into the phase where the counter hands off sub-problems to a SAT solver.
Experimental Evaluation
The authors evaluated Ganak2 using 1,600 instances from the 2023 and 2024 Model Counting Competitions, covering weighted, unweighted, projected, and unprojected counting tracks.
Key Results
- Superior Scaling: Ganak2 solved 1,121 instances within a one-hour limit, outperforming the previous state-of-the-art (d4) by 8.7% (1,032 instances).
- Baseline Improvement: Compared to the original Ganak, Ganak2 solved over 40% more instances.
- Resource Efficiency: Ganak2 maintained a 25-50% lower memory footprint than its closest competitors.
- Search Dynamics: Ablation studies showed the full configuration processed roughly 30% fewer components and encountered 73% fewer conflicts than the baseline, proving the effectiveness of the new heuristics in guiding the search.
Discussion and Future Work
Despite its performance, Ganak2 utilizes probabilistic component caching. While the error probability is user-controllable and can be made infinitesimally small (e.g., $\delta = 0.001$), it is not a "certified" exact counter in the strictest sense.
Future work will focus on addressing the challenges of weighted variable elimination, which currently requires complex functional synthesis. Additionally, the authors aim to optimize the "semantic analysis" used to expand the D-set, as it can be computationally expensive.
Summary updated