Phase Transitions in Semidefinite Relaxations
Adel Javanmard, Andrea Montanari, Federico Ricci-Tersenghi
Introduction
Many information processing tasks can be formulated as optimization problems. This idea has been central to data analysis and statistics at least since Gauss and Legendre’s invention of the least-squares method in the early 19th century [Gau09].
Modern datasets pose new challenges to this centuries’ old framework. On the one hand, high-dimensional applications require to estimate simultaneously millions of parameters. Examples span genomics [BDSY99], imaging [P+09], web-services [KBV09], and so on. On the other hand, the unknown object to be estimated has often a combinatorial structure: In clustering we aim at estimating a partition of the data points [VL07]. Network analysis tasks usually require to identify a discrete subset of nodes in a graph [GN02, KMM+13]. Parsimonious data explanations are sought by imposing combinatorial sparsity constraints [Was00].
There is an obvious tension between the above requirements. While efficient algorithms are needed to estimate a large number of parameters, the maximum likelihood method often requires to solve NP-hard combinatorial optimizations. A flourishing line of work addresses this conundrum by designing effective convex relaxations of these combinatorial problems [Tib96, CDS98, CT10].
Unfortunately, the statistical properties of such convex relaxations are well understood only in a few cases (compressed sensing being the most important success story [DT05, CT07, DMM09, ALMT14]). In this paper we use tools from statistical mechanics to develop a precise picture of the behavior of a class of semidefinite programming relaxations. Relaxations of this type appear to be surprisingly effective in a variety of problems ranging from clustering to graph synchronization. For the sake of concreteness we will focus on three specific problems:
(Note that entries on the diagonal carry no information.) Here , denote the transpose of , and is a random matrix from the Gaussian Orthogonal Ensemble (GOE), i.e. a symmetric matrix with independent entries (up to symmetry) and .
Here are model parameters that will be kept of order one as . This corresponds to a random graph with bounded average degree , and a cluster (a.k.a. ‘block’ or ‘community’) structure corresponding to the partition . Given a realization of such a graph, we are interested in estimating the underlying partition.
A generalization of this problem to the case of more than two blocks has been studied since the eighties as a model for social network structure [HLL83], under the name of ‘stochastic block model.’ For the sake of simplicity, we will focus here on the two-blocks case.
Illustrations
Classical statistical theory suggests two natural reference estimators: the Bayes-optimal and the maximum likelihood estimators. We will discuss these methods first, in order to set the stage for SDP relaxations.
Bayes-optimal estimator (a.k.a. minimum MSE). This provides a lower bound on the performance of any other approach. It takes the conditional expectation of the unknown signal given the observations:
Explicit formulas are given in Supplementary Information (SI). We note that assumes knowledge of the prior distribution. The red-dashed curve in Fig. 1 presents our analytical prediction for the asymptotic MSE for . Notice that for all and strictly for all , with quickly as . The point corresponds to a phase transition for optimal estimation, and no method can have non-trivial for .
Maximum likelihood (MLE). The estimator is given by the solution of
Here is a scaling factorIn practical applications, might not be known. We are not concerned by this at the moment, since maximum likelihood is used as a idealized benchmark here. Note that, strictly speaking, this is a ‘scaled’ maximum likelihood estimator. We prefer to scale in order to keep . that is chosen according to the asymptotic theory as to minimize the MSE. As for the Bayes-optimal curve, we obtain for and (and rapidly decaying to 0) for . (We refer to the SI for this result.)
We use to denote the scalar product between matrices, namely , and to indicate that is positive semidefiniteRecall that a symmetric matrix is said to be PSD if all of its eigenvalues are non-negative. (PSD). If we assume , the SDP (288) reduces to the maximum-likelihood problem (5). By dropping this condition, we obtain a convex optimization problem that is solvable in polynomial time. Given an optimizer of this convex problem, we need to produce a vector estimate. We follow a different strategy from standard ‘rounding’ methods in computer science, which is motivated by our analysis below. We compute the eigenvalue decomposition , with eigenvalues , and eigenvectors , with . We then return the estimate
with a certain scaling factor, see SI.
Our analytical prediction for is plotted as blue solid line in Fig. 1. Dots report the results of numerical simulations with this relaxation for increasing problem dimensions. The asymptotic theory appears to capture very well these data already for . For further comparison, alongside the above estimators, we report the asymptotic prediction for , the mean square error of principal component analysis. This method simply returns the principal eigenvector of , suitably rescaled (see SI).
Figure 1 reveals several interesting features:
Phase transition for optimal estimation. Bayes-optimal estimation achieves non-trivial accuracy as soon as . The same is achieved by a method as simple as PCA (blue-dashed curve). On the other hand, for no method can achieve a mean square error that is asymptotically smaller than one (the latter can be achieved trivially by returning .)
Suboptimality of PCA at large signal strength. PCA can be implemented efficiently, but does not exploit the information . As a consequence, its estimation error is significantly sub-optimal at large (see SI).
Near-optimality of SDP relaxations. The tractable estimator achieves the best of both worlds. Its phase transition coincides with the Bayes-optimal one , and decays exponentially at large , staying close to and strictly smaller than , for .
We believe that the above features are generic: as shown in the SI, synchronization confirms this expectation.
Figures 2 illustrates our results for the community detection problem under the hidden partition model of Eq. (287). Recall that we encode the ground truth by a vector . In the present context, an estimator is required to return a partition of the vertices of the graph. Formally, it is a function on the space of graphs with vertices , namely , . We will measure the performances of such an estimator through the overlap:
where is the all-ones vector. Once more, this problem is hard to approximate [Kho06], which motivates the following SDP relaxation:
Let us emphasize a few features of Figure 2:
Superiority of SDP to PCA. A sequence of recent papers (see [KMM+13] and references therein) demonstrate that classical spectral methods –such as PCA– fail to detect the hidden partition in graphs with bounded average degree. In contrast, Figure 2 shows that a standard SDP relaxation does not break down in the sparse regime. See [MS15] for rigorous evidence towards the same conclusion.
Near optimality of SDP. As proven in [MNS12], no estimator can achieve as , if .
Figure 2 (and the theory developed in the next section) suggests that SDP has a phase transition threshold. Namely, there exists such that, if
then SDP achieves overlap bounded away from zero: . The figure also suggests , i.e. SDP is nearly optimal.
Below we will derive an accurate approximation for the critical point . The factor measures the sub-optimality of SDP for graphs of average degree .
Figure 3 plots our prediction for the function , together with empirically determined values for this threshold, obtained through Monte Carlo experiments for (red circles). These were obtained by running the SDP estimator on randomly generated graphs with size up to (total CPU time was about years). In particular, we obtain strictly, but the gap is very small (at most of the order of ) for all . This confirms in a precise quantitative way the conclusion that SDP is nearly optimal for the hidden partition problem.
Simulations results are in broad agreement with our predictions, but present small discrepancies (below ). These discrepancies might be due to the extrapolation form finite- simulations to , or to the inaccuracy of our analytical calculation.
Analytical results
Our analysis is based on a connection with statistical mechanics. The models arising from this connection are spin models in the so-called ‘large-’ limit, a topic of intense study across statistical mechanics and quantum field theory [BW93]. Here we exploit this connection to apply non-rigorous but sophisticated tools from the theory of mean field spin glasses [MM09, MPV87]. The paper [MS15] provides partial rigorous evidence towards the predictions developed here.
A crucial question is how the solution of (49) depends on the spin dimensionality , for . Denote by the optimum value when the dimension is (in particular is also the value of (288) for ). It was proven in [MS15] that there exists a constant independent of and such that
with probability converging to one as (whereby is chosen with any of the distributions studied in the present paper). The upper bound in Eq. (14) follows immediately from the definition. The lower bound is a generalization of the celebrated Grothendieck inequality from functional analysis [KN12].
The above inequalities imply that we can obtain information about the SDP (288) in the limit, by taking after . This is the asymptotic regime usually studied in physics under the term ‘large- limit.’
Finally, we can associate to the problem (49) a finite-temperature Gibbs measure as follows:
where is the uniform measure over the -dimensional sphere , and denotes the real part of . This allows to treat in a unified framework all of the estimators introduced above. The optimization problem (49) is recovered by taking the limit (with maximum likelihood for and SDP for ). The Bayes-optimal estimator is recovered by setting and (in the real case) or (in the complex case).
The cavity method from spin-glass theory can be used to analyze the asymptotic structure of the Gibbs measure (42) as . Below we will state the predictions of our approach for the SDP estimator .
Here we list the main steps of our analysis for the expert reader, deferring a complete derivation to the SI:
We use the cavity method to derive the ‘replica symmetric’ predictions for the model (42) in the limit .
By setting , (in the real case) or (in the complex case) we obtain the Bayes-optimal error : on the basis of [DAM15], we expect the replica symmetric assumption to hold, and these predictions to be exact. (See also [LKZ15] for related work.)
By setting and we obtain a prediction for the error of maximum likelihood estimation . While this prediction is not expected to be exact (because of replica symmetry breaking), it should be nevertheless rather accurate, especially for large .
By setting and , we obtain the SDP estimation error , which is our main object of interest. Notice that the inversion of limits and is justified (at the level of objective value) by Grothendieck inequality. Further, since the case is equivalent to a convex program, we expect the replica symmetric prediction to be exact in this case.
These equations can be solved by iteration, after approximating the expectations on the right-hand side numerically. The properties of the SDP estimator can be derived from this solution. Concretely, we have
The corresponding curve is plotted in Figure 2.
For a probability measure on and an orthogonal (or unitary) matrix, let be the measure obtained byFormally, . ‘rotating’ . Finally, let denote the joint distribution of under . Then, for any fixed , and any sequence of -uples , we have
Here denotes the uniform (Haar) measure on the orthogonal group, denotes convergence in distribution (note that is a random variable), and with , .
3 Cavity method: Community detection in sparse graphs
The main change with respect to the dense case is that the phase transition at , is slightly shifted, as per Eq. (12). Namely, SDP can detect the hidden partition with high probability if and only if , for some .
The quantity has a beautiful interpretation. Consider a (rooted) Galton-Watson tree with offspring distribution , and imagine each edge to be a conductor with conductance equal to one. Then is the total conductance between the root, and the boundary of the tree ‘at infinity.’ In particular, almost surely for , and with positive probability if (see [LP13] and SI).
Next consider the distributional recursion
This value can be computed numerically, for instance by sampling the recursion (230). The results of such an evaluation are plotted as a continuous line in Figure 3.
Final algorithmic considerations
Let us emphasize that other polynomial-time algorithms can be used for the specific problems studied here. In the synchronization problem, naive PCA achieves the optimal threshold . In the community detection problem, several authors recently developed ingenious spectral algorithms that achieve the information theoretically optimal threshold , see e.g. [DKMZ11, KMM+13, Mas14, MNS13, SKZ14].
In the SI, we compare the behavior of SDP and the Bethe Hessian algorithm of [SKZ14] for this perturbed model: while SDP appears to be rather insensitive to the perturbation, the performance of Bethe Hessian are severely degraded by it. We expect a similar fragility to arise in other spectral algorithms.
Acknowledgments
A.J. and A.M. were partially supported by NSF grants CCF-1319979 and DMS-1106627 and the AFOSR grant FA9550-13-1-0036.
References
Notations
The standard Gaussian density is denoted by , and the Gaussian distribution by .
Given two un-normalized measures and on the same space, we write if they are equal up to an overall normalization constant. We use to denote equality up to subexponential factors, i.e. if .
2 Estimation metrics
We also define the overlap as follows in the real case
In the complex case, we replace by (defined to be at ):
This formula applies to the real case as well. (Note that, in the main text, we defined the overlap only for estimators taking values in , in the real case. Throughout these notes, we generalize that definition for the sake of uniformity.)
Preliminary facts
where the expectation is with respect to the independent random variables , and .
Then we have the identity (with a complex normal)
Consider, to be definite, the real case, and define the observation model
where independent of the noise . Then a straightforward calculation shows that
The identity (31) follows by exploiting the symmetry of , which implies .
The proof follows a similar argument in the complex case. ∎
We apply the above lemma to specific cases that will be of interest to us. Below, denotes the modified Bessel function of the second kind. Explicitly, for integer, we have the integral representation
For any , we have the identities
where the expectation is with respect to (first line) or (second line).
These follows from Lemma 6.1. For the first line we apply the real case (31) with , whence
For the second line we apply the complex case (32) with the uniform measure over the unit circle. Consider the change of variables and . Computing the curve integral, we have
where in the second equality we used the fact that . ∎
As explained in the main text, we are interested in the following probability measure over , where :
Here is the uniform measure over .
We define a general estimator as follows.
In order to break the symmetry, we add a term in the exponent of Eq. (42), for an arbitrary small vector. It is understood throughout that after .
As is customary in statistical physics, we will not explicitly carry out calculations with the perturbation , but only using this device to select the relevant solution at .
Note that for this amounts to maximizing the exponent term in equation (42).
Let be its principal eigenvector.
where is the optimal scaling predicted by the asymptotic theory.
The Gibbs measure (42) encodes several estimators of interests. Here we briefly describe this connections.
Bayes-optimal estimators. As mentioned in the main text, this is obtained by setting and (in the real case) or (in the complex case). To see this, recall our observation model (for )
As claimed, this coincides with Eq. (42) if we set (in the real case) or (in the complex case).
Maximum-likelihood and SDP estimators. By letting in Eq. (42), we obtain that concentrates on the maximizers of the problem
In the case we recover the SDP relaxation. In the case , this is equivalent to the maximum likelihood problem
In this section we use the cavity method to derive the asymptotic properties of the measure (42).
In the replica-symmetric cavity method, we consider adding a single variable to a problem with variables . We compute the marginal distribution of in the system with variables, to be denoted by . This is expressed in terms of the marginals of the other variables in the system with variables , …. We will finally impose the consistency condition that is distributed as any of , … in the limit.
Assuming that , … are, for this purpose, approximately independent, we get
Next we consider a fixed and estimate the integral by expanding the exponential term. This expansion proceeds slightly different in the real and the complex cases. We give details for the first one, leaving the second to the reader. Write
where denotes expectation with respect to . Here, we used the fact that , as per equation (46).
Substituting in Eq. (51), and neglecting terms, we get (both in the real and complex case)
We further have the following equations for , :
Notice that the expectations on the right-hand side are in fact functions of , through Eq. (52).
We next pass to studying the distribution of and . For large , the pairs appearing on the right-hand side of Eqs. (53), (54) can be treated as independent. By the law of large numbers and central limit theorem, we obtain that
for some deterministic quantities , , . Note that the law of can be equivalently described by
where .
Using these and the consistency condition in Eqs. (53), (54), we obtain the following equations for the unknowns :
The prediction of the replica-symmetric cavity methods have been summarized in the main text. We generalize the discussion here. Assume, for simplicity . For a probability measure on and an orthogonal (or unitary) matrix, let be the measure obtained by ‘rotating’ , i.e. for any measurable set . Finally, let denote the joint distribution of under . Then, for any fixed , and any sequence of -tuples , we have
While in general this prediction is only a good approximation (because of replica symmetry breaking) we expect to be asymptotically exact for the Bayes-optimal, ML and SDP estimator. In the next sections we will discuss special estimators.
2.2 Bayes-optimal: m=1𝑚1m=1 and β∈{λ/2,λ}𝛽𝜆2𝜆\beta\in\{\lambda/2,\lambda\}
For , is a scalar satisfying . Hence, the term proportional to in Eq. (60) is a constant and can be dropped. Also , and are scalar in this case.
We will write these equations below in terms of classical functions both in the real and in the complex cases. Before doing that, we derive expressions for the estimation error in the limit. The estimator is given in this case by , cf. Eq. (43). Therefore, the scaled MSE, cf. Eq. (27), reads
Note that the optimal scaling is , leading to minimal error –for the ideally scaled estimator–
Real case. In this case and therefore Eqs. (63), (64) yield
where expectation is with respect to . As discussed in Section 7.1, the Bayes optimal estimator is recovered by setting above. Using the identity (38) in Corollary 6.2, we obtain the solution
where satisfies the fixed point equation
We denote by the largest non-negative solution of this equation. Using Eqs. (67) and (70) we obtain the following predictions for the asymptotic estimation error
(Note that in this case, the optimal choice of a scaling is .)
where, as mentioned above, denotes the modified Bessel function of the second kind.
The general fixed point equations (63) and (64) yield
As discussed in Section 7.1, the Bayes optimal estimator is recovered by setting in these equations. In this case we can use the identity (39) in Corollary 6.2, to obtain the solution
where satisfies the fixed point equation
where the expectation is taken with respect to . We denote by the largest non-negative solution of these equations.
Using again Eqs. (67) and (70) , we obtain
2.3 Maximum likelihood: m=1𝑚1m=1 and β→∞→𝛽\beta\to\infty
As discussed in Section 7.1, the maximum likelihood estimator is recovered by setting and . Notice that in this case our results are only approximate because of replica symmetry breaking.
We can take the limit in Eqs. (62), (63), (64). In this limit, the measure concentrates on the single point . We thus obtain
We next specialize our discussion to the real and complex cases.
Real case. Specializing Eq. (84) to the real case, we get the equation
Taylor expanding near , this yields which yields the critical point (within the replica symmetric approximation)
We denote by the largest non-negative solution of Eq. (86). The asymptotic estimation metrics (for optimally scaled estimator) at level are given by
It follows immediately from Eq. (86) that, as , , whence
Complex case. Specializing Eq. (84), we get
Denoting by the largest non-negative solution of Eq. (92), the estimation metrics are obtained again via Eqs. (88) and (89).
For large , it is easy to get whence
2.4 General m𝑚m and β→∞→𝛽\beta\to\infty
In the limit , the measure of Eq. (60) concentrates on the single point that maximizes the exponent. A simple calculation yields
where is a Lagrange multiplier determined by the normalization condition , or
Further has variance of order around .
In order to solve Eqs. (57) to (59) we next assume that the symmetry is –at most– broken vectorially to . Without loss of generality, we can assume that it is broken along the direction . Further, since is a measure on the unit sphere , the matrix is only defined up to a shift . This leads to the following ansatz for the order parameters.
and reads
Taking the limit of Eqs. (57) to (59) we obtain the following four equations for the four parameters :
In the above expressions, expectation is with respect to the Gaussian vector , and is defined as the solution of the equation
The simplest derivation of these equations is obtained by differentiating the ground state energy, for which we defer to Section 7.3.
We can then compute the performance of the estimator defined at the beginning of this section. Note that as , and therefore its principal vector is (within the above ansatz), and therefore, for a test function , we have
where independent of .
Applying (107) and after a simple calculation we obtain
where , denote the solutions of the above equations. Also, invoking (107) the asymptotic overlap is given by
Spin-glass phase. The spin-glass phase is described by the completely symmetric solution with , and . From Eq. (106) we get
Critical signal-to-noise ratio. We next compute the critical value of . We begin by expanding Eq. (106). Define
and let be the solution of the equation . Notice that is unaltered under sign change . Further, comparing with the equation for , see Eq. (106), we obtain the following perturbative estimate
By the results for the spin glass phase, we have and as , whence
Now consider Eq. (101). Retaining only terms we get
where in the last step we used Eq. (113) and as . Now recalling that is even in , the second term vanishes and we obtain
We therefore get the critical point by setting to the coefficient of above. In the real case, we get
Summarizing the (replica symmetric) critical point is
In particular, for we recover for the real case, and for the complex case. These are the values derived in Section 7.2.3. For large , we get
with (real case), or (complex case).
Let us emphasize once more: we do not expect the replica symmetric calculation above to be exact, but only an excellent approximation. In other words, for any bounded , we expect but . However, as the problem becomes convex, and hence we expect . Hence
2.5 SDP: m→∞→𝑚m\to\infty and β→∞→𝛽\beta\to\infty
In the limit , Eqs. (101) to (104) simplify somewhat. We set and eliminate using Eq. (105). Applying the law of large numbers, the equation for reads
As a consequence, becomes independent of . Hence, Eqs. (101) to (104) reduce to
Denoting by and the solutions to the above equations, we have
We solution of the above equations displays a phase transition at the critical point , which we next characterize.
Spin glass phase and critical point. The spin-glass phase corresponds to a symmetric solution .
In order to investigate the critical behavior, we expand the equations (125) to (127) for , . To leading order in , we get the following solution
To check the above perturbative solution, note that expanding the denominator of Eq. (126) and using , we get
Multiplying Eq. (124) by and expanding the right-hand side, we get
Finally, expanding Eq. (125) we get .
3 Free energy and energy
It is easier to derive the free energy using the replica method. This also give an independent verification of the cavity calculations in the previous section.
In this section, apply the replica method to compute the free energy of model (42). Our aim is to compute asymptotics for the partition function
where we recall that is the uniform measure over . The -th moment is given by
where we introduced replicas , along with the notation . Taking the expectation over , we get
The final formula for the free energy density is obtained by integrating with respect to (now the integrand is in product form) and taking the saddle point in , , and is reported in the next section, see Eq. (150) below.
3.2 Non-zero temperature (β<∞𝛽\beta<\infty)
The final result of the calculations in the previous section is obtaining the moments
where we used the following identity in its derivation
Replica-symmetric free energy. The replica-symmetric (RS) ansatz is
For computing the third term, we use the following identity. For a fixed arbitrary vector ,
Combining Eqs. (156), (157) and (160) we arrive at
In the complex case, the last line should be interpreted as . Differentiating this expression against we recover Eqs. (57) to (59) as saddle point conditions.
3.3 Zero temperature (β→∞→𝛽\beta\to\infty)
As , the free energy behaves as
where is the replica-symmetric ground state energy
Let us stress that expectation is with respect to . Denote by the solution of the above maximization problem. It is immediate to see that this is given by
The equations for and are immediate by taking the limit on Eqs. (57), (58). In zero temperature, measure concentrates around .
Equivalently, we obtain the above equations by differentiating with respect to and , as follows. We write to lighten the notation. Since is a Lagrange multiplier, we have
where the second equation follows from the constraint .
We next substitute . By a similar calculation, we have
Using the ansatz (98), we recover Eqs. (101) to (104). Specifically, Eq (101) follows readily from Eq. (166), restricting to the entry and plugging in for from Eq. (100). Also, Eqs. (102) and (103) follow from Eq. (167), restricting to and entries, respectively. Derivation of Eq. (104) requires more care. Note that since , given by (60), is a measure on the unit sphere, the matrix is only defined up to a diagonal shift. Let denote the slack shift parameter. The ansatz (98) for then becomes
We set . Applying Eq. (170), this results in the following two equations for and :
Solving for from Eq. (172) and substituting for that in Eq. (171), we obtain Eq. (104).
4 On the maximum likelihood phase transition
It turns out that this is an artifact of the replica symmetric approximation and instead
For a given noise realization , the maximum likelihood estimator is
We expect to exist and to be non-random. This implies that the asymptotic overlap is given by
By symmetry we have . Assuming to be differentiable, this implies . Hence is a local maximum for and a local minimum for . Since at we obviously have , . Further, if is a local minimum, we necessarily have . Hence .
On the other hand, we know that we cannot estimate with non-vanishing overlap for . This is a consequence –for instance– of [DAM15, Theorem 4.3] or can, in alternative, be proved directly using the technique of [MRZ14]. This implies that . Summarizing, we have
We next claim that earlier work on the Sherrington-Kirkpatrick model implies , thus yielding . Indeed, alternative expressions can be obtained by studying the modified problem
where is an added magnetic field. Then, we have , the Legendre transform of , and we get the alternative upper bound
Note that is the zero-temperature free energy density of the Sherrington-Kirkpatrick model in a magnetic field [MPV87], whose limit exists by [GT02]. Using well-known thermodynamic identities, we get
where is the magnetic susceptibility of the Sherrington-Kirkpatrick model at inverse temperature , and magnetic field , and is the random overlap.
To the best of our knowledge, the above connection between response to a magneric field, and couplings with non-zero mean was first described by Gérard ToulouseIn [Tou80], this argument was put forward within the context of the so-called Parisi-Toulouse (PaT) scaling hypothesis. Let us emphasize that here we are not assuming PaT to hold (and indeed, it has been convincingly shown that PaT is not correct, albeit an excellent approximation, see e.g. [CRT03]). in [Tou80].
Analysis of PCA estimator for synchronization problem
Here, we study the PCA estimator for the synchronization problem. Recall the observation model
Let denote the leading eigenvector of . The PCA estimator is defined as
with a certain scaling factor discussed below.
In order to characterize the error of , we use a simplified version of the main theorem in [CDMF09].
Let be a rank-one deformation of the Gaussian symmetric matrix , with independent for , and . Then, we have, almost surely
Further, letting be the top eigenvalue of , the following holds true almost surely
Applying this lemma, we compute as follows
which is optimized for . Note that this choice can be written in terms of as well and so knowledge of is not required. We then obtain
Analytical results for community detection
In this Section we use the cavity method to analyze the semidefinite programming approach to community detection. We refer, for instance, to [MM09] for general background on the cavity method for sparse graphs. Also, see [BSS87, SW87] for early statistical mechanics work on the related graph bisection problem.
Recall (from the main text) that we are interested in the hidden partition model. Namely, consider a random graph over vertex set , generated according to the following distribution. We let be uniformly random: this vector contains the vertex labels (equivalently, it encodes a partition of the vertex set , in the obvious way). Conditional on , edges are independent with distribution
As explained in the main text, we tackle this problem via the semidefinite relaxation
For our analysis, we use the non-convex formulation
This is equivalent to the above SDP provided . Note that, throughout this section, the spin variables are real vectors.
We introduce the following Boltzmann-Gibbs distribution
Here is the uniform measure over with and . In order to extract information about the SDP (191), we take the limits , after .
As , the graph converges locally to a rooted multi-type Galton-Watson tree with vertices of type (corresponding to ) or (corresponding to ). Each vertex has offsprings of the same type, and offsprings of the other type (see, e.g. [DM10] for background on local weak convergence in statistical mechanics).
We write the sum-product fixed point equations to compute the marginals at different nodes.
where are the messages associated to the directed edges of the graph. The marginal , for an arbitrary node , is given by
We rewrite the above equations from another perspective. We designate node as the root of the tree and denote its neighbors by . Let be the subtree rooted at node and induced by its descendants. We call the marginal for w.r.t the graphical model in the subtree . Replica symmetric cavity equations relate the marginal to the marginals at the descendant subtrees, i.e., . Note that, in the above notation, and therefore we obtain
(The measures are probability measures over and the right-hand side should be interpreted as a density with respect to the uniform measure on .)
We will use the notation of Eq. (196) but both interpretations are useful.
We will carry out our calculations within a simple ‘vectorial’ ansatz, whereby depends in a log-linear way on a one-dimensional projection of . While this ansatz is not exact, it turns out to yield very accurate results. Also, it can be systematically improved upon, a direction that we leave for future work.
For small , we expect the solution to the cavity equation to be symmetric (in distribution) under rotations in . By this we mean that, for any rotation , is distributed as . ( is defined as the measure induced by action on , cf. Section 7).
In the symmetric phase, assuming the ‘vectorial’ ansatz, cf. Remark 9.1, we look for an approximate solution of the form
where , and represents a term of order one as .
Using the Fourier representation of the function (with associated parameter ), and performing the Gaussian integral over , we get
Here the indegral over runs along the imaginary axis in the complex plane, from and .
Note, for uniformly random on the unit sphere, the term is of order , i.e. of lower order with respect to the term including . Also, the term is of order and does not depend on . Hence, up to an additional term, we can reabsorb this in the normalization constant. We therefore get
We next perform integration over by the saddle point method. Since and , the saddle point is given by the stationary equation . The saddle point lies on the real axis and is a minimum along the real axis but a maximum with respect to the imaginary direction, i.e.,
By Cauchy’s theorem, we can deform the contour of integral to pass the saddle point along the imaginary direction. This in fact corresponds to the path that descents most steeply from the saddle point. The integral is dominated by and hence,
While this expression for is accurate when is small, it breaks down for large . In Section 9.5 we will discuss the regimes of validity of this approximation. Namely, we expect it to be accurate for large and for close to one.
Substituting in Eq. (196), we get the recursion
In particular, as , we get the simple equation
Note that are random variables, because of the randomness in the underlying limiting tree, which is Galton-Watson tree with Poisson offspring distribution. We get
, .
For , identically. Hence the distributional equation (210) has a unique solution.
For , with positive probability and further equation (210) admits no other solution than , .
Let denote the space of probability measures over , and the map defined by the right-hand side of Eq. (210). Namely is the probability distribution of the right-hand side of Eq. (210) when . Notice that this is well defined on the extended real line because the summands are non-negative. It is immediate to see that this map is monotone, i.e.
For point 3, note that by Jensen inequality
Point 4 is just Theorem 4.1 in [LPP97]. ∎
The next proposition establishes an appealing interpretation of the random variable . Again, this puts together results of [Lyo90] and [LPP97]. We give here a proof of this connection for the readers’ convenience. We refer to [LP13] for further background on discrete potential theory (electrical networks) and trees.
In particular, if , then with positive probability.
Now since the conductance of several resistances in parallel is equal to the sum of the conductances of the components, we get
It follows from Theorem [Lyo90, Theorem 4.3] and [Lyo90, Proposition 6.4] that with positive probability whenever . ∎
We will hereafter consider the case and focus on the maximal solution .
where is independent of . Note that we used central limit theorem and law of large numbers in obtaining (217).
On the other hand, taking the variance, we obtain
Using equation (221) in equation (219), we get
2 Linear stability of the symmetric phase and critical point
We next study the stability of the symmetric solution (198). We break the symmetry by letting
where and is -dimensional. Note that each coordinate of is of order , and is multiplied by a factor in the above expression. We will consider , and expand all expressions to linear order in .
Proceeding as in the symmetric phase, we get
where is defined as in the symmetric phase, namely
Substituting in Eq. (196), we obtain the equations
Recall that the graph converges locally to a two-types Galton-Watson tree, whereby each vertex has vertices of the same type, and vertices of the opposite type. We look for solutions that break the symmetry . If is the pair of random variables introduced above, for vertex , we therefore assume for , . This leads to the following distributional recursion for the sequence of random vectors :
where , , , , and are i.i.d. copies of
Therefore, in order to investigate stability, we initialize the above recursion in a way that breaks the symmetry, . Note that by monotonicity property (211), starting with , we have . We ask whether this perturbation grows, by computing the exponential growth rate
where , and parametrize the model. We define the critical point as the smallest such that the growth rate is strictly positive:
Notice that in the definition we used the second moment, i.e. set . However, the result appear to be insensitive to the choice of . In the next section we will discuss the numerical solution of the above distributional equations and our analytical prediction for .
We start by taking expectation of Eq. (230).
By taking the covariance of and , we obtain
where denotes the spectral radius of a matrix. A simple calculation yields
3 Numerical solution of the distributional recursions
We solved numerically the distributional recursions (210), (230) through a sampling algorithm that is known as ‘population dynamics’ within spin glass theory [MP01]. The algorithm updates a sample that, at iteration , is meant to be an approximately iid samples with the same law as the one defined by the distributional equation, at iteration . For concreteness, we define the algorithm here in the case of the iteration corresponding to Eq. (210):
The distribution of will be approximated by a sample (we represent this by a vector but ordering is irrelevant).
The notation in the step 8 of the algorithm denotes appending element to vector . Note that with initial point , we have . In the population dynamic algorithm we start from .
As an illustration, Figure 4 presents the results of some small-scale calculations using this algorithm.
We used the obvious modification of this algorithm to implement the recursion (230), whereby a population is now formed of pairs , …. An important difference is that the overall scaling of the is immaterial. We hence normalize them at each iteration as follows
The normalization constant also allow us to estimate , namely
Figure 5 presents the typical results of this calculation, using , , , at average degree .
This is also the curve reported in the main text.
4 The recovery phase (broken 𝒪(m)𝒪𝑚{\mathcal{O}}(m) symmetry)
where we will assume . In the following, we let be the projector along the first direction and denote the orthogonal projector.
Recalling the cavity equations (196), and using the Fourier representation of the delta function, we get
where we approximated , and used the identity . In the limit, we approximate the integral over by its saddle point. In order to obtain a set of equations for the parameters of the ansatz (253), we will expand the exponent to second order in . The saddle point location is given by
Here solves the equation . Henceforth we shall focus on the limit, in which the equation reduces to
The first order correction is given by . Substituting in Eq. (257), we get the saddle point value of :
where in the last expression we used Eq. (262). Substituting in Eq. (196), we get a recursion for the triple , , :
If is distributed according to the two-groups stochastic block model, the distributions of this triples on different type vertices are related by symmetry for , . This leads to the following distributional recursion for the sequence of random vectors :
where , , , , and are i.i.d. copies of . Finally, is a function of implicitly defined as the solution of
where , , , are deterministic parameters to be determined. Equation (273) thus implies , with solution of
Equations (270) to (272) then yield the following. From Eq. (270) we get
Substituting the values of various parameters in Eq. (281), we obtain
We claim that this is equivalent to Eq. (127). To see this, notice that differentiating Eq. (277) with respect to we get
where the second equality follows again from Eq. (277). Using this identity, we can rewrite Eq. (282) as
Using Gaussian integration by parts in the second term we finally obtain Eq. (127). This concludes our verification for the case of .
5 Limitations of the vectorial ansatz
The origin of this approximation can be gleaned from the calculation in Section 9.1. As we have seen Eq. (206) is only accurate when is small. However, according to the same ansatz, will be aligned to , which –in turn– can be aligned with .
We expect this approximation to be accurate in the following regimes:
For large average degree . Indeed, in this case, is weakly correlated with .
For close to . In this case is small and hence, under , is approximately uniformly distributed, and hence has a small scalar product .
Let us also notice that the vectorial ansatz can be systematically improved upon by considering quadratic terms tepending in two-dimensional projections, and so on. We leave this direction for future work.
Numerical experiments for community detection
In this section we provide details about our numerical simulations with the SDP estimator for the community detection problem. For the reader’s convenience we begin by recalling some definitions.
We denote by the random graph over vertex set , generated according the hidden partition model, and by the vertex labels. Conditional on , edges are independent with distribution
We denote by the average degree, and by the ‘signal strength.’
Throughout this section, indicates the set of neighbors of vertex , i.e. .
We next recall the SDP relaxation for estimating community memberships:
Denote by an optimizer of the above problem. The estimated membership vector is then obtained by ‘rounding’ the principal eigenvector of as follows. Letting be the principle eigenvector of , the SDP estimate is given by
We measure the performance of such an estimator via the overlap:
where encodes the ground truth memberships with if and if . Note that and a random guessing estimator yields overlap of order .
The majority of our calculations were run on a cluster with cores (Intel Xeon), taking roughly a month (hence total CPU time was roughly 10 years).
where the manifold is defined as below:
We will omit the dimensions when they are clear from the context.
As discussed in the main text, the two optimization problems (288) and (291) have a value that differ by a relative error of , uniformly in the size . In particular, the asymptotic value of the SDP is the same, if we let after .
In fact the following empirical findings (further discussed below) point at a much stronger connection:
With high probability, the optimizer appears to be essentially independent of already for moderate values of (in practice, already for , when ).
Again, for moderate values of , optimization methods do not appear to be stuck in local minima. Roughly speaking, while the problem is non-convex from a worst case perspective, typical instances are nearly convex.
Motivated by these findings, we solve optimization problem (291) in lieu of SDP problem (288), using the two algorithms described below: Projected gradient ascent; Block-coordinate ascent.
The rank-constrained formulation also allows to accelerate the rounding step to compute , which can be obtained in time , instead of the naive . Namely, given an optimizer , we compute the empirical covariance matrix
Denoting by the principal eigenvector of , we obtain the estimator via
This approach allows us to carry out high-precision simulations for large instances, namely up to . By comparison, standard SDP solvers are based on interior-point methods and cannot scale beyond of the order of a few hundreds.
The tangent space at is given by
By identification (295), the manifold gradient of reads
We next define the convex envelope of :
and the corresponding orthogonal projector
The projected gradient method alternates between a step in the direction of and a projection onto . Pseudocode is given as Algorithm 2.
The projected gradient method requires a subroutine for computing the projection onto . In order to compute this projection, we write the Lagrangian corresponding to problem (300):
with for . Setting , we obtain
Further, the constraint implies
Due to constraint , we have . Also, by the KKT conditions, if the inequality is strict we have . Therefore,
Substituting for from Eq. (306) into (305) we arrive at
We compute the Lagrange multiplier in an iterative manner as described in Algorithm 3.
1.2 Block coordinate ascent
We present here a second algorithm to solve problem (291), that uses block-coordinate descent. This provides independent check of numerical results. Further, this second method appears to be faster than projected gradient ascent.
We start by considering an unconstrained version of the optimization problem (with the adjacency matrix of the graph ):
Equivalently, this objective function can be written as , where . As , this is of course equivalent to problem (291).
We maximize the objective by iteratively maximizing over each of the vectors . The latter optimization has a close form expression. More precisely, at each step of this dynamics, we sort the variables in a random order and we update them sequentially, by maximizing the objective function. This is easily done by aligning along the ‘local field’
We check the convergence by measuring the largest variation in a spin variable during the last iteration. Namely we define
and we use as convergence criterion . The corresponding pseudocode is presented as Algorithm 4.
The resulting algorithm is very simple and depends on two parameters ( and ) that will be discussed in the Section 10.3, together with dependence on the number of spin components.
2 Numerical experiments with the projected gradient ascent
In this section we report our results with the projected gradient algorithm. As mentioned above, we found that the block coordinate ascent method was somewhat faster, and therefore we used the latter for large-statistics simulations, and high-precision determinations of the critical point . We defer to the next section for further discussion.
We use the projected gradient ascent discussed in Section 10.1.1, with . For each value of and , , , , we generate realizations of graph from the stochastic block model defined in Eq. (287). In these experiments, we observed that the estimated membership vector does not change for , cf. Section 10.2.1. The results reported here correspond to .
Figure 7 reports the estimated overlap (across realizations) achieved by the SDP estimator, for different values of and . The solid curve corresponds to the cavity prediction, cf. equation (130), for large . As we see the empirical results are in good agreement with the analytical curve even for small average degrees .
In particular, the phase transition location seems indistinguishable, on this scale, from .
𝑎𝑏2d=(a+b)/2. Dots corresponds to the performance of the SDP reconstruction method (averaged over realizations). The continuous curve is the asymptotic analytical prediction for the Gaussian model (which captures the large-degree behavior). 10.2.1 Dependence on As we explained before, optimization problem (291) and SDP (288) are equivalent provided . In principle, one can solve (291) applying Algorithm 2 with . However, this choice leads to a computationally expensive procedure. On the other hand, we expect the solution to be essentially independent of already for moderate values of . Several theoretical arguments point to this (in particular, the Grothendieck-type inequality of [MS15]). We provide numerical evidence in this section (supporting in particular the choice ).
In the first experiment, we set the average degree , and vary . For each , we solve for and and generate realizations of the graph as per model (287) with parameters . For several values of , we solve optimization (291) and report the average overlap and its standard deviation. The results are summarized in Table 2. As we see, for the changes in average overlaps are comparable with the corresponding standard deviations. An interesting observation is that error bars for smaller are larger, indicating more variations of overlaps across different realizations.
Table 3 demonstrates the results for an analogous experiment with .
We observe a similar trend for other several values of . Based on these observations, we use in our numerical experiments throughout this section.
2.2 Robustness and comparison with spectral methods
Spectral methods are among the most popular nonparametric approaches to clustering. These methods classify nodes according to a the eigenvectors of a matrix associated with the graph, for instance its adjacency matrix or Laplacian. While standard spectral clustering works well when the graph is sufficiently dense or is regular, it is significantly suboptimal for sparse graphs. The reason is that the leading eigenvector of the adjacency matrix is localized around the high degree nodes.Note that for sparse stochastic block models as in (287), node degrees do not concentrate and we observe highly heterogeneous degrees.
Recently, [KMM+13] proposed a class of very interesting spectral methods based on the non-backtracking walk on the directed edges of the graph . The spectrum of non-backtracking matrix is more robust to high-degree nodes because a walk starting at a node cannot return to it immediately. Later, [SKZ14] proposed another spectral method, based on the Bethe Hessian operator, that is computationally more efficient than the non-backtracking operator. Further, the (determinant of the) Bethe Hessian is closely related to the spectrum of the non-backtracking operator and exhibits the same convenient properties for the aim of clustering. Rigorous analysis of spectral methods under the model (287) was carried out in [Mas14, MNS13, BLM15]. The main result of these papers is that spectral methods allow to estimate the hidden partition significantly better than random guessing immediately above the ideal threshold .
For perturbation levels , we compare the performance of SDP and Bethe Hessian algorithms in terms of Overlap, defined by (290). Figure 8 summarizes the results for and average degree . The reported overlaps are averaged over realizations of the model.
In absence of any perturbation (curves ), the two algorithms have nearly equivalent performances. However, already for , SDP is substantially superior. While SDP appears to be rather insensitive to the perturbation, the performance of the Bethe Hessian algorithm is severely degraded by it. This is because the added triangles perturb the spectrum of the non-backtracking operator (and similarly of the Bethe Hessian operator) significantly, resulting in poor classification of the nodes.
3 Numerical experiments with block coordinate ascent
In this section we present our simulations with the block coordinate ascent algorithm, cf. Algorithm 4. We first discuss the choice of the algorithm parameters and . cf. Section 10.3.2. In Section 10.3.2 we analyze the dependence on the number of dimensions and the behavior of the convergence time. We conclude by determining the phase transition point in Section 10.3.3, and comparing this location with our analytical predictions.
Algorithm 4 requires specifying the parameters (that penalizes ) and (for the convergence criterion). In order to investigate the dependance on these parameters, we set which, as we will see, is large enough to approximate the behavior at .
In Figure 9 we plot the evolution of the norm of the ‘global magnetization,’ , as a function of the number of iterations . Notice that each iteration corresponds to updates, one update of each vector , . We used and , and we averaged over a number of samples ranging from (for ) to (for ).
Initially the magnetization decays exponentially, . Further, it increases slowly with . Indeed from central limit theorem, we have . The same behavior is found empirically at small .
In an intermediate interval of times, we have a power law decay , with exponent . This intermediate regime is present only for large enough.
For large , reaches a plateau whose value scales like with the system size and is proportional to .
Already for , the value of the plateau is very small, namely
Further, this value is decreasing with . Given that , we interpret the above as evidence that the constraint is satisfied with good approximation. We will therefore use in our simulations.
As an additional remark, notice that there is no special reason to enforce the constraint strictly. Indeed the SDP (191) can be replaced by
with an arbitrary value of . Of course this is useful provided is large enough to rule out the solution . As mentioned above, should be already large enough [MS15].
In Figure 10 we show how decreases with time in Algorithm 4, again with and .
In the left panel we fix and study the dependence on the Lagrange parameter . We observe two regimes. While for , the convergence rate is roughly independent of , for , it becomes somewhat slower with . This supports the choice .
In the right we fix and study the dependence of the convergence time on the graph size . The number of iterations appears to increase slowly with (see also Figure 12). Both datasets are consistent with a power law convergence
with (dotted line), and polynomially increasing with (see below for a discussion of the overall scaling of computational complexity with ).
In order to select the tolerance parameter for convergence, , we study the evolution of estimation error. Define the overlap achieved after iteration as follows. First estimate the vertex labels by computing the top-left singular vector of , namely
Of course, the accuracy of the SDP estimator is given by
3.2 Selection of m𝑚m and scaling of convergence times
The last important choice is the value of the dimension (rank) parameter . We know from [MS15] that the optimal value of the rank constrained problem (291) is within a relative error of order of the value of the SDP (288). Also, a result by Burer and Monteiro [BM03] implies that, for , the objective function (291) has no local maxima that are not also global maxima (barring accidental degeneracies).
We empirically found that of the order of or larger is sufficient to obtain accurate results. Through most of our simulations, we fixed however , and we want to provide evidence that this is a safe choice
For each realization of the problem we compute the convergence time as the first time such that the condition is met. In Figure 12 we plot histograms of for and . Here and , but does not seems to depend strongly on , in the range we are interested in.
We observe that, for large enough (in particular , see also data in Figure 13), the histogram of concentrates around its median. We interpret this as evidence of convergence towards a well defined global minimum, whose properties concentrate for large. On the other hand, for small, e.g. , the histogram broadens as increases. This is a typical signature of convergence towards local minima, whose properties fluctuate from one graph realization to the other.
Intermediate values of display a mixed behavior, with the histogram of convergence times concentrating for small and broadening for larger . This crossover behavior is consistent with the analytical results of [BA06]. Extrapolating this crossover suggests that is sufficient for obtaining very accurate results for the range of interest to us (and most likely, well above).
Focusing on (data in Figure 13), we computed the mean and variance of , for each value of . These appear to be well fitted by the following expressions
In other words the typical time complexity of our block coordinate ascent algorithm is –empirically– (recall that each iteration comprises updates).
3.3 Determination of the phase transition location
As already shown in Section 10.2, the overlap undergoes a phase transition at a critical point close to . Namely for , while strictly for . In order to determine more precisely the phase transition location, we use the Binder’s cumulant method, which is standard in statistical physics [Bin81, LB14]. We summarize the main ideas of this method for the readers that might not be familiar with this type of analysis.
For a given graph realization , we define to be the overlap achieved by the SDP estimator on that realization, i.e.
For , we expect to concentrate around its expectation , which converges to a non-zero limit. Hence . On the other hand, for , concentrates around , and we expect it to obey a central limit theorem asymptotics, namely , with . This implies . Summarizing
We carried out extensive simulations with the block coordinate ascent, in order to evaluate the Binder cumulant, and will present our data in the next plots. In order to approximate the expectation over the random graph , we computed empirical averages over random graph samples, with chosen so that . (The rationale for using less samples for larger graph sizes is that we expect statistical uncertainties to decrease with .)
Figure 14 reports a first evaluation of for and a grid of values of . The results are consistent with the prediction of Eq. (326). The approach to the limit is expected to be described by a finite-size scaling ansatz [Car12, LB14]
for a certain scaling function , and exponent . Formally, the above approximation is meant to be asymptotically exact in the sense that, for any fixed, letting , we have . We refer to [BBC+01, DM08] for recent examples of rigorous finite-size scaling results in random graph problems.
In particular, finite size scaling suggests to estimate by the value of at which the curves , corresponding to different values of , intersect. In Figure 15 we report our data for , , , focusing on a small window around the crossing point. Continuous lines are linear fit to the data, and vertical lines correspond to the analytical estimates of Section 9.3.
We observe that, for large , the crossing point is roughly independent of the the value of , in agreement with the finite-size scaling ansatz. As a nominal estimate for the critical point, we use the crossing point of the two Binder cumulant curves corresponding to the two largest values of , see Fig. 15. These are and for , and and for , . We obtain
4 Improving numerical results by restricting to the 2-core
In order to accelerate our numerical experiments presented in Section 10.2 and 10.3, we preprocessed the graph by reducing it to its -core. Recall that the -core of a graph is the largest subgraph of , with minimum degree at least . It can be constructed in linear time by recursively removing vertices with degree at most .
In numerical experiments we first generated according to the model (287), then reduced to its -core , and finally solved the SDP (288) on . If has size , and , the size of is still of order albeit somewhat smaller [PSW96].
The pruned graph is formed with high probability by a collection of trees with size of order . It is not hard to see that the SDP estimator can achieve strictly positive overlap on (as ) if and only if it does on . Hence, this reduction does not change the phase transition location. We confirmed numerically this argument as well.