Download presentation
Presentation is loading. Please wait.
Published byAllen Dwight Cobb Modified over 9 years ago
1
William Lam March 20, 2013 (with slides from the IJCAI-09 tutorial on Combinatorial Optimization for Graphical Models) Discrete Optimization via Branch and Bound with Soft Arc Consistency
2
Introduction Bayes nets/Markov random fields/factor graphs Most Probable Explanation (MPE), Maximum a Posteriori (MAP): maximizing probability Weighted CSP/Cost function network Minimum cost Problems are reducible to each other 2
3
3 X1X1 X3X3 X5X5 X4X4 X2X2 Select a variable Search Basic Step: Conditioning
4
4 X1X1 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 X3X3 X5X5 X4X4 X2X2 …... X 1 a X 1 b X 1 c Search Basic Step: Conditioning
5
Depth-First Branch and Bound (DFBB) (LB) Lower Bound (UB) Upper Bound If UB then prune Variables under estimation of the best solution in the sub-tree = best solution so far Each node is a subproblem (defined by current conditioning) LB ffff f = f k = k k 5
6
Computing Bounds Static Mini-Bucket heuristics (Kask & Dechter, AIJ’01), (Marinescu & Dechter, IJCAI’05) (with max-marginal matching) (Ihler et al. UAI’12) Dynamic Mini-Bucket heuristics (Marinescu & Dechter, IJCAI’05) Maintaining local consistency (Larrosa & Schiex, AAAI’03), (de Givry et al., IJCAI’05)
7
Local Consistency in Constraint Networks Massive local inference Time efficient (local inference, as mini buckets) Infer only small constraints, added to the network No variable is eliminated Produces an equivalent more explicit problem May detect inconsistency (prune tree search) Arc consistency inference in the scope of 1 constraint 7
8
Arc Consistency (binary CSP) for a constraint c AB and variable A w v v w 0 0 0 0 AB ABc AB vv0 vw0 wv ww AcAcA v0 w c AB + c B Elim B (min) Applied iteratively on all constraint/variables Empty domain => inconsistency 8
9
1 Arc Consistency and Cost Functions for a cost function f AB and a variable A w v v w 0 0 1 0 AB 2 1 ABf AB vv0 vw0 wv2 ww1 AgAgA v0 w1 f AB + f B Elim B (min) EQUIVALENCE LOST 9
10
1 1 2 Subtract from source in order to preserve the problem Equivalence Preserving Transformation Shifting Costs (cost compensation) w v v w 0 0 1 AB 1 0 ABf AB vv0 vw0 wv ww AgAgA v0 w1 1 0 2 1 Elim B 10
11
Complete Inference vs Local Inference Local consistency Combine, eliminate, add & subtract Massive local inference Space/time efficient Preserves equivalence Provides a lb f 11 Complete inference Combine, eliminate, add & forget Systematic inference Exponential time/space Preserves optimum Provides the optimum f
12
Shifting costs from f AB to A Shift(f AB,(A,w),1) Can be reversed (e.g. Shift(f AB,(A,w), -1)) 0 1 Equivalence Preserving Transformation w v v w 0 0 1 AB 1 Arc EPT: shift cost in the scope of 1 cost function Problem structure preserved 12
13
Equivalence Preserving Transformations EPTs may cycle EPTs may lead to different f 0 Which EPTs should we apply? Shift(f AB,(A,b),1) Shift(f A,(),1) Shift(f AB,(B,a),-1) Shift(f AB,(B,a),1) AB ABAB 13
14
Node Consistency (NC * ) For any variable A a, f + f A (a)<k a, f A (a)= 0 Complexity: O(nd) w v v v w w f =f = k = 3 2 2 1 1 1 1 1 0 0 1 A B C 0 0 0 1 4 Shift(f C, ,1)Shift(f A, ,-1);Shift(f A, ,1) (Larrosa, AAAI 2002) 14
15
0 0 Arc Consistency (AC * ) NC * For all f AB a b f AB (a,b)= 0 b is a simple-support complexity: O(n 2 d 3 ) w v v w w f =f = k=4 2 1 1 1 0 0 0 0 1 A B C 1 1 2 Shift(f AC,(C,v),2)Shift(f BC,(B,v),1) Shift(f BC,(B,w),1) Shift(f B, ,1)Shift(f C, ,-2)Shift(f C, ,2) (Larrosa, AAAI 2002) (Schiex, CP 2000) 15
16
Full Arc Consistency (FAC*) NC * For all f AB a b f AB (a,b) + f B (b) = 0 b is a full-support Too strong to enforce
17
1 1 Directional AC (DAC * ) NC * For all f AB (A<B) a b f AB (a,b) + f B (b) = 0 complexity: O(ed 2 ) w v v v w w f =f = k=4 2 2 2 1 1 1 0 0 0 0 A B C A<B<CA<B<C 0 1 1 12 (Cooper, Fuzzy Sets and Systems 2003) Shift(f BC,(C,v),-1) Shift(f BC,(B,v),1)Shift(f BC,(B,w),1) Shift(f B, ,1) Shift(f A, , -2)Shift(f A, , 2) 17
18
DAC lb = Mini-Bucket(2) lb bucket A: bucket E: bucket D: bucket C: bucket B: f(b,e) f(a,d) hE(Ø)hE(Ø) h B (e) h B (d) h D (a) f(a,b)f(b,d) f(c,e)f(a,c) h C (e) lb = lower bound Mini-buckets A BC D E A < E < D < C < B h B (a) DAC provides an equivalent problem: incrementally DAC+NC (value pruning) can improve lb h C (a) 18
19
Other Local Consistencies FDAC* = DAC+AC+NC Stronger lower bound O(end 3 ) Better compromise EDAC* = FDAC+ EAC (existential AC) Even stronger O(ed 2 max{nd, k}) Currently among the best practical choice (Larrosa & Schiex, IJCAI 2003) (Cooper, Fuzzy Sets and Systems 2003) (Larrosa & Schiex, AI 2004) (Cooper & Schiex, AI 2004) (de Givry et al., IJCAI 2005) (Sanchez et al, Constraints 2008) 19
20
2 0 0 0 FDAC* DAC* + AC* For all f AB (A<B) a b f AB (a,b) + f B (b) = 0 For all f AB (A>B) a b f AB (a,b)= 0 w v w w f =f = k=4 2 0 0 A B C A<B<CA<B<C 2 v
21
Existential Arc Consistency (EAC*) Getting closer to FAC* For all f AB a b f A (a) = 0 f AB (a,b) + f B (b) = 0 (A full support in both directions) If a variable A is not EAC, we can enforce full- supports and break NC Leads to increasing lower bound
22
EDAC* FDAC* + EAC* Every value is fully supported in one direction and simply supported in the other (FDAC*) At least one value per variable is fully supported in both directions (EAC*) FDAC* < EDAC* < FAC*
23
FDAC*
25
EDAC*
26
EAC* DAC* AC* NC*
27
Other (Stronger) Consistency Properties Optimal Soft Arc Consistency Finds an optimal set of rational EPTs (Cooper et al., IJCAI’07) (Schlesinger, Kibernetika 1976) Virtual Arc Consistency Finds an improving sequence of rational EPTs (Cooper et al., AAAI’08)
28
Higher Arity Functions Consistency enforcing ignores functions with arity > 2 Must wait until sufficient conditioning reduces function arity to 2 Enhancement: preprocess problem before search Perform EPTs on functions with arity > 2 to generate binary functions ABCf 0006 0013 0109 0115 1004 1012 1107 11110 ABf 003 015 102 117 ACf 003 010 100 110 3 0 4 0 2 0 0 3 0 0 1 0 2 0 0 3
29
Variable/Value Selection Weighted Degree For each constraint, count the number of times an inconsistency is reached during search Variable x i weight is the sum of the weights of all constraints involving x i and another uninstantiated variable (Boussemart et al., ECAI’04) Last conflicts Maintain a set of variables that resulted in a dead end and prioritize testing these first (Lecoutre et al., AI’09) Values: use unary functions as lower bounds
30
Overall Algorithm Input: a cost function network N (preprocessed to enforce consistency) Output: solution cost Initialize: UB = k solve(N): if all domains are empty, return N 0 X = VariableSelectionHeuristic(N) a = argmin N(X) N’ = EnforceConsistency(N| X=a ) if N’ 0 >= UB, N’ = EnforceConsistency(N| X!=a ) // remove a from N.D(X) return UB = min(UB, solve(N’))
31
UAI’08 Competition Results 31
32
UAI’08 Competition Results (II) 32
33
UAI’08 Competition Results (III) 33
34
Software Toulbar2 http://mulcyber.toulouse.inra.fr/gf/project/toulbar 2 http://mulcyber.toulouse.inra.fr/gf/project/toulbar 2 (Open source WCSP, MPE solver in C++) Participated in CP06, CP08, UAI08, UAI10, and PIC11 competitions 34
35
DAOOPT and Toulbar2 DAOOPT (our AOBB-based solver) Bounds computed before search via MBE “Top-down approach”: Variable duplication to reduce cluster size Re-parameterization to enforce consistency between copies of variables (FGLP+JGLP+MBE-MM) (Ihler et al., UAI’12) Fast node expansion Static variable ordering Toulbar2 Bounds incrementally improved during search via SAC “Bottom-up approach”: Ignores larger factors until conditioning reduces their size Re-parameterization directly generates bounds Node expansion speed depends on consistency algorithm Dynamic variable ordering 35
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.