Barrier Frank-Wolfe for Marginal Inference
Rahul G. Krishnan, Simon Lacoste-Julien, David Sontag
Introduction
Markov random fields (MRFs) are used in many areas of computer science such as vision and speech. Inference in these undirected graphical models is generally intractable. Our work focuses on performing approximate marginal inference by optimizing the Tree Re-Weighted (TRW) objective (Wainwright et al., 2005). The TRW objective is concave, is exact for tree-structured MRFs, and provides an upper bound on the log-partition function.
Fast combinatorial solvers for the TRW objective exist, including Tree-Reweighted Belief Propagation (TRBP) (Wainwright et al., 2005), convergent message-passing based on geometric programming (Globerson and Jaakkola, 2007), and dual decomposition (Jancsary and Matz, 2011). These methods optimize over the set of pairwise consistency constraints, also called the local polytope. Sontag and Jaakkola (2007) showed that significantly better results could be obtained by optimizing over tighter relaxations of the marginal polytope. However, deriving a message-passing algorithm for the TRW objective over tighter relaxations of the marginal polytope is challenging. Instead, Sontag and Jaakkola (2007) use the conditional gradient method (also called Frank-Wolfe) and off-the-shelf linear programming solvers to optimize TRW over the cycle consistency relaxation. Rather than optimizing over the cycle relaxation, Belanger et al. (2013) optimize the TRW objective over the exact marginal polytope. Then, using Frank-Wolfe, the linear minimization performed in the inner loop can be shown to correspond to MAP inference.
The Frank-Wolfe optimization algorithm has seen increasing use in machine learning, thanks in part to its efficient handling of complex constraint sets appearing with structured data (Jaggi, 2013; Lacoste-Julien and Jaggi, 2015). However, applying Frank-Wolfe to variational inference presents challenges that were never resolved in previous work. First, the linear minimization performed in the inner loop is computationally expensive, either requiring repeatedly solving a large linear program, as in Sontag and Jaakkola (2007), or performing MAP inference, as in Belanger et al. (2013). Second, the TRW objective involves entropy terms whose gradients go to infinity near the boundary of the feasible set, therefore existing convergence guarantees for Frank-Wolfe do not apply. Third, variational inference using TRW involves both an outer and inner loop of Frank-Wolfe, where the outer loop optimizes the edge appearance probabilities in the TRW entropy bound to tighten it. Neither Sontag and Jaakkola (2007) nor Belanger et al. (2013) explore the effect of optimizing over the edge appearance probabilities.
Although MAP inference is in general NP hard (Shimony, 1994), it is often possible to find exact solutions to large real-world instances within reasonable running times (Sontag et al., 2008; Allouche et al., 2010; Kappes et al., 2013). Moreover, as we show in our experiments, even approximate MAP solvers can be successfully used within our variational inference algorithm. As MAP solvers improve in their runtime and performance, their iterative use could become feasible and as a byproduct enable more efficient and accurate marginal inference. Our work provides a fast deterministic alternative to recently proposed Perturb-and-MAP algorithms (Papandreou and Yuille, 2011; Hazan and Jaakkola, 2012; Ermon et al., 2013).
Contributions. This paper makes several theoretical and practical innovations. We propose a modification to the Frank-Wolfe algorithm that optimizes over adaptively chosen contractions of the domain and prove its rate of convergence for functions whose gradients can be unbounded at the boundary. Our algorithm does not require a different oracle than standard Frank-Wolfe and could be useful for other convex optimization problems where the gradient is ill-behaved at the boundary.
We instantiate the algorithm for approximate marginal inference over the marginal polytope with the TRW objective. With an exact MAP oracle, we obtain the first provably convergent algorithm for the optimization of the TRW objective over the marginal polytope, which had remained an open problem to the best of our knowledge. Traditional proof techniques of convergence for first order methods fail as the gradient of the TRW objective is not Lipschitz continuous.
We develop several heuristics to make the algorithm practical: a fully-corrective variant of Frank-Wolfe that reuses previously found integer assignments thereby reducing the need for new (approximate) MAP calls, the use of local search between MAP calls, and significant re-use of computations between subsequent steps of optimizing over the spanning tree polytope. We perform an extensive experimental evaluation on both synthetic and real-world inference tasks.
Background
Markov Random Fields: MRFs are undirected probabilistic graphical models where the probability distribution factorizes over cliques in the graph. We consider marginal inference on pairwise MRFs with random variables where each variable takes discrete states . Let be the Markov network with an undirected edge for every two variables and that are connected together. Let refer to the set of neighbors of variable . We organize the edge log-potentials for all possible values of , in the vector , and similarly for the node log-potential vector . We regroup these in the overall vector . We introduce a similar grouping for the marginal vector : for example, gives the coordinate of the marginal vector corresponding to the assignment to variable .
Tree Re-weighted Objective (Wainwright et al., 2005): Let be the partition function for the MRF and be the set of all valid marginal vectors (the marginal polytope). The maximization of the TRW objective gives the following upper bound on the log partition function:
Frank-Wolfe (FW) Algorithm: In recent years, the Frank-Wolfe (aka conditional gradient) algorithm has gained popularity in machine learning (Jaggi, 2013) for the optimization of convex functions over compact domains (denoted ). The algorithm is used to solve by iteratively finding a good descent vertex by solving the linear subproblem:
and then taking a convex step towards this vertex: for a suitably chosen step-size . The algorithm remains within the feasible set (is projection free), is invariant to affine transformations of the domain, and can be implemented in a memory efficient manner. Moreover, the FW gap provides an upper bound on the suboptimality of the iterate . The primal convergence of the Frank-Wolfe algorithm is given by Thm. in Jaggi (2013), restated here for convenience: for , the iterates satisfy:
where is called the “curvature constant”. Under the assumption that is -Lipschitz continuousI.e. for . Notice that the dual norm is needed here. on , we can bound it as .
Optimizing over Contractions of the Marginal Polytope
Motivation: We wish to (1) use the fewest possible MAP calls, and (2) avoid regions near the boundary where the unbounded curvature of the function slows down convergence. A viable option to address (1) is through the use of correction steps, where after a Frank-Wolfe step, one optimizes over the polytope defined by previously visited vertices of (called the fully-corrective Frank-Wolfe (FCFW) algorithm and proven to be linearly convergence for strongly convex objectives (Lacoste-Julien and Jaggi, 2015)). This does not require additional MAP calls. However, we found (see Sec. 5) that when optimizing the TRW objective over , performing correction steps can surprisingly hurt performance. This leaves us in a dilemma: correction steps enable decreasing the objective without additional MAP calls, but they can also slow global progress since iterates after correction sometimes lie close to the boundary of the polytope (where the FW directions become less informative). In a manner akin to barrier methods and to Garber and Hazan (2013)’s local linear oracle, our proposed solution maintains the iterates within a contraction of the polytope. This gives us most of the mileage obtained from performing the correction steps without suffering the consequences of venturing too close to the boundary of the polytope. We prove a global convergence rate for the iterates with respect to the true solution over the full polytope.
We describe convergent algorithms to optimize for . The approach we adopt to deal with the issue of unbounded gradients at the boundary is to perform Frank-Wolfe within a contraction of the marginal polytope given by for , with either a fixed or an adaptive .
, where is the vector representing the uniform distribution.
Marginal vectors that lie within are bounded away from zero as all the components of are strictly positive. Denoting as the set of vertices of , as the set of vertices of and , the key insight that enables our novel approach is that:
Therefore, to solve the FW subproblem (3) over , we can run as usual a MAP solver and simply shift the resulting vertex of towards to obtain a vertex of . Our solution to optimize over restrictions of the polytope is more broadly applicable to the optimization problem defined below, with satisfying Prop. 3.3 (satisfied by the TRW objective) in order to get convergence rates.
Solve where is a compact convex set and is convex and continuously differentiable on the relative interior of .
(Controlled growth of Lipschitz constant over ). We define for a fixed in the relative interior of . We suppose that there exists a fixed and such that for any , has a bounded Lipschitz constant .
Fixed : The first algorithm fixes a value for a-priori and performs the optimization over . The following theorem bounds the sub-optimality of the iterates with respect to the optimum over .
Let satisfy the properties in Prob. 3.2 and Prop. 3.3, and suppose further that is finite on the boundary of . Then the use of Frank-Wolfe for realizes a sub-optimality over bounded as:
where is the optimal solution in , , and is the modulus of continuity function of the (uniformly) continuous (in particular, as ).
Adaptive : The second variant to solve iteratively perform FW steps over , but also decreases adaptively. The update schedule for is given in Alg. 1 and is motivated by the convergence proof. The idea is to ensure that the FW gap over is always at least half the FW gap over , relating the progress over with the one over . It turns out that , where the “uniform gap” quantifies the decrease of the function when contracting towards . When is negative and large compared to the FW gap, we need to shrink (see step 5 in Alg. 1) to ensure that the -modified direction is a sufficient descent direction.
We can show that the algorithm converges to the global solution as follows:
For a function satisfying the properties in Prob. 3.2 and Prop. 3.3, the sub-optimality of the iterates obtained by running the FW updates over with updated according to Alg. 1 is bounded as:
A full proof with a precise rate and constants is given in App. D. The sub-optimality traverses three stages with an overall rate as above. The updates to as in Alg. 1 enable us to (1) upper bound the duality gap over as a function of the duality gap in and (2) lower bound the value of as a function of . Applying the standard Descent Lemma with the Lipschitz constant on the gradient of the form (Prop. 3.3), and replacing by its bound in , we get the recurrence: . Solving this gives us the desired bound.
Application to the TRW Objective: is akin to and the (strong) convexity of has been previously shown (Wainwright et al., 2005; London et al., 2015). The gradient of the TRW objective is Lipschitz continuous over since all marginals are strictly positive. Its growth for Prop. 3.3 can be bounded with as we show in App. E.1. This gives a rate of convergence of for the adaptive- variant, which interestingly is a typical rate for non-smooth convex optimization. The hidden constant is of the order . The modulus of continuity for the TRW objective is close to linear (it is almost a Lipschitz function), and its constant is instead of the order .
Algorithm
We detail a few heuristics that aid practicality.
Fast Local Search: Fast methods for MAP inference such as Iterated Conditional Modes (Besag, 1986) offer a cheap, low cost alternative to a more expensive combinatorial MAP solver. We warm start the ICM solver with the last found vertex of the marginal polytope. The subroutine LOCALSEARCH (Alg. 6 in Appendix) performs a fixed number of FW updates to the pseudomarginals using ICM as the (approximate) MAP solver.
Re-optimizing over the Vertices of (FCFW algorithm): As the iterations of FW progress, we keep track of the vertices of the marginal polytope found by Alg. 2 in the set . We make use of these vertices in the CORRECTION subroutine (Alg. 5 in Appendix) which re-optimizes the objective function over (a contraction of) the convex hull of the elements of (called the correction polytope). in Alg. 2 is initialized to the uniform distribution which is guaranteed to be in (and ). After updating , we set to the approximate minimizer in the correction polytope. The intuition is that changing by a small amount may not substantially modify the optimal (for the new ) and that the new optimum might be in the convex hull of the vertices found thus far. If so, CORRECTION will be able to find it without resorting to any additional MAP calls. This encourages the MAP solver to search for new, unique vertices instead of rediscovering old ones.
Approximate MAP Solvers: We can swap out the exact MAP solver with an approximate MAP solver. The primal objective plus the (approximate) duality gap may no longer be an upper bound on the log-partition function (black-box MAP solvers could be considered to optimize over an inner bound to the marginal polytope). Furthermore, the gap over may be negative if the approximate MAP solver fails to find a direction of descent. Since adaptive- requires that the gap be positive in Alg. 1, we take the max over the last gap obtained over the correction polytope (which is always non-negative) and the computed gap over as a heuristic.
Theoretically, one could get similar convergence rates as in Thm. 3.4 and 3.5 using an approximate MAP solver that has a multiplicative guarantee on the gap (line 8 of Alg. 2), as was done previously for FW-like algorithms (see, e.g., Thm. C.1 in Lacoste-Julien et al. (2013)). With an -additive error guarantee on the MAP solution, one can prove similar rates up to a suboptimality error of . Even if the approximate MAP solver does not provide an approximation guarantee, if it returns an upper bound on the value of the MAP assignment (as do branch-and-cut solvers for integer linear programs, or Sontag et al. (2008)), one can use this to obtain an upper bound on (see App. J).
Experimental Results
Setup: The L1 error in marginals is computed as: . When using exact MAP inference, the error in (denoted ) is computed by adding the duality gap to the primal (since this guarantees us an upper bound). For approximate MAP inference, we plot the primal objective. We use a non-uniform initialization of computed with the Matrix Tree Theorem (Sontag and Jaakkola, 2007; Koo et al., 2007). We perform 10 updates to , optimize to a duality gap of on , and always perform correction steps. We use LOCALSEARCH only for the real-world instances. We use the implementation of TRBP and the Junction Tree Algorithm (to compute exact marginals) in libDAI (Mooij, 2010). Unless specified, we compute marginals by optimizing the TRW objective using the adaptive- variant of the algorithm (denoted in the figures as .
MAP Solvers: For approximate MAP, we run three solvers in parallel: QPBO (Kolmogorov and Rother, 2007; Boykov and Kolmogorov, 2004), TRW-S (Kolmogorov, 2006) and ICM (Besag, 1986) using OpenGM (Andres et al., 2012) and use the result that realizes the highest energy. For exact inference, we use Gurobi Optimization (2015) or toulbar2 (Allouche et al., 2010).
Test Cases: All of our test cases are on binary pairwise MRFs. (1) Synthetic 10 nodes cliques: Same setup as Sontag and Jaakkola (2007, Fig. 2), with sets of instances each with coupling strength drawn from for . (2) Synthetic Grids: trials with grids. We sample and for nodes and edges. The potentials were for nodes and for edges. (3) Restricted Boltzmann Machines (RBMs): From the Probabilistic Inference Challenge 2011.http://www.cs.huji.ac.il/project/PASCAL/index.php (4) Horses: Large () MRFs representing images from the Weizmann Horse Data (Borenstein and Ullman, 2002) with potentials learned by Domke (2013). (5) Chinese Characters: An image completion task from the KAIST Hanja2 database, compiled in OpenGM by Andres et al. (2012). The potentials were learned using Decision Tree Fields (Nowozin et al., 2011). The MRF is not a grid due to skip edges that tie nodes at various offsets. The potentials are a combination of submodular and supermodular and therefore a harder task for inference algorithms.
On the Optimization of versus
On the Applicability of Approximate MAP Solvers
Horses: See Fig. 2 (right). The models are close to submodular and the local relaxation is a good approximation to the marginal polytope. Our marginals are visually similar to those obtained by TRBP and our algorithm is able to scale to large instances by using approximate MAP solvers.
Related Work for Marginal Inference with MAP Calls
Hazan and Jaakkola (2012) estimate by averaging MAP estimates obtained on randomly perturbed inflated graphs. Our implementation of the method performed well in approximating but the marginals (estimated by fixing the value of each random variable and estimating for the resulting graph) were less accurate than our method (Fig. 1(e), 1(f)).
Discussion
Our work creates a flexible, modular framework for optimizing a broad class of variational objectives, not simply TRW, with guarantees of convergence. We hope that this will encourage more research on building better entropy approximations. The framework we adopt is more generally applicable to optimizing functions whose gradients tend to infinity at the boundary of the domain.
Our method to deal with gradients that diverge at the boundary bears resemblance to barrier functions used in interior point methods insofar as they bound the solution away from the constraints. Iteratively decreasing in our framework can be compared to decreasing the strength of the barrier, enabling the iterates to get closer to the facets of the polytope, although its worthwhile to note that we have an adaptive method of doing so.
Acknowledgements
RK and DS gratefully acknowledge the support of the Defense Advanced Research Projects Agency (DARPA) Probabilistic Programming for Advancing Machine Learning (PPAML) Program under Air Force Research Laboratory (AFRL) prime contract no. FA8750-14-C-0005. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the view of DARPA, AFRL, or the US government.
References
Appendix A Preliminaries
The supplementary material is divided into two parts:
(1) The first part is dedicated to the exposition of the theoretical results presented in the main paper. Section B details the variants of the Frank-Wolfe algorithm that we used and analyzed. Section C gives the proof to Theorem 3.4 (fixed ) while Section D gives the proof to Theorem 3.5 (adaptive ). Finally, Section E applies the convergence theorem to the TRW objective and investigates the relevant constants.
(2) The remainder of the supplementary material provides more information about the experimental setup as well as additional experimental results.
A.2 Descent Lemma
The following descent lemma is proved in \citesupbertsekas1999nonlinear (Prop. A24) and is standard for any convergence proof of first order methods. We provide a proof here for completeness. It also highlights the origin of the requirement that we use dual norm pairings between and the gradient of (because of the generalized Cauchy-Schwartz inequality).
Rearranging terms, we get the desired bound. ∎
Appendix B Frank-Wolfe Algorithms
In this section, we present the various algorithms that we use to do fully corrective Frank-Wolfe (FCFW) with adaptive contractions over the domain , as was done in our experiments.
To implement the approximate correction steps in the fully corrective Frank-Wolfe (FCFW) algorithm, we use the Frank-Wolfe algorithm with away steps \citepsupWolfe:1970wy, also known as the modified Frank-Wolfe (MFW) algorithm \citepsupGuelat:1986fq. We give pseudo-code for MFW in Algorithm 3 (taken from (Lacoste-Julien and Jaggi, 2015)). This variant of Frank-Wolfe adds the possibility to do an “away step” (see step 5 in Algorithm 3) in order to avoid the zig zagging phenomenon that slows down Frank-Wolfe when the solution is close to the boundary of the polytope. For a strongly convex objective (with Lipschitz continuous gradient), the MFW was known to have asymptotic linear convergence \citepsupGuelat:1986fq and its global linear convergence rate was shown recently (Lacoste-Julien and Jaggi, 2015), accelerating the slow general sublinear rate of Frank-Wolfe. When performing a correction over the convex hull over a (somewhat small) set of vertices of , this convergence difference was quite significant in our experiments (MFW converging in a small number of iterations to do an approximate correction vs. FW taking hundreds of iterations to reach a similar level of accuracy). We note that the TRW objective is strongly convex when all the edge probabilities are non-zero (Wainwright et al., 2005); and that it has Lipschitz gradient over (but not ).
The gap computed in step 6 of Algorithm 3 is non-standard; it is a sufficient condition to ensure the global linear convergence of the outer FCFW algorithm when using Algorithm 3 as a subroutine to implement the approximate correction step. See Lacoste-Julien and Jaggi (2015) for more details.
The MFW algorithm requires more bookkeeping than standard FW: in addition to the current iterate , it also maintains both the active set (to search for the “away vertex”) as well as the barycentric coordinates (to know what are the away step-sizes that ensure feasibility – see step 13) i.e. .
B.2 Fully Corrective Frank-Wolfe (FCFW) with Adaptive-δ𝛿\delta
We give in Algorithm 4 the pseudo-code to perform fully corrective Frank-Wolfe optimization over by iteratively optimizing over with adaptive- updates. If is kept constant (skipping step 10), then Algorithm 4 implements the fixed variant over . We describe the algorithm as maintaining the correction set of atoms over (rather than ), as is constantly changing. One can easily move back and forth between and its contraction , and so we note that an efficient implementation might work with either representation cheaply (for example, by storing only and , not the perturbed version of the correction polytope). The approximate correction over is implemented using the MFW algorithm described in Algorithm 3, which requires a barycentric representation of the current iterate over the correction polytope . Our notation in Algorithm 4 uses the elements of as indices, rather than their contracted version; that is, we maintain the property that . As changes when changes, we need to update the barycentric representation of accordingly – this is done in step 11 with the following equation. Suppose that we decrease to . Then the old coordinates can be updated to new coordinates for the new contraction polytope as follows:
This ensures that , where , and that the coordinates form a valid convex combination (assuming that ), as can be readily verified.
Appendix C Bounding the Sub-optimality for Fixed δ𝛿\delta Variant
The pseudocode for optimizing over for a fixed is given in Algorithm 4 (by ignoring the step 10 which updates ). It is stated with a stopping criterion , but it can alternatively be run for a fixed number of iterations. The following theorem bounds the suboptimality of the iterates with respect to the true optimum over . If one can compute the constants in the theorem, one can choose a target contraction amount to guarantee a specific suboptimality of ; otherwise, one can choose using heuristics. Note that unlike the adaptive- variant, this algorithm does not converge to the true solution as unless happens to belong to . But the error can be controlled by choosing small enough.
Let satisfy the properties in Problem 3.2 and suppose its gradient is Lipschitz continuous on the contractions as in Property 3.3. Suppose further that is finite on the boundary of .
Then is uniformly continuous on and has a modulus of continuity function quantifying its level of continuity, i.e. , with as .
Let be an optimal point of over . The iterates of the FCFW algorithm as described in Algorithm 4 for a fixed has sub-optimality over bounded as:
where . Note that different norms can be used in the definition of and .
Let be an optimal point of over . As has a Lipschitz continuous gradient over , we can use any standard convergence result of the Frank-Wolfe algorithm to bound the suboptimality of the iterate over . Algorithm 4 (with a fixed ) describes the FCFW algorithm which guarantees at least as much progress as the standard FW algorithm (by step 15 and 20a), and thus we can use the convergence result from Jaggi (2013) as already stated in (4): with , where comes from Property 3.3. This gives the first term in (7). Note that if the function is strongly convex, then the FCFW algorithm has also a linear convergence rate (Lacoste-Julien and Jaggi, 2015), though we do not cover this here.
Finally, we explain why is uniformly continuous. As is a (lower semi-continuous) convex function, it is continuous at every point where it is finite. As is said to be finite at its boundary (and it is obviously finite in the relative interior of as it is continuously differentiable there), then is continuous over the whole of . As is compact, this means that is also uniformly continuous over . ∎
We note that the modulus of continuity function quantifies the level of continuity of . For a Lipschitz continuous function, we have . If instead we have for some , then is actually -Hölder continuous. We will see in Section E.2 that the TRW objective is not Lipschitz continuous, but it is -Hölder continuous for any , and so is “almost” Lipschitz continuous. From the theorem, we see that to get an accuracy of the order , we would need , and thus a contraction of .
Appendix D Convergence with Adaptive-δ𝛿\delta
In this section, we show the convergence of the adaptive- FW algorithm to optimize a function satisfying the properties in Problem 3.2 and Property 3.3 (Lipschitz gradient over with bounded growth).
The adaptive update for (given in Algorithm 1) can be used with the standard Frank-Wolfe optimization algorithm or also the fully corrective Frank-Wolfe (FCFW) variant. In FCFW, we ensure that every update makes more progress than a standard FW step with line-search, and thus we will show the convergence result in this section for standard FW (which also applies to FCFW). We describe the FCFW variant with approximate correction steps in Algorithm 4, as this is what we used in our experiments.
We first list a few definitions and lemmas that will be used for the main convergence convergence result given in Theorem D.6. We begin with the definitions of duality gaps that we use throughout this section. The Frank-Wolfe gap is our primary criterion for halting and measuring the progress of the optimization over . The uniform gap is a measure of the decrease obtainable from moving towards the uniform distribution.
The Frank-Wolfe (FW) gap is defined as: .
The uniform gap is defined as: .
The FW gap over is: .
The name for the uniform gap comes from the fact that the FW gap over can be expressed as a convex combination of the FW gap over and the uniform gap:
For iterates progressing as in Algorithm 4 with adaptive update on as given in Algorithm 1, the gap over and are related as : .
The duality gaps and computed as defined in (D.1) during Algorithm 4 are related by equation (8).
(2) When , from the update rule in lines 5 to 7 in Algorithm 1, we have . Therefore, .
Therefore, the gap over and are related as : . ∎
Another property that we will use in the convergence proof is that is upper bounded for any convex function :Note that on the other hand, might go to infinity as gets close to the boundary of as the gradient of is allowed to be unbounded. Fortunately, we only need an upper bound on , not a lower bound.
Let be a continuously differentiable convex function on the relative interior of . Then for any fixed in the relative interior of , s.t.
In particular, we can take the finite value:
As is convex, its directional derivative is a monotone increasing function in any direction. Let and be points in the relative interior of ; then their gradient exists and we have by the monotonicity property:
This inequality is valid for all in the relative interior of , and can be extended to the boundary by taking limits (with potentially the RHS become minus infinity, but this is not a problem). Finally, by the definition of the dual norm (generalized Cauchy-Schwartz), we have . ∎
Finally, we need a last property of Algorithm 4 that allows us to bound the amount of perturbation of the polytope at every iteration as a function of the sub-optimality over .
Let be a bound such that for all (given by Lemma D.3). Then at every stage of Algorithm 4, we have that:
For the last equality, we used the fact that is non-increasing since Algorithm 4 decreases the objective at every iteration (using the line-search in step 14). ∎
We now bound the generalization of a standard recurrence that will arise in the proof of convergence. This is a generalization of the technique used in \citetsupteo2007erm (also used in the context of Frank-Wolfe in the proof of Theorem C.4 in Lacoste-Julien et al. (2013)). The basic idea is that one can bound a recurrence inequality by the solution to a differential equation. We provide a detailed proof of the bound for completeness here.
Let . Suppose that is any non-negative sequence that satisfies the recurrence inequality:
Then is strictly decreasing (unless it equals zero) and can be bounded for as:
Taking the continuous time analog of the recurrence inequality, we consider the differential equation:
Finally, whenever , we have that from the recurrence inequality, and so is strictly decreasing as claimed. ∎
Consider the optimization of satisfying the properties in Problem 3.2 and Property 3.3. Let , where is from Property 3.3. Let be the upper bound on the negative uniform gap: for all , as used in Lemma D.4 (arising from Lemma D.3). Then the iterates obtained by running the Frank-Wolfe updates over with line-search with updated according to Algorithm 1 (or as summarized in a FCFW variant in Algorithm 4), have suboptimality upper bounded as:
for such that ,
for such that ,
for such that ,
Let with defined in step 12 in Algorithm 4. Note that with for all . We apply the Descent Lemma A.1 on this update to get:
We have by assumption and by definition. Moreover, is defined to make at least as much progress than the line-search result (line 14 and 15), and so we have:
For the final inequality, we used Lemma D.2 which relates the gap over to the gap over .
Subtracting from both sides and using by convexity, we get:
Stage 1: The in the denominator is and is big: .
Stage 2: The in the denominator is and is small: .
Stage 3: The in the denominator is , i.e.: .
Since is decreasing, once we leave a stage, we no longer re-enter it. The overall strategy for each stage is as follows. For each recurrence that we get, we select a that realizes the tightest upper bound on it.
Since we are restricted that , we have to consider when and . For the former, we bound the recurrence obtained by substituting into (11). For the latter, we substitute the form of into the recurrence and bound the result.
We consider the case where . This yields:
The bound is minimized by setting . On the other hand, the bound is only valid for , and thus if , i.e. (stage 1), then will yield the minimum feasible value for the bound. Unrolling the recursion (12) for during this stage (where for as is decreasing), we get:
giving the bound for the iterates in the first stage.
We can compute an upper bound on the number of steps it takes to reach a suboptimality of by looking at the minimum which ensures that the bound in (13) becomes smaller than , yielding . Therefore, let be the first such that .
Stage 2
In stage 2, we suppose that . This means that .
Substituting into (12) yields: .
Using the result of Lemma D.5 with , and , we get the bound:
It is worthwhile to point out at this juncture that the bound obtained for stage is the same as the one for regular Frank-Wolfe, but with a factor of worse due to the factor of in front of the FW gap which appeared due to Lemma D.2.
Stage 3
Here, we suppose . We can compute a bound on the number of steps needed get to stage 3 by looking at the number of steps it takes for the bound in stage 2 to becomes less than :
As before, moving forward, our notation on represents the number of steps taken after steps.
Then, the master inequality (11) becomes:
To simplify the rest of the analysis, we replace with . We then get the bound:
which is minimized by setting . Since (by construction) and (by the condition to be in stage 3), we necessarily have that . We chose the value of to avoid having to consider the possibility as we did in the distinction between stage 1 and stage 2.
Hence, substituting in (14), we get:
Using the result of Lemma D.5 with , and , we get the bound:
Interestingly, the obtained rate of for (for the TRW objective e.g.) is the standard rate that one would get for the optimization of a general non-smooth convex function with the projected subgradient method (and it is even a lower bound for some class of first-order methods; see e.g. Section 3.2 in \citetsupnesterov2004lectures). The fact that our function does not have Lipschitz continuous gradient on the whole domain brings us back to the realm of non-smooth optimization. It is an open question whether Algorithm 4 has an optimal rate for the class of functions defined in the assumptions of Theorem D.6.
Appendix E Properties of the TRW Objective
In this section, we explicitly compute bounds for the constants appearing in the convergence statements for our fixed- and adaptive- algorithms for the optimization problem given by:
In particular, we compute the Lipschitz constant for its gradient over (Property 3.3), we give a form for its modulus of continuity function (used in Theorem 3.4), and we compute , the upper bound on the negative uniform gap (as used in Lemma D.3).
We first motivate our choice of norm over . Recall that can be decomposed into blocks, with one pseudo-marginal vector for each node , and one vector per edge , where is the probability simplex over values. We let be the cliques in the graph (either nodes or edges). From its definition in (2), decomposes as a separable sum of functions of each block only:
where is if and if . The function also decomposes as a separable sum:
We first consider one scalar component of the separable function given in (16) (i.e. for one coordinate). Its derivative is with second derivative . If , then we have , where is the number of possible values that the assignment variable can take. Thus for , we have that the -component of is Lipschitz continuous with constant . We thus have:
The Lipschitz constant is thus indeed with . Let us first consider the sum for ; we have . Thus:
Here we used the fact that came from the marginal probability of edges of spanning trees (and so with edges). Similarly, we have . Combining these we get:
E.2 Modulus of Continuity Function
We begin by computing a modulus of continuity function for with an additive linear term.
Let . Consider such that , then:
Without loss of generality assume , then we have two cases:
Case i. If , then we have that the Lipschitz constant of is (obtained by taking the supremum of its derivative). Therefore, we have that . Note that when even if , since grows logarithmically.
Case ii. If , then . Therefore:
Now, we have that is non-negative for . Furthermore, we have that is increasing when and decreasing afterwards. First suppose that ; then which implies:
In the case , then we have:
Combining these two possibilities, we get:
For small , the dominant term of the function in Lemma E.2 is of the form for a constant . If we require that this be smaller than some small , then we can choose an approximate by solving for in yielding where is the negative branch of the Lambert W-function. This is almost linear and yields approximately for small . In fact, we have that for any , and thus is “almost” Lipschitz continuous.
That is, for with , we have:
can be decomposed into functions of the form (see (15) and (16)) and so we apply the Lemma E.2 element-wise. Let index the clique component in the marginal vector.
where we recall is the number of values that can take. By re-using the bound on from (18), we get the result. ∎
E.3 Bounded Negative Uniform Gap
For the negative TRW objective , the bound on the negative uniform gap as given in Lemma D.3 for being the uniform distribution can be taken as:
E.4 Summary
We now give the details of suboptimality guarantees for our suggested algorithm to optimize over . The (strong) convexity of the negative TRW objective is shown in (Wainwright et al., 2005; London et al., 2015). is the convex hull of a finite number of vectors representing assignments to random variables and therefore a compact convex set. The entropy function is continously differentiable on the relative interior of the probability simplex, and thus the TRW objective has the same property on the relative interior of . Thus satisfies the properties laid out in Problem 3.2.
For the optimization of over with , the suboptimality is bounded as:
Using , and from Lemma E.1, we can compute . Lemma E.3 computes the modulus of continuity . The rate then follows directly from Theorem C.1. ∎
Consider the optimization of over with the optimum given by . The iterates obtained by running the Frank-Wolfe updates over using line-search with updated according to Algorithm 1 (or as summarized in a FCFW variant in Algorithm 4), have suboptimality upper bounded as:
for such that ,
for such that ,
for such that ,
and are the number of steps to reach stage 2 and 3 respectively which are bounded as:
Using , we bound with (from Property 3.3) derived in Lemma E.1. We bound (the upper bound on the negative uniform gap) using the value derived in Lemma E.4. The rate then follows directly from Theorem D.6 using (see Lemma E.1 where ). ∎
The dominant term in Lemma E.6 is , with . We thus find that both bounds depend on norms of . This is unsurprising since large potentials drive the solution of the marginal inference problem away from the centre of , corresponding to regions of high entropy, and towards the boundary of the polytope (lower entropy). Regions of low entropy correspond to smaller components of the marginal vector, which in turn result in larger and poorly behaved gradients of , which slows down the resulting optimization.
Appendix F Correction and Local Search Steps in Algorithm 2
Algorithm 5 details the CORRECTION procedure used in line 16 of Algorithm 2 to implement the correction step of the FCFW algorithm. It uses the modified Frank-Wolfe algorithm (FW with away steps), as detailed in Algorithm 3. Algorithm 6 depicts the LOCALSEARCH procedure used in line 17 of Algorithm 2. The local search is performing FW over for a fixed using the iterated conditional mode algorithm as an approximate FW oracle. This enables the finding in a cheap of way of more vertices to augment the correction polytope .
Appendix G Comparison to perturbAndMAP
Perturb & MAP. We compared the performance between our method and perturb & MAP for inference on node Synthetic cliques. We expand on the method we used to evaluate perturbAndMAP in Figure 1(e) and 1(f). We re-implemented the algorithm to estimate the partition function in Python (as described in Hazan and Jaakkola (2012), Section 4.1) and used toulbar2 (Allouche et al., 2010) to perform MAP inference over an inflated graph where every variable maps to five new variables. The log partition function is estimated as the mean energy of 10 exact MAP calls on the expanded graph where the single node potentials are perturbed by draws from the Gumbel distribution. To extract marginals, we fix the value of a variable to every assignment, estimate the log partition function of the conditioned graph and compute beliefs based on averaging the results of adding the unary potentials to the conditioned values of the log partition function.
Appendix H Correction Steps for Frank-Wolfe over ℳℳ\mathcal{M}
Recall that the correction step is done over the correction polytope, the set of all vertices of encountered thus far in the algorithm. On experiments conducted over , we found that using a better correction algorithm often hurt performance. This potentially arises in other constrained optimization problems where the gradients are unbounded at the boundaries of the polytope. We found that better correction steps over the correction polytope (the convex hull of the vertices explored by the MAP solver, denoted in Algorithm 2), often resulted in a solution at or near a boundary of the marginal polytope (shared with the correction polytope). This resulted in the iterates becoming too small. We know that the Hessian of is ill conditioned near the boundaries of the marginal polytope. Therefore, we hypothesize that this is because the gradient directions obtained when the iterates became too small are simply less informative. Consequently, the optimization over suffered. We found that the duality gap over would often increase after a correction step when this phenomenon occurred. The variant of our algorithm based on is less sensitive to this issue since the restriction of the polytope bounds the smallest marginal and therefore also controls the quality of the gradients obtained.
Appendix I Additional Experiments
Figure 5(a), 5(b) depicts the comparison of convergence of algorithm variants over and (same setup as Figure 1(a), 1(b). Here, we plot .
Appendix J Bounding logZ𝑍\log Z with Approximate MAP Solvers
Suppose that we use an approximate MAP solver for line 7 of Algorithm 2. We show in this section that if the solver returns an upper bound on the value of the MAP assignment (as do branch-and-cut solvers for integer linear programs), we can use this to get an upper bound on . For notational consistency, we consider using Algorithm 2 for , where is convex, , and .
The property that the duality gap may be used as a certificate of optimality (Jaggi, 2013) gives us:
Adding the gap onto the TRW objective yields an upper bound on the optimum (which from Equation 1 is an upper bound on ), i.e. . From our definition of the duality gap (line 8 in Algorithm 2) and (24), we have:
where (line 7 in Algorithm 2). Thus, if the approximate MAP solver returns an upper bound such that , then we get the following upper bound on the log-partition function: