Skip to main content
QUICK REVIEW

[Paper Review] Constrained Counting and Sampling: Bridging the Gap between Theory and Practice

Kuldeep S. Meel|arXiv (Cornell University)|Jun 6, 2018
Data Management and AlgorithmsComputer Science93 references13 citations
TL;DR

This paper presents a novel hashing-based framework that bridges theoretical guarantees and practical performance in constrained counting and sampling by integrating universal hashing with modern SAT/SMT solvers. The proposed tools, ApproxMC2 and UniGen, scale to formulas with up to a million variables—representing a significant leap from prior tools—and achieve the first FPRAS for DNF without Monte Carlo steps, while MIS reduces XOR constraint size by two orders of magnitude via variance-aware hashing.

ABSTRACT

Constrained counting and sampling are two fundamental problems in Computer Science with numerous applications, including network reliability, privacy, probabilistic reasoning, and constrained-random verification. In constrained counting, the task is to compute the total weight, subject to a given weighting function, of the set of solutions of the given constraints. In constrained sampling, the task is to sample randomly, subject to a given weighting function, from the set of solutions to a set of given constraints. Consequently, constrained counting and sampling have been subject to intense theoretical and empirical investigations over the years. Prior work, however, offered either heuristic techniques with poor guarantees of accuracy or approaches with proven guarantees but poor performance in practice. In this thesis, we introduce a novel hashing-based algorithmic framework for constrained sampling and counting that combines the classical algorithmic technique of universal hashing with the dramatic progress made in combinatorial reasoning tools, in particular, SAT and SMT, over the past two decades. The resulting frameworks for counting (ApproxMC2) and sampling (UniGen) can handle formulas with up to million variables representing a significant boost up from the prior state of the art tools' capability to handle few hundreds of variables. If the initial set of constraints is expressed as Disjunctive Normal Form (DNF), ApproxMC is the only known Fully Polynomial Randomized Approximation Scheme (FPRAS) that does not involve Monte Carlo steps. By exploiting the connection between definability of formulas and variance of the distribution of solutions in a cell defined by 3-universal hash functions, we introduced an algorithmic technique, MIS, that reduced the size of XOR constraints employed in the underlying universal hash functions by as much as two orders of magnitude.

Motivation & Objective

  • To address the long-standing gap between theoretically sound but impractical constrained counting and sampling algorithms and heuristic methods with weak guarantees.
  • To enable scalable, accurate, and efficient counting and sampling for large-scale real-world problems such as probabilistic inference and infrastructure reliability.
  • To develop a framework that combines the precision of theoretical algorithms with the performance of modern SAT/SMT solvers.
  • To reduce the size of XOR constraints in universal hashing via a novel variance-aware technique (MIS), improving efficiency without sacrificing accuracy.
  • To demonstrate the utility of the framework on real-world applications including power grid reliability and AI verification.

Proposed method

  • Leverages universal hashing to transform constrained counting and sampling into a sequence of SAT/SMT queries, enabling theoretical guarantees through randomized approximation.
  • Introduces ApproxMC2, a scalable approximate model counter that uses 3-universal hashing and iterative SAT queries to estimate solution counts with high confidence.
  • Develops UniGen, a uniform sampling framework that uses the same hashing structure to generate solutions with near-uniform distribution.
  • Proposes the MIS (Minimal Independent Support) technique to minimize the number of XOR constraints in the hashing process by exploiting solution distribution variance.
  • Employs a recursive reduction strategy that dynamically identifies and removes redundant variables, reducing the size of the constraint system.
  • Uses a hybrid approach combining SAT solving with randomized hashing to achieve FPRAS for DNF formulas without Monte Carlo sampling steps.

Experimental results

Research questions

  • RQ1Can a hashing-based framework achieve both theoretical guarantees and practical scalability in constrained counting and sampling?
  • RQ2How can the size of XOR constraints in universal hashing be minimized without compromising accuracy or uniformity?
  • RQ3To what extent can SAT/SMT solvers be leveraged to scale constrained counting and sampling to formulas with millions of variables?
  • RQ4Can the framework provide an FPRAS for DNF formulas without relying on Monte Carlo methods?
  • RQ5How effective is the MIS technique in reducing the computational cost of hashing-based counting and sampling?

Key findings

  • ApproxMC2 achieves the first FPRAS for DNF formulas without Monte Carlo steps, providing theoretical accuracy guarantees while scaling to formulas with up to a million variables.
  • The MIS technique reduces the number of XOR constraints in the hashing process by up to two orders of magnitude, significantly improving performance.
  • UniGen and ApproxMC2 scale to formulas with up to 78,650 variables (e.g., blockmap 20 01.net), a dramatic improvement over prior tools limited to a few hundred variables.
  • The framework demonstrates high parallelizability, enabling efficient use of high-performance computing resources for AI and verification workloads.
  • In real-world applications such as power grid reliability and probabilistic inference, the tools provide accurate, scalable, and efficient solutions where previous methods failed.
  • For benchmarks like s5378a 15 7, ApproxMC2 computes a solution count in under 2,000 seconds, while prior tools could not complete within 18,000 seconds.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.