[Paper Review] A Scalable Approximate Model Counter
This paper presents ApproxMC, the first scalable approximate model counter for CNF formulas that provides $(\varepsilon,\delta)$-guarantees with high confidence and small tolerance. It uses a polynomial number of SAT solver calls to estimate model counts within a factor of $(1+\varepsilon)$ of the true count, achieving practical accuracy far below theoretical bounds on benchmarks with tens of thousands of variables.
Propositional model counting} (#SAT), i.e., counting the number of satisfying assignments of a propositional formula, is a problem of significant theoretical and practical interest. Due to the inherent complexity of the problem, approximate model counting, which counts the number of satisfying assignments to within given tolerance and confidence level, was proposed as a practical alternative to exact model counting. Yet, approximate model counting has been studied essentially only theoretically. The only reported implementation of approximate model counting, due to Karp and Luby, worked only for DNF formulas. A few existing tools for CNF formulas are bounding model counters; they can handle realistic problem sizes, but fall short of providing counts within given tolerance and confidence, and, thus, are not approximate model counters. We present here a novel algorithm, as well as a reference implementation, that is the first scalable approximate model counter for CNF formulas. The algorithm works by issuing a polynomial number of calls to a SAT solver. Our tool, ApproxMC, scales to formulas with tens of thousands of variables. Careful experimental comparisons show that ApproxMC reports, with high confidence, bounds that are close to the exact count, and also succeeds in reporting bounds with small tolerance and high confidence in cases that are too large for computing exact model counts.
Motivation & Objective
- To address the scalability limitations of exact model counters for propositional model counting ($\#\mathsf{SAT}$) in practical applications.
- To bridge the gap between theoretical approximate counting and practical implementation by designing a scalable algorithm for CNF formulas.
- To provide $(\varepsilon,\delta)$-style guarantees—tolerance and confidence—on approximate counts, which existing tools fail to deliver.
- To outperform existing bounding counters in approximation quality while maintaining scalability on large, real-world formulas.
Proposed method
- The algorithm uses a novel approach based on hashing and random walks to estimate the number of satisfying assignments via repeated SAT queries.
- It integrates a hybrid method combining multiple bounding techniques (e.g., MiniCount, SampleCount, MBound) to improve both upper and lower bounds.
- The method employs a conservative strategy for bound estimation to ensure high-confidence intervals, as validated in prior work [13].
- It leverages a polynomial number of SAT solver calls to achieve $(\varepsilon,\delta)$-approximation with theoretical guarantees.
- The implementation uses a hybrid variant of the MBound technique to refine bounds iteratively and reduce interval size.
- All experiments were conducted with a 20-hour timeout per tool to ensure fair comparison across exact, approximate, and bounding counters.
Experimental results
Research questions
- RQ1Can an approximate model counter for CNF formulas be designed that scales to tens of thousands of variables while maintaining $(\varepsilon,\delta)$-guarantees?
- RQ2How does the approximation quality of ApproxMC compare to exact counters and existing bounding counters in practice?
- RQ3Can the algorithm maintain small interval sizes (i.e., tight bounds) with high confidence on large and complex formulas?
- RQ4Does ApproxMC outperform state-of-the-art bounding counters in terms of interval tightness and accuracy?
Key findings
- ApproxMC successfully computed $(\varepsilon,\delta)$-guaranteed bounds on 95 benchmarks where Cachet reported exact counts, with all estimates lying within the specified tolerance of the true count.
- The $L_1$ norm of the relative error across all 95 benchmarks was 0.033, indicating an average error of only 3.3%, far below the theoretical $\varepsilon = 0.75$ guarantee.
- ApproxMC's interval sizes were consistently smaller than those from bounding counters like MiniCount, SampleCount, and MBound, demonstrating superior approximation quality.
- While Cachet timed out on larger problems, ApproxMC continued to return bounds with high confidence and small tolerance, demonstrating scalability beyond exact counters.
- ApproxMC improved upper bounds from MiniCount significantly and enhanced lower bounds from SampleCount and MBound, even with conservative estimation strategies.
- The tool scaled to formulas with tens of thousands of variables, successfully handling instances too large for exact counting.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.