Learning to Search Henry Kautz University of Washington joint work with Dimitri Achlioptas, Carla Gomes, Eric Horvitz, Don Patterson, Yongshao Ruan, Bart.

Slides:



Advertisements
Similar presentations
10/7/2014 Constrainedness of Search Toby Walsh NICTA and UNSW
Advertisements

UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
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.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Mar, 4, 2015 Slide credit: some slides adapted from Stuart.
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.
Dynamic Restarts Optimal Randomized Restart Policies with Observation Henry Kautz, Eric Horvitz, Yongshao Ruan, Carla Gomes and Bart Selman.
Constraint Systems Laboratory Oct 21, 2004Guddeti: MS thesis defense1 An Improved Restart Strategy for Randomized Backtrack Search Venkata P. Guddeti Constraint.
Statistical Regimes Across Constrainedness Regions Carla P. Gomes, Cesar Fernandez Bart Selman, and Christian Bessiere Cornell University Universitat de.
CP Formal Models of Heavy-Tailed Behavior in Combinatorial Search Hubie Chen, Carla P. Gomes, and Bart Selman
Methods for SAT- a Survey Robert Glaubius CSCE 976 May 6, 2002.
08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.
Heavy-Tailed Behavior and Search Algorithms for SAT Tang Yi Based on [1][2][3]
Impact of Structure on Complexity Carla Gomes Bart Selman Cornell University Intelligent Information Systems.
Ryan Kinworthy 2/26/20031 Chapter 7- Local Search part 1 Ryan Kinworthy CSCE Advanced Constraint Processing.
Solvable problem Deviation from best known solution [%] Percentage of test runs ERA RDGR RGR LS Over-constrained.
Implicit Hitting Set Problems Richard M. Karp Harvard University August 29, 2011.
Auto-Walksat: A Self-Tuning Implementation of Walksat JIN Xiaolong (Based on [1] )
Methods of Proof Chapter 7, second half.
AAAI00 Austin, Texas Generating Satisfiable Problem Instances Dimitris Achlioptas Microsoft Carla P. Gomes Cornell University Henry Kautz University of.
Analysis of Algorithms CS 477/677
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.
Structure and Phase Transition Phenomena in the VTC Problem C. P. Gomes, H. Kautz, B. Selman R. Bejar, and I. Vetsikas IISI Cornell University University.
1 BLACKBOX: A New Paradigm for Planning Bart Selman Cornell University.
Carla P. Gomes CS4700 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Instance Hardness and Phase Transitions.
CP-AI-OR-02 Gomes & Shmoys 1 The Promise of LP to Boost CSP Techniques for Combinatorial Problems Carla P. Gomes David Shmoys
1 CS 4700: Foundations of Artificial Intelligence Carla P. Gomes Module: Satisfiability (Reading R&N: Chapter 7)
1 BLACKBOX: A New Approach to the Application of Theorem Proving to Problem Solving Bart Selman Cornell University Joint work with Henry Kautz AT&T Labs.
Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…
1 Understanding Problem Hardness: Recent Developments and Directions Bart Selman Cornell University.
1 Paul Beame University of Washington Phase Transitions in Proof Complexity and Satisfiability Search Dimitris Achlioptas Michael Molloy Microsoft Research.
Carla P. Gomes School on Optimization CPAIOR02 Exploiting Structure and Randomization in Combinatorial Search Carla P. Gomes
Lukas Kroc, Ashish Sabharwal, Bart Selman Cornell University, USA SAT 2010 Conference Edinburgh, July 2010 An Empirical Study of Optimal Noise and Runtime.
Controlling Computational Cost: Structure and Phase Transition Carla Gomes, Scott Kirkpatrick, Bart Selman, Ramon Bejar, Bhaskar Krishnamachari Intelligent.
1 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla Gomes and Bart Selman Cornell University Muri Meeting March 2002.
Hardness-Aware Restart Policies Yongshao Ruan, Eric Horvitz, & Henry Kautz IJCAI 2003 Workshop on Stochastic Search.
Distributions of Randomized Backtrack Search Key Properties: I Erratic behavior of mean II Distributions have “heavy tails”.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Structure and Phase Transition Phenomena in the VTC Problem C. P. Gomes, H. Kautz, B. Selman R. Bejar, and I. Vetsikas IISI Cornell University University.
Quasigroups Defaults Foundations of AI. Given an N X N matrix, and given N colors, color the matrix in such a way that: -all cells are colored; - each.
Boolean Satisfiability and SAT Solvers
ANTs PI Meeting, Nov. 29, 2000W. Zhang, Washington University1 Flexible Methods for Multi-agent distributed resource Allocation by Exploiting Phase Transitions.
1 Agenda Modeling problems in Propositional Logic SAT basics Decision heuristics Non-chronological Backtracking Learning with Conflict Clauses SAT and.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Heavy-Tailed Phenomena in Satisfiability and Constraint Satisfaction Problems by Carla P. Gomes, Bart Selman, Nuno Crato and henry Kautz Presented by Yunho.
Performance Prediction and Automated Tuning of Randomized and Parametric Algorithms Frank Hutter 1, Youssef Hamadi 2, Holger Hoos 1, and Kevin Leyton-Brown.
Explorations in Artificial Intelligence Prof. Carla P. Gomes Module Logic Representations.
Performance Prediction and Automated Tuning of Randomized and Parametric Algorithms: An Initial Investigation Frank Hutter 1, Youssef Hamadi 2, Holger.
Quality of LP-based Approximations for Highly Combinatorial Problems Lucian Leahu and Carla Gomes Computer Science Department Cornell University.
/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.
CPSC 422, Lecture 21Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 21 Oct, 30, 2015 Slide credit: some slides adapted from Stuart.
© 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 Combinatorial Problems in Cooperative Control: Complexity and Scalability Carla P. Gomes and Bart Selman Cornell University Muri Meeting June 2002.
Balance and Filtering in Structured Satisfiability Problems Henry Kautz University of Washington joint work with Yongshao Ruan (UW), Dimitris Achlioptas.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
Lecture 8 Randomized Search Algorithms Part I: Backtrack Search CSE 573 Artificial Intelligence I Henry Kautz Fall 2001.
Inference in Propositional Logic (and Intro to SAT) CSE 473.
Tommy Messelis * Stefaan Haspeslagh Burak Bilgin Patrick De Causmaecker Greet Vanden Berghe *
Shortcomings of Traditional Backtrack Search on Large, Tight CSPs: A Real-world Example Venkata Praveen Guddeti and Berthe Y. Choueiry The combination.
Formal Complexity Analysis of RoboFlag Drill & Communication and Computation in Distributed Negotiation Algorithms in Distributed Negotiation Algorithms.
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)
Data Driven Resource Allocation for Distributed Learning
Computer Science cpsc322, Lecture 14
Constraint Programming and Backtracking Search Algorithms
Presentation transcript:

Learning to Search Henry Kautz University of Washington joint work with Dimitri Achlioptas, Carla Gomes, Eric Horvitz, Don Patterson, Yongshao Ruan, Bart Selman CORE – MSR, Cornell, UW

Speedup Learning Machine learning historically considered Learning to classify objects Learning to search or reason more efficiently Speedup Learning Speedup learning disappeared in mid-90’s Last workshop in 1993 Last thesis 1998 What happened? It failed. It succeeded. Everyone got busy doing something else.

It failed. Explanation based learning Examine structure of proof trees Explain why choices were good or bad (wasteful) Generalize to create new control rules At best, mild speedup (50%) Could even degrade performance Underlying search engines very weak Etzioni (1993) – simple static analysis of next-state operators yielded as good performance as EBL

It succeeded. EBL without generalization Memoization No-good learning SAT: clause learning Integrates clausal resolution with DPLL Huge win in practice! Clause-learning proofs can be exponentially smaller than best DPLL (tree shaped) proof Chaff (Malik et al 2001) 1,000,000 variable VLSI verification problems

Everyone got busy. The something else: reinforcement learning. Learn about the world while acting in the world Don’t reason or classify, just make decisions What isn’t RL?

Another path Predictive control of search Learn statistical model of behavior of a problem solver on a problem distribution Use the model as part of a control strategy to improve the future performance of the solver Synthesis of ideas from Phase transition phenomena in problem distributions Decision-theoretic control of reasoning Bayesian modeling

Big Picture Problem Instances Solver static features runtime Learning / Analysis Predictive Model dynamic features resource allocation / reformulation control / policy

Case Study 1: Beyond 4.25 Problem Instances Solver static features runtime Learning / Analysis Predictive Model

Phase transitions & problem hardness Large and growing literature on random problem distributions Peak in problem hardness associated with critical value of some underlying parameter 3-SAT: clause/variable ratio = 4.25 Using measured parameter to predict hardness of a particular instance problematic! Random distribution must be a good model of actual domain of concern Recent progress on more realistic random distributions...

Quasigroup Completion Problem (QCP) NP-Complete Has structure is similar to that of real-world problems - tournament scheduling, classroom assignment, fiber optic routing, experiment design,... Can generate hard guaranteed SAT instances (2000)

Phase Transition Almost all unsolvable area Fraction of pre-assignment Fraction of unsolvable cases Almost all solvable area Complexity Graph Phase transition 42%50%20%42%50%20% Underconstrained area Critically constrained area Overconstrained area

Easy-Hard-Easy pattern in local search % holes Computational Cost Walksat Order 30, 33, 36 “Over” constrained area Underconstrained area

Are we ready to predict run times? Problem: high variance log scale

Deep structural features Rectangular PatternAligned PatternBalanced Pattern TractableVery hard Hardness is also controlled by structure of constraints, not just the fraction of holes

Random versus balanced Balanced Random

Random versus balanced Balanced Random

Random vs. balanced (log scale) Balanced Random

Morphing balanced and random

Considering variance in hole pattern

Time on log scale

Effect of balance on hardness Balanced patterns yield (on average) problems that are 2 orders of magnitude harder than random patterns Expected run time decreases exponentially with variance in # holes per row or column E(T) = C -k  Same pattern (differ constants) for DPPL! At extreme of high variance (aligned model) can prove no hard problems exist

Intuitions In unbalanced problems it is easier to identify most critically constrained variables, and set them correctly Backbone variables

Are we done? Unfortunately, not quite. While few unbalanced problems are hard, “easy” balanced problems are not uncommon To do: find additional structural features that signify hardness Introspection Machine learning (later this talk) Ultimate goal: accurate, inexpensive prediction of hardness of real-world problems

Case study 2: AutoWalksat Problem Instances Solver runtime Learning / Analysis Predictive Model dynamic features control / policy

Walksat Choose a truth assignment randomly While the assignment evaluates to false Choose an unsatisfied clause at random If possible, flip an unconstrained variable in that clause Else with probability P (noise) Flip a variable in the clause randomly Else flip the variable in the clause which causes the smallest number of satisfied clauses to become unsatisfied. Performance of Walksat is highly sensitive to the setting of P

Shortest expected run time when P is set to minimize McAllester, Selman and Kautz (1997) The Invariant Ratio Mean of the objective function Std Deviation of the objective function %

Automatic Noise Setting Probe for the optimal noise level Bracketed Search with Parabolic Interpolation No derivatives required Robust to stochastic variations Efficient

Hard random 3-SAT

3-SAT, probes 1, 2

3-SAT, probe 3

3-SAT, probe 4

3-SAT, probe 5

3-SAT, probe 6

3-SAT, probe 7

3-SAT, probe 8

3-SAT, probe 9

3-SAT, probe 10

Summary: random, circuit test, graph coloring, planning

Other features still lurking clockwise – add 10%counter-clockwise – subtract 10% More complex function of objective function? Mobility? (Schuurmans 2000)

Case Study 3: Restart Policies Problem Instances Solver static features runtime Learning / Analysis Predictive Model dynamic features resource allocation / reformulation control / policy

Background Backtracking search methods often exhibit a remarkable variability in performance between: different heuristics same heuristic on different instances different runs of randomized heuristics

Cost Distributions Observation (Gomes 1997): distributions often have heavy tails infinite variance mean increases without limit probability of long runs decays by power law (Pareto-Levy), rather than exponentially (Normal) Very short Very long

Randomized Restarts Solution: randomize the systematic solver Add noise to the heuristic branching (variable choice) function Cutoff and restart search after a some number of steps Provably eliminates heavy tails Very useful in practice Adopted by state-of-the art search engines for SAT, verification, scheduling, …

Effect of restarts on expected solution time (log scale)

How to determine restart policy Complete knowledge of run-time distribution (only): fixed cutoff policy is optimal (Luby 1993) argmin t E(R t ) where E(R t ) = expected soln time restarting every t steps No knowledge of distribution: O(log t) of optimal using series of cutoffs 1, 1, 2, 1, 1, 2, 4, … Open cases addressed by our research Additional evidence about progress of solver Partial knowledge of run-time distribution

Backtracking Problem Solvers Randomized SAT solver Satz-Rand, a randomized version of Satz ( Li & Anbulagan 1997) DPLL with 1-step lookahead Randomization with noise parameter for increasing variable choices Randomized CSP solver Specialized CSP solver for QCP ILOG constraint programming library Variable choice, variant of Brelaz heuristic

Formulation of Learning Problem Different formulations of evidential problem Consider a burst of evidence over initial observation horizon Observation horizon + time expended so far General observation policies LongShort Observation horizon Median run time 1000 choice points Observation horizon

Observation horizon + Time expended Formulation of Learning Problem Different formulations of evidential problem Consider a burst of evidence over initial observation horizon Observation horizon + time expended so far General observation policies LongShort Observation horizon Median run time 1000 choice points t1t1t1t1 t2t2t2t2 t3t3t3t3

Formulation of Dynamic Features No simple measurement found sufficient for predicting time of individual runs Approach: Formulate a large set of base-level and derived features Base features capture progress or lack thereof Derived features capture dynamics 1 st and 2 nd derivatives Min, Max, Final values Use Bayesian modeling tool to select and combine relevant features

CSP : 18 basic features, summarized by 135 variables # backtracks depth of search tree avg. domain size of unbound CSP variables variance in distribution of unbound CSP variables Satz : 25 basic features, summarized by 127 variables # unbound variables # variables set positively Size of search tree Effectiveness of unit propagation and lookahead Total # of truth assignments ruled out Degree interaction between binary clauses, Dynamic Features

Single instance Solve a specific instance as quickly as possible Learn model from one instance Every instance Solve an instance drawn from a distribution of instances Learn model from ensemble of instances Any instance Solve some instance drawn from a distribution of instances, may give up and try another Learn model from ensemble of instances Different formulations of task

Sample Results: CSP-QWH-Single QWH order 34, 380 unassigned Observation horizon without time Training: Solve 4000 times with random Test: Solve 1000 times Learning: Bayesian network model MS Research tool Structure search with Bayesian information criterion (Chickering, et al. ) Model evaluation: Average 81% accurate at classifying run time vs. 50% with just background statistics (range of 98% - 78%)

Learned Decision Tree Min of 1 st derivative of variance in number of uncolored cells across columns and rows. Min number of uncolored cells averaged across columns. Min depth of all search leaves of the search tree. Change of sign of the change of avg depth of node in search tree. Max in variance in number of uncolored cells.

Restart Policies Model can be used to create policies that are better than any policy that only uses run-time distribution Example: Observe for 1,000 steps If “run time > median” predicted, restart immediately; else run until median reached or solution found; If no solution, restart. E(R fixed ) = 38,000 but E(R predict ) = 27,000 Can sometimes beat fixed even if observation horizon > optimal fixed !

Ongoing work Optimal predictive policies Dynamic features + Run time + Static features Partial information about run time distribution E.g.: mixture of two or more subclasses of problems Cheap approximations to optimal policies Myoptic Bayes

Conclusions Exciting new direction for improving power of search and reasoning algorithms Many knobs to learn how to twist Noise level, restart policies just a start Lots of opportunities for cross-disciplinary work Theory Machine learning Experimental AI and OR Reasoning under uncertainty Statistical physics