Introduction
Model counting—determining the number of satisfying assignments for a Boolean formula—is a fundamental #P-complete problem. To address real-world complexity, researchers utilize approximate counters like ApproxMC, which provide "Probably Approximately Correct" (PAC) guarantees. However, a significant "trust gap" remains due to complex underlying probability theory, highly optimized (and potentially buggy) codebases like CryptoMiniSat, and the inherent difficulty of verifying randomized algorithms.
Methodology: Verification Modulo Randomness
The authors propose a hybrid framework that bridges this trust gap by assuming a trusted source of random bits and verifying all subsequent computations. This approach, termed verification modulo randomness, consists of two primary pillars:
- Static Verification: The abstract
ApproxMCalgorithm and its PAC guarantees are formalized in the Isabelle/HOL proof assistant, ensuring the mathematical soundness of the approach. - Dynamic Verification: Since full implementation verification is impractical, the system uses per-run certificates. An untrusted generator,
ApproxMCCert, produces a log of critical steps which is then validated byCertCheck, a formally verified checker extracted from the Isabelle/HOL proof.
Native XOR Support
A key innovation is the development of a verified proof-checking pipeline (FRAT-xor and cake_xlrup) that handles XOR constraints natively. By avoiding the expansion of XORs into millions of clausal constraints, the framework significantly reduces proof size and verification overhead.
Key Insights and Results
The evaluation on 1,896 real-world problem instances yielded several critical insights:
- Scaling through Selective Verification: The authors found that only a small subset of solver calls (specifically "UNSAT" calls) need verification to guarantee the final count. The number of these critical calls is independent of the number of variables in the formula.
- Bug Discovery: The formalization process identified a subtle XOR-handling bug in
CryptoMiniSatand a sampling bias inApproxMC, demonstrating the value of formal methods in improving existing tools. - Efficiency: Native XOR support led to an average 30x reduction in proof size (up to 8,251x in extreme cases). The
CertChecktool successfully certified 84.7% of instances within standard time and memory limits (5000s, 16GB), with negligible overhead for certificate generation.
Conclusion and Future Work
This framework represents the first end-to-end certification for randomized approximate model counting. While current limitations include a lack of support for certain preprocessing optimizations and sequential certificate checking, the approach provides a robust path toward trustworthy results. Future work aims to parallelize the checker and extend the methodology to Satisfiability Modulo Theories (SMT).
Summary updated