smooth and strong: map inference with linear...

15
Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago Mehrdad Mahdavi TTI Chicago Alexander G. Schwing University of Toronto Abstract Maximum a-posteriori (MAP) inference is an important task for many applica- tions. Although the standard formulation gives rise to a hard combinatorial opti- mization problem, several effective approximations have been proposed and stud- ied in recent years. We focus on linear programming (LP) relaxations, which have achieved state-of-the-art performance in many applications. However, optimiza- tion of the resulting program is in general challenging due to non-smoothness and complex non-separable constraints. Therefore, in this work we study the benefits of augmenting the objective function of the relaxation with strong convexity. Specifically, we introduce strong convex- ity by adding a quadratic term to the LP relaxation objective. We provide theoret- ical guarantees for the resulting programs, bounding the difference between their optimal value and the original optimum. Further, we propose suitable optimization algorithms and analyze their convergence. 1 Introduction Probabilistic graphical models are an elegant framework for reasoning about multiple variables with structured dependencies. They have been applied in a variety of domains, including computer vi- sion, natural language processing, computational biology, and many more. Throughout, finding the maximum a-posteriori (MAP) configuration, i.e., the most probable assignment, is one of the central tasks for these models. Unfortunately, in general the MAP inference problem is NP-hard. Despite this theoretical barrier, in recent years it has been shown that approximate inference methods based on linear programming (LP) relaxations often provide high quality MAP solutions in practice. Al- though tractable in principle, LP relaxations pose a real computational challenge. In particular, for many applications, standard LP solvers perform poorly due to the large number of variables and constraints [33]. Therefore, significant research effort has been put into designing efficient solvers that exploit the special structure of the MAP inference problem. Some of the proposed algorithms optimize the primal LP directly, however this is hard due to com- plex coupling constraints between the variables. Therefore, most of the specialized MAP solvers optimize the dual function, which is often easier since it preserves the structure of the underlying model and facilitates elegant message-passing algorithms. Nevertheless, the resulting optimization problem is still challenging since the dual function is piecewise linear and therefore non-smooth. In fact, it was recently shown that LP relaxations for MAP inference are not easier than general LPs [22]. This result implies that there exists an inherent trade-off between the approximation error (accuracy) of the relaxation and its optimization error (efficiency). In this paper we propose new ways to explore this trade-off. Specifically, we study the benefits of adding strong convexity in the form of a quadratic term to the MAP LP relaxation objective. We show that adding strong convexity to the primal LP results in a new smooth dual objective, which serves as an alternative to soft-max. This smooth objective can be computed efficiently and opti- mized via gradient-based methods, including accelerated gradient. On the other hand, introducing strong convexity in the dual leads to a new primal formulation in which the coupling constraints are enforced softly, through a penalty term in the objective. This allows us to derive an efficient 1

Upload: others

Post on 26-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

Smooth and Strong:MAP Inference with Linear Convergence

Ofer MeshiTTI Chicago

Mehrdad MahdaviTTI Chicago

Alexander G. SchwingUniversity of Toronto

Abstract

Maximum a-posteriori (MAP) inference is an important task for many applica-tions. Although the standard formulation gives rise to a hard combinatorial opti-mization problem, several effective approximations have been proposed and stud-ied in recent years. We focus on linear programming (LP) relaxations, which haveachieved state-of-the-art performance in many applications. However, optimiza-tion of the resulting program is in general challenging due to non-smoothness andcomplex non-separable constraints.Therefore, in this work we study the benefits of augmenting the objective functionof the relaxation with strong convexity. Specifically, we introduce strong convex-ity by adding a quadratic term to the LP relaxation objective. We provide theoret-ical guarantees for the resulting programs, bounding the difference between theiroptimal value and the original optimum. Further, we propose suitable optimizationalgorithms and analyze their convergence.

1 IntroductionProbabilistic graphical models are an elegant framework for reasoning about multiple variables withstructured dependencies. They have been applied in a variety of domains, including computer vi-sion, natural language processing, computational biology, and many more. Throughout, finding themaximum a-posteriori (MAP) configuration, i.e., the most probable assignment, is one of the centraltasks for these models. Unfortunately, in general the MAP inference problem is NP-hard. Despitethis theoretical barrier, in recent years it has been shown that approximate inference methods basedon linear programming (LP) relaxations often provide high quality MAP solutions in practice. Al-though tractable in principle, LP relaxations pose a real computational challenge. In particular, formany applications, standard LP solvers perform poorly due to the large number of variables andconstraints [33]. Therefore, significant research effort has been put into designing efficient solversthat exploit the special structure of the MAP inference problem.

Some of the proposed algorithms optimize the primal LP directly, however this is hard due to com-plex coupling constraints between the variables. Therefore, most of the specialized MAP solversoptimize the dual function, which is often easier since it preserves the structure of the underlyingmodel and facilitates elegant message-passing algorithms. Nevertheless, the resulting optimizationproblem is still challenging since the dual function is piecewise linear and therefore non-smooth.In fact, it was recently shown that LP relaxations for MAP inference are not easier than generalLPs [22]. This result implies that there exists an inherent trade-off between the approximation error(accuracy) of the relaxation and its optimization error (efficiency).

In this paper we propose new ways to explore this trade-off. Specifically, we study the benefits ofadding strong convexity in the form of a quadratic term to the MAP LP relaxation objective. Weshow that adding strong convexity to the primal LP results in a new smooth dual objective, whichserves as an alternative to soft-max. This smooth objective can be computed efficiently and opti-mized via gradient-based methods, including accelerated gradient. On the other hand, introducingstrong convexity in the dual leads to a new primal formulation in which the coupling constraintsare enforced softly, through a penalty term in the objective. This allows us to derive an efficient

1

Page 2: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

conditional gradient algorithm, also known as the Frank-Wolfe (FW) algorithm. We can then reg-ularize both primal and dual to obtain a smooth and strongly convex objective, for which variousalgorithms enjoy linear convergence rate. We provide theoretical guarantees for the new objectivefunctions, analyze the convergence rate of the proposed algorithms, and compare them to existingapproaches. All of our algorithms are guaranteed to globally converge to the optimal value of themodified objective function. Finally, we show empirically that our methods are competitive withother state-of-the-art algorithms for MAP LP relaxation.

2 Related Work

Several authors proposed efficient approximations for MAP inference based on LP relaxations [e.g.,30]. Kumar et al. [12] show that LP relaxation dominates other convex relaxations for MAP infer-ence. Due to the complex non-separable constraints, only few of the existing algorithms optimizethe primal LP directly. Ravikumar et al. [23] present a proximal point method that requires iterativeprojections onto the constraints in the inner loop. Inexactness of these iterative projections compli-cates the convergence analysis of this scheme. In Section 4.1 we show that adding a quadratic termto the dual problem corresponds to a much easier primal in which agreement constraints are enforcedsoftly through a penalty term that accounts for constraint violation. This enables us to derive a sim-pler projection-free algorithm based on conditional gradient for the primal relaxed program [4, 13].Recently, Belanger et al. [1] used a different non-smooth penalty term for constraint violation, andshowed that it corresponds to box-constraints on dual variables. In contrast, our penalty terms aresmooth, which leads to a different objective function and faster convergence guarantees.

Most of the popular algorithms for MAP LP relaxations focus on the dual program and optimizeit in various ways. The subgradient algorithm can be applied to the non-smooth objective [11],however its convergence rate is rather slow, both in theory and in practice. In particular, the algorithmrequires O(1/ε2) iterations to obtain an ε-accurate solution to the dual problem. Algorithms basedon coordinate minimization can also be applied [e.g., 6, 10, 31], and often converge fast, but theymight get stuck in suboptimal fixed points due to the non-smoothness of the objective. To overcomethis limitation it has been proposed to smooth the dual objective using a soft-max function [7, 8].Coordinate minimization methods are then guaranteed to converge to the optimum of the smoothedobjective. Meshi et al. [17] have shown that the convergence rate of such algorithms is O(1/γε),where γ is the smoothing parameter. Accelerated gradient algorithms have also been successfullyapplied to the smooth dual, obtaining improved convergence rate of O(1/

√γε), which can be used

to obtain a O(1/ε) rate w.r.t. the original objective [24]. In Section 4.2 we propose an alternativesmoothing technique, based on adding a quadratic term to the primal objective. We then show howgradient-based algorithms can be applied efficiently to optimize the new objective function.

Other globally convergent methods that have been proposed include augmented Lagrangian [15, 16],bundle methods [9], and a steepest descent approach [25, 26]. However, the convergence rate ofthese methods in the context of MAP inference has not been analyzed yet, making them hard tocompare to other algorithms.

3 Problem Formulation

In this section we formalize MAP inference in graphical models. Consider a set of n discrete vari-ables X1, . . . , Xn, and denote by xi a particular assignment to variable Xi. We refer to subsets ofthese variables by r ⊆ {1, . . . , n}, also known as regions, and the total number of regions is referredto as q. Each subset is associated with a local score function, or factor, θr(xr). The MAP problem isto find an assignment x which maximizes a global score function that decomposes over the factors:

maxx

r

θr(xr) .

The above combinatorial optimization problem is hard in general, and tractable only in several spe-cial cases. Most notably, for tree-structured graphs or super-modular pairwise score functions, ef-ficient dynamic programming algorithms can be applied. Here we do not make such simplifyingassumptions and instead focus on approximate inference. In particular, we are interested in approx-

2

Page 3: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

imations based on the LP relaxation, taking the following form:

maxµ∈ML

f(µ) :=∑

r

xr

µr(xr)θr(xr) = µ>θ (1)

where: ML =

{µ ≥ 0

∣∣∣∣∑xrµr(xr) = 1 ∀r∑

xp\xr µp(xp) = µr(xr) ∀r, xr, p : r ∈ p},

where ‘r ∈ p’ represents a containment relationship between the regions p and r. The dual programof the above LP is formulated as minimizing the re-parameterization of factors [32]:

minδg(δ) :=

r

maxxr

(θr(xr) +

p:r∈pδpr(xr)−

c:c∈rδrc(xc)

)≡∑

r

maxxr

θδr(xr) , (2)

This is a piecewise linear function in the dual variables δ. Hence, it is convex (but not strongly) andnon-smooth. Two commonly used optimization schemes for this objective are subgradient descentand block coordinate minimization. While the convergence rate of the former can be upper boundedby O(1/ε2), the latter is non-convergent due to the non-smoothness of the objective function.

To remedy this shortcoming, it has been proposed to smooth the objective by replacing the localmaximization with a soft-max [7, 8]. The resulting unconstrainted program is:

minδgγ(δ) :=

r

γ log∑

xr

exp

(θδr(xr)

γ

). (3)

This dual form corresponds to adding local entropy terms to the primal given in Eq. (1), obtaining:

maxµ∈ML

r

xr

(µr(xr)θr(xr) + γH(µr)) , (4)

where H(µr) = −∑xrµr(xr) logµr(xr) denotes the entropy. The following guarantee holds for

the smooth optimal value g∗γ :

g∗ ≤ g∗γ ≤ g∗ + γ∑

r

log Vr , (5)

where g∗ is the optimal value of the dual program given in Eq. (2), and Vr = |r| denotes the numberof variables in region r.

The dual given in Eq. (3) is a smooth function with Lipschitz constant L = 1γ

∑r Vr [see 24]. In

this case coordinate minimization algorithms are globally convergent (to the smooth optimum), andtheir convergence rate can be bounded by O(1/γε) [17]. Gradient-based algorithms can also beapplied to the smooth dual and have similar convergence rate O(1/γε). This can be improved usingNesterov’s acceleration scheme to obtain an O(1/

√γε) rate [24]. The gradient of Eq. (3) takes the

simple form:

∇δpr(xr)gγ =

br(xr)−

xp\xrbp(xp)

, where br(xr) ∝ exp

(θδr(xr)

γ

). (6)

4 Introducing Strong Convexity

In this section we study the effect of adding strong convexity to the objective function. Specifically,we add the Euclidean norm of the variables to either the dual (Section 4.1) or primal (Section 4.2)function. We study the properties of the objectives, and propose appropriate optimization schemes.

4.1 Strong Convexity in the DualAs mentioned above, the dual given in Eq. (2) is a piecewise linear function, hence not smooth.Introducing strong convexity to control the convergence rate, is an alternative to smoothing. Wepropose to introduce strong convexity by simply adding the L2 norm of the variables to the dual

3

Page 4: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

Algorithm 1 Block-coordinate Frank-Wolfe for soft-constrained primal

1: Initialize: µr(xr) = 1{xr = argmaxx′r θδ(µ)r (x′r)} for all r, xr

2: while not converged do3: Pick r at random4: Let sr(xr) = 1{xr = argmaxx′r θ

δ(µ)r (x′r)} for all xr

5: Let η =(θδ(µ)r )

>(sr−µr)

1λPr‖sr−µr‖2+ 1

λ

∑c:c∈r ‖Arc(sr−µr)‖2 , and clip to [0, 1]

6: Update µr ← (1− η)µr + ηsr7: end while

program given in Eq. (2), i.e.,

minδgλ(δ) := g(δ) +

λ

2‖δ‖2 . (7)

The corresponding primal objective is then (see Appendix A):

maxµ∈∆×

fλ(µ) := µ>θ − 1

r,xr,p:r∈p

xp\xrµp(xp)− µr(xr)

2

= µ>θ − λ

2‖Aµ‖2 , (8)

where ∆× preserves only the separable per-region simplex constraints inML, and for conveniencewe define (Aµ)r,xr,p = 1

λ

(∑xp\xr µp(xp)− µr(xr)

). Importantly, this primal program is similar

to the original primal given in Eq. (1), but the non-separable marginalization constraints inML areenforced softly – via a penalty term in the objective. Interestingly, the primal in Eq. (8) is somewhatsimilar to the objective function obtained by the steepest descent approach proposed by Schwinget al. [25], despite being motivated from different perspectives. Similar to Schwing et al. [25], ouralgorithm below is also based on conditional gradient, however ours is a single-loop algorithm,whereas theirs employs a double-loop procedure.

We obtain the following guarantee for the optimum of the strongly convex dual (see Appendix C):

g∗ ≤ g∗λ ≤ g∗ +λ

2h , (9)

where h is chosen such that ‖δ∗‖2 ≤ h. It can be shown that h = (4Mq‖θ‖∞)2, where M =maxrWr, and Wr is the number of configurations of region r (see Appendix C). Notice that thisbound is worse than the soft-max bound stated in Eq. (5) due to the dependence on the magnitudeof the parameters θ and the number of configurations Wr.

Optimization It is easy to modify the subgradient algorithm to optimize the strongly convex dualgiven in Eq. (7). It only requires adding the term λδ to the subgradient. Since the objective isnon-smooth and strongly convex, we obtain a convergence rate of O(1/λε) [19]. We note thatcoordinate descent algorithms for the dual objective are still non-convergent, since the programis still non-smooth. Instead, we propose to optimize the primal given in Eq. (8) via a conditionalgradient algorithm [4]. Specifically, in Algorithm 1 we implement the block-coordinate Frank-Wolfealgorithm proposed by Lacoste-Julien et al. [13]. In Algorithm 1 we denote Pr = |{p : r ∈ p}|, wedefine δ(µ) as δpr(xr) = 1

λ

(∑xp\xr µp(xp)− µr(xr)

), and Arcµr =

∑xr\xc µr(xr).

In Appendix D we show that the convergence rate of Algorithm 1 isO(1/λε), similar to subgradientin the dual. However, Algorithm 1 has several advantages over subgradient. First, the step-size re-quires no tuning since the optimal step η is computed analytically. Second, it is easy to monitor the

sub-optimality of the current solution by keeping track of the duality gap∑r (θδr)

>(sr−µr), which

provides a sound stopping condition.1 Notice that the basic operation for the update is maximiza-tion over the re-parameterization (maxxr θ

δr(xr)), which is similar to a subgradient computation.

This operation is sometimes cheaper than coordinate minimization, which requires computing max-

1Similar rate guarantees can be derived for the duality gap.

4

Page 5: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

marginals [see 28]. We also point out that, similar to Lacoste-Julien et al. [13], it is possible toexecute Algorithm 1 in terms of dual variables, without storing primal variables µr(xr) for largeparent regions (see Appendix E for details). As we demonstrate in Section 5, this can be importantwhen using global factors.

We note that Algorithm 1 can be used with minor modifications in the inner loop of an augmentedLagrangian algorithm [15]. But we show later that this double-loop procedure is not necessary toobtain good results for some applications. Finally, Meshi et al. [18] show how to use the objectivein Eq. (8) to obtain an efficient training algorithm for learning the score functions θ from data.

4.2 Strong Convexity in the Primal

We next consider appending the primal given in Eq. (1) with a similar L2 norm, obtaining:

maxµ∈ML

fγ(µ) := µ>θ − γ

2‖µ‖2 . (10)

It turns out that the corresponding dual function takes the form (see Appendix B):

minδgγ(δ) :=

r

maxu∈∆

(u>θδr −

γ

2‖u‖2

)=∑

r

γ

2

∥∥∥∥∥θδrγ

∥∥∥∥∥

2

−minu∈∆

γ

2

∥∥∥∥∥u−θδrγ

∥∥∥∥∥

2 . (11)

Thus the dual objective involves scaling the factor reparameterization θδr by 1/γ, and then projectingthe resulting vector onto the probability simplex. We denote the result of this projection by ur (orjust u when clear from context). The L2 norm in Eq. (10) has the same role as the entropy termsin Eq. (4), and serves to smooth the dual function. This is a consequence of the well known dualitybetween strong convexity and smoothness [e.g., 21]. In particular, the dual stated in Eq. (11) issmooth with Lipschitz constant L = q/γ.

To calculate the objective value we need to compute the projection ur onto the simplex for all factors.This can be done by sorting the elements of the scaled reparameterization θδr/γ, and then shiftingall elements by the same value such that all positive elements sum to 1. The negative elements arethen set to 0 [see, e.g., 3, for details]. Intuitively, we can think of ur as a max-marginal which doesnot place weight 1 on the maximum element, but instead spreads the weight among the top scoringelements, if their score is close enough to the maximum. The effect is similar to the soft-max case,where br can also be thought-of as a soft max-marginal (see Eq. (6)). On the other hand, unlike br,our max-marginal ur will most likely be sparse, since only a few elements tend to have scores closeto the maximum and hence non-zero value in ur.

Another interesting property of the dual in Eq. (11) is invariance to shifting, which is also the casefor the non-smooth dual provided in Eq. (2) and the soft-max dual given in Eq. (3). Specifically,shifting all elements of δpr(·) by the same value does not change the objective value, since theprojection onto the simplex is shift-invariant.

We next bound the difference between the smooth optimum and the original one. The bound followseasily from the bounded norm of µr in the probability simplex:

f∗ − γ

2q ≤ f∗γ ≤ f∗ , or equivalently: f∗ ≤

(f∗γ +

γ

2q)≤ f∗ +

γ

2q .

We actually use the equivalent form on the right in order to get an upper bound rather than a lowerbound.2 From strong duality we immediately get a similar guarantee for the dual optimum:

g∗ ≤(g∗γ +

γ

2q)≤ g∗ +

γ

2q .

Notice that this bound is better than the corresponding soft-max bound stated in Eq. (5), since it doesnot depend on the scope size of regions, i.e., Vr.

2In our experiments we show the shifted objective value.

5

Page 6: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323

Convex Strongly-convex

Non

-sm

ooth

Dual: min�

g(�) :=Pr

maxxr

✓�r(xr)

Subgradient O(1/✏2)CD (non-convergent)Primal: max

µ2ML

µ>✓

Proximal projections

Dual: min�

g(�) + �2k�k2

Subgradient O(1/�✏)

Primal: maxµ2�⇥

µ>✓ � �2kAµk2

FW O(1/�✏) Sect

ion

4.1

L2-m

ax

Dual: min�

g�(�) :=Pr

maxu2�

⇣u>✓�r � �

2kuk2

Gradient O(1/�✏)Accelerated O(1/

p�✏)

CD?Primal: max

µ2ML

µ>✓ � �2kµk2

Sect

ion

4.2 Dual: min

�g�(�) + �

2k�k2

Gradient O( 1��

log( 1✏))

Accelerated O( 1p��

log( 1✏))

Primal: maxµ2�⇥

µ>✓ � �2kAµk2 � �

2kµk2

SDCA O((1 + 1��

) log( 1✏))

Sect

ion

4.3

Soft

-max

Dual: min�

g�(�) :=Pr

� logPxr

exp⇣

✓�r(xr)

Gradient O(1/�✏)Accelerated O(1/

p�✏)

CD O(1/�✏)

Primal: maxµ2ML

µ>✓ + �Pr

H(µr)

Dual: min�

g�(�) + �2k�k2

Gradient O( 1��

log( 1✏))

Accelerated O( 1p��

log( 1✏))

Primal: maxµ2�⇥

µ>✓ � �2kAµk2 + �

Pr

H(µr) Sect

ion

4.3

Table 1: Summary of objective functions, algorithms and rates. Existing approaches are shaded.

Optimization To solve the dual program given in Eq. (11) we can use gradient-based algorithms.The gradient takes the form:

r�pr(xr)g� =

0@ur(xr)�

X

xp\xr

up(xp)

1A ,

which only requires computing the projection ur, as in the objective function. Notice that this formis very similar to the soft-max gradient (Eq. (6)), with projections u taking the role of beliefs b. Thegradient descent algorithm applies the updates: � � � 1

Lrg� iteratively. The convergence rate ofthis scheme for our smooth dual is O(1/�✏), which is similar to the soft-max rate [26]. As in thesoft-max case, Nesterov’s accelerated gradient method achieves a better O(1/

p�✏) rate [see 16].

Unfortunately, it is not clear how to derive efficient coordinate minimization updates for the dual inEq. (11), since the projection ur depends on the dual variables � in a non-linear manner.

Finally, we point out that the program in Eq. (10) is very similar to the one solved in the inner loopof proximal point methods [5]. Therefore our gradient-based algorithm can be used with minormodifications as a subroutine within such proximal algorithms (requires mapping the final dualsolution to a feasible primal solution [see, e.g., 15]).

4.3 Smooth and StrongIn order to obtain a smooth and strongly convex objective function, we can add an L2 regularizer tothe smooth program given in Eq. (11) (similarly possible for the soft-max dual in Eq. (3)). Gradient-based algorithms have linear convergence rate in this case [26]. Equivalently, we can add an L2

term to the primal in Eq. (8). Although conditional gradient is not guaranteed to converge linearly inthis case [27], stochastic coordinate ascent (SDCA) does enjoy linear convergence, and can even beaccelerated to gain better dependence on the smoothing and convexity parameters [28]. This requiresonly minor modifications to the algorithms discussed above, which are highlighted in Appendix F.To conclude this section, we summarize all objective functions and algorithms in Table 1.

5 ExperimentsWe now proceed to evaluate the proposed methods on real and synthetic data and compare them toexisting state-of-the-art approaches. We begin with a synthetic model adapted from Kolmogorov[12]. This example was designed to show that coordinate descent algorithms might get stuck insuboptimal points due to non-smoothness. We compare the following MAP inference algorithms:non-smooth coordinate descent (CD), non-smooth subgradient descent, smooth CD (for soft-max),gradient descent (GD) and accelerated GD (AGD) with either soft-max or L2 smoothing (Section

6

Table 1: Summary of objective functions, algorithms and rates. Row and column headers pertain tothe dual objective. Previously known approaches are shaded.

Optimization To solve the dual program given in Eq. (11) we can use gradient-based algorithms.The gradient takes the form:

∇δpr(xr)gγ =

ur(xr)−

xp\xrup(xp)

,

which only requires computing the projection ur, as in the objective function. Notice that this formis very similar to the soft-max gradient (Eq. (6)), with projections u taking the role of beliefs b. Thegradient descent algorithm applies the updates: δ ← δ − 1

L∇gγ iteratively. The convergence rate ofthis scheme for our smooth dual is O(1/γε), which is similar to the soft-max rate [20]. As in thesoft-max case, Nesterov’s accelerated gradient method achieves a better O(1/

√γε) rate [see 24].

Unfortunately, it is not clear how to derive efficient coordinate minimization updates for the dual inEq. (11), since the projection ur depends on the dual variables δ in a non-linear manner.

Finally, we point out that the program in Eq. (10) is very similar to the one solved in the innerloop of proximal point methods [23]. Therefore our gradient-based algorithm can be used withminor modifications as a subroutine within such proximal algorithms (requires mapping the finaldual solution to a feasible primal solution [see, e.g., 17]).

4.3 Smooth and StrongIn order to obtain a smooth and strongly convex objective function, we can add an L2 term to thesmooth program given in Eq. (11) (similarly possible for the soft-max dual in Eq. (3)). Gradient-based algorithms have linear convergence rate in this case [20]. Equivalently, we can add an L2

term to the primal in Eq. (8). Although conditional gradient is not guaranteed to converge linearly inthis case [5], stochastic coordinate ascent (SDCA) does enjoy linear convergence, and can even beaccelerated to gain better dependence on the smoothing and convexity parameters [27]. This requiresonly minor modifications to the algorithms presented above, which are highlighted in Appendix F.To conclude this section, we summarize all objective functions and algorithms in Table 1.

5 ExperimentsWe now proceed to evaluate the proposed methods on real and synthetic data and compare them toexisting state-of-the-art approaches. We begin with a synthetic model adapted from Kolmogorov[10]. This example was designed to show that coordinate descent algorithms might get stuck insuboptimal points due to non-smoothness. We compare the following MAP inference algorithms:non-smooth coordinate descent (CD), non-smooth subgradient descent, smooth CD (for soft-max),gradient descent (GD) and accelerated GD (AGD) with either soft-max or L2 smoothing (Section4.2), our Frank-Wolfe Algorithm 1 (FW), and the linear convergence variants (Section 4.3). In Fig. 1

6

Page 7: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

100

102

104

106

−60

−40

−20

0

Iterations

Obj

ectiv

e

CD Non−smoothSubgradientCD Soft, γ=1CD Soft, γ=0.1CD Soft, γ=0.01GD Soft, γ=0.01AGD Soft, γ=0.01GD L

2, γ=0.01

AGD L2, γ=1

AGD L2, γ=0.1

AGD L2, γ=0.01

FW, λ=0.01FW, λ=0.001FW, λ=0.0001AGD, γ=0.1, λ=0.001SDCA, γ=0.1, λ=0.001Non−smooth OPT

Figure 1: Comparison of various inference algorithms on a synthetic model. The objective value asa function of the iterations is plotted. The optimal value is shown in thin dashed dark line.

we notice that non-smooth CD (light blue, dashed) is indeed stuck at the initial point. Second, weobserve that the subgradient algorithm (yellow) is extremely slow to converge. Third, we see thatsmooth CD algorithms (green) converge nicely to the smooth optimum. Gradient-based algorithmsfor the same smooth (soft-max) objective (purple) also converge to the same optimum, while AGDis much faster than GD. We can also see that gradient-based algorithms for the L2-smooth objective(red) preform slightly better than their soft-max counterparts. In particular, they have faster conver-gence and tighter objective for the same value of the smoothing parameter, as our theoretical analysissuggests. For example, compare the convergence of AGD soft and AGD L2 both with γ = 0.01.For the optimal value, compare CD soft and AGD L2 both with γ = 1. Fourth, we note that theFW algorithm (blue) requires smaller values of the strong-convexity parameter λ in order to achievehigh accuracy, as our bound in Eq. (9) predicts. We point out that the dependence on the smoothingor strong convexity parameter is roughly linear, which is also aligned with our convergence bounds.Finally, we see that for this model the smooth and strongly convex algorithms (gray) perform similaror even slightly worse than either the smooth-only or strongly-convex-only counterparts.

In our experiments we compare the number of iterations rather than runtime of the algorithms sincethe computational cost per iteration is roughly the same for all algorithms (includes a pass overall factors), and the actual runtime greatly depends on the implementation. For example, gradientcomputation for L2 smoothing requires sorting factors rather than just maximizing over their values,incurring worst-case cost of O(Wr logWr) per factor instead of just O(Wr) for soft-max gradient.However, one can use partitioning around a pivot value instead of sorting, yielding O(Wr) costin expectation [3], and caching the pivot can also speed-up the runtime considerably. Moreover,logarithm and exponent operations needed by the soft-max gradient are much slower than the basicoperations used for computing the L2 smooth gradient. As another example, we point out that AGDalgorithms can be further improved by searching for the effective Lipschitz constant rather thanusing the conservative bound L (see [24] for more details). In order to abstract away these detailswe compare the iteration cost of the vanilla versions of all algorithms.

We next conduct experiments on real data from a protein side-chain prediction problem fromYanover et al. [33]. This problem can be cast as MAP inference in a model with unary and pairwisefactors. Fig. 2 (left) shows the convergence of various MAP algorithms for one of the proteins (sim-ilar behavior was observed for the other instances). The behavior is similar to the synthetic exampleabove, except for the much better performance of non-smooth coordinate descent. In particular, wesee that coordinate minimization algorithms perform very well in this setting, better than gradient-based and the FW algorithms (this finding is consistent with previous work [e.g., 17]). Only a closerlook (Fig. 2, left, bottom) reveals that smoothing actually helps to obtain a slightly better solutionhere. In particular, the soft-max CD (with γ = 0.001) and L2-max AGD (with γ = 0.01), as wellas the primal (SDCA) and dual (AGD) algorithms for the smooth and strongly convex objective, areable to recover the optimal solution within the allowed number of iterations. The non-smooth FWalgorithm also finds a near-optimal solution.

Finally, we apply our approach to an image segmentation problem with a global cardinality factor.Specifically, we use the Weizmann Horse dataset for foreground-background segmentation [2]. Allimages are resized to 150× 150 pixels, and we use 50 images to learn the parameters of the modeland the other 278 images to test inference. Our model consists of unary and pairwise factors alongwith a single global cardinality factor, that serves to encourage segmentations where the number offoreground pixels is not too far from the trainset mean. Specifically, we use the cardinality factorfrom Li and Zemel [14], defined as: θc(x) = max{0, |s− s0| − t}2, where s =

∑i xi. Here, s0 is a

reference cardinality computed from the training set, and t is a tolerance parameter, set to t = s0/5.

7

Page 8: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

100

101

102

103

104

0

50

100

150

200

250

Iterations

Ob

ject

ive

100

101

102

103

104

102

103

104

105

106

107

Iterations

Ob

ject

ive

Iterations100 101 102 103 104

Obj

ectiv

e

-10000

-8000

-6000

-4000

-2000

0

2000

CD Non-smoothSubgradientCD Soft .=0.01CD Soft .=0.001AGD L2 .=0.01AGD L2 .=0.001AGD Soft .=0.01AGD Soft .=0.001FW 6=0.01AGD .=0.01 6=0.01SDCA .=0.01 6=0.01

100

101

102

103

104

−8

−6

−4

−2

0x 10

5

Iterations

Obj

ectiv

e

SubgradientMPLPFW

Figure 2: (Left) Comparison of MAP inference algorithms on a protein side-chain prediction prob-lem. In the upper figure the solid lines show the optimized objective for each algorithm, and thedashed lines show the score of the best decoded solution (obtained via simple rounding). The bot-tom figure shows the value of the decoded solution in more detail. (Right) Comparison of MAPinference algorithms on an image segmentation problem. Again, solid lines show the value of theoptimized objective while dashed lines show the score of the best decoded solution so far.

First we notice that not all of the algorithms are efficient in this setting. In particular, algorithms thatoptimize the smooth dual (either soft-max or L2 smoothing) need to enumerate factor configurationsin order to compute updates, which is prohibitive for the global cardinality factor. We thereforetake the non-smooth subgradient and coordinate descent [MPLP, 6] as baselines, and compare theirperformance to that of our FW Algorithm 1 (with λ = 0.01). We use the variant that does not storeprimal variables for the global factor (Appendix E). We point out that MPLP requires calculatingmax-marginals for factors, rather than a simple maximization for subgradient and FW. In the case ofcardinality factors this can be done at similar cost using dynamic programming [29], however thereare other types of factors where max-marginal computation might be more expensive than max [28].

In Fig. 2 (right) we show a typical run for a single image, where we limit the number of iterations to10K. We observe that subgradient descent is again very slow to converge, and coordinate descentis also rather slow here (in fact, it is not even guaranteed to reach the optimum). In contrast, ourFW algorithm converges orders of magnitude faster and finds a high quality solution (for runtimecomparison see Appendix G). Over the entire 278 test instances we found that FW gets the highestscore solution for 237 images, while MPLP finds the best solution in only 41 images, and subgradientnever wins. To explain this success, recall that our algorithm enforces the agreement constraintsbetween factor marginals only softly. It makes sense that in this setting it is not crucial to reach fullagreement between the cardinality factor and the other factors in order to obtain a good solution.

6 ConclusionIn this paper we studied the benefits of strong convexity for MAP inference. We introduced a sim-ple L2 term to make either the dual or primal LP relaxations strongly convex. We analyzed theresulting objective functions and provided theoretical guarantees for their optimal values. We thenproposed several optimization algorithms and derived upper bounds on their convergence rates. Us-ing the same machinery, we obtained smooth and strongly convex objective functions, for which ouralgorithms retained linear convergence guarantees. Our approach offers new ways to trade-off theapproximation error of the relaxation and the optimization error. Indeed, we showed empirically thatour methods significantly outperform strong baselines on problems involving cardinality potentials.

To extend our work we aim at natural language processing applications since they share charac-teristics similar to the investigated image segmentation task. Finally, we were unable to deriveclosed-form coordinate minimization updates for our L2-smooth dual in Eq. (11). We hope to findalternative smoothing techniques which facilitate even more efficient updates.

References[1] D. Belanger, A. Passos, S. Riedel, and A. McCallum. Message passing for soft constraint dual decompo-

sition. In UAI, 2014.

8

Page 9: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

[2] E. Borenstein, E. Sharon, and S. Ullman. Combining top-down and bottom-up segmentation. In CVPR,2004.

[3] J. Duchi, S. Shalev-Shwartz, Y. Singer, and T. Chandra. Efficient projections onto the l 1-ball for learningin high dimensions. In ICML, pages 272–279, 2008.

[4] M. Frank and P. Wolfe. An algorithm for quadratic programming, volume 3, pages 95–110. 1956.[5] D. Garber and E. Hazan. A linearly convergent conditional gradient algorithm with applications to online

and stochastic optimization. arXiv preprint arXiv:1301.4666, 2013.[6] A. Globerson and T. Jaakkola. Fixing max-product: Convergent message passing algorithms for MAP

LP-relaxations. In NIPS. MIT Press, 2008.[7] T. Hazan and A. Shashua. Norm-product belief propagation: Primal-dual message-passing for approxi-

mate inference. IEEE Transactions on Information Theory, 56(12):6294–6316, 2010.[8] J. Johnson. Convex Relaxation Methods for Graphical Models: Lagrangian and Maximum Entropy Ap-

proaches. PhD thesis, EECS, MIT, 2008.[9] J. H. Kappes, B. Savchynskyy, and C. Schnorr. A bundle approach to efficient map-inference by la-

grangian relaxation. In CVPR, 2012.[10] V. Kolmogorov. Convergent tree-reweighted message passing for energy minimization. IEEE Transac-

tions on Pattern Analysis and Machine Intelligence, 28(10):1568–1583, 2006.[11] N. Komodakis, N. Paragios, and G. Tziritas. MRF energy minimization and beyond via dual decomposi-

tion. IEEE PAMI, 2010.[12] M. P. Kumar, V. Kolmogorov, and P. H. S.Torr. An analysis of convex relaxations for map estimation of

discrete mrfs. JMLR, 10:71–106, 2009.[13] S. Lacoste-Julien, M. Jaggi, M. Schmidt, and P. Pletscher. Block-coordinate Frank-Wolfe optimization

for structural SVMs. In ICML, pages 53–61, 2013.[14] Y. Li and R. Zemel. High order regularization for semi-supervised learning of structured output problems.

In ICML, pages 1368–1376, 2014.[15] A. L. Martins, M. A. T. Figueiredo, P. M. Q. Aguiar, N. A. Smith, and E. P. Xing. An augmented

lagrangian approach to constrained map inference. In ICML, pages 169–176, 2011.[16] O. Meshi and A. Globerson. An alternating direction method for dual map lp relaxation. In ECML, 2011.[17] O. Meshi, T. Jaakkola, and A. Globerson. Convergence rate analysis of map coordinate minimization

algorithms. In NIPS, pages 3023–3031, 2012.[18] O. Meshi, N. Srebro, and T. Hazan. Efficient training of structured svms via soft constraints. In AISTATS,

2015.[19] A. Nemirovski and D. Yudin. Problem complexity and method efficiency in optimization. Wiley, 1983.[20] Y. Nesterov. Introductory Lectures on Convex Optimization: A Basic Course, volume 87. Kluwer Aca-

demic Publishers, 2004.[21] Y. Nesterov. Smooth minimization of non-smooth functions. Math. Prog., 103(1):127–152, 2005.[22] D. Prusa and T. Werner. Universality of the local marginal polytope. In CVPR, pages 1738–1743. IEEE,

2013.[23] P. Ravikumar, A. Agarwal, and M. J. Wainwright. Message-passing for graph-structured linear programs:

Proximal methods and rounding schemes. JMLR, 11:1043–1080, 2010.[24] B. Savchynskyy, S. Schmidt, J. Kappes, and C. Schnorr. A study of Nesterov’s scheme for lagrangian

decomposition and map labeling. CVPR, 2011.[25] A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Globally Convergent Dual MAP LP Relaxation

Solvers using Fenchel-Young Margins. In Proc. NIPS, 2012.[26] A. G. Schwing, T. Hazan, M. Pollefeys, and R. Urtasun. Globally Convergent Parallel MAP LP Relaxation

Solver using the Frank-Wolfe Algorithm. In Proc. ICML, 2014.[27] S. Shalev-Shwartz and T. Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized

loss minimization. In ICML, 2014.[28] D. Sontag, A. Globerson, and T. Jaakkola. Introduction to dual decomposition for inference. In Optimiza-

tion for Machine Learning, pages 219–254. MIT Press, 2011.[29] D. Tarlow, I. Givoni, and R. Zemel. Hop-map: Efficient message passing with high order potentials. In

AISTATS, volume 9, pages 812–819. JMLR: W&CP, 2010.[30] M. Wainwright, T. Jaakkola, and A. Willsky. MAP estimation via agreement on trees: message-passing

and linear programming. IEEE Transactions on Information Theory, 51(11):3697–3717, 2005.[31] T. Werner. A linear programming approach to max-sum problem: A review. IEEE Transactions on Pattern

Analysis and Machine Intelligence, 29(7):1165–1179, 2007.[32] T. Werner. Revisiting the linear programming relaxation approach to gibbs energy minimization and

weighted constraint satisfaction. IEEE PAMI, 32(8):1474–1488, 2010.[33] C. Yanover, T. Meltzer, and Y. Weiss. Linear programming relaxations and belief propagation – an

empirical study. Journal of Machine Learning Research, 7:1887–1907, 2006.

9

Page 10: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

Supplementary MaterialSmooth and Strong: MAP Inference with Linear Convergence

A The Primal of the Strongly-Convex Dual

We start from the strongly convex dual Eq. (7):

minδ

λ

2‖δ‖2 +

r

maxxr

(θr(xr) +

p:r∈pδpr(xr)−

c:c∈rδrc(xc)

)

To derive the primal we rewrite this dual as:

minδ,ξ

λ

2‖δ‖2 +

r

ξr

s.t. ξr ≥ θr(xr) +∑

p:r∈pδpr(xr)−

c:c∈rδrc(xc) ∀r, xr

The Lagrangian is then:

L(δ, ξ, µ ≥ 0) =λ

2‖δ‖2 +

r

ξr

+∑

r

xr

µr(xr)

[θr(xr) +

p:r∈pδpr(xr)−

c:c∈rδrc(xc)− ξr

]

Deriving optimality conditions, we obtain:

∂L

∂ξr= 1−

xr

µr(xr) = 0 [normalization]

∂L

∂δpr(xr)= λδpr(xr)− µp(xr) + µr(xr) = 0 ⇒ δpr(xr) =

1

λ(µp(xr)− µr(xr))

where µp(xr) =∑xp\xr µp(xp).

Plugging back in L, we get the primal:

maxµ∈∆×

µ>θ − λ

2‖Aµ‖2

B L2-Smoothed Dual

We first show theL2 smoothing for the max function and then use it to derive the dual. The followingderivation is based on section (5.7.1) in Boyd and Vandenberghe (2004) and section (5.1) in Shalev-Shwartz and Zhang (2014).

φ(x) = maxixi = max

β∈∆

i

βixi

φ?(y) = maxx

x>y − φ(x) = maxx

x>y −maxβ∈∆

β>x = minβ∈∆

maxx

(y − β)>x

where φ? is the convex conjugate of φ. Unless y = β the inner max gives∞. Therefore:

φ?(y) =

{0 y ∈ ∆

∞ ow

Page 11: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

To smooth, we add a regularizer:

φ?γ(y) =

{γ2 ‖y‖2 y ∈ ∆

∞ ow

Going back to the primal:

φγ(x) = maxy

x>y − φ?γ(y) = maxy∈∆

x>y − γ

2‖y‖2

From this we obtain the bound:

maxixi ≤

γ

2+ max

u∈∆

(u>x− γ

2‖u‖2

)

We start from the smoothed dual and show the corresponding primal has the desired form.

minδ

r

maxu∈∆

(u>(θr +A>r δ)−

γ

2‖u‖2

)(12)

where A>r is the reparameterization matrix (and Ar is a marginalization matrix, but without thescaling 1/λ). Next, we rewrite this by introducing auxiliary variables and equality constraints:

minz,δ

r

maxu∈∆

(u>zr −

γ

2‖u‖2

)

s.t. zr(xr) = θr(xr) +A>r,xrδ for all r, xr

The Lagrangian is then:L(z, δ, µ) = φγ(z) + µ>(θ +A>δ − z)

where φγ(z) =∑r φγ(zr). Hence the dual is:

maxµ

minz,δ

φγ(z) + µ>(θ +A>δ − z)

= maxµ

µ>θ + (minzφγ(z)− µ>z

︸ ︷︷ ︸−φ?γ(µ)

) + (minδδ>Aµ)

Unless Aµ = 0, the minδ term goes to −∞, so we get:

maxµ

µ>θ − φ?γ(µ) s.t. Aµ = 0

Notice that Aµ = 0 enforces marginalization constraints.

Now, since φγ(z) =∑r φγ(zr) (each term in the sum has its own exclusive variables zr), the dual

is the sum of duals φ?γ(µ) =∑r φ

?γ(µr). So finally plugging φ?γ(µ) from before we get the primal:

maxµ∈ML

µ>θ − γ

2‖µ‖2

as required.

11

Page 12: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

C Guarantees for Strongly-Convex Dual

Denote by g∗ the optimal value of g(δ), and δ∗ is a minimizer. We similarly define g∗λ and δ∗λ. Wehave:

g∗ = minδg(δ)

≤ g(δ∗λ)

≤ g(δ∗λ) +λ

2‖δ∗λ‖2

= g∗λ

On the other hand, we use a bound on the norm of the optimal solution ‖δ∗‖2 ≤ h, where h =(4Mq‖θ‖∞)2 (see Appendix B.1 in Meshi et al. (2015)).

g∗λ = minδg(δ) +

λ

2‖δ‖2

≤ g(δ∗) +λ

2‖δ∗‖2

= g∗ +λ

2‖δ∗‖2

≤ g∗ +λ

2h

So finally we obtain:

g∗ ≤ g∗λ ≤ g∗ +λ

2h

Note that this proof still holds if we use the smooth gγ instead of g.

D Convergence Rate of Algorithm 1

To analyze the convergence rate of Algorithm 1, we use the following result from Lacoste-Julienet al. [13]:

Theorem D.1. For each t > 0 it holds that f∗λ−E[f

(t)λ

]≤ 2q

t+2q

(C⊗fλ + (f∗λ − f

(0)λ ))

, where C⊗fλis the curvature constant of fλ, and the expectation is over the random choice of factors. Further-more, the duality gap is bounded by: E

[D

(t)λ

]≤ 6q

t+1

(C⊗fλ + (f∗λ − f

(0)λ ))

, for some 0 ≤ t ≤ t.

To use this result, we need to bound the curvature constant of the objective function, denoted byC⊗fλ .It is shown in Lacoste-Julien et al. [13] that in the case of a product domain, the overall curvature isthe sum of block-wise curvature constants: C⊗fλ =

∑r C

rfλ

Furthermore, the curvature constant of a single factor is bounded in terms of the Hessian as follows:

Crfλ ≤ supµ,µ′∈∆×,

(µ′−µ)∈∆r,

z∈[µ,µ′]⊆∆×

(µ′ − µ)>∇2f(z)(µ′ − µ) ,

12

Page 13: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

To use this bound, we compute the Hessian for our problem3 Eq. (8): ∇2µ = λA>A, which is

constant in µ. Using arguments similar to Lemma A.2 in Lacoste-Julien et al. [13], we obtain:

Crfλ ≤ supµ,µ′∈∆×,

(µ′−µ)∈∆r

(µ′ − µ)>(λA>A

)(µ′ − µ)

≤ λ supµ,µ′∈∆×,

(µ′−µ)∈∆r

‖A(µ′ − µ)‖22

≤ 4λ supv∈A∆r

‖v‖22

≤ 4R2

λ

where R = 1 + maxp,rWp

Wris the maximal number of marginalized assignments.

Finally, we have:

C⊗fλ =∑

r

Crfλ ≤ q(

4R2

λ

)= O

( qλ

)

Plugging this in Theorem D.1, we obtain a rate of O( q2

λε ) for both the objective and duality gap.

E Executing Algorithm 1 with Global Factors

To execute Algorithm 1 for global factors, we need to avoid storing µr for the large factors. Weassume those factors have no parents in the region graph, which is sensible. We will maintain thefollowing variables during the run:

δpr(xr) =1

λ(µp(xr)− µr(xr)) ∀r, xr, p : r ∈ p

αr = µ>r θr ∀rβrc(xc) =

xr\xcµr(xr) ∀r, c : c ∈ r

Notice that we never store β variables for regions with no parents (e.g., global).

Now, we explain how Algorithm 1 can be executed when the chosen region r has global scope.First, θδr can be easily computed from the maintained dual variables δ, and then sr can be obtainedby maximization, which is assumed tractable. Second, to compute the step size η we need for thenominator:4

θ>r (sr − µr) = θ>r sr − θ>r µr= θ>r sr − θ>r µr − µ>r (A>r δr)

= θ>r sr − θ>r µr +∑

c

δ>rcβrc

where δr = δr·(·), and Ar is the reparameterization matrix, as before. For the denominator, the firstterm is 0 since Pr = 0. Furthermore,

∑xr\c

sr(xr) is easy to compute since sr is an indicator forthe maximizer, and βrc(xc) =

∑xr\c

µr(xr) is maintained. Finally, the updates to the auxiliary

3Here we actually use the negative of Eq. (8) and treat this as a minimization problem.4To simplify notation we use θr instead of θδr .

13

Page 14: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

variables are:

δrc(xc)← δrc(xc) +η

λ

xr\xcsr(xr)−

η

λβrc(xc) ∀c : c ∈ r

αr ← (1− η)αr + ηθ>r sr

βrc(xc)← (1− η)βrc(xc) + η∑

xr\xcsr ∀c : c ∈ r

F Algorithms with Linear Convergence Rate

In this section we describe the objective functions and algorithms for the smooth and strongly convexvariants (the difference from the basic formulation is marked in blue).

First, we add an L2 term to the smooth dual Eq. (11), obtaining:

minδgγ,λ := gγ(δ)+

λ

2‖δ‖2 (13)

Combining the guarantees of sections 4.1 and 4.2 yields:

g∗ ≤ g∗γ,λ ≤ g∗ +λ

2h+

γ

2q

The gradient then needs to be slightly adjusted:

∇δpr(xr)gγ,λ =

ur(xr)−

xp\xrup(xp)

+λδpr(xr)

Hence we can run gradient-based algorithms with this small modification.

As expected, the primal function corresponding to the smooth and strongly convex dual of Eq. (13)is equivalent to appending an L2 term to the primal in Eq. (8):

maxµ∈∆×

µ>θ − λ

2‖Aµ‖2−γ

2‖µ‖2

To apply dual coordinate ascent [27] (with line search), we make the following modifications inAlgorithm 1. First, we replace sr by the projection onto the simplex ur. Second, we use θδr(xr) =

θδr(xr)−γµr(xr) instead of θδr(xr) when computing the step size:

η =θ>r (ur − µr)

(γ+ 1λPr)‖ur − µr‖2 + 1

λ

∑c:c∈r ‖Arc(ur − µr)‖2

.

Finally, we point out that this algorithm cannot be used with global factors due to the need to storeur.

G Runtime Comparison

In this section we compare the runtime of various MAP inference algorithms for the image segmen-tation problem from Section 5. We show convergence on time scale rather than iteration scale inFig. 3, which is analogous to Fig. 2 (right). We can see that the behavior is very similar to Fig. 2since the cost of an iteration is roughly the same for all algorithms. For MPLP we use the efficientmessage computation from Tarlow et al. (2010). In fact, FW shows slightly better runtime, butthe main reason is the faster computation of the objective value. Computing the objective is fasterbecause we use the FW variant from Appendix E, which maintains dual variables that make thiscomputation very fast.

14

Page 15: Smooth and Strong: MAP Inference with Linear Convergencettic.uchicago.edu/~meshi/papers/strong_map.pdf · Smooth and Strong: MAP Inference with Linear Convergence Ofer Meshi TTI Chicago

100

101

102

103

104

−8

−6

−4

−2

0x 10

5

Time (sec)

Obj

ectiv

e

SubgradientMPLPFW

Figure 3: Same as Fig. 2 (right), but the objective values are shown as a function of runtime insteadof iterations.

References

S. Boyd and L. Vandenberghe. Convex optimization. Cambridge university press, 2004.

O. Meshi, N. Srebro, and T. Hazan. Efficient training of structured SVMs via soft constraints. In AISTATS,2015.

S. Shalev-Shwartz and T. Zhang. Accelerated proximal stochastic dual coordinate ascent for regularized lossminimization. In ICML, 2014.

D. Tarlow, I. Givoni, and R. Zemel. Hop-map: Efficient message passing with high order potentials. InAISTATS, 2010.

15