Accelerating Random Walks Wei Wei and Bart Selman.

Slides:



Advertisements
Similar presentations
Exploiting SAT solvers in unbounded model checking
Advertisements

Propositional Satisfiability (SAT) Toby Walsh Cork Constraint Computation Centre University College Cork Ireland 4c.ucc.ie/~tw/sat/
Complexity ©D.Moshkovits 1 Where Can We Draw The Line? On the Hardness of Satisfiability Problems.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
Propositional and First Order Reasoning. Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p 
Proofs from SAT Solvers Yeting Ge ACSys NYU Nov
“Using Weighted MAX-SAT Engines to Solve MPE” -- by James D. Park Shuo (Olivia) Yang.
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.
Generating Hard Satisfiability Problems1 Bart Selman, David Mitchell, Hector J. Levesque Presented by Xiaoxin Yin.
Properties of SLUR Formulae Ondřej Čepek, Petr Kučera, Václav Vlček Charles University in Prague SOFSEM 2012 January 23, 2012.
CP Formal Models of Heavy-Tailed Behavior in Combinatorial Search Hubie Chen, Carla P. Gomes, and Bart Selman
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
1 Towards Efficient Sampling: Exploiting Random Walk Strategy Wei Wei, Jordan Erenrich, and Bart Selman.
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
It’s all about the support: a new perspective on the satisfiability problem Danny Vilenchik.
Analysis of Algorithms CS 477/677
Technion 1 Generating minimum transitivity constraints in P-time for deciding Equality Logic Ofer Strichman and Mirron Rozanov Technion, Haifa, Israel.
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.
Accelerating Random Walks Wei Wei and Bart Selman Dept. of Computer Science Cornell University.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
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 Continued…
1 Paul Beame University of Washington Phase Transitions in Proof Complexity and Satisfiability Search Dimitris Achlioptas Michael Molloy Microsoft Research.
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)
Sampling Combinatorial Space Using Biased Random Walks Jordan Erenrich, Wei Wei and Bart Selman Dept. of Computer Science Cornell University.
1 Exploiting Random Walk Strategies in Reasoning Wei.
Distributions of Randomized Backtrack Search Key Properties: I Erratic behavior of mean II Distributions have “heavy tails”.
Satisfiability Introduction to Artificial Intelligence COS302 Michael L. Littman Fall 2001.
Constrainedness Including slides from Toby Walsh.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
INTRODUCTION TO ARTIFICIAL INTELLIGENCE COS302 MICHAEL L. LITTMAN FALL 2001 Satisfiability.
1 Agenda Modeling problems in Propositional Logic SAT basics Decision heuristics Non-chronological Backtracking Learning with Conflict Clauses SAT and.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
Local Search: walksat, ant colonies, and genetic algorithms.
Survey Propagation. Outline Survey Propagation: an algorithm for satisfiability 1 – Warning Propagation – Belief Propagation – Survey Propagation Survey.
First-Order Logic and Inductive Logic Programming.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
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.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 29.
Balance and Filtering in Structured Satisfiability Problems Henry Kautz University of Washington joint work with Yongshao Ruan (UW), Dimitris Achlioptas.
Presented by Dajiang Zhu 11/1/2011.  Introduction of Markov chains Definition One example  Two problems as examples 2-SAT Algorithm (simply introduce.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Solving the Logic Satisfiability problem Solving the Logic Satisfiability problem Jesus De Loera.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Local Search Methods for SAT Geoffrey Levine March 11, 2004.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Complexity ©D.Moshkovits 1 2-Satisfiability NOTE: These slides were created by Muli Safra, from OPICS/sat/)
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
Inference in Propositional Logic (and Intro to SAT)
Inference and search for the propositional satisfiability problem
Computability and Complexity
(xy)(yz)(xz)(zy)
First-Order Logic and Inductive Logic Programming
Local Search Strategies: From N-Queens to Walksat
Where Can We Draw The Line?
Complexity 6-1 The Class P Complexity Andrei Bulatov.
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
Presentation transcript:

Accelerating Random Walks Wei Wei and Bart Selman

Introduction – local search  Local Search methods have become viable alternative to backtrack style methods  For SAT, the first local methods are based on greedy hill-climbing search  Later, random walk style methods (WalkSat and its variants) provide great improvements — these methods combine a random walk strategy with a greedy bias

Introduction – theory  On theory side, Papadimitriou (1991) shows unbiased random walk reach a satisfying assignment in O(N 2 ) on an arbitrary satisfiable 2SAT formula  Schoening (1999) shows a series of short unbiased random walk on a 3-SAT problem will find a solution in O(1.334 N ) flips  Parkes (CP 2002) shows empirically for random 3-sat, when clause/variable <2.65, unbiased RW finds a solution in linear flips. Otherwise, it appears to take greater than polynomial time

Introduction - practice  Random walk style methods are successful in randomly generated instances, as well as in a bunch of real-world domains  However, they are generally less effective in highly structured domains compared to DPLL  One of the reasons is random walk needs O(N 2 ) flips to propagate dependencies among variables, while in DPLL, unit-propagation takes linear time

Overview  Introduction  Random Walk Strategies - unbiased random walk 1. on 2SAT formulas 2. on 3SAT formulas - biased random walk 1. RWF 2. WalkSat  Chain Formulas - binary chains - ternary chains  Practical Problems  Conclusion and Future Directions

Unbiased (Pure) Random Walk Strategy Procedure RW Repeat c:= an unsatisfied clause chosen at random x:= a variable in c chosen at random flip the value of x Until a satisfying assignment is found

Unbiased RW on any satisfiable 2SAT Formula  If a 2SAT formula of n variables is satisfiable, a satisfying assignment will be reached by Unbiased RW in O(n 2 ) steps with high probability (Papadimitriou, 1991)

Unbiased RW on any satisfiable 2SAT Formula T T’ Reach T in O(n 2 ) time with probability going to 1

Unbiased RW on 3SAT Formulas

 RW is heavily biased away from the solution under consideration  Exponential number of flips required to reach the solution  In practice, pure RW performs poorly on hard random 3SAT formula (Parkes, CP2002)

Biased Random Walk Procedure RWF Repeat c:= an unsatisfied clause chosen at random if there exist a variable x in c with break value = 0 flip the value of x (freebie move) else x:= a variable in c chosen at random flip the value of x Until a satisfying assignment is found

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 flip the value of x (freebie move) else with probability p 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 flip the value of x Until a satisfying assignment is found

Chain Formulas  To understand the behavior of pure and biased RW procedures on SAT instances, we introduce Chain Formulas  These formulas have long chains of dependencies between variables  They demonstrate the extreme properties of RW style algorithms

Binary Chains  Consider formulas F 2chain x 1  x 2 x 2  x 3 … x n-1  x n x n  x 1

Binary Chains

 We obtain the following theorem Theorem 1. The RW procedure takes  n 2 ) steps to find a satisfying assignment of F 2chain.  DPLL algorithm’s unit propagation mechanism finds an assignment for F 2chain in linear time.  Our experiments and theoretic analysis show that adding a greedy bias to random walk does not help in this case: both RWF and WalkSat takes  n 2 ) flips to reach a satisfying assignment on these formulas

Speeding up Random Walks on Binary Chains Pure binary chain BCR

Speeding up Random Walks on Binary Chains * : empirical results ** : theoretical proof available Pure binary chain BCR RW  (n 2 ) ** RWF  (n 2 ) **  (n 1.2 ) * WalkSat  (n 2 ) *  (n 1.1 ) *

Formulas of Different Sizes and Redundancy Rates Redundant rate = # redundant clauses / n

WalkSat vs. RWF

Empirically Determine Optimal Redundancy Rate

Ternary Chains

 Consider formulas F 3chain, low(i) x 1 x 2 x 1  x 2  x 3 … x low(i)  x i-1  x i … x low(n)  x n-1  x n *These formulas are inspired by Prestwich [2001]

Ternary Chains

Theoretical Results Function low(i)Expected Running time of pure RW i-2~ Fib(n)  i/2  O(n. n log n )  log i  O(n 2. (log n) 2 ) 1O(n 2 )

Proof  The proofs of these claims are quite involved, and are available at  But the intuition behind the proofs are simple. Namely, each RW process on these formulas can be decomposed into a bunch of components, which are in turn solved by solving a series of recurrence relations

Decomposition of RW   

Recurrence Relations  Therefore, we have E(f(z i )) = (E(f(z low(i) ) + E(f(z i ) + 1)/3 + (E(f(z i-1 ) + E(f(z i ) + 1)/3 + 1/3  E(f(z i )) = E(f(z low(i) ) + E(f(z i-1 ) + 3

Recurrence Relations  Solving this recurrence for different low(i)’s, we get Function low(i)E(f(z i )) i-2  Fib(i)  i/2  i log i  log i  i. (log i) 2 1  i i From this table, it is easy to get the complexity results shown

Theoretical Results Function low(i)Expected Running time of pure RW i-2~ Fib(n)  i/2  O(n. n log n )  log i  O(n 2. (log n) 2 ) 1O(n 2 )

Empirical Results: Unbiased Random Walks

Empirical Results: Biased and Unbiased Random Walks

Practical Problems  Brafman’s 2-Simplify method is an ideal tool to help us discover long-range dependencies  It simplifies a CNF formula in the following steps: 1.It constructs an implication graph from binary clauses, and collapses strongly connected components in this graph 2.It generates transitive closure of the graph, deduces through binary and hyper-resolutions, and removes assigned variables 3.It removes transitively redundant links to keep the number of edge minimal 4.It translates the graph back to binary clauses

Practical Problems 1.constructs an implication graph from binary clauses, and collapses strongly connected components in this graph 2.generates transitive closure of the graph, deduces through binary and hyper-resolutions, and removes assigned variables 3.steps through the redundancy removal steps, and removes each implied link with probability (1-  ) 4.translates the graph back to binary clauses

Practical Problems Number of instance WalkSat (noise = 0.5) solved (SSS-SAT-1.0 by Velev) Formulas<40 sec<400 sec<4000 sec  =  =  =

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

Related Work  Cha and Iwama (1996) studied the effect of adding clauses during local search process. But they focus on resolvents of unsat clauses at local minima, and their selected neighbors. Our results suggested long range dependencies may be more important to uncover

Conclusions  We show how to speed up random walk style algorithms – introduce constraints that capture long range dependencies  In our formal analysis of ternary chains, we show performance of RW varies from exponential to polynomial depending on the range of dependency links. We identify a sub-case that is solvable in poly-time by unbiased RW  In binary chain, we show with added implied clauses, biased RW becomes almost as effective as unit-propagation  We use practical problems to validate our approach

Future Directions  It should be possible to develop preprocessor to uncover other type of dependencies, for example, in graph coloring problem, etc  x 1   x 4,  x 2   x 5,  x 3   x 6, … x 1  x 4  x 7  x 10, …