{"title": "Simple MAP Inference via Low-Rank Relaxations", "book": "Advances in Neural Information Processing Systems", "page_first": 3077, "page_last": 3085, "abstract": "We focus on the problem of maximum a posteriori (MAP) inference in Markov random fields with binary variables and pairwise interactions. For this common subclass of inference tasks, we consider low-rank relaxations that interpolate between the discrete problem and its full-rank semidefinite relaxation, followed by randomized rounding. We develop new theoretical bounds studying the effect of rank, showing that as the rank grows, the relaxed objective increases but saturates, and that the fraction in objective value retained by the rounded discrete solution decreases. In practice, we show two algorithms for optimizing the low-rank objectives which are simple to implement, enjoy ties to the underlying theory, and outperform existing approaches on benchmark MAP inference tasks.", "full_text": "Simple MAP Inference via Low-Rank Relaxations\n\nRoy Frostig\u21e4,\nComputer Science Department, Stanford University, Stanford, CA, 94305\n\nPercy Liang, Christopher D. Manning\n\nSida I. Wang,\u21e4\n\n{rf,sidaw,pliang}@cs.stanford.edu, manning@stanford.edu\n\nAbstract\n\nWe focus on the problem of maximum a posteriori (MAP) inference in Markov\nrandom \ufb01elds with binary variables and pairwise interactions. For this common\nsubclass of inference tasks, we consider low-rank relaxations that interpolate be-\ntween the discrete problem and its full-rank semide\ufb01nite relaxation. We develop\nnew theoretical bounds studying the effect of rank, showing that as the rank grows,\nthe relaxed objective increases but saturates, and that the fraction in objective value\nretained by the rounded discrete solution decreases. In practice, we show two algo-\nrithms for optimizing the low-rank objectives which are simple to implement, enjoy\nties to the underlying theory, and outperform existing approaches on benchmark\nMAP inference tasks.\n\n1\n\nIntroduction\n\nMaximum a posteriori (MAP) inference in Markov random \ufb01elds (MRFs) is an important problem\nwith abundant applications in computer vision [1], computational biology [2], natural language\nprocessing [3], and others. To \ufb01nd MAP solutions, stochastic hill-climbing and mean-\ufb01eld inference\nare widely used in practice due to their speed and simplicity, but they do not admit any formal\nguarantees of optimality. Message passing algorithms based on relaxations of the marginal polytope\n[4] can offer guarantees (with respect to the relaxed objective), but require more complex bookkeeping.\nIn this paper, we study algorithms based on low-rank SDP relaxations which are both remarkably\nsimple and capable of guaranteeing solution quality.\nOur focus is on MAP in a restricted but common class of models, namely those over binary variables\ncoupled by pairwise interactions. Here, MAP can be cast as optimizing a quadratic function over\nthe vertices of the n-dimensional hypercube: maxx2{1,1}n xTAx. A standard optimization strategy\nis to relax this integer quadratic program (IQP) to a semide\ufb01nite program (SDP), and then round\nthe relaxed solution to a discrete one achieving a constant factor approximation to the IQP optimum\n[5, 6, 7]. In practice, the SDP can be solved ef\ufb01ciently using low-rank relaxations [8] of the form\nmaxX2Rn\u21e5k tr(X>AX).\nThe \ufb01rst part of this paper is a theoretical study of the effect of the rank k on low-rank relaxations of\nthe IQP. Previous work focused on either using SDPs to solve IQPs [5] or using low-rank relaxations\nto solve SDPs [8]. We instead consider the direct link between the low-rank problem and the IQP. We\nshow that as k increases, the gap between the relaxed low-rank objective and the SDP shrinks, but\nvanishes as soon as k  rank(A); our bound adapts to the problem A and can thereby be considerably\nbetter than the typical data-independent bound of O(pn) [9, 10]. We also show that the rounded\nobjective shrinks in ratio relative to the low-rank objective, but at a steady rate of \u21e5(1/k) on average.\nThis result relies on the connection we establish between IQP and low-rank relaxations. In the end,\nour analysis motivates the use of relatively small values of k, which is advantageous from both a\nsolution quality and algorithmic ef\ufb01ciency standpoint.\n\n\u21e4Authors contributed equally.\n\n1\n\n\fThe second part of this paper explores the use of very low-rank relaxation and randomized rounding\n(R3) in practice. We use projected gradient and coordinate-wise ascent for solving the R3 relaxed\nproblem (Section 4). We note that R3 interfaces with the underlying problem in an extremely simple\nway, much like Gibbs sampling and mean-\ufb01eld: only a black box implementation of x 7! Ax is\nrequired. This decoupling permits users to customize their implementation based on the structure\nof the weight matrix A: using GPUs for dense A, lists for sparse A, or much faster specialized\nalgorithms for A that are Gaussian \ufb01lters [11]. In contrast, belief propagation and marginal polytope\nrelaxations [2] need to track messages for each edge or higher-order clique, thereby requiring more\nmemory and a \ufb01ner-grained interface to the MRF that inhibits \ufb02exibility and performance.\nFinally, we introduce a comparison framework for algorithms via the x 7! Ax interface, and use it to\ncompare R3 with annealed Gibbs sampling and mean-\ufb01eld on a range of different MAP inference\ntasks (Section 5). We found that R3 often achieves the best-scoring results, and we provide some\nintuition for our advantage in Section 4.1.\n\n2 Setup and background\n\nNotation We write Sn for the set of symmetric n \u21e5 n real matrices and S k for the unit sphere\n{x 2 Rk : kxk2 = 1}. All vectors are columns unless stated otherwise. If X is a matrix, then\nXi 2 R1\u21e5k is its i\u2019th row.\nThis section reviews how MAP inference on binary graphical models with pairwise interactions can\nbe cast as integer quadratic programs (IQPs) and approximately solved via semide\ufb01nite relaxations\nand randomized rounding. Let us begin with the de\ufb01nition of an IQP:\nDe\ufb01nition 2.1. Let A 2 Sn be a symmetric n \u21e5 n matrix. An (inde\ufb01nite) integer quadratic program\n(IQP) is the following optimization problem:\n\nmax\n\nx2{1,1}n\n\nIQP(x) def= xTAx\n\n(1)\n\nSolving (1) is NP-complete in general: the MAX-CUT problem immediately reduces to it [5]. With\nan eye towards tractability, consider a \ufb01rst candidate relaxation: maxx2[1,1]n xTAx. This relaxation\nis always tight in that the maxima of the relaxed objective and original objective (1) are equal.1\nTherefore it is just as hard to solve. Let us then replace each scalar xi 2 [1, 1] with a unit vector\nXi 2 Rk and de\ufb01ne the following low-rank problem (LRP):\nDe\ufb01nition 2.2. Let k 2 {1, . . . , n} and A 2 Sn. De\ufb01ne the low-rank problem LRPk by:\n\nLRPk(X) def= tr(X TAX)\nmax\nX2Rn\u21e5k\nsubject to kXik2 = 1, i = 1, . . . , n.\n\n(2)\n\nNote that setting Xi = [xi, 0, . . . , 0] 2 Rk recovers (1). More generally, we have a sequence of\nsuccessively looser relaxations as k increases. What we get in return is tractability. The LRPk\nobjective generally yields a non-convex problem, but if we take k = n, the objective can be rewritten\nas tr(X>AX) = tr(AXX>) = tr(AS), where S is a positive semide\ufb01nite matrix with ones on the\ndiagonal. The result is the classic SDP relaxation, which is convex:\n\nSDP(S) def= tr(AS)\nmax\nS2Sn\nsubject to S \u232b 0, diag(S) = 1\n\n(3)\n\nAlthough convexity begets easy optimization in a theoretical sense, the number of variables in the\nSDP is quadratic in n. Thus for large SDPs, we actually return to the low-rank parameterization (2).\nSolving LRPk via simple gradient methods works extremely well in practice and is partially justi\ufb01ed\nby theoretical analyses in [8, 12].\n\n1Proof. WLOG, A \u232b 0 because adding to its diagonal merely adds a constant term to the IQP objective.\n2, so it must be\n\nThe objective is a convex function, as we can factor A = LLT and write xTLLTx = kLTxk2\nmaximized over its convex polytope domain at a vertex point.\n\n2\n\n\fTo complete the picture, we need to convert the relaxed solutions X 2 Rn\u21e5k into integral solutions\nx 2 {1, 1}n of the original IQP (1). This can be done as follows: draw a vector g 2 Rk on the\nunit sphere uniformly at random, project each Xi onto g, and take the sign. Formally, we write\nx = rrd(X) to mean xi = sign(Xi \u00b7 g) for i = 1, . . . , n. This randomized rounding procedure was\npioneered by [5] to give the celebrated 0.878-approximation of MAX-CUT.\n\n3 Understanding the relaxation-rounding tradeoff\n\nThe overall IQP strategy is to \ufb01rst relax the integer problem domain, then round back in to it. The\noptimal objective increases in relaxation, but decreases in randomized rounding. How do these effects\ncompound? To guide our choice of relaxation, we analyze the effect that the rank k in (2) has on the\napproximation ratio of rounded versus optimal IQP solutions.\nMore formally, let x?, X ?, and S? denote global optima of IQP, of LRPk, and of SDP, respectively.\nWe can decompose the approximation ratio as follows:\n\n1 \n\nE[IQP(rrd(X ?))]\n\nIQP(x?)\n\n|\n\n{z\n\n\u21e5\n\nSDP(S?)\nIQP(x?)\nconstant  1\n\n{z\n\n|\n\n}\n\n=\n\n}\n\n|\n\nLRPk(X ?)\nSDP(S?)\n\nE[IQP(rrd(X ?))]\n\nLRPk(X ?)\n\n\u21e5\n\n(4)\n\n{z\n\n}\n\n|\n\n{z\n\n}\n\napproximation ratio\n\ntightening ratio T (k)\n\nrounding ratio R(k)\n\nAs k increases from 1, the tightening ratio T (k) increases towards 1 and the rounding ratio R(k)\ndecreases from 1. In this section, we lower bound T and R each in turn, thus lower-bounding the\napproximation ratio as a function of k. Speci\ufb01cally, we show that T (k) reaches 1 at small k and that\nR(k) falls as 2\nIn practice, one cannot \ufb01nd X ? for general k with guaranteed ef\ufb01ciency (if we could, we would\nsimply use LRP1 to directly solve the original IQP). However, Section 5 shows empirically that\nsimple procedures solve LRPk well for even small k.\n\n\u21e1 + \u21e5( 1\n\nk ).\n\n3.1 The tightening ratio T (k) increases\nWe now show that, under the assumption of A \u232b 0, the tightening ratio T (k) plateaus early and\nthat it approaches this plateau steadily. Hence, provided k is beyond this saturation point, and large\nenough so that an LRPk solver is practically capable of providing near-optimal solutions, there is no\nadvantage in taking k larger.\nFirst, T (k) is steadily bounded below. The following is a result of [13] (that also gives insight into\nthe theoretical worst-case hardness of optimizing LRPk):\nTheorem 3.1 ([13]). Fix A \u232b 0 and let S? be an optimal SDP solution. There is a randomized\nalgorithm that, given S?, outputs \u02dcX feasible for LRPk such that E \u02dcX[LRPk( \u02dcX)]  (k) \u00b7 SDP(S?),\nwhere\n\n(k) def=\n\n2\n\nk\u2713 ((k + 1)/2)\n(k/2) \u25c62\n\n= 1 \n\n1\n2k\n\n+ o\u2713 1\nk\u25c6\n\n(5)\n\n\u21e1 = 0.6366, (2) = 0.7854, (3) = 0.8488, (4) = 0.8836, (5) = 0.9054.2\nFor example, (1) = 2\nBy optimality of X ?, LRPk(X ?)  E \u02dcX[LRPk( \u02dcX)] under any probability distribution, so the exis-\ntence of the algorithm in Theorem 3.1 implies that T (k)  (k).\nMoreover, T (k) achieves its maximum of 1 at small k, and hence must strictly exceed the (k) lower\nbound early on. We can arrive at this fact by bounding the rank of the SDP-optimal solution S?.\nThis is because S? factors into S? = XX T, where X is in Rn\u21e5rank S? and must be optimal since\nLRPrank S?(X) = SDP(S?). Without consideration of A, the following theorem uniformly bounds\nthis rank at well below n. The theorem was established independently by [9] and [10]:\nTheorem 3.2 ([9, 10]). Fix a weight matrix A. There exists an optimal solution S? to SDP (3) such\nthat rank S? \uf8ff p2n.\n\n2The function (k) generalizes the constant approximation factor 2/\u21e1 = (1) with regards to the impli-\ncations of the unique games conjecture: the authors show that no polynomial time algorithm can, in general,\napproximate LRPk to a factor greater than (k) assuming P 6= NP and the UGC.\n\n3\n\n\fo\n\ni\nt\n\na\nr\n \n\ni\n\ng\nn\nd\nn\nu\no\nr\n\n1.05\n\n1\n\n0.95\n\n0.9\n\n0.85\n\n0.8\n\n0.75\n\n0.7\n\n0.65\n\n \n1\n\n \n\nR(k)\nlower bound\n\n2\n\n3\n\n4\n\n5\n\n6\n\nk\n\ne\nv\ni\nt\nc\ne\nb\no\n\nj\n\n1\n\n0.95\n\n0.9\n\n0.85\n\n0.8\n\n0.75\n\n0.7\n\n0.65\n\n \n1\n\n \n\n\u03b3(k)\nT(k)=LRP\n/SDP\nk\n\n2\n\n3\n\n4\n\n5\n\n6\n\nk\n\n1800\n\n1700\n\n1600\n\ne\nv\ni\nt\nc\ne\nb\no\n\nj\n\n1500\n\n1400\n\n1300\n\n1200\n\n1100\n\n \n1\n\n \n\nSDP\nMax\nMean\nMean+Std\nMean\u2212Std\n\n2\n\n3\n\n4\n\n5\n\n6\n\nk\n\n(a) R(k) (blue) is close to it 2/(\u21e1(k))\nlower bound (red) across the small k.\n\n(b) \u02dcT (k) (blue), the empirical tightening ra-\ntio, clears its lower bound (k) (red) and hits\nits ceiling of 1 at k = 4.\n\n(c) Rounded objective values vs. k: optimal\nSDP (cyan), best IQP rounding (green), and\nmean IQP rounding \u00b1 (black).\n\nFigure 1: Plots of quantities analyzed in Section 3, under A 2 R100\u21e5100 whose entries are sampled\nindependently from a unit Gaussian. For this instance, the empirical post-rounding objectives are\nshown at the right for completeness.\n\nHence we know already that the tightening ratio T (k) equals 1 by the time k reaches p2n.\nTaking A into consideration, we can identify a class of problem instances for which T (k) actually\nsaturates at even smaller k. This result is especially useful when the rank of the weight matrix A is\nknown, or even under one\u2019s control, while modeling the underlying optimization task:\nTheorem 3.3. If A is symmetric, there is an optimal SDP solution S? such that rank S? \uf8ff rank A.\nA complete proof is in Appendix A.1. Because adding to the diagonal of A is equivalent to merely\nadding a constant to the objective of all problems considered, Theorem 3.3 can be strengthened:\nCorollary 3.4. For any symmetric weight matrix A, there exists an optimal SDP solution S? such\nthat rank S? \uf8ff minu2Rn rank(A + diag(u)).\nThat is, changes to the diagonal of A that reduce its rank may be applied to improve the bound.\nIn summary, T (k) grows at least as fast as (k), from T (k) = 0.6366 at k = 1 to T (k) = 1 at\n\nk = min{p2n, minu2Rn rank(A + diag(u))}. This is validated empirically in Figure 1b.\n3.2 The rounding ratio R(k) decreases\n\nAs the dimension k grows for row vectors Xi in the LRPk problem, the rounding procedure incurs a\nlarger expected drop in objective value. Fortunately, we can bound this drop. Even more fortunately,\nthe bound grows no faster than (k), exactly the steady lower bound for T (k). We obtain this result\nwith an argument based on the analysis of [13]:\nTheorem 3.5. Fix a weight matrix A \u232b 0 and any LRPk-feasible X 2 Rn\u21e5k. The rounding ratio for\nX is bounded below as\n\nE[IQP(rrd(X))]\n\nLRPk(X)\n\n2\n\n\u21e1(k)\n\n\n\n=\n\n2\n\n\u21e1\u27131 +\n\n1\n2k\n\n+ o\u2713 1\nk\u25c6\u25c6\n\n(6)\n\nNote that X in the theorem need not be optimal \u2013 the bound applies to whatever solution an LRPk\nsolver might provide. The proof, given in Appendix section A.1, uses Lemma 1 from [13], which is\nbased on the theory of positive de\ufb01nite functions on spheres [14]. A decrease in R(k) that tracks the\nlower bound is observed empirically in Figure 1a.\nIn summary, considering only the steady bounds (Theorems 3.1 and 3.5), T will always rise opposite\nto R at least at the same rate. Then, the added fact that T plateaus early (Theorem 3.2 and Corollary\n3.4) means that T in fact rises even faster.\nIn practice, we would like to take k beyond 1 as we \ufb01nd that the \ufb01rst few relaxations give the optimizer\nan increasing advantage in arriving at a good LRPk solution, close to X ? in objective. The rapid rise\nof T relative to R just shown then justi\ufb01es not taking k much larger if at all.\n\n4\n\n\f4 Pairwise MRFs, optimization, and inference alternatives\n\nHaving understood theoretically how IQP relates to low-rank relaxations, we now turn to MAP\ninference and empirical evaluation. We will show that the LRPk objective can be optimized via\na simple interface to the underlying MRF. This interface then becomes the basis for (a) a MAP\ninference algorithm based on very low-rank relaxations, and (b) a comparison to two other basic\nalgorithms for MAP: Gibbs sampling and mean-\ufb01eld variational inference.\nA binary pairwise Markov random \ufb01eld (MRF) models a function h over x 2 {0, 1}n given by\nh(x) =Pi i(xi) +Pi<j \u2713i,j(xi, xj), where the i and \u2713i,j are real-valued functions. The MAP\ninference problem asks for the variable assignment x? that maximizes the function h. An MRF\nbeing binary-valued and pairwise allows the arbitrary factor tables i and \u2713i,j to be transformed\nwith straightforward algebra into weights A 2 Sn for the IQP. For the complete reduction, see\nAppendix A.2.\nWe make Section 3 actionable by de\ufb01ning the randomized relaxation and rounding (R3) algorithm for\nMAP via low-rank relaxations. The \ufb01rst step of this algorithm involves optimizing LRPk (2) whose\nweight matrix encodes the MRF. In practice, MRFs usually have special structure, e.g., edge sparsity,\nfactor templates, and Gaussian \ufb01lters [11]. To develop R3 as a general tool, we provide two interfaces\nbetween the solver and MRF representation, both of which allow users to exploit special structure.\nLeft-multiplication (x 7! Ax) Assume a function F that implements left matrix multiplication by\nthe MRF matrix A. This suf\ufb01ces to compute the gradient of the relaxed objective: rXLRPk(X) =\n2AX. We can optimize the relaxation using projected gradient ascent (PGA): alternate between\ntaking gradient steps and projecting back onto the feasible set (unit-normalizing the rows Xi if the\nnorm exceeds 1); see Algorithm 1. A user supplying a left-multiplication routine can parallelize its\nimplementation on a GPU, use sparse linear algebra, or ef\ufb01ciently implement a dense \ufb01lter.\nRow-product ((i, x) 7! Aix)\nIf the function F further provides left multiplication by any row of\nA, we can optimize LRPk with coordinate-wise ascent (BCA). Fixing all but the i\u2019th row of X gives\na function linear in Xi whose optimum is AiX normalized to have unit norm.\nLeft-multiplication is suitable when one expects to parallelize multiplication, or exploit common\ndense structure as with \ufb01lters. Row product is suitable when one already expects to compute Ax\nserially. BCA also eliminates the need for the step size scheme in PGA, thus reducing the number of\ncalls to the left-multiplication interface if this step size is chosen by line search.\n\nX random initialization in Rk\u21e5n\nfor t 1 to T do\nif parallel then\n\nelse\n\nX \u21e7Sk (X + 2\u2318tAX)\nfor i 1 to n do\n\nXi \u21e7Sk (hAi, Xi)\n\n// Parallel update\n\n// Sweep update\n\nfor j 1 to M do\nx(j) sign(Xg), where g is a random vector from unit sphere S k (normalized Gaussian)\nOutput the x(j) for which the objective (x(j))TAx(j) is largest.\nAlgorithm 1: The full randomized relax-and-round (R3) procedure, given a weight matrix A;\n\u21e7Sk (\u00b7) is row normalization and \u2318t is the step size in the t\u2019th iteration.\n\n4.1 Comparison to Gibbs sampling and mean-\ufb01eld\n\nThe R3 algorithm affords a tidy comparison to two other basic MAP algorithms. First, it is iterative\nand maintains a constant amount of state per MRF variable (a length k row vector). Using the\nrow-product interface, R3 under BCA sequentially sweeps through and updates each variable\u2019s state\n(row Xi) while holding all others \ufb01xed. This interface bears a striking resemblance to (annealed)\nGibbs sampling and mean-\ufb01eld iterative updates [4, 15], which are popular due to their simplicity.\nTable 1 shows how both can be implemented via the row-product interface.\n\n5\n\n\fAlgorithm\nGibbs\nMean-\ufb01eld\nR3\n\nDomain\n\nx 2 {1, 1}n\nx 2 [1, 1]n\nX 2 (S k)n\n\nSweep update\n\nxi \u21e0 \u21e7Z(exp(Aix))\nxi tanh(Aix)\nXi \u21e7Sk (AiX)\n\nParallel update\nx \u21e0 \u21e7Z(exp(Ax))\nx tanh(Ax)\nX \u21e7Sk (X + 2\u2318tAX)\n\nTable 1: Iterative updates for MAP algorithms that use constant state per MRF variable. \u21e7Sk denotes\n`2 unit-normalization of rows and \u21e7Z denotes scaling rows so that they sum to 1. The R3 sweep\nupdate is not a gradient step, but rather the analytic maximum for the i\u2019th row \ufb01xing the rest.\n\n10x1x2\n\nx1\n\nx2\n\nA =\n\n 1(x1) = x1\n\n 2(x2) = x2\n\n1\n\n2\"0\n\n1\n1\n\n1\n0\n10\n\n1\n10\n\n0#\n\nFigure 2: Consider the two variable MRF on the left (with x1, x2 2 {1, 1} for the factor expressions)\nand its corresponding matrix A. Note x0 is clamped to 1 as per the reduction (A.2). The optimum is\nx = [1, 1, 1]T with a value of xTAx = 12. If Gibbs or LRP1 is initialized at x = [1,1,1]T, then\neither one will be unlikely to transition away from its suboptimal objective value of 8 (as \ufb02ipping\nonly one of x1 or x2 decreases the objective to 10). Meanwhile, LRP2 succeeds with probability 1\nover random initializations. Suppose X = [1, 0; X1; X2] with X1 = X2. Then the gradient update\nis X1 = \u21e7S2(A1X) = \u21e7S2(([1, 0] + 10X1)/2), which always points towards X ?\n2 = [1, 0]\nexcept in the 0-probability event that X1 = X2 = [1, 0] (corresponding to the poor initialization\nof [1,1,1]T above). The gradient with respect to X1 at points along the unit circle is shown on\nthe right. The thick arrow represents an X1 \u21e1 [0.95, 0.3], and the gradient \ufb01eld shows that it will\niteratively update towards the optimum.\n\n1 = X ?\n\nUsing left-multiplication, R3 updates the state of all variables in parallel. Super\ufb01cially, both Gibbs\nand the iterative mean-\ufb01eld update can be parallelized in this way as well (Table 1), but doing\nso incorrectly alters the their convergence properties. Nonetheless, [11] showed that a simple\nmodi\ufb01cation works well in practice for mean-\ufb01eld, so we consider these algorithms for a complete\ncomparison.3\nWhile Gibbs, mean-\ufb01eld, and R3 are similar in form, they differ in their per-variable state: Gibbs\nmaintains a number in {1, 1} whereas R3 stores an entire vector in Rk. We can see by example\nthat the extra state can help R3 avoid local optima that ensnarls Gibbs. A single coupling edge in a\ntwo-node MRF, described in Figure 2, gives intuition for the advantage of optimizing relaxations\nover stochastic hill-climbing.\nAnother widely-studied family of MAP inference techniques are based on belief propagation or\nrelaxations of the marginal polytope [4]. For belief propagation, and even for the most basic of the\nLP relaxations (relaxing to the local consistency polytope), one needs to store state for every edge in\naddition to every variable. This demands a more complex interface to the MRF, introduces substantial\nadded bookkeeping for dense graphs, and is not amenable to techniques such as the \ufb01lter of [11].\n\n5 Experiments\n\nWe compare the algorithms from Table 1 on three benchmark MRFs and an additional arti\ufb01cial MRF.\nWe also show the effect of the relaxation k on the benchmarks in Figure 3.\nRounding in practice\nThe theory of Section 3 provides safeguard guarantees by considering the\naverage-case rounding. In practice, we do far better than average since we take several roundings and\noutput the best. Similarly, Gibbs\u2019 output is taken as the best along its chain.\nBudgets Our goal is to see how ef\ufb01ciently each method utilizes the same \ufb01xed budget of queries to\nthe function, so we \ufb01x the number queries to the left-multiplication function F of Section 4. A budget\njointly limits the relaxation updates and the number of random roundings taken in R3. We charge\n\n3Later, in [16], the authors derive the parallel mean-\ufb01eld update as being that of a concave approximation to\n\nthe cross-entropy term in the true mean-\ufb01eld objective.\n\n6\n\n\falgo.\n\np Gibbs\ne\ne\nw\ns\n\nMF\nR3\n\nl Gibbs\n\ne\nl\nl\na\nr\na\np\n\nMF\nR3\n\np Gibbs\ne\ne\nw\ns\n\nMF\nR3\n\nl Gibbs\n\ne\nl\nl\na\nr\na\np\n\nMF\nR3\n\nt\ne\ng\nd\nu\nb\nw\no\nl\n\nt\ne\ng\nd\nu\nb\nh\ng\ni\nh\n\nseg (50)\n(23)\n(23)\n(15)\n(19)\n(26)\n(17)\n(33)\n(9)\n(23)\n(31)\n(12)\n(25)\n\n8.35\n8.36\n8.39\n7.4\n7.4\n7.4\n7.07\n7.03\n7.09\n6.78\n6.75\n6.8\n\ndataset [name (# of instances)]\n\ndbn (108)\n(30)\n1.39\n(7)\n1.3\n1.42\n(71)\n(3)\n.826\n(6)\n1.16\n(99)\n1.29\n1.26\n(42)\n(4)\n1.16\n(62)\n1.28\n(2)\n.814\n1.1\n(2)\n(104)\n1.25\n\ngrid40 (8)\n(7)\n14.5\n(1)\n13.6\n13.7\n(0)\n(0)\n.843\n(3)\n11.3\n(5)\n11.3\n12.5\n(7)\n(1)\n11.7\n(0)\n11.9\n(0)\n1.85\n10.9\n(2)\n(6)\n11\n\nchain (300)\n(37)\n.473\n(39)\n.463\n.538\n(296)\n(3)\n.124\n(50)\n.35\n(282)\n.418\n.367\n(85)\n(39)\n.33\n(300)\n.398\n(11)\n.132\n.259\n(47)\n(296)\n.321\n\nTable 2: Benchmark performance of algorithms in each comparison regime, in which the benchmarks\nare held to different computational budgets that cap their access to the left-multiplication routine. The\nscore shown is an average relative gain in objective over the uniform-random baseline. Parenthesized\nis the win count (including ties), and bold text highlights qualitatively notable successes.\n\nseg\n\n \n\nLRP\nMax\nMean\nMean+Std\nMean\u2212Std\n\n1.3\n\n1.25\n\n1.2\n\ne\nv\ni\nt\nc\ne\nb\no\n\nj\n\n1.15\n\n1.1\n\n4\nx 10\n\ndbn\n\n \n\n4\nx 10\n\n1.4\n\ngrid\n\n \n\nLRP\nMax\nMean\nMean+Std\nMean\u2212Std\n\ne\nv\ni\nt\nc\ne\nb\no\n\nj\n\n580\n\n560\n\n540\n\n520\n\n500\n\n480\n\n460\n\n \n1\n\nLRP\nMax\nMean\nMean+Std\nMean\u2212Std\n\ne\nv\ni\nt\nc\ne\nb\no\n\nj\n\n1.35\n\n1.3\n\n1.25\n\n1.2\n\n1.15\n\n1.1\n\n \n1\n\n2\n\n3\n\n4\n\n5\n\n6\n\n1.05\n\n1\n\n0.95\n\n \n1\n\n2\n\n3\n\n4\n\n5\n\n6\n\nk\n\nk\n\nFigure 3: Relaxed and rounded objectives vs. the rank k in an instance of seg, dbn, and grid40. Blue:\nmax of roundings. Red: value of LRPk. Black: mean of roundings (\u00b1). The relaxation objective\nincreases with k, suggesting that increasingly good solutions are obtained by increasing k, in spite of\nnon-convexity (here we are using parallel updates, i.e. using R3 with PGA). The maximum rounding\nalso improves considerably with k, especially at \ufb01rst when increasing beyond k = 1.\n\n2\n\n3\n\n4\n\n5\n\n6\n\nk\n\nR3 k-fold per use of F when updating, as it queries F with a k-row argument.4 Sweep methods are\ncharged once per pass through all variables.\nWe experiment with separate budgets for the sweep and parallel setup, as sweeps typically converge\nmore quickly. The benchmark is run under separate low and high budget regimes \u2013 the latter more\nthan double the former to allow for longer-run effects to set in. In Table 2, the sweep algorithms\u2019 low\nbudget is 84 queries; the high budget is 200. The parallel low budget is 180; the high budget is 400.\nWe set R3 to take 20 roundings under low budgets and 80 under high ones, and the remaining budget\ngoes towards LRPk updates.\nDatasets\nEach dataset comprises a family of binary pairwise MRFs. The sets seg, dbn, and grid40\nare from the PASCAL 2011 Probabilistic Inference Challenge5 \u2014 seg are small segmentation models\n(50 instances, average 230 variables, 622 edges), dbn are deep belief networks (108 instances, average\n920 variables, 54160 edges), and grid40 are 40x40 grids (8 instances, 1600 variables, 6240 or 6400\nedges) whose edge weights outweigh their unaries by an order of magnitude. The chain set comprises\n300 randomly generated 20-node chain MRFs with no unary potentials and random unit-Gaussian\nedge weights \u2013 it is principally an extension of the coupling two-node example (Figure 2), and serves\nas a structural obverse to grid40 in that it lacks cycles entirely. Among these, the dbn set comprises\nthe largest and most edge-dense instances.\n\n4 This conservatively disfavors R3, as it ignores the possible speedups of treating length-k vectors as a unit.\n5http://www.cs.huji.ac.il/project/PASCAL/\n\n7\n\n\fEvaluation\nTo aggregate across instances of a dataset, we measure the average improvement over\na simple baseline that, subject to the budget constraint, draws uniformly random vectors in {1, 1}n\nand selects the highest-scoring among them. Improvement over the baseline is relative: if z is the\nsolution objective and z0 is that of the baseline, (z  z0)/z0 is recorded for the average. We also\ncount wins (including ties), the number of times a method obtains the best objective among the\ncompetition. Baseline performance varies with budget so scores are incomparable across sweep and\nparallel experiments.\nIn all experiments, we use LRP4, i.e. the width-4 relaxation. The R3 gradient step size scheme is\n\u2318t = 1/pt. In the parallel setting, mean-\ufb01eld updates are prone to large oscillations, so we smooth\nthe update with the current point: x (1  \u2318)x + \u2318 tanh(Ax). Our experiments set \u2318 = 0.5. Gibbs\nis annealed from an initial temperature of 10 down to 0.1. These settings were tuned towards the\nbenchmarks using a few arbitrary instances from each dataset.\nResults are summarized in Table 2. All methods fare well on the seg dataset and \ufb01nd solutions very\nnear the apparent global optimum. This shows that the rounding scheme of R3, though elementary,\nis nonetheless capable of recovering an actual MAP point. On grid40, R3 is competitive but not\noutstanding, and on chain it is a clear winner. Both datasets have edge potentials that dominate\nthe unaries, but the cycles in the grid help break local frustrations that occur in chain where they\nprevents Gibbs from transitioning. On dbn \u2013 the more dif\ufb01cult task grounded in a real model \u2013 R3\noutperforms the others by a large margin.\nFigure 3 demonstrates that relaxation beyond the quadratic program maxx2[1,1]xTAx (i.e. k = 1) is\ncrucial, both for optimizing LRPk and for obtaining a good maximum among roundings. Figure 4 in\nthe appendix visualizes the distribution of rounded objective values across different instances and\nrelaxations, illustrating that the dif\ufb01culty of the problem can be apparent in the rounding distribution.\n\n6 Related work and concluding remarks\nIn this paper, we studied MAP inference problems that can be cast as an integer quadratic program\nover hypercube vertices (IQP). Relaxing the IQP to an SDP (3) and rounding back with rrd(\u00b7) was\nintroduced by Goemans and Williamson in the 1990s for MAX-CUT. It was generalized to positive\nsemide\ufb01nite weights shortly thereafter by Nesterov [6].\nSeparately, in the early 2000s, there was interest in scalably solving SDPs, though not with the\nspeci\ufb01c goal of solving the IQP. The low-rank reparameterization of an SDP, as in (2), was developed\nby [8] and [12]. Recent work has taken this approach to large-scale SDP formulations of clustering,\nembedding, matrix completion, and matrix norm optimization for regularization [17, 18]. Upper\nbounds on SDP solutions in terms of problem size n, which help justify using a low rank relaxation,\nhave been known since the 1990s [9, 10].\nThe natural joint use of these ideas (IQP relaxed to SDP and SDP solved by low-rank relaxation) is\nsomewhat known. It was applied in a clustering experiment in [19], but no theoretical analysis was\ngiven and no attention paid to rounding directly from a low-rank solution. The bene\ufb01t of rounding\nfrom low-rank was noticed in coarse MAP experiments in [20], but no theoretical backing was given\nand no attention paid to coordinate-wise ascent or budgeted queries to the underlying model.\nOther relaxation hierarchies have been studied in the MRF MAP context, namely linear program\n(LP) relaxations given by hierarchies of outer bounds on the marginal polytope [21, 2]. They differ\nfrom this paper\u2019s setting in that they maintain state for every MRF clique con\ufb01guration \u2013 an approach\nthat extends beyond pairwise MRFs but that scales with the number of factors (unwieldy versus a\nlarge, dense binary pairwise MRF) and requires \ufb01ne-grained access to the MRF. Sequences of LP and\nSDP relaxations form the Sherali-Adams and Lasserre hierarchies, respectively, whose relationship is\ndiscussed in [4] (Section 9). The LRPk hierarchy sits at a lower level: between the IQP (1) and the\n\ufb01rst step of the Lasserre hierarchy (the SDP (3)).\nFrom a practical point of view, we have presented an algorithm very similar in form to Gibbs sampling\nand mean-\ufb01eld. This provides a down-to-earth perspective on relaxations within the realm of scalable\nand simple inference routines. It would be interesting to see if the low-rank relaxation ideas from this\npaper can be adapted to other settings (e.g., for marginal inference). Conversely, the rich literature\non the Lasserre hierarchy may offer guidance in extending the low-rank semide\ufb01nite approach (e.g.,\nbeyond the binary pairwise setting).\n\n8\n\n\fReferences\n[1] S. Geman and D. Geman. Stochastic relaxation, Gibbs distributions, and the Bayesian restoration of\n\nimages. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 6:721\u2013741, 1984.\n\n[2] D. Sontag, T. Meltzer, A. Globerson, Y. Weiss, and T. Jaakkola. Tightening LP relaxations for MAP using\n\nmessage-passing. In Uncertainty in Arti\ufb01cial Intelligence (UAI), pages 503\u2013510, 2008.\n\n[3] A. Rush, D. Sontag, M. Collins, and T. Jaakkola. On dual decomposition and linear programming\nIn Empirical Methods in Natural Language Processing\n\nrelaxations for natural language processing.\n(EMNLP), pages 1\u201311, 2010.\n\n[4] M. Wainwright and M. I. Jordan. Graphical models, exponential families, and variational inference.\n\nFoundations and Trends in Machine Learning, 1:1\u2013307, 2008.\n\n[5] M. Goemans and D. Williamson. Improved approximation algorithms for maximum cut and satis\ufb01ability\n\nproblems using semide\ufb01nite programming. Journal of the ACM (JACM), 42(6):1115\u20131145, 1995.\n\n[6] Y. Nesterov. Semide\ufb01nite relaxation and nonconvex quadratic optimization. Optimization methods and\n\nsoftware, 9:141\u2013160, 1998.\n\n[7] N. Alon and A. Naor. Approximating the cut-norm via Grothendieck\u2019s inequality. SIAM Journal on\n\nComputing, 35(4):787\u2013803, 2006.\n\n[8] S. Burer and R. Monteiro. A nonlinear programming algorithm for solving semide\ufb01nite programs via\n\nlow-rank factorization. Mathematical Programming, 95(2):329\u2013357, 2001.\n\n[9] A. I. Barvinok. Problems of distance geometry and convex properties of quadratic maps. Discrete &\n\nComputational Geometry, 13:189\u2013202, 1995.\n\n[10] G. Pataki. On the rank of extreme matrices in semide\ufb01nite programs and the multiplicity of optimal\n\neigenvalues. Mathematics of Operations Research, 23(2):339\u2013358, 1998.\n\n[11] P. Kr\u00a8ahenb\u00a8uhl and V. Koltun. Ef\ufb01cient inference in fully connected CRFs with Gaussian edge potentials.\n\nIn Advances in Neural Information Processing Systems (NIPS), 2011.\n\n[12] S. Burer and R. Monteiro. Local minima and convergence in low-rank semide\ufb01nite programming. Mathe-\n\nmatical Programming, 103(3):427\u2013444, 2005.\n\n[13] J. Bri\u00a8et, F. M. d. O. Filho, and F. Vallentin. The positive semide\ufb01nite Grothendieck problem with rank\n\nconstraint. In Automata, Languages and Programming, pages 31\u201342, 2010.\n\n[14] I. J. Schoenberg. Positive de\ufb01nite functions on spheres. Duke Mathematical Journal, 9:96\u2013108, 1942.\n[15] M. I. Jordan, Z. Ghahramani, T. S. Jaakkola, and L. K. Saul. An introduction to variational methods for\n\ngraphical models. Machine Learning, 37:183\u2013233, 1999.\n\n[16] P. Kr\u00a8ahenb\u00a8uhl and V. Koltun. Parameter learning and convergent inference for dense random \ufb01elds. In\n\nInternational Conference on Machine Learning (ICML), pages 513\u2013521, 2013.\n\n[17] B. Kulis, A. C. Surendran, and J. C. Platt. Fast low-rank semide\ufb01nite programming for embedding and\n\nclustering. In Arti\ufb01cial Intelligence and Statistics (AISTATS), pages 235\u2013242, 2007.\n\n[18] B. Recht and C. R\u00b4e. Parallel stochastic gradient algorithms for large-scale matrix completion. Mathematical\n\nProgramming Computation, 5:1\u201326, 2013.\n\n[19] J. Lee, B. Recht, N. Srebro, J. Tropp, and R. Salakhutdinov. Practical large-scale optimization for max-\nnorm regularization. In Advances in Neural Information Processing Systems (NIPS), pages 1297\u20131305,\n2010.\n\n[20] S. Wang, R. Frostig, P. Liang, and C. Manning. Relaxations for inference in restricted Boltzmann machines.\n\nIn International Conference on Learning Representations (ICLR), 2014.\n\n[21] D. Sontag and T. Jaakkola. New outer bounds on the marginal polytope. In Advances in Neural Information\n\nProcessing Systems (NIPS), pages 1393\u20131400, 2008.\n\n9\n\n\f", "award": [], "sourceid": 1589, "authors": [{"given_name": "Roy", "family_name": "Frostig", "institution": "Stanford University"}, {"given_name": "Sida", "family_name": "Wang", "institution": "Stanford University"}, {"given_name": "Percy", "family_name": "Liang", "institution": "Stanford University"}, {"given_name": "Christopher", "family_name": "Manning", "institution": "Stanford University"}]}