Next Article in Journal
Bayesian Estimation of Geometric Morphometric Landmarks for Simultaneous Localization of Multiple Anatomies in Cardiac CT Images
Previous Article in Journal
Information Thermodynamics and Reducibility of Large Gene Networks
Previous Article in Special Issue
(Four) Dual Plaquette 3D Ising Models
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Exact Recovery of Stochastic Block Model by Ising Model

1
Department of Electronics, Tsinghua University, Beijing 100084, China
2
Tsinghua Berkeley Shenzhen Institute, Berkeley, CA 94704, USA
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Entropy 2021, 23(1), 65; https://doi.org/10.3390/e23010065
Submission received: 29 November 2020 / Revised: 20 December 2020 / Accepted: 30 December 2020 / Published: 2 January 2021

Abstract

:
In this paper, we study the phase transition property of an Ising model defined on a special random graph—the stochastic block model (SBM). Based on the Ising model, we propose a stochastic estimator to achieve the exact recovery for the SBM. The stochastic algorithm can be transformed into an optimization problem, which includes the special case of maximum likelihood and maximum modularity. Additionally, we give an unbiased convergent estimator for the model parameters of the SBM, which can be computed in constant time. Finally, we use metropolis sampling to realize the stochastic estimator and verify the phase transition phenomenon thfough experiments.

1. Introduction

In network analysis, community detection consists in inferring the group of vertices that are more densely connected in a graph [1]. It has been used in many domains, such as recommendation systems [2], task allocation in distributed computing [3], gene expressions [4], and so on. The stochastic block model (SBM) is one of the most commonly used statistical models for community detection problems [5,6]. It provides a benchmark artificial dataset to evaluate different community detection algorithms and inspires the design of many algorithms for community detection tasks. These algorithms, such as semi-definite relaxation, spectral clustering, and label propagation, not only have theoretical guarantees when applied to the SBM, but also perform well on datasets without the SBM assumption. The study of the theoretical guarantee of the SBM model can be divided between the problem of exact recovery and that of partial recovery. Exact recovery requires that the estimated community should be exactly the same as the underlining community structure of the SBM whereas partial recovery expects the ratio of misclassified nodes to be as small as possible. For both cases, the asymptotic behavior of the detection error is analyzed when the scale of the graph tends to infinity. There are already some well-known results for the exact recovery problem on the SBM. To name but a few, Abbe and Mossel established the exact recovery region for a special sparse SBM with two communities [7,8]. Later on, the result was extended to a general SBM with multiple communities [9].
Parameter inference in the SBM is often considered alongside the exact recovery problem. Previous inference methods require the joint estimation of node labels and model parameters [10], which have high complexity since the recovery and inference tasks are done simultaneously. In this article, we will decouple the inference and recovery problems, and propose an unbiased convergent estimator for SBM parameters when the number of communities is known. Once the estimator is obtained, the recovery condition can be checked to determine whether it is possible to recover the labels exactly. Additionally, the estimated parameter will guide the choice of parameters for our proposed stochastic algorithm.
In this article, the exact recovery of the SBM is analyzed by considering the Ising model, which is a probability distribution of node states [11]. We use the terms node states and node labels interchangeably throughout this paper, both of which refer to the membership of the underlining community. The Ising model was originally proposed in statistical mechanics to model the ferromagnetism phenomenon but has wide applications in neuroscience, information theory, and social networks. Among different variants of Ising models, the phase transition property is shared. Phase transition can be generally formulated when some information quantity changes sharply in a small neighborhood of parameters. Based on the random graph generated by an SBM with two underlining communities, the connection of the SBM and the Ising model was first studied by [12]. Our work will extend the existing result to the multiple community case, establish the phase transition property, and give the recovery error an upper bound. The error bounds decay in a polynomially fast rate in different phases. Then we will propose an alternative approach to estimate the labels by finding the Ising state with maximal probability. Compared with sampling from the Ising model directly, we will show that the optimization approach has a sharper error upper bound. Solving the optimization problem is a generalization of maximum likelihood and also has a connection with maximum modularity. Additionally, searching the state with maximal probability could also be done within all balanced partitions. We will show that this constrained search is equivalent to the graph minimum cut problem, and the detection error upper bound for the constrained maximization will also be given.
The exact solution to maximize the probability function or exact sampling from the Ising model is NP-hard. Many polynomial time algorithms have been proposed for approximation purposes. Among these algorithms, simulated annealing performs well and produces a solution that is very close to the true maximal value [13]. On the other hand, in the original Ising model, metropolis sequential sampling is used to generate samples for the Ising model [14]. Simulated annealing can be regarded as metropolis sampling with decreasing temperature. In this article, we will use the metropolis sampling technique to sample from the Ising model defined on the SBM. This approximation enables us to verify the phase transition property of our Ising model numerically.
This paper is organized as follows. Firstly, in Section 3 we introduce the SBM and give an estimator for the parameters of the SBM. Then, in Section 4, our specific Ising model is given and its phase transition property is obtained. Derived from the Ising model, in Section 5, the energy minimization method is introduced, and we establish its connection with maximum likelihood and modularity maximization algorithm. Furthermore, in Section 6, we realize the Ising model using the metropolis algorithm to generate samples. Numerical experiments and conclusion are given lastly to finish this paper.
Throughout this paper, the  community number is denoted by k; the random undirected graph G is written as G ( V , E ) with vertex set V and edge set E; V = { 1 , , n } = : [ n ] ; the label of each node is X i , which is chosen from W = { 1 , ω , , ω k 1 } , and we further require W to be a cyclic group with order k; W n is the n-ary Cartesian power of W; f is a permutation function on W and is extended to W n in an element-wise manner; U c is the complement set of U and | U | is the cardinality of U; the set S k is used to represent all permutation functions on W and S k ( σ ) : = { f ( σ ) | f S k } for σ W n ; the indicator function δ ( x , y ) is defined as δ ( x , y ) = 1 when x = y , and  δ ( x , y ) = 0 when x y ; f ( n ) = O ( g ( n ) ) if there exists a constant c > 0 such that f ( n ) c g ( n ) for large n; f ( n ) = o ( g ( n ) ) holds if lim n f ( n ) g ( n ) = 0 ; we define the distance of two vectors as: dist ( σ , σ ) = | { i [ n ] : σ i σ i } | for σ , σ W n and the distance of a vector to a space S W n as dist ( σ , S ) : = min { dist ( σ , σ ) | σ S } . For example, when n = 2 and k = 2 , σ = ( 1 , ω ) W 2 ; ω 0 = 1 ; ω · ω = ω 2 = 1 ; let f be a mapping such that f ( 1 ) = ω and f ( ω ) = 1 , then f S 2 and f ( σ ) = ( ω , 1 ) ; dist ( σ , f ( σ ) ) = 2 ; S k ( σ ) = { σ , f ( σ ) } ; and S k c ( σ ) = { ( 1 , 1 ) , ( ω , ω ) } .

2. Related Works

The classical Ising model is defined on a lattice and confined to two states { ± 1 } . This definition can be extended to a general graph and multiple-state case [15]. In [16], Liu considered the Ising model as defined on a graph generated by sparse SBM and his focus was to compute the log partition function, which was averaged over all random graphs. In [17], an Ising model with a repelling interaction was considered on a fixed graph structure, and the phase transition condition was established, which involves both the attracting and repelling parameters. Our Ising model derives from the work of [12], but we extend their results by considering the error upper bound and multiple-community case.
The exact recovery condition for the SBM can be derived as a special case of many generalized models, such as pairwise measurements [18], minimax rates [19], and side information [20]. The Ising model in this paper provides another way to extend the SBM model and derives the recovery condition. Additionally, the error upper bound for exact recovery of the two-community SBM by constrained maximum likelihood has been obtained in [7]. Compared with previous results, we establish a sharper upper bound for the multiple-community case in this paper.
The connection between maximum modularity and maximal likelihood was investigated in [21]. To get an optimal value of maximum modularity approximately, simulated annealing was exploited [22], which proceeds by using the partition approach, while the Metropolis sampling used in this paper is applied to estimate the node membership directly.

3. Stochastic Block Model and Parameter Estimation

In this paper, we consider a special symmetric stochastic block model (SSBM), which is defined as follows:
Definition 1 (SSBM with k communities).
Let 0 q < p 1 , V = [ n ] and X = ( X 1 , , X n ) W n . X satisfies the constraint that | { v [ n ] : X v = u } | = n k for u W . The random graph G is generated under SSBM ( n , k , p , q ) if the following two conditions are satisfied.
  • There is an edge of G between the vertices i and j with probability p if X i = X j and with probability q if X i X j .
  • The existences of each edge are mutually independent.
To explain SSBM in more detail, we define the random variable Z i j : = 1 [ { i , j } E ( G ) ] , which is the indicator function of the existence of an edge between nodes i and j. Given the node labels X, Z i j follows Bernoulli distribution, whose expectation is given by:
E [ Z i j ] = p if X i = X j q if X i X j
Then the random graph G with n nodes is completely specified by Z : = { Z i j , 1 i < j n } in which all Z i j are jointly independent. The probability distribution for SSBM can be written as:
P G ( G ) : = P G ( Z = z | X ) = p X i = X j z i j q X i X j z i j · ( 1 p ) X i = X j ( 1 z i j ) ( 1 q ) X i X j ( 1 z i j )
We will use the notation G n to represent the set containing all graphs with n nodes. By the normalization property, P G ( G n ) = G G n P G ( G ) = 1 .
In Definition 1, we have supposed that the node label X is fixed instead of a uniformly distributed random variable. Since the maximum posterior estimator is equivalent to the maximum likelihood when the prior is uniform, these two definitions are equivalent. Although the random variable definition is more commonly used in previous literature [6], fixing X makes our formal analysis more concise.
Given the SBM, the exact recovery problem can be formally defined as follows:
Definition 2 (Exact recovery in SBM).
Given X, the random graph G is drawn under SSBM ( n , k , p , q ) . We say that the exact recovery is solvable for SSBM ( n , k , p , q ) if there exists an algorithm that takes G as input and outputs X ^ such that:
P a ( X ^ ) : = P ( X ^ S k ( X ) ) 1 as n
In the above definition, the notation P a ( X ^ ) is called the probability of accuracy for estimator X ^ . Let P e ( X ^ ) = 1 P a ( X ^ ) represent the probability of error. Definition 2 can also be formulated as P e ( X ^ ) 0 as n . The notation X ^ S k ( X ) means that we can only expect a recovery up to a global permutation of the ground truth label vector X. This is common in unsupervised learning as no anchor exists to assign labels to different communities. Additionally, given a graph G, the algorithm can be either deterministic or stochastic. Generally speaking, the probability of X ^ S k ( X ) should be understood as G G n P G ( G ) P X ^ | G ( X ^ S k ( X ) ) , which reduced to P G ( X ^ S k ( X ) ) for the deterministic algorithm.
For constants p , q , which are irrelevant with the graph size n, we can always find algorithms to recover X such that the detection error decreases exponentially fast as n increases; that is to say, the task with a dense graph is relatively easy to handle. Within this paper, we consider a sparse case when p = a log n n , q = b log n n . This case corresponds to the sparsest graph when exact recovery of the SBM is possible. And under this condition, a well known result [9] states that exact recovery is possible if and only if:
a b > k
Before diving into the exact recovery problem, we first consider the inference problem for SBM. Suppose k is known, and we want to estimate a , b from the graph G. We offer a simple method by counting the number of edges T 1 and the number of triangles T 2 of G, and the estimators a ^ , b ^ are obtained by solving the following equation systems:
x + ( k 1 ) y 2 k = T 1 n log n
1 k 2 x 3 6 + k 1 2 x y 2 + ( k 1 ) ( k 2 ) y 3 6 = T 2 log 3 n
The theoretical guarantee for the solution is given by the following theorem:
Theorem 1.
When n is large enough, the equation system of Equations (4) and (5) has the unique solution ( a ^ , b ^ ) , which are unbiased consistent estimators of ( a , b ) . That is, E [ a ^ ] = a , E [ b ^ ] = b , and a ^ and b ^ converge to a , b in probability, respectively.
Given a graph generated by the SBM, we can use Theorem 1 to obtain the estimated a , b and determine whether exact recovery of label X is possible by Equation (3). Additionally, Theorem 1 provides good estimation of a , b to initialize their parameters of some recovery algorithm like maximum likelihood or our proposed Metropolis sampling in Section 6.

4. Ising Model for Community Detection

In the previous section, we have defined SBM and its exact recovery problem. While SBM is regarded as obtaining the graph observation G from node label X, the Ising model provides a way to generate estimators of X from G by a stochastic procedure. The definition of such an Ising model is given as follows:
Definition 3 (Ising model with k states).
Given a graph G sampled from SSBM ( n , k , a log n n , b log n n ) , the Ising model with parameters γ , β > 0 is a probability distribution of the state vector σ W n whose probability mass function is
P σ | G ( σ = σ ¯ ) = exp ( β H ( σ ¯ ) ) Z G ( α , β )
where
H ( σ ¯ ) = γ log n n { i , j } E ( G ) δ ( σ ¯ i , σ ¯ j ) { i , j } E ( G ) δ ( σ ¯ i , σ ¯ j )
The subscript in P σ | G indicates that the distribution depends on G, and  Z G ( α , β ) is the normalizing constant for this distribution.
In physics, β refers to the inverse temperature and Z G ( γ , β ) is called the partition function. The Hamiltonian energy H ( σ ¯ ) consists of two terms: the repelling interaction between nodes without edge connection and the attracting interaction between nodes with edge connection. The parameter γ indicates the ratio of the strength of these two interactions. The term log n n is added to balance the two interactions because there are only O ( log n n ) connecting edges for each node. The probability of each state is proportional to exp ( β H ( σ ¯ ) ) , and the state with the largest probability corresponds to that with the lowest energy.
The classical definition of the Ising model is specified by H ( σ ) = ( i , j ) E ( G ) σ i · σ j for σ i = ± 1 . There are two main differences between Definition 3 and the classical one. Firstly, we add a repelling term between nodes without an edge connection. This makes these nodes have a larger probability to take different labels. Secondly, we allow the state at each node to take k values from W instead of the two values ± 1 . When γ = 0 and k = 2 , Definition 3 is reduced to the classical definition of the Ising model up to a scaling factor.
Definition 3 gives a stochastic estimator X ^ * for X: X ^ * is one sample generated from the Ising model, which is denoted as X ^ * Ising ( γ , β ) . The exact recovery error probability for X ^ * can be written as P e ( X ^ * ) : = G G n P G ( G ) P σ | G ( S k c ( X ) ) . From this expression we can see that the error probability is determined by two parameters ( γ , β ) . When these parameters take proper values, P e ( X ^ * ) 0 , and the exact recovery of the SBM is achievable. On the contrary, P e ( X ^ * ) 1 if ( γ , β ) takes other values. These two cases are summarized in the following theorem:
Theorem 2.
Define the function g ( β ) , g ˜ ( β ) as follows:
g ( β ) = b e β + a e β k a + b k + 1
and:
g ˜ ( β ) = g ( β ) β β ¯ = 1 2 log a b g ( β ¯ ) = 1 ( a b ) 2 k β > β ¯
where β ¯ = arg min β > 0 g ( β ) . Let β * be defined as:
β * = log a + b k ( a + b k ) 2 4 a b ) 2 b
which is the solution to the equation g ( β ) = 0 and β * < β ¯ . Then depending on how ( γ , β ) take values, for any given ϵ > 0 and X ^ * Ising ( γ , β ) , when n is sufficiently large, we have:
  • If γ > b and β > β * , P e ( X ^ * ) n g ˜ ( β ) / 2 + ϵ ;
  • If γ > b and β < β * , P a ( X ^ * ) ( 1 + o ( 1 ) ) max { n g ( β ¯ ) , n g ( β ) + ϵ } ;
  • If γ < b , P a ( X ^ * ) exp ( C n ) for any C > 0 .
By simple calculus, g ˜ ( β ) < 0 for β > β * and g ( β ) > 0 for β < β * . g ( β ¯ ) < 0 follows from Equation (3). The illustration of g ( β ) , g ˜ ( β ) is shown in Figure 1a. Therefore, for sufficiently small ϵ and as n , the upper bounds in Theorem 2 all converge to 0 at least in polynomial speed. Therefore, Theorem 2 establishes the sharp phase transition property of the Ising model, which is illustrated in Figure 1b.
Theorem 2 can also be understood from the marginal distribution for σ : P σ ( σ = σ ¯ ) = G G n P G ( G ) P σ | G ( σ = σ ¯ ) . Let D ( σ , σ ) be the event when σ is closest to σ among all its permutations. That is,
D ( σ , σ ) : = { σ = arg min f S k dist ( f ( σ ) , σ ) }
Then Theorem 2 can be stated with respect to the marginal distribution P σ :
Corollary 1.
Suppose γ > b , depending on how β takes values:
  • When β > β * , P σ ( σ = X | D ( σ , X ) ) = 1 o ( 1 ) ;
  • When β < β * , P σ ( σ = X | D ( σ , X ) ) = o ( 1 ) .
Below we outline the proof ideas of Theorem 2. The insight is obtained from the analysis of the one-flip energy difference. This useful result is summarized in the following lemma:
Lemma 1.
Suppose σ ¯ differs from σ ¯ only at position r by σ ¯ r = ω s · σ ¯ r . Then the change of energy is:
H ( σ ¯ ) H ( σ ¯ ) = ( 1 + γ log n n ) i N r ( G ) J s ( σ ¯ r , σ ¯ i ) + γ log n n ( m ( ω s · σ ¯ r ) m ( σ ¯ r ) + 1 )
where m ( ω j ) : = | { i [ n ] | σ ¯ i = ω j | } , N r ( G ) : = { j | ( r , j ) E ( G ) } and J s ( x , y ) = δ ( x , y ) δ ( ω s · x , y ) .
Lemma 1 gives an explicit way to compare the probability of two neighboring states by the following equality:
P σ | G ( σ = σ ¯ ) P σ | G ( σ = σ ¯ ) = exp ( β ( H ( σ ¯ ) H ( σ ¯ ) ) )
Additionally, since the graph is sparse and every node has O ( log n ) neighbors, from Equation (12) the computational cost (time complexity) for the energy difference is also O ( log n ) .
When H ( σ ¯ ) > H ( σ ¯ ) , we can expect P σ | G ( σ = σ ¯ ) is far less than P σ | G ( σ = σ ¯ ) . Roughly speaking, if  dist ( σ , X ) = 1 exp ( β ( H ( σ ¯ ) H ( X ) ) ) converges to zero, we can expect the probability of all other states differing from S k ( X ) converges to zero. On the contrary, if  dist ( σ , X ) = 1 exp ( β ( H ( σ ¯ ) H ( X ) ) ) tends to infinity, then P σ ( S k ( X ) ) converges to zero. This illustrates the idea behind the proof of Theorem 2. The rigorous proof can be found in Section 8.

5. Community Detection via Energy Minimization

Since β * is irrelevant with n, when γ > b , we can choose a sufficiently large β such that β > β * , then by Theorem 2, σ S k ( X ) almost surely, which implies that P σ | G ( σ = X ) has the largest probability for almost all graphs G sampled from the SBM. Therefore, instead of sampling from the Ising model, we can directly maximize the conditional probability to find the state with the largest probability. Equivalently, we can proceed by minimizing the energy term in Equation (7):
X ^ : = arg min σ ¯ W n H ( σ ¯ )
In (14), we allow σ ¯ to take values from W n . Since we know X has equal size | { v [ n ] : X v = u } | = n k for each label u, another formulation is to restrict the search space to W * : = { σ W n | | { v [ n ] : σ v = ω s } | = n k , s = 0 , , k 1 } . When σ W * , minimizing H ( σ ) is equivalent to:
X ^ : = arg min σ W * { i , j } E ( G ) δ ( σ i , σ j )
where the minimal value is the minimum cut between different detected communities.
When X ^ X , we must have dist ( X ^ , X ) 2 to satisfy the constraint X ^ W * . Additionally, the estimator of X ^ is parameter-free whereas X ^ depends on γ . The extra parameter γ in the expression of X ^ can be regarded as a kind of Lagrange multiplier for this integer programming problem. Thus, the optimization problem for X ^ is the relaxation of that for X ^ by introducing a penalized term and enlarging the searched space from W * to W n .
When β > β ¯ , g ˜ ( β ) becomes a constant value. Therefore, we can get n g ( β ¯ ) / 2 as the tightest error upper bound for the Ising estimator X ^ * from Theorem 2. For the estimator X ^ and X ^ , we can obtain a sharper error upper bound, which is summarized in the following theorem:
Theorem 3.
When a b > k , for sufficiently large n,
  • If γ > b , P G ( X ^ S k ( X ) ) ( k 1 + o ( 1 ) ) n g ( β ¯ ) ;
  • P G ( X ^ S k ( X ) ) ( ( k 1 ) 2 + o ( 1 ) ) n 2 g ( β ¯ ) .
As g ( β ¯ ) < 0 , n 2 g ( β ¯ ) < n g ( β ¯ ) < n g ( β ¯ ) / 2 , Theorem 3 implies that P e ( X ^ ) has the sharpest upper bound among the three estimators. This can be intuitively understood as the result of smaller search space. The proof technique of Theorem 3 is to consider the probability of events H ( X ) > H ( σ ¯ ) for dist ( σ , X ) 1 . Then by union bound, these error probabilities can be summed up. We note that a loose bound n g ( β ¯ ) / 4 was obtained in [7] for the estimator X ^ when k = 2 . For a general case, since g ˜ ( β ) = 1 ( a b ) 2 k , Theorem 3 implies that exact recovery is possible using X ^ as long as a b > k is satisfied.
Estimator X ^ has one parameter, γ . When γ takes different values, X ^ is equivalent with maximum likelihood or maximum modularity in the asymptotic case. The following analysis shows their relationship intuitively.
The maximum likelihood estimator is obtained by maximizing the log-likelihood function. From (2), this function can be written as:
log P G ( Z | X = σ ) = log a b · H ( σ ) + C
where the parameter γ in H ( σ ) satisfies γ log n n = 1 log ( a / b ) ( log ( 1 a log n n ) log ( 1 b log n n ) ) and C is a constant irrelevant with σ . When n is sufficiently large, we have γ γ M L : = a b log ( a / b ) . That is, the maximum likelihood estimator is equivalent to X ^ when γ = γ M L asymptotically.
The maximum modularity estimator is obtained by maximizing the modularity of a graph [23], which is defined by:
Q = 1 2 | E | i j ( A i j d i d j 2 | E | ) δ ( C i , C j )
For the i-th node, d i is its degree and C i is its community belonging. A is the adjacency matrix. Up to a scaling factor, the modularity Q can be re-written using the label vector σ  as:
Q ( σ ) = { i , j } E ( G ) d i d j 2 | E | δ ( σ i , σ j ) + { i , j } E ( G ) ( 1 d i d j 2 | E | ) δ ( σ i , σ j )
From (17), we can see that Q ( σ ) H ( σ ) with γ = γ M Q = a + b 2 as n . Indeed, we have d i ( a + b ) log n 2 , | E | 1 2 n d i . Therefore, we have d i d j 2 | E | γ M Q log n n . That is, the maximum modularity estimator is equivalent with X ^ when γ = γ M Q asymptotically.
Using a > b and the inequality x 1 > log x > 2 x 1 x + 1 for x > 1 we can verify that γ M Q > γ M L > b . That is, both the maximum likelihood and the maximum modularity estimator satisfy the exact recovery conditions γ > b in Theorem 3.

6. Community Detection Based on Metropolis Sampling

From Theorem 2, if we could sample from the Ising model, then with large probability, the sample is aligned with X. However, exact sampling is difficult when n is very large since the cardinality of the state space increases in the rate of k n . Therefore, some approximation is necessary, and the most common way to generate an Ising sample is using Metropolis sampling [14]. Empirically speaking, starting from a random state, the Metropolis algorithm updates the state by randomly selecting one position to flip its state at each iteration step. Then after some initial burning time, the generated samples can be regarded as sampling from the Ising model.
The theoretical guarantee of Metropolis sampling is based on the Markov chain. Under some general conditions, Metropolis samples converge to the steady state of the Markov chain, and the steady state follows the probability distribution to be approximated. For the Ising model, there are many previous works which have shown the convergence of Metropolis sampling [24].
For our specific Ising model and energy term in Equation (7), the pseudo code of our algorithm is summarized in Algorithm 1. This algorithm requires that the number of the communities k is known and the strength ratio parameter γ is given. We should choose γ > b where b is estimated by b ^ in Theorem 1. The iteration time N should also be specified in advance.
Algorithm 1 Metropolis sampling algorithm for SBM.
Inputs: the graph G, inverse temperature β , the strength ratio parameter γ
Output: X ^ = σ ¯
1:
random initialize σ ¯ W n
2:
for i = 1 , 2 , , N do
3:
 propose a new state σ ¯ according to Lemma 1 where s , r are randomly chosen
4:
 compute Δ H ( r , s ) = H ( σ ¯ ) H ( σ ¯ ) using (12)
5:
if Δ H ( r , s ) < 0 then
6:
   σ r w s · σ r
7:
else
8:
  with probability exp ( β Δ H ( r , s ) ) such that σ r w s · σ r
9:
end if
10:
end for
The computation of Δ H ( r , s ) needs O ( log n ) time from Lemma 1. For some special Ising model, it needs to take N = O ( n log n ) to generate the sample for good approximation [25]. For our model, it is unknown whether O ( n log n ) is sufficient, and we empirically chose N = O ( n 2 ) in numerical experiments. Then the time complexity of Algorithm 1 is O ( n 2 log n ) .
In the remaining part of this section, we present experiments conducted to verify our theoretical results. Firstly, we considered several combinations of ( a , b , k ) and obtained the estimator ( a ^ , b ^ ) by Theorem 1. Using the empirical mean squared error (MSE) 1 m i = 1 m ( a ^ a ) 2 + ( b ^ b ) 2 as the criterion and choosing m = 1000 , the result is shown in Figure 2a. As we can see, as n increases, the MSE decreases polynomially fast. Therefore, the convergence of a ^ a and b ^ b was verified.
Secondly, using Metropolis sampling, we conducted a moderate simulation to verify Theorem 2 for the case γ > b . We chose n = 9000 , k = 2 , and the empirical accuracy was computed by P e = 1 m 1 m 2 i = 1 m 1 j = 1 m 2 1 [ X ^ * = ± X ] . In this formula, m 1 is the number of times the random graph was generated by the SBM, whereas m 2 is the number of times consecutive samples were generated by Algorithm 1 for a given graph. We chose m 1 = 2100 , m 2 = 6000 , which is fairly large and can achieve a good approximation of P e ( X ^ * ) by the law of large numbers. The result is shown in Figure 2b.
The vertical red line ( β = β * = 0.198 ), computed from (10), represents the phase transition threshold. The point ( 0.199 , 1 2 ) in the figure can be regarded as the empirical phase transition threshold, whose first coordinate is close to β * . The green line ( β , n g ( β ) / 2 ) is the theoretical lower bound of accuracy for β > β * , and the purple line ( β , n g ( β ) ) is the theoretical upper bound of accuracy for β < β * . It can be expected that as n becomes larger, the empirical accuracy curve (blue line in the figure) will approach the step function, which jumps from 0 to 1 at β = β * .

7. Conclusions

In this paper, we presented one convergent estimator (in Theorem 1) to infer the parameters of the SBM and analyzed three label estimators to detect communities of the SBM. We gave the exact recovery error upper bound for all label estimators (in Theorems 2 and 3) and studied their relationships. By introducing the Ising model, our work makes a new path to study the exact recovery problem for the SBM. More theoretical and empirical work will be done in the future, such as convergence analyses on modularity (in Equation (17)), the necessary iteration time (in Algorithm 1) for Metropolis sampling, and so on.

8. Proof of Main Theorems

8.1. Proof of Theorem 1

Lemma 2.
Consider an Erdős–Rényi random graph G with n nodes, in which edges are placed independently with probability p [26]. Suppose p = a log n n , the number of edges is denoted by | E | while the number of triangles is T. Then | E | n log n a 2 and T log 3 n a 3 6 in probability.
Proof. 
Let X i j represent a Bernoulli random variable with parameter p. Then | E | = i , j X i j , X i j are i.i.d. E [ T ( G ) ] = n ( n 1 ) 2 p = ( n 1 ) log n 2 a and Var [ | E | ] = n ( n 1 ) 2 p ( 1 p ) < a ( n 1 ) log n 2 . Then by Chebyshev’s inequality,
P ( | | E | n log n a 2 n 1 n | > ϵ ) Var [ | E | / ( n log n ) ] ϵ 2 < a ( n 1 ) 2 n 2 ϵ 2 log n
For a given ϵ , when n is sufficiently large,
P ( | | E | n log n a 2 | > ϵ ) < P ( | | E | n log n a 2 n 1 n | > 2 ϵ ) n 1 8 n 2 ϵ 2 log n
Therefore, by the definition of convergence in probability, we have | E | n log n a 2 as n .
Let X i j k represents a Bernoulli random variable with parameter p 3 . Then T = i , j , k X i j k . It is easy to compute that E [ T ] = n 3 p 3 . Since X i j k are not independent, the variance of T needs careful calculation. From [27] we know that:
Var [ T ] = n 3 p 3 + 12 n 4 p 5 + 30 n 5 p 6 + 20 n 6 p 6 n 3 2 p 6 = O ( log 3 n )
Therefore by Chebyshev’s inequality,
P ( | T log 3 n a 3 6 ( n 1 ) ( n 2 ) n 2 | > ϵ ) Var [ T / log 3 n ] ϵ 2 = 1 ϵ 2 O ( 1 log 3 n )
Hence, T log 3 n a 3 6 . □
The convergence of | E | in the Erdős–Rényi graph can be extended directly to the SBM since the existence of each edge is independent. However, for T, it is a little tricky since the existences of each triangle are mutually dependent. The following two lemmas give the formula for the variance of inter-community triangles in the SBM.
Lemma 3.
Consider a two-community SBM ( 2 n , p , q ) and count the number of triangles T, which has a node in S 1 and an edge in S 2 . Then the variance of T is:
Var [ T ] = n 2 ( n 1 ) 2 q 2 p + n 2 ( n 1 ) ( n 2 ) p 2 q 3 + n 2 ( n 1 ) 2 2 q 4 p n 2 ( n 1 ) ( 3 n 4 ) 2 q 4 p 2
Lemma 4.
Consider a three-community SBM ( 3 n , p , q ) and count the number of triangles T, which has a node in S 1 , one node in S 2 , and one node in S 3 . Then the variance of T is:
Var [ T ] = n 3 q 3 + 3 n 3 ( n 1 ) q 4 + 3 n 3 ( n 1 ) 2 q 5 n 3 ( 3 n 2 3 n + 1 ) q 6
The proof of the above two lemmas uses some counting techniques and is similar to that in [27], and we omit it here.
Lemma 5.
For a SBM ( n , k , p , q ) where p = a log n n , q = b log n n . The number of triangles is T. Then T ( log n ) 3 converges to 1 k 2 ( a 3 6 + k 1 2 a b 2 + ( k 1 ) ( k 2 ) b 3 6 ) in probability as n .
Proof. 
We split T into three parts: the first is the number of triangles within community i, T i . There are k terms of T i . The second is the number of triangles that have one node in community i and one edge in community j, T i j . There are k ( k 1 ) terms of T i j . The third is the number of triangles that have one node in community i, one node in community j and one node in community k.
We only need to show that:
T i log 3 n ( a / k ) 3 6
T i j log 3 n 1 2 ( a / k ) ( b / k ) 2
T i j k log 3 n ( b / k ) 3
The convergence of T i log 3 n comes from Lemma 2. For T i j we use the conclusion from Lemma 3. We replace n with n / k , p = a log n n , and q = b log n n in Equation (18). Var [ T i j ] a b 2 2 k 3 log 3 n . Since the expectation of T i j log 3 n is ( n / k ) n / k 2 p q 2 / ( log 3 n ) = n 1 2 n a b 2 k 3 , by Chebyshev’s inequality we can show that:
P ( | T i j log 3 n n 1 2 n a b 2 k 3 | > ϵ ) Var [ T i j / log 3 n ] ϵ 2 = 1 ϵ 2 O ( 1 log 3 n )
Therefore, T i j log 3 n converges to 1 2 ( a / k ) ( b / k ) 2 .
To prove T i j k log 3 n ( b / k ) 3 , from Lemma 4 we can get Var [ T i j k ] = O ( log 5 n ) :
P ( | T i j k log 3 n b 3 k 3 | > ϵ ) Var [ T i j k / log 3 n ] ϵ 2 = 1 ϵ 2 O ( 1 log n )
Proof of Theorem 1.
Let e 1 * = a + ( k 1 ) b 2 k , k 2 e 2 * = a 3 6 + k 1 2 a b 2 + ( k 1 ) ( k 2 ) b 3 6 and e 1 = T 1 n log n , e 2 = T 2 log 3 n . From Lemma 2, e 1 e 1 * . From Lemma 5, e 2 e 2 * as n . Using x = 2 k e 1 ( k 1 ) y , we can get:
g ( y ) : = ( k 1 ) ( y 3 6 e 1 y 2 + 12 e 1 2 y ) + 6 e 2 8 k e 1 3 = 0
This equation has a unique real root since g ( y ) is increasing on R : g ( y ) = 3 ( k 1 ) ( y 2 e 1 ) 2 0 . Next we show that the root lies within ( 0 , 2 e 1 ) .
lim n g ( 0 ) = 6 e 2 * 8 k ( e 1 * ) 3 = 3 k 2 ( k 1 ) ( k 2 ) a b 2 3 ( k 1 ) k 2 a 2 b k 1 k 2 ( ( k 2 ) ( k 1 ) 2 ) b 3 < 0 lim n g ( 2 e 1 ) = 6 e 2 * 8 ( e 1 * ) 3 = ( k 1 ) ( a b ) 3 k 3 > 0
Therefore, we can get a unique solution y within ( 0 , 2 e 1 ) . Since ( a , b ) is a solution for the equation array, the conclusion follows.
By taking expectation on both sizes of Equations (4) and (5) we can show E [ a ^ ] = a , E [ b ^ ] = b . By the continuous property of g ( y ) , b ^ b and a ^ a follows similarly. □

8.2. Proof of Theorem 2

Proof of Lemma 1.
First we rewrite the energy term in (7) as:
H ( σ ¯ ) = γ log n n i < j δ ( σ ¯ i , σ ¯ j ) ( 1 + γ log n n ) { i , j } E ( G ) δ ( σ ¯ i , σ ¯ j )
Then calculating the energy difference term by:
H ( σ ¯ ) H ( σ ¯ ) = ( 1 + γ log n n ) · i N r ( G ) ( δ ( σ ¯ r , σ ¯ i ) δ ( ω s · σ ¯ r , σ ¯ i ) ) + γ log n n i r ( δ ( ω s · σ ¯ r , σ ¯ i ) δ ( σ ¯ r , σ ¯ i ) ) = ( 1 + γ log n n ) i N r ( G ) J s ( σ ¯ r , σ ¯ i ) + γ log n n i = 1 n ( δ ( ω s · σ ¯ r , σ ¯ i ) δ ( σ ¯ r , σ ¯ i ) + 1 ) = ( 1 + γ log n n ) i N r ( G ) J s ( σ ¯ r , σ ¯ i ) + γ log n n ( m ( ω s · σ ¯ r ) m ( σ ¯ r ) + 1 )
Before diving into the technical proof of Theorem 2, we need to introduce some extra notations. When σ ¯ differs from X only at position r, taking σ ¯ = X in Lemma 1, we have:
H ( σ ¯ ) H ( σ ¯ ) = ( 1 + γ log n n ) ( A r 0 A r s ) + γ log n n
where A r s is defined as A r s = | { j [ n ] \ { r } : { j , r } E ( G ) , X j = ω s · X r } | . Since the existence of each edge in G is independent, A r s Bernoulli ( n k , b log n n ) for s 0 and A 0 s Bernoulli ( n k 1 , a log n n ) .
For the general case, we can write:
H ( σ ¯ ) H ( X ) = ( 1 + γ log n n ) [ A σ ¯ B σ ¯ ] + γ log n n N σ ¯
in which we use A σ ¯ or B σ ¯ to represent the binomial random variable with parameter a log n n or b log n n , respectively, and N σ ¯ is a deterministic positive number depending on σ ¯ but irrelevant with the graph structure. The following lemma gives the expression of A σ ¯ , B σ ¯ and N σ ¯ :
Lemma 6.
For SSBM ( n , k , p , q ) , we assume σ ¯ differs from the ground truth label vector X in the | I | : = dist ( σ ¯ , X ) coordinate. Let I i j = | { r [ n ] | X r = w i , σ r = w j } for i j and I i i = 0 . We further denote the row sum as I i = j = 0 k 1 I i j and the column sum as I i = j = 0 k 1 I j i . Then:
N σ ¯ = 1 2 i = 0 k 1 ( I i I i ) 2
B σ ¯ B e r n o u l l i ( n k | I | + 1 2 i = 0 k 1 ( 2 I i I i + I i 2 j = 0 k 1 I j i 2 ) , q )
A σ ¯ B e r n o u l l i ( n k | I | 1 2 i = 0 k 1 ( I i 2 + j = 0 k 1 I i j 2 ) , p )
The proof of Lemma 6 is mainly composed of careful counting techniques, and we omit it here. When | I | is small compared to n, we have the following Lemma, which is an extension of Proposition 6 in [12].
Lemma 7.
For t [ 1 k ( b a ) , 0 ] and | I | n / log n
P G ( B σ ¯ A σ ¯ t | I | log n ) exp | I | log n f β ( t ) β t 1 + O ( 1 log n )
where f β ( t ) = min s 0 ( g ( s ) s t ) + β t g ˜ ( β ) .
Corresponding to the three cases of Theorem 2, we use three non-trivial lemmas to establish the properties of the Ising model.
Lemma 8.
Let γ > b . When dist ( σ ¯ , X ) n log n and D ( σ ¯ , X ) , the event P σ | G ( σ = σ ¯ ) > exp ( C n ) P σ | G ( σ = X ) happens with a probability (with respect to SSBM) less than exp ( τ ( α , β ) n log n ) , where C is an arbitrary constant and τ ( α , β ) is a positive number.
Proof. 
We denote the event P σ | G ( σ = σ ¯ ) > exp ( C n ) P σ | G ( σ = X ) as D ˜ ( σ ¯ , C ) . By Equation (24), D ˜ ( σ ¯ , C ) is equivalent to:
( 1 + γ log n n ) [ B σ ¯ A σ ¯ ] > γ log n n N σ ¯ C β n
We claim that σ ¯ must satisfy at least one of the following two conditions:
  • i j s.t. 1 k ( k 1 ) n log n I i j n k 1 k ( k 1 ) n log n
  • i j s.t. I i j > n k 1 k ( k 1 ) n log n and I j i < 1 k ( k 1 ) n log n
If neither of the above two condition holds, then from condition 1 we have I i j < 1 k ( k 1 ) n log n or I i j > n k 1 k ( k 1 ) n log n for any 0 i , j k 1 . Since i , j I i j = | I | n log n , there exists i , j such that I i j > n k 1 k ( k 1 ) n log n . Under such conditions, we also assume I j i > n k 1 k ( k 1 ) n log n . Let X be the vector that exchanges the value of w i with w j in X. We consider:
dist ( σ ¯ , X ) dist ( σ ¯ , X ) = | { r [ n ] | X r = w i , σ ¯ r w j } | + | { r [ n ] | X r = w j , σ ¯ r w i } | | { r [ n ] | X r = w i , σ ¯ r w i } | | { r [ n ] | X r = w j , σ ¯ r w j } | = n k I i j + n k I j i I i I j < 2 k ( k 1 ) n log n I i I j < 0
which contracts with the fact that σ ¯ is nearest to X. Therefore, we should have I j i < 1 k ( k 1 ) n log n . Now the ( i , j ) pair satisfies condition 2, which contracts with the fact that σ ¯ satisfies neither of the two conditions.
Under condition 1, we can get a lower bound on | A σ ¯ | from Equation (27). Let I i j = I i j for i j and I i i = n k I i . Then we can simplify | A σ ¯ | as:
| A σ ¯ | = n k | I | 1 2 i = 0 k 1 ( I i 2 + j = 0 k 1 I i j 2 ) = n 2 2 k 1 2 i = 0 k 1 j = 0 k 1 I i j 2
We further have i = 0 k 1 j = 0 k 1 I i j 2 ( k 1 ) n 2 k 2 + ( n k I i j ) 2 + I i j 2 where I i j satisfies condition 1. Therefore, i = 0 k 1 j = 0 k 1 I i j 2 ( k 1 ) n 2 k 2 + ( 1 k ( k 1 ) n log n ) 2 + ( n k 1 k ( k 1 ) n log n ) 2 = n 2 k 2 n 2 k 2 ( k 1 ) log n ( 1 + o ( 1 ) ) . As a result,
A σ ¯ n 2 k 2 ( k 1 ) log n ( 1 + o ( 1 ) )
Under condition 2, we can get a lower bound on N σ ¯ . Since dist ( σ ¯ , X ) dist ( σ ¯ , X ) 0 , from (30) we have I i j + I j i + I i + I j 2 n k . Since I i I i j > n k 1 k ( k 1 ) n log n , we have I j 2 k ( k 1 ) n log n . Now consider I j I j n k 3 k ( k 1 ) n log n . From (25): N σ ¯ 1 2 ( n k 3 k ( k 1 ) n log n ) 2 = n 2 2 k 2 ( 1 + o ( 1 ) ) .
Now we use the Chernoff inequality to bound Equation (29); we can omit γ log n n on the left-hand side since it is far smaller than 1. Let Z Bernoulli ( a log n n ) , Z Bernoulli ( b log n n ) , then:
P G ( D ˜ ( σ ¯ , C ) ) ( E [ exp ( s Z ) ] ) | B σ ¯ | ( E [ exp ( s Z ) ] ) | A σ ¯ | · exp ( s ( γ log n n N σ ¯ C β n ) ) exp ( | B σ ¯ | b log n n ( e s 1 ) + | A σ ¯ | a log n n ( e s 1 ) s ( γ log n n N σ ¯ C β n ) )
Using | B σ ¯ | = N σ ¯ + | A σ ¯ | we can further simplify the exponential term as:
log n n [ | A σ ¯ | ( b ( e s 1 ) + a ( e s 1 ) ) + N σ ¯ ( b ( e s 1 ) γ s ) ] + s C β n
Now we investigate the function g 1 ( s ) = b ( e s 1 ) + a ( e s 1 ) and g 2 ( s ) = b ( e s 1 ) γ s . Both functions take zero values at s = 0 and g 1 ( s ) = ( b e s a e s ) , g 2 ( s ) = b e s γ . Therefore, g 1 ( 0 ) = b a < 0 , g 2 ( 0 ) = b γ < 0 and we can choose s * > 0 such that g 1 ( s * ) < 0 , g 2 ( s * ) < 0 . To compensate the influence of the term s C n / β we only need to make sure that the order of log n n min { | A σ ¯ | , N σ ¯ } is larger than n. This requirement is satisfied since either | A σ ¯ | n 2 k 2 ( k 1 ) log n ( 1 + o ( 1 ) ) or N σ ¯ n 2 2 k 2 ( 1 + o ( 1 ) ) . □
Lemma 9.
If γ > b , β > β * , For 1 r n log n and ϵ > 0 , there is a set G ( r ) such that:
P G ( G n ( r ) ) 1 n r ( g ˜ ( β ) / 2 + ϵ )
and for every G G n ( r ) ,
P σ | G ( dist ( σ , X ) = r | D ( σ , X ) ) P σ | G ( σ = X | D ( σ , X ) ) < n r g ˜ ( β ) / 2
For r > n log n , there is a set G ( r ) such that:
P ( G G n ( r ) ) 1 e n
and for every G G n ( r ) ,
P σ | G ( dist ( σ , X ) = r | D ( σ , X ) ) P σ | G ( σ = X | D ( σ , X ) ) < e n
Proof. 
We distinguish the discussion between two cases: r n log n and r > n log n .
When r n log n , we can show that dist ( σ , X ) = r implies D ( σ , X ) by using the triangle inequality of dist. For f S k \ { id } , where id is the identity mapping, we have:
2 n k dist ( f ( X ) , X ) dist ( σ , f ( X ) ) + dist ( σ , X )
Therefore, dist ( σ , f ( X ) ) 2 n k n log n dist ( σ , X ) and Equation (33) is equivalent with:
P σ | G ( dist ( σ , X ) = r ) P σ | G ( σ = X ) < n r g ˜ ( β ) / 2
The left-hand side can be written as:
P σ | G ( dist ( σ , X ) = r ) P σ | G ( σ = X ) = dist ( σ ¯ , X ) = r exp ( β ( H ( σ ¯ ) H ( X ) ) ) by ( 24 ) dist ( σ ¯ , X ) = r exp ( β n ( B σ ¯ A σ ¯ ) )
where β n = β ( 1 + γ log n n ) .
Define Ξ n ( r ) : = dist ( σ ¯ , X ) = r exp ( β n ( B σ ¯ A σ ¯ ) ) and we only need to show that:
P G ( Ξ n ( r ) n r g ˜ ( β ) / 2 ) n r ( g ˜ ( β ) / 2 + ϵ )
Define the event Λ n ( G , r ) : = { B σ ¯ A σ ¯ < 0 , σ ¯ s . t . dist ( σ ¯ , X ) = r } , and we proceed as follows:
P G ( Ξ n ( r ) n r g ˜ ( β ) / 2 ) P G ( Λ n ( G , r ) c ) + P G ( Ξ n ( r ) n r g ˜ ( β ) / 2 | Λ n ( G , r ) )
For the first term, since | { σ ¯ | dist ( σ ¯ , X ) = r } | = ( k 1 ) r n r , by Lemma 7, P G ( Λ n ( G , r ) c ) ( k 1 ) r n r g ( β ¯ ) n r ( g ˜ ( β ) / 2 + ϵ / 2 ) . For the second term, we use Markov inequality:
P G ( Ξ n ( r ) n r g ˜ ( β ) / 2 | Λ n ( G , r ) ) E [ Ξ n ( r ) | Λ n ( G , r ) ] n r g ˜ ( β ) / 2
The conditional expectation can be estimated as follows:
E [ Ξ n ( r ) | Λ n ( G , r ) ] = dist ( σ ¯ , X ) = r t r log n = 1 P G ( B σ ¯ A σ ¯ = t r log n ) exp ( β n t r log n ) ( k 1 ) r n r + r β n ( b a ) / k + dist ( σ ¯ , X ) = r t r log n = r b a k log n 1 P G ( B σ ¯ A σ ¯ = t r log n ) exp ( β n t r log n )
r + r β n ( b a ) / k = f β n ( b a k ) < g ˜ ( β n ) , therefore, ( k 1 ) r n r + r β n ( b a ) / k n r g ˜ ( β ) / 2 n r ( g ˜ ( β ) / 2 + ϵ / 2 ) . Using Lemma 7, we have:
P G ( B σ ¯ A σ ¯ = t r log n ) exp ( β n r t log n ) n r ( f β n ( t ) 1 + O ( 1 log n ) )
Since β n β , ϵ , when n is sufficiently large we have g ˜ ( β n ) g ˜ ( β ) + ϵ / 2 . Therefore,
dist ( σ ¯ , X ) = r t r log n = r ( b a ) / k log n 1 P G ( B σ ¯ A σ ¯ = t log n ) exp ( β n r t log n ) n r ( g ˜ ( β n ) g ˜ ( β ) / 2 ) n r ( g ˜ ( β ) / 2 + ϵ / 2 ) O ( log n ) ( k 1 ) r
Combining the above equations, we have:
P G ( Ξ n ( r ) n r g ˜ ( β ) / 2 ) n r ( g ˜ ( β ) / 2 + ϵ / 2 ) O ( log n ) ( k 1 ) r n r ( g ˜ ( β ) / 2 + ϵ )
When r > n log n , using Lemma 8, we can choose a sufficiently large constant C > 1 such that k n exp ( C n ) < e n :
P σ | G ( dist ( σ , X ) = r | D ( σ , X ) ) P σ | G ( σ = X | D ( σ , X ) ) = D ( σ , X ) dist ( σ , X ) = r P σ | G ( σ = σ ¯ ) P σ | X ( σ = X ) > exp ( n )
happens with probability less than e n . Therefore, Equation (35) holds.□
If γ > b and β < β * , we have the following lemma:
Lemma 10.
If γ > b and β < β * , there is a set G n ( 1 ) such that P G ( G n ( 1 ) ) 1 n g ( β ¯ ) and:
E [ r = 1 n exp ( β n ( A r s A r 0 ) ) | G G n ( 1 ) ] = ( 1 + o ( 1 ) ) n g ( β n )
Var [ r = 1 n exp ( β n ( A r s A r 0 ) ) | G G n ( 1 ) ] ( 1 + o ( 1 ) ) n g ( 2 β n )
Lemma 10 is an extension of Proposition 10 in [12] and can be proved using almost the same analysis. Thus we omit the proof of Lemma 10 here.
Lemma 11.
If γ > b and β < β * , there is a set G n such that:
P G ( G n ) 1 ( 1 + o ( 1 ) ) max { n g ( β ¯ ) , n g ˜ ( 2 β n ) 2 g ( β n ) + ϵ }
and for every G G n ,
P σ | G ( dist ( σ , X ) = 1 | D ( σ , X ) ) P σ | G ( σ = X | D ( σ , X ) ) ( 1 + o ( 1 ) ) n g ( β n )
Proof. 
The left-hand side of Equation (41) can be rewritten as:
P σ | G ( dist ( σ , X ) = 1 ) P σ | G ( σ = X ) = ( 1 + o ( 1 ) ) s = 1 k 1 r = 1 n exp ( β n ( A r s A r 0 ) )
Let G n ( 1 ) be defined in Lemma 10 and G n ( 2 ) : = { | r = 1 n exp ( β n ( A r s A r 0 ) ) ( 1 + o ( 1 ) ) n g ( β n ) | n g ( β n ) ϵ / 2 } .
Using Chebyshev’s inequality, we have:
P G ( G G n ( 2 ) | G G n ( 1 ) ) n g ˜ ( 2 β n ) 2 g ( β n ) + ϵ
Let G n = G n ( 1 ) G n ( 2 ) :
P G ( G G n ) = P G ( G n ( 1 ) ) P G ( G G n ( 2 ) | G G n ( 1 ) ) ( 1 n g ˜ ( 2 β n ) 2 g ( β n ) + ϵ ) ( 1 n g ( β ¯ ) ) = 1 ( 1 + o ( 1 ) ) max { n g ( β ¯ ) , n g ˜ ( 2 β n ) 2 g ( β n ) + ϵ }
and for every G G n ,
r = 1 n exp ( β n ( A r s A r 0 ) ) = ( 1 + o ( 1 ) ) n g ( β n )
Therefore, from Equation (42) we have:
P σ | G ( dist ( σ , X ) = 1 ) P σ | G ( σ = X ) ( 1 + o ( 1 ) ) n g ( β n )
Let Λ : = { ω j · 1 n | j = 0 , , k 1 } where 1 n is the all-ones vector with dimension n, and we have the following lemma:
Lemma 12.
Suppose γ < b and σ ¯ satisfies dist ( σ ¯ , 1 n ) n log n and D ( σ ¯ , 1 n ) . Then the event P σ | G ( σ = σ ¯ ) > exp ( C n ) P σ | G ( σ = 1 n ) happens with a probability (with respect to SSBM) less than exp ( τ ( α , β ) n log n ) where C is an arbitrary constant, τ ( α , β ) is a positive number.
Proof. 
Let n r = | { σ ¯ i = w r | i [ n ] } | . Then n 0 n r for r = 1 , , k 1 since arg min σ Λ dist ( σ ¯ , σ ) = 1 n . Without loss of generality, we suppose n 0 n 1 n k 1 . Define N σ ¯ = 1 2 ( n ( n 1 ) r = 0 k 1 n r ( n r 1 ) ) = 1 2 ( n 2 r = 0 k 1 n r 2 ) . Denote the event P σ | G ( σ = σ ¯ ) > exp ( C n ) P σ | G ( σ = 1 n ) as D ( σ ¯ , C ) , which can be transformed as:
( 1 + γ log n n ) σ ¯ i σ ¯ j , X i = X j Z i j + σ ¯ i σ ¯ j , X i X j Z i j γ log n n N σ ¯ + C β n
Firstly we estimate the order of N σ ¯ , and obviously N σ ¯ 1 2 n 2 . Using the conclusion in Appendix A of [18], we have:
r = 0 k 1 n r 2 n n 0 n 0 n 2 n 2 2 n 0 ( n n 0 ) n 0 > n 2
By assumption of dist ( σ ¯ , 1 n ) n log n , we have n 0 n n log n and n 0 n k follows from n 0 n r . When n 0 > n 2 , we have N σ ¯ n 0 ( n n 0 ) n 2 log n ( 1 + o ( 1 ) ) . The second inequality is achieved if n 0 = n n log n . When n 0 < n 2 , N σ ¯ n 2 n n 0 2 n 2 4 and the second inequality is achieved when n 0 = n 2 . Thus generally we have n 2 log n ( 1 + o ( 1 ) ) N σ ¯ n 2 2 .
Since C β n = o ( log n n N σ ¯ ) we can rewrite Equation (43) as:
σ ¯ i σ ¯ j X i = X j Z i j + σ ¯ i σ ¯ j X i X j Z i j γ log n N σ ¯ n ( 1 + o ( 1 ) )
Let N 1 = σ ¯ i σ ¯ j , X i = X j 1 and N 2 = σ ¯ i σ ¯ j , X i X j 1 = N σ ¯ N 1 .
Using the Chernoff inequality we have:
P G ( D ( σ ¯ , C ) ) ( E [ exp ( s Z ) ] ) N 1 ( E [ exp ( s Z ) ] ) N 2 · exp ( γ log n N σ ¯ s n ( 1 + o ( 1 ) ) ) = exp ( log n n ( 1 + o ( 1 ) ) ( e s 1 ) ( a N 1 + b N 2 ) + γ log n N σ ¯ s n ( 1 + o ( 1 ) ) )
Since s > 0 and a > b , we further have:
P G ( D ( σ ¯ , C ) ) exp ( N σ ¯ log n n ( b ( e s 1 ) + γ s + o ( 1 ) ) )
Let h b ( x ) = x b x log x b , which satisfies h b ( x ) < 0 for 0 < x < b , and take s = log γ b > 0 , using N σ ¯ n 2 log n we have:
P G ( D ( σ ¯ , C ) ) exp ( N σ ¯ log n n h b ( γ ) ( 1 + o ( 1 ) ) ) exp ( h b ( γ ) n log n ( 1 + o ( 1 ) ) )
Proof of Theorem 2.
(1) Since P σ ( σ S k ( X ) ) = f S k P σ ( σ f ( X ) | D ( σ , f ( X ) ) ) P σ ( D ( σ , f ( X ) ) ) , we only need to establish P σ ( σ X | D ( σ , X ) ) n g ˜ ( β ) / 2 + ϵ . From Lemma 9, we can find G n ( r ) for r = 1 , , n . Let G n = r = 1 n G n ( r ) and choose ϵ 2 ; from Equations (32) and (34), we have:
P G ( G n c ) = P G ( r = 1 n ( G n ( r ) ) c ) r = 1 n / log n n r ( g ˜ ( β ) / 2 + ϵ / 2 ) + n e n 1 2 n g ˜ ( β ) / 2 + ϵ
where the last equality follows from the estimation of sum of geometric series. On the other hand, for every G G n , from Equations (33) and (35), we have:
P σ | G ( σ X | D ( σ , X ) ) 1 P σ | G ( σ X | D ( σ , X ) ) = P σ | G ( σ X | D ( σ , X ) ) P σ | G ( σ = X | D ( σ , X ) ) < r = 1 n / log n n r g ˜ ( β ) / 2 + n e n
from which we can get the estimation P σ | G ( σ X | D ( σ , X ) ) 1 2 n g ˜ ( β ) / 2 + ϵ . Finally,
P σ ( σ X | D ( σ , X ) ) = G G n P G ( G ) P σ | G ( σ X | D ( σ , X ) ) + P G ( G n c ) n g ˜ ( β ) / 2 + ϵ .
(2) When β < β * , using Lemma 11, for every G G n we can obtain:
1 P σ | G ( σ = X | D ( σ , X ) ) P σ | G ( σ = X | D ( σ , X ) ) ( 1 + o ( 1 ) ) n g ( β n )
We then have:
P σ | G ( σ = X | D ( σ , X ) ) ( 1 + o ( 1 ) ) n g ( β n )
Then:
P σ ( σ = X | D ( σ , X ) ) P ( G n c ) + G G n P G ( G ) P σ | G ( σ = X | D ( σ , X ) ) ( 1 + o ( 1 ) ) n g ( β n ) + ( 1 + o ( 1 ) ) max { n g ( β ¯ ) , n g ˜ ( 2 β n ) 2 g ( β n ) + ϵ } ( 1 + o ( 1 ) ) max { n g ( β ¯ ) , n g ( β ) + ϵ }
(3) When γ < b , for any f S k , we have dist ( f ( X ) , Λ ) = ( k 1 ) n k > n log n . Therefore, using Lemma 12, we can find a graph G n such that P C ( G n ) exp ( n C ) and for any G G n , P σ | G ( σ = f ( X ) ) exp ( C n ) . Therefore,
P a ( X ^ * ) P G ( G n ) + k ! exp ( C n ) = ( 1 + k ! ) exp ( C n )
The conclusion of P a ( X ^ * ) exp ( C n ) follows since C can take any positive value. □

8.3. Proof of Theorem 3

Lemma 13
(Lemma 8 of [7]). Let m be a positive number larger than n. When Z 1 , , Z m are i.i.d. Bernoulli( b log n n ) and W 1 , , W m are i.i.d Bernoulli( a log n n ), independent of Z 1 , , Z m , then:
P ( i = 1 m ( Z i W i ) 0 ) exp ( m log n n ( a b ) 2 )
Proof of Theorem 3.
Let P F ( r ) denote the probability when there is σ satisfying dist ( σ , X ) = r and H ( σ ) < H ( X ) .
From Equation (23), when σ differs from X only by one coordinate, from Lemma 13 the probability for H ( σ ) < H ( X ) is bounded by P G ( A r s A r 0 > 0 ) n ( a b ) 2 k . Therefore, P F ( 1 ) ( k 1 ) n g ( β ¯ ) . Using Lemma 7, we can get P F ( r ) ( k 1 ) r n r g ( β ¯ ) for r n log n . For r n log n , choosing C = 0 in Lemma 8 we can get r n log n P F ( r ) e n . That is, the dominant term is r n log n P F ( r ) since the other part decreases exponentially fast. Therefore, the upper bound for error rate of X ^ is:
P F = r = 1 n P F ( r ) ( 1 + o ( 1 ) ) r = 1 ( k 1 ) r n r g ( β ¯ ) ( 1 + o ( 1 ) ) ( k 1 ) n g ( β ¯ ) 1 ( k 1 ) n g ( β ¯ ) = ( k 1 + o ( 1 ) ) n g ( β ¯ )
When σ W * , since | { r [ n ] | σ r = ω i } | = I i + n k I i , we have I i = I i . From Lemma 6, we can see | B σ ¯ | = | A σ ¯ | and N σ ¯ = 0 . Then from Equation (24), H ( σ ¯ ) < H ( X ) is equivalent with B σ ¯ > A σ ¯ .
Therefore, when dist ( σ ¯ , X ) n log n and D ( σ , X ) , from Equation (31), we have A σ ¯ n 2 k 2 ( k 1 ) log n ( 1 + o ( 1 ) ) . We use Lemma 13 by letting m = | A σ ¯ | when m n log n ; the error term is bounded by r n log n P F ( r ) r n log n ( k 1 ) r exp ( ( a b ) 2 k 2 ( k 1 ) n log n ) ) exp ( n ) , which decreases exponentially fast. For m < n log n , we can use Lemma 7 directly by considering r = 2 n log n P F ( r ) . The summation starts from r = 2 since σ W * . Therefore,
P F = r = 2 n P F ( r ) ( 1 + o ( 1 ) ) r = 2 ( k 1 ) r n r g ( β ¯ ) ( ( k 1 ) 2 + o ( 1 ) ) n 2 g ( β ¯ ) .

Author Contributions

The work of this paper was conceptualized by M.Y., who also developed the mathematical analysis methodology for the proof of the main theorem of this paper. All simulation code was written by F.Z., who also extended the idea of M.Y., concreted the proof and wrote this paper. The work is supervised and funded by S.-L.H. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported in part by the Natural Science Foundation of China under Grant 61807021, in part by the Shenzhen Science and Technology Program under Grant KQTD20170810150821146, and in part by the Innovation and Entrepreneurship Project for Overseas High-Level Talents of Shenzhen under Grant KQJSCX20180327144037831.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SBMStochastic Block Model
SSBMSymmetric Stochastic Block Model
MSEMean Squared Error
MLmaximum likelihood
MQmaximum modularity

References

  1. Fortunato, S. Community detection in graphs. Phys. Rep. 2010, 486, 75–174. [Google Scholar] [CrossRef] [Green Version]
  2. Feng, H.; Tian, J.; Wang, H.J.; Li, M. Personalized recommendations based on time-weighted overlapping community detection. Inf. Manag. 2015, 52, 789–800. [Google Scholar] [CrossRef]
  3. Hendrickson, B.; Kolda, T.G. Graph partitioning models for parallel computing. Parallel Comput. 2000, 26, 1519–1534. [Google Scholar] [CrossRef] [Green Version]
  4. Cline, M.S.; Smoot, M.; Cerami, E.; Kuchinsky, A.; Landys, N.; Workman, C.; Christmas, R.; Avila-Campilo, I.; Creech, M.; Gross, B.; et al. Integration of biological networks and gene expression data using Cytoscape. Nat. Protoc. 2007, 2, 2366. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  5. Holland, P.W.; Laskey, K.B.; Leinhardt, S. Stochastic blockmodels: First steps. Soc. Netw. 1983, 5, 109–137. [Google Scholar] [CrossRef]
  6. Abbe, E. Community detection and stochastic block models: Recent developments. J. Mach. Learn. Res. 2017, 18, 6446–6531. [Google Scholar]
  7. Abbe, E.; Bandeira, A.S.; Hall, G. Exact recovery in the stochastic block model. IEEE Trans. Inf. Theory 2015, 62, 471–487. [Google Scholar] [CrossRef] [Green Version]
  8. Mossel, E.; Neeman, J.; Sly, A. Consistency thresholds for the planted bisection model. Electron. J. Probab. 2016, 21, 24. [Google Scholar] [CrossRef] [Green Version]
  9. Abbe, E.; Sandon, C. Community detection in general stochastic block models: Fundamental limits and efficient algorithms for recovery. In Proceedings of the 2015 IEEE 56th Annual Symposium on Foundations of Computer Science, Berkeley, CA, USA, 17–20 October 2015; pp. 670–688. [Google Scholar]
  10. Nowicki, K.; Snijders, T.A.B. Estimation and prediction for stochastic blockstructures. J. Am. Stat. Assoc. 2001, 96, 1077–1087. [Google Scholar] [CrossRef]
  11. Ising, E. Beitrag zur theorie des ferromagnetismus. Z. Für Phys. 1925, 31, 253–258. [Google Scholar] [CrossRef]
  12. Ye, M. Exact recovery and sharp thresholds of Stochastic Ising Block Model. arXiv 2020, arXiv:2004.05944. [Google Scholar]
  13. Liu, J.; Liu, T. Detecting community structure in complex networks using simulated annealing with k-means algorithms. Phys. A Stat. Mech. Appl. 2010, 389, 2300–2309. [Google Scholar] [CrossRef]
  14. Metropolis, N.; Rosenbluth, A.W.; Rosenbluth, M.N.; Teller, A.H.; Teller, E. Equation of state calculations by fast computing machines. J. Chem. Phys. 1953, 21, 1087–1092. [Google Scholar] [CrossRef] [Green Version]
  15. Potts, R.B. Some generalized order-disorder transformations. In Mathematical Proceedings of the Cambridge Philosophical Society; Cambridge University Press: Cambridge, UK, 1952; Volume 48, pp. 106–109. [Google Scholar]
  16. Liu, L. On the Log Partition Function of Ising Model on Stochastic Block Model. arXiv 2017, arXiv:1710.05287. [Google Scholar]
  17. Berthet, Q.; Rigollet, P.; Srivastava, P. Exact recovery in the Ising blockmodel. Ann. Stat. 2019, 47, 1805–1834. [Google Scholar] [CrossRef] [Green Version]
  18. Chen, Y.; Suh, C.; Goldsmith, A.J. Information recovery from pairwise measurements. IEEE Trans. Inf. Theory 2016, 62, 5881–5905. [Google Scholar] [CrossRef] [Green Version]
  19. Hajek, B.; Wu, Y.; Xu, J. Achieving exact cluster recovery threshold via semidefinite programming. IEEE Trans. Inf. Theory 2016, 62, 2788–2797. [Google Scholar] [CrossRef] [Green Version]
  20. Saad, H.; Nosratinia, A. Community detection with side information: Exact recovery under the stochastic block model. IEEE J. Sel. Top. Signal Process. 2018, 12, 944–958. [Google Scholar] [CrossRef] [Green Version]
  21. Newman, M.E. Equivalence between modularity optimization and maximum likelihood methods for community detection. Phys. Rev. E 2016, 94, 052315. [Google Scholar] [CrossRef] [Green Version]
  22. He, J.; Chen, D.; Sun, C. A fast simulated annealing strategy for community detection in complex networks. In Proceedings of the 2016 2nd IEEE International Conference on Computer and Communications (ICCC), Chengdu, China, 14–17 October 2016; pp. 2380–2384. [Google Scholar]
  23. Clauset, A.; Newman, M.E.; Moore, C. Finding community structure in very large networks. Phys. Rev. E 2004, 70, 066111. [Google Scholar] [CrossRef] [Green Version]
  24. Diaconis, P.; Saloff-Coste, L. What do we know about the Metropolis algorithm? J. Comput. Syst. Sci. 1998, 57, 20–36. [Google Scholar] [CrossRef] [Green Version]
  25. Frigessi, A.; Martinelli, F.; Stander, J. Computational Complexity of Markov Chain Monte Carlo Methods for Finite Markov Random Fields. Biometrika 1997, 84, 1–18. [Google Scholar] [CrossRef]
  26. Erdős, P.; Rényi, A. On the evolution of random graphs. Publ. Math. Inst. Hung. Acad. Sci. 1960, 5, 17–60. [Google Scholar]
  27. Holland, P.W.; Leinhardt, S. A Method for Detecting Structure in Sociometric Data. Am. J. Sociol. 1970, 76, 492–513. [Google Scholar] [CrossRef]
Figure 1. Illustration of Theorem 2.
Figure 1. Illustration of Theorem 2.
Entropy 23 00065 g001
Figure 2. Experimental results.
Figure 2. Experimental results.
Entropy 23 00065 g002
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zhao, F.; Ye, M.; Huang, S.-L. Exact Recovery of Stochastic Block Model by Ising Model. Entropy 2021, 23, 65. https://doi.org/10.3390/e23010065

AMA Style

Zhao F, Ye M, Huang S-L. Exact Recovery of Stochastic Block Model by Ising Model. Entropy. 2021; 23(1):65. https://doi.org/10.3390/e23010065

Chicago/Turabian Style

Zhao, Feng, Min Ye, and Shao-Lun Huang. 2021. "Exact Recovery of Stochastic Block Model by Ising Model" Entropy 23, no. 1: 65. https://doi.org/10.3390/e23010065

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop