Abstract 1 Introduction 2 Results 3 Ingredients of the proof : Distances to the planted partition 𝓟 4 Ingredients of the proof: Concentration 5 Ingredients of the proof: Optimisation 6 Discussion and the case of optimising only over balanced partitions References Appendix A A guide to the proofs given in the appendix Appendix B Failure of the Markov Chain Monte Carlo algorithm Appendix C Optimisation lemmas for modularity at a given distance Appendix D Proof of Theorem 2.2: SBM has OGP

The Stochastic Block Model Has the Overlap Graph Property for Modularity

Shankar Bhamidi ORCID Department of Statistics and Operations Research, University of North Carolina, Chapel Hill, NC, USA    David Gamarnik ORCID MIT Sloan School of Management, Cambridge, MA, USA    Remco van der Hofstad ORCID Department of Mathematics and Computer Science, Eindhoven University of Technology, The Netherlands    Nelly Litvak ORCID Department of Mathematics and Computer Science, Eindhoven University of Technology, The Netherlands    Paweł Prałat ORCID Department of Mathematics, Toronto Metropolitan University, Canada    Fiona Skerman222Corresponding author. ORCID Department of Mathematics, Uppsala University, Sweden    Yasmin Tousinejad ORCID Department of Mathematics, Uppsala University, Sweden
Abstract

The overlap gap property (OGP) is a statement about the geometry of near-optimal solutions. Exhibiting OGP implies failure of a class of local algorithms; and has been observed to coincide with conjectured algorithmic limits in problems with statistical computational gap.

We consider the Stochastic Block Model (SBM), where the graph has a planted partition with k equal-size blocks which form the “communities”, and where, for parameters p>q, vertices within the same community connect with probability p, while vertices in different communities connect with probability q, independently across pairs of vertices. Modularity–based clustering algorithms have become ubiquitous in applications. This article studies theoretical limits of local algorithms based on the modularity score on the SBM.

We establish that modularity exhibits OGP on the SBM. This rules out a class of local algorithms based on modularity for recovery in the SBM, and shows slow mixing time for a related Markov Chain. Theoretically this is one of the few instances where OGP has been established for a “planted” model, as most such analyses to date consider the “null” model.

As part of our analysis, we extend a result by Bickel and Chen 2009, who established that with high probability, the modularity optimal partition of SBM is o(n) local moves away from the planted partition, where n is the graph size. We show that, with high probability, any partition with modularity score sufficiently near the optimal value is close to the planted partition.

Keywords and phrases:
community detection, average-case complexity, overlap gap property, modularity, Louvain, stochastic block model
Category:
Track A: Algorithms, Complexity and Games
Funding:
Shankar Bhamidi: Bhamidi was partially supported by NSF DMS-2113662, DMS-2413928, DMS-2434559 and NSF RTG grant DMS-2134107.
David Gamarnik: Gamarnik partially supported by NSF Grant CISE 2233897.
Remco van der Hofstad: Partially supported by the Netherlands Organisation for Scientific Research (NWO) through the Gravitation NETWORKS grant 024.002.003.
Nelly Litvak: Partially supported by the Netherlands Organisation for Scientific Research (NWO) through the Gravitation NETWORKS grant 024.002.003.
Paweł Prałat: Partially supported by NSERC Discovery Grant.
Fiona Skerman: Partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation.
Yasmin Tousinejad: Partially supported by the Wallenberg AI, Autonomous Systems and Software Program (WASP) funded by the Knut and Alice Wallenberg Foundation.
Copyright and License:
[Uncaptioned image] © Shankar Bhamidi, David Gamarnik, Remco van der Hofstad, Nelly Litvak, Paweł Prałat, Fiona Skerman, and Yasmin Tousinejad; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Random network models
Related Version:
Full Version: https://arxiv.org/abs/2605.10911 [3]
Acknowledgements:
We thank Subhabrata Sen and Ekaterina Toropova for useful discussions.
Funding:
This material is based upon work supported by the National Science Foundation under Grant No. DMS-1928930, while Bhamidi, Gamarnik, van der Hofstad, Litvak, Prałat and Skerman were in residence at the Simons Laufer Mathematical Sciences Institute (formerly MSRI) in Berkeley, California, during the Spring 2025 semester.
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

Modularity maximisation [28, 29] is one of the main methods used for finding clusters and communities in networks. Modularity maximisation is NP-hard [8]; in practice, modularity has a complex landscape, and there are many high scoring solutions [18]. On the other hand, one major advantage of modularity is that its local updates are easy to compute. Naturally, local updates form the initial phase in the go-to algorithms for modularity maximisation: the Louvain algorithm [6] and its improved version, the Leiden algorithm [34]. However, as already observed in [6], algorithms based on local updates get trapped in a local maximum. To avoid this, both Louvain and Leiden include an additional non-local phase. An alternative approach, proposed by Wang and Kolter [35] via the Locale algorithm, escapes local maxima by replacing the local update with low-cardinality embedding.

Given the abundance of applications of modularity maximisation and Louvain and Leiden algorithms, theoretical understanding of modularity–based algorithms is surprisingly scarce. Cohen-Addad et al. [10] proved that in the Stochastic Block Model (SBM) with sufficient signal and two equal-sized blocks, a local algorithm, very similar to the local phase of Louvain, initiated on a random bisection, recovers the correct partition with high probability. See Section 6 for further discussion including how this relates to our result.

The question remains whether local updates lead to a global optimum in this random model with more than two communities or different initialisation. In this work, we answer this question negatively. Specifically, we establish that in SBM with k3 blocks, modularity exhibits the overlap gap property (OGP). The OGP is a statement of the geometry of near-optimal solutions and is considered a signature of algorithmic hardness – see Definition 2.1. Indeed, for many problems known to exhibit a computational-statistical gap, the threshold for OGP coincides with the conjectured algorithmic threshold [15, 16]. The idea has origins in statistical physics, and can be used to prove failure of greedy and Markov Chain Monte Carlo algorithms in average case problems. We show OGP in a planted random model as in [17, 14], though the theory is usually applied to optimisation problems in null models [15].

The practical implication of this result is that in networks with more than two communities, the local updates of Louvain or Leiden can get stuck in a local maximum even for a random graph model with clear communities. The same holds for other algorithms based on local updates. For example, Gösgens et al. [19] offer a new interpretation of modularity as an angular distance in a high-dimensional hypersphere, thus establishing equivalence of modularity maximisation and nearest-neighbour search. Then, OGP implies that greedy algorithms for nearest-neighbour search may return a local rather than the global maximum. Furthermore, using the OGP we prove that a natural generalisation of the greedy algorithm, namely the Markov Chain Monte Carlo algorithm, mixes exponentially slowly, and, in particular, takes an exponential time to reach partitions close to the planted partition with high probability.

While there are few theoretical results for modularity–based algorithms, there are positive results for recovering ground truth partitions using local-updates based on modularity in the SBM. As mentioned earlier, Cohen-Addad et al. [10] showed that for the SBM with sufficient signal and two equal-sized blocks, a local algorithm recovers the communities with high probability. This was further extended to general k by giving an algorithm with parallel local updates based on the modularity function [11]. For more details and a discussion of how these relate to our OGP results, see Section 6.

More is known about the behaviour of modularity on random models; we briefly review this for context – see also the survey paper [27]. Considering first random graph models without planted structure, the main results focus on the setting of growing average degree d¯ for the random d-regular graph [23, 24, 30] and the Erdős-Rényi random graph [25, 31], which are likely to have modularity of the order 1/d¯. For the Preferential Attachment (PA) model [2], very recently, this same behaviour was established up to log factors [32]. For models with planted structure, break-through results were given for the SBM by Bickel and Chen [4] showing that the modularity-optimal partition is close to the planted partition. These were extended to the degree-corrected SBM in [36]. See Theorem 2.4 for details. Finally, the modularity in the Artificial Benchmark for Community Detection (ABCD) model, a model similar to the well-known LFR model [21] used by practitioners, was studied in [20].

2 Results

2.1 Definitions

Let G=(V,E) be a graph with m=|E|1 edges and n=|V|1 nodes. For a partition 𝒜 of the vertices of G, the modularity score of 𝒜 on G is defined as

q𝒜(G)=12mA𝒜u,vA(𝟏{uvE}dudv2m)=A𝒜e(A)mA𝒜(vol(A)vol(V))2, (1)

where du denotes the degree of node u, e(A) denotes the number of edges within AV and vol(A)=vAdv denotes the (degree) volume of the set A. The modularity of a graph G is defined as q(G)=max𝒜q𝒜(G), where the maximum is taken over all partitions 𝒜 of the nodes of G. It will be useful to express modularity as the difference of the edge-contribution or coverage q𝒜E and the degree-tax q𝒜D of the partition 𝒜, defined as

q𝒜E(G)=A𝒜e(A)/mandq𝒜D(G)=A𝒜vol(A)2/vol(G)2. (2)

The modularity score, introduced by Newman and Girvan in [29], is a quality function of many popular community detection algorithms such as Louvain [6] or Leiden [34]. Indeed, the modularity score favours partitions of the set of nodes of a graph G in which a large proportion of the edges fall entirely within the partition, but benchmarks it against the expected number of edges one would see in the same partition in a corresponding Chung-Lu random graph model [9] with expected degree sequence taken to be identical to the degree sequence of the observed graph G.

Fix k2 denoting the number of communities. We now formally define the stochastic block model (SBM) which will be the focus of this paper. This model is also called the planted partition model. The set of nodes [n]={1,,n} is partitioned into k communities P1,,Pk of as equal sizes as possible; that is, n/k|Pi|n/k for all i[k]. For simplicity, often we will assume that n is divisible by k, but our main result is stated and holds without this restriction. We will refer to this planted partition (Pi)i=1k as 𝒫. The probability of observing an edge between two nodes of the same community is equal to p; otherwise, it is equal to q. We will use the notation G𝒢(n,k,p,q) whenever a random graph G is generated with this probability distribution.

Results in the paper are in the large network limit n. In particular, we will assume that both p=p(n) and q=q(n) are functions of n, and n is large enough for certain statements to be true. On the other hand, the parameter k2 is an arbitrary but fixed integer. We emphasise that the notations o() and O() refer to functions of n, not necessarily positive, whose growth vanishes, respectively, is bounded.

Refer to caption
Refer to caption
Figure 1: The figure shows the planted partition 𝒫 (left) and a “decoy” partition 𝒟 (right) for the SBM which has a planted partition of four equal-size parts. The partitions are denoted by showing the adjacency matrix of G and colouring cell u,v with colour i if nodes u,v are placed together in part / community i in the partition. A “decoy” partition 𝒟 is the one in which two of the planted blocks are clustered together in the same part, and each of the remaining planted blocks form their own part.

We will establish that modularity exhibits OGP in the SBM. To prove this, we will obtain a more detailed result that characterises the maximum modularity of any partition with given distance to the planted partition. We define the distance as the classification error – see, for example, (4.25) in [1]; in case of two communities, this distance is equal to the “imbalance” in [10]. Define the distance between a k-part partition 𝒜=(Ai)i=1k and the planted partition 𝒫=(Pi)i=1k in SBM as

d(𝒜,𝒫)=11nmaxσi=1k|Aσ(i)Pi|, (3)

where the maximum is taken over all permutations σ:[k][k] of [k]={1,,k} that govern how parts of 𝒜 are aligned with the ones of 𝒫. Note that this d(𝒜,𝒫) has a natural interpretation: it is the minimum proportion of nodes that need to be re-shuffled to transform the candidate partition 𝒜 into the ground truth or planted partition 𝒫. Indeed, for a given permutation σ, one can keep nodes in Aσ(i)Pi where they are and move other nodes to the appropriate parts.

Now that we have a notion of distance between partitions, we may formally define the overlap gap property (OGP). The definition of the OGP pertains to a particular instance Gn of a distribution over graphs 𝒢n.

Definition 2.1 (Overlap gap property – planted model).

For a graph Gn with planted partition 𝒫, the optimisation problem max𝒜q𝒜(Gn) exhibits OGP with values μ>0 and 0ν1<ν2 if the following holds: For any partition for which q(Gn)q(Gn)μ, it holds that either d(,𝒫)ν1, or that d(,𝒫)ν2. Furthermore, d(,𝒫)ν2 does indeed occur for some partition with q(Gn)q(Gn)μ.

2.2 Modularity exhibits OGP

Theorem 2.2 below states that the modularity score exhibits OGP on the SBM, provided that the number of communities, k, is at least 3:

Theorem 2.2 (Modularity has OGP).

Fix real numbers a>b>0, and integer k3. For any ν(12(k1),1k) and ε>0, there exist μ=μ(ν) and c=c(ε) such that the following holds for n large enough.

Let p=p(n)=ωa/n and q=q(n)=ωb/n be such that ω>c, and let G𝒢(n,k,p,q) with planted partition 𝒫. Then with probability at least 1ε, for every k-part partition 𝒜 with

q𝒜(G)aba+(k1)b(11k2k2)μ, (4)

either d(𝒜,𝒫)12(k1) or d(𝒜,𝒫)ν. Moreover, there are partitions 𝒜 satisfying the latter.

Intuition.

Consider a “decoy” partition 𝒟 in which two of the planted blocks are clustered together in the same part, and each of the remaining planted blocks forms its own part. (There are (k2) such decoy partitions by symmetry.) We call 𝒟 a “decoy” partition since it has a “misleadingly” high modularity score given its distance to the planted partition 𝒫; see Figure 1. (We emphasise that the decoy 𝒟 is an alternate partition of the nodes rather than an alternate random graph model to generate the graph.)

Given the decoy partition 𝒟, the parameters for OGP are set as follows. We set μ=q(G)q𝒟(G)+η for some small η>0. The idea is that partitions with q(G)q(G)μ will include the decoy partition, those very “close to” the decoy, as well as partitions somewhat “close to” the planted (and modularity optimal) partition. Then we set ν2=d(𝒫,𝒟)δ=1/kδ for some small δ>0 so that the decoy partition and those very close to it will fall within the second interval. Lastly, we need to set ν1. Notice that, for small distances from the planted partition, the modularity score of partitions decreases with distance, so we set ν1 to be some distance by which the likely modularity score has dipped below q(G)μ. This explains the intuition behind Theorem 2.2.

As an implication of the OGP we show that a natural algorithm based on Markov Chain Monte Carlo (MCMC) updates takes exponential time to reach any proximity of the ground truth. We state our result informally, and defer the formal statement as well as the proof to Appendix B.

Theorem 2.3 (Informal).

For every ζ>0, there exists a large enough inverse temperature parameter β>0, such that when the chain is initiated at distance at least 1/k from the ground truth, the time to reach a partition close to the ground truth is at least exp(Θ(n)) with high probability.

2.3 Modularity as a predictor of the planted partition

In a breakthrough result of Bickel and Chen [4], it was shown that in the regime of growing degree, the modularity optimal partition of the stochastic block model is within distance o(1) of the planted partition (see also [5]):

Theorem 2.4 ([4, 5]).

Fix real numbers a>b>0, integer k2 and let ω=ω(n) as n. Let p=ωa/n and q=ωb/n, and let G𝒢(n,k,p,q) with the planted partition 𝒫. Then,

d(argmaxq𝒜(G),𝒫)=o(1).

Since modularity-based clustering algorithms remain the most popular, despite known problems such as the resolution limit [13], it is reassuring that the modularity optimal partition is quite close to the “correct” partition in the SBM, a natural simplified model of community structure.

However, we would like to know more. In particular, what about partitions with nearly optimal modularity score? Are these partitions also close to the planted partition? Our Theorem 2.5 (along with some bounds on modularity scores for partitions at higher distances) implies that the answer is “yes”: if the partition has a score within a certain distance of the maximal modularity value, then the partition must be near the planted one; see the full version of the paper [3] for the proof.

Theorem 2.5 (Partitions with near-optimal modularity are close to the planted).

Fix a>b>0 and integer k2. Let p=p(n)=ωa/n and q=q(n)=ωb/n. For any ε>0 and δ<aba+(k1)b2k2, there exists c=c(ε) such that, if ω>c for n large enough, then the following holds with probability at least 1ε provided n is large enough.

Let G𝒢(n,k,p,q) with the planted partition 𝒫. Then, q𝒜(G)>q(G)δ for some k-part partition 𝒜 implies that d(𝒜,𝒫)<δ+ε, where δ=δ(δ)(0,1k(k1)).

2.4 Modularity at distance at most 𝟏/𝒌

The next theorem relates the maximum modularity of a partition to its distance from the planted partition, and is the main ingredient in the proof of Theorem 2.2. For any k2, we approximate the maximum modularity value over all partitions of k2 parts 𝒜 at distance t/k (for some t[0,1]) from the planted partition 𝒫.

Theorem 2.6 (Maximal modularity at distance at most 1/k).

Fix a>b>0. Let p=p(n)=ωa/n and q=q(n)=ωb/n. For any ε>0, there exists c=c(ε) such that if ω>c then the following holds with probability at least 1ε provided n is large enough.

Let G𝒢(n,k,p,q) with the planted partition 𝒫. For any d[0,1k], let

H(d)=max𝒜:|𝒜|k{q𝒜(G):d1nd(𝒜,𝒫)d+1n}.

Then,

|H(d)aba+(k1)bh(d)|ε,whereh(d)=11k2d(1d(k1)).

The random variable H(d) is defined as the maximal modularity over all k-part partitions with the distance from 𝒫 in an interval d±1/n. We keep the margins ±1/n for the technical reason that there might not be any partition at distance exactly d (say, when d=π/4k, since the distance is always a rational number). Theorem 2.6 establishes that H(d) is likely to be well approximated by the deterministic expression aba+(k1)bh(d).

Figure 2: A graph of the function h(d) for k=4 and the relation to the OGP parameters μ,ν1 and ν2 – see the text following Theorem 2.6. The dashed grey lines indicate an ε-region above and below h(d). By Theorem 2.6, any partition 𝒜 at distance d is likely to have modularity at most h(d)+ε. From this, we will be able to conclude that it will be likely that any partition 𝒜 with modularity at least h(0)μ (i.e., above the red line) will be at a distance dν1 or dν2, thus establishing the OGP with these parameters.

Note that function dh(d) decreases on [0,12(k1)] and increases on [12(k1),1k]. As a result,

  • h(0)=11k,

  • h(d) is decreasing on [0,12(k1)] reaching h(12(k1))=11k12(k1),

  • h(d) is increasing on [12(k1),1k] reaching h(1/k)=11k2k2.

One can easily separate h(1/k) from its local minimum h(12(k1)) by introducing a threshold μ in Theorem 2.2, say, μ=h(0)h(ν) with ν(12(k1),1k). In Figure 2, we illustrate h(d) for d[0,1k] and the interplay with the OGP parameters μ,ν1 and ν2.

Below, we will show Theorem 2.2, i.e., that modularity has OGP in the SBM – assuming Theorem 2.6, where we recall that Theorem 2.6 characterises the maximum modularity score over partitions 𝒜 at given distances d[0,1k] from the planted partition 𝒫. We outline the proof of Theorem 2.6 in Sections 35, and give some further details Appendix C. We prove Theorem 2.2 using Theorem 2.6 in Appendix D.

The asymptotic maximal modularity value in 𝒢(n,k,p,q) is known and also known to coincide with the modularity of the planted partition; we state it in Theorem 2.7 below for completeness. The result follows from Theorem 2.4 and was also given in [26] for slightly higher p,q. We note that (5) in Theorem 2.7 is a direct corollary of Theorem 2.6 as a special case when d=0. Also (5) follows, for example, by Lemma 4.1.

Theorem 2.7 (Maximal modularity).

Fix a>b>0 and integer k2. Let p=p(n)=ωa/n and q=q(n)=ωb/n. For any ε>0, there exists c=c(ε) such that, if ω>c for n large enough, then the following holds with probability at least 1ε provided n is large enough. Let G𝒢(n,k,p,q) and denote the planted partition by 𝒫. Then,

|q𝒫(G)aba+(k1)b(11k)|ε2 (5)

and

|q(G)q𝒫(G)|ε2. (6)

As a result,

|q(G)aba+(k1)b(11k)|ε.

Note that, as expected, q(G)aba+(k1)bh(0), where h() is defined in Theorem 2.6.

3 Ingredients of the proof : Distances to the planted partition 𝓟

For now, for simplicity of exposition, we assume that n is divisible by k, as this will be assumed in the first lemma, Lemma 3.1. However, in the proof of Theorem 2.6, we relax this condition and deal with the general case.

To prove our main result, we need to investigate a family of partitions of [n] with a given distance to the planted partition 𝒫=(Pi)i=1k. It will be convenient to represent partitions as k×k matrices that capture the way how these partitions overlap with 𝒫. Let 𝒜=(Ai)i=1k be any partition of [n] into k parts. Then, the signature of 𝒜 (with respect to 𝒫) is defined as the matrix X=X(𝒜)=(xij)1ijk, where

xij=|AiPj|n/k. (7)

Note that for the signature to be well defined, one needs to fix the labelling of both 𝒫 and 𝒜. To compute the distance between 𝒫 and 𝒜, one needs to align these labels as best as possible (see Lemma 3.1 below), but the modularity score clearly does not depend on the way the labels are aligned (see Lemma 4.1 below). Note also that, trivially, xij0 for all i,j[k]. Moreover, since A1Ak=[n], for any j[k],

i[k]xij=1n/ki[k]|AiPj|=|Pj|n/k=1. (8)

Finally, note that the signature of the planted partition 𝒫 is the matrix Y𝒫=(yij)1ijk with yii=1 for all i[k] and yij=0 for all ij.

In our first lemma, we rewrite the distance between any partition 𝒜 and the planted partition 𝒫 in a convenient form, namely, as a function of the signature of 𝒜. The proof is short so we give it below.

Lemma 3.1.

Suppose that n is divisible by k. Let 𝒜 be any partition of [n] with k parts, and let 𝒫 be the planted partition. Let X=X(𝒜)=(xij)1ijk be the signature of 𝒜. Then,

d(𝒜,𝒫)=11kmaxσi=1kxσ(i)i, (9)

where the maximum is taken over all permutations of [k].

Moreover, d(𝒜,𝒫)11/k and this upper bound is sharp, that is, there exists a partition 𝒜 such that d(𝒜,𝒫)=11/k, provided that n is divisible by k2.

Proof of Lemma 3.1..

Equality (9) follows immediately from the definition of the signature in (7) and the definition (3) of the distance between the two partitions. Indeed,

d(𝒜,𝒫)=11nmaxσi=1k|Aσ(i)Pi|=11nmaxσi=1kxσ(i)i(n/k)=11kmaxσi=1kxσ(i)i.

It remains to show that d(𝒜,𝒫)11/k or, equivalently, that maxσi=1kxσ(i)i1.

Consider the sum S=σi=1kxσ(i)i, where the outer sum is taken over all k! permutations of [k]. Clearly, there are k!k terms in S and for each a,b[k], the term xab occurs exactly (k1)! times (i has to be equal to b and there are (k1)! permutations that map b to a). Hence, for each j[k], the sum i=1kxij (which is equal to 1 by (8)) occurs (k1)! times. We conclude that S=k(k1)!=k!. By an averaging argument, there exists a permutation σ^ for which i=1kxσ^(i)i1. Hence, maxσi=1kxσ(i)ii=1kxσ^(i)i1, thus the desired inequality holds.

Assume now that n is not only divisible by k but, in fact, it is divisible by k2. We construct a partition 𝒜 by partitioning each Pj into k equal parts and then picking 1/k fraction of each Pj to form Ai of size n/k. This partition has signature X with xij=1/k for all i,j[k]. We get that maxσi=1kxσ(i)i=i=1k1/k=1, which shows that the upper bound is sharp. This finishes the proof of the lemma.

4 Ingredients of the proof: Concentration

The signature of 𝒜 not only determines the distance between 𝒜 and 𝒫 but, more importantly, it predicts (up to an arbitrarily small error in a sufficiently dense graph G) the modularity score q𝒜(G) of 𝒜 for G𝒢(n,k,p,q) generated by the SBM. Indeed we will prove that the modularity score of 𝒜 is well-approximated by a scaling of g(X), a function only of the signature X of 𝒜 that is defined by

g(X)=i=1k1j<jk(xijxij)2. (10)
Lemma 4.1 (Concentration of modularity).

Fix a>b>0 and integer k2. Let p=p(n)=ωa/n and q=q(n)=ωb/n. For any ε>0, there exists c=c(ε) such that if ω>c for n large enough, then the following holds with probability at least 1ε provided n is large enough.

Let G𝒢(n,k,p,q). For all k-part partitions 𝒜,

|q𝒜(G)ab(a+(k1)b)g(X)k2|<ε,

where X=X(𝒜)=(xij)1i,jk is the signature of 𝒜 and g(X) is defined in (10).

Recall that the planted partition 𝒫 has signature Y𝒫=(yij)1ijk with yii=1 for all i[k] and yij=0 for all ij. Since g(Y𝒫)=k(k1), we get that q𝒫(G) is very close to (11k)aba+(k1)b.

As one might want to use this result for other purposes, we state it (and prove it, of course) without assuming that n is divisible by k. The proof of Lemma 4.1 can be found in the full version of the paper [3], though we describe some intermediate steps below. One of these intermediate steps concerns the modularity score of partitions 𝒜 with given signature X on a deterministic weighted graph. This can be regarded as a mean-field calculation. Indeed, working with the deterministic weighted graph means we may consider, for example, the edge-weight of edges in part Ai between the planted blocks Pj and Pj, which corresponds to the expected number of such edges. After that step, it remains only to make a link between the modularity scores of our random graph and those of the deterministic weighted graph.

5 Ingredients of the proof: Optimisation

We have now established that, up to small errors, we may consider g(X) as our objective function, and have re-written our distance to the planted partition in terms of X. Thus, the new aim is to maximise g(X) given the distance of X to the planted partition Y𝒫.

Lemma 5.1.

Let 0t<1. Define 𝒳k(t) to be the family of matrices X=(xij)1ijk such that

xij0, for all i,j[k],
ixij=1 for all j[k], (11)
ijxij=t, and
ixiimaxσixσ(i)i.

Let g(X) be defined as in (10). Then,

maxX𝒳k(t)g(X)=k(k1)2t(kt(k1))andargmaxX𝒳k(t)g(X)={Xk(ij)(t):ij},

where, for ij, Xk(ij)(t) is the k×k matrix with xij=t, xjj=1t, all other diagonal elements 1 and non-diagonal elements 0 (i.e., xaa=1 for all aj and xab=0 for all ab such that (a,b)(i,j)).

Note that in the optimiser Xk(i,j)(t), the row sums are (1+t,1t,1,,1), corresponding to part sizes (1/k+d,1/kd,1/k,,1/k)n in the partition at distance d<1/k with d=t/k (or, thus, equivalently, t<1).

The following lemma shows that the maximal g(X) for signatures at distance d>1/k (i.e., for t>1) is at most the maximal g(X) for signatures at distance d=1/k. This result is important to several of our proofs as it will allow us to infer that partitions 𝒜 with high modularity scores must be at distance d1/k from the planted partition.

Lemma 5.2.

Consider 𝒳k(t) as defined in (11), and g(X) as defined in (10). Then, for any t>1,

maxX𝒳k(t)g(X)<k(k1)2.

The optimisation problems in Lemmas 5.1 and 5.2 are quadratic maximisation problems. (Note that in general quadratic maximisation problems are NP-hard [33].) We prove both lemmas in Appendix C. Lemma 5.1 is the last ingredient needed to prove Theorem 2.6, which gives the likely optimal modularity score over all partitions at distance d[0,1/k] from the planted partition. (Recall that we will prove our main OGP result, Theorem 2.2, in Appendix D by appealing to Theorem 2.6.) Lemma 5.2 is used to show slow mixing of a natural MCMC in Theorem B.2.

To understand how these lemmas fit in, recall that the distance to the planted partition 𝒫 of a partition 𝒜 with signature X is d(𝒜,𝒫)=11kmaxσixσ(i)i=1kminσijxσ(i)j, by Lemma 3.1 and since jxij=1 for each i, so that xσ(i)i=1j:jixσ(i)j. The condition ijxij=t corresponds to enforcing a distance of t/k from the planted partition, and the argmax tells us the set of partitions that achieve the maximal modularity score at distance t/k. Note that, for t=1, i.e. at distance of d=1/k from the planted partition, Xk(ij)(1) is the signature for the “decoy” partition 𝒟 where two planted blocks Pi and Pj are placed within the same part, and all other planted blocks are placed within their own part – see also Figure 1.

6 Discussion and the case of optimising only over balanced partitions

The literature contains positive results, with algorithms using local updates based on the modularity function to recover communities in the SBM [10, 11]. This paper proves OGP, a signature of algorithmic hardness, for such algorithms.

Of course this does not give rise to a contradiction, since the setups in [10, 11] and ours are subtly different and also OGP has been exhibited for problems known to be easy [22]. However, it leads to interesting open questions, probing which of the differences in the two setups are important. We describe this now in more detail.

As mentioned earlier, for k=2 communities and starting with a random partition into equal-size parts, a local algorithm based on the modularity function was shown to recover the planted communities [10]. The local moves for this algorithm take the form of a swap, which takes pairs of vertices, one from each part, and swaps them if this increases the modularity score. This naturally maintains equal-size parts. For general k, an algorithm with parallel local updates based on the modularity function was shown to recover the ground truth partition [11]. We note that this parallel algorithm has a random balanced start and also a mechanism to maintain the balanced sizes of parts during the algorithm.

For the overlap gap property that we establish, it was important that the “decoy” partition 𝒟, which is an unbalanced partition into k1 parts, has a “surprisingly high” modularity given its distance of 1/k from the ground truth partition 𝒫. Furthermore, at distances 0<d<1/k from 𝒫 modularity, optimal partitions are increasingly unbalanced, with part sizes (1/k+d, 1/kd, 1/k,,1/k); see Lemma 5.1.

Perhaps a crucial difference in the two setups is that the positive results of [10, 11] had balanced partitions, both in the initialisation as well as during the algorithm. We finally show that if we introduced this balanced condition into our optimisation problem then it no longer exhibits OGP. In particular, when considering max𝒜q𝒜 where the maximisation is over balanced k-part partitions instead of all k-part partitions, we see that this no longer exhibits OGP. We should note that this by itself does not imply success of particular greedy algorithms – and hence fast algorithms. More work needs to be done to exhibit one (as done in [10, 11]). In a similar vain, for the problem of sparse regression [17], in the regime where OGP ceases to hold a greedy type algorithm was established to be effective. The construction is not based on OGP. Instead it relies directly on the properties of the model, which is typically the case.

To state this result, we fix the random graph G𝒢(n,k,p,q) under the conditions of Theorem 2.6. It turns out that the maximum modularity of G only over balanced partitions at distance about 0<d<11/k from the planted partition 𝒫 concentrates about some function that now is decreasing in d:

Proposition 6.1.

Let 𝒳t be defined as in (11) with the additional restriction that jxij=1 for all i[k]. Then gbal(t)=maxX𝒳tg(X) is strictly decreasing on 0<t<k1.

Proposition 6.1 implies an analogue of Theorem 2.6, optimising now only over balanced partitions, for 0<d<11/k, now with decreasing h~(d), contrary to h(d).

References

  • [1] K. Avrachenkov and M. Dreveton. Statistical Analysis of Networks. Now Publishers, 2022.
  • [2] A.-L. Barabási and R. Albert. Emergence of scaling in random networks. Science, 286(5439):509–512, 1999.
  • [3] S. Bhamidi, D. Gamarnik, R. van der Hofstad, N. Litvak, P. Prałat, F. Skerman, and Y. Tousinejad. The stochastic block model has the overlap graph property for modularity. arXiv preprint, 2026. arXiv:2605.10911.
  • [4] P. J. Bickel and A. Chen. A nonparametric view of network models and Newman–Girvan and other modularities. Proceedings of the National Academy of Sciences, 106(50), 2009.
  • [5] P. J. Bickel, A. Chen, Y. Zhao, E. Levina, and J. Zhu. Correction to the proof of consistency of community detection. The Annals of Statistics, 2015.
  • [6] V. D. Blondel, J.-L. Guillaume, R. Lambiotte, and E. Lefebvre. Fast unfolding of communities in large networks. Journal of Statistical Mechanics: Theory and Experiment, 2008(10):P10008, 2008.
  • [7] A. Bovier and F. den Hollander. Metastability, volume 351 of Grundlehren der Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences]. Springer, 2015. doi:10.1007/978-3-319-24777-9.
  • [8] U. Brandes, D. Delling, M. Gaertler, R. Gorke, M. Hoefer, Z. Nikoloski, and D. Wagner. On modularity clustering. IEEE Transactions on Knowledge and Data Engineering, 20(2):172–188, 2007. doi:10.1109/TKDE.2007.190689.
  • [9] F. R. K. Chung and L. Lu. Complex graphs and networks. American Mathematical Soc., 2006.
  • [10] V. Cohen-Addad, A. Kosowski, F. Mallmann-Trenn, and D. Saulpic. On the power of Louvain in the stochastic block model. Advances in Neural Information Processing Systems, 33:4055–4066, 2020. URL: https://proceedings.neurips.cc/paper/2020/hash/29a6aa8af3c942a277478a90aa4cae21-Abstract.html.
  • [11] V. Cohen-Addad, F. Mallmann-Trenn, and D. Saulpic. A massively parallel modularity-maximizing algorithm with provable guarantees. In Proceedings of the 2022 ACM Symposium on Principles of Distributed Computing, pages 356–365, 2022. doi:10.1145/3519270.3538449.
  • [12] A. Coja-Oghlan, A. Galanis, L. A. Goldberg, J. B. Ravelomanana, D. Štefankovič, and E. Vigoda. Metastability of the Potts ferromagnet on random regular graphs. Comm. Math. Phys., 401(1):185–225, 2023. doi:10.1007/s00220-023-04644-6.
  • [13] S. Fortunato and M. Barthelemy. Resolution limit in community detection. Proceedings of the national academy of sciences, 104(1):36–41, 2007.
  • [14] D. Gamarnik. The overlap gap property: A topological barrier to optimizing over random structures. Proceedings of the National Academy of Sciences, 118(41):e2108492118, 2021.
  • [15] D. Gamarnik. Turing in the shadows of Nobel and Abel: An algorithmic story behind two recent prizes. Notices of the American Mathematical Society, 72(5):485–493, 2025.
  • [16] D. Gamarnik, C. Moore, and L. Zdeborová. Disordered systems insights on computational hardness. Journal of Statistical Mechanics: Theory and Experiment, 2022(11):114015, 2022. doi:10.48550/arXiv.2210.08312.
  • [17] D. Gamarnik and I. Zadik. Sparse high-dimensional linear regression. Estimating squared error and a phase transition. The Annals of Statistics, 50(2):880–903, 2022.
  • [18] B. Good, Y.-A. De Montjoye, and A. Clauset. Performance of modularity maximization in practical contexts. Physical Review E, 81(4):046106, 2010.
  • [19] M. Gösgens, R. van der Hofstad, and N. Litvak. The hyperspherical geometry of community detection: modularity as a distance. Journal of Machine Learning Research, 24(112):1–36, 2023. URL: https://jmlr.org/papers/v24/22-0744.html.
  • [20] B. Kamiński, B. Pankratz, P. Prałat, and F. Théberge. Modularity of the ABCD random graph model with community structure. Journal of Complex Networks, 10(6):cnac050, 2022. doi:10.1093/comnet/cnac050.
  • [21] A. Lancichinetti, S. Fortunato, and F. Radicchi. Benchmark graphs for testing community detection algorithms. Physical Review E, 78(4):046110, 2008.
  • [22] S. Li and T. Schramm. Some easy optimization problems have the overlap-gap property. In Proceedings of Thirty Eighth Conference on Learning Theory, volume 291 of Proceedings of Machine Learning Research, pages 3582–3622, 2025. URL: https://proceedings.mlr.press/v291/li25b.html.
  • [23] L. Lichev and D. Mitsche. On the modularity of 3-regular random graphs and random graphs with given degree sequences. Random Structures & Algorithms, 61(4):754–802, 2022. doi:10.1002/rsa.21080.
  • [24] C. McDiarmid and F. Skerman. Modularity of regular and treelike graphs. Journal of Complex Networks, 6(4):596–619, 2018. doi:10.1093/comnet/cnx046.
  • [25] C. McDiarmid and F. Skerman. Modularity of Erdős-Rényi random graphs. Random Structures & Algorithms, 57(1):211–243, 2020. doi:10.1002/rsa.20910.
  • [26] C. McDiarmid and F. Skerman. Modularity and partially observed graphs. arXiv preprint, 2021. doi:10.48550/arXiv.2112.13190.
  • [27] C. McDiarmid and F. Skerman. Modularity and random graphs. arXiv preprint, 2025. doi:10.48550/arXiv.2509.22066.
  • [28] M. E. J. Newman. Modularity and community structure in networks. Proceedings of the National Academy of Sciences, 103(23):8577–8582, 2006.
  • [29] M. E. J. Newman and M. Girvan. Finding and evaluating community structure in networks. Physical Review E, 69(2):026113, 2004. doi:10.1103/physreve.69.026113.
  • [30] L. O. Prokhorenkova, A. Raigorodskii, and P. Pralat. Modularity of complex networks models. Internet Mathematics, 2017.
  • [31] K. Rybarczyk and M. Sulkowska. New bounds on the modularity of G(n,p). arXiv preprint, 2025. arXiv:2504.16254.
  • [32] K. Rybarczyk and M. Sulkowska. Modularity of Preferential Attachment Graphs. In 43rd International Symposium on Theoretical Aspects of Computer Science (STACS 2026), pages 76:1–76:19, 2026. doi:10.4230/LIPIcs.STACS.2026.76.
  • [33] S. Sahni. Computationally related problems. SIAM Journal on Computing, 3(4):262–279, 1974. doi:10.1137/0203021.
  • [34] V. A. Traag, L. Waltman, and N. J. Van Eck. From Louvain to Leiden: guaranteeing well-connected communities. Scientific Reports, 9(1):1–12, 2019.
  • [35] P.-W. Wang and J.Z. Kolter. Community detection using fast low-cardinality semidefinite programming. Advances in Neural Information Processing Systems, 33:3374–3385, 2020. doi:10.48550/arXiv.2012.02676.
  • [36] Y. Zhao, E. Levina, and J. Zhu. Consistency of community detection in networks under degree-corrected stochastic block models. The Annals of Statistics, 40(4):2266, 2012. doi:10.48550/arXiv.1110.3854.

Appendix A A guide to the proofs given in the appendix

A.1 Main results: OGP for SBM and slow-mixing

The main results in the paper are that (a) for three or more communities, the stochastic block model (SBM) exhibits the overlap gap property (OGP); and (b) failure of a natural MCMC algorithm.

For (a), that SBM exhibits OGP, the statement is Theorem 2.2, and is proven in Appendix D. Proving Theorem 2.2 requires understanding of the maximum modularity of partitions within distance d1/k of the planted partition (Theorem 2.6). Indeed, proving Theorem 2.6 is the main work of the paper, and we outline the steps in Appendix A.2.

For (b), the failure of a natural Markov Chain Monte Carlo (MCMC) algorithm, the statement is Theorem B.2 (an informal version, Theorem 2.3, appeared in the body of the paper). This algorithm is described in Appendix B, and we show in Proposition B.1 that it will likely output a partition within distance o(1) of the planted partition 𝒫. However, the main result is a negative one: Theorem B.2 shows that the time taken is exponentially large in n. In Appendix B, we state and prove both Theorem B.2 and Proposition B.1, assuming the OGP result stated in Theorem 2.2 and a bound on the maximum modularity of partitions at distance d>1/k of the planted partition (Lemma 5.2).

A.2 Putting it all together: Proving Theorem 2.6 (which proves Theorem 2.2)

We outline the proof of Theorem 2.6; in terms of the three ingredients discussed in the main body of the paper: distances to the planted partition (Section 3), concentration (Section 4) and optimisation (Section 5).

An important definition was that of the signature X of a partition 𝒜; see (7). The signature of 𝒜 determines the distance between 𝒜 and 𝒫. This was established in Section 3, with all proofs contained within that section. The second and third ingredients, namely, concentration and optimisation, are more involved. The optimisation results are included in Appendix C, for the concentration results see the full version of the paper [3].

A.3 Ingredient: Concentration

We just saw that the distance of partition 𝒜 to the planted partition is determined by the signature of X. Moreover, the signature (up to a small error) defines the modularity score q𝒜(G) of 𝒜 for G𝒢(n,k,p,q) generated by the SBM. This is established by the concentration results in Section 4 which show that for 𝒜 with signature X, the modularity score q𝒜(G) is very close to aba+(k1)b1k2g(X). See (10) for a definition of g(X). The proofs for the concentration results may be found in the full version of the paper [3].

A.4 Ingredient: Optimisation

We are interested in the maximum modularity at a given distance from the planted partition, and the concentration results tell us, loosely, that the modularity score q𝒜(G) is quite close to aba+(k1)b1k2g(X), where X is the signature of 𝒜. Hence, the remaining challenge is to understand the maximal value of g(X) over signatures X of partitions at a given distance to the planted partition 𝒫.

We recall the setup for our optimisation problem. We have defined 𝒳k(t) to be the family of matrices X=(xij)1ijk such that (11) holds. Recall from (10) that we have defined g(X) to be g(X)=i=1k1j<jk(xijxij)2.

The two main optimisation results are to (a) understand maxX𝒳k(t)g(X) for t[0,1] (corresponding to d1/k); and (b) upper bound maxX𝒳k(t)g(X) for t>1 (corresponding to d>1/k). For part (a), the result is stated in Lemma 5.1, and the proof is in Appendix C.1. For part (b), the result is stated in Lemma 5.2, and the proof is in Appendix C.2.

A.5 Auxiliary result: Theorem 2.5

A result of Bickel and Chen [4] states that the modularity-optimal partition is likely to be within small distance of the planted partition. We extend this to say that partitions with modularity score very close to optimal are within a small distance of the planted partition. See Theorem 2.5 for details, and the full version of the paper [3] for proofs.

A.6 Outline

We briefly outline the following sections. Appendix B proves the failure of MCMC algorithms, and Appendix C proves the optimisation results. After these sections, we prove our main result, that modularity in SBM has OGP, in Appendix D. See the full version of the paper [3] for the proofs of the concentration result Lemma 4.1, the auxiliary result Theorem 2.5, and the proof Proposition 6.1 which concerns the setting in which we restrict to optimising only over balanced partitions.

Appendix B Failure of the Markov Chain Monte Carlo algorithm

Throughout this section we consider k-partitions with k fixed. We denote q𝒜=q𝒜(G), q=q(G) for brevity. The OGP immediately implies the failure of a natural Greedy algorithm for finding the planted partition 𝒫 when started from the decoy partition 𝒟. More specifically, Greedy is an algorithm resulting in a sequence of partitions 𝒜t built as follows: We initialise the Greedy algorithm in the decoy partition, i.e., 𝒜0=𝒟. Given 𝒜t1, the partition 𝒜t is obtained by changing the membership of at most one node u[n] such that the resulting modularity strictly increases. That is, 𝒜t is any partition satisfying d(𝒜t,𝒜t1)=1/n and q𝒜t(G)>q𝒜t1(G). If no such node u exists, then the algorithm stops and outputs the partition obtained in the final step. By the OGP, the Greedy algorithm, initiated at the decoy partition 𝒟, terminates at this partition with distance at least 1/k from the ground truth.

A natural generalisation of the Greedy algorithm, which is guaranteed (as we will show) to output a partition approximately matching the planted partition 𝒫, is the well-known Markov Chain Monte Carlo (MCMC) algorithm which we now describe. Our main result in this section is the proof of slow mixing of this MCMC. In particular, we will show that the time it takes for the algorithm to approximately produce an planted partition is exponentially large in n.

We begin by describing the MCMC algorithm. A parameter usually called the inverse temperature β is fixed. The algorithm proceeds as a Markov chain moving according to the following rules. Given any partition 𝒜, consider any partition 𝒜 with d(𝒜,𝒜)=1/n. Then the algorithm moves from 𝒜 to 𝒜 with probability proportional to exp(βnq𝒜), namely with probability

(𝒜𝒜)exp(βnq𝒜)exp(βnq),

where here the sum is over all partitions with d(𝒜,)=1/n. (Note that we choose this parametrisation so that the stationary distribution is informative.) It is known that the unique stationary distribution of this chain is the so-called Gibbs distribution given by

Gibbs(𝒜)=exp(βnq𝒜)Z,

where Z=exp(βnq) is the normalising constant, which is also called the partition function, and now the sum is over all partitions .

We first show that this algorithm is sound, in the sense that for large enough β it produces partitions that are close to the ground truth 𝒫.

Proposition B.1.

For every ε>0,ζ>0, there exists large enough β>0 such that

𝒜:d(𝒜,𝒫)ζGibbs(𝒜)1ε.

In words, the probability mass of partitions with distance at most ζ from the planted partition constitutes at least a 1ε fraction of the total probability mass. Thus, if the algorithm were to run until stationarity, then a partition sampled according to the Gibbs distribution is likely to be at most ζ close to the ground truth, modulo an at most ε likelihood event.

Proof of Proposition B.1.

Given any ζ>0 let (ζ)={𝒜:d(𝒜,𝒫)ζ}. Fix ε,ζ>0. By Theorem 2.5, we can find δ>0 small enough so that, with probability at least 1ε/2, the event occurs that every 𝒜 satisfying q𝒜qδ satisfies 𝒜(ζ). On this event,

𝒜(ζ)exp(βnq𝒜) knexp(βn(qδ)).

Fix β large enough so that logkβδ1 (any strictly negative constant will do). Then, this sum is at most exp(n)exp(βnq), so that

𝒜(ζ)Gibbs(𝒜) exp(n)exp(βnq)Z
exp(n)exp(βnq)exp(βnq)
=exp(n)ε/2,

for large enough n. Combining this event with the complement event, which occurs with probability at most ε/2, we complete the proof.

Our main result, described next, shows that unfortunately the time to stationarity is exponentially large in n when the chain is initiated at a large enough distance from the partition, appropriately defined. Worse than that, the time to reach even one partition close to the ground truth is exponentially large in n, again when the chain is initiated at a large distance from the ground truth. This means that the set of such starting points acts as a metastable set. See [7] for a discussion on metastability, and [12] for an example of metastability in random regular graphs.

In preparation for the proof of this claim, we recap some of the properties implied by the OGP and an auxiliary lemma: there exist 0<ν1<ν2<1 and c1,c2>0 such that the following holds. Let

close ={𝒜:d(𝒫,𝒜)ν1},
far ={𝒜:d(𝒫,𝒜)ν2},
btw ={𝒜:d(𝒫,𝒜)(ν1,ν2)}.

Then, by Theorem 2.2 and Lemma 5.2 with probability at least 1ε,

argmaxq𝒜close, (12)
max𝒜:𝒜farq𝒜qc1, (13)
max𝒜:𝒜btwq𝒜qc1c2. (14)

We now state our lower bound result.

Theorem B.2.

Consider the MCMC initiated at the Gibbs distribution conditioned on being in far. Namely, suppose

(𝒜0=𝒜)=Gibbs(𝒜)farGibbs(),

for all 𝒜far, and (𝒜0=𝒜)=0 otherwise. Let τ=min{t:𝒜tclose}. There exist c3,c4>0 such that with probability at least 1ε (with respect to the randomness of the graph)

(τexp(c3n))1exp(c4n),

where the probability is with respect to the random choices of the MCMC.

Proof.

We assume that the events (12)-(14) hold, which is the case with probability at least 1ε. We note that the events 𝒜0far,𝒜τclose imply the existence of s<τ such that 𝒜sbtw. For every positive integer t,

(𝒜tbtw|𝒜0far) =(𝒜tbtw,𝒜0far)(𝒜0far)
(𝒜tbtw)(𝒜0far).

We have

(𝒜tbtw)knexp(βn(qc1c2)),
(𝒜tfar)exp(βn(qc1)).

Thus the ratio is at most knexp(βnc2). Assuming β is large enough so that logkβc21 (again any negative constant suffices), this ratio is at most exp(n). By the union bound, we obtain that (τexp(n/2))en/2en=en/2, completing the proof.

Appendix C Optimisation lemmas for modularity at a given distance

In this section we prove that the function g(X) has the required behaviour. Recall that by Theorem 2.6 with probability close to one, the modularity of any partition 𝒜 with signature X can be well approximated by aba+(k1)b1k2g(X).

In particular, we are interested in the maximum modularity score for partitions at a given distance d; and this we can control by understanding the maximum of g(X) for signatures X at distance d; or, equivalently, the maximum of 1k2g(X), which we call h~(d). (See also the discussion after Theorem 2.6.) This will correspond to the maximisation problem h~(d)=1k2maxX𝒳k(dk)g(X) for the k-block SBM, and re-scaled distance t=dk.

These results naturally split into two. For d<1/k, we solve this optimisation in Lemma 5.1, while, for d>1/k, we show in Lemma 5.2 that h(d)<h(1/k), i.e., that the value of g is bounded above by its maximum at d=1/k.

C.1 Proof of the general case for distance 𝒅<𝟏/𝒌

Proof of Lemma 5.1.

Let t=dk and consider first 0<t<1. We will prove the result by successively eliminating the variables.

We begin by giving an equivalent optimisation problem with k(k1) variables. Since the columns of the matrix X sum to 1, we may reduce the number of variables by writing xii=1i:iixii, and maximising the resulting g~(x12,,xk1,k) obtained from g(X) by making these substitutions for xii.

In particular, let

𝒳~={(xij)ij:xij0ij,i:ijxij1jandijxij=t}. (15)

Thus it will suffice to show maxx¯𝒳~g~(x¯) has the bounds claimed. (We write x¯, since we have now a subset of variables of the matrix X.)

Notice that if we have equality for xij+xij=1 for some i,i,j all distinct, then ijxij1, which yields a contradiction since t<1. Thus, it is equivalent to consider the maximisation problem over 𝒳~1, where we require strict inequality for the terms, i.e., xij+xij<1. Let

𝒳~1={(xij)ij:xij0ij,i:ijxij<1jandijxij=t}. (16)

It now suffices to show that maxx¯𝒳~1g~(x¯) satisfies the claimed bounds.

We may remove one more variable. Note from the constraints that we have

x21 =tij(i,j)(2,1)xij.

Let g~2 be g~ making this substitution (i.e., g~2 is a function on k2k1 variables), and let

𝒳~2={(xij)ij,(i,j)(2,1) : xij0(i,j) with ij,(i,j)(1,2),i:i3xi1<1 (17)
i:ijxij<1j2andij(i,j)(2,1)xijt}.

Thus, finally, it suffices to show that maxx¯𝒳~2g~2(x¯) satisfies the claimed bounds.

Recall that the maximum of a convex function is obtained on the boundary. Note also that we may apply this recursively, since if we set any inequality in (17) to equality, then we may make a substitution to reduce the number of variables by 1, and we obtain a maximisation problem for a convex function (on one fewer variables). Thus, the max of g~2(x¯) over x¯𝒳~2 is obtained when at least k2k1 of the inequalities in (17) are equality.

Observe that there are k2k1 inequalities in (17) (which are not strict inequalities), so the maximum is obtained when we set all but (at most) one of these to equality.

We consider two cases. The first case is that we have xij=0 for all (i,j) with ij,(i,j)(2,1). Notice that this fixes the value of all variables, and that the remaining inequalities in (17) are all satisfied. The value of g~2(x) attained is that of g(X) with x21=t (and xij=0 for all (i,j) with ij,(i,j)(2,1), and xii=i:iixii for all i). Note that this yields the matrix X(2,1)(t), and, moreover, that g(X(2,1)(t))=k(k1)2t(kt(k1)).

The second case is that there exist a,b (where (a,b)(2,1)) such that

ij(i,j)(2,1)xij=t and  xij=0 for all (i,j) with ij,(i,j)(2,1),(a,b).

Notice that this fixes the value of all k2k1 variables: xab=t and all remaining variables take the value 0, and that this assignment satisfies the remaining inequalities in (17). The value of g~2(x), attained is that of g(X) with xab=t (and xij=0 for all (i,j) with ij,(i,j)(a,b), and xii=i:iixii for all i). Note that this yields the matrix X(a,b)(t), and, moreover, that again g(X(a,b)(t))=k(k1)2t(kt(k1)) for any such (a,b). This completes the proof.

C.2 Proof for the general case 𝒅>𝟏/𝒌

Here we prove Lemma 5.2, which will allow us to infer that partitions 𝒜 with high modularity scores must be at distance d1/k from the planted partition.

Proof.

Consider any partition 𝒜 with signature X=(xij)1ijk that is at distance more than 1/k from the planted partition 𝒫. Our goal is to show that g(X)k(k1)2.

Suppose that there exists a column j[k] (say, j=1) in X with at least two non-zero entries (say, x11>0 and x21>0). Consider a family of signatures X(s) that is parametrised by variable s, as follows: for a given s[x11,x21], matrix X(s) is exactly the same as X but x11 is replaced with x11+s and x21 is replaced with x21s. Of course, X=X(0).

Note that g(X(s)) is a quadratic function of s with a positive coefficient in front of s2. As a result, at least one of the following two properties holds: (i) g(X(s)) increases as s increases from s=0 to s=x21 (which is equivalent to transferring a weight from x21 to x11); or (ii) g(X(s)) increases as s decreases from s=0 to s=x11 (which is equivalent to transferring a weight from x11 to x21). Note that it might be the case that g(X(s)) attains its local minimum at s=0 and both properties hold at the same time. Regardless, we may start from s=0 and either increase or decrease s to gradually increase g(X(s)). While we do this, the distance to the planted partition 𝒫 does not need to behave monotonically. However, it is easy to see (but it is crucial for the argument) that the distance to 𝒫 is a continuous function of s. Once we are done with transferring the weight, we get an additional zero entry in our signature matrix, and we can move on to the next pair of non-zero entries, possibly in a different column j.

We need to consider two cases now. Suppose first that during the above process the distance to 𝒫 is equal to 1/k. We prematurely stop the process at the very first time this happens, and let Y be the signature we have at that moment. Since we kept increasing the function g along the way, it follows from Lemma 5.1 (applied with t=1) that

g(X)<g(Y)maxX𝒳k(1)g(X)=k(k1)2,

which finishes the proof of the lemma in this case.

Suppose now that the distance from 𝒜 to 𝒫 was always more than 1/k, but we had to stop the above process of transferring weights at some point because each column had exactly one non-zero entry (of course these non-zero entries must be equal to one). This means that each part of 𝒜 is a union of some planted parts, and the distance between 𝒜 and 𝒫 is equal to i/k for some integer i2.

Now, take any part which is a union of r2 planted parts and split it into two parts, consisting of r1 and a single planted part, respectively. After such partition refinement, the function g increases. Indeed, before splitting the part with r planted parts, the contribution of that part to the function g is r(kr), but after splitting, the two resulting parts contribute (r1)(kr+1)+(k1), which is equal to r(kr)+2(r1)>r(kr). We continue such refinements of partitions until the distance to 𝒫 is 1/k. At that point, the partition 𝒜 with signature Y has one part consisting of two planted parts, while the remaining parts consist of just one planted part. The conclusion is as before:

g(X)<g(Y)=maxX𝒳k(1)g(X)=k(k1)2.

This finishes the proof of Lemma 5.2.

Appendix D Proof of Theorem 2.2: SBM has OGP

Proof of Theorem 2.2.

We will prove Theorem 2.2 using Theorem 2.6, our concentration result in Lemma 4.1, and the optimisation result in Lemma 5.2.

First, we will set up the range for the distances. Recall that h(d) is a quadratic function of d, with minimum at 12(k1). See also Figure 2. Take any ν(12(k1),1k), choose ν=23ν+131k, and let ν′′[0,12(k1)) be the unique number such that h(ν′′)=h(ν). Let n0 be the smallest integer such that 1/n0<νν<12(k1)ν′′.

Next, we define μ=aba+(k1)b(h(0)h(ν)). Choose a positive ε<aba+(k1)b(h(ν)h(ν)). Then, by Theorem 2.6, we obtain that parts (i) and (ii) below hold with probability at least 1ε, and for n>n0 large enough:

  1. 1.

    For all partitions 𝒜 at distance d[0,νν) and at distance d(1/k(νν),1/k], it holds that

    q𝒜(G)>aba+(k1)bh(d)ε>aba+(k1)bh(ν)=aba+(k1)bh(0)μ.
  2. 2.

    For any partition 𝒜 at distance d(k2(k1),ν)[0,1k],

    q𝒜(G)<aba+(k1)bh(d)+ε<aba+(k1)bh(ν)=aba+(k1)bh(0)μ.

Together, the above establish Theorem 2.2.