290 likes | 422 Views
Localizing & Bolstering Constraint Propagation in a Tree Decomposition. Shant Karakashian , Robert Woodward & Berthe Y. Choueiry Paper & poster at AAAI 2013 PhD thesis of Shant Karakashian , ConSystLab , May 2013 Acknowledgments: Experiments conducted at UNL’s Holland Computing Center
E N D
Localizing & Bolstering Constraint Propagation in a Tree Decomposition ShantKarakashian, Robert Woodward & Berthe Y. Choueiry Paper & poster at AAAI 2013 PhD thesis of ShantKarakashian, ConSystLab, May 2013 Acknowledgments: Experiments conducted at UNL’s Holland Computing Center NSF Award RI-111795 CoCoMeet--Nov 8, 2013
Outline • Introduction & background information • Key ideas • Localize consistency to clusters of a tree decomposition • Bolster propagation at separators • Evaluation • Theoretical: Comparing resulting consistency properties • Empirical: Solving CSPs in a backtrack-free manner • Conclusions & future work • Robert’s RNIC on binary CSPs • Summary of contributions of Shant’s thesis CoCoMeet--Nov 8, 2013
Introduction • One tractabilityconditionlinks [Freuder 82] • Consistency level to • Width of the constraint network, a structural parameter • Catch 22 • Enforcing higher-levels of consistency may require adding constraints, which increases the width • Computing treewidth(≡ induced width)is in NP-hard • Goal • Exploit above condition to achieve practical tractability CoCoMeet--Nov 8, 2013
Our Approach • Robert discussed consistency properties that • Preserve the structure of a problem instance • Enforce a (parameterized) consistency level • Exploit a tree decomposition • Localize application of the consistency algorithm • Steer constraint propagation along the branches of the tree • Add redundant constraints at separators to enhance propagation CoCoMeet--Nov 8, 2013
Tree Decomposition C1 {A,B,C,E} , {R2,R3} C3 C2 {A,E,F},{R1} {A,B,D},{R3,R5} D C4 • A tree decomposition: 〈T,𝝌,𝜓〉 • T: a tree of clusters • 𝝌: maps variables to clusters • 𝜓: maps constraints to clusters • Conditions • Each constraint appears in at least one cluster with all the variables in its scope • For every variable, the clusters where the variable appears induce a connected subtree R4 R5 {A,D,G},{R4} G R3 A C B F R1 R2 E 𝝌(C1) 𝜓(C1) Hypergraph Tree decomposition CoCoMeet--Nov 8, 2013
Tree Decomposition: Separators • A separator of two adjacent clusters is the set of variables associated to both clusters • Width of a decomposition/network • Treewidth = maximum number of variables in clusters - 1 C1 C C1 C2 E {A,B,C,E},{R2,R3} B C3 C3 C2 A F {A,E,F},{R1} {A,B,D},{R3,R5} D C4 C4 G {A,D,G},{R4} CoCoMeet--Nov 8, 2013
Relational Consistency R(∗,m)C [Karakashian+ AAAI 10] • A CSP is R(∗,m)C iff • Every tuple in a relation can be extended • to the variables in the scope of any (m-1) other relations • in an assignment satisfying all m relations simultaneously • R(∗,m)C ≡ Every set of m relations is minimal ∀ tuple ..… ∀ relation ∀ m-1 relations CoCoMeet--Nov 8, 2013
Characterizing R(*,m)C [Jégou 89] • GAC [Waltz 75] • maxRPWC[Bessiere+ 08] • RmC: Relational m Consistency [Dechter+ 97] R2C R3C R4C RmC R(∗,3)C R(∗,4)C R(∗,m)C R(∗,2)C wR(∗,2)C GAC maxRPWC wR(∗,3)C wR(∗,4)C wR(∗,m)C CoCoMeet--Nov 8, 2013
Localize Consistency • Restricting R(∗,m)C to clusters: cl-R(∗,m)C • Localization cl-R(*,m)C • Fewer combinations of m relations • Reduces the enforced consistency level CoCoMeet--Nov 8, 2013
Characterizing cl-R(∗,m)C RmC R2C R3C R4C R(∗,3)C R(∗,4)C R(∗,m)C R(∗,2)C ≡ wR(∗,2)C maxRPWC wR(∗,3)C wR(∗,4)C wR(∗,m)C • GAC [Waltz 75] • maxRPWC[Bessiere+ 08] • RmC: Relational m Consistency [Dechter+ 97] GAC cl-R(∗,2)C cl-R(∗,3)C cl-R(∗,4)C cl-R(∗,m)C cl-wR(∗,2)C cl-wR(∗,3)C cl-wR(∗,4)C cl-wR(∗,m)C CoCoMeet--Nov 8, 2013
Communication Between Clusters • Two clusters communicate via their separator • Constraints common to the two clusters • Domains of variables common to the two clusters E R2 R1 R3 R4 A D R4 B A D C B A D C R6 R5 R7 CoCoMeet--Nov 8, 2013 F
Bolstering Propagation at Separators • For perfect communication between clusters • Ideally, add unique constraint • Space overhead, major bottleneck • Enhance propagation by bolstering • Projection of existing constraints • Adding binary constraints • Adding clique constraints E R2 R1 R3 B A D C Rsep R6 R5 R7 F R4 CoCoMeet--Nov 8, 2013
Bolstering Schemas: Approximate Unique Separator Constraint E Ry R3 D C Ra Rx E E E E E A A D D B B C C R2 R1 R3 R2 R1 Ry Ra R4 B A D C B A D C B A D C B B A C R3’ R6 R5 R7 R’3 R’3 R6 R5 Rx F F F F F Projection cl+proj-R(*,m)C Binary constraints cl+bin-R(*,m)C Clique constraints cl+clq-R(*,m)C CoCoMeet--Nov 8, 2013
Resulting Consistency Properties cl+clq-R(∗,2)C cl+clq-R(∗,3)C cl+clq-R(∗,4)C cl+clq-R(∗,|ψ(cli)|)C cl+bin-R(∗,3)C cl+bin-R(∗,4)C cl+bin-R(∗,|ψ(cli)|)C cl+bin-R(∗,2)C cl+proj-R(∗,2)C R(∗,2)C R(∗,4)C cl+proj-R(∗,3)C R(∗,3)C [Bessiere+ 2008] cl+proj-R(∗,4)C cl+proj-R(∗,|ψ(cli)|)C maxRPWC GAC cl-R(∗,2)C cl-R(∗,3)C cl-R(∗,4)C cl-R(∗,|ψ(cli)|)C CoCoMeet--Nov 8, 2013
Experiments • Domain-based filtering • GAC • maxRPWC • Relation-based filtering • Global: wR(*,m)C for m=2,3,4 • Local: cl-wR(*,m)C m=2,3,4 and cl-R(*,|ψ(cli)|)C • Bolstering • projection • binary • clique • Backtrack search, full-lookahead, first solution • Reported • Number of instances Completed, BT-free, Min(#NV), Fastest • Cumulative count of BT-Free as a function of treewidth CoCoMeet--Nov 8, 2013
Characteristics of Benchmark Data • UNSAT: 479 instances • SAT: 200 instances CoCoMeet--Nov 8, 2013
Empirical Evaluations CoCoMeet--Nov 8, 2013
Cumulative Count of Instances Solved w/o Backtracking UNSAT SAT Acknowledgment: Charts suggested by RinaDechter CoCoMeet--Nov 8, 2013
Conclusions & Future Work • Adapted R(∗,m)C to a tree decomposition of the CSP • Localizing R(∗,m)C to the clusters • Bolstering separators to strengthen the enforced consistency • Directions for future work • R(∗,m)C on non-table constraints via domain filtering • Automating the selection of a consistency property and of a bolstering scheme • On clusters/seperators • During search • Modify the structure of a tree decomposition to improve performance (e.g., merging clusters [Fattah & Dechter 1996]) • Improve our algorithms for R(∗,m)C CoCoMeet--Nov 8, 2013
Thank You for Your Attention CoCoMeet--Nov 8, 2013
Shant’s Thesis • Question • Practical tractability of CSPs exploiting the condition linking • the level of consistency • to the width of the constraint graph • Solution • Introduced a parameterized consistency property R(∗,m)C • Designed algorithms for implementing it • PerTupleand AllSol • Hybrid algorithms • Adapted R(∗,m)C to a tree decomposition of the CSP • Localizing R(∗,m)C to the clusters • Strategies for guiding propagation along the structure • Bolstering separators to strengthen the enforced consistency • Improved the BTD algorithm for solution counting, WitnessBTD • Two incidental results in appendices CoCoMeet--Nov 8, 2013
Algorithms for Enforcing R(∗,m)C • PerTuple • For each tuple find a solution for the variables in the m-1 relations • Many satisfiability searches • Effective when there are many solutions • Each search is quick & easy • AllSol • Find all solutions of problem induced by mrelations, & keep their tuples • A single exhaustive search • Effective when there are few or no solutions • Hybrid Solvers (portfolio based)[+Scott] ti t3 t2 t1 CoCoMeet--Nov 8, 2013
Hybrid Solver • Choose between PerTuple & AllSol • Parameters to characterize the problem • κpredicts if instance is at the phase transition • relLinkage approximates the likelihood of a tuple at the overlap two relations to appear in a solution • Classifier built using Machine Learning • C4.5 • Random Forests CoCoMeet--Nov 8, 2013
Empirical Evaluations: Hybrid Task: compute the minimal CSP CoCoMeet--Nov 8, 2013
Structure-Guided Propagation • Orderings • Random: FIFO/arbitrary • Static, Priority, Dynamic: Leaves⟷root • Structure-based propagation • Static • Order of MaxCliques • Priority: • Process a cluster once in each direction • Select most significantly filtered cluster • Dynamic • Similar to Priority • But may process ‘active’ clusters more than once C1 A,B,C,N C2 A,I,N Root C3 I,M,N C4 A,I,K C5 I,J,K C6 A,K,L Leaves C1 C7 B,C,D,H {A,B,C,N},{R1} B,D,F,H C8 B,D,E,F C9 C7 C2 F,G,H C10 MaxCliques C3 C4 C8 C5 C6 C10 C9 CoCoMeet--Nov 8, 2013
Solution Counting • BTD is used to count the number of solutions [Favier+ 09] • Using Count algorithm on trees [Dechter+ 87] • Witness-based solution counting • Find a witness solution before counting ap Cp wasted no solution CoCoMeet--Nov 8, 2013
Empirical Evaluations • Task: Count solutions • BTD versus WitnessBTD • GAC: Pre-processing & full look-ahead CoCoMeet--Nov 8, 2013
Empirical Evaluations: WitnessBTD CoCoMeet--Nov 8, 2013
Generating a Tree Decomposition • Triangulate the primal graph using min-fill • Identify the maximal cliques using MaxCliques • Connect the clusters using JoinTree • Add constraints to clusters where their scopes appear C1 A,B,C,N C2 A,I,N R5 R7 R1 C3 I,M,N N A B C C4 A,I,K C5 I,J,K R3 D C6 A,K,L R6 I J K C1 C7 B,C,D,H E C7 C {A,B,C,N},{R1} C1 N B,D,F,H C8 C2 M L R2 C8 Elimination order R4 H G F B,D,E,F C3 C9 B D C7 C2 A F,G,H C10 I M C5 K F H C3 C4 C8 C6 L J C4 C5 C6 C10 C9 C10 E G C9 JoinTree min-fill MaxCliques CoCoMeet--Nov 8, 2013