Abstract
Approximate model counting (#SAT) is a fundamental problem in computer science with applications in verification, reliability, and cryptography. While approximate counters like ApproxMC provide $(\varepsilon, \delta)$-guarantees, their scalability is often limited by the high number of iterations required to achieve high-confidence results (low $\delta$). This paper introduces ApproxMC6, which utilizes a novel "rounding" technique to stabilize individual estimation rounds. By making each iteration more reliable, ApproxMC6 drastically reduces the total number of repetitions needed, achieving a 4.68x average speedup and solving significantly more instances than previous state-of-the-art tools.
1. Introduction
Model counting, or #SAT, is the task of determining the number of satisfying assignments for a given Boolean formula. As a #P-complete problem, exact counting is computationally intractable for large, real-world formulas. Consequently, researchers rely on approximate model counters that offer $(\varepsilon, \delta)$-guarantees: they promise that the returned count is within a factor of $(1+\varepsilon)$ of the true answer with a confidence level of at least $1-\delta$.
The current state-of-the-art approach, exemplified by the ApproxMC family of counters, uses 2-universal hash functions to partition the solution space into "cells." The algorithm counts solutions in a single cell and scales that count up. To ensure the $(\varepsilon, \delta)$ guarantee, this process is repeated $t$ times, and the median is returned. However, as users demand higher confidence, the number of repetitions $t$ grows significantly, causing runtimes to skyrocket and limiting the utility of these tools in safety-critical domains.
2. Methodology: The Rounding Innovation
The primary contribution of this work is the introduction of a technique called rounding within the ApproxMC6 algorithm.
2.1 The Standard Approach
In traditional hashing-based counters, the number of repetitions $t$ is determined by the probability that a single estimation run fails. Previous theoretical analyses of these failure probabilities were relatively loose, leading to a high "error budget" per iteration and necessitating many repetitions to achieve high global confidence.
2.2 Stabilizing Estimates via Rounding
The authors observed that instead of simply scaling the raw count from a cell, the estimate can be rounded to a specific value pre-computed based on the tolerance $\varepsilon$. While rounding usually implies a loss of precision, in this context, it acts as a stabilizer. By pushing the estimate toward a value more likely to fall within the "correct" $(1+\varepsilon)$ range, the authors significantly reduce the probability that an individual run will be an outlier.
Because individual runs are more reliable, the "median technique" requires far fewer repetitions to reach the target confidence $\delta$. For example, at $\varepsilon=0.8$ and $\delta=0.001$, the original ApproxMC required 117 repetitions, whereas ApproxMC6 requires only 19.
2.3 Theoretical Tightness
The paper provides a rigorous combinatorial analysis using Cantelli’s inequality and Stirling’s approximation to prove that these rounded estimates still satisfy strict PAC $(\varepsilon, \delta)$ guarantees. A key insight was that it is sufficient to optimize the maximum of the under-estimation and over-estimation probabilities, rather than their sum, to tighten the overall error bound.
3. Experimental Evaluation
The authors evaluated ApproxMC6 using a comprehensive benchmark suite of 1,890 instances derived from Model Counting Competitions (2020–2022), program synthesis, network reliability, and cryptography. The suite also included 772 instances for projected model counting, where only a subset of variables is considered.
4. Key Results
- Significant Speedup: ApproxMC6 achieved an average 4.68x speedup over ApproxMC4 on instances solved by both tools.
- Better Coverage: Within a 5,000-second timeout, ApproxMC6 solved 1,202 instances, while ApproxMC4 solved 998—an increase of 204 additional solved problems.
- Confidence Scaling: The performance gap widens as the required confidence increases. When $\delta$ was decreased from 0.1 to 0.0001, the speedup grew from 2.70x to 5.59x.
- High Accuracy: Despite the theoretical tolerance of 0.8, the observed error in practice was only 0.1, demonstrating the robustness of the rounding approach.
5. Limitations and Future Work
The authors identified a few outliers where counts fell outside theoretical bounds, which were traced to a bug in the third-party preprocessor Arjun rather than the ApproxMC6 algorithm itself. Future work will explore dynamically calculating optimal rounding values for arbitrary $\varepsilon$ and investigating how rounding interacts with improved XOR-reasoning in SAT solvers.
6. Conclusion
ApproxMC6 represents a major advancement in approximate model counting. By integrating rounding to stabilize iterative estimates, the algorithm provides a high-confidence solution that scales to significantly more complex formulas than previous methods, paving the way for more robust verification and reliability analysis.
Paper Citation: Yang, J., Meel, K.S. Rounding meets approximate model counting. Formal Methods in System Design (2025). https://doi.org/10.1007/s10703-025-00481-6
Summary updated