Relaxation-Aware Heuristics for Exact Optimization in ...
Transcript of Relaxation-Aware Heuristics for Exact Optimization in ...
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Relaxation-Aware Heuristics for ExactOptimization in Graphical Models
Fulya Trosser 1, Simon de Givry 1, George Katsirelos 2
1INRA MIA Toulouse
2INRA MIA Paris
5 December 2019
Journee AIGM 2019
1 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Overview
1 Introduction
2 PreliminariesConstraint Satisfaction ProblemWeighted Constraint Satisfaction ProblemLocal Consistency
3 ContributionsVAC-integralityVariable Ordering HeuristicRASPS for UB Computation
4 Numerical Results
5 Future Work
6 References
2 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Introduction
Exact solvers for optimization problems on graphicalmodels (CFN, MRF etc), typically use branch-and-bound.
Two main factors: quality of the bound at each node andbranching heuristics.
Virtual Arc Consistency (VAC) algorithm: high qualitybounds, but at a significant cost
Search NodeInitial UB ComputationLB ComputationBranching Heuristic
3 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Introduction
Branching heuristics ignore the information that VACproduces on the linear relaxation of the problem
Branching heuristic may make decisions that are clearlyineffective
By eliminating these ineffective decisions, we significantlyreduce the size of the branch-and-bound tree.
DIFFICULTEASY
4 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Constraint Satisfaction Problem (CSP)
A Constraint Satisfaction Problem [Cooper and Schiex, 2004]is a triple 〈X ,D,C 〉.
X : set of n variables X = {1, . . . , n}.
D: set of domains D = {Di : i ∈ X}.
C : set of constraints.
A tuple t
is a solution iff it satisfies all the constraints in C .
5 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Cost Function
A cost function is defined over the scope S of the constraint cSto which it corresponds. It associates a cost to each tuplet ∈ `(S).
c∅: the nullary cost function = constant cost.
ci : the unary cost function on variable i .
cij : the binary cost function on variables i and j .
x cx y cy x y cxy
a 0 a 1a a 0a b 1
b 2 b 0b a 0b b 3
ab
X
2ab
Y
113
6 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Weighted Constraint Satisfaction Problem
Weighted Constraint Satisfaction Problem (WCSP)
is a quadruple 〈X ,D,C ,m〉 where C is a set of cost functionsand m is the upper bound [Cooper et al., 2010].
Find a solution such that the sum
c∅ +∑i∈X
ci +∑ij∈X 2
cij
is minimized,is less than the upper bound m.
ab
X
2ab
Y
113
7 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Levels of Local Consistency
Node Consistency (NC)
A WCSP is Node Consistent if for any variable i ∈ {1, . . . , n},∃a ∈ Di such that ci (a) = 0
(Soft) Arc Consistency (SAC)
A binary WCSP is Arc Consistent if for all cxy ∈ C we have:
∀a ∈ Dx , ∃b ∈ Dy such that cxy (a, b) = 0.
ab
X
2ab
Y
113
ab
X
2ab
Y
112
c∅=0 c∅=0NC but not SAC SAC but not NC
ab
X
2ab
Y2
c∅=1SAC and NC
8 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Levels of Local Consistency
Bool(P)
Values with non-zero unary cost ⇒ REMOVEDAssignments with non-zero binary cost ⇒ FORBIDDEN
Virtual Arc Consistency
A WCSP P is virtual arc consistent (VAC) if Bool(P) is arcconsistent.
ab
X
2ab
Y
113
WCSP P
a
X
b
YBool(P)not AC!
9 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Strict Arc Consistency vs VAC-integrality
Strict AC [Savchynskyy et al., 2013]
a unique value a ∈ Di such that ci (a) = 0
∀cij ∈ C , a unique tuple {(i , a), (j , b)} which satisfiescij(a, b) = 0
VAC-integrality
a unique value a ∈ Di such that ci (a) = 0
∀cij ∈ C , at least one tuple {(i , a), (j , b)} which satisfiescij(a, b) + cj(b) = 0.
10 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Strict Arc Consistency vs VAC-integrality
Strict AC
unique a ∈ Di s.t.ci (a) = 0
∀cij ∈ C , unique{(i , a), (j , b)} s.t.cij(a, b) = 0
VAC-integrality
unique a ∈ Di s.t.ci (a) = 0
∀cij ∈ C , at least one{(i , a), (j , b)} s.t.cij(a, b) + cj(b) = 0.
2
P
i
j2
ab
ab
k2
ab
CijCikCjk
Bool(P)
i
ja
a
k
a
strict AC:{ i }strict* AC:{ i, j, k }
They all have aUNIQUE valuein their domain
in Bool(P)
11 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Variable Ordering Heuristic
It makes sense to AVOID branching on VAC-integralvariables, since the dual bound will not be improved.
So, we classify thevariables with respect totheir domain sizes inBool(P): those withsingleton domains, and therest.
Then, we give priority tothe variables with morethan one value.
DIFFICULTEASY
12 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Heuristic for UB Inspired by CombiLP
[Haller et al., 2018] develop an approach called CombiLP
Subproblem is constructed by fixing the variables thathave the same value in the incumbent and in the currentrelaxation.
Following this approach, we propose a primal heuristicwhich runs in preprocessing.
= +
13 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Relaxation-Aware Sub-Problem Search (RASPS)
X
Y Z
M Na
a a
aa
bb
b
b bcc 2
2
22
22
1 11
2 2
1
θ = 1
X
Y Z
M Na
a a
aab
b bc
X
Y Z
M Na
a a
aab
b b
X
Y Z
M Na
a a
aab
b b22
22
22
θ = 2
X
Y Z
M Na
a a
aab
b bcc 1
X
Y Z
M N
a
a a
aab
b bcc 2
2
22
221
1
X
Y Z
M N
a
a a
aab
b bcc 2
2
22
22
1
14 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
RASPS
X
Y Z
M Na
a a
aa
bb
b
b bcc 2
2
22
22
1 11
2 2
1
Figure: WCSP P. OPT = {a, a, b, c, a} with total cost 1.
X
Y Z
M Na
a a
aab
b b22
22
22
Figure: θ = 1, {a, a, b, a, a}with total cost 2.
1
X
Y Z
M N
a
a a
aab
b bcc 2
2
22
22
1
Figure: θ = 2, {a, a, b, c, a}with total cost 1.
15 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
RASPS
θi : Threshold atiteration i of VAC
ri : Ratio ofVAC-integral ACvariables
αi = ri/θi
= +
16 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Experiments
ToulBar2 [Cooper et al., 2010]: an open-source exactsolver for cost function networks that solves variouscombinatorial optimization problems.
CombiLP [Haller et al., 2018]: an open-source algorithmfor energy minimization of graphical models which usesToulBar2 as its internal combinatorial solver.
431 instances from various benchmarks including
21 instances from CPD30 instances from worms
Time limit: 3600 seconds (36000 for CPD)
17 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Numerical Results for Worms
0
500
1000
1500
2000
2500
3000
3500
0 5 10 15 20 25 30
CPUtim
e(inse
conds)
Numberofsolvedwormsinstances
CombiLP(VAC+VAC-integral+threshold+RASPS)CombiLP(VAC-in-preprocessing)
toulbar2(VAC+VAC-integral+threshold+RASPS)toulbar2(VAC-in-preprocessing)
18 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Numerical Results for CPD
0
5000
10000
15000
20000
25000
30000
35000
0 5 10 15 20
CPUtim
e(inse
conds)
NumberofsolvedCPDinstances
CombiLP(VAC+VAC-integral+threshold+RASPS)toulbar2(VAC+VAC-integral+threshold+RASPS)
CombiLP(VAC-in-preprocessing)toulbar2(VAC-in-preprocessing)
19 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Scatter Plots
20 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Future Work
Further exploring the connections between WCSP and ILP
Finding ways of making VAC more useful more often inWCSP (so it could potentially become the default option)
Testing these heuristics with Bayesian Network StructureLearning instances
21 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
References
Cooper, Martin and Schiex, Thomas (2004)
Arc consistency for soft constraints
Artificial Intelligence 154(1-2), 199 – 227.
Cooper, Martin C and De Givry, Simon and Sanchez, Martı andSchiex, Thomas and Zytnicki, Matthias and Werner, Tomas (2010)
Soft arc consistency revisited
Artificial Intelligence 174(7-8), 449 – 478.
Danna, Emilie and Rothberg, Edward and Le Pape, Claude (2005)
Exploring relaxation induced neighborhoods to improve MIP solutions
Mathematical Programming 102(1), 71 – 90.
Haller, Stefan and Swoboda, Paul and Savchynskyy, Bogdan (2018)
Exact MAP-Inference by Confining Combinatorial Search with LPRelaxation
AAAI.
22 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
References
Savchynskyy, Bogdan and Kappes, Jorg Hendrik and Swoboda, Pauland Schnorr, Christoph (2013)
Global MAP-optimality by shrinking the combinatorial search areawith convex relaxation
Advances in Neural Information Processing Systems 1950 – 1958.
23 / 24
Relaxation-Aware
Heuristics
Fulya Trosser
Introduction
Preliminaries
CSP
WCSP
Local Consistency
Contributions
VAC-integrality
Variable Ordering
UB Computation
Results
Future Work
References
Thank You
24 / 24