Model Counting: A New Strategy for Obtaining Good Bounds Carla P. Gomes, Ashish Sabharwal, Bart Selman Cornell University AAAI Conference, 2006 Boston,

Slides:



Advertisements
Similar presentations
The Average Case Complexity of Counting Distinct Elements David Woodruff IBM Almaden.
Advertisements

Sampling and Soundness: Can We Have Both? Carla Gomes, Bart Selman, Ashish Sabharwal Cornell University Jörg Hoffmann DERI Innsbruck …and I am: Frank van.
Propositional Satisfiability (SAT) Toby Walsh Cork Constraint Computation Centre University College Cork Ireland 4c.ucc.ie/~tw/sat/
P-Optimal CSP Solvers Applied to Software Security P-Optimal CSP Solvers Applied to Software Security Ahmed Abdel Mohsen and Karl Lieberherr College of.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Counting the bits Analysis of Algorithms Will it run on a larger problem? When will it fail?
MIT and James Orlin © Game Theory 2-person 0-sum (or constant sum) game theory 2-person game theory (e.g., prisoner’s dilemma)
Lecture 22: April 18 Probabilistic Method. Why Randomness? Probabilistic method: Proving the existence of an object satisfying certain properties without.
1 Backdoor Sets in SAT Instances Ryan Williams Carnegie Mellon University Joint work in IJCAI03 with: Carla Gomes and Bart Selman Cornell University.
IBM Labs in Haifa © 2005 IBM Corporation Adaptive Application of SAT Solving Techniques Ohad Shacham and Karen Yorav Presented by Sharon Barner.
Generating Hard Satisfiability Problems1 Bart Selman, David Mitchell, Hector J. Levesque Presented by Xiaoxin Yin.
Mathematics in Today's World
Phase Transitions of PP-Complete Satisfiability Problems D. Bailey, V. Dalmau, Ph.G. Kolaitis Computer Science Department UC Santa Cruz.
Computational problems, algorithms, runtime, hardness
Beating Brute Force Search for Formula SAT and QBF SAT Rahul Santhanam University of Edinburgh.
CS151 Complexity Theory Lecture 7 April 20, 2004.
Leveraging Belief Propagation, Backtrack Search, and Statistics for Model Counting Lukas Kroc, Ashish Sabharwal, Bart Selman Cornell University May 23,
CP Formal Models of Heavy-Tailed Behavior in Combinatorial Search Hubie Chen, Carla P. Gomes, and Bart Selman
Prof. Bart Selman Module Probability --- Part d)
Computational Methods for Management and Economics Carla Gomes
1 Towards Efficient Sampling: Exploiting Random Walk Strategy Wei Wei, Jordan Erenrich, and Bart Selman.
Combinatorial Problems II: Counting and Sampling Solutions Ashish Sabharwal Cornell University March 4, nd Asian-Pacific School on Statistical Physics.
Phase Transitions of PP-Complete Satisfiability Problems D. Bailey, V. Dalmau, Ph.G. Kolaitis Computer Science Department UC Santa Cruz.
1 Sampling, Counting, and Probabilistic Inference Wei joint work with Bart Selman.
AAAI00 Austin, Texas Generating Satisfiable Problem Instances Dimitris Achlioptas Microsoft Carla P. Gomes Cornell University Henry Kautz University of.
Short XORs for Model Counting: From Theory to Practice Carla P. Gomes, Joerg Hoffmann, Ashish Sabharwal, Bart Selman Cornell University & Univ. of Innsbruck.
1 Backdoors To Typical Case Complexity Ryan Williams Carnegie Mellon University Joint work with: Carla Gomes and Bart Selman Cornell University.
1 Discrete Structures CS 280 Example application of probability: MAX 3-SAT.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Instance Hardness and Phase Transitions.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Maximum Entropy Model LING 572 Fei Xia 02/07-02/09/06.
. Approximate Inference Slides by Nir Friedman. When can we hope to approximate? Two situations: u Highly stochastic distributions “Far” evidence is discarded.
Lukas Kroc, Ashish Sabharwal, Bart Selman Cornell University, USA SAT 2010 Conference Edinburgh, July 2010 An Empirical Study of Optimal Noise and Runtime.
1 Message Passing and Local Heuristics as Decimation Strategies for Satisfiability Lukas Kroc, Ashish Sabharwal, Bart Selman (presented by Sebastian Brand)
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 5: February 2, 2009 Architecture Synthesis (Provisioning, Allocation)
Sampling Combinatorial Space Using Biased Random Walks Jordan Erenrich, Wei Wei and Bart Selman Dept. of Computer Science Cornell University.
Solution Counting Methods for Combinatorial Problems Ashish Sabharwal [ Cornell University] Based on joint work with: Carla Gomes, Willem-Jan van Hoeve,
Relaxed DPLL Search for MaxSAT (short paper) Lukas Kroc, Ashish Sabharwal, Bart Selman Cornell University SAT-09 Conference Swansea, U.K. July 3, 2009.
ETM 607 – Random Number and Random Variates
Distributions of Randomized Backtrack Search Key Properties: I Erratic behavior of mean II Distributions have “heavy tails”.
OPTIMIZATION WITH PARITY CONSTRAINTS: FROM BINARY CODES TO DISCRETE INTEGRATION Stefano Ermon*, Carla P. Gomes*, Ashish Sabharwal +, and Bart Selman* *Cornell.
Ragesh Jaiswal Indian Institute of Technology Delhi Threshold Direct Product Theorems: a survey.
1 MCMC Style Sampling / Counting for SAT Can we extend SAT/CSP techniques to solve harder counting/sampling problems? Such an extension would lead us to.
Performing Bayesian Inference by Weighted Model Counting Tian Sang, Paul Beame, and Henry Kautz Department of Computer Science & Engineering University.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Trust-Aware Optimal Crowdsourcing With Budget Constraint Xiangyang Liu 1, He He 2, and John S. Baras 1 1 Institute for Systems Research and Department.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems by Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz Presented by Yunho.
TAMING THE CURSE OF DIMENSIONALITY: DISCRETE INTEGRATION BY HASHING AND OPTIMIZATION Stefano Ermon*, Carla P. Gomes*, Ashish Sabharwal +, and Bart Selman*
1 Markov Decision Processes Infinite Horizon Problems Alan Fern * * Based in part on slides by Craig Boutilier and Daniel Weld.
U NIFORM S OLUTION S AMPLING U SING A C ONSTRAINT S OLVER A S AN O RACLE Stefano Ermon Cornell University August 16, 2012 Joint work with Carla P. Gomes.
Section 10.1 Confidence Intervals
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
1 Markov Decision Processes Infinite Horizon Problems Alan Fern * * Based in part on slides by Craig Boutilier and Daniel Weld.
CPSC 422, Lecture 11Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 11 Oct, 2, 2015.
Quality of LP-based Approximations for Highly Combinatorial Problems Lucian Leahu and Carla Gomes Computer Science Department Cornell University.
SAT 2009 Ashish Sabharwal Backdoors in the Context of Learning (short paper) Bistra Dilkina, Carla P. Gomes, Ashish Sabharwal Cornell University SAT-09.
Quantum Computing MAS 725 Hartmut Klauck NTU
Balance and Filtering in Structured Satisfiability Problems Henry Kautz University of Washington joint work with Yongshao Ruan (UW), Dimitris Achlioptas.
Probabilistic and Logical Inference Methods for Model Counting and Sampling Bart Selman with Lukas Kroc, Ashish Sabharwal, and Carla P. Gomes Cornell University.
AAAI of 20 Deconstructing Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.
Quicksort This is probably the most popular sorting algorithm. It was invented by the English Scientist C.A.R. Hoare It is popular because it works well.
Tommy Messelis * Stefaan Haspeslagh Burak Bilgin Patrick De Causmaecker Greet Vanden Berghe *
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
1 P NP P^#P PSPACE NP-complete: SAT, propositional reasoning, scheduling, graph coloring, puzzles, … PSPACE-complete: QBF, planning, chess (bounded), …
Inference and search for the propositional satisfiability problem
Emergence of Intelligent Machines: Challenges and Opportunities
Chapter 6. Large Scale Optimization
Presentation transcript:

Model Counting: A New Strategy for Obtaining Good Bounds Carla P. Gomes, Ashish Sabharwal, Bart Selman Cornell University AAAI Conference, 2006 Boston, MA

July 20, 2006AAAI What is Model/Solution Counting?  F : a Boolean formula e.g. F = ( a or b ) and (not ( a and ( b or c ))) Boolean variables: a, b, c  Total 2 3 possible 0-1 truth assignments F has exactly 3 satisfying assignments ( a, b, c ) : (1,0,0), (0,1,0), (0,1,1)  #SAT: How many satisfying assignments does F have? Generalizes SAT: Is F satisfiable at all? With n variables, can have anywhere from 0 to 2 n satisfying assignments

July 20, 2006AAAI Why Model Counting?  Success of SAT solvers has had a tremendous impact E.g. verification, planning, model checking, scheduling, … Can easily model a variety of problems of interest as a Boolean formula, and use an off-the-shelf SAT solver Rapidly growing technology: scales to 1,000,000+ variables and 5,000,000+ constraints  Efficient model counting techniques will extend this to a whole new range of applications Probabilistic reasoning Multi-agent / adversarial reasoning (bounded) [Roth ‘96, Littman et. al. ‘01, Sang et. al. ‘04, Darwiche ‘05, Domingos ‘06]

July 20, 2006AAAI The Challenge of Model Counting  In theory Model counting or #SAT is #P-complete (believed to be much harder than NP-complete problems)  Practical issues Often finding even a single solution is quite difficult! Typically have huge search spaces  E.g  truth assignments for a 1000 variable formula Solutions often sprinkled unevenly throughout this space  E.g. with solutions, the chance of hitting a solution at random is

July 20, 2006AAAI How Might One Count? Problem characteristics:  Space naturally divided into rows, columns, sections, …  Many seats empty  Uneven distribution of people (e.g. more near door, aisles, front, etc.) How many people are present in the hall?

July 20, 2006AAAI How Might One Count? Previous approaches: 1.Brute force 2.Branch-and-bound 3.Estimation by sampling This work: A clever randomized strategy using random XOR/parity constraints : occupied seats (47) : empty seats (49)

July 20, 2006AAAI #1: Brute-Force Counting Idea: Go through every seat If occupied, increment counter Advantage: Simplicity Drawback: Scalability

July 20, 2006AAAI #2: Branch-and-Bound (DPLL-style) Idea: Split space into sections e.g. front/back, left/right/ctr, … Use smart detection of full/empty sections Add up all partial counts Advantage: Relatively faster Drawback: Still “accounts for” every single person present: need extremely fine granularity Scalability Framework used in DPLL-based systematic exact counters e.g. Relsat [Bayardo-et-al ‘00], Cachet [Sang et. al. ‘04]

July 20, 2006AAAI #3: Estimation By Sampling -- Naïve Idea: Randomly select a region Count within this region Scale up appropriately Advantage: Quite fast Drawback: Robustness: can easily under- or over-estimate Scalability in sparse spaces: e.g solutions out of means need region much larger than to “hit” any solutions

July 20, 2006AAAI #3: Estimation By Sampling -- Smarter Idea: Randomly sample k occupied seats Compute fraction in front & back Recursively count only front Scale with appropriate multiplier Advantage: Quite fast Drawback: Relies on uniform sampling of occupied seats -- not any easier than counting itself! Robustness: often under- or over-estimates; no guarantees Framework used in approximate counters like ApproxCount [Wei-Selman ‘05]

July 20, 2006AAAI A Coin-Flipping Strategy (Intuition) Idea: Everyone starts with a hand up Everyone tosses a coin If heads, keep hand up, if tails, bring hand down Repeat till only one hand is up Return 2 #(rounds) Does this work?  On average, Yes!  With M people present, need roughly log 2 M rounds for a unique hand to survive Let’s Try Something Different …

July 20, 2006AAAI From Counting People to #SAT Given a formula F over n variables, Auditorium : search space for F Seats : 2 n truth assignments Occupied seats : satisfying assignments Bring hand down : add additional constraint eliminating that satisfying assignment

July 20, 2006AAAI Making the Intuitive Idea Concrete  How can we make each solution “flip” a coin? Recall: solutions are implicitly “hidden” in the formula Don’t know anything about the solution space structure  What if we don’t hit a unique solution?  How do we transform the average behavior into a robust method with provable correctness guarantees? Somewhat surprisingly, all these issues can be resolved!

July 20, 2006AAAI XOR Constraints to the Rescue  Which XOR constraint X to use? Choose at random! Two crucial properties: For every truth assignment A, Pr [ A satisfies X ] = 0.5 For every two truth assignments A and B, “ A satisfies X ” and “ B satisfies X ” are independent Gives average behavior, some guarantees Gives stronger guarantees  Use XOR/parity constraints E.g. a  b  c  d = 1 (satisfied if an odd number of variables set to True) Translates into a small set of CNF clauses Used earlier in randomized reductions in Theo. CS [Valiant-Vazirani ‘86]

July 20, 2006AAAI Obtaining Correctness Guarantees  For formula F with M models/solutions, should ideally add log 2 M XOR constraints  Instead, suppose we add s = log 2 M + 2 constraints Fix a solution A. Pr [ A survives s XOR constraints ] = 1/2 s = 1/(4 M )  Exp [ number of surviving solutions ] = M / (4 M ) = 1/4  Pr [some solution survives ]  1/4 (by Markov’s Ineq) Pr [ F is satisfiable after s XOR constraints ]  1/4 Thm: If F is still satisfiable after s random XOR constraints, then F has  2 s -2 solutions with prob.  3/4 slack factor

July 20, 2006AAAI Boosting Correctness Guarantees Simply repeat the whole process! Say, we iterate 4 times independently with s constraints. Pr [ F is satisfiable in every iteration ]  1/4 4 < Thm: If F is satisfiable after s random XOR constraints in each of 4 iterations, then F has at least 2 s -2 solutions with prob.  MBound Algorithm (simplified; by concrete usage example) : Add k random XOR constrains and check for satisfiability using an off-the-shelf SAT solver. Repeat 4 times. If satisfiable in all 4 cases, report 2 k -2 as a lower bound on the model count with 99.6% confidence.

July 20, 2006AAAI Key Features of MBound  Can use any state-of-the-art SAT solver off the shelf  Random XOR constraints independent of both the problem domain and the SAT solver used  Adding XORs further constrains the problem Can model count formulas that couldn’t even be solved! An effective way of “streamlining” [Gomes-Sellmann ‘04]  XOR streamlining  Very high provable correctness guarantees on reported bounds on the model count May be boosted simply by repetition

July 20, 2006AAAI Making it Work in Practice  Purely random XOR constraints are generally large Not ideal for current SAT solvers  In practice, we use relatively short XORs Issue: Higher variation Good news: lower bound correctness guarantees still hold Better news: can get surprisingly good results in practice with extremely short XORs!

July 20, 2006AAAI Experimental Results Problem Instance Mbound (99% confidence) Relsat (exact counter) ApproxCount (approx. counter) ModelsTimeModelsTimeModelsTime Ramsey 1  1.2 x hrs  7.1 x hrs  1.8 x hrs Ramsey 2  1.8 x hrs  1.9 x hrs  7.7 x hrs Schur 1  2.8 x hrs hrs  2.3 x hrs Schur 2 **  6.7 x hrs hrs hrs ClqColor 1  2.1 x min  2.8 x hrs hrs ClqColor 2  2.2 x min  2.3 x hrs hrs ** Instance cannot be solved by any state-of-the-art SAT solver

July 20, 2006AAAI Summary and Future Directions  Introduced XOR streamlining for model counting can use any state-of-the-art SAT solver off the shelf provides significantly better counts on challenging instances, including some that can’t even be solved Hybrid strategy: use exact counter after adding XORs Upper bounds (extended theory using large XORs)  Future Work Uniform solution sampling from combinatorial spaces Insights into solution space structure From counting to probabilistic reasoning

Extra Slides

July 20, 2006AAAI How Good are the Bounds?  In theory, with enough computational resources, can provably get as close to the exact counts as desired.  In practice, limited to relatively short XORs. However, can still get quite close to the exact counts! Instance Number of vars Exact count MBound xor size lowerbound. bitmax x  9.2 x log_a x  1.1 x php x  1.3 x php x  1.1 x 10 15