PhD March 20071 The Evergreen Project: How To Learn From Mistakes Caused by Blurry Vision in MAX-CSP Solving Karl J. Lieberherr Northeastern University.

Slides:



Advertisements
Similar presentations
P-Optimal CSP Solvers Applied to Software Security P-Optimal CSP Solvers Applied to Software Security Ahmed Abdel Mohsen and Karl Lieberherr College of.
Advertisements

Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Max Cut Problem Daniel Natapov.
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/30 SAT Solver Changki PSWLAB SAT Solver Daniel Kroening, Ofer Strichman.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
The Theory of NP-Completeness
Algorithms and Data Review Fall 2010 Karl Lieberherr 1CS 4800 Fall /7/2010.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
08/1 Foundations of AI 8. Satisfiability and Model Construction Davis-Putnam, Phase Transitions, GSAT Wolfram Burgard and Bernhard Nebel.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Constraint Satisfaction Problems
GRASP-an efficient SAT solver Pankaj Chauhan. 6/19/ : GRASP and Chaff2 What is SAT? Given a propositional formula in CNF, find an assignment.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
Complexity 19-1 Complexity Andrei Bulatov More Probabilistic Algorithms.
NP-complete and NP-hard problems
Methods of Proof Chapter 7, second half.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
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.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
T Ball (1 Relation) What Your Robots Do Karl Lieberherr CSU 670 Spring 2009.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Software Development Developing a MAX-CSP Solver Karl Lieberherr.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
SDG Mittagsseminar1 Using Artificial Markets to Teach Computer Science Through Trading Robots How to get students interested in algorithms, combinatorial.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
SDG Mittagsseminar1 Using Artificial Markets to Teach Computer Science Through Trading Robots How to get students interested in algorithms, combinatorial.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
UBC March The Evergreen Project: The Promise of Polynomials to Boost CSP/SAT Techniques* Karl J. Lieberherr Northeastern University Boston joint.
UBC March The Evergreen Project: How To Learn From Mistakes Caused by Blurry Vision in MAX-CSP Solving Karl J. Lieberherr Northeastern University.
UBC March The Evergreen Project: The Promise of Polynomials to Boost CSP/SAT Solvers* Karl J. Lieberherr Northeastern University Boston joint work.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
UBC March The Evergreen Project: How To Learn From Mistakes Caused by Blurry Vision in MAX-CSP Solving Karl J. Lieberherr Northeastern University.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Solving Non-linear Arithmetic Dejan Jovanovic and Leonadro de Moura Presented by Boris Trayvas.
First-Order Logic and Inductive Logic Programming.
Linear Program Set Cover. Given a universe U of n elements, a collection of subsets of U, S = {S 1,…, S k }, and a cost function c: S → Q +. Find a minimum.
UBC March The Evergreen Project: The Promise of Polynomials to Boost CSP/SAT Techniques* Karl J. Lieberherr Northeastern University Boston joint.
Managing Software Development Karl Lieberherr. Manage a significant program from requirements to implementation We wrote requirements. We wrote several.
Review of Propositional Logic Syntax
Maximum Density Still Life Symmetries and Lazy Clause Generation Geoffrey Chu, Maria Garcia de la Banda, Chris Mears, Peter J. Stuckey.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
Heuristics for Efficient SAT Solving As implemented in GRASP, Chaff and GSAT.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
UBC March The Evergreen Project: The Promise of Polynomials to Boost CSP/SAT Solvers* Karl J. Lieberherr Northeastern University Boston joint work.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
SAT Solving As implemented in - DPLL solvers: GRASP, Chaff and
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
Non-LP-Based Approximation Algorithms Fabrizio Grandoni IDSIA
UBC March The Evergreen Project: The Promise of Polynomials to Boost CSP/SAT Solvers* Karl J. Lieberherr Northeastern University Boston joint work.
Dana Nau: Lecture slides for Automated Planning Licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License:
Approximation Algorithms based on linear programming.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
Chapter 10 NP-Complete Problems.
First-Order Logic and Inductive Logic Programming
ICS 353: Design and Analysis of Algorithms
Inside Microsoft Research
Methods of Proof Chapter 7, second half.
Instructor: Aaron Roth
GRASP-an efficient SAT solver
Presentation transcript:

PhD March The Evergreen Project: How To Learn From Mistakes Caused by Blurry Vision in MAX-CSP Solving Karl J. Lieberherr Northeastern University Boston joint work with Ahmed Abdelmeged, Christine Hang and Daniel Rinehart

PhD March Where we are Introduction Look-forward Look-backward Packed truth tables SPOT: how to use the look-ahead polynomials (look-forward) together with superresolution (look-backward).

PhD March Problem Snapshot SAT: classic problem in complexity theory SAT & MAX-SAT Solvers: working on CNFs (a multi-set of disjunctions). CSP: constraint satisfaction problem –Each constraint uses a Boolean relation. –e.g. a Boolean relation 1in3(x y z) is satisfied iff exactly one of its parameters is true. CSP & MAX-CSP Solvers: working on CSP instances (a multi-set of constraints).

PhD March Introduction Boolean MAX-CSP(G) for rank d, G = set of relations of rank d –Input Input = Bag of Constraint Constraint = Relation + Set of Variable Relation = int. // Relation number < 2 ^ (2 ^ d) in G Variable = int –Output (0,1) assignment to variables which maximizes the number of satisfied constraints. Example Input: G = {22} of rank 3 –22: –22: –22: in3 has number 22 M = {1 !2 !3 !4} satisfies all

PhD March Variation MAX-CSP(G,f): Given a MAX-CSP(G) instance expressed in n variables which may assume only the values 0 or 1, find an assignment to the n variables which satisfies at least the fraction f of the constraints. Example: G = {22} of rank 3 MAX-CSP({22},f): 22: : : :

PhD March Our Approach Superresolution & P-Optimality Based MAX-CSP Solver Highlights –Look Forward (in Abstract Representation) –Look Backward (in Transition System) –Packed Truth Tables (in Intermediate Representation)

PhD March Where we are Introduction Look-forward Look-backward Packed truth tables SPOT: how to use the look-ahead polynomials together with superresolution.

PhD March Look Forward Why? –To make informed decisions How? –Abstract representation based on look-ahead polynomials

PhD March Look-ahead Polynomial (Intuition) The look-ahead polynomial computes the expected fraction of satisfied constraints among all random assignments that are produced with bias p.

PhD March Consider an instance: 40 variables, 1000 constraints (1in3) 1, …,40 22: : Abstract representation: reduce the instance to look-ahead poly. 3p(1-p) 2

PhD March p(1-p) 2 for MAX-CSP({22})

PhD March Look-ahead Polynomial (Definition) F is a MAX-CSP(G) instance. N is an arbitrary assignment. The look-ahead polynomial la F,N (p) computes the expected fraction of satisfied constraints of F when each variable in N is flipped with probability p.

PhD March The general case MAX-CSP(G) G = {R 1, … }, t R (F) = fraction of constraints in F that use R. x = p

PhD March

PhD March Look-ahead Polynomial in Action Focus on purely mathematical question first Algorithmic solution will follow Mathematical question: Given a MAX- CSP(G) instance. For which fractions f is there always an assignment satisfying fraction f of the constraints? In which constraint systems is it impossible to satisfy many constraints?

PhD March Remember? MAX-CSP(G,f): Given a MAX-CSP(G) instance expressed in n variables which may assume only the values 0 or 1, find an assignment to the n variables which satisfies at least the fraction f of the constraints. Example: G = {22} of rank 3 MAX-CSP({22},f): 22: : : :

PhD March Simple example MAX-CSP({22},f): For f <= u: problem has always a solution For f = u +  : problem has not always a solution,    u  critical transition point always (fluid) not always (solid)

PhD March The Magic Number u = 4/9

PhD March p(1-p) 2 for MAX-CSP({22})

PhD March Produce the Magic Number Use an optimally biased coin –1/3 in this case In general: min max problem

PhD March General Dichotomy Theorem MAX-CSP(G,f): For each finite set G of relations there exists an algebraic number t G For f <= t G : MAX-CSP(G,f) has polynomial solution For f = t G +  : MAX-CSP(G,f) is NP-complete,   t G  critical transition point easy (fluid) hard (solid) due to Lieberherr/Specker polynomial solution: Use optimally biased coin. Derandomize. P-Optimal. 

PhD March Observations The look-ahead polynomial look-forward approach has not been used in state-of- the-art MAX-SAT and Boolean MAX-CSP solvers. Often a fair coin is used. The optimally biased coin is often significantly better.

PhD March

PhD March N 0 ={!v 1,!v 2,!v 3,!v 4 }

PhD March N 0 ‘ ={v 1,!v 2,!v 3,!v 4 }

PhD March SAT Rank 2 example 9 constraints 14 : : : : : : : : : : 1 2 = or(1 2) 7: 1 3 = or(!1 !3) What is the look-ahead polynomial?

PhD March appmean = lookahead is an approximation of the true mean Blurry vision What do we learn from the abstract representation? set 1/3 of the variables to true (maximize). the best assignment will satisfy at least 7/9 constraints. very useful but the vision is blurred in the “middle”. excellent peripheral vision

PhD March Where we are Introduction Look-forward Look-back Packed truth tables SPOT: how to use the look-ahead polynomials

PhD March Look Backward Why? –to avoid past mistakes How? –Transition system based on superresolution

PhD March Observation Optimally biased coin technique based on look-ahead polynomials is “best-possible”. If we could improve it by a trillionth in polynomial time, then P=NP. We improve it now by learning new constraints that will influence the polynomial.

PhD March Clause Learning Let’s go beyond what an optimally biased coin guarantees! Goal: satisfy the maximum number of constraints. Approach: Superresolution. –When to apply: number of constraints guaranteed to be unsatisfied doesn’t decrease A mistake is made. –Who to blame: the decision literals They are the culprits. –How to penalize: add the disjunctions of their negations as a superresolvent The gang of culprits is watched.

PhD March Transition Rules Semi-Superresolution (SSR): NewSR = V (¬k), where k M d M || F || SR || N → M || F || SR, NewSR || N if unsat(M,SR) > 0 or unsat(M,F) ≥ unsat(N,F).

PhD March Algorithm plan start with an arbitrary assignment N. while (proof incomplete) { –try to improve N by creating new assignment from scratch using optimally biased coin to flip the assignments; success: Update N; failure: learn a new constraint that will prevent same mistake and will “improve” the polynomial. }

PhD March

PhD March

PhD March Properties of TS TS finds the maximum in a finite number of steps. It creates a proof that we indeed found the maximum.

PhD March Optimized Semi-Superresolution Not all decision literals may be responsible for the “mistake”. Want to find a minimal superresolvent so that deleting one literal would destroy the superresolvent property. Can be implemented by a traversal back the implication graph that is built as part of unit propagation.

PhD March Where we are Introduction Look-forward Look-back Packed Truth Tables SPOT: how to use the look-ahead polynomials

PhD March Requirements for Packed Truth Tables The look-ahead polynomial can be computed efficiently. Requires efficient truth table analysis. Reduction of an instance must be efficient. Efficiently compute the forced variables. Each relation has a unique representation.

PhD March Packed Truth Tables

PhD March RelationI: implemented by bitwise operations int isForced(int variablePosition) boolean isIrrelevant(int variablePosition) int nMap(int variablePosition) int numberOfRelevantVariables() int q(int s) int reduce(int variablePosition, int value) int rename(int permutationSemantics, int... permutation)

PhD March Where we are Introduction Look-forward Look-back Packed truth tables SPOT: how to use the look-ahead polynomials with superresolution

PhD March Using the look-ahead polynomials Value Ordering –Decide: how to set the variable Variable Ordering –Which variable to set next

PhD March There is hope that the look-ahead polynomials are useful

PhD March What is new? New: Packed Truth Tables New: Superresolution for MAX-CSP New: Integration of look-ahead polynomials with superresolution Old: Superresolution for SAT (1977) Old: Look-ahead polynomials (1983)

PhD March Future work Exploring best combination of look-forward and look-back techniques. Find all maximum-assignments or estimate their number. Robustness of maximum assignments. Are our MAX-CSP solvers useful for reasoning about biological pathways?

PhD March Conclusions Presented SPOT, a family of MAX-CSP solvers based on look-ahead polynomials and non-chronological backtracking. SPOT has a desirable property: P-optimal. Preliminary experimental results are encouraging.

PhD March end for now

PhD March Rank 2 example 14 : : : : : : : : : 4 6 0

PhD March appmean is an approximation of the true mean

PhD March

PhD March Transition Manager

PhD March

PhD March MAX-CSP: Superresolution and P-Optimality Karl J. Lieberherr Northeastern University Boston joint work with Ahmed Abdelmeged, Christine Hang and Daniel Rinehart

PhD March

PhD March Binomial Distribution

PhD March

PhD March Example x1 + x2 + x3 = 1 x1 + x2 + + x4 = 1 can satisfy 6/7 x1 + x3 + x4 = 1 x1 + x2 + + x5 = 1 x1 + x3 + x5 = 1 x2 + x3 + x5 =1

PhD March maximize 3x(1-x) 2

PhD March Organization of Solver look backlook forward

PhD March Transition Rules Unit-Propagation (UP): M || F || SR || N → Mk || F || SR || N if k is undefined in M, and unsat (M¬k,SR) > 0 or unsat(M¬k,F) ≥ unsat(N,F).

PhD March Transition Rules Decide (D): M || F || SR || N → Mk d || F || SR || N if k is undefined in M, and v(k) occurs in some constraint of F.

PhD March Transition Rules Update: M || F || SR || N → M || F || SR || M if M is complete, and unsat(M,F) < unsat(N,F).

PhD March Transition Rules Restart: M || F || SR || N → { } || F || SR || N

PhD March Transition Rules Finale: M || F || SR || N → M || F || SR || N if Φ SR or unsat(N,F) = 0.

PhD March Transition Rules Semi-Superresolution (SSR): NewSR = V (¬k), where k M d M || F || SR || N → M || F || SR, NewSR || N if unsat(M,SR) > 0 or unsat(M,F) ≥ unsat(N,F).

PhD March Transition Rules

PhD March Transition Rules (cont.)

PhD March Transition Rules Semi-Superresolution (SSR): NewSR = V (¬k), where k M d M || F || SR || N → M || F || SR, NewSR || N if unsat(M,SR) > 0 or unsat(M,F) ≥ unsat(N,F).

PhD March Transition Rules Semi-Superresolution (SSR): NewSR = V (¬k), where k M d M || F || SR || N → M || F || SR, NewSR || N if unsat(M,SR) > 0 or unsat(M,F) ≥ unsat(N,F).

PhD March Transition Rules Semi-Superresolution (SSR): NewSR = V (¬k), where kєM’ subset M d M || F || SR || N → M || F || SR, NewSR || N if mistake(M) and UP*(reduce(F,A(NewSR)))

PhD March Our Approach Superresolution & P-Optimality Based MAX-CSP Solver Highlights –Optimally Biased Coin (in Abstract Representation) –Clause Learning (in Transition System) –Bitwise Relation Reduction (in Intermediate Representation)

PhD March Clause Learning Let’s go beyond what an optimally biased coin guarantees! Goal: satisfy the maximum number of constraints. Approach: Superresolution. –When to apply: number of constraints guaranteed to be unsatisfied doesn’t decrease A mistake is made. –Who to blame: the decision literals They are the culprits. –How to penalize: add the disjunctions of their negations as a superresolvent The gang of culprits is watched.

PhD March Sudoku