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.

Slides:



Advertisements
Similar presentations
Computing the Density of States of Boolean Formulas Stefano Ermon, Carla Gomes, and Bart Selman Cornell University, September 2010.
Advertisements

CHAPTER 8 A NNEALING- T YPE A LGORITHMS Organization of chapter in ISSO –Introduction to simulated annealing –Simulated annealing algorithm Basic algorithm.
Ch 11. Sampling Models Pattern Recognition and Machine Learning, C. M. Bishop, Summarized by I.-H. Lee Biointelligence Laboratory, Seoul National.
1 The Monte Carlo method. 2 (0,0) (1,1) (-1,-1) (-1,1) (1,-1) 1 Z= 1 If  X 2 +Y 2  1 0 o/w (X,Y) is a point chosen uniformly at random in a 2  2 square.
Survey Propagation Algorithm
Markov Chains 1.
Bayesian statistics – MCMC techniques
BAYESIAN INFERENCE Sampling techniques
CS774. Markov Random Field : Theory and Application Lecture 16 Kyomin Jung KAIST Nov
. PGM: Tirgul 8 Markov Chains. Stochastic Sampling  In previous class, we examined methods that use independent samples to estimate P(X = x |e ) Problem:
Leveraging Belief Propagation, Backtrack Search, and Statistics for Model Counting Lukas Kroc, Ashish Sabharwal, Bart Selman Cornell University May 23,
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Algorithms in Exponential Time. Outline Backtracking Local Search Randomization: Reducing to a Polynomial-Time Case Randomization: Permuting the Evaluation.
1 Towards Efficient Sampling: Exploiting Random Walk Strategy Wei Wei, Jordan Erenrich, and Bart Selman.
Model Counting: A New Strategy for Obtaining Good Bounds Carla P. Gomes, Ashish Sabharwal, Bart Selman Cornell University AAAI Conference, 2006 Boston,
Combinatorial Problems II: Counting and Sampling Solutions Ashish Sabharwal Cornell University March 4, nd Asian-Pacific School on Statistical Physics.
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.
Inference. Overview The MC-SAT algorithm Knowledge-based model construction Lazy inference Lifted inference.
Short XORs for Model Counting: From Theory to Practice Carla P. Gomes, Joerg Hoffmann, Ashish Sabharwal, Bart Selman Cornell University & Univ. of Innsbruck.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Instance Hardness and Phase Transitions.
Accelerating Random Walks Wei Wei and Bart Selman Dept. of Computer Science Cornell University.
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
Stochastic greedy local search Chapter 7 ICS-275 Spring 2007.
Announcements Homework 8 is out Final Contest (Optional)
1 Message Passing and Local Heuristics as Decimation Strategies for Satisfiability Lukas Kroc, Ashish Sabharwal, Bart Selman (presented by Sebastian Brand)
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,
Monte Carlo Methods in Partial Differential Equations.
Introduction to Monte Carlo Methods D.J.C. Mackay.
1 Exploiting Random Walk Strategies in Reasoning Wei.
Stochastic Algorithms Some of the fastest known algorithms for certain tasks rely on chance Stochastic/Randomized Algorithms Two common variations – Monte.
General Principle of Monte Carlo Fall 2013 By Yaohang Li, Ph.D.
Performing Bayesian Inference by Weighted Model Counting Tian Sang, Paul Beame, and Henry Kautz Department of Computer Science & Engineering University.
The Boolean Satisfiability Problem: Theory and Practice Bart Selman Cornell University Joint work with Carla Gomes.
Finding Scientific topics August , Topic Modeling 1.A document as a probabilistic mixture of topics. 2.A topic as a probability distribution.
Simulated Annealing.
Markov Chain Monte Carlo and Gibbs Sampling Vasileios Hatzivassiloglou University of Texas at Dallas.
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.
Monté Carlo Simulation  Understand the concept of Monté Carlo Simulation  Learn how to use Monté Carlo Simulation to make good decisions  Learn how.
Learning With Bayesian Networks Markus Kalisch ETH Zürich.
CS B 553: A LGORITHMS FOR O PTIMIZATION AND L EARNING Monte Carlo Methods for Probabilistic Inference.
Schreiber, Yevgeny. Value-Ordering Heuristics: Search Performance vs. Solution Diversity. In: D. Cohen (Ed.) CP 2010, LNCS 6308, pp Springer-
An Introduction to Markov Chain Monte Carlo Teg Grenager July 1, 2004.
MCMC reconstruction of the 2 HE cascade events Dmitry Chirkin, UW Madison.
Seminar on random walks on graphs Lecture No. 2 Mille Gandelsman,
Markov Chain Monte Carlo for LDA C. Andrieu, N. D. Freitas, and A. Doucet, An Introduction to MCMC for Machine Learning, R. M. Neal, Probabilistic.
Lecture #9: Introduction to Markov Chain Monte Carlo, part 3
CS 188: Artificial Intelligence Bayes Nets: Approximate Inference Instructor: Stuart Russell--- University of California, Berkeley.
The Markov Chain Monte Carlo Method Isabelle Stanton May 8, 2008 Theory Lunch.
Accelerating Random Walks Wei Wei and Bart Selman.
Presented by Dajiang Zhu 11/1/2011.  Introduction of Markov chains Definition One example  Two problems as examples 2-SAT Algorithm (simply introduce.
Probabilistic and Logical Inference Methods for Model Counting and Sampling Bart Selman with Lukas Kroc, Ashish Sabharwal, and Carla P. Gomes Cornell University.
CS Statistical Machine learning Lecture 25 Yuan (Alan) Qi Purdue CS Nov
STAT 534: Statistical Computing
Kevin Stevenson AST 4762/5765. What is MCMC?  Random sampling algorithm  Estimates model parameters and their uncertainty  Only samples regions of.
1 P NP P^#P PSPACE NP-complete: SAT, propositional reasoning, scheduling, graph coloring, puzzles, … PSPACE-complete: QBF, planning, chess (bounded), …
Monte Carlo Sampling to Inverse Problems Wojciech Dębski Inst. Geophys. Polish Acad. Sci. 1 st Orfeus workshop: Waveform inversion.
CS 541: Artificial Intelligence Lecture VII: Inference in Bayesian Networks.
CS498-EA Reasoning in AI Lecture #19 Professor: Eyal Amir Fall Semester 2011.
CS b553: Algorithms for Optimization and Learning
Local Search Strategies: From N-Queens to Walksat
Path Coupling And Approximate Counting
Maria Okuniewski Nuclear Engineering Dept.
Markov chain monte carlo
Markov Chain Monte Carlo
Haim Kaplan and Uri Zwick
CS 188: Artificial Intelligence
Joint work with Carla Gomes.
Computing the Density of States of Boolean Formulas
Presentation transcript:

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 a wide range of new applications. SAT testing counting/sampling logic inference probabilistic reasoning NP / co-NP-complete #P-complete Note: counting solutions and sampling solutions are computationally near equivalent. Related work: Kautz et al. ’06; Bacchus et al. ’07; Darwich ’04 & ’08; Littman ‘03.

2 Standard Methods for Sampling: Markov Chain Monte Carlo (MCMC) Based on setting up a Markov chain with a predefined stationary distribution. E.g. simulated annealing. Draw samples from the stationary distribution by running the Markov chain for a sufficiently long time. Problem: for many interesting problems, such as SAT, Markov chain takes exponential time to converge to its stationary distribution. Bottom line: standard MCMC (e.g. SA) too slow.

3 First attempt Use specialized local search style algorithm: Biased random walk = a random walk with greedy bias. Example: WalkSat (Selman et al, 1993), effective on SAT. Can we use it to sample from solution space? – Does WalkSat reach all solutions? – How uniform/non-uniform is the sampling? (Wei Wei and Selman ’04; ’05)‏ Aside: Can ask same questions about SP.

WalkSat visited 500,000 times visited 60 times Hamming distance 75 var random 3SAT 2,500 solutions 50,000,000 runs All solns reached but highly non-uniform!

Probability Ranges for Different Domains InstanceRunsHits RarestHits Common Common-to - Rare Ratio Random 50    10 4 Logistics 1   Verif. 1 

Improving the Uniformity of Sampling SampleSat: With probability p, the algorithm makes a biased random walk move With probability 1-p, the algorithm makes a SA (simulated annealing) move WalkSat Nonergodic Quickly reach sinks Ergodic Slow convergence Ergodic But does not satisfy DBC SA= SampleSat+

7 Comparison Between WalkSat and SampleSat WalkSatSampleSat

WalkSat Hamming distance

SampleSat Hamming Distance SampleSAT Note: Uniform sampling within clusters.

InstanceRunsHits RarestHits Most Common Common-to - Rare Ratio WalkSat Ratio SampleSat Random 50    Logistics planning 1   Hardware verification 1  For some formal properties, see Wei Wei and Selman (‘04 ). So, improved sampling. How about larger instances? How about counting?

11 From Sampling to Counting: Recursively Divide and Conquer! X=1 X=0 Space of truth assignments 1/3 2/3 2/3 of soln. samples have X=1 # solns. = 3/2 * #solns. _with_X=1 Multiplier from sampling Count smaller formula with fixed X=1

12 From Sampling to Counting Algorithm works as follows (Jerrum and Valiant, 1986) ‏  Pick a variable X in current formula  Draw K samples from the solution space  Set variable X to its most sampled value t, and the multiplier for X is K/#(X=t). Aside: 1  multiplier  2  Repeat step 1-3 until all variables are set  The number of solutions of the original formula is the product of all multipliers.

instance#variables#solutionsApproxCountAverage Error / var P(30,20)‏600 7   % P(20,10)‏200 7   % instance#variablesExact count ApproxCountAverage Error / var prob004-log-a   % wff   % dp02s02.shuffled   % Comparison to exact counting (DPLL-style ). Beyond exact model counters Note: final numbers obtained by multiplying 100s of (estimated) factors.

Summary: Counting & Sampling Results show potential for modified SAT (CSP?) solvers (local search) for counting / sampling solutions. Can handle solution spaces with 10^25 and more solutions. Range of potential applications: e.g. many forms of probabilistic (Bayesian) reasoning.