Download presentation

Presentation is loading. Please wait.

Published byAshley Wheeler Modified over 2 years ago

1
CSP-SAT Workshop, June 2011 IBM Watson Research Center, 2011 © 2011 IBM Corporation A General Nogood-Learning Framework for Pseudo-Boolean Multi-Valued SAT* Siddhartha JainBrown University Ashish SabharwalIBM Watson Meinolf SellmannIBM Watson * to appear at AAAI-2011

2
IBM Research © 2011 IBM Corporation SAT and CSP/CP Solvers [complete search] CP Solvers: –work at a high level: multi-valued variables, linear inequalities, element constraints, global constraint (knapsack, alldiff, …) –have access to problem structure and specialized inference algorithms! SAT: –problem crushed down to one, fixed, simple input format: CNF, Boolean variables, clauses –very simple inference at each node: unit propagation –yet, translating CSPs to SAT can be extremely powerful! E.g., SUGAR (winner of CSP Competitions 2008 & 2009) How do SAT solvers even come close to competing with CP? A key contributor: efficient and powerful “nogood learning” 2June 18, 2011 A General Nogood-Learning Framework

3
IBM Research © 2011 IBM Corporation 3June 18, 2011 A General Nogood-Learning Framework SAT Solvers as Search Engines Systematic SAT solvers have become really efficient at searching fast and learning from “mistakes” E.g., on an IBM model checking instance from SAT Race 2006, with ~170k variables, 725k clauses, solvers such as MiniSat and RSat roughly: –Make2000-5000decisions/second –Deduce600-1000 conflicts/second –Learn600-1000clauses/second (#clauses grows rapidly) –Restartevery 1-2 seconds (aggressive restarts)

4
IBM Research © 2011 IBM Corporation An Interesting Line of Work: SAT-X Hybrids Goal: try to bring more structure to SAT and/or bring SAT-style techniques to CSP solvers Examples: –Pseudo-Boolean solvers: inequalities over binary variables –SAT Module Theories (SMT): “attach” a theory T to a SAT solver –Lazy clause generation: record clausal reasons for domain changes in a CP solver –Multi-valued SAT: incorporate multi-valued semantics into SAT preserve the benefits of SAT solvers in a more general context strengthen unit propagation: unit implication variables (UIV) strengthen nogood-learning! [Jain-O’Mahony-Sellmann, CP-2010] 4June 18, 2011 A General Nogood-Learning Framework Starting point for this work

5
IBM Research © 2011 IBM Corporation Conflict Analysis: Example Consider a CSP with 5 variables: X 1, X 2, X 4 {1, 2, 3} X 3 {1, …, 7} X 5 {1, 2} Pure SAT encoding: variables x 11, x 12, x 13, x 21, x 22, x 23, x 31, …, x 37, x 51, x 52 What happens when we set X 1 = 1, X 2 = 2, X 3 = 1? 5June 18, 2011 A General Nogood-Learning Framework x 11 = true x 22 = true x 31 = true x 51 = true C5 No more propagation, no conflict… really?

6
IBM Research © 2011 IBM Corporation Conflict Analysis: Incorporating UIVs Unit implication variable (UIV): a multi-valued clause is “unit” as soon as all unassigned “literals” in it regard the same MV variable SAT encoding, stronger propagation using UIVs: 6June 18, 2011 A General Nogood-Learning Framework x 11 = true x 22 = true x 31 = truex 51 = true x 41 ≠ true x 32 ≠ true C5 C2 C1 x 43 = true C4 x 42 = true C3 conflict

7
IBM Research © 2011 IBM Corporation What Shall We Learn? Not a good idea to set x 41 ≠ true and x 31 = true learn the nogood (x 41 = true || x 31 = false) Problem? When we backtrack and set, say, X 3 to anything in {2, 3, 4, 5}, we end up performing exactly the same analysis again and again! Solution: represent conflict graph nodes as variable inequations only 7June 18, 2011 A General Nogood-Learning Framework x 11 = true x 22 = true x 31 = truex 51 = true x 41 ≠ true x 32 ≠ true C5 C2 C1 x 43 = true C4 x 42 = true C3 conflict

8
IBM Research © 2011 IBM Corporation CMVSAT-1 Use UIV rather than UIP Use variable inequations as the core representation: X 1 = 1, X 2 = 2, X 3 = 1 represented as X 1 ≠ 2, X 1 ≠ 3, … finer granularity reasoning! X 3 doesn’t necessarily need to be 1 for a conflict, it just cannot be 6 or 7 Stronger learned multi-valued clause: (X 4 = 1 || X 3 = 6 || X 3 = 7) –Upon backtracking, we immediately infer X 3 ≠ 1, 2, 3, 4, 5 ! 8June 18, 2011 A General Nogood-Learning Framework

9
IBM Research © 2011 IBM Corporation This Work: Generalize This Framework Core representation in implication graph –CMVSAT-1:variable inequations (X 4 ≠ 1) –in general:primitive constraints of the solver –example:linear inequalities (Y 2 ≤ 5, Y 3 ≥ 1) Constraints –CMVSAT-1:multi-valued clauses (X 4 = 1 || X 3 = 6 || X 3 = 7) –in general:secondary constraints supported by the solver –example:(X 1 = true || Y 3 ≤ 4 || X 3 = Michigan) Propagation of a secondary constraint C s : entailment of a new primitive constraint from C s and known primitives 9June 18, 2011 A General Nogood-Learning Framework

10
IBM Research © 2011 IBM Corporation This Work: Generalize This Framework Learned nogoods –CMVSAT-1:multi-valued clauses (X 4 = 1 || X 3 = 6 || X 3 = 7) –in general:disjunctions of negations of primitives (with certain desirable properties) –example:(X 1 = true || Y 3 ≤ 4 || X 3 = Michigan) Desirable properties of nogoods? –The “unit” part of the learned nogood that is implied upon backtracking must be representable as a set of primitives! –E.g., if Y 3 is meant to become unit upon backtracking, then (X 1 = true || Y 3 ≤ 4 || Y 3 ≥ 6 || X 3 = Michigan) is NOT desirable cannot represent Y 3 ≤ 4 || Y 3 ≥ 6 as a conjunction of primitives upon backtracking, cannot propagate the learned nogood 10June 18, 2011 A General Nogood-Learning Framework

11
IBM Research © 2011 IBM Corporation Sufficient Conditions 1.System distinguishes between primitive and secondary constraints 2.Secondary constraint propagators: –Entail new primitive constraints –Efficiently provide a set of primitives constraints sufficient for the entailment 3.Can efficiently detect conflicting sets of primitives –and represent the disjunction of their negations (the “nogood”) as a secondary constraint 4.Certain sets of negated primitives (e.g., those arising from propagation upon backtracking) succinctly representable as a set of primitives 5.Branching executed as the addition of one or more* primitives Under these conditions, we can efficiently learn strong nogoods! 11June 18, 2011 A General Nogood-Learning Framework [details in AAAI-2011 paper]

12
IBM Research © 2011 IBM Corporation Abstract Implication Graph (under sufficient conditions) 12June 18, 2011 A General Nogood-Learning Framework C p : primary constraints branched upon or entailed at various decision levels Learned nogood: disjunction of negations of primitives in shaded nodes

13
IBM Research © 2011 IBM Corporation General Framework: Example X 1 {true, false} X 3 {NY, TX, FL, CA} X 5 {r, g, b} X 2, X 4, X 6, X 7 {1, …, 100} Branch on X 1 ≠ true, X 2 ≤ 50: Learn: (X 3 = FL || X 4 ≥ 31) 13June 18, 2011 A General Nogood-Learning Framework Notes: 1.The part of the nogood that is unit upon backtracking need not always regard the same variable! (e.g., when X ≤ Y is primitive) 2.Neither is regarding the same variable sufficient for being a valid nogood! (e.g., X ≤ 4 || X ≥ 11 wouldn’t be representable)

14
IBM Research © 2011 IBM Corporation Empirical Evaluation Ideas implemented in CMVSAT-2 Currently supported: –usual domain variables, and range variables –linear inequalities, e.g. (X 1 + 5 X 2 – 13 X 3 ≤ 6) –disjunctions of equations and range constraints e.g. (X 1 [5…60] || X 2 [37…74] || X 5 = b || X 10 ≤ 15) Comparison against: –SAT solver:Minisat[Een-Sorensson 2004, version 2.2.0] –CSP solver:Mistral[Hebrard 2008] –MIP solver:SCIP[Achterberg 2004, version 2.0.1] Encodings generated using Numberjack [Hebrard et al 2010, version 0.1.10-11-24] 14June 18, 2011 A General Nogood-Learning Framework

15
IBM Research © 2011 IBM Corporation Empirical Evaluation Benchmark domains (100 instances of each) –QWH-C: weighted quasi-group with holes / Latin square completion random cost c ik {1, …, 10} assigned to cell (i,k) cost constraint: sum ik (c ik X ik ) ≤ (sum of all costs) / 2 size 25 x 25, 40% filled entries, all satisfiable –MSP-3: market split problem notoriously hard for constraint solvers partition 20 weighted items into 3 equal sets, 10% satisfiable –NQUEENS-W: weighted n-queens, 30x30 average weight of occupied cells ≥ 70% of weight max size 30 x 30, random weights {1,…,10} 15June 18, 2011 A General Nogood-Learning Framework

16
IBM Research © 2011 IBM Corporation Empirical Evaluation: Results CMVSAT-2 shows good performance across a variety of domains –Solved all 300 instances in < 4 sec on average MiniSat not suitable for domains like QWH-C –Encoding (even “compact” ones like in Sugar) too large to generate or solve –20x slower on MSP-3 Mistral explores a much larger search space than needed –Lack of nogood learning becomes a bottleneck: e.g.: 3M nodes for QWH-C (36% solved), compared to 231 nodes for CMVSAT-2 SCIP takes 100x longer on QWH-c, 10x longer on NQUEENS-W 16June 18, 2011 A General Nogood-Learning Framework SAT solverCSP solverMIP solver

17
IBM Research © 2011 IBM Corporation Summary A generalized framework for SAT-style nogood-learning –extends CMVSAT-1 –low-overhead process, retains efficiency of SAT solvers –sufficient conditions: primitive constraints secondary constraints, propagation as entailment of primitives valid cutsets in conflict graphs: facilitate propagation upon backtracking other efficiency / representation criteria CMVSAT-2: robust performance across a variety of problem domains –compared to a SAT solver, a CSP solver, a MIP solver –open: more extensive evaluation and comparison against, e.g., lazy clause generation, pseudo-Boolean solvers, SMT solvers –nonetheless, a promising and fruitful direction! 17June 18, 2011 A General Nogood-Learning Framework

Similar presentations

OK

Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…

Knowledge Representation II (Inference in Propositional Logic) CSE 473 Continued…

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on earthquake in japan Ppt on road accidents in south Ppt on self awareness and values Ppt on op amp circuits simulations Download ppt on islands of india Ppt on branches of physics Ppt on three types of computer languages Ppt on total parenteral nutrition solutions Presentations open ppt online Ppt on chromosomes and genes middle school