1 Exploiting Random Walk Strategies in Reasoning Wei.

Slides:



Advertisements
Similar presentations
Propositional Satisfiability (SAT) Toby Walsh Cork Constraint Computation Centre University College Cork Ireland 4c.ucc.ie/~tw/sat/
Advertisements

P-Optimal CSP Solvers Applied to Software Security P-Optimal CSP Solvers Applied to Software Security Ahmed Abdel Mohsen and Karl Lieberherr College of.
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
1 Backdoor Sets in SAT Instances Ryan Williams Carnegie Mellon University Joint work in IJCAI03 with: Carla Gomes and Bart Selman Cornell University.
Generating Hard Satisfiability Problems1 Bart Selman, David Mitchell, Hector J. Levesque Presented by Xiaoxin Yin.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Beating Brute Force Search for Formula SAT and QBF SAT Rahul Santhanam University of Edinburgh.
Recent Development on Elimination Ordering Group 1.
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.
Methods of Proof Chapter 7, second half.
1 Sampling, Counting, and Probabilistic Inference Wei joint work with Bart Selman.
It’s all about the support: a new perspective on the satisfiability problem Danny Vilenchik.
AAAI00 Austin, Texas Generating Satisfiable Problem Instances Dimitris Achlioptas Microsoft Carla P. Gomes Cornell University Henry Kautz University of.
Accelerating Random Walks Wei Dept. of Computer Science Cornell University (joint work with Bart Selman)
1 Backdoors To Typical Case Complexity Ryan Williams Carnegie Mellon University Joint work with: Carla Gomes and Bart Selman Cornell University.
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.
Knowledge Representation II (Inference in Propositional Logic) CSE 473.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
. Approximate Inference Slides by Nir Friedman. When can we hope to approximate? Two situations: u Highly stochastic distributions “Far” evidence is discarded.
SAT Solving Presented by Avi Yadgar. The SAT Problem Given a Boolean formula, look for assignment A for such that.  A is a solution for. A partial assignment.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 2 Ryan Kinworthy CSCE Advanced Constraint Processing.
1 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla Gomes and Bart Selman Cornell University Muri Meeting March 2002.
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.
Logic - Part 2 CSE 573. © Daniel S. Weld 2 Reading Already assigned R&N ch 5, 7, 8, 11 thru 11.2 For next time R&N 9.1, 9.2, 11.4 [optional 11.5]
Relaxed DPLL Search for MaxSAT (short paper) Lukas Kroc, Ashish Sabharwal, Bart Selman Cornell University SAT-09 Conference Swansea, U.K. July 3, 2009.
1 Local search and optimization Local search= use single current state and move to neighboring states. Advantages: –Use very little memory –Find often.
Boolean Satisfiability and SAT Solvers
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.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module 3 Logic Representations (Part 2)
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Simulated Annealing.
Local Search: walksat, ant colonies, and genetic algorithms.
Combination of Exact and Approximate Methods for SAT and MAX-SAT Problems Frédéric Lardeux, Frédéric Saubion and Jin-Kao Hao Metaheuristics and Combinatorial.
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.
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.
CSE 473 Propositional Logic SAT Algorithms Dan Weld (With some slides from Mausam, Stuart Russell, Dieter Fox, Henry Kautz, Min-Yen Kan…) Irrationally.
On the Relation between SAT and BDDs for Equivalence Checking Sherief Reda Rolf Drechsler Alex Orailoglu Computer Science & Engineering Dept. University.
Quality of LP-based Approximations for Highly Combinatorial Problems Lucian Leahu and Carla Gomes Computer Science Department Cornell University.
Stochastic greedy local search Chapter 7 ICS-275 Spring 2009.
/425 Declarative Methods - J. Eisner 1 Random 3-SAT  sample uniformly from space of all possible 3- clauses  n variables, l clauses Which are.
SAT 2009 Ashish Sabharwal Backdoors in the Context of Learning (short paper) Bistra Dilkina, Carla P. Gomes, Ashish Sabharwal Cornell University SAT-09.
Review of Propositional Logic Syntax
© Daniel S. Weld 1 Logistics Problem Set 2 Due Wed A few KR problems Robocode 1.Form teams of 2 people 2.Write design document.
Accelerating Random Walks Wei Wei and Bart Selman.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
AAAI of 20 Deconstructing Planning as Satisfiability Henry Kautz University of Rochester in collaboration with Bart Selman and Jöerg Hoffmann.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Metaheuristics for the New Millennium Bruce L. Golden RH Smith School of Business University of Maryland by Presented at the University of Iowa, March.
1 P NP P^#P PSPACE NP-complete: SAT, propositional reasoning, scheduling, graph coloring, puzzles, … PSPACE-complete: QBF, planning, chess (bounded), …
Inference in Propositional Logic (and Intro to SAT)
EA C461 – Artificial Intelligence Logical Agent
Local Search Strategies: From N-Queens to Walksat
Emergence of Intelligent Machines: Challenges and Opportunities
ECE 667 Synthesis and Verification of Digital Circuits
Methods of Proof Chapter 7, second half.
Presentation transcript:

1 Exploiting Random Walk Strategies in Reasoning Wei

2 Universal inference engine  One of the oldest AI dreams General Problem Solver (Newell & Simon, 1961) Use logic reasoning ( “ Program with Common Sense ”, McCarthy 1968)  Largely unsuccessful due to the tradeoff between computational complexity and representation power. => many successful systems are domain-specific (e.g. Dendral, , organic chemistry)  Recent improvement in computer ’ s abilities to perform large-scale search => Revisit the original idea

3 Computational Power - SAT  Hardware power  Average-case complexity  New algorithmic tools: randomization, learning  Increasing demand: verification  Research input: annual conference, competition year#variable , ,000,000

4 Boolean Satisfiability Problem  Boolean Satisfiability Problem (SAT) asks if a Boolean expression can be made true by assigning Boolean values to its variables.  The problem is well-studied in AI community with direct application in reasoning, planning, CSP, VLSI microprocessor verification etc.  Does statement s hold in world A (represented by a set of clauses)? A s  ( ¬ s) ^ A unsatisfiable

5 SAT  SAT (even 3SAT) is NP-complete. Best theoretical bound so far is (2-2/k) N randomized (Schoening 1999) or (2-2/(k+1)) N deterministic (Dantsin et al 2002) for k-SAT  In practice, there are two different kinds of solvers DPLL (Davis, Logemann and Loveland 1962) Local Search (Selman et al 1992)

6 DPLL (x 1   x 2  x 3 )  (x 1  x 2   x 3 )  (x 1  x 2 )  DPLL was first proposed as a basic depth- first tree search. x1x1 x2x2 FT T null F solution x2x2 Potential problem: early commitment

7 DPLL  Recently (since late 90 ’ s), many improvements: Randomization restarts out-of-order backtracking clause learning

8 Local Search (x 1   x 2  x 3 )  (x 1  x 2   x 3 )  (x 1  x 2 )  The idea: Start with a random assignment. And make local changes to the assignment until a solution is reached (010  011  001)  Pro: often efficient in practice. Sometimes the only feasible way for some problems  Con: Cannot prove nonexistence of solutions. Difficult to analyze theoretically.  Example GSAT (Selman et al. 1992)

9 Local Search Schemes  local search schemes used: Simulated annealing Tabu search Genetic algorithms Random Walk and its variants  the most successful so far

10 Unbiased (Pure) Random Walk for SAT Procedure Random-Walk (RW) Start with a random truth assignment Repeat c:= an unsatisfied clause chosen at random x:= a variable in c chosen at random flip the truth value of x Until a satisfying assignment is found

11 Unbiased RW on any satisfiable 2SAT Formula  Given a satisfiable 2SAT formula with n variables, a satisfying assignment will be reached by Unbiased RW in O(n 2 ) steps with high probability. (Papadimitriou, 1991)

12 We have an unbiased random walk with a reflecting barrier at distance N from T (max Hamming distance) and an absorbing barrier (satisfying assignment) at distance 0. We start at a Hamming distance of approx. ½ N. Property of unbiased random walks: after N^2 flips, with high probability, we will hit the origin (the satisfying assignment). (Drunkards walk) So, O(N^2) randomized algorithm (worst-case!) for 2- SAT. TA0 T reflecting

13 Unbiased RW on 3SAT Formulas Random walk takes exponential number of steps to reach 0. T A0 reflecting

14 Comments on RW 1) Random Walk is highly “ myopic ” does not take into account any gradient of the objective function (= number of unsatisfied clauses)! Purely “ local ” fixes. 2) Can we make RW practical for SAT? Yes --- inject greedy bias into walk  biased Random Walk.

15 Biased Random Walk Procedure WalkSat Repeat c:= an unsatisfied clause chosen at random if there exist a variable x in c with break value = 0 // greedy bias flip the value of x ( “ freebie move ” ) else with probability p // pure walk x:= a variable in c chosen at random flip the value of x with probability (1-p) x:= a variable in c with smallest break value // more greedy bias flip the value of x Until a satisfying assignment is found Note: tune parameter p.

16 Random Walk algorithms  Random walk algorithm (e.g. Walksat) offer significant improvement on performance over hill-climbing algorithms. IDVarsclausesGSAT+wWalksat Ssa Ssa Ssa Ssa

17 First, bringing out the worst in random walks… (2-SAT) X1  X2 X2  X3 X3  X4 Xn  X4 Xn  X1 Note: Only 2 satisfying assignments, all False and all True.

18 Binary Chains Walk is exactly balanced.

19 Results: Speeding up Random Walks on Binary Chains * : empirical results ** : proof available Pure binary chain Chain with redundancies RW (n 2 ) ** RWF (n 2 ) ** (n 1.2 ) * WalkSat (n 2 ) ** (n 1.1 ) * Becomes almost like unit prop.

20 Ternary Chains In general, even a small bias in the wrong direction leads to exponential time to reach 0. reflecting

21 What about 3-SAT? Again, consider “chain” formulas. X1 & X2  X3 X2 & X3  X4 X_(n-2) & X_(n-1)  X_n X1 & X2 X_floor(n/2) & X_(n-1)  X_n

22 Theoretical Results on 3-SAT Chains Function low(i)Expected run time of pure RW i-2 (highly local) ~ Fib(n) (i.e., exp.) i/2 (interm. reach) ~ n log n (i.e., quasi-poly) log i (interm. reach) ~ n 2. (log n) 2 (i.e., poly) 1 (full back reach) ~ n 2 low(i) captures how far back the clauses reach.

23 Recurrence Relations Our formula structure gives us: E(f(z i )) = (E(f(z low(i) ) + E(f(z i ) + 1) * 1/3 + (E(f(z i-1 ) + E(f(z i ) + 1) * 1/3 + 1 * 1/3  E(f(z i )) = E(f(z low(i) ) + E(f(z i-1 ) + 3

24 Decompose: multiple “ 0 ” s   Start Sat assign.

25 Recap Chain Formula Results  Adding implied constraints capturing long-range dependencies speeds random walk on 2-Chain to near linear time.  Certain long-range dependencies in 3-SAT lead to poly-time convergence of random walks.  Can we take advantage of these results on practical problem instances? Yes! (next) Our methodology: Identify, analyze, and “ exploit ” special tractable structure in large practical reasoning problems.

26 Empirical Results SSS-SAT-1.0 instances (Velev 1999). 100 total.  level of redundancy added (20% near optimal) Formulas (redun. level) <40 sec<400 sec <4000 sec  =  =  =

27 Optimal Redundancy Rate Time vs Redundancy Rate Flips vs Redundancy Rate WalkSat(noise=50) on dlx2_cc_bug01.cnf from SAT-1.0 Suite

28 Probabilistic Reasoning  Previously, we asked “ does statement s hold in world A (represented by a set of clauses)? ” A s  ( ¬ s) ^ A unsatisfiable  Now, what is the probability that statement s holds in world A? Pr = #( s ^ A ) / #A

29 Probabilistic Reasoning  Close connection between counting and sampling (Jerrum et al, 1986).  Bayesian Net Queries can be encoded as #SAT. (Kautz, 2004)  How to Sample: By repeated counting using DPLL algorithms Monte Carlo Markov Chain Method Use state-of-the-art local search methods Note: Random Walk not uniform

30 Characteristics of Solution space: Solution Clustering  Visualization with multi-dimensional scaling (MDS) Solutions to specific 75 variable, 325 clause 3-SAT instances 75 dimensional solution projected to two dimensions Distance between points approximates hamming distance

31  Empirically determined each solution’s probability (uf variable, 325 clause 3-SAT instance)  WalkSat finds every solution, but with very large range of probabilities (1:10 4 )  Probability Clusters Solution Probability Using WalkSat Algorithm

32 Probability Ranges in Different Domains InstanceRunsHits Rarest Hits Common Common- to -Rare Ratio Random50* * *10 4 Logistics1* *

33 Improving the Uniformity of Sampling - mixing sampling strategy  To reduce the range of probabilities, we propose a hybrid local search algorithm: With probability p, the algorithm makes a biased random walk move With probability 1-p, the algorithm makes a SA (simulated annealing) move  In our experiments, we used 50% WalkSat + 50% SA at a fixed temperature

34 Results of the Hybrid Approach Our key figure.

35 Solution Clusters Results on a random 3-SAT instance (70 vars, 301 clauses, 2531 solutions).

36 Summary 1)WalkSAT does sample all solutions. 2)But, sampling can be highly biased. 3)Using a new hybrid strategy, we can obtain effective near-uniform sampling. Lesson: Hybrid of SA and biased walk, is a promising alternative to MCMC methods for sampling. Idea: Use SAT solvers to sample solutions from a combinatorial space. Findings:

37 Research Directions  Can we exploit techniques from DPLL solvers, such as learned clauses (inferred structure) in local search?  Can we identify other classes of structure in real-world problem that can further accelerate random walk style SAT solvers?  Can we design better SAT encodings based on our insights about structure?

38 Research Directions, cont.  Solution sampling Main Challenge: moving between clusters evaluation tools.  Randomize DPLL to sample solution space Early indicator of solution counts.  Compare with Bayesian/probabilistic state-of-the-art inference methods. Can we outperform them?