Detection in the stochastic block model with multiple clusters: proof of the achievability conjectures, acyclic BP, and the information-computation gap

Emmanuel Abbe, Colin Sandon

Introduction

The stochastic block model (SBM) is a canonical model of networks with communities, and a natural model to study various central questions in machine learning, algorithms and statistics. The model serves in particular as a test bed for clustering and community detection algorithms, commonly used in social networks [NWS], protein-to-protein interactions networks [CY06], gene expressions [CSC+07], recommendation systems [LSY03], medical prognosis [SPT+01], DNA folding [CAT15], image segmentation [SM97], natural language processing [BKN11] and more.

The SBM emerged independently in multiple scientific communities. The block model terminology, which seems to have dominated in the recent years, comes from the machine learning and statistics literature [HLL83, WBB76, FMW85, WW87, BC09, KN11, SN97, RCY11, CWA12], while the model is typically called the planted partition model in theoretical computer science [BCLS87, DF89, Bop87, JS98, CK99, CI01, McS01], and the inhomogeneous random graphs model in the mathematical literature [BJR07]. Although the model was defined as far back as the 80s, it resurged in recent years due in part to the following fascinating conjecture established first in [DKMZ11], and backed in [MNS15], from deep but non-rigorous statistical physics arguments:

We prove this conjecture in this paper. The problem was settled already for the case of k=2k=2: It was proved in [Mas14, MNS14b] that the KS threshold can be achieved efficiently for k=2k=2, with an alternative proof later given in [BLM15], and [MNS15] shows that no information-computation gap takes places for k=2k=2 with a tight converse. It was also shown in [BLM15] that for SBMs with multiple communities satisfying a certain asymmetry condition (i.e., the requirement that μk\mu_{k} is a simple eigenvalue in Theorem 5 of [BLM15]), the KS threshold can be achieved. Yet, [BLM15] does not resolve Conjecture 1 for k≥3k\geq 3.

An interesting challenge raised by part (i) of the conjecture is that standard clustering methods, commonly used in applications, fail to achieve the KS threshold. This includes spectral methods based on the adjacency matrix or standard Laplacians, as well as SDPs. For standard spectral methods, a first issue is that the fluctuations in the node degrees produce high-degree nodes that disrupt the eigenvectors from concentrating on the clusters.This issue is further enhanced on real networks where degree variations are large. A classical trick is to trim such high-degree nodes [CO10, Vu14, GV16, CRV15], throwing away some information, but this does not suffice to achieve the KS threshold. SDPs are a natural alternative, but they also stumbleThe recent results of [MPW15] on robustness to monotone adversaries suggest that SDPs can in fact not achieve the KS threshold. before the KS threshold [GV16, MS16], focusing on the most likely rather than typical clusterings. As we shall show in this paper, and as already investigated in [KMM+13, BLM15] for two communities, a linearized BP algorithm, or equivalently a spectral algorithm on a nonbacktracking operator, provides instead a solution to the conjecture.

The nonbacktracking matrix BB of a graph was introduced by Hashimoto [Has89] to study the Ihara zeta function, with the identity det⁡(I−zB)=1ζ(z)\det(I-zB)=\frac{1}{\zeta(z)}, where ζ\zeta is the Ihara zeta function of the graph. In particular, the poles of the Ihara zeta function are the reciprocal of the eigenvalues of BB. Studying the spectrum of a graph thus implies properties on the location of the Ihara zeta function. The matrix is further used to define the graph Riemann hypothesis [HST06], and studying its spectrum for random graphs such as the block model allows for generalizations of notions of Ramanujan graphs and Friedman’s Theorem to non-regular cases, as discussed in [BLM15]. The operator that we study is a natural extension of the classical nonbacktracking operator of Hashimoto, where we prohibit not only standard backtracks but also finite cycles.

In their original paper [DKMZ11], Decelle et al. conjecture that belief propagation (BP) achieves the KS threshold, and in fact, gives the the optimal accuracy in the reconstruction of the communities. However, the main issue when applying BP to the SBM is the classical one: the presence of cycles in the graph makes the behavior of the algorithm much more difficult to understand, and BP is susceptible to settling down in the wrong fixed points.Empirical studies of BP on loopy graph show that convergence still takes place in some cases [MWJ99]. This is a long standing challenge in the realm of message passing algorithms for graphical models. Moreover, achieving the KS threshold requires precisely running BP to an extent where the graph is not even tree-like, thus precluding simple tricks. Numerical simulations suggest that starting with a purely random initialization, i.e., letting each vertex in the graph guess its community membership at random, and running BP works. However, no method is currently known to control random initialization, as discussed in [MNS14b]. We develop here an alternate approach, using a linearized version of belief propagation.

Further, the paper proves part (ii) of the conjecture, crossing the KS threshold at k=4k=4 using a non-efficient algorithm that samples a typical clustering (i.e., a clustering having the right proportions of edges inside and across clusters). Note that the information-computation gap concerns the gap between the KS and information-theoretic thresholds, which is the gap between the computational and information-theoretic thresholds only under non-formal evidences [DKMZ11]. However, the IT bound that results from our analysis gives a gap to the KS threshold which is large in some cases (quasi-linear in kk), making the SBM a good study-case for such gap phenomena.

A linearized acyclic belief propagation (ABP) algorithm is developed and shown to detect communities down to the KS threshold with complexity O(nlog⁡n)O(n\log n), proving part (i) of Conjecture 1. A more general result applying to arbitrary (possibly asymmetrical) SBMs with a generalized notion of detection and KS threshold is also developed. The complexity of ABP is either comparable or improved compared to prior algorithms for k=2k=2 [Mas14, MNS14b, BLM15], while ABP achieves universally the KS threshold (see Theorem 1);

An algorithm that samples a clustering with typical volumes and cuts is shown to detect communities below the KS threshold at k=4k=4, proving part (ii) of Conjecture 1;

A connection between ABP and a power iteration method on a non-backtracking operator is developed, extending the operator of [Has89] to higher order non backtracks, and formalizing the interplay described in [KMM+13] between linearized BP and nonbacktracking operators;

An information-theoretic (IT) bound is derived for the symmetric SBM. For a=0a=0, it is shown that detection is information-theoretically solvable if b>ckln⁡k+ok(1)b>ck\ln k+o_{k}(1), c∈c\in. Thus the information-computation gap — defined as the gap between the KS threshold and the IT bound — can be large since the KS threshold reads b>k(k−1)b>k(k-1). Our bound interpolates the optimal threshold at a=0a=0, and is conjectured to be tight in the scaling of bb for small bb and any kk, and in the scaling of kk for large kk.

An efficient algorithm is shown to learn the parameters a,b,ka,b,k in the symmetric SBM down to the KS threshold.

To achieve the KS threshold, we rely on a linearized version of BP that can handle cycles. The simplest linearizedDifferent forms of approximate message passing algorithms have been studied, such as in [DMM09] for compressed sensing. version of BP is to simply repeatedly update beliefs about a vertex’s community based on its neighbor’s suspected communities while ignoring the part of that belief that results from the beliefs about that vertex’s community to prevent a feedback loop. However, this only works ideally if the graph is a tree. The correct response to a cycle would be to discount information reaching the vertex along either branch of the cycle to compensate for the redundancy of the two branches. However, due to computational issues we simply prevent information from cycling around small cycles in order to limit feedback. We also add steps where a multiple of the beliefs in the previous step are subtracted from the beliefs in the current step to prevent the beliefs from settling into an equilibrium where vertices’ communities are sytematically misrepresented in ways that add credibility to each other. We refer to Section 2.1.1 for a complete description of the algorithm and Section 3 for further intuition on how it performs.

The fact that ABP is equivalent to a power iteration method on a non-backtracking operator results from its linearized form, as pointed out first in [KMM+13]. This provides an intriguing synergy between message passing and spectral algorithms. It further allows us to interpret the obstructions of spectral methods through the lens of BP. The risk of obtaining eigenvectors that concentrate on singular structures (e.g., high degree nodes for Laplacian’s), is related to the risk that BP settles down in wrong fixed points (e.g., due to cycling around high-degree nodes). Rather than removing such obstructions, ABP mitigates the feedback coming from the loops, giving rise to a non-backtracking operator, which extends the operator of [Has89] by considering higher order nonbacktracks. In addition to simplifying the proofs, considering higher order nonbacktracking operators can help mitigating short loops in more general models, which is of independent interest. Further details are provided in Section 3.

Note that solving the detection problem has direct implications on obtaining algorithms having optimal agreement (i.e., least fraction of mislabelled vertices) for the SBM. Once one has reasonable initial guesses of which communities the vertices are in, one can simply use full belief propagation to improve this to a better agreement. In order to do that from that output of ABP, one needs to first convert the division of vertices into two sets that are correlated with their communities to an assignment of each vertex to a nontrivial probability distribution for how likely it is to be in each community. Then, for each adjacent vv and v′v^{\prime}, one can determine the probability distribution of what community vv is in based of the signs of y(v′′,v)′y^{\prime}_{(v^{\prime\prime},v)} for all v′′≠v′v^{\prime\prime}\neq v^{\prime}. Finally, use these as the starting probabilities for a belief propagation algorithm of depth ln⁡(n)/3ln⁡(λ1)\ln(n)/3\ln(\lambda_{1}). See Section 5 for further details on how this can be done. The main algorithmic challenge for obtaining optimal agreement in the SBM seems then captured by the detection problem.

To cross the KS threshold information theoretically, we rely on a non-efficient algorithm that samples a typical clustering. Upon observing a graph drawn from the SBM, the algorithm builds the set of all partitions of the nn nodes that have a typical fraction of edges inside and across clusters, and then samples a partition uniformly at random from that set. The analysis of the algorithm reveals three different regimes, that reflect three layers of refinement in the bounds on the typical set’s size. In a first regime, no bad clustering (i.e., partition of the nodes that classifies close to 1/k1/k of the vertices correctly) is typical with high probability based on a union-bound, and the algorithm samples only good clusterings with high probability. This allows us to cross the KS threshold for k=5k=5 when a=0a=0 but does not give the right bound at b=0b=0. In a second regime, the large number of tree-like components in the graph is exploited, finding some bad clusterings to be typical but unlikely to be sampled. This gives a regime where the algorithm succeeds with the right bound at b=0b=0, but not the right approximation at small bb. To address the latter, a finer estimate on the typical set’s size is obtained by also exploiting parts of the giant that are tree-like. Finally, we tighten our estimates on the typical set’s size by taking into account vertices that are not saturated, i.e., whose neighbors do not cover all communities. The final bound crosses the KS threshold at k=4k=4, interpolates the optimal threshold at a=0a=0, and is conjectured to be tight in the scaling of bb for small bb and in the scaling of kk for large kk and small aa. Further details are in Section 4.

The learning of the parameters a,b,ka,b,k is done similarly as for the case k=2k=2 [MNS15]. Note that learning the parameters when kk is unknown was previously settled only for diverging degrees [AS15b], with related results in [BCS15].

2 Related literature

Several methods were proved to succeed down to the KS threshold for two communities. The first is basedRelated ideas relying on shortest paths were also considered in [BB14]. on a spectral method from the matrix of self-avoiding walks (entry (i,j)(i,j) counts the number of self-avoiding walks of moderate size between vertices ii and jj) [Mas14], the second on counting weighted non-backtracking walks between vertices [MNS14b], and the third on a spectral method with the matrix of non-backtracking walks between directed edges (each edge is replaced with two directed edges and entry (e,f)(e,f) is one if and only if edge ee follows edge ff) [BLM15]. The first method has a complexity of O(n1+ε)O(n^{1+\varepsilon}), ε>0\varepsilon>0, while the second method affords a lesser complexity of O(nlog⁡2n)O(n\log^{2}n) but with a large constant (see discussion in [MNS14b]). These two methods were the first to achieve the KS threshold for two communities. The third method is based on a thorough analysis of the spectrum of the non-backtracking operator and allows going beyond the SBM with 2 communities, requiring however a certain asymmetry in the SBM parameters to obtain a result for detection (the precise condition is the requirement on μk\mu_{k} being a simple eigenvalue of MM in Theorem 5 of [BLM15]), thus falling short of proving Conjecture 1.(i) for k≥3k\geq 3 (since the second eigenvalue in this case has multiplicity at least 2). Note that a certain amount of symmetry is needed to make the detection problem interesting. For example, if the communities have different average degrees, detection becomes trivial. Thus the symmetric model SBM(n,k,a,b)(n,k,a,b) is in a sense the most challenging model for detection.

The non-backtracking operator was proposed first for the SBM in [KMM+13], also described as a linearization of BP. A precise spectral analysis of this operator is developed in [BLM15] and applied to the SBM. This approach gives a fascinating approach to community detection, giving the first rigorous understanding on why nonbacktracking operators achieve the KS threshold. Besides the previously mentioned shortcomings for Conjecture 1 in the symmetric case, the operator suffers from an increase in dimension, as the derived matrix scales with the number of edges rather than vertices (specifically 2∣E∣×2∣E∣2|E|\times 2|E|, where ∣E∣|E| is the number of edges).The non-backtracking matrix is also not normal and has thus a complex spectrum; an interesting heuristic based on the Bethe Hessian operator was proposed in [SKZ14] to address the dimensionality and normality issues. Nonbactracking spectral methods were also developed recently for the problem of detecting a single planted community .

Our results are closest to [MNS14b, BLM15], while diverging in several key parts. A few technical expansions in the paper are similar to those carried in [MNS14b], such as the weighted sums over nonbacktracking walks and the SAW decomposition from [MNS14b], which are similar to our compensated nonbacktracking walk counts and standard decomposition. Our modifications are however developed to cope with general SBMs rather than the 2-symmetric case, in particular to compensate for the dominant eigenvalues in the latter setting, which is delicate due to the numerous potentially close eigenvalues. Our algorithm complexity is also slightly reduced by a logarithmic factor.

Our algorithm is also closely related to [BLM15], which focuses on extracting the eigenvectors of the standard nonbacktracking operator. However, our proof technique is different than the one in [BLM15], so that we can cope with the setting of Conjecture 1. Also, we do not proceed with the eigenvectors extraction, but implement the algorithm in a belief propagation fashion. This avoids building the nonbacktracking matrix whose dimension grows with the number of edges. Note that from a spectral point of view, the power iteration method that we use is not relying on a traditional deflation method that subtracts the dominant eigenvector. Such an approach is likely to work in the symmetric SBM, but in the general SBM, we rely on a different approach that subtracts large eigenvalues times the identity matrix. Another difference from [BLM15] is that we rely on nonbacktracking operators of higher orders rr. While r=2r=2 is arguably the simplest implementation and may suffice for the sole purpose of achieving the KS threshold, a larger rr may be beneficial in practice. For example, an adversary may add triangles for which ABP with r=2r=2 would fail while larger rr would succeed. Finally, the approach of ABP can be extended beyond the linearized setting to improve the algorithm’s accuracy.

For the information-theoretic part, a few papers have studied information-theoretic bounds and information-computation tradeoffs for SBMs with a growing number of communities [YC14], two unbalanced communities [NN14], and a single community [Mon15]. No results seemed known for the symmetric SBM and Conjecture 1(b). Shortly after this paper posting, [BM16] obtained bounds on the information theoretic threshold in an independent effort using moment methods. The bound in [BM16] crosses at k=5k=5 rather than k=4k=4 and does not interpolate to the giant component bound for b=0b=0.

3 Related models

Exact recovery is a stronger recovery requirement than detection, which has long been studied for the SBM [BCLS87, DF89, Bop87, SN97, JS98, CK99, CI01, McS01, BC09, RCY11, CWA12, CSX12, Vu14, YC14, AL14, ABBS14a], and more recently in the lens of sharp thresholds [ABH16, MNS14a, YP14, BH14, Ban15, GMZZ15, JL15, YP15]. The notion of exact recovery requires a reconstruction of the complete communities with high probability. It was proved in [ABH16, MNS14a] that exact recovery has a sharp threshold for SBM(n,2,alog⁡(n),blog⁡(n))(n,2,a\log(n),b\log(n)) at ∣a−b∣=1|\sqrt{a}-\sqrt{b}|=1, which can be achieved efficiently. As opposed to detection which can exploit variations in degrees, exact recovery becomes harder when considering general SBMs, where communities have different relative sizes and different connectivity parameters. In [AS15a], it was proved that for the general SBM with linear size communities, exact recovery has a sharp threshold at the CH-divergence, and the threshold is proved to be efficiently achievable (without knowing the parameters in [AS15c]). This further improves on the result of [Vu14] that apply to the logarithmic degree regime in full generality. Thus, for exact recovery with linear size communities, there is no information-computation gap. When considering sub-linear communities and coarser regime of the parameters, [YC14] gives evidences that exact recovery can again have information-computation gaps. We also conjecture that similar phenomenon can take place in the setting of [AS15a] for exact recovery when kk is larger than log⁡(n)\log(n).

Finally, many variants of the SBM can be studied, such as the labelled block model [GZFA10, HLM12, XLM14], the censored block model [AM15, ABBS14a, CG14, ABBS14b, GRSY14, CRV15, SKLZ15], the degree-corrected block model [KN11], overlapping block models [For10] and more. While most of the fundamental challenges seem to be captured by the SBM already, these represent important extensions for applications.

Results

Our goal is to find an algorithm that can distinguish between vertices from one community and vertices from another community in a non trivial way, as defined below.

In other words, an algorithm solves detection if it divides the graph’s vertices into two sets such that vertices from different communities have different probabilities of being assigned to one of the sets. An alternate definition by Decelle et al. [DKMZ11] says that an algorithm succeeds at detection if it divides the vertices into kk sets and there exists ϵ>0\epsilon>0 such that with high probability there exists an identification of the sets with the communities such that the algorithm classifies at least max⁡pi+ϵ\max p_{i}+\epsilon of the vertices correctly:

In the kk community symmetric case, these definitions (detection and max-detection) are equivalent, but under asymmetry, this may not hold. Consider a two community asymmetric case where p=(.2,.8)p=(.2,.8). An algorithm that could find a set containing 2/32/3 of the vertices from the large community and 1/31/3 of the vertices from the small community would satisfy our definition; however, it would not satisfy Decelle’s definition because each vertex is more likely to be in the large community than the small one no matter what the algorithm outputs. In general, our definition is satisfied by any algorithm that produces nontrivial amounts of evidence on what communities the vertices are in, while Decelle’s definition requires the algorithm to sometimes produce enough evidence to overcome the prior probability. This may not always be possible (take for example the extreme case of an SBM with two community where each vertex is in community 1 with probability 0.99 and each pair of vertices in community 1 have an edge between them with probability 2/n2/n, while vertices in community 2 never have edges). If all communities have the same size then this distinction is meaningless, and we have:

of the vertices correctly with high probability. ∎

We present first a result that applies to the general SBM. We next specify the result for symmetric SBMs, and provide the ABP algorithm in the next section. Given parameters pp and QQ for the SBM, let PP be the diagonal matrix such that Pi,i=piP_{i,i}=p_{i} for each i∈[k]i\in[k]. Also, let λ1,...,λh\lambda_{1},...,\lambda_{h} be the distinct eigenvalues of PQPQ in order of nonincreasing magnitude. Our results are in terms of the following notion of SNR:

Let p∈(0,1)kp\in(0,1)^{k} with ∑p=1\sum p=1, QQ be a symmetric matrix with nonnegative entries, PP be the diagonal matrix such that Pi,i=piP_{i,i}=p_{i}, and λ1,...,λh\lambda_{1},...,\lambda_{h} be the distinct eigenvalues of PQPQ in order of nonincreasing magnitude. If λ22>λ1\lambda_{2}^{2}>\lambda_{1} then there exist constants r,cr,c and m=Θ(log⁡(n))m=\Theta(\log(n)) such that the acyclic belief propagation algorithm with these parameters solves detection in SBM(n,p,Q/n)SBM(n,p,Q/n). The algorithm can be run in O(nlog⁡n)O(n\log n) time.

Our definition of detection also extends to deciding whether or not an algorithm distinguishes between two specific communities, in the sense that there exists ϵ>0\epsilon>0 such that the fraction of the vertices from one of these communities assigned to SS differs from the fraction of the vertices from the other community assigned to SS by at least ϵ\epsilon with high probability. The right version of our ABP algorithm can then distinguish between communities ii and jj if there exists an eigenvector ww of PQPQ with an eigenvalue of magnitude greater than λ1\sqrt{\lambda_{1}} such that wi≠wjw_{i}\neq w_{j}.

We present here two versions of our main algorithm. A simplified version ABP∗ that applies to the symmetric SBM and that can easily be implemented, and the general version ABP that is used to prove Theorem 1. The general version has additional steps that are used to prove the theorem, but these can be removed for practical applications. The intuitions behind the algorithms are discussed in Section 3.5, and in Section 3.6, we show that how the algorithms can be viewed as applying a power iteration method on a nonbacktracking operator W(r)W^{(r)} of generalized order (where rr denotes the order of the nonbacktracks). The algorithms below have a message passing implementation and correspond to linearized version of belief propagation in which we originally guess what communities each vertex is likely to be in and then determine what communties each vertex’s neighbors provide evidence for it to be in. Then we use that information to update our beliefs about what evidence each vertex provides about its neighbors’ communities and repeat while mitigating cycles.

For each adjacent vv and v′v^{\prime} in GG, randomly draw yv,v′(1)y^{(1)}_{v,v^{\prime}} from a Gaussian distribution with mean and variance 11. Also, consider yv,v′(t)y^{(t)}_{v,v^{\prime}} as having a value of whenever t<1t<1.

for all adjacent vv and v′v^{\prime}. For each adjacent v,v′v,v^{\prime} in GG that are not part of a cycle of length rr or less, set

and for the other adjacent v,v′v,v^{\prime} in GG, let the other vertex in the cycle that is adjacent to vv be v′′′v^{\prime\prime\prime}, the length of the cycle be r′r^{\prime}, and set

unless t=r′t=r^{\prime}, in which case, set yv,v′(t)=∑v′′:(v′,v′′)∈E(G),v′′≠vzv′,v′′(t−1)−zv′′′,v(1)y_{v,v^{\prime}}^{(t)}=\sum_{v^{\prime\prime}:(v^{\prime},v^{\prime\prime})\in E(G),v^{\prime\prime}\neq v}z_{v^{\prime},v^{\prime\prime}}^{(t-1)}-z^{(1)}_{v^{\prime\prime\prime},v}.

Set yv′=∑v′:(v′,v)∈E(G)yv,v′(m)y^{\prime}_{v}=\sum_{v^{\prime}:(v^{\prime},v)\in E(G)}y^{(m)}_{v,v^{\prime}} for every v∈Gv\in G. Return ({v:yv′>0},{v:yv′≤0})(\{v:y^{\prime}_{v}>0\},\{v:y^{\prime}_{v}\leq 0\}).

(2) What the algorithm does if (v,v′)(v,v^{\prime}) is in multiple cycles of length rr or less is unspecified above, as there is no such edge with probability 1−o(1)1-o(1) in the sparse SBM. This can be modified for more general settings. The simplest such modification would be to apply this adjustment independently for each such cycle, and thus to set

where Cv′′′,v,v′(r′)C^{(r^{\prime})}_{v^{\prime\prime\prime},v,v^{\prime}} denotes the number of length r′r^{\prime} cycles that contain v′′′,v,v′v^{\prime\prime\prime},v,v^{\prime} as consecutive vertices, substituting zv′′′,v(1)z_{v^{\prime\prime\prime},v}^{(1)} for ∑v′′:(v,v′′)∈E(G),v′′≠v′,v′′≠v′′′zv,v′′(t−r′)\sum_{v^{\prime\prime}:(v,v^{\prime\prime})\in E(G),v^{\prime\prime}\neq v^{\prime},v^{\prime\prime}\neq v^{\prime\prime\prime}}z_{v,v^{\prime\prime}}^{(t-r^{\prime})} when r′=tr^{\prime}=t. This will not quite count r-nonbacktracking walks, but we believe that it would give a good enough approximation.

The full version of the algorithm applying to the general SBM is as follows.

ABP(G,m,r,c,(λ1,...,λh)):ABP(G,m,r,c,(\lambda_{1},...,\lambda_{h})):

Set s=2s=2 unless h>2h>2 and ∣λ2∣=∣λ3∣|\lambda_{2}|=|\lambda_{3}|, in which case set s=3s=3.

Set γ=(1−λ1/λ22)/2\gamma=(1-\lambda_{1}/\lambda^{2}_{2})/2.

Set l=max⁡((s−1)/ln⁡((1−γ)∣λs∣)+s−1,2(2r+1)(s−1))l=\max((s-1)/\ln((1-\gamma)|\lambda_{s}|)+s-1,2(2r+1)(s-1)).

Assign each edge of GG independently with probability γ\gamma to a set Γ\Gamma. Then, remove these edges from GG.

For every vertex v∈Gv\in G, randomly draw xvx_{v} from a Gaussian distribution with mean and variance 11.

For each adjacent vv and v′v^{\prime}, set yv,v′(1)=xv′y_{v,v^{\prime}}^{(1)}=x_{v^{\prime}}, and yv,v′(t)=0y_{v,v^{\prime}}^{(t)}=0 for all t<1t<1.

For each 1≤t≤m1\leq t\leq m, and each adjacent (v,v′)∈E(G)(v,v^{\prime})\in E(G), set

unless (v,v′)(v,v^{\prime}) is part of a cycle of length rr or less. If it is, then let the other vertex in the cycle that is adjacent to vv be v′′′v^{\prime\prime\prime}, and the length of the cycle be r′r^{\prime}What the algorithm does if (v,v′)(v,v^{\prime}) is in multiple cycles of length rr or less is unspecified as there is no such edge with probability 1−o(1)1-o(1) in the SBM. One can adapt this for more general models.. Set

Set YY to be the n×mn\times m matrix such that for all tt and vv,

and set yv′′y^{\prime\prime}_{v} to the sum of yv′′y^{\prime}_{v^{\prime}} over all v′v^{\prime} that have shortest paths to vv of length ⌊log⁡log⁡n⌋\lfloor\sqrt{\log\log n}\rfloor.

Set c′=c⋅∑v∈G(yv′′)2/nc^{\prime}=c\cdot\sqrt{\sum_{v\in G}(y^{\prime\prime}_{v})^{2}/n}. Create sets of vertices S1S_{1} and S2S_{2} as follows. For each vertex vv, if yv′′<−c′y^{\prime\prime}_{v}<-c^{\prime}, assign vv to S1S_{1}. If yv′′>c′y^{\prime\prime}_{v}>c^{\prime}, then assign vv to S2S_{2}. Otherwise, assign vv to S2S_{2} with probability 1/2+yv′′/2c′1/2+y^{\prime\prime}_{v}/2c^{\prime} and S1S_{1} otherwise.

2 Crossing the KS threshold information-theoretically

The following gives a region of the parameters in the symmetric SBM where detection can be solved information-theoretically.

This bound strictly improves on the KS threshold for k≥4k\geq 4:

As we shall see in Lemma 15, the above corresponds to the regime where there is no bad clustering that is typical with high probability. However, the above bound is not tight in the extreme regime of b=0b=0, since it reads a>2ka>2k as opposed to a>ka>k, and only crosses the KS threshold at k=5k=5.

Defining ak(b)a_{k}(b) as the unique solution of

and simplifying the bound in Theorem 2 gives the following.

Note that (9) approaches the optimal bound given by the presence of the giant at b=0b=0, and we further conjecture that ak(b)a_{k}(b) gives the correct first order approximation of the information-theoretic bound for small bb.

Note that the kln⁡kk\ln k scaling in (8) improves significantly on the KS threshold given by b>k(k−1)b>k(k-1) at a=0a=0. Relatedly, note that the kk-colorability threshold for Erdős-Rényi graphs grows as 2kln⁡k2k\ln k [DA05]. This coule be used to obtain an information-theoretic bound, but the constant would be looser than the one obtained here.

We also believe that the above gives the correct scaling in kk for a=0a=0, i.e., that for b<(1−ε)kln⁡(k)+ok(1)b<(1-\varepsilon)k\ln(k)+o_{k}(1), ε>0\varepsilon>0, detection is information-theoretically impossible. To see this, consider v∈Gv\in G, b=(1−ϵ)kln⁡(k)b=(1-\epsilon)k\ln(k), and assume that we know the communities of all vertices more than r=ln⁡(ln⁡(n))r=\ln(\ln(n)) edges away from vv. For each vertex rr edges away from vv, there will be approximately kϵk^{\epsilon} communities that it has no neighbors in. Then vertices r−1r-1 edges away from vv have approximately kϵln⁡(k)k^{\epsilon}\ln(k) neighbors that are potentially in each community, with approximately ln⁡(k)\ln(k) fewer neighbors suspected of being in its community than in the average other community. At that point, the noise has mostly drowned out the signal and our confidence that we know anything about the vertices’ communities continues to degrade with each successive step towards vv.

In [BM16], a different approach than the one described in previous remark is developed based on a contiguity argument and estimates from [DA05], and formally proves that the scaling in kk is in fact tight.

where the above assumes that a>ba>b; flip the above two inequalities in the case a<ba<b.

3 Learning the model

To learn the parameters, we count cycles of slowly growing length as already done in [MNS15] for k=2k=2, using non-backtracking walks to approximate the count.

Achieving the KS threshold: proof technique

Recall the parameters: kk and nn are positive integers, p∈(0,1)kp\in(0,1)^{k} with ∑pi=1\sum p_{i}=1, and QQ is a k×kk\times k symmetric matrix with nonnegative entries. Then SBM(n,p,Q/n)SBM(n,p,Q/n) generates nn-vertex graphs by the following procedure. First, each vertex vv is randomly and independently assigned a community σv\sigma_{v} such that the probability that σv=i\sigma_{v}=i is pip_{i} for each ii. Then, each pair of vertices vv and v′v^{\prime} have an edge put between them with probability Qσv,σv′/nQ_{\sigma_{v},\sigma_{v^{\prime}}}/n. Also, let Ω1,...,Ωk\Omega_{1},...,\Omega_{k} be the communities and PP be the k×kk\times k diagonal matrix such that Pi,i=piP_{i,i}=p_{i} for each ii. Now, consider the 22-community symmetric stochastic block model. In this case, k=2k=2, p=[1/2,1/2]p=[1/2,1/2], Qi,jQ_{i,j} is aa if i=ji=j and bb otherwise for some a,ba,b. Now, let λ1=a+b2\lambda_{1}=\frac{a+b}{2} be the average degree of a vertex in a graph drawn from this model, and λ2=a−b2\lambda_{2}=\frac{a-b}{2} be the other eigenvalue of PQPQ. Throught this section we say ff is approximately gg or f≈gf\approx g when ∣f−g∣=o(∣f+g∣)|f-g|=o(|f+g|) with probability 1−o(1)1-o(1).

Our goal is to determine which of vv’s vertices are in each community with an accuracy that is nontrivially better than that attained by random guessing. Obviously, the symmetry between communities ensures that we can never tell whether a given vertex is in community 11 or community 22, so the best we can hope for is to divide the vertices into two sets such that there is a nontrivial difference between the fraction of vertices from community 11 that are assigned to the first set and the fraction of vertices from community 22 that are assigned to the first set.

Let xx and n−xn-x be the numbers of vertices in community 11 and community 22 respectively. If the vertices are assigned sets at random, then the expected numbers of vertices from each community in the first set are x2\frac{x}{2} and n−x2\frac{n-x}{2}. However, by the central limit theorem, the probability distribution of the actual number of vertices from a given community in the first set is approximately a gaussian distribution with the mean stated previously and a variance of x4\frac{x}{4} or n−x4\frac{n-x}{4} as appropriate. That means that the probability distribution of the difference between the fraction of the vertices from community 11 assigned to the first set and the fraction of the vertices from the community 22 assigned to the first set is also approximately a bell curve. This one has a mean of 12−12=0\frac{1}{2}-\frac{1}{2}=0 and a variance of

That means that it has a standard deviation of ≈1/n\approx 1/\sqrt{n}, and the difference between the fraction of the vertices from community 11 assigned to the first set and the fraction of the vertices from community 22 assigned to the first set will typically have a magnitude on the order of 1/n1/\sqrt{n}. Label the sets S1S_{1} and S2S_{2} such that the fraction of the vertices from Ω1\Omega_{1} that were assigned to S1S_{1} is at least as large as the fraction of the vertices from Ω2\Omega_{2} that were assigned to S1S_{1}. For the rest of this section, we will consider the difference between these fractions to be fixed.

Consider determining the community of vv using belief propagation, assuming some preliminary guesses about the vertices tt edges away from it, and assuming that the subgraph of GG induced by the vertices within tt edges of vv is a tree. For any vertex v′v^{\prime} such that d(v,v′)<td(v,v^{\prime})<t, let Cv′C_{v^{\prime}} be the set of the children of v′v^{\prime}. If we believe based on either our prior knowledge or propagation of beliefs up to these vertices that v′′v^{\prime\prime} is in community 11 with probability 12+12ϵv′′\frac{1}{2}+\frac{1}{2}\epsilon_{v^{\prime\prime}} for each v′′∈Cv′v^{\prime\prime}\in C_{v^{\prime}}, then the algorithm will conclude that v′v^{\prime} is in community 11 with a probability of

If all of the ϵv′′\epsilon_{v^{\prime\prime}} are close to , then this is approximately equal to

Equivalently, given a vertex vv and a small tt, the expected number of vertices that are tt edges away from vv is approximately (a+b2)t(\frac{a+b}{2})^{t}, and the expected number of these vertices in the same community as vv is approximately (a−b2)t(\frac{a-b}{2})^{t} greater than the expected number of these vertices in the other community. So, if we had some way to independently determine which community a vertex is in with an accuracy of 12+ϵ\frac{1}{2}+\epsilon for small ϵ\epsilon, we could guess that each vertex is in the community that we think that the majority of the vertices tt steps away from it are in to determine its community with an accuracy of roughly 12+((a−b)22(a+b))t/2ϵ\frac{1}{2}+\left(\frac{(a-b)^{2}}{2(a+b)}\right)^{t/2}\epsilon.

To obtain initial estimates, we simply guess the vertices’ communities at random as described in the previous section, with the expectation that the fractions of the vertices from the two communities assigned to a community will differ by θ(1/n)\theta(1/\sqrt{n}) by the Central Limit Theorem. Once we have even such weak information on which vertex is in which community, we can try to improve our classification of a given vertex by factoring in our knowledge of what communities the nearby vertices are in. For a vertex vv and integer tt, let Nt(v)N_{t}(v) be the number of vertices tt edges away from vv, Δt(v)\Delta_{t}(v) be the difference between the number of vertices tt edges away from vv that are in community 11 and the number of vertices tt edges away from vv that are in community 22, and Δ~t(v)\widetilde{\Delta}_{t}(v) be the difference between the number of vertices tt edges away from vv that are in S1S_{1} and the number of vertices tt edges away from vv that are in S2S_{2}. For small tt,

For any fixed values of Nt(v)N_{t}(v) and Δt(v)\Delta_{t}(v), the probability distribution of Δ~t(v)\widetilde{\Delta}_{t}(v) is essentially a Gaussian distribution with a mean of Θ(Δt(v)/n)\Theta(\Delta_{t}(v)/\sqrt{n}) and a variance of ≈Nt(v)\approx N_{t}(v) because it is the sum of Nt(v)N_{t}(v) nearly independent variables that are approximately equally likely to be 11 or −1-1. So, Δ~t(v)\widetilde{\Delta}_{t}(v) is positive with a probability of 12+Θ(Δt(v)/∣Nt(v)∣n)\frac{1}{2}+\Theta(\Delta_{t}(v)/\sqrt{|N_{t}(v)|n}). In other words, if vv is in community 11 then Δ~t(v)\widetilde{\Delta}_{t}(v) is positive with a probability of

and if vv is in community 22 then Δ~t(v)\widetilde{\Delta}_{t}(v) is positive with a probability of

If (a−b)2≤2(a+b)(a-b)^{2}\leq 2(a+b), then this is not improving the accuracy of the classification, so this technique is useless. On the other hand, if (a−b)2>2(a+b)(a-b)^{2}>2(a+b), the classification becomes more accurate as tt increases. However, this formula says that to classify vertices with an accuracy of 1/2+Ω(1)1/2+\Omega(1), we would need to have tt such that

However, unlessIf a=0a=0 and k=2k=2 or b=0b=0, then classifying vertices based on the sign of Δ~t(v)\widetilde{\Delta}_{t}(v) for suitable tt is likely to work, but this is pointlessly complicated because every component of the graph consists of all vertices of one community or vertices of alternating communities. aa or bb is , that would imply that

which means that (a+b2)t=ω(n)(\frac{a+b}{2})^{t}=\omega(n). It is obviously impossible for Nt(v)N_{t}(v) to be greater than nn, so this tt is too large for the approximation to hold. The problem is, the approximation assumes that each vertex at a distance of t−1t-1 from vv has one edge leading back towards vv, and that the rest of its edges lead towards new vertices. Once a significant fraction of the vertices are less than tt edges away from vv, a significant fraction of the edges incident to vertices t−1t-1 edges away from vv are part of loops and thus do not lead to new vertices.

2 Nonbacktracking walks

An obvious way to solve the problem caused by running out of vertices would be to simply count the walks of length tt from vv to vertices in S1S_{1} or S2S_{2}. Recall that a walk is a series of vertices such that each vertex in the walk is adjacent to the next, and a path is a walk with no repeated vertices. The last vertex of such a walk will be adjacent to an average of approximately a/2a/2 vertices in its community outside the walk and b/2b/2 vertices in the other community outside the walk. However, it will also be adjacent to the second to last vertex of the walk, and maybe some of the other vertices in the walk as well. As a result, the number of walks of length tt from vv to vertices in S1S_{1} or S2S_{2} cannot be easily predicted in terms of vv’s community. So, the numbers of such walks are not useful for classifying vertices.

We could deal with this issue by counting pathsThis type of approach is considered in [BB14]. of length tt from vv to vertices in S1S_{1} and S2S_{2}. Given a path of length t−1t-1, the expected number of vertices outside the path in the same community as its last vertex that are adjacent to it is approximately a/2a/2 and the expected number of vertices outside the path in the opposite community as its last vertex that are adjacent to it is approximately b/2b/2. So, the expected number of paths of length tt from vv is approximately (a+b2)t(\frac{a+b}{2})^{t} and the expected difference between the number that end in vertices in the same community as vv and the number that end in the other community is approximately (a−b2)t(\frac{a-b}{2})^{t}. The problem with this is that counting all of these paths is inefficient.

The compromise we use is to count nonbacktracking walks ending at vv, i.e. walks that never repeat the same edge twice in a row. We can efficiently determine how many nonbacktracking walks of length tt there are from vertices in SiS_{i} to vv by using the fact that the number of nonbacktracking walks of length tt starting at a vertex in SiS_{i} and having v′v^{\prime} and vv as their last two vertices is equal to the sum over all v′′≠vv^{\prime\prime}\neq v such that v′′v^{\prime\prime} is adjacent to v′v^{\prime} of the number of nonbacktracking walks of length t−1t-1 starting at a vertex in SiS_{i} and having v′′v^{\prime\prime} and v′v^{\prime} as their last two vertices. Furthermore, most nonbacktracking walks of a given length that is logarithmic in nn are paths, so it seems reasonable to expect that counting nonbacktracking walks instead of paths in our algorithm will have a negligible effect on the accuracy.

More precisely, that suggests the following approach. Define yv,v′(t)y_{v,v^{\prime}}^{(t)} to be the number of nonbacktracking walks of length tt that start at vertices in S2S_{2} and end in the directed edge (v′,v)(v^{\prime},v) minus the number of nonbacktracking walks of length tt that start at vertices in S1S_{1} and end in (v′,v)(v^{\prime},v). Also, define yv(t)y_{v}^{(t)} to be the overall difference between the number of nonbacktracking walks of length tt from vertices in S2S_{2} to vv and the number of nonbacktracking walks of length tt from vertices in S1S_{1} to vv. Their values can be efficiently computed by means of the following procedure:

If v′∈S2v^{\prime}\in S_{2}, set yv,v′(1)=1y_{v,v^{\prime}}^{(1)}=1

Otherwise, set yv,v′(1)=−1y_{v,v^{\prime}}^{(1)}=-1

For every 1<t≤m1<t\leq m and (v,v′)∈E(G):(v,v^{\prime})\in E(G):

Set yv,v′(t)=∑v′′:(v′′,v′)∈E(G),v′′≠vyv′,v′′(t−1)y_{v,v^{\prime}}^{(t)}=\sum_{v^{\prime\prime}:(v^{\prime\prime},v^{\prime})\in E(G),v^{\prime\prime}\neq v}y_{v^{\prime},v^{\prime\prime}}^{(t-1)}

For every (v,v′)∈E(G)(v,v^{\prime})\in E(G) and v∈Gv\in G

Set yv(m)=∑v′:(v,v′)∈E(G)yv,v′(m)y_{v}^{(m)}=\sum_{v^{\prime}:(v,v^{\prime})\in E(G)}y_{v,v^{\prime}}^{(m)}

One way of viewing this algorithm is that yv,v′(t)y_{v,v^{\prime}}^{(t)} represents our current belief about what community v′v^{\prime} is in, disregarding any information derived from the fact that it is next to vv. We start with fairly unconfident beliefs about the vertices’ communities, and then derive more and more confident beliefs about the vertices’ communities by taking our beliefs about their neighbors’ communities into account.

3 Compensation for the average value

yv,v′(1)y_{v,v^{\prime}}^{(1)} has an average value of Θ(1/n)\Theta(1/\sqrt{n}) for v′v^{\prime} in community 22 and −Θ(1/n)-\Theta(1/\sqrt{n}) for v′v^{\prime} in community 11. Also, yv,v′(1)y_{v,v^{\prime}}^{(1)} has a variance of order 11. For a random (v,v′)∈E(G)(v,v^{\prime})\in E(G), v′v^{\prime} will have an average of approximately a/2a/2 neighbors other than vv in its community and b/2b/2 neighbors other than vv in the other community. So, by induction on tt, we would expect that yv,v′(t)y_{v,v^{\prime}}^{(t)} would have an average value of Θ((a−b2)t/n)\Theta((\frac{a-b}{2})^{t}/\sqrt{n}) for v’ in community 22 and −Θ((a−b2)t/n)-\Theta((\frac{a-b}{2})^{t}/\sqrt{n}) for v’ in community 11. Since yv′,v′′(t−1)y_{v^{\prime},v^{\prime\prime}}^{(t-1)} should be approximately independent for different v′′v^{\prime\prime} adjacent to v′v^{\prime}, we would also expect that yv,v′(t)y_{v,v^{\prime}}^{(t)} would have an empirical variance of approximately (a+b2)t(\frac{a+b}{2})^{t}, and thus a standard deviation of approximately (a+b2)t\sqrt{(\frac{a+b}{2})^{t}}. So, for tt such that (a−b2)t/n>(a+b2)t(\frac{a-b}{2})^{t}/\sqrt{n}>\sqrt{(\frac{a+b}{2})^{t}}, we would expect that we could determine the community of v′v^{\prime} from yv,v′(t)y_{v,v^{\prime}}^{(t)} with accuracy 1/2+Ω(1)1/2+\Omega(1).

The problem with this reasoning is that the average value over all (v,v′)∈E(G)(v,v^{\prime})\in E(G) of yv,v′(1)y_{v,v^{\prime}}^{(1)} will not be exactly . It will also tend to have an absolute value on the order of 1/n1/\sqrt{n}. That means that the average value over all (v,v′)∈E(G)(v,v^{\prime})\in E(G) of yv,v′(t)y_{v,v^{\prime}}^{(t)} will have an absolute value of Θ((a+b2)t/n)\Theta((\frac{a+b}{2})^{t}/\sqrt{n}). If we hold the average value of yv,v′(t−1)y_{v,v^{\prime}}^{(t-1)} fixed then that means that E[yv,v′(t)∣N1(v′)]E[y_{v,v^{\prime}}^{(t)}|N_{1}(v^{\prime})] will have an empirical variance of Θ((a+b2)2t/n)\Theta((\frac{a+b}{2})^{2t}/n), and thus that yv,v′(t)y_{v,v^{\prime}}^{(t)} will also have an empirical variance of at least Θ((a+b2)2t/n)\Theta((\frac{a+b}{2})^{2t}/n). This implies that the standard deviation of yv,v′(t)y_{v,v^{\prime}}^{(t)} will always be much greater than the difference between the average value of yv,v′(t)y_{v,v^{\prime}}^{(t)} for v′v^{\prime} in community 11 and the average value of yv,v′(t)y_{v,v^{\prime}}^{(t)} for v′v^{\prime} in community 22, which would render attempts to classify v′v^{\prime} based on yv,v′(t)y_{v,v^{\prime}}^{(t)} ineffective.

The simple way to fix this would be to add a step where we subtract the average value of y(t)y^{(t)} from every element of y(t)y^{(t)} so its sum is for every tt like we did in the version of ABPABP in Section 2.1.1. However, this does not extend easily to the general Stochastic Block Model, and we want a solution that does.

In order to prevent this, we need to stop the average value of yv,v′(t)y_{v,v^{\prime}}^{(t)} from getting too large. It will tend to multiply by roughly a+b2\frac{a+b}{2} each time tt increases by 11, so the average value of yv,v′(t)−a+b2yv,v′(t−1)y_{v,v^{\prime}}^{(t)}-\frac{a+b}{2}y_{v,v^{\prime}}^{(t-1)} will probably be much smaller than the average value of yv,v′(t)y_{v,v^{\prime}}^{(t)}. So, if we pick some 1<i≤m1<i\leq m and redefine yv,v′(i)y_{v,v^{\prime}}^{(i)} so that

for all (v,v′)∈E(G)(v,v^{\prime})\in E(G), the average value of yv,v′(i)y_{v,v^{\prime}}^{(i)} will be much smaller than it would have been. Since the difference between the average values of yv,v′(t)y_{v,v^{\prime}}^{(t)} over v′v^{\prime} in different communities grows as Θ((a−b2)t/n)\Theta((\frac{a-b}{2})^{t}/\sqrt{n}), this redefinition will merely change the difference between the average values over v′v^{\prime} in different communities of yv,v′(i)y_{v,v^{\prime}}^{(i)} from Θ((a−b2)i/n)\Theta((\frac{a-b}{2})^{i}/\sqrt{n}) to

However, the average value of yv,v′(i)y_{v,v^{\prime}}^{(i)} will still be nonzero, and if we continue to set yv,v′(t)=∑v′′:(v′′,v′)∈E(G),v′′≠vyv′,v′′(t−1)y_{v,v^{\prime}}^{(t)}=\sum_{v^{\prime\prime}:(v^{\prime\prime},v^{\prime})\in E(G),v^{\prime\prime}\neq v}y_{v^{\prime},v^{\prime\prime}}^{(t-1)} for all t>it>i, the average value of yv,v′(t)y_{v,v^{\prime}}^{(t)} would resume increasing in magnitude faster than the average difference between yv,v′(t)y_{v,v^{\prime}}^{(t)} for different communities of v′v^{\prime}. This creates the risk that it would still eventually get too large. So, in order to actually fix the problem, it may be necessary to repeat the step where its magnitude is reduced. More precisely, we may have to choose several indices t0,t1,...tm′t_{0},t_{1},...t_{m^{\prime}} and redefine yv,v′(ti)y_{v,v^{\prime}}^{(t_{i})} for each ii so that

Once we have made these modifications, it will be the case that for sufficiently large mm, the average value for v′v^{\prime} in community 11 of yv,v′(m)y_{v,v^{\prime}}^{(m)} will differ from the average value for v′v^{\prime} in community 22 of yv,v′(m)y_{v,v^{\prime}}^{(m)} by a constant multiple of the standard deviation of yv,v′(m)y_{v,v^{\prime}}^{(m)}. Then, we define yv(m)=∑v′:(v,v′)∈E(G)yv,v′(m)y_{v}^{(m)}=\sum_{v^{\prime}:(v,v^{\prime})\in E(G)}y_{v,v^{\prime}}^{(m)} in order to simplify it to a function of one vertex which is still correlated with the vertex’s community. Unfortunately, this does not guarantee that simply dividing the vertices into those with a positive value of yv(m)y_{v}^{(m)} and those with a negative value of yv(m)y_{v}^{(m)} will give a useful partition. It could be the case that the fraction of vv for which yv(m)y_{v}^{(m)} is positive is the same for both communities, but yv(m)y_{v}^{(m)} is typically more strongly positive or less strongly negative for vv in one community than vv in the other. So, we randomly assign each vertex to a set with a probability that scales linearly with yv(m)y_{v}^{(m)} in order to ensure that having a higher average value of yv(m)y_{v}^{(m)} actually leads to having greater representation in one of the proposed communities.

4 Vanilla ABP

We present first a simplified version of our algorithm. Our proof relies on a modified version described below, but this version captures the essence of our algorithm while avoiding technicalities required for the proof.

For each adjacent vv and v′v^{\prime} in GG, randomly draw yv,v′(1)y^{(1)}_{v,v^{\prime}} from a Gaussian distribution with mean and variance 11. Also, consider yv,v′(t)y^{(t)}_{v,v^{\prime}} as having a value of whenever t<1t<1.

For each 1<t≤m1<t\leq m, and each adjacent vv and v′v^{\prime} in GG, set

unless (v,v′)(v,v^{\prime}) is part of a cycle of length rr or less.See Remark (2) in Section 2.1.1 for how to modify the algorithm in the case of multiple cycles. If it is, then let the other vertex in the cycle that is adjacent to vv be v′′′v^{\prime\prime\prime}, and the length of the cycle be r′r^{\prime}, and set

unless t=r′t=r^{\prime}, in which case, set

Set YY to be the n×mn\times m matrix such that for all tt and vv,

Return ({v:yv′>0},{v:yv′≤0})(\{v:y^{\prime}_{v}>0\},\{v:y^{\prime}_{v}\leq 0\}).

This version of ABP is mostly the same as the one in Section 2.1.1. However, the previous version compensates for biases in y(1)y^{(1)} by subtracting the average value of y(t)y^{(t)} from each entry in y(t)y^{(t)} for every tt in order to prevent it from ever becoming significantly biased. This version compensates for biases by a variant of the method explained in the previous subsection instead. More specifically, it uses the method explained in the previous subsection except that it calculates all of the y(t)y^{(t)} without using any form of compensation and then adjusts the results in order to essentially apply the compensation retroactively.

Implementation details. Note that ABP∗ABP^{*} has several differences from the algorithm outlined in previous sections. First of all, we initialize the yv,v′(0)y_{v,v^{\prime}}^{(0)} using a random value that is drawn from a normal distribution because a probability distribution that is a multidimensional normal distribution is easier to analyse than a probability distribution that is evenly distributed over the vertices of an nn-dimensional hypercube. Secondly, we require that our walks never repeat the same vertex within rr steps for some rr, rather than merely requiring that they not backtrack. This allows us to use the expected number of walks between vertices in our analysis without worrying about the tiny probability that there is a dense tangle in the graph with a huge number of nonbacktracking walks between its vertices. Making this modification to the algorithm requires adding an extra part to the recursion step where walks that just repeated a vertex are cancelled out, specifically the second half of step 33 of the algorithm above. The resulting algorithm is called the acyclic belief propagation algorithm because it counts walks that do not contain any small cycles. Thirdly, we move all of the recursion steps that compensate for the average value to the end of the algorithm. This is possible because the operation that takes y(t−1)y^{(t-1)} as input and outputs a list that has a value of

for each (v,v′)∈E(v,v^{\prime})\in E commutes with the one that simply outputs a list that has a value of ∑v′′:(v′′,v′)∈E(G),v′′≠vyv′,v′′(t−1)\sum_{v^{\prime\prime}:(v^{\prime\prime},v^{\prime})\in E(G),v^{\prime\prime}\neq v}y_{v^{\prime},v^{\prime\prime}}^{(t-1)} for each (v,v′)∈E(v,v^{\prime})\in E. The algorithm generates y(m)y^{(m)} by applying these two operations in some sequence to y(1)y^{(1)}, so we can calculate it by applying the later operation m−m′m-m^{\prime} times and then applying the former operation m′m^{\prime} times. Actually, the algorithm takes this one step farther by applying the later operation mm times and then calculating how the result would have changed if it had applied the former the appropriate number of times, but it still has the same result.

The full Acyclic Belief Propagation algorithm also has a few differences from ABP∗ABP^{*} that make it easier to prove that it works. In particular, we randomly select a small fraction of the graph’s edges at the beginning of the algorithm. Then, we require one specific step of each nonbacktracking walk to use one of the selected edges, and all of their other steps to use edges that have not been selected. Since the selected edges are nearly independent of the rest of the graph, this allows us to more easily prove that the values of yv′,v′′(t−1)y_{v^{\prime},v^{\prime\prime}}^{(t-1)} for v′v^{\prime} adjacent to vv will not become dependent in a way that disrupts the algorithm.

5 ABP for the symmetric SBM

Let aa and bb be positive real numbers such that (a−b)2>2(a+b)(a-b)^{2}>2(a+b), and SS be the 22-community symmetric stochastic block model with these parameters. There exist constants ϵ,l,r,c>0\epsilon,l,r,c>0 and m=Θ(log⁡(n))m=\Theta(\log(n)) such that when the basic 22-community symmetric acyclic belief propagation algorithm is run on these parameters and a random G∈SG\in S, the expected difference between the fraction of vertices from community 11 that are in S1S_{1} and the fraction of vertices from community 22 that are in S1S_{1} is at least ϵ\epsilon.

The basic 22-community symmetric acyclic belief propagation algorithm is as follows.

2CS−ABP⋆(G,m,r,l,c,λ1):2CS-ABP^{\star}(G,m,r,l,c,\lambda_{1}):

Find all cycles of length rr or less in GG.

For every vertex v∈Gv\in G, randomly assign xvx_{v} according to a Normal distribution with mean and variance 11. For each adjacent vv and v′v^{\prime}, let yv,v′(1)=xv′y_{v,v^{\prime}}^{(1)}=x_{v^{\prime}}, and yv,v′(t)=0y_{v,v^{\prime}}^{(t)}=0 for all t≤0t\leq 0.

For each 1≤t≤m1\leq t\leq m, and each adjacent (v,v′)∈E(G)(v,v^{\prime})\in E(G), set

unless v,v′v,v^{\prime} is part of a cycle of length rr or less. If it is, then let the other vertex in the cycle that is adjacent to vv be v′′′v^{\prime\prime\prime}, and the length of the cycle be r′r^{\prime}. Set

Set YY to be the n×mn\times m matrix such that for all tt and vv,

Set c′=c⋅∑v∈G(yv(m))2/nc^{\prime}=c\cdot\sqrt{\sum_{v\in G}(y^{(m)}_{v})^{2}/n}. Create sets of vertices S1S_{1} and S2S_{2} as follows. For each vertex vv, if yv(m)<−c′y^{(m)}_{v}<-c^{\prime}, assign vv to S1S_{1}. If yv(m)>c′y^{(m)}_{v}>c^{\prime}, then assign vv to S2S_{2}. Otherwise, assign vv to S2S_{2} with probability 1/2+yv(m)/2c′1/2+y^{(m)}_{v}/2c^{\prime} and S1S_{1} otherwise. Return (S1,S2)(S_{1},S_{2}).

We believe that the difference between the fraction of vertices from community 11 that this algorithm puts in S1S_{1} and the fraction of vertices from community 22 that this algorithm puts in S1S_{1} will be at least ϵ\epsilon with probability 1−o(1)1-o(1). However, in order to prove that we can detect communities reliably we use the following slightly modified form of the algorithm.

Let aa and bb be positive real numbers such that (a−b)2>2(a+b)(a-b)^{2}>2(a+b), and SS be the 22-community symmetric stochastic block model with these parameters. There exist constants ϵ,l,r,c,γ>0\epsilon,l,r,c,\gamma>0 and m=Θ(log⁡(n))m=\Theta(\log(n)) such that when the 22-community symmetric acyclic belief propagation algorithm is run on these parameters and a random G∈SG\in S, the difference between the fraction of vertices from community 11 that are in S1S_{1} and the fraction of vertices from community 22 that are in S1S_{1} is at least ϵ\epsilon with probability 1−o(1)1-o(1).

The 22-community symmetric acyclic belief propagation algorithm is as follows.

Randomly and independently select each edge in GG with probability γ\gamma. Put all of the selected edges in a set Γ\Gamma, and remove them from the graph.

For every vertex v∈Gv\in G, randomly assign xvx_{v} according to a Normal distribution with mean and variance 11. For each adjacent vv and v′v^{\prime}, let yv,v′(1)=xv′y_{v,v^{\prime}}^{(1)}=x_{v^{\prime}}, and yv,v′(t)=0y_{v,v^{\prime}}^{(t)}=0 for all t≤0t\leq 0.

For each 1≤t≤m1\leq t\leq m, and each adjacent (v,v′)∈E(G)(v,v^{\prime})\in E(G), set

unless v,v′v,v^{\prime} is part of a cycle of length rr or less. If it is, then let the other vertex in the cycle that is adjacent to vv be v′′′v^{\prime\prime\prime}, and the length of the cycle be r′r^{\prime}. Set

Set YY to be the n×mn\times m matrix such that for all tt and vv,

For each v∈Gv\in G, set yv′′y^{\prime\prime}_{v} to be the sum of yv′′y^{\prime}_{v^{\prime}} for all vertices v′v^{\prime} that are exactly ⌊ln⁡ln⁡n⌋\lfloor\sqrt{\ln\ln n}\rfloor edges away from vv.

Set c′=c⋅∑v∈G(yv′′)2/nc^{\prime}=c\cdot\sqrt{\sum_{v\in G}(y^{\prime\prime}_{v})^{2}/n}. Create sets of vertices S1S_{1} and S2S_{2} as follows. For each vertex vv, if yv′′<−c′y^{\prime\prime}_{v}<-c^{\prime}, assign vv to S1S_{1}. If yv′′>c′y^{\prime\prime}_{v}>c^{\prime}, then assign vv to S2S_{2}. Otherwise, assign vv to S2S_{2} with probability 1/2+yv′′/2c′1/2+y^{\prime\prime}_{v}/2c^{\prime} and S1S_{1} otherwise. Return (S1,S2)(S_{1},S_{2}).

Note that the last theorem is simply Theorem 1 in the 22 community symmetric case with some parts of the initialization step replaced by an assumption that parameters are chosen correctly. Also, the one before it follows from a slightly simplified version of the same proof.

For the kk-community symmetric stochastic block model, the above is largely unchanged. The key differences are that λ1=a+(k−1)bk\lambda_{1}=\frac{a+(k-1)b}{k}, λ2=a−bk\lambda_{2}=\frac{a-b}{k}, the requirement for the algorithm to work is that (a−b)2>k(a+(k−1)b)(a-b)^{2}>k(a+(k-1)b), and if the requirements are met the kkCS-ABP∗ algorithm distinguishes between every pair of communities with expected accuracy at least ϵ\epsilon.

In this algorithm, the initialization step and computing y(t)y^{(t)} for a given tt both run in O(n)O(n) time. y(m)y^{(m)} can be computed in O(nlog⁡n)O(n\log n) time if it is done the efficient way, y′y^{\prime} takes O(n)O(n) time to compute, and computing y′′y^{\prime\prime} takes O(nlog⁡n)O(n\log n) time. Determining S1S_{1} and S2S_{2} from y′′y^{\prime\prime} can also be done in O(n)O(n) time, so this whole algorithm can be run in O(nlog⁡n)O(n\log n) time.

6 Spectral view of ABP

An alternative perspective on this algorithm is the following. Assume for the moment that there are exactly n/2n/2 vertices in each community, and let MM be the expected adjacency matrix, the matrix such that Mv,v′M_{v,v^{\prime}} is a/na/n if vv and v′v^{\prime} are in the same community and b/nb/n if they are not. This matrix has an eigenvector whose entries are all 11 with eigenvalue a+b2\frac{a+b}{2}, an eigenvector whose entries are ±1\pm 1 with their signs determined by the relevant vertices’ communities that has eigenvalue a−b2\frac{a-b}{2}, and all of its other eigenvalues are .

Now, let M′M^{\prime} be the graph’s actual adjacency matrix. The result above suggests that the second eigenvector of M′M^{\prime} may have entries that are correlated with the vertices’ communities. The problem with this reasoning is that while M′M^{\prime} has an expected value of MM, (M′)2(M^{\prime})^{2} has an expected value of roughly M2+a+b2IM^{2}+\frac{a+b}{2}I because for every i,ji,j, Mi,j′=1  ⟺  Mj,i′=1M^{\prime}_{i,j}=1\iff M^{\prime}_{j,i}=1, with the result that E[∑jMi,j′⋅Mj,i′]E[\sum_{j}M^{\prime}_{i,j}\cdot M^{\prime}_{j,i}] is very different from ∑jE[Mi,j′]⋅E[Mj,i′]\sum_{j}E[M^{\prime}_{i,j}]\cdot E[M^{\prime}_{j,i}]. In other words, the square of the adjacency matrix counts walks of length 22 and has an expected value that is significantly different from the square of the expected adjacency matrix due to backtracking.

In order to avoid this issue, we define the graph’s nonbacktracking walk matrix WW as a matrix over the vector space with an orthonormal basis consisting of a vector for each directed edge in the graph. W(v1,v2),(v1′,v2′)W_{(v_{1},v_{2}),(v^{\prime}_{1},v^{\prime}_{2})} is defined to be 11 if v2′=v1v^{\prime}_{2}=v_{1} and v2≠v1′v_{2}\neq v^{\prime}_{1} and otherwise. In other words, it has a 11 for every case where one directed edge leads to another that is not the same edge in the other direction.

Now, let w∈R2∣E(G)∣w\in R^{2|E(G)|} be the vector whose entries are all 11, and w′∈R2∣E(G)∣w^{\prime}\in R^{2|E(G)|} be the vector such that w(v0,v1)′w^{\prime}_{(v_{0},v_{1})} is 11 if v0v_{0} is in community 11 and −1-1 if v0v_{0} is in community 22. As mentioned before, for a small tt and a random (v,v′)∈E(G)(v,v^{\prime})\in E(G), there will be an average of approximately (a+b2)t(\frac{a+b}{2})^{t} directed edges tt edges in front of (v,v′)(v,v^{\prime}), and approximately (a−b2)t(\frac{a-b}{2})^{t} more of these edges will have ending vertices in the same community as v′v^{\prime} than in the other community on average. So, w⋅Wtw≈2∣E(G)∣(a+b2)tw\cdot W^{t}w\approx 2|E(G)|(\frac{a+b}{2})^{t} and w′⋅Wtw′≈2∣E(G)∣(a−b2)tw^{\prime}\cdot W^{t}w^{\prime}\approx 2|E(G)|(\frac{a-b}{2})^{t}. That strongly suggests that WW has eigenvectors that are correlated with ww and w′w^{\prime} that have eigenvalues of approximately a+b2\frac{a+b}{2} and a−b2\frac{a-b}{2} respectively. It also seems plausible that WW’s other eigenvalues have relatively small magnitudes.

If this is true, then one can gain information on which vertices of GG are in each community from the second eigenvector of WW. One could simply calculate the second eigenvector of WW directly. However, it is significantly faster to pick a random vector w′′w^{\prime\prime} and then compute Wmw′′W^{m}w^{\prime\prime} for some suitable mm. The resulting vector will be approximately a linear combination of WW’s main eigenvectors. Unfortunately, it will be much closer to being a multiple of its first eigenvector than its second. If we multiply (W−a+b2I)(W-\frac{a+b}{2}I) by the resulting vector, such as in (11), the component of the vector that is proportional to the first eigenvector will be mostly cancelled out. However, since its eigenvalue is not exactly a+b2\frac{a+b}{2}, it will not be cancelled out completely, and might still be too large. Luckily, if we instead multiply (W−a+b2I)m′(W-\frac{a+b}{2}I)^{m^{\prime}} by the resulting vector for suitable m′m^{\prime}, such as in (12), the component of the vector that is proportional to the first eigenvalue will be essentially cancelled out, leaving a vector that is approximately a multiple of WW’s second eigenvector, and thus correlated with GG’s communities. We believe that this would succeed in detecting communities in the SBM, but in order to make it easier to prove that our algorithm works we actually use rr-nonbacktracking walks. This corresponds to using the graph’s rr-nonbacktracking walk matrix, which is defined as follows.

For any rr, the graph’s rr-nonbacktracking walk matrix, W(r)W^{(r)}, is a matrix over the vector space with an orthonormal basis consisting of a vector for each directed path of length r−1r-1 on the graph. W(v1,v2,...,vr),(v1′,v2′,...,vr′)(r)W^{(r)}_{(v_{1},v_{2},...,v_{r}),(v^{\prime}_{1},v^{\prime}_{2},...,v^{\prime}_{r})} is 11 if vi+1′=viv^{\prime}_{i+1}=v_{i} for each 1≤i<r1\leq i<r and v1′≠vrv^{\prime}_{1}\neq v_{r}, otherwise it is . In other words, W(r)W^{(r)} maps a path of length r−1r-1 to the sum of all paths resulting from adding another element to the end of the path and deleting its first element.

Performing these calculations is essentially what the acyclic belief propagation algorithm does. From this perspective, the algorithm roughly translates to:

Choose y(1)y^{(1)} randomly such that each element is independently drawn from a Normal distribution.

For each 1<t≤m1<t\leq m, let y(t)=W(r)y(t−1)y^{(t)}=W^{(r)}y^{(t-1)}.

Change y(m)y^{(m)} to (W(r)−a+b2I)m′y(m−m′)(W^{(r)}-\frac{a+b}{2}I)^{m^{\prime}}y^{(m-m^{\prime})}, where m′=⌈m−3r−1l⌉m^{\prime}=\lceil\frac{m-3r-1}{l}\rceil

SetProceed as in step 6 of 2CS-ABP* for the proof. yv′=∑v′:(v′,v)∈E(G)yv,v′(m)y^{\prime}_{v}=\sum_{v^{\prime}:(v^{\prime},v)\in E(G)}y^{(m)}_{v,v^{\prime}} for every v∈Gv\in G. Return ({v:yv′>0},{v:yv′≤0})(\{v:y^{\prime}_{v}>0\},\{v:y^{\prime}_{v}\leq 0\}).

Even though r=2r=2 might suffice to achieve the KS threshold in the SBM, the use of larger rr might help for other graph models, e.g., having more short cycles.

7 ABP for the general SBM

Now, consider a graph GG drawn from SBM(n,p,Q/n)SBM(n,p,Q/n) with arbitrary pp and QQ. Also, let λ1,λ2,...λh\lambda_{1},\lambda_{2},...\lambda_{h} be the distinct eigenvalues of PQPQ in order of nonincreasing magnitude. If the parameters are such that vertices from different communities have different expected degrees, then one can detect communities by simply dividing its vertices into those with above-average degrees and those with below-average degrees. So, assume that the expected degree of a vertex is independent of its community. Detecting communities in the general case runs into some obstacles that do not apply in the 22-community symmetric case. First of all, it is much less clear that assigning vertices to sets randomly is a useful start. Also, even if we did have reasonable preliminary guesses of which community each vertex was in, it is not obvious how to determine a vertex’s community based on the alleged communities of the vertices a fixed distance from it.

For the moment, assume that for each vertex vv, we have a vector xvx_{v} such that we believe vv is in community ii with probability pi+xv⋅eip_{i}+x_{v}\cdot e_{i} for each ii, where all elements of xvx_{v} are small. Furthermore, assume that xvx_{v} is generated independently of vv’s neighbors. The correct belief about the probability that vv is in each community once its neighbors are taken into account is

up to nonlinear terms in the xx’s. So, given mm small enough that the set of vertices within mm edges of vv is a tree, the correct belief about what community vv is in once all of the vertices within mm edges of vv are taken into account is

up to nonlinear terms in the xx’s. So, the logical belief about the probability that vv is in each community based only on the preliminary guesses concerning the vertices mm edges away from vv is

Conveniently, this expression is linear, so if ww is an eigenvector of PQPQ with eigenvalue λi\lambda_{i} for i≠1i\neq 1, then

In particular, this means that we only need an initial estimate for w⋅P−1eσv′w\cdot P^{-1}e_{\sigma_{v^{\prime}}} for every vertex in the graph, rather than needing a full set of beliefs about the vertices’ communities. Any random guesses we make will probably have correlation ±Ω(1/n)\pm\Omega(1/\sqrt{n}) with w⋅P−1eσv′w\cdot P^{-1}e_{\sigma_{v^{\prime}}}, so we can use them as a starting point.

Unfortunately, just like in the two-community symmetric case, the graph will run out of vertices before mm becomes large enough to amplify our beliefs enough. However, switching from a sum over all vertices v′v^{\prime} that are mm edges away from vv to a sum over all nonbacktracking walks of length mm ending in a vertex v′v^{\prime} fixes this problem the same way it does in the two-community symmetric case. Likewise, we can still compute this sum by randomly dividing GG’s vertices between two sets S1S_{1} and S2S_{2} and then using the following algorithm.

However, needing to compensate for the average value is a special case of a considerably more complicated phenomenon. The average value over all (v,v′)∈E(G)(v,v^{\prime})\in E(G) of yv,v′(1)⋅wσv′y_{v,v^{\prime}}^{(1)}\cdot w_{\sigma_{v^{\prime}}} will typically have a magnitude of Θ(1/n)\Theta(1/\sqrt{n}), and for general tt the average value over all (v,v′)∈E(G)(v,v^{\prime})\in E(G) of yv,v′(t)⋅wσv′y_{v,v^{\prime}}^{(t)}\cdot w_{\sigma_{v^{\prime}}} will typically have a magnitude of Θ(∣λit∣/n)\Theta(|\lambda_{i}^{t}|/\sqrt{n}). Now, let w′w^{\prime} be an eigenvector of PQPQ with an eigenvalue of λi′\lambda_{i^{\prime}} which has greater magnitude than λi\lambda_{i}. Then the average value over all (v,v′)∈E(G)(v,v^{\prime})\in E(G) of yv,v′(t)⋅wσv′′y_{v,v^{\prime}}^{(t)}\cdot w^{\prime}_{\sigma_{v^{\prime}}} will typically have a magnitude of Θ(∣λi′t∣/n)\Theta(|\lambda_{i^{\prime}}^{t}|/\sqrt{n}). Since this grows faster than yv,v′(t)⋅wσv′y_{v,v^{\prime}}^{(t)}\cdot w_{\sigma_{v^{\prime}}} does, it will eventually become large enough to disrupt efforts to estimate wσv′w_{\sigma_{v^{\prime}}} using yv,v′(t)y_{v,v^{\prime}}^{(t)} the same way the average value of y(t)y^{(t)} did in the 22-community symmetric case. In fact, the issue with the average value is just the subcase of this when i′=1i^{\prime}=1. So, in order to deal with this, we need to compensate for each eigenvalue, λi′\lambda_{i^{\prime}}, of PQPQ with magnitude greater than λi\lambda_{i} by choosing several indices t0,i′,t1,i′,...tm′,i′t_{0,i^{\prime}},t_{1,i^{\prime}},...t_{m^{\prime},i^{\prime}} and redefining yv,v′(tj,i′)y_{v,v^{\prime}}^{(t_{j,i^{\prime}})} for each jj so that

for every (v,v′)∈E(G)(v,v^{\prime})\in E(G). Assuming that this is done, yv,v′(1)y_{v,v^{\prime}}^{(1)} has a variance of approximately 11, and then yv,v′(t)y_{v,v^{\prime}}^{(t)} has a variance of roughly λ1t\lambda_{1}^{t}. It becomes possible to determine which community vv is in with accuracy nontrivially greater than that obtained by guessing randomly based on yv,v′(t)y_{v,v^{\prime}}^{(t)} when the expected difference between its values for vv in different communities is within a constant factor of its standard deviation. In other words, tt needs to be large enough that ∣λit∣/n|\lambda_{i}^{t}|/\sqrt{n} is significant relative to λ1t\sqrt{\lambda_{1}^{t}}. If λ1≥λi2\lambda_{1}\geq\lambda_{i}^{2} then this will never happen, so the algorithm requires that

The general acyclic belief propagation algorithm is almost the same as the 22-community symmetric version. However, it takes a list of eigenvectors as input instead of just λ1\lambda_{1}. Also, the step compensating for larger eigenvalues is changed from “Set y(m)=YM⌈m−3r−1l⌉emy^{(m)}=YM^{\lceil\frac{m-3r-1}{l}\rceil}e_{m} where MM is the matrix such that Mi,i=1M_{i,i}=1 for all ii, Mi,i+1=−(1−γ)λ1M_{i,i+1}=-(1-\gamma)\lambda_{1} for all ii and all other entries of MM are ” to “Set y(m)=Y∏s′<sMs′⌈m−r−(2r+1)s′l⌉emy^{(m)}=Y\prod_{s^{\prime}<s}M_{s^{\prime}}^{\lceil\frac{m-r-(2r+1)s^{\prime}}{l}\rceil}e_{m} where Ms′M_{s^{\prime}} is the matrix such that (Ms′)i,i=1(M_{s^{\prime}})_{i,i}=1 for all ii, (Ms′)i,i+1=−(1−γ)λs′(M_{s^{\prime}})_{i,i+1}=-(1-\gamma)\lambda_{s^{\prime}} for all ii and all other entries of Ms′M_{s^{\prime}} are ” Its effectiveness is described by the following theorem.

Let p∈(0,1)kp\in(0,1)^{k} with ∑p=1\sum p=1, QQ be a symmetric matrix with nonnegative entries, PP be the diagonal matrix such that Pi,i=piP_{i,i}=p_{i}, and λ1,...,λh\lambda_{1},...,\lambda_{h} be the eigenvalues of PQPQ in order of nonincreasing magnitude. If λ22>λ1\lambda_{2}^{2}>\lambda_{1} then there exist constants ϵ,r,c\epsilon,r,c and m=Θ(log⁡(n))m=\Theta(\log(n)) such that when the acyclic belief propagation algorithm is run on these parameters and a random G∈SBM(n,p,Q/n)G\in SBM(n,p,Q/n), with probability 1−o(1)1-o(1) there exist σ\sigma and σ′\sigma^{\prime} such that the difference between the fraction of vertices from community σ\sigma that are in S1S_{1} and the fraction of vertices from community σ′\sigma^{\prime} that are in S1S_{1} is at least ϵ\epsilon. The algorithm can be run in O(nlog⁡n)O(n\log n) time.

Let s=3s=3 if ∣λ2∣=∣λ3∣|\lambda_{2}|=|\lambda_{3}| and s=2s=2 otherwise. This theorem could alternately have stated that there exists ϵ\epsilon such that for any two communities σ\sigma and σ′\sigma^{\prime} such that there exists an eigenvector ww of PQPQ with eigenvalue λs\lambda_{s} such that wσ≠wσ′w_{\sigma}\neq w_{\sigma^{\prime}}, the expected difference between the fraction of vertices from community σ\sigma that are in S1S_{1} and the fraction of vertices from community σ′\sigma^{\prime} that are in S1S_{1} is at least ϵ\epsilon.

8 Alternatives

There are also a couple of other variants of these ideas that may be useful for community detection. For instance, if we pick r≈ln⁡(ln⁡(n))r\approx\ln(\ln(n)) and then define Σ\Sigma to be the n×nn\times n symmetric matrix such that Σv,v′\Sigma_{v,v^{\prime}} is the number of nonbacktracking walks of length rr between vv and v′v^{\prime}, we suspect that Σ\Sigma’s eigenvector of second largest magnitude will have entries that are correlated with the corresponding vertices’ communities. Like in the standard case, we expect that we could get an approximation of this eigenvector by taking a random vector ww and then computing (Σ−λ1′I)m′Σm−m′w(\Sigma-\lambda^{\prime}_{1}I)^{m^{\prime}}\Sigma^{m-m^{\prime}}w for suitable mm and m′m^{\prime} where λ1′\lambda^{\prime}_{1} is an estimate of Σ\Sigma’s largest eigenvalue.

We can compute Σ\Sigma as follows. First, let Σ(t)\Sigma^{(t)} be the n×nn\times n matrix such that Σv,v′(t)\Sigma^{(t)}_{v,v^{\prime}} is the number of nonbacktracking walks of length tt between vv and v′v^{\prime}. Then Σ(0)=I\Sigma^{(0)}=I, Σ(1)\Sigma^{(1)} is the graph’s adjacency matrix, and Σv,v′2\Sigma^{2}_{v,v^{\prime}} is equal to the number of shared neighbors vv and v′v^{\prime} have for all vv and v′v^{\prime}. For every t>2t>2, we have that Σ(t)=Σ(1)⋅Σ(t−1)−D⋅Σ(t−2)\Sigma^{(t)}=\Sigma^{(1)}\cdot\Sigma^{(t-1)}-D\cdot\Sigma^{(t-2)}, where DD is the diagonal matrix such that Dv,vD_{v,v} is one less than the degree of vv for all vv. This can be used to efficiently compute Σ=Σ(r)\Sigma=\Sigma^{(r)}.

Also, instead of prohibiting repeating a vetex within rr steps, we could address the issue of tangles by dividing GG’s edges between sets E0,...,Em′E_{0},...,E_{m^{\prime}} for suitable m′m^{\prime} such that most of the edges are assigned to E0E_{0} and the rest are assigned to one of the others at random. Then we count nonbacktracking walks with the restriction that edge rr of the walk must be from E1E_{1}, edge 2r2r must be from E2E_{2} and so on, while all other edges must be from E0E_{0} for suitable rr. The periodic prohibitions on using edges from E0E_{0} would force the walk to leave any tangle it had been in, while the fact that most of the edges are chosen from E0E_{0} prevents the restriction from reducing the number of walks too severely.

Crossing the KS threshold: proof technique

Recall that the algorithm samples a typical clustering uniformly at random in the typical set

where the previous two inequalities apply to the case a>ba>b, and are flipped if a<ba<b. A first question is to estimate the likelihood that a bad clustering, i.e., one that has an overlap that is close to 1/k1/k, belongs to the typical set. This means the probability that a clustering which splits each of the true clusters into kk groups belonging to each community still manages to keep the right proportions of edges inside and across the clusters. This is unlikely to take place, but we care about the exponent of this rare event probability.

As illustrated in Figure 4, the number of edges that are contained in the clusters of a bad clustering is roughly distributed as the sum of two Binomial random variables,

Thus, we need to estimate the rare event that a Binomial sum deviates from its expectation. While there is a large list of bounds on Binomial tail events, the number of trials here is quadratic in nn and the success bias decays linearly in nn, which requires particular care to ensure tight bounds. We derive these by hand in Lemma 15, which gives for a bad clustering xx,

Since the algorithm samples a typical clustering, we only need the number of bad and typical clusterings to be small compared to the total number of typical clusterings with high probability. Thus, we seek to better estimate the total number of typical clusterings. The first topological property of the SBM graph that we exploit is the large fraction of nodes that are in tree-like components outside of the giant. Conditioned on being on a tree, the SBM labels are distributed as in a broadcasting problem on a (Galton-Watson) tree. Specifically, for a uniformly drawn root node XX, each edge in the tree acts as a symmetric channel, producing the output

and this propagates down the tree. Thus, labelling the nodes in the trees according to the above distribution and freezing the giant to the correct labels leads to a typical clustering with high probability.

We hence need to count the number of nodes TT and edges MM that belong to such trees in the SBM graph. This is done in a series of lemmas in Section 6.2.2, and requires combinatorial estimates similar to those carried for the Erdős-Rényi case [ER60]. The main part is to show that the fraction of such nodes and edges concentrates, i.e.,

with high probability for any ε>0\varepsilon>0, where τ\tau is the unique solution in (0,1)(0,1) of

or equivalently τ=∑j=1+∞jj−1j!(de−d)j\tau=\sum_{j=1}^{+\infty}\frac{j^{j-1}}{j!}(de^{-d})^{j}.

Using next entropic bounds for these random variables, i.e., the fact that there are approximately 2NH(ν)2^{NH(\nu)} typical sequences for the product distribution μN\mu^{N}, we can turn previous estimates into a bound on the typical set size (see Theorem 6). The resulting bound gives that a sampled clustering is good with high probability when a>ka>k for b=0b=0, i.e., it achieves the right bound in that extreme. However, this is unlikely to behave correctly for small values of bb. To further improve on this, we next take into account the vertices in the giant that belong to trees, which we call planted tress, and follow the same program as above except that the root node (in the giant) is now frozen to the correct label rather than being uniformly drawn. This addition gives a bound conjectured to capture the correct behavior for bb small. We finish by tightening our estimates on the typical set’s size by taking into account vertices that are not saturated, i.e., whose neighbors do not cover all communities and who can thus be swapped without affecting typicality.

The final bound in Theorem 2 crosses the KS threshold at k=4k=4, interpolates the optimal threshold at a=0a=0, and is conjectured to be tight in the scaling of bb for small bb and fixed kk, as well as in the scaling of large kk for fixed a,ba,b.

Open problems

Impossibility statements. Further conjectures were made in [DKMZ11] concerning impossibility statements:

This is already proved for k=2k=2 in [MNS15], using a reduction to the reconstruction problem on tree [MP03]. The same program as in [MNS15] is likely to extend to k=3k=3, at least for large degrees, as in this case it is shown in [Sly09] that it is impossible to detect below the KS threshold for the reconstruction problem on tree. For k≥4k\geq 4, the problem is much harder. While [DKMZ11] provides evidences towards this conjecture, proving formally such a conjecture would require computational lower bounds that seem currently out of reach. Similar statements apply to related models such as planted clique or planted community [DM13, Mon15, HWX15] problems. To back up the current “evidences” on the impossibility of detecting efficiently below the KS threshold, one may rely on further reductions such as done in [BR13, YC14], or subclasses of algorithms such as done in [FPV13] with statistical query algorithms. Finding the exact expression of the IT threshold at all SNRs seem to be also an interesting problem to pursue.

For the general SBM, this requires some conditions and we make the following conjecture.

If there exist communities ii and jj such that wi=wjw_{i}=w_{j} whenever ww is an eigenvector of PQPQ with eigenvalue λ2\lambda_{2} then the original use of ABPABP will not distinguish between these communities. We believe that one could classify vertices with optimal accuracy on such a graph by using the beliefs resulting from this algorithm as a starting point for another layer of ABPABP and possibly going through several sucessive layers.

Extensions. Many variants of the SBM can be studied, such as the labelled block model [GZFA10, HLM12, XLM14], the censored block model [AM15, AM13, ABBS14a, ABBS14b, GRSY14, CRV15, SKLZ15], the degree-corrected block model [KN11], overlapping block models [For10] and more. While many of the fundamental challenges seem to be captured by the SBM already, these represent important extensions for applications. Another important extension would be to tackle sublinear size communities, which is likely to raise new challenges (see planted clique for example).

Proofs

For any rr and mm, an rr-nonbacktracking walk of length mm is a sequence of vertices v0,v1,...,vmv_{0},v_{1},...,v_{m} such that vi≠vjv_{i}\neq v_{j} whenever ∣i−j∣≤r|i-j|\leq r and viv_{i} is adjacent to vi+1v_{i+1} for all ii.

Given r,m>0r,m>0 and vertices vv and v′v^{\prime}, let Wm[r](v,v′)W_{m[r]}(v,v^{\prime}) be the number of rr-nonbacktracking walks of length mm from vv to v′v^{\prime}.

Given r,m>0r,m>0, graph GG, an assignment of a real number xvx_{v} to every vertex vv, a multiset of real numbers SS, and a vertex vv, let

In other words, Wm/∅[r](x,v)W_{m/\emptyset[r]}(x,v) is the sum over all rr-nonbacktracking walks of length mm ending at vv of the values of xx at their initial vertices, and for S≠∅S\neq\emptyset and y∈Sy\in S, we have that Wm/S[r](x,v)=Wm/(S\{y})[r](x,v)−y⋅Wm−1/(S\{y})[r](x,v).W_{m/S[r]}(x,v)=W_{m/(S\backslash\{y\})[r]}(x,v)-y\cdot W_{m-1/(S\backslash\{y\})[r]}(x,v). Note that the ABP algorithm sets Yv,tY_{v,t} equal to Wt/∅[r](x,v)W_{t/\emptyset[r]}(x,v) for all 0<t≤m0<t\leq m and v∈Gv\in G in step 2b2b. Then in step 2c2c, it sets yv(m)y_{v}^{(m)} equal to Wm/S[r](x,v)W_{m/S[r]}(x,v), where SS is the multiset containing ⌈m−r−(2r+1)s′l⌉\lceil\frac{m-r-(2r+1)s^{\prime}}{l}\rceil copies of λs′\lambda_{s^{\prime}} for every s′<ss^{\prime}<s.

Further intuition on (22) will be provided with Definition 11. The plan is to select the xvx_{v} independently according to a Normal distribution, and then compute Wm/S[r](x,v)W_{m/S[r]}(x,v) for appropriate SS, mm, and rr. The assignment of xx will inevitably have slightly different average values in different communities, and under the right conditions, these differences will be amplified to the point of allowing differentiation between communities with asymptotically nonzero advantage.

When ABPABP splits Γ\Gamma off of GG, the remaining graph is still drawn from the SBM, albeit with connectivity (1−γ)Q(1-\gamma)Q. The formula for γ\gamma ensures that if λ22>λ1\lambda_{2}^{2}>\lambda_{1} then ((1−γ)λ2)2>((1−γ)λ1)((1-\gamma)\lambda_{2})^{2}>((1-\gamma)\lambda_{1}). Now, let m′′=⌊log⁡log⁡n⌋+1m^{\prime\prime}=\lfloor\sqrt{\log\log n}\rfloor+1. For each v∈Gv\in G and t>0t>0, let Nt(v)N_{t}(v) be the set of all vertices tt edges away from vv, N≤t(v)N_{\leq t}(v) be the subgraph of GG induced by the vertices within tt edges of vv, and Tv={v′:∃v′′∈Nm′′(v)∣(v′,v′′)∈Γ}T_{v}=\{v^{\prime}:\exists v^{\prime\prime}\in N_{m^{\prime\prime}}(v)\mid(v^{\prime},v^{\prime\prime})\in\Gamma\}. Unless the original graph has a cycle in N≤m′′(v)∪TvN_{\leq m^{\prime\prime}}(v)\cup T_{v}, we have that

Now, given nonintersecting graphs N′N^{\prime} and N′′N^{\prime\prime} with ∣N′∣,∣N′′∣=O(ln⁡2m′′(n))|N^{\prime}|,|N^{\prime\prime}|=O(\ln^{2m^{\prime\prime}}(n)), v∈N′v\in N^{\prime}, and v′∈N′′v^{\prime}\in N^{\prime\prime}, whether or not the subgraph of GG induced by V(N′)V(N^{\prime}) is N′N^{\prime} is independent of whether or not the subgraph of GG induced by V(N′′)V(N^{\prime\prime}) is N′′N^{\prime\prime}. Also, there are no edges between these two graphs with probability 1−O(∣N′∣⋅∣N′′∣/n)1-O(|N^{\prime}|\cdot|N^{\prime\prime}|/n) regardless of what form these graphs take. Furthermore, for any v′′∉N′∪N′′v^{\prime\prime}\not\in N^{\prime}\cup N^{\prime\prime}, regardless of the value of G\{v′′}G\backslash\{v^{\prime\prime}\} there are no edges from v′′v^{\prime\prime} to V(N′)V(N^{\prime}) with probability 1−λ1∣N′∣/n+O(∣N′∣2/n2)1-\lambda_{1}|N^{\prime}|/n+O(|N^{\prime}|^{2}/n^{2}), there are no edges from v′′v^{\prime\prime} to V(N′′)V(N^{\prime\prime}) with probability 1−λ1∣N′′∣/n+O(∣N′′∣2/n2)1-\lambda_{1}|N^{\prime\prime}|/n+O(|N^{\prime\prime}|^{2}/n^{2}), and there are no edges from v′′v^{\prime\prime} to either with probability 1−λ1(∣N′∣+∣N′′∣)/n+O((∣N′∣+∣N′′∣)2/n2)1-\lambda_{1}(|N^{\prime}|+|N^{\prime\prime}|)/n+O((|N^{\prime}|+|N^{\prime\prime}|)^{2}/n^{2}). So, we have that

Furthermore, the probability that Nm′′(v)N_{m^{\prime\prime}}(v) and Nm′′(v′)N_{m^{\prime\prime}}(v^{\prime}) intersect is O(λ12m′′/n)O(\lambda_{1}^{2m^{\prime\prime}}/n). Also, ∣Wm′′(v)∣≤n⋅max⁡i∣wi/pi∣|W_{m^{\prime\prime}}(v)|\leq n\cdot\max_{i}|w_{i}/p_{i}| for all vv, and with probability 1−o(n−20)1-o(n^{-20}), every vertex in GG has degree less than ln⁡2(n)\ln^{2}(n), so Wm′′(v)=O(ln⁡2m′′(n))W_{m^{\prime\prime}}(v)=O(\ln^{2m^{\prime\prime}}(n)) for all vv. So, for v≠v′v\neq v^{\prime}, the correlation between Wm′′(v)W_{m^{\prime\prime}}(v) and Wm′′(v′)W_{m^{\prime\prime}}(v^{\prime}) is o(1/n)o(1/\sqrt{n}), and the correlation between Wm′′2(v)W^{2}_{m^{\prime\prime}}(v) and Wm′′2(v′)W^{2}_{m^{\prime\prime}}(v^{\prime}) is also o(1/n)o(1/\sqrt{n}). Therefore, with probability 1−o(1)1-o(1), the average value of Wm′′(v)W_{m^{\prime\prime}}(v) over all vv in community jj is (1−γ)m′′λim′′(wj/pj+o(1))(1-\gamma)^{m^{\prime\prime}}\lambda_{i}^{m^{\prime\prime}}(w_{j}/p_{j}+o(1)) for all jj. Also, there exists constant δ\delta such that ∑v∈G(Wm′′(v))2≤nδ∑t=1m′′(1−γ)m′′+tλ1m′′−tλi2t\sum_{v\in G}(W_{m^{\prime\prime}}(v))^{2}\leq n\delta\sum_{t=1}^{m^{\prime\prime}}(1-\gamma)^{m^{\prime\prime}+t}\lambda_{1}^{m^{\prime\prime}-t}\lambda_{i}^{2t} with probability 1−o(1)1-o(1).

On another note, for each vv, we have that yv(m)=Wm/{ci}(x,v)y_{v}^{(m)}=W_{m/\{c_{i}\}}(x,v), so by lemma 14,

and the empirical variance of {yv(m)}\{y_{v}^{(m)}\} is O(∏j=1m((1−γ)λs−cj)2)O\left(\prod_{j=1}^{m}((1-\gamma)\lambda_{s}-c_{j})^{2}\right) with probability 1−o(1)1-o(1). Now, let y‾\overline{y} be the vector such that y‾i=∑v∈Ωiyv(m)/n\overline{y}_{i}=\sum_{v\in\Omega_{i}}y^{(m)}_{v}/n for all ii. By Lemma 12, we know that with probability 1−o(1)1-o(1), the component of y‾\overline{y} on PQPQ’s eigenspace of eigenvalue λs\lambda_{s} has magnitude Ω(1n∏∣(1−γ)λs−cj∣)\Omega(\frac{1}{\sqrt{n}}\prod|(1-\gamma)\lambda_{s}-c_{j}|), while all of its components on PQPQ’s other eigenspaces have magnitudes of O(1log⁡(n)n∏∣(1−γ)λs−cj∣)O(\frac{1}{\log(n)\sqrt{n}}\prod|(1-\gamma)\lambda_{s}-c_{j}|).

Now, let yv′′′=∑v′∈Tvyv(m)y^{\prime\prime\prime}_{v}=\sum_{v^{\prime}\in T_{v}}y_{v}^{(m)} for all vv, and recall that yv′′=yv′′′y^{\prime\prime}_{v}=y^{\prime\prime\prime}_{v} unless the original graph has a cycle in N≤m′′(v)∪TvN_{\leq m^{\prime\prime}}(v)\cup T_{v}. Observe that

For each v,v′∈Gv,v^{\prime}\in G without an edge between them,

So, there exists δw>0\delta_{w}>0 such that for a fixed GG, σ\sigma, and xx, with probability 1−o(1)1-o(1) it will be the case that

This means that with probability 1−o(1)1-o(1), we have that

In particular, if we choose an orthonormal eigenbasis for PQPQ, w1,...,wkw_{1},...,w_{k}, then with probability 1−o(1)1-o(1) this will hold for all wiw_{i} in the basis, which implies that with probability 1−o(1)1-o(1), we have that ∑v∈Ωjyv′′′/n=γ(1−γ)m′′((PQ)m′′+1y‾)j+o(γ(1−γ)m′′λsm′′+1∣∣y‾∣∣2)\sum_{v\in\Omega_{j}}y^{\prime\prime\prime}_{v}/n=\gamma(1-\gamma)^{m^{\prime\prime}}((PQ)^{m^{\prime\prime}+1}\overline{y})_{j}+o(\gamma(1-\gamma)^{m^{\prime\prime}}\lambda_{s}^{m^{\prime\prime}+1}||\overline{y}||_{2}) for all j∈[k]j\in[k]. Also, for fixed GG and xx and with probability 1−o(1)1-o(1) we have

With probability 1−o(1)1-o(1), there are only O(ln⁡(n))O(\ln(n)) vertices v∈Gv\in G such that yv′′≠yv′′′y^{\prime\prime}_{v}\neq y^{\prime\prime\prime}_{v}. With probability 1−o(1)1-o(1), no such vertex has more than ln⁡2m′′+2(n)\ln^{2m^{\prime\prime}+2}(n) vertices within m′′+1m^{\prime\prime}+1 edges of it and no such vertex has more than one cycle within m′′+1m^{\prime\prime}+1 edges of it. Assuming this holds, these differences are small enough that the results above still hold if we substitute yv′′y^{\prime\prime}_{v} for yv′′′y^{\prime\prime\prime}_{v}. Among other things, this means that we can choose σ1\sigma_{1} and σ2\sigma_{2} such that the average value of yv′′y^{\prime\prime}_{v} for v∈Ωσ1v\in\Omega_{\sigma_{1}} differs from the average value of yv′′y^{\prime\prime}_{v} for v∈Ωσ2v\in\Omega_{\sigma_{2}} by at least (1−o(1))γ(1−γ)m′′λsm′′+1∣∣y‾∣∣2(1-o(1))\gamma(1-\gamma)^{m^{\prime\prime}}\lambda_{s}^{m^{\prime\prime}+1}||\overline{y}||_{2}.

Now, let aa be the difference between the average value of yv′′y^{\prime\prime}_{v} for v∈Ωσ1v\in\Omega_{\sigma_{1}} and the average value of yv′′y^{\prime\prime}_{v} for v∈Ωσ2v\in\Omega_{\sigma_{2}}. Also, let bb be the average value of (yv′′)2(y^{\prime\prime}_{v})^{2}. There exists constant δ′\delta^{\prime} such that b≤δ′a2b\leq\delta^{\prime}a^{2} with probability 1−o(1)1-o(1). The average value of 1/2+yv′′/(C∑(yv′′′)2/n)1/2+y^{\prime\prime}_{v}/(C\sqrt{\sum(y^{\prime\prime}_{v^{\prime}})^{2}/n}) for v∈Ωσ1v\in\Omega_{\sigma_{1}} differs from its average value for v∈Ωσ2v\in\Omega_{\sigma_{2}} by aCb\frac{a}{C\sqrt{b}}. For any vv,

So, the average value of min⁡(∣yv′′/(C∑(yv′′′)2/n)∣−1/2,0)\min(|y^{\prime\prime}_{v}/(C\sqrt{\sum(y^{\prime\prime}_{v^{\prime}})^{2}/n})|-1/2,0) for vv in any community is at most 2/(C2min⁡pi)2/(C^{2}\min p_{i}). So, the probability that a vertex from community σ1\sigma_{1} is assigned to group 22 differs from the probability that a vertex from community σ2\sigma_{2} is assigned to group 22 by at least aCb−4/(C2min⁡pi)\frac{a}{C\sqrt{b}}-4/(C^{2}\min p_{i}). For a sufficiently large constant CC, and small constant ϵ>0\epsilon>0 this will be greater than ϵ\epsilon with probability 1−o(1)1-o(1), as desired.

ABP initializes in O(n)O(n) time. Computing the y(t)y^{(t)} takes O(nlog⁡n)O(n\log n) expected time. The eigenvalue compensation step can be carried out in O(nlog⁡n)O(n\log n) time if (∏s′<sMs′⌈m−r−(2r+1)s′l⌉)em\left(\prod_{s^{\prime}<s}M_{s^{\prime}}^{\lceil\frac{m-r-(2r+1)s^{\prime}}{l}\rceil}\right)e_{m} is computed first and then YY is multiplied by it, and computing y′′y^{\prime\prime} takes o(nlog⁡n)o(n\log n) time. The assignment step also takes O(n)O(n) time, so the entire algorithm can be run in O(nlog⁡n)O(n\log n) time. ∎

Our first step in proving the lemmas used above is to reexpress Wm/S[r](x,v)W_{m/S[r]}(x,v) as a sum over rr-nonbacktracking walks of an expression that we will eventually be able to bound. Then we will establish some properties of rr-nonbacktracking walks that we will need.

For any r≥1r\geq 1 and series of vertices v0,v1,...,vmv_{0},v_{1},...,v_{m}, let Wr((v0,...,vm))W_{r}((v_{0},...,v_{m})) be 11 if v0,...,vmv_{0},...,v_{m} is an rr-nonbacktracking walk, and otherwise.

For any r≥1r\geq 1, series of vertices v0,...,vmv_{0},...,v_{m}, and series of real numbers c0,...,cmc_{0},...,c_{m}, let W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})) be the sum, over all subserieses i0,...,im′i_{0},...,i_{m^{\prime}} of 0,...,m0,...,m of

Note that for any c0,...,cmc_{0},...,c_{m} consisting of the elements of SS and ’s with c0=cm=0c_{0}=c_{m}=0,

Given a series of vertices v0,...,vmv_{0},...,v_{m}, its walk graph is the graph consisting of every vertex in the series with an edge between each pair of vertices that are adjacent in the series. Note that the walk graph has a number of vertices equal to the number of distinct vertices in v0,...,vmv_{0},...,v_{m}, a number of edges equal to the cardinality of {{vi,vi+1}:0≤i<m}\{\{v_{i},v_{i+1}\}:0\leq i<m\}, and every vertex in it other than v0v_{0} or vmv_{m} must have degree at least 22.

Consider the complete graph KnK_{n}. For any m,b,w,e≥0m,b,w,e\geq 0, there are at most 2nm−w+1(m+1)4(w−e)22b(w−e)2n^{m-w+1}(m+1)^{4(w-e)}2^{2b(w-e)} walks of length mm in KnK_{n} that have m+1−wm+1-w distinct vertices, m−em-e distinct edges, no vertex repeated more than bb times, and no edge repeated twice in a row.

Choose such a walk, and let HH be its walk graph. Also, let the distinct vertices in the walk be v1,v2,...,vm+1−wv_{1},v_{2},...,v_{m+1-w}, in order of first appearance. There are at most nm−w+1n^{m-w+1} possible choices of which vertices these are. For any ii such that viv_{i} is not adjacent to vi+1v_{i+1} in the walk, the first edge in the walk after viv_{i} and the first edge leading to vi+1v_{i+1} must both have not appeared previously in the walk. Otherwise, the edge between viv_{i} and vi+1v_{i+1} must not have appeared previously. So, there are at most m−e−(m−w)=w−em-e-(m-w)=w-e indices ii such that vi+1v_{i+1} is not adjacent to viv_{i}. There are at most (m+1)w−e(m+1)^{w-e} choices of which indices have this property, and m+1m+1 choices of which vertex the first edge leading to each such vi+1v_{i+1} has on its other side. That accounts for m−wm-w of HH’s edges, so there are at most (m+1)2(w−e)(m+1)^{2(w-e)} possibilities of what the others are. Thus, there are at most nm−w+1(m+1)4(w−e)n^{m-w+1}(m+1)^{4(w-e)} possible graphs HH.

Now, let v0′,...,vm′v^{\prime}_{0},...,v^{\prime}_{m} be the complete walk in question. Given the values of vi′v^{\prime}_{i} and vi−1′v^{\prime}_{i-1}, the only possible values of vi+1′v^{\prime}_{i+1} are the vertices that are adjacent to vi′v^{\prime}_{i} other than vi−1′v^{\prime}_{i-1}. Furthermore, since no vertex appears in the walk more than bb times, that means that the number of possible walks for a given HH is at most

Given a sequence of vertices v0,...,vmv_{0},...,v_{m}, a fresh segment is a consecutive subsequence va,va+1,...,vbv_{a},v_{a+1},...,v_{b} such that no interior vertex of the segment has degree greater than 22 in the walk graph of v0,...,vmv_{0},...,v_{m}, no interior vertex of the segment is equal to vmv_{m}, and the walk v0,...,vav_{0},...,v_{a} does not traverse any of the segement’s edges. Call the segment nonrepeated if none of its edges occur in the walk vb,...,vmv_{b},...,v_{m} and repeated otherwise.

Let v0,...,vmv_{0},...,v_{m} define a walk in KnK_{n} that has m+1−wm+1-w distinct vertices and m−em-e distinct edges. There exists a set of at most 3(w−e)+13(w-e)+1 fresh segments of the walk that are disjoint except at end vertices, and such that every edge in the walk is in one of these segments. Also, every end vertex of one of these segments is either v0v_{0}, vmv_{m}, or a vertex that is repeated in the walk.

Let G′G^{\prime} be the walk graph of v1,...,vmv_{1},...,v_{m}. Let SS consist of v1,vmv_{1},v_{m}, and all vertices in G′G^{\prime} of degree greater than 22. The total degree of all vertices in SS is at most 6(w−e)+26(w-e)+2, so G′G^{\prime} consists of these vertices and at most 3(w−e)+13(w-e)+1 paths between them that do not contain any vertex from SS. Once the walk goes onto one of these paths, the facts that it is nonbacktracking, vmv_{m} is not in the path, and no vertex on the path has degree greater than 22 forces it to continue to the end of the path. The walk must traverse each of these paths for the first time at some point. Therefore, the set of serieses of vertices corresponding to the first traversals of these paths is the desired set of fresh segments. ∎

Given a sequence of vertices v0,...,vmv_{0},...,v_{m}, let its standard decomposition be the collection of fresh segments generated by the above construction for v0,...,vmv_{0},...,v_{m}.

Given a collection of fresh segments, let its measures be d,d′,t,t′d,d^{\prime},t,t^{\prime}, where dd is the number of nonrepeated fresh segments in the collection, tt is the sum of their lengths, d′d^{\prime} is the number of repeated fresh segments in the collection, and t′t^{\prime} is the sum of their lengths. Also, let the measures of a series of vertices denote the measures of its standard decomposition.

1.2 The shard decomposition

The next step in the proof is to establish an upper bound on ∣E[W(c0,...,cm)[r]((v0,...,vm))]∣|E[W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))]| when (c0,...,cm),(v0,...,vm)(c_{0},...,c_{m}),(v_{0},...,v_{m}) satisfies some special properties. Then we will show that W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})) can always be expressed as a linear combination of shards, expressions of the form W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) that have the aforementioned properties. After that, we will show that if (c0,...,cm)(c_{0},...,c_{m}) is chosen correctly, the magnitudes of the expected values of many of the shards of W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})) must be fairly small.

Let r≥1r\geq 1 and c0,...,cmc_{0},...,c_{m} be a series of real numbers with c0=cm=0c_{0}=c_{m}=0. Also let v0,...,vmv_{0},...,v_{m} be a series of vertices with standard decomposition va1,...,vb1v_{a_{1}},...,v_{b_{1}}, va2,...,vb2v_{a_{2}},...,v_{b_{2}},…,vad,...,vbdv_{a_{d}},...,v_{b_{d}}, ordered so that bi≤ai+1b_{i}\leq a_{i+1} for each ii. Assume that for any i,ji,j such that viv_{i} occurs elsewhere in the series and ∣i−j∣≤r|i-j|\leq r, cj=0c_{j}=0. Then,

For any ii such that ci≠0c_{i}\neq 0, ii is at least rr away from every element of the series that is repeated. So, deleting viv_{i} for all ii in any subset of {i:ci≠0}\{i:c_{i}\neq 0\} has no effect on whether or not v1,...,vmv_{1},...,v_{m} is rr-nonbacktracking. If v1,...vmv_{1},...v_{m} is not rr-nonbacktracking, then the expected value of W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})) is , and the conclusion holds. Now, consider the case where v1,...,vmv_{1},...,v_{m} is rr-nonbacktracking. Since any subsequence of v0,...,vmv_{0},...,v_{m} resulting from deleting viv_{i} for which ci≠0c_{i}\neq 0 is also rr-nonbacktracking, the restriction that a vertex cannot repeat within rr steps is irrelevant and W(c0,...,cm)[r]((v0,...,vm))=W(c0,...,cm)((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))=W_{(c_{0},...,c_{m})}((v_{0},...,v_{m})). Also, vaiv_{a_{i}} and vbiv_{b_{i}} are all repeated vertices except possibly v0v_{0} and vmv_{m}. So, cai=0c_{a_{i}}=0 and cbi=0c_{b_{i}}=0 for all ii. That implies that

If viv_{i} is not part of one of the fresh segments, then viv_{i} is a repetition of a vertex that is in one of them, so ci=0c_{i}=0. Thus,

is either or 11. If it is then there is some vi,vi+1v_{i},v_{i+1} that are not part of any of the fresh segements and do not have an edge between them. By the previous lemma, there must exist 1≤i≤d1\leq i\leq d and ai≤j≤bi−1a_{i}\leq j\leq b_{i}-1 such that {vi,vi+1}={vj,vj+1}\{v_{i},v_{i+1}\}=\{v_{j},v_{j+1}\}, and since the vertices are repeated, cj=cj+1=0c_{j}=c_{j+1}=0. So, the lack of an edge between them means that W(cai,...,cbi)((vai,...,vbi))=0W_{(c_{a_{i}},...,c_{b_{i}})}((v_{a_{i}},...,v_{b_{i}}))=0. Either way,

The fresh segments in a standard decomposition only intersect at their endpoints, so for a fixed assignment of communities to the endpoints,

Of course, for general c0,...,cmc_{0},...,c_{m} and v0,...,vmv_{0},...,v_{m} the condition that ci=0c_{i}=0 whenever there is a repeated vertex vjv_{j} with ∣i−j∣≤r|i-j|\leq r may not be satisfied. We can deal with that using the fact that for arbitrary c0,...,cmc_{0},...,c_{m}, v0,...,vmv_{0},...,v_{m}, rr, and ii,

So, for any c0,...,cmc_{0},...,c_{m} with c0=cm=0c_{0}=c_{m}=0, v0,...,vmv_{0},...,v_{m}, and rr, we can express W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})) as a linear combination of expressions that the above lemma applies to by means of the following algorithm.

If there is more than one ii satisfying the conditions of the case under consideration, the algorithm should choose one according to some rule, such as always using the smallest. Also, note that this algorithm exists as a proof technique allowing us to replace any expression of the form W(c0,...,cm)[r]((v0,...,vm)))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) with a sum of expressions of the form W(c0′,...,cm′′)[r]((v0′,...,vm′′)))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}))) that the previous lemma applies to. We would never actually run it.

Path-sum-conversion(W(c0,...,cm)[r]((v0,...,vm)))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) always terminates. Furthermore, if there are no i,ji,j such that ci≠0c_{i}\neq 0, cj≠0c_{j}\neq 0, and ∣i−j∣≤r|i-j|\leq r, then for any W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) that appears in the expression it outputs and any viv_{i} that was deleted in the process of going from W(c0,...,cm)[r]((v0,...,vm)))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) to W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})), at least one of the following holds. There exists i′i^{\prime} such that vi′′=viv^{\prime}_{i^{\prime}}=v_{i}, or there exists jj such that ∣i−j∣≤r|i-j|\leq r, vjv_{j} was not deleted in the process of going from W(c0,...,cm)[r]((v0,...,vm)))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) to W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})), and vjv_{j} appears more than once in the list (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}). Also, if c0=cm=0c_{0}=c_{m}=0, then for any W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) that appears in the expression it outputs, c0′=cm′′=0c^{\prime}_{0}=c^{\prime}_{m^{\prime}}=0.

The fact that the algorithm terminates follows immediately from the fact that when it recurses, each iteration of the algorithm has one fewer nonzero element of (c0,...,cm)(c_{0},...,c_{m}) than its parent iteration, so it goes down at most mm layers. Now, assume that there are no i,ji,j such that ci≠0c_{i}\neq 0, cj≠0c_{j}\neq 0, and ∣i−j∣≤r|i-j|\leq r. The algorithm only ever deletes cic_{i} that have nonzero values, so this will continue to hold for any (c0′,...,cm′′)(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}}) that (c0,...,cm)(c_{0},...,c_{m}) is converted to. Likewise, if c0=cm=0c_{0}=c_{m}=0, then the first and last elements of any (c0′,...,cm′′)(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}}) that (c0,...,cm)(c_{0},...,c_{m}) is converted to will always be . Also, note that if ci=0c_{i}=0, then viv_{i} will never be deleted.

Now, if the algorithm deletes viv_{i} as an instance of case 11, then there exists jj such that vj=viv_{j}=v_{i} and cj=0c_{j}=0. vjv_{j} will never be deleted, and will thus be in any expression resulting from this deletion. If the algorithm deletes viv_{i} as an instance of case 22, then there exist j≠j′j\neq j^{\prime} with vj=vj′v_{j}=v_{j^{\prime}} and 0<∣i−j∣≤r0<|i-j|\leq r. We know that cj=0c_{j}=0 because ci≠0c_{i}\neq 0 and ii and jj are within rr of each other. cj′=0c_{j^{\prime}}=0 as well, because if it did not, i=j′,j=ji=j^{\prime},j=j would have satisfied the conditions for case 11. So, neither vjv_{j} nor vj′v_{j^{\prime}} will ever be deleted, and thus vjv_{j} will appear more than once in the paths for any expression resulting from this deletion. If the algorithm deletes viv_{i} as an instance of case 33, then it must be the case that for every i′i^{\prime} such that vi=vi′v_{i}=v_{i^{\prime}}, there do not exist j≠j′j\neq j^{\prime} such that 0<∣i′−j∣≤r0<|i^{\prime}-j|\leq r and vj=vj′v_{j}=v_{j^{\prime}}. There is no way for any operation the algorithm performs to result in such jj and j′j^{\prime} coming into existence, so if at any future point there is only one element of (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}) that is equal to viv_{i}, there is no case under which that element will be deleted. So, any (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}) resulting from this deletion will contain at least one element equal to viv_{i}. ∎

W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) is a level xx shard of W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})) if W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) is one of the expressions in the sum resulting from path-sum-conversion(W(c0,...,cm)[r]((v0,...,vm)))(W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) and exactly xx of the vertices that were deleted in the process of converting W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})) to W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) are repetitions of vertices in (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}). For a given W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})), Shar(W(c0,...,cm)[r]((v0,...,vm)))\text{Shar}(W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) denotes the set of all of its shards, and Sharx(W(c0,...,cm)[r]((v0,...,vm)))\text{Shar}_{x}(W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) denotes the set of its level xx shards.

Let an eigenvalue approximation be an ordered tuple λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1} such that ∣λi−λi′∣≤∣λi−λi′′∣|\lambda_{i}-\lambda^{\prime}_{i}|\leq|\lambda_{i}-\lambda^{\prime}_{i^{\prime}}| for all ii and i′i^{\prime}. Call such a tuple Λ\Lambda-bounded if ∣λi′∣≤Λ|\lambda^{\prime}_{i}|\leq\Lambda and ∣λi∣≤Λ|\lambda_{i}|\leq\Lambda for all ii. Also, let the error of such an approximation be max⁡i∣λi−λi′∣\max_{i}|\lambda_{i}-\lambda^{\prime}_{i}|.

Given integers r,lr,l, a tuple λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1}, and a sequence c0,...,cmc_{0},...,c_{m}, let the sequence be an l[r]l[r]-cycle of (λ1′,...,λs−1′)(\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1}) if and only if (2r+1)(s−1)≤l(2r+1)(s-1)\leq l, ci=λj′c_{i}=\lambda^{\prime}_{j} for all ii and jj such that i<m−ri<m-r and the remainder of ii when divided by ll is (2r+1)j(2r+1)j, and ci=0c_{i}=0 whenever there is no jj such that the above holds. Note that the first and last elements of an l[r]l[r] cycle are always , and that if (2r+1)(s−1)≤l(2r+1)(s-1)\leq l there exists a unique l[r]l[r]-cycle of length mm for every mm.

Let λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1} be a Λ\Lambda-bounded eigenvalue approximation and c0,...,cmc_{0},...,c_{m} be an l[r]l[r]-cycle of this approximation for some l,r>0l,r>0. Then, let v0,...,vmv_{0},...,v_{m} be a series of vertices, and let W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) be a level xx shard of W(c0,...,cm)[r]((v0,...,vm)))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))). Finally, let d,d′,t,t′d,d^{\prime},t,t^{\prime} be the measures of (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}) and t′′=⌈t−d(l+2r+1)l⌉t^{\prime\prime}=\lceil\frac{t-d(l+2r+1)}{l}\rceil. Then

Let va1′,...,vb1′v^{\prime}_{a_{1}},...,v^{\prime}_{b_{1}}, va2′,...,vb2′v^{\prime}_{a_{2}},...,v^{\prime}_{b_{2}},…,vad′,...,vbd′v^{\prime}_{a_{d}},...,v^{\prime}_{b_{d}} be the nonrepeated fresh segments in the standard decomposition of (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}), and va1′′,...,vb1′′v^{\prime}_{a^{\prime}_{1}},...,v^{\prime}_{b^{\prime}_{1}}, va2′′,...,vb2′′v^{\prime}_{a^{\prime}_{2}},...,v^{\prime}_{b^{\prime}_{2}},…,vad′′′,...,vbd′′′v^{\prime}_{a^{\prime}_{d^{\prime}}},...,v^{\prime}_{b^{\prime}_{d^{\prime}}} be the repeated fresh segments in its standard decomposition. For arbitrary 1≤i≤d′1\leq i\leq d^{\prime} and ai′≤i′≤bi′a^{\prime}_{i}\leq i^{\prime}\leq b^{\prime}_{i}, we have that vi′′v^{\prime}_{i^{\prime}} either is a repeated vertex or is within one step of one. So, ci′′=0c^{\prime}_{i^{\prime}}=0. We know from a previous lemma that

Now, for each 0≤i≤m′0\leq i\leq m^{\prime}, define f(i)f(i) such that vf(i)v_{f(i)} corresponds to vi′v^{\prime}_{i}. Also, for each 0≤i≤m0\leq i\leq m, define g(i)g(i) so that vg(i)′v^{\prime}_{g(i)} corresponds to viv_{i}, or vi+1v_{i+1} if viv_{i} has been deleted. Also, for each 1≤i≤d1\leq i\leq d, let yiy_{i} be the largest integer such that g(f(ai+r+1)+l⋅yi)≤bi−rg(f(a_{i}+r+1)+l\cdot y_{i})\leq b_{i}-r, or if ai+2r≥bia_{i}+2r\geq b_{i}. Note that for any i′≥ii^{\prime}\geq i, i′−i≥g(i′)−g(i)i^{\prime}-i\geq g(i^{\prime})-g(i). As a result,

because ∣g(x)−g(x′)∣≤∣x−x′∣|g(x)-g(x^{\prime})|\leq|x-x^{\prime}| for all xx and x′x^{\prime} and g(f(ai+r+1)+l⋅(yi+1))>bi−rg(f(a_{i}+r+1)+l\cdot(y_{i}+1))>b_{i}-r. So, ∑i=1dyi≥t′′\sum_{i=1}^{d}y_{i}\geq t^{\prime\prime}.

For every ii, either ai=0a_{i}=0 or vai′v^{\prime}_{a_{i}} is repeated somewhere else in (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}). Likewise, either bi=m′b_{i}=m^{\prime} or vbi′v^{\prime}_{b_{i}} is repeated somewhere else in (v0′,...,vm′)(v^{\prime}_{0},...,v^{\prime}_{m}). The first r+1r+1 and last r+1r+1 of the cic_{i} are , and whenever there exists jj such that ∣i−j∣≤r|i-j|\leq r and vj′v^{\prime}_{j} is a repeated vertex ci′c^{\prime}_{i} is , so cj′=0c^{\prime}_{j}=0 whenever ai≤j≤ai+ra_{i}\leq j\leq a_{i}+r or bi−r≤j≤bib_{i}-r\leq j\leq b_{i} for some ii. Also, for any 1≤i≤d1\leq i\leq d and 1≤j≤yi1\leq j\leq y_{i}, it is the case that g(f(ai+r+1)+l⋅j)−g(f(ai+r+1)+l⋅(j−1))=lg(f(a_{i}+r+1)+l\cdot j)-g(f(a_{i}+r+1)+l\cdot(j-1))=l unless one of the vertices vf(ai+r+1)+l⋅(j−1),...,vf(ai+r+1)+l⋅j−1v_{f(a_{i}+r+1)+l\cdot(j-1)},...,v_{f(a_{i}+r+1)+l\cdot j-1} was deleted and {cg(f(ai+r+1)+l⋅(j−1))′,...,cg(f(ai+r+1)+l⋅j−1)′}\{c^{\prime}_{g(f(a_{i}+r+1)+l\cdot(j-1))},...,c^{\prime}_{g(f(a_{i}+r+1)+l\cdot j-1)}\} consists of one copy of λh′′′\lambda^{\prime}_{h^{\prime\prime}} for each h′′h^{\prime\prime} and l−(s−1)l-(s-1) copies of unless one of the vertices vf(ai+r+1)+l⋅(j−1),...,vf(ai+r+1)+l⋅j−1v_{f(a_{i}+r+1)+l\cdot(j-1)},...,v_{f(a_{i}+r+1)+l\cdot j-1} was deleted or one of cf(ai+r+1)+l⋅(j−1),...,cf(ai+r+1)+l⋅j−1c_{f(a_{i}+r+1)+l\cdot(j-1)},...,c_{f(a_{i}+r+1)+l\cdot j-1} was set to as a result of the corresponding vertex being within distance rr of a vertex that was repeated somewhere else in the walk. The entirety of the block is at least rr away from any vertex that is repeated in (v0′,...vm′′)(v^{\prime}_{0},...v^{\prime}_{m^{\prime}}), so the second case is only possible if the other copy of that vertex was subsequently deleted. So, at most xx blocks fall under each of these two cases, which means that there are at least max⁡(t′′−2x,0)\max(t^{\prime\prime}-2x,0) uncorrupted blocks. Each corrupted block has at most one ci′c^{\prime}_{i} with a value of λh′′′\lambda^{\prime}_{h^{\prime\prime}} for each h′′h^{\prime\prime} and there is at most one ci′c^{\prime}_{i} with a value of λh′′\lambda_{h^{\prime\prime}} between cg(f(ai+r+1)+l⋅yi)′c^{\prime}_{g(f(a_{i}+r+1)+l\cdot y_{i})} and cbi′c^{\prime}_{b_{i}} for each ii and h′′h^{\prime\prime}. So,

Let c0,...,cmc_{0},...,c_{m} be a sequence of real numbers with at most yy nonzero elements, and v0′,...vm′′v^{\prime}_{0},...v^{\prime}_{m^{\prime}} be vertices. For any integer xx, there are at most 3y(m+1)xnm−m′−x3^{y}(m+1)^{x}n^{m-m^{\prime}-x} pairs of a sequence of vertices v1,...,vmv_{1},...,v_{m} and a sequence of real numbers c0′,...,cm′′c^{\prime}_{0},...,c^{\prime}_{m^{\prime}} such that W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) is a level xx shard of W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m})).

Path-sum-conversion only deletes vertices that have a nonzero coresponding element of c0,...,cmc_{0},...,c_{m}, so there are at most 3y3^{y} possibilities for where the vertices that were deleted originally were, and which of them were copies of vertices in v0′,...,vm′′v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}. There are at most (m+1)x(m+1)^{x} possibilities for the identities of the xx deleted vertices that are repetitions of vertices in (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}) and nm−m′−xn^{m-m^{\prime}-x} possiblilities for the remaining m−m′−xm-m^{\prime}-x deleted vertices. Furthermore, once the deleted vertices and their original locations are specified, the only sequence of vertices that could give rise to v0′,...,vm′′v^{\prime}_{0},...,v^{\prime}_{m^{\prime}} after that sequence of deletions is the sequence formed by splicing the deleted vertices into v0′,...,vm′′v^{\prime}_{0},...,v^{\prime}_{m^{\prime}} at the specified locations. Also, whenever path-sum-conversion recurses, the vertex that the current iteration was considering is deleted in one child iteration, and it is not deleted in any of the expressions resulting from the other branch. So, only one of the expressions in the sum output by path−sum−conversion(W(c0,...,cm)[r]((v0,...,vm)))path-sum-conversion(W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) results from the specified series of deletions, which means that the list of deleted vertices and their original locations implies a unique value of (c0′,...,cm′′)(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}}). ∎

Let λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1} be a Λ\Lambda-bounded eigenvalue approximation and c0,...,cmc_{0},...,c_{m} be an l[r]l[r]-cycle of this approximation for some ll and r>0r>0. Then, let v0,...,vmv_{0},...,v_{m} be a series of vertices, and let W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) be a level xx shard of W(c0,...,cm)[r]((v0,...,vm)))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) such that v0′,...,vm′′v^{\prime}_{0},...,v^{\prime}_{m^{\prime}} is nonbacktracking. The absolute value of the coefficient of W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) in the sum resulting from path-sum-conversion(W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) is at most (Λ/n)m−m′(\Lambda/n)^{m-m^{\prime}}.

First, note that since r≥1r\geq 1, for any i<i′i<i^{\prime} such that ci≠0c_{i}\neq 0 and ci′≠0c_{i^{\prime}}\neq 0, it must be the case that i′−i≥3i^{\prime}-i\geq 3. Now, let II and I′I^{\prime} be two distinct subsets of {i:ci≠0}\{i:c_{i}\neq 0\} with m−m′m-m^{\prime} elements, and choose the smallest i∈(I\I′)∪(I′\I)i\in(I\backslash I^{\prime})\cup(I^{\prime}\backslash I). Assume without loss of generality that i∈Ii\in I. Note that m≥i+3m\geq i+3 because I′/I≠∅I^{\prime}/I\neq\emptyset, and the smallest i′>ii^{\prime}>i such that ci′≠0c_{i^{\prime}}\neq 0 is at least i+3i+3. Now, let t=∣I∩{0,...,i−1}∣=∣I′∩{0,...,i−1}∣t=|I\cap\{0,...,i-1\}|=|I^{\prime}\cap\{0,...,i-1\}|. Deleting all vertices from v0,...,vmv_{0},...,v_{m} that have indices in II leaves vi+2v_{i+2} in the (i+1−t)(i+1-t)th position, while deleting the vertices that have indices in I′I^{\prime} leaves vi+1v_{i+1} in that position. So, if vi+1≠vi+2v_{i+1}\neq v_{i+2} the resulting sequences are different and if vi+1=vi+2v_{i+1}=v_{i+2} the resulting sequences backtrack. Thus, there is only one subseries of vertices that can be deleted from v0,...,vmv_{0},...,v_{m} to yield v0′,...,vm′′v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}. That means that there is only one route through which path-sum-conversion(W(c0,...,cm)[r]((v0,...,vm))W_{(c_{0},...,c_{m})[r]}((v_{0},...,v_{m}))) arrives at W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})). Every time the algorithm deletes a vertex, it multiplies the expression’s coefficient by −ci/n-c_{i}/n, where ii is that vertex’s original index in v0,...,vmv_{0},...,v_{m}. So, the conclusion holds because ∣−ci/n∣≤Λ/n|-c_{i}/n|\leq\Lambda/n for all ii. ∎

because all of the vertices are connected to the uiu_{i} and they create enough distance between the viv_{i} and the vi′′v^{\prime\prime}_{i} that they will never be within rr of each other. Next we will establish a series of bounds on the expected values of these expressions, starting with the following.

Let λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1} be a Λ\Lambda-bounded eigenvalue approximation with error at most 2Λ(min⁡i∣λs−λi∣/4Λ)s−1∣λs/Λ∣l−s+12\Lambda(\min_{i}|\lambda_{s}-\lambda_{i}|/4\Lambda)^{s-1}|\lambda_{s}/\Lambda|^{l-s+1} and c0,...,cm1c_{0},...,c_{m_{1}} and c0′′,...,cm2′′c^{\prime\prime}_{0},...,c^{\prime\prime}_{m_{2}} be l[r]l[r]-cycles of this approximation for some ll and rr. Then, let (c0′′′,...,cm1+m2+r+1′′′)=(c0,...,cm1,0,...,0,cm2′′,cm2−1′′,...,c0′′)(c^{\prime\prime\prime}_{0},...,c^{\prime\prime\prime}_{m_{1}+m_{2}+r+1})=(c_{0},...,c_{m_{1}},0,...,0,c^{\prime\prime}_{m_{2}},c^{\prime\prime}_{m_{2}-1},...,c^{\prime\prime}_{0}), where there are rr s in the middle. Next, let v0,...,vm1,v0′′,...,vm2′′∈Gv_{0},...,v_{m_{1}},v^{\prime\prime}_{0},...,v^{\prime\prime}_{m_{2}}\in G and W(c0′,...,cm′′[r])((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}}[r])}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) be a level xx shard of W(c0′′′,...,cm1+m2+r+1′′′)[r]((v0,...,vm,u1,u2,...,ur,vm′′,vm−1′′,...,v0′′))W_{(c^{\prime\prime\prime}_{0},...,c^{\prime\prime\prime}_{m_{1}+m_{2}+r+1})[r]}((v_{0},...,v_{m},u_{1},u_{2},...,u_{r},v^{\prime\prime}_{m},v^{\prime\prime}_{m-1},...,v^{\prime\prime}_{0})). Define ww and ee such that there are m′+1−wm^{\prime}+1-w distinct vertices in v0′,...,vm′′v^{\prime}_{0},...,v^{\prime}_{m^{\prime}} and m′−em^{\prime}-e distinct unordered pairs {vi′,vi+1′}\{v^{\prime}_{i},v^{\prime}_{i+1}\}, and let m′′=m′−r−1m^{\prime\prime}=m^{\prime}-r-1. Then m1+m2−m′′≤x+6(w−e)+2+e/rm_{1}+m_{2}-m^{\prime\prime}\leq x+6(w-e)+2+e/r. Also, if (Λ/∣λs∣)l−s+1≥2s−1(\Lambda/|\lambda_{s}|)^{l-s+1}\geq 2^{s-1} and λs2>Λ\lambda_{s}^{2}>\Lambda, then

First, consider the standard decomposition of (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}). The only vertices that could have been deleted are vertices within rr of the edge of a fresh segement with nonzero corresponding values of ci′′′c^{\prime\prime\prime}_{i}, vertices that are not in a fresh segment with nonzero corresponding values of ci′′′c^{\prime\prime\prime}_{i}, and the xx vertices that were deleted as copies of vertices in v0′,...,vm′′v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}. There are at most 2e2e indices ii such that (vi′,vi+1′)(v^{\prime}_{i},v^{\prime}_{i+1}) is not in a fresh segment and there are no ii and i′i^{\prime} such that ∣i−i′∣≤2r|i-i^{\prime}|\leq 2r, ci′′′≠0c^{\prime\prime\prime}_{i}\neq 0, and ci′′′′≠0c^{\prime\prime\prime}_{i^{\prime}}\neq 0. So, there are at most 6(w−e)+2+e/r6(w-e)+2+e/r vertices with nonzero ci′′′c^{\prime\prime\prime}_{i} that are not in a fresh segment and farther than rr from its edge.

Now, remove u1,...,uru_{1},...,u_{r} from whichever fresh segment they are in, splitting it into two fresh segments on either side of u1,...,uru_{1},...,u_{r} if necessary. Let d,d′,t,t′d,d^{\prime},t,t^{\prime} be the measures of the resulting set of fresh segments, and t′′=⌈t−d(l+2r+1)l⌉t^{\prime\prime}=\lceil\frac{t-d(l+2r+1)}{l}\rceil. By the walk decomposition lemma, d+d′≤3(w−e)+2d+d^{\prime}\leq 3(w-e)+2. Also, note that every edge in one of the repeated fresh segments is repeated later in the walk. So, t+2t′≤m′′t+2t^{\prime}\leq m^{\prime\prime}. Every edge except those that involve the uiu_{i} appears exactly once in a fresh segment, so t+t′=m′′−et+t^{\prime}=m^{\prime\prime}-e and t≥m′′−2et\geq m^{\prime\prime}-2e. On another note, for every j<sj<s, we have that

That means that if (Λ/∣λs∣)l−s+1≥2s−1(\Lambda/|\lambda_{s}|)^{l-s+1}\geq 2^{s-1} and λs2>Λ\lambda_{s}^{2}>\Lambda then

For any functions m1m_{1} and m2m_{2} of nn such that m1,m2=O(log⁡n)m_{1},m_{2}=O(\log n), there exists r0r_{0} such that for any r≥r0r\geq r_{0}, z≥0z\geq 0, and Λ,s,l\Lambda,s,l such that (Λ/∣λs∣)l−s+1≥2s−1(\Lambda/|\lambda_{s}|)^{l-s+1}\geq 2^{s-1}, λs2>Λ>λ1\lambda_{s}^{2}>\Lambda>\lambda_{1}, and l≥(2r+1)(s−1)l\geq(2r+1)(s-1) the following holds. Let λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1} be a Λ\Lambda-bounded eigenvalue approximation and c0,...,cm1c_{0},...,c_{m_{1}} and c0′′,...,cm2′′c^{\prime\prime}_{0},...,c^{\prime\prime}_{m_{2}} be l[r]l[r]-cycles of this approximation with error less than 2Λ(min⁡i∣λs−λi∣/4Λ)s−1∣λs/Λ∣l−s+12\Lambda(\min_{i}|\lambda_{s}-\lambda_{i}|/4\Lambda)^{s-1}|\lambda_{s}/\Lambda|^{l-s+1}. For any σ1,σ2,σ3,σ4\sigma_{1},\sigma_{2},\sigma_{3},\sigma_{4}, the expected value of the sum of the absolute values of all shards of degree at least zz for (σ1,σ2,σ3,σ4)(\sigma_{1},\sigma_{2},\sigma_{3},\sigma_{4}), m1m_{1}, m2m_{2}, rr, (c0,...,cm1)(c_{0},...,c_{m_{1}}), and (c0′′,...,cm2′′)(c^{\prime\prime}_{0},...,c^{\prime\prime}_{m_{2}}) times their coefficients is O(n(15−5z)/6∏∣λs−ci∣⋅∏∣λs−ci′′∣)O(n^{(15-5z)/6}\prod|\lambda_{s}-c_{i}|\cdot\prod|\lambda_{s}-c^{\prime\prime}_{i}|).

Let m=m1+m2m=m_{1}+m_{2}. For any given xx, ww, m′m^{\prime}, and ee with x+w−e>zx+w-e>z and x≤m1+m2+r+1−m′≤x+6(w−e)+2+e/rx\leq m_{1}+m_{2}+r+1-m^{\prime}\leq x+6(w-e)+2+e/r, the expected sum of the values of all level xx shards for (σv0,σvm1,σv0′′,σvm2′′)(\sigma_{v_{0}},\sigma_{v_{m_{1}}},\sigma_{v^{\prime\prime}_{0}},\sigma_{v^{\prime\prime}_{m_{2}}}), m1m_{1}, m2m_{2}, rr, (c0,...,cm1)(c_{0},...,c_{m_{1}}), and (c0′′,...,cm2′′)(c^{\prime\prime}_{0},...,c^{\prime\prime}_{m_{2}}) with m′+1m^{\prime}+1 vertices, m′+1−wm^{\prime}+1-w distinct vertices, and m′−em^{\prime}-e distinct adjacent pairs of vertices has an absolute value of at most

and the last term above is upper-bounded by

provided that r>12m/log⁡2(n)r>12m/\log_{2}(n) and nn is sufficiently large. There are at most 2(s−1)+(s−1)m/l2(s-1)+(s-1)m/l indices ii such that ci≠0c_{i}\neq 0 or ci′′≠0c^{\prime\prime}_{i}\neq 0, so ∣λs∣−m∏∣λs−ci∣∏∣λs−ci′′∣≥(min⁡s′<s∣λs−λs′∣/2)(s−1)m/l|\lambda_{s}|^{-m}\prod|\lambda_{s}-c_{i}|\prod|\lambda_{s}-c^{\prime\prime}_{i}|\geq(\min_{s^{\prime}<s}|\lambda_{s}-\lambda_{s^{\prime}}|/2)^{(s-1)m/l}. So, as long as r0r_{0} is large enough that m2r+1ln⁡(min⁡s′<s∣λs−λs′∣/2)<ln⁡(n)/3\frac{m}{2r+1}\ln(\min_{s^{\prime}<s}|\lambda_{s}-\lambda_{s^{\prime}}|/2)<\ln(n)/3, then ∣λs∣mn(14−5z)/6≤n(15−5z)/6∏∣λs−ci∣⋅∏∣λs−ci′′∣|\lambda_{s}|^{m}n^{(14-5z)/6}\leq n^{(15-5z)/6}\prod|\lambda_{s}-c_{i}|\cdot\prod|\lambda_{s}-c^{\prime\prime}_{i}|. ∎

Assume that mm, Λ\Lambda, λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1}, ll, rr, and (c0,...,cm)(c_{0},...,c_{m}) satisfy the conditions of the degree bound lemma. Also asume that m=Ω(log⁡n)m=\Omega(\log n) and either s=h′s=h^{\prime} or ∣λs∣>∣λs+1∣|\lambda_{s}|>|\lambda_{s+1}|. Now, let ww be an eigenvector of PQPQ with an eigenvalue of λj\lambda_{j}. If j≠sj\neq s then with probability 1−o(1)1-o(1) the average value over all vv of wσvWm/{ci}(x,v)/pσvw_{\sigma_{v}}W_{m/\{c_{i}\}}(x,v)/p_{\sigma_{v}} is O(1ln⁡(n)n∏∣λs−ci∣)O(\frac{1}{\ln(n)\sqrt{n}}\prod|\lambda_{s}-c_{i}|) and if j=sj=s then the average value over all vv of wσvWm/{ci}(x,v)/pσvw_{\sigma_{v}}W_{m/\{c_{i}\}}(x,v)/p_{\sigma_{v}} is Ω(1n∏∣λj−ci∣)\Omega(\frac{1}{\sqrt{n}}\prod|\lambda_{j}-c_{i}|) with probability 1−o(1)1-o(1).

Let m′′′=⌊ln⁡(n)⌋m^{\prime\prime\prime}=\lfloor\sqrt{\ln(n)}\rfloor, unless c⌊ln⁡(n)⌋≠0c_{\lfloor\sqrt{\ln(n)}\rfloor}\neq 0, in which case let m′′′=⌊ln⁡(n)⌋+1m^{\prime\prime\prime}=\lfloor\sqrt{\ln(n)}\rfloor+1. The first step in proving the desired bounds is to justify approximating ∑v∈ΩjWm/{ci}(x,v)\sum_{v\in\Omega_{j}}W_{m/\{c_{i}\}}(x,v) with ∑v0,...,vm′′′∈Gxv0⋅W(c0,...,cm′′′)[r]((v0,...,vm′′′)eσvm′′′⋅∏i=m′′′+1m(PQ−ci)ej\sum_{v_{0},...,v_{m^{\prime\prime\prime}}\in G}x_{v_{0}}\cdot W_{(c_{0},...,c_{m^{\prime\prime\prime}})[r]}((v_{0},...,v_{m^{\prime\prime\prime}})e_{\sigma_{v_{m^{\prime\prime\prime}}}}\cdot\prod_{i=m^{\prime\prime\prime}+1}^{m}(PQ-c_{i})e_{j}. In order to do that, we observe that for any jj,

Note that E[v0v0′]E[v_{0}v^{\prime}_{0}] is 11 if v0=v0′v_{0}=v^{\prime}_{0} and otherwise. So, the only (v0,...,vm),(v0′,...,vm′)(v_{0},...,v_{m}),(v^{\prime}_{0},...,v^{\prime}_{m}) that make a nonzero contribution to the expected value of the sum above are those for which v0=v0′v_{0}=v^{\prime}_{0}. Also, given any (v0,...,vm),(v0′,...,vm′)(v_{0},...,v_{m}),(v^{\prime}_{0},...,v^{\prime}_{m}) such that vm′′′+1,...,vmv_{m^{\prime\prime\prime}+1},...,v_{m} are distinct, and {vm′′′+1,...,vm}∩({v0,...,vm′′′}∪{v0′,...,vm′})=∅\{v_{m^{\prime\prime\prime}+1},...,v_{m}\}\cap(\{v_{0},...,v_{m^{\prime\prime\prime}}\}\cup\{v^{\prime}_{0},...,v^{\prime}_{m}\})=\emptyset, then for any assignment of communities to vm′′′,vmv_{m^{\prime\prime\prime}},v_{m}, and vm′v^{\prime}_{m}, and any possible value of the subgraph of GG induced by {v0,...,vm′′′}∪{v0′,...,vm′}\{v_{0},...,v_{m^{\prime\prime\prime}}\}\cup\{v^{\prime}_{0},...,v^{\prime}_{m}\}, the expected value of W(c0,...,cm)[r](v0,...,vm)W_{(c_{0},...,c_{m})[r]}(v_{0},...,v_{m}) given these values is W(c0,...,cm′′′)[r](v0,...,vm′′′)eσm′′′⋅∏i=m′′′+1m(PQ−ci)ejW_{(c_{0},...,c_{m^{\prime\prime\prime}})[r]}(v_{0},...,v_{m^{\prime\prime\prime}})e_{\sigma_{m^{\prime\prime\prime}}}\cdot\prod_{i=m^{\prime\prime\prime}+1}^{m}(PQ-c_{i})e_{j}. That means that the expected contribution to the sum above of the terms corresponding to such (v0,...,vm),(v0′,...,vm′)(v_{0},...,v_{m}),(v^{\prime}_{0},...,v^{\prime}_{m}) is . By the same logic, all (v0,...,vm),(v0′,...,vm′)(v_{0},...,v_{m}),(v^{\prime}_{0},...,v^{\prime}_{m}) such that vm′′′+1′,...,vm′v^{\prime}_{m^{\prime\prime\prime}+1},...,v^{\prime}_{m} are distinct and {vm′′′+1′,...,vm′}∩({v0′,...,vm′′′′}∪{v0,...,vm})=∅\{v^{\prime}_{m^{\prime\prime\prime}+1},...,v^{\prime}_{m}\}\cap(\{v^{\prime}_{0},...,v^{\prime}_{m^{\prime\prime\prime}}\}\cup\{v_{0},...,v_{m}\})=\emptyset have an expected contribution of to the sum above.

Now, let VV be the set of all pairs of tuples ((v0,...,vm),(v0′,...,vm′))((v_{0},...,v_{m}),(v^{\prime}_{0},...,v^{\prime}_{m})) such that v0=v0′v_{0}=v^{\prime}_{0}, either ∣{vm′′′+1,...,vm}∣<m−m′′′|\{v_{m^{\prime\prime\prime}+1},...,v_{m}\}|<m-m^{\prime\prime\prime} or {vm′′′+1,...,vm}∩({v0,...,vm′′′}∪{v0′,...,vm′})≠∅\{v_{m^{\prime\prime\prime}+1},...,v_{m}\}\cap(\{v_{0},...,v_{m^{\prime\prime\prime}}\}\cup\{v^{\prime}_{0},...,v^{\prime}_{m}\})\neq\emptyset, and either ∣{vm′′′+1′,...,vm′}∣<m−m′′′|\{v^{\prime}_{m^{\prime\prime\prime}+1},...,v^{\prime}_{m}\}|<m-m^{\prime\prime\prime} or {vm′′′+1′,...,vm′}∩({v0′,...,vm′′′′}∪{v0,...,vm})≠∅\{v^{\prime}_{m^{\prime\prime\prime}+1},...,v^{\prime}_{m}\}\cap(\{v^{\prime}_{0},...,v^{\prime}_{m^{\prime\prime\prime}}\}\cup\{v_{0},...,v_{m}\})\neq\emptyset. Note that for every v0,...,vm′′′v_{0},...,v_{m^{\prime\prime\prime}} and v0′,...,vm′v^{\prime}_{0},...,v^{\prime}_{m}, there are at most (2m+2)2nm−m′′′−1(2m+2)^{2}n^{m-m^{\prime\prime\prime}-1} possible choices of vm′′′+1,...,vmv_{m^{\prime\prime\prime}+1},...,v_{m} such that ((v0,...,vm),(v0′,...,vm′))∈V((v_{0},...,v_{m}),(v^{\prime}_{0},...,v^{\prime}_{m}))\in V. So,

where the second to last equality follows from the degree bound lemma and the fact that v0=v0′v_{0}=v^{\prime}_{0} implies that every shard of a WW in this expression has degree at least 11. The last equality follows from the facts that ∏i=m′′′m∣λi′−ci∣=O(∏i=m′′′m∣λs−ci∣)\prod_{i={m^{\prime\prime\prime}}}^{m}|\lambda_{i^{\prime}}-c_{i}|=O(\prod_{i={m^{\prime\prime\prime}}}^{m}|\lambda_{s}-c_{i}|) for any i′i^{\prime} and m=O(ln⁡(n))m=O(\ln(n)). The same logic applies to the analagous expressions for W(c0,...,cm′′′,0,...,0,cm,...,c0)[r](v0,...,vm′′′,u1,...,ur,vm′,...,v0′)W_{(c_{0},...,c_{m^{\prime\prime\prime}},0,...,0,c_{m},...,c_{0})[r]}(v_{0},...,v_{m^{\prime\prime\prime}},u_{1},...,u_{r},v^{\prime}_{m},...,v^{\prime}_{0}) and W(c0,...,cm′′′,0,...,0,cm′′′,...,c0)[r](v0,...,vm′′′,u1,...,ur,vm′′′′,...,v0′)W_{(c_{0},...,c_{m^{\prime\prime\prime}},0,...,0,c_{m^{\prime\prime\prime}},...,c_{0})[r]}(v_{0},...,v_{m^{\prime\prime\prime}},u_{1},...,u_{r},v^{\prime}_{m^{\prime\prime\prime}},...,v^{\prime}_{0}). This implies that

If the W(c0,...,cm,0,...,0,cm,...,c0)[r](v0,...,vm,u1,...,ur,vm′,...,v0′)W_{(c_{0},...,c_{m},0,...,0,c_{m},...,c_{0})[r]}(v_{0},...,v_{m},u_{1},...,u_{r},v^{\prime}_{m},...,v^{\prime}_{0}) are broken down into weighted sums of shards, then every resulting shard has degree at least 11 for the same reason as in the previous cases, and all resulting shards of degree at least 22 have a combined contribution to the expected value of at most n5/6∏i=1m(λs−ci)2n^{5/6}\prod_{i=1}^{m}(\lambda_{s}-c_{i})^{2} by the degree bound lemma. Now, let W(c0′,...,cm′′)[r](v0′′,...,vm′′′)W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}}) be a degree 11 shard of W(c0,...,cm,0,...,0,cm,...,c0)[r](v0,...,vm,u1,...,ur,vm′,...,v0′)W_{(c_{0},...,c_{m},0,...,0,c_{m},...,c_{0})[r]}(v_{0},...,v_{m},u_{1},...,u_{r},v^{\prime}_{m},...,v^{\prime}_{0}) for some ((v0,...,vm),(v0′,...,vm′))∈V((v_{0},...,v_{m}),(v^{\prime}_{0},...,v^{\prime}_{m}))\in V. Also, let HH be the walk graph of v0′′,...,vm′′′v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}} with u1,...,uru_{1},...,u_{r} removed. We know that v0′′=v0=v0′=vm′′′v^{\prime\prime}_{0}=v_{0}=v^{\prime}_{0}=v^{\prime\prime}_{m^{\prime}}, so HH is connected. That means that the only way that W(c0′,...,cm′′)[r](v0′′,...,vm′′′)W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}}) can be a degree 11 shard is if HH is a tree and no vertex that was deleted in the process of converting W(c0,...,cm,0,...,0,cm,...,c0)[r](v0,...,vm,u1,...,ur,vm′,...,v0′)W_{(c_{0},...,c_{m},0,...,0,c_{m},...,c_{0})[r]}(v_{0},...,v_{m},u_{1},...,u_{r},v^{\prime}_{m},...,v^{\prime}_{0}) to W(c0′,...,cm′′)[r](v0′′,...,vm′′′)W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}}) is repeated in v0′′,...,vm′′′v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}}. So, there must exist some t0≥0t_{0}\geq 0 such that vi′′=vm′−i′′v^{\prime\prime}_{i}=v^{\prime\prime}_{m^{\prime}-i} for all i≤t0i\leq t_{0}, vt0+1′′,...,vm′−t0−1′′v^{\prime\prime}_{t_{0}+1},...,v^{\prime\prime}_{m^{\prime}-t_{0}-1} are distinct, and {v0′′,...,vt0′′}∩{vt0+1′′,...,vm′−t0−1′′}=∅\{v^{\prime\prime}_{0},...,v^{\prime\prime}_{t_{0}}\}\cap\{v^{\prime\prime}_{t_{0}+1},...,v^{\prime\prime}_{m^{\prime}-t_{0}-1}\}=\emptyset. Furthermore, since ((v0,...,vm),(v0′,...,vm′))∈V((v_{0},...,v_{m}),(v^{\prime}_{0},...,v^{\prime}_{m}))\in V, there exist ii and i′i^{\prime} such that i>m′′i>m^{\prime\prime} and vi=vi′′v_{i}=v^{\prime}_{i^{\prime}} or vi=vi′v_{i}=v_{i^{\prime}} with i≠i′i\neq i^{\prime}. Either neither of the repeated elements were deleted in the process of converting W(c0,...,cm,0,...,0,cm,...,c0)[r](v0,...,vm,u1,...,ur,vm′,...,v0′)W_{(c_{0},...,c_{m},0,...,0,c_{m},...,c_{0})[r]}(v_{0},...,v_{m},u_{1},...,u_{r},v^{\prime}_{m},...,v^{\prime}_{0}) to W(c0′,...,cm′′)[r](v0′′,...,vm′′′)W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}}) or they both were, in which case viv_{i} must have been within rr of a repeated vertex that was not deleted during the conversion. The only vertices that could have been deleted during the conversion are those with nonzero corresponding cic_{i}, so either way, we have that t0≥2r2r+1m′′−rt_{0}\geq\frac{2r}{2r+1}m^{\prime\prime}-r. Also, by lemma 10, we have that

For fixed values of t0t_{0} and m′m^{\prime}, there are at most 2m⋅n(m′−t0−r)2m\cdot n^{(m^{\prime}-t_{0}-r)} possible values of (v0′′,...,vm′′′).(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}}). Furthermore, for each possible value of (v0′′,...,vm′′′)(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}}), there are at most 2t0/r+1n2m+r+1−m′2^{t_{0}/r+1}n^{2m+r+1-m^{\prime}} possible values of v0,...,vmv_{0},...,v_{m}, v0′,...,vm′v^{\prime}_{0},...,v^{\prime}_{m}, and c0′,...,cm′′c^{\prime}_{0},...,c^{\prime}_{m^{\prime}} such that W(c0′,...,cm′′)[r](v0′′,...,vm′′′)W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m^{\prime}}) is a degree 11 shard of W(c0,...,cm,0,...,0,cm,...,c0)[r](v0,...,vm,u1,...,ur,vm′,...,v0′)W_{(c_{0},...,c_{m},0,...,0,c_{m},...,c_{0})[r]}(v_{0},...,v_{m},u_{1},...,u_{r},v^{\prime}_{m},...,v^{\prime}_{0}), and this shard has a coefficient with an absolute value of at most (Λ/n)2m+r+1−m′(\Lambda/n)^{2m+r+1-m^{\prime}}. So, the combined contribution to the expected value from all degree 11 shards with a given value of t0t_{0} and m′m^{\prime} is at most

There are only O(ln⁡2(n))O(\ln^{2}(n)) possible values of t0t_{0} and m′m^{\prime}, so the combined contribution of all degree 11 shards is O(nln⁡−3(n)∏i=0m(λs−ci)2)O\left(n\ln^{-3}(n)\prod_{i=0}^{m}(\lambda_{s}-c_{i})^{2}\right). So, with probability 1−o(1)1-o(1), the average value over all v∈Ωσv\in\Omega_{\sigma} of Wm/{ci}(x,v)W_{m/\{c_{i}\}}(x,v) is within o(nlog⁡(n)∏∣λs−ci∣)o(\frac{\sqrt{n}}{\log(n)}\prod|\lambda_{s}-c_{i}|) of

If ww is an eigenvector of PQPQ with eigenvalue λj\lambda_{j}, then this means that the average value of wσvWm/{ci}(x,v)/pσvw_{\sigma_{v}}W_{m/\{c_{i}\}}(x,v)/p_{\sigma_{v}} is within o(1log⁡(n)∏∣λs−ci∣)o(\frac{1}{\log(n)}\prod|\lambda_{s}-c_{i}|) of

For fixed GG and σ\sigma but not fixed xx, the probability distribution of this expression is a normal distribution with mean and variance

With probability 1−o(1)1-o(1), there is no v0∈Gv_{0}\in G that has more than one cycle within m′′′m^{\prime\prime\prime} edges of it, there are O(λ12m′′′)O(\lambda_{1}^{2m^{\prime\prime\prime}}) vertices that have a cycle within m′′′m^{\prime\prime\prime} edges of them, and no vertex in the graph has degree greater than ln⁡2(n)\ln^{2}(n). This implies that

If j≠sj\neq s, then there exists ϵ>0\epsilon>0 such that ∏i=m′′+1m(λj−ci)2=O(n−ϵ∏i=m′′+1m(λs−ci)2),\prod_{i=m^{\prime\prime}+1}^{m}(\lambda_{j}-c_{i})^{2}=O(n^{-\epsilon}\prod_{i=m^{\prime\prime}+1}^{m}(\lambda_{s}-c_{i})^{2}), so the variance is o(1nlog⁡2(n)∏(λs−ci)2)o(\frac{1}{n\log^{2}(n)}\prod(\lambda_{s}-c_{i})^{2}). Thus, the specified average is O(1log⁡(n)n∏∣λs−ci∣)O(\frac{1}{\log(n)\sqrt{n}}\prod|\lambda_{s}-c_{i}|) with probability 1−o(1)1-o(1), as desired.

Now, consider the case where j=sj=s. If there is no cycle in the portion of the graph within m′′m^{\prime\prime} edges of v0v_{0} then every nonbacktracking walk of length m′′m^{\prime\prime} or less starting at v0v_{0} is a path. So, conditioned on the abscence of such cycles near v0v_{0} and a fixed value of σv0\sigma_{v_{0}}, we have that

This means that the expected value of the square of this sum is Ω(∏i=1m′′′−1(λs−ci)2)\Omega(\prod_{i=1}^{m^{\prime\prime\prime}-1}(\lambda_{s}-c_{i})^{2}). Furthermore, for any vv and v′v^{\prime} there is no vertex within m′′m^{\prime\prime} edges of both vv and v′v^{\prime} with probability 1−O(λ12m′′′/n)1-O(\lambda_{1}^{2m^{\prime\prime\prime}}/n). So, the joint probability distribution of the subgraphs of GG within m′′m^{\prime\prime} edges of vv and v′v^{\prime} differs from the product of the individual distributions by O(λ12m′′/n)O(\lambda_{1}^{2m^{\prime\prime}}/n). So, with probability 1−o(1)1-o(1) we have that

Therefore, with probability 1−o(1)1-o(1), the average value over all vv of wσvWm/{ci}(x,v)/pσvw_{\sigma_{v}}W_{m/\{c_{i}\}}(x,v)/p_{\sigma_{v}} is 1nΩ(∏∣λs−ci∣)\frac{1}{\sqrt{n}}\Omega(\prod|\lambda_{s}-c_{i}|). ∎

There exists a constant r0r_{0} and m0=Θ(log⁡n)m_{0}=\Theta(\log n) such that if mm, Λ\Lambda, λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1}, ll, rr, and (c0,...,cm)(c_{0},...,c_{m}) satisfy the conditions of the degree bound lemma, r>r0r>r_{0} and m>m0m>m_{0}, then for any communities σ1,σ2\sigma_{1},\sigma_{2},

Let W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) be a level xx shard of

and G′G^{\prime} be (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})’s walk graph. c0=c0′′=0c_{0}=c^{\prime\prime}_{0}=0, so v0′=vm′′v^{\prime}_{0}=v^{\prime}_{m^{\prime}} is the only vertex in G′G^{\prime} that can have degree 11. Since cm=cm′′=0c_{m}=c^{\prime\prime}_{m}=0, vm∈Gv_{m}\in G and it is adjacent to u1u_{1}, uru_{r}, and Vm−1V_{m-1}, meaning that vmv_{m} has degree greater than 22 and this shard has nonzero degree.

the contribution to the expected value of all such shards is O((∑i=sh∏j=0m∣λi−cj∣)2)O\left(\left(\sum_{i=s}^{h}\prod_{j=0}^{m}|\lambda_{i}-c_{j}|\right)^{2}\right), as desired.

That leaves the case where G′′G^{\prime\prime} is not a tree. The fact that the shard has degree less than 33 implies that G′G^{\prime} has at most 11 more edges than vertices, so G′′G^{\prime\prime} has at least as many vertices as edges. So, if it is not a tree, it must have an equal number of edges and vertices, which means that it contains exactly one cycle. The only vertices in G′′G^{\prime\prime} that might have degree 11 are v0v_{0} and vmv_{m}, so G′′G^{\prime\prime} consists of a cycle and two paths (possibly of length ) that connect v0v_{0} and vmv_{m} to the cycle. Now, let ee be the length of the path from v0v_{0} to the cycle, e′e^{\prime} be the length of the path from vmv_{m} to the cycle, and ∣I∣|I| be the set of all indices of vertices in (v0,...,vm,u1,...,ur,vm′′,...,v0′′)(v_{0},...,v_{m},u_{1},...,u_{r},v^{\prime\prime}_{m},...,v^{\prime\prime}_{0}) that were deleted in the process of converting it to (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}). m′=2m+r+1−∣I∣m^{\prime}=2m+r+1-|I|, and the shard will have a coefficient of magnitude at most (Λ/n)∣I∣(\Lambda/n)^{|I|}. There are a few subcases to consider.

No edge in the cycle in G′′G^{\prime\prime} shows up more than once in the walk defined by (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}):

In this case, there must be m′−2e−2e′−r−1=2m−2e−2e′−∣I∣m^{\prime}-2e-2e^{\prime}-r-1=2m-2e-2e^{\prime}-|I| edges in the cycle. For given values of ee and e′e^{\prime}, there are at most (e+e′)/r+2(e+e^{\prime})/r+2 indices of vertices that could have been deleted in the transition from W(c0,...,cm,0,...,0,cm,...,c0)[r]((v0,...,vm,u1,...,ur,vm′′,...,v0′′))W_{(c_{0},...,c_{m},0,...,0,c_{m},...,c_{0})[r]}((v_{0},...,v_{m},u_{1},...,u_{r},v^{\prime\prime}_{m},...,v^{\prime\prime}_{0})) to W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})). For fixed values of ee, e′e^{\prime}, and II, there are at most n2m−e−e′−∣I∣n^{2m-e-e^{\prime}-|I|} possible values of (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}), each of which could be derived from at most n∣I∣n^{|I|} possible values of (v0,...,vm)(v_{0},...,v_{m}) and (v0′′,...,vm′′)(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m}). Also, the absolute value of the shard’s expected value is at most

which means that all such shards for given values of ee and e′e^{\prime} have a combined expected contribution of absolute value at most

and thus all such shards for all ee and e′e^{\prime} have a combined expected contribution of absolute value at most

Some but not all of the edges in the cycle in G′′G^{\prime\prime} show up more than once in the walk defined by (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}):

The only way for this to happen is if the edges on one side of the cycle are repeated and the edges on the other side are not. The only way for this to happen is if (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}) simply goes across the repeated branch of the cycle when it goes from v0v_{0} to vmv_{m} and then goes around the cycle one and a fraction times on its way back or vice-versa. So, each edge in the repeated branch shows up exactly 33 times in the walk defined by (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}). Let e′′e^{\prime\prime} be the number of edges on the repeated side, and e′′′e^{\prime\prime\prime} be the number of edges on the non-repeated side. e′′′=2m−2e−2e′−3e′′−∣I∣≤2(m−e−e′−e′′)−∣I∣e^{\prime\prime\prime}=2m-2e-2e^{\prime}-3e^{\prime\prime}-|I|\leq 2(m-e-e^{\prime}-e^{\prime\prime})-|I|, and there are at most (2e+2e′+3e′′+2r)/2r(2e+2e^{\prime}+3e^{\prime\prime}+2r)/2r indices of vertices that could be in II. For fixed values of ee, e′e^{\prime}, e′′e^{\prime\prime}, and II, there are at most n2m−e−e′−2e′′−∣I∣n^{2m-e-e^{\prime}-2e^{\prime\prime}-|I|} possible labelings of the vertices in G′′G^{\prime\prime}, each of which corresponds to at most 22 possible values of (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}). Each of those could be derived from at most n∣I∣n^{|I|} possible values of (v0,...,vm)(v_{0},...,v_{m}) and (v0′′,...,vm′′)(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m}). Also, the absolute value of the shard’s expected value is at most

So, by the same logic as in the previous case, all such shards have a combined expected contribution of absolute value at most

Every edge in the cycle in G′′G^{\prime\prime} appears more than once in the walk defined by (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}):

Let e′′e^{\prime\prime} and e′′′e^{\prime\prime\prime} be the numbers of edges on the two branches of the cycle, and ff be the number of times the walk defined by (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}) makes around the cycle on its way from v0v_{0} to vmv_{m}, and f′f^{\prime} be the number of times it goes around the cycle on its way back. G′′G^{\prime\prime} has at most (2m−∣I∣)/2(2m-|I|)/2 edges, so e′+e′′+e′′′+e′′′′≤m−∣I∣/2e^{\prime}+e^{\prime\prime}+e^{\prime\prime\prime}+e^{\prime\prime\prime\prime}\leq m-|I|/2. For fixed values of e,e′,e′′,e′′′,f,f′e,e^{\prime},e^{\prime\prime},e^{\prime\prime\prime},f,f^{\prime}, and II, there are at most ne+e′+e′′+e′′′n^{e+e^{\prime}+e^{\prime\prime}+e^{\prime\prime\prime}} options for G′′G^{\prime\prime}. Each of these options corresponds to at most 44 possible values of (v0′,...,vm′′)(v^{\prime}_{0},...,v^{\prime}_{m^{\prime}}), and each of those corresponds to at most n∣I∣n^{|I|} possible values of (v0,...,vm)(v_{0},...,v_{m}) and (v0′′,...,vm′′)(v^{\prime\prime}_{0},...,v^{\prime\prime}_{m}). Also, W(c0′,...,cm′′)[r]((v0′,...,vm′′))W_{(c^{\prime}_{0},...,c^{\prime}_{m^{\prime}})[r]}((v^{\prime}_{0},...,v^{\prime}_{m^{\prime}})) is one if every edge in G′′G^{\prime\prime} is also in GG and otherwise. That means that

There are at most m/rm/r nonzero elements of (c0,...,cm,0...0,cm,...,c0)(c_{0},...,c_{m},0...0,c_{m},...,c_{0}), and thus at most 2m/r2^{m/r} possible values of II. So, all shards for given values of e,e′,e′′,e′′′,f,f′e,e^{\prime},e^{\prime\prime},e^{\prime\prime\prime},f,f^{\prime} and II make a combined contribution with an absolute value of

Since 0≤e,e′,e′′,e′′′,f,f′≤m0\leq e,e^{\prime},e^{\prime\prime},e^{\prime\prime\prime},f,f^{\prime}\leq m, the combined expected contribution of all these shards is

There exists a constant r0r_{0} and m0=Θ(log⁡n)m_{0}=\Theta(\log n) such that if mm, Λ\Lambda, λ1′,...,λs−1′\lambda^{\prime}_{1},...,\lambda^{\prime}_{s-1}, ll, rr, and (c0,...,cm)(c_{0},...,c_{m}) satisfy the conditions of the degree bound lemma, r>r0r>r_{0} and m>m0m>m_{0}, then for all vv, we have that

If v0≠v0′′v_{0}\neq v^{\prime\prime}_{0} then E[xv0⋅xv0′′]=0E[x_{v_{0}}\cdot x_{v^{\prime\prime}_{0}}]=0, while if v0=v0′′v_{0}=v^{\prime\prime}_{0} then E[xv0⋅xv0′′]=1E[x_{v_{0}}\cdot x_{v^{\prime\prime}_{0}}]=1. So,

where the last equality follows by the previous lemma.

2 Crossing the KS threshold

For x∈[k]nx\in[k]^{n} and ε>0\varepsilon>0, define the set of bad clusterings with respect to xx as

where d∗(x,y)=min⁡π∈SkdH(x,π(y))d_{*}(x,y)=\min_{\pi\in S_{k}}d_{H}(x,\pi(y)), dHd_{H} is the Hamming distance and π(y)\pi(y) denotes the application of π\pi to each component of yy.

where A(ε,δ)A(\varepsilon,\delta) is continuous at (ε,δ)=(0,0)(\varepsilon,\delta)=(0,0) and

Note that for a=0a=0, the above bound for bb is Θ(ln⁡k/k)\Theta(\ln k/k) times the bound given by the KS threshold. Further, this improves on the KS threshold for k≥5k\geq 5. However, for b=0b=0, the above bound gives a>2ka>2k, which is worse than the KS threshold a>ka>k. For the same reasons, it is loose for k=2k=2 and a=0a=0. In the next section, we improve the bound to capture the right behaviour at the extremal regimes.

Let σ^δ(G)\hat{\sigma}_{\delta}(G) be uniformly drawn in Tδ(G)T_{\delta}(G). We have

We can now take δ>0\delta>0 such that for a strictly positive ε\varepsilon, (25) implies that (32) vanishes. ∎

has a single minimum at a22k(a+(k−1)b)\frac{a^{2}}{2k(a+(k-1)b)}. Plugging in this value for cc gives

has a single minimum at (k−1)ab2k(a+(k−1)b)\frac{(k-1)ab}{2k(a+(k-1)b)}, thus

Combining (35) and (37), the result follows from algebraic manipulations. ∎

Let NN be a positive integer and t,s>0t,s>0. Then,

and the second statement follows from the fact that the Binomial distribution is unimodal. ∎

2.2 Size of the typical set

and τ=τd\tau=\tau_{d} is the unique solution in (0,1)(0,1) of

or equivalently τ=∑j=1+∞jj−1j!(de−d)j\tau=\sum_{j=1}^{+\infty}\frac{j^{j-1}}{j!}(de^{-d})^{j}.

As a first step to proving this theorem, we prove one half of the inequality.

Construct a clustering of GG, σ′\sigma^{\prime}, as follows. Start with σ′=σ\sigma^{\prime}=\sigma. Then, go through the vertices of GG in a random order, and for each vv with no neighbor v′v^{\prime} such that σv′=σv′′\sigma^{\prime}_{v}=\sigma^{\prime}_{v^{\prime}}, change σv′\sigma^{\prime}_{v} to a random element of [k]\{σv′′:(v,v′)∈E(G)}[k]\backslash\{\sigma^{\prime}_{v^{\prime}}:(v,v^{\prime})\in E(G)\}.

Initially, σ′=σ\sigma^{\prime}=\sigma, so the probability distributions of (G,σ)(G,\sigma) and (G,σ′)(G,\sigma^{\prime}) are identical. For a given ordering of the vertices, if these probability distributions are identical immediately before σv′\sigma^{\prime}_{v} is changed, then for given values of GG and σ′\σv′\sigma^{\prime}\backslash\sigma^{\prime}_{v}, it is equally likely that σv′\sigma^{\prime}_{v} had each value that it may be assigned in this step. So, the probability distribution is unchanged. Therefore, the probability distribution of (G,σ′)(G,\sigma^{\prime}) is identical to the probability distribution of (G,σ)(G,\sigma) at any point in this algorithm. In particular, σ′∈Tδ(G)\sigma^{\prime}\in T_{\delta}(G) with probability 1−o(1)1-o(1).

Now, for each v∈Gv\in G, let zvz_{v} be 11 if there is more than one option for σv′\sigma^{\prime}_{v} when it is time for the algorithm to assign it and otherwise. A vertex has no neighbors in its own community with probability e−a/k+o(1)e^{-a/k}+o(1), and no neighbors in any given other community with probability e−b/k+o(1)e^{-b/k}+o(1). So, a vertex has no neighbors in its own community and at least one other community with probability e−a/k(1−(1−e−b/k)k−1)+o(1)e^{-a/k}(1-(1-e^{-b/k})^{k-1})+o(1). Thus, for each vv,

Also, given two different vertices, they both have no neighbors in their own community and at least one other with probability e−2a/k(1−(1−e−b/k)k−1)2+o(1)e^{-2a/k}(1-(1-e^{-b/k})^{k-1})^{2}+o(1). Given any vv and v′v^{\prime}, assume without loss of generality that vv is before v′v^{\prime} in the random ordering. With probability 1−o(1)1-o(1), v′v^{\prime} will not be in the last n\sqrt{n} vertices, and at the time v′v^{\prime} comes up in the ordering, e−a/k(1−(1−e−b/k)k−1)+o(1)e^{-a/k}(1-(1-e^{-b/k})^{k-1})+o(1) of the remaining vertices will have no neighbors claimed to be in their communities and at least one other. So, symmetry between the vertices implies that the correlation between zvz_{v} and zv′z_{v^{\prime}} is o(1)o(1). That means that with probability 1−o(1)1-o(1), we have

We already know that with probability 1−o(1)1-o(1) the probability in question is 1−o(1)1-o(1), so the conclusion holds. ∎

To prove the rest of this theorem, we need some topological properties of the SBM graph, analog to the Erdős-Rényi case [ER60].

where β=1−τ/d\beta=1-\tau/d and τ\tau is defined in (46).

Assume that TT and RR take typical values as above. We now build a typical vertex labelling on these trees:

Pick an arbitrary node in each isolated tree, denote these by {v1,…,vT}\{v_{1},\dots,v_{T}\}, and denote the set of edges contained in these trees by {E1,…,EM}\{E_{1},\dots,E_{M}\};

Pick the root node for each planted tree that is in the giant, denote these by {w1,…,wk}\{w_{1},\dots,w_{k}\}, where kk is the number of planted trees (this number is not relevant in the following computations) and denote by {EM+1,…,EM+F}\{E_{M+1},\dots,E_{M+F}\} the number of edges contained in those planted trees;

Assign the labels U1T:=(Uv1,…,UvT)U_{1}^{T}:=(U_{v_{1}},\dots,U_{v_{T}}) uniformly at random in [k][k], and set X^w1=σw1,…,X^wk=σwk\hat{X}_{w_{1}}=\sigma_{w_{1}},\dots,\hat{X}_{w_{k}}=\sigma_{w_{k}}, i.e., assign the latter labels to their true community assignments. Then broadcast each of these labels in their corresponding trees by forwarding the labels on each edge with an independent kk-ary symmetric channel of flip probability ba+(k−1)b\frac{b}{a+(k-1)b}. This means that the variables Z1,…,ZM+FZ_{1},\dots,Z_{M+F} are drawn i.i.d. from the distribution

Assign any other label (that is not contained in the trees) to their true community assignments. Define R:=M+FR:=M+F, Z1R:=(Z1,…,ZR)Z_{1}^{R}:=(Z_{1},\dots,Z_{R}), and denote by X^(U1T,Z1R)\hat{X}(U_{1}^{T},Z_{1}^{R}) the previously defined assignment.

as T,RT,R diverge with nn. Define now the set of realizations of Z1RZ_{1}^{R} that have a typical likelihood by

where HH is the entropy with the logarithm in base kk. For convenience of notation, define also Aε(η)=Bε(η)A_{\varepsilon}(\eta)=\mathcal{B}_{\varepsilon}(\eta). Again, for all ε>0\varepsilon>0

since the left hand side counts a subset of the typical clusterings. We thus obtain from (50) and (55) that with high probability on GG,

which proves the half of the claim not covered by lemma 17. ∎

Thus, by Chebyshev’s inequality, for any ε>0\varepsilon>0,

and since each tree contains j−1j-1 edges,

where TjT_{j} is the number of isolated jj-trees. Hence,

Finally, since Var⁡(T)=O(n)\operatorname{Var}(T)=O(n), the result for TT follows from Chebyshev’s inequality and the fact that (see [R5́9])

For MM, the result follows from similar arguments and the fact that

From Lemma 20, the giant component has with high probability a relative size in [β−ε,β+ε][\beta-\varepsilon,\beta+\varepsilon]. The probability that a node is connected to a giant component by a single edge is thus given by

Now, let vv and v′v^{\prime} be random vertices. Conditioning on vv being connected to the giant component by a single edge, the giant component still has relative size in [β−ε,β+ε][\beta-\varepsilon,\beta+\varepsilon] for any ε\varepsilon with probability 1−o(1)1-o(1), so the probability that v′v^{\prime} is connected to the giant component by a single edge is also βde−βd+o(1)\beta de^{-\beta d}+o(1). That means that the expected value of the square of the number of nodes that are connected to the giant component by a single edge is

hence the variance in the number of such nodes is o(n2)o(n^{2}) and the lemma follows. ∎

2.3 Sampling probability estimates

Let t=max⁡(k(ψ−ε)n,2(e−a/k(1−(1−e−b/k)k−1)−ϵ)n)t=\max(k^{(\psi-\varepsilon)n},2^{(e^{-a/k}(1-(1-e^{-b/k})^{k-1})-\epsilon)n}). We have

Using the bound t≥2(e−a/k(1−(1−e−b/k)k−1)−ϵ)nt\geq 2^{(e^{-a/k}(1-(1-e^{-b/k})^{k-1})-\epsilon)n} and the bound on A(ε,δ)A(\varepsilon,\delta) from Lemma 15, the exponent in (66) can be made to vanish if

Alternately, plugging in the values of ψ\psi from Theorem 6 and A(ε,δ)A(\varepsilon,\delta) from Lemma 15, the exponent in (66) is vanishing if

Since τ\tau is the solution in (0,1)(0,1) of τe−τ=de−d\tau e^{-\tau}=de^{-d}, we have

Algebraic manipulations lead to the bound in the theorem. ∎

Note that dropping the term in (70) above and ignoring the contribution of (67) leads to the weaker bound

which implies Corollary 3 part 2 since τd(1−τ2)\frac{\tau}{d}\left(1-\frac{\tau}{2}\right) tends to 1/21/2 as τ\tau tends to 1 when bb tends to 0 and dd tends to a/ka/k. Part 1 follows from algebraic manipulations. ∎

3 Learning the model

The proof is analog to the case k=2k=2 from [MNS15].

Let GG be drawn from SBM(n,p,W)SBM(n,p,W), m>0m>0, and v0,v1,...,vmv_{0},v_{1},...,v_{m} be vertices such that vi≠vjv_{i}\neq v_{j} whenever ∣i−j∣<max⁡(m,2)|i-j|<\max(m,2). For any fixed values of σv0\sigma_{v_{0}} and σvm\sigma_{v_{m}}, the probability that there is an edge between viv_{i} and vi+1v_{i+1} for all 1≤i<m1\leq i<m is eσv0⋅P−1(PW)meσvme_{\sigma_{v_{0}}}\cdot P^{-1}(PW)^{m}e_{\sigma_{v_{m}}}.

We proceed by induction on mm. If m=1m=1, then the probability that there is an edge between v0v_{0} and v1v_{1} is Wσv0,σv1=eσv0⋅P−1PWeσvmW_{\sigma_{v_{0}},\sigma_{v_{1}}}=e_{\sigma_{v_{0}}}\cdot P^{-1}PWe_{\sigma_{v_{m}}}, as desired. Now, assume that the lemma holds for m=m0m=m_{0} and consider the case where m=m0+1m=m_{0}+1. The probability that there is an edge between viv_{i} and vi+1v_{i+1} for all 1≤i<m1\leq i<m is

There are n(n−1)...(n−m+1)=Θ(nm)n(n-1)...(n-m+1)=\Theta(n^{m}) possible serieses of mm distinct vertices in the graph, and each cycle has 2m2m possible choices of a starting vertex and a direction. The starting vertex is in community ii with probability pip_{i}. So, the expected number of length mm cycles is asymptotic to

The variance in the number of cycles is asymptotic to the mean, so the expected difference between the actual number of cycles of a given size and the expected number is proportional to the square root of the expected number. In the symmetric SBM where two vertices in the same community are connected with probability a/na/n and two vertices in different communities are connected with probability b/nb/n, this means that with high probability, the number of cycles of length mm is

Now, assume that (a−bk)2>a+(k−1)bk\left(\frac{a-b}{k}\right)^{2}>\frac{a+(k-1)b}{k}. Clearly a+(k−1)bk\frac{a+(k-1)b}{k} can be computed up to an error of O(1/n)O(1/\sqrt{n}) by counting the edges in the graph, so given the number of cycles of length mm for all m≤M=ω(1)m\leq M=\omega(1), one can determine (a−b)/k(a-b)/k and kk with error asymptotic to , which provides enough information to determine aa and bb with error asymptotic to .

References