{'fraction_non_alphanumeric': 0.031717176549381686, 'fraction_numerical': 0.008276126007606383, 'mean_word_length': 5.069173259780794, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 9, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Survey of Community Detection Approaches: From Statistical Modeling to Deep Learning

Community detection, a fundamental task for network analysis, aims to partition a network into multiple sub-structures to help reveal their latent functions. Community detection has been extensively studied in and broadly applied to many real-world network problems. Classical approaches to community detection typically utilize probabilistic graphical models and adopt a variety of prior knowledge to infer community structures. As the problems that network methods try to solve and the network data to be analyzed become increasingly more sophisticated, new approaches have also been proposed and developed, particularly those that utilize deep learning and convert networked data into low dimensional representation. Despite all the recent advancement, there is still a lack of insightful understanding of the theoretical and methodological underpinning of community detection, which will be critically important for future development of the area of network analysis. In this paper, we develop and present a unified architecture of network community-finding methods to characterize the state-of-the-art of the field of community detection. Specifically, we provide a comprehensive review of the existing community detection methods and introduce a new taxonomy that divides the existing methods into two categories, namely probabilistic graphical model and deep learning. We then discuss in detail the main idea behind each method in the two categories. Furthermore, to promote future development of community detection, we release several benchmark datasets from several problem domains and highlight their applications to various network analysis tasks. We conclude with discussions of the challenges of the field and suggestions of possible directions for future research.


INTRODUCTION
N ETWORK science is the study of complex systems in the form of networks using theories and techniques of computer science, mathematics and physics. In particular, network structures [1] (see an example in Fig 1) have been studied extensively under the notions of subgraphs, network modules, and communities. Identification of network structures or community detection is to divide nodes in a network into groups where the nodes in a group are densely connected whereas nodes in different groups are sparsely linked. Mining network structures is also the key to revealing and comprehending organizational principles and operational functions of complex network systems. For example, community detection has been applied to recommendation [2], [3], anomaly detection [4], [5], and terrorist organization identification [6], just to name a few. Much effort has also been devoted to the analysis of network structural properties, e.g., the small world effect (i.e., the average distance between nodes is short [8]) and the scale free property (i.e., the distribution of node degrees follows a power law distribution [9]).
Many algorithms for community detection have been proposed, a majority of which employ exclusively the information of network topology. They include hierarchical Fig. 1: An illustrative example (Zacharys karate club network [7]) showing community structure. The nodes of this network are divided into two groups, with most connections falling within groups and only a few between groups.
clustering [10] [11], modularity optimization [12] [13] [14], spectral clustering [15] [16] and statistical inference [17] [18]. New methods were developed to utilize node semantics or node attributes in addition to network topology to improve the quality of resulting communities and meanwhile provide explanation to the results. These include heuristic optimization (multi-objective) [19] [20], matrix factorization [21] [22] and Bayesian model [23]. As more complex network problems were tackled, complex network data from multiple sources, e.g., network topology and node semantics, must be effectively integrated. As a result, it became difficult for these traditional approaches to perform data fusion effectively on data of very high dimensions and diverse properties. The technique of deep learning was recently adopted to handle the high dimensional network data and learn low-dimensional representation of network structures. Examples include methods based on the auto-encoder [24] [25] and the generative adversarial approach [26] [27].
An important and effective idea for community detection is to learn an adequate representation of the network structure of a given network. We call such approaches learning-based community detection. Among these methods are the model-based generative models. The most popular and representative example is the stochastic block model (SBM) [28], which detects communities by formalizing a generative process of a network as a sequence of rigorous probability distributions. Several extensions and improvements have been introduced to boost the performance of SBM [29] [30]. Another model-based learning approach adopts Markov random field (MRF), an undirected graphical model, to take advantage of neighborhood structures in networks [31]. A primary recent development in learning-based methods exploits the low-dimensional representation capability of deep learning. For instance, convolutional neural network (CNN) [32] utilizes convolution and pooling operations to reduce the dimensions of network data, so as to effectively discover communities in networks. Graph convolutional network (GCN) [33], which inherits the advantages of CNN and directly operates on network structured data, has also been explored to derive community representation [34].
Despite the endured effort to develop effective methods for community detection [35], [36], there is still a lack of understanding of the theoretical and methodological underpinning of community detection, particularly that based on learning. To bridge this gap, in this paper, we will provide a synthesized survey of the existing representative methods. We focus particularly on two general lines of approaches, one based on probabilistic modeling and the other on deep learning. We start with a detailed description of each line of the work and provide a thorough review and comparison of the methods. We then consider several applications of community detection in diverse fields. We finish with the discussion of some critical challenges of the field of network analysis and directions for future rewarding research.
One of the major objectives of our survey is to provide a new perspective on the existing methods to help better understand the fundamental issues and enabling techniques for community detection. Our survey differs from the published ones in three aspects. First, we summarize the existing methods by focusing on learning, a central issue of community modeling and community detection, whereas the existing reviews [37] [38] generally discuss the chronological development of the existing methods. Second, we present a recent trend in the development of methods for community detection, i.e., from statistical modeling to deep learning, while the others focus mainly on individual techniques, e.g., evolutionary computation [39], statistical inference [40] or deep learning [41]. Third, we present a unified system architecture to characterize the existing methods, which provides a novel and synthesized perspective on methods based on statistical modeling and deep learning, which go significantly beyond some of the existing surveys [42] [43]. Last but not least, in the era of deep learning, as network data become increasingly more complex and various ideas and techniques have been proposed, a survey is urgently needed to comprehensively unravel the inherent relationships among the existing methods for community detection.
Aiming at offering a general guidance to researchers and practitioners who are interested in network science and network data analysis, we make our unique contributions in this work as summarized below. • We present the most comprehensive and extensive overview of learning-based community detection and divide them into two categories, probabilistic graphical model and deep learning. To the best of our knowledge, this is the first attempt devoted to community detection from the perspective of learning. It offers a solid foundation for understanding the intuition behind community detection, and can be used as a guideline for designing and utilizing different methods for community detection. • We provide a thorough theoretical analysis of learningbased community detection methods, discuss their similarities and differences, identify critical challenges that remain poorly addressed and point out five directions for future development. • We gather abundant resources on learning-based community detection, including state-of-the-arts benchmark datasets and applications. The rest of this survey paper is organized as follows. Section 2 gives the preliminaries and categorization of existing community detection approaches. Section 3 presents a technical overview of research progress in statistical modeling for community detection. Section 4 overviews the research on deep learning-based community detection. Section 5 discusses applications of community detection. We suggest promising future research directions in Section 6 and conclude in Section 7.

PRELIMINARIES AND CATEGORIZATION
We first introduce the terms and notations, and then present a classification of the methods for community detection that we will discuss in this paper.

Definitions, Terms and Notations
and a maximal number q of attributes x i on a node v i , where all x i 's collectively give rise to an n × q attribute matrix X = (x i ) n×q . The topological structure of G can be defined by an n × n adjacency matrix A = (a ij ) n×n , where a ij = 1 if e ij ∈ E, or 0, otherwise. G is undirected if a ij = a ji , or directed, otherwise [42].
Definition 2. Community. The network G contains k communities C = {C 1 , C 2 , . . . , C k }, where C i is a subgraph of G and the nodes within C i are densely connected whereas the nodes across C i and C j are sparsely connected. The communities are non-overlapping when C i ∩ C j = ∅ ∀i, j.
Definition 3. Community Detection. Given a network G, community detection is to design a mapping F to assign every node v i of G into at least one of the k communities, i.e., to label v i at least one community identity c i ∈ {C 1 , C 2 , . . . , C k }. Equivalently, the problem is to derive a community assignment of nodes C = (c 1 , c 2 , . . . , c n ).

A Taxonomy of Community Detection Approaches
To help better understand the existing learning-based methods and facilitate our discussion in the rest of the paper, we introduce a taxonomy of the methods for community detection (Fig. 2) where the methods are grouped into two categories, probabilistic graphical model and deep learning.
Probabilistic graphical model-based methods employ heuristics or meta-heuristics on community generation to discover network communities. These methods typically adopt some models of network structures to describe the dependencies among the entities (i.e., nodes) via the edges of the networks. Depending the type of probabilistic graphical models used, community detection can be further divided into three main categories: directed graphical models, undirected graphical models and hybrid graphical models. Specifically, directed graphical models are mainly based on hidden variables (i.e., variables not observed in the sample), leveraging similarity of nodes or block structures, to generate the observed edges in a network; undirected graphical models are usually based on field structures, using the constraints of unary and pairwise potentials (e.g., the community label agreement between nearby nodes) to discover community; hybrid graphical models normally transform these two types of models into a unified factor graph to take advantages of both models for community detection.
Deep learning-based methods aim to identify community structures utilizing a new type of communityoriented network representation. It derives the new network representation through some learning strategies that map network data from the original input space to a low-dimensional feature space, with the advantages of low computational complexity and high capability for parallelization. Depending on the learning strategies used, deep learning-based methods fall into four main categories: auto-encoder-based, generative adversarial network-based, graph convolutional network (GCN)-based, and integrat-ing graph convolutional networks and undirected graphical models. Concretely, auto-encoder-based methods exploit unsupervised auto-encoder, which encodes a network into a low-dimensional representation in the latent space and reconstructs the network, along with its community structures, from the low-dimensional representation. Generative adversarial network-based methods adopt the idea of adversarial learning. They detect communities via an adversarial game between a generator and a discriminator. Graph convolutional network-based methods extract communities by the propagation and aggregation of features on network topology. Hybrid graphical model-based methods integrate graphical convolutional networks and undirected graphical models by, for example, converting a Markov random field (MRF) layer into GCN, to take advantages of both models.

COMMUNITY DETECTION WITH PROBABILISTIC GRAPHICAL MODEL
Probabilistic graphical models-based methods ordinarily detect communities through network modeling, i.e., employing graphical models to explain the generation process of networks. In this section, we will focus on three general methods: directed graphical models, undirected graphical models, and hybrid graphical models integrating directed and undirected graphs.

Directed Graphical Models
We will review the recent development of directed graphical models for community detection, including stochastic block model, topic model and matrix factorization. These methods have solid theoretical basis and reasonably good performance, and have been broadly applied.

Stochastic Block Model-based Methods
Stochastic block model (SBM), an effective generative model of network block structures, adopts statistical modeling for community detection for the first time [28]. The method probabilistically assigns nodes in a network to different communities (block structures) using a node membership likelihood function, and then progressively infers the probabilities of node memberships by inferencing on the likelihood function to derive hidden communities in the network. Note that there are several SBM variants for community detection, but their core generation process is the same. The basic generation process can be divided into two steps: the first is to iteratively assign a community to each node in the network, and the second is to compute or update the probability of two nodes connected by an edge.
Taking a social network as an example, SBM can be used to capture a probabilistic generation process with the community distribution as a hidden variable. The communities can be reconstructed by maximizing a likelihood function of the node community membership. In this social network, the nodes are partitioned into k disjoint communities with probability ω = {ω 1 , . . . , ω k }. Assuming there are two nodes v i and v j belonging to two communities C r and C s , represented by c ir and c js . The probability that nodes v i and v j connected by an edge, i.e., a ij (0 or 1), obeys a Bernoulli distribution with parameter π rs . The use of a link probability between nodes in two communities makes the model flexible with various types of network structures [44]. The network generation distribution can be defined as: Bernoulli(a ij |π rs ) circjs = n i<j k r,s (π aij rs (1 − π rs ) (1−aij ) ) circjs , where C = (c 1 , c 2 , . . . , c n ) denotes the community assignment of nodes, and π = (π rs ) k×k represents the community connection probability matrix. Then, the likelihood function can be described as: Based on the likelihood function, Gibbs sampling and the expectation-maximization (EM) algorithm can be used to obtain the model parameters, e.g., ω and π. Finally, we can derive the community partition with the interaction model between communities. The time complexity of the basic SBM is O(n 2 k 2 ), and the process of community detection based on SBM with a Bernoulli distribution is shown in Appendix B [28]. The generation process of the basic SBM may also employ a Poisson distribution [45]. Later, Zhang et al. [46] study the problem of hidden class inference in basic SBM. They present a comparative study between three inference approaches, i.e., heuristic spectral methods, mean field approximation and belief propagation, on synthetic networks.

Mixed membership SBMs.
Since the basic SBM is only suitable under the assumption that a node belongs to only one community, Airoldi et al. [29] propose a mixed membership stochastic blocks model (MMSB) that introduces mixed membership to the stochastic model so that one node may belong to multiple communities. MMSB allows communities to overlap on a directed network, where a i→j indicates whether there is a link (arrow) from nodes v i to v j . For each node v i , c i obeys a Multinomial distribution. If v i ∈ C r and v j ∈ C s , the community connection probability π rs follows a Beta distribution and a i→j ∼ Multinomial(ω i ), a i←j ∼ Multinomial(ω j ), where ω is the mixed membership parameter of nodes. The links between communities are represented by a Bernoulli distribution. The joint distribution of MMSB can be formulated as: The time complexity of MMSB is O(n 2 k), and the process of community detection based on MMSB is described in Appendix B [29], which assumes that the parameters are estimated by inference methods such as EM.
The original MMSB is not good at handling diverse types of the information of nodes in community, e.g., the nodes may represent people who are connected one another based on different social relationships. To address this problem, Fan et al. [47] propose a novel MMSB-based method, named Copula mixed membership stochastic block model (cMMSB) to introduce a Copula function into MMSB to model dependencies among nodes. Moreover, Miller et al. [48] improve the inference of MMSB by introducing a Dirichlet process mixture to a mixture of finite mixtures (MFMs). Pal et al. [49] propose a mixed membership degree-correct SBM and develop an inference method of the posterior distribution with Markov chain Monte Carlo (MCMC), to boost the embedding performance of MMSB. The degree-corrected SBM is widely used, which we will discuss next.
Degree-corrected SBMs. Newman et al. [30] reason that the basic SBM divides nodes according to their degrees that are usually nonuniform distributed. To accommodate the possible broad degree distributions, they propose degreecorrected SBM (DCSBM), which introduces a degree parameter to every node to scale the edge probabilities and make expected degrees match observed degrees. The probability function of network G is defined as follows: where π cicj is the expected value of the adjacency matrix element a ij . There are also several variants of DCSBM model. Gulikers et al. [51] propose an improved DCSBM which is feasible for sparse networks. Some other distinct lines of effort are to improve and extend DCSBM by model in- Dynamic SBMs. Different from the above methods, analyzing dynamic networks based on SBM is also a relatively active field. Yang et al. [56] suggest a dynamic stochastic block model named DSBM, which progressively updates the probabilistic model to find community in large dynamic sparse network. Specifically, DSBM uses the distribution of model parameter instead of the most likely values for the model parameters in prediction, and provides an offline inference and an online inference to estimate the parameters. DSBM assumes that nodes in a dynamic network remain unchanged. Letting C T = {C (1) , C (2) , ..., C (T ) } be the collection of community assignments of all nodes over T discrete time steps, and the likelihood function of the model is as follows: where W (t) and C (t) denote the snapshot of a network and the community assignments of nodes at a given time step t. The time complexity of DSBM is O(nT + mT + k 2 T ), and its generation process is illustrated in Appendix B [56], Following DSBM, Tang et al. [57] introduce the Dirichlet process to SBM, which can find the optimal number of communities of evolution, and in turn, alleviate the problem of fixed community number of dynamic social networks. Xu et al. [66] propose a new approach named stochastic block transition model (SBTM) that includes two hidden Markov assumptions for dynamic network. Wu et al. [67] propose a full Bayesian generation model, which incorporates the heterogeneity of the degrees of nodes to model dynamic complex networks. Bhattacharjee et al. [61] optimize SBM with change-point estimation in dynamic social networks. Inspired by the success of MMSB, some dynamic SBMs based on MMSB have been proposed. Xing et al. [55] propose a variant MMSB model for dynamic networks. Fu et al. [54] design a state space mixed membership stochastic block model with crossing time. Besides, there also exists DCSBMbased approaches. Wilson et al. [59] suggest a dynamic version of DCSBM to model and monitor dynamic networks that undergo a significant structural change.
Others. In addition to the above methods, there are several other extensions to the basic SBM where communities can overlap, as summarized in Table 2. For instance, OSBM represents the SBM that are designed to find overlapping communities and LSBM represents the SBM that are extended to find link community. Specifically, Latouche et al. introduce OSBM with global and local variational technology. Jin et al. [64] provide a stochastic model to accommodate the relative importance and the expected degree of every node in each community, and improve the inference technique that it uses.
Link communities are often more informative and intuitive than node communities, because links usually have unique identities, whereas nodes may have multiple roles. For instance, in a social network, most individuals belong to multiple communities such as families or friends, while the link between two individuals often exists for a dominant reason, which may represent family ties or friendship. Furthermore, multiple links connecting to a node may belong to distinct link communities, so that the node can be assigned to multiple communities of links. He et al. [18] combine heterogeneous distributions (e.g., power law distribution) of community sizes with SBM for link community detection. They suggest a stochastic model for link community and extend the model by introducing a scheme of interactive bipartition. Besides the above models, Mehta et al. [65] introduce graph neural network into SBM, which integrate deep learning and SBM for the first time.

Topic Model-based Methods
Topic model, such as Latent Dirichlet Allocation (LDA) [68], is a statistical model capable of modeling hidden topics behind texts in natural language processing. LDA models topics by employing latent variables, which have attracted significant interests and have been widely used in detecting communities. Topic models can be grouped into two categories: one models network structures as documents and the other models attributes of network, such as user interests, to detect communities.
Modeling network structures as documents. We take LDA as an example to describe the principle of the methods in the first category. To be specific, a method in this group first assumes that each node in a network may belong to multiple communities, and thus the communities are regarded as "topics" while the nodes are taken as "documents". It then selects several initial communities, and iteratively updates the communities according to the topology of the network to obtain resulting communities. Among the existing methods, a representative model is SSN-LDA [69], which is a LDA-based hierarchical Bayesian algorithm on link networks where communities are modeled as latent variables. Nodes in such a social network are regarded as social actors and edges as social interaction. Social interaction profile (SIP) of each social actor, consisted of a set of neighbors and weights, is used to characterize the actor. Specifically, in SSN-LDA, a social network is viewed as a corpus, where social interaction profiles are regarded as documents and the occurrence of social interaction is deemed as words. The nodes are modeled as a corpus by SSN-LDA, which mines communities on transformed corpus, and this problem is equivalent to topic detection on corpus utilizing LDA. The generation process of SSN-LDA for one social interaction profile (SIP i ) is clarified in Appendix C [69], and the joint distribution is written as: where φ is the mixture component of community c i , N i is the number of social interactions in a social interaction profile (SIP i ), θ i is the community mixture proportion for SIP i , and α and β are the Dirichlet prior distribution hyperparameters that are known. The time complexity of SSN-LDA is O(mk).
Using social network attributes. Numerous topic models utilize attributes of social network, e.g., user interests, to discover community. Yin et al. [70] propose to integrate community detection and topic model, which gives rise to latent community topic analysis (LCTA). Their method divides the sampling process into user node and link samplings. The process is to sample all network connections after sampling a user node, and exploit the sampling results of these two stages as the sampling result of user node. LCTA assigns community membership attributes to each user node and link. After the sampling process, user nodes can be assigned to communities based on community membership. The advantage is that the two-stage sampling process forms a sampling area with user nodes as the core, which can simulate the semantic influence of user nodes on surrounding links. The disadvantage is that LCTA does not consider the link relationship of social network when assuming the degree of community membership, which may disconnect individual communities. Further, Cha et al. [71] design a tree relationship model according to the topic information of followers in social network, use hierarchical LDA to model the text information in tree relationship model, and propose HLDA for semantic social network analysis.
A method of combining topic model with Bayesian model is proposed recently by Xu et al. [72]. They define a joint probability distribution for all possible attributed networks. For a given attributed social network to be clustered, the model assigns a probability to each possible clustering of nodes. Therefore, the clustering problem can be transferred to the problem of finding the clusters that have the highest probability. The algorithm for clustering attribute communities is shown in Appendix C [72]. The Bayesian probabilistic model for clustering attributed networks is as follows: P (α, θ, φ, A, X, C|ε, λ, µ, ν) = P (α|ε)P (θ|λ)P (φ|µ, ν)P (C|α)P (A|C, φ)P (X|C, θ), (8) where α denotes the probability of the nodes belonging to different communities, θ represents the attribute probability distribution of nodes, φ denotes the edge occurrence probability between communities, ε and λ are the Dirichlet prior distribution hyper-parameters, and µ and ν are the Beta prior distribution hyper-parameters. Later, He et al. [73] introduce a generative model for simultaneously identifying communities and deriving their semantic description. They combine a nested EM algorithm with belief propagation, and explore the hidden correlation between the two parts to improve resulting communities and description. Jin et al. [74] observe that the attributes usually embody a hierarchical semantic structure. To handle this, they propose a novel Bayesian model named BTLSC, which distinguishes words from background and general from specialized topics.
Unlike traditional topic models that assume that the topics of social network are independent, topic embedding methods focus on describing correlations between topics by embedding words and topics into topic models. He et al. [75] present a topic embedding model that combines distributed representation learning with topic correlation modeling. Jin et al. [76] develop a novel topic embedding model named community-enhanced topic embedding (CeTe), which combines topic documents and network structures to detect communities. CeTe consists of three components: a document component for describing topics, a topological component for representing network communities, and a probabilistic transition mechanism connecting the first two parts. Specifically, CeTe uses a DCSBM to describe the sub-component of network community, where communities obey a Dirichlet distribution, and topics obey a Uniform distribution. For each document, the community assignment is drawn from a Multinomial distribution, whereas the link between two documents obeys a Bernoulli distribution. For each word, CeTe draws topic distribution following a Multinomial distribution.

Matrix Factorization-based Methods
Non-negative matrix factorization (NMF) [77] is another directed graphical model for community detection. Specifically, the NMF-based methods assume there are k communities in a network, and deem the adjacency matrix A = (a ij ) n×n ∈ R + as a non-negative matrix to be decomposed, where a ij denotes the likelihood if there is a connection between nodes v i and v j . We define W = (w ir ) n×k ∈ R + and H = (h jr ) n×k ∈ R + , whose elements w ir and h jr represent the likelihoods that v i generates an out-edge, i.e., an edge starting from v i , and v j generates an in-edge, i.e., an edge ending at v j , belonging to the r-th community. Then, the likelihood that nodes v i and v j are connected can be described as: As a result, the community detection problem can be represented as A = WH T . In general, there are two classic loss functions to evaluate the performance of NMF. One is the square of the Frobenius norm of the difference between A and A [78], and the other is the KL-divergence that measures their difference. Furthermore, for a undirected network with A being symmetric, the non-negative factorization matrices W and H should be equal. In this paper, we use B to represent these matrices, and the loss function can be written as: NMF is initially used to identify non-overlapped community. Since it is easily extendable, NMF has been adopted to solve other types of community detection problems, such as overlapping, attributed, dynamic and semi-supervised, as summarized in Table 3.
Basic NMF. Kuang et al. [79] propose a general approach, which inherits the advantages of NMF by enforcing non-negativity on the clustering assignment matrix, for graph clustering. Shi et al. [80] present a novel pairwise constrained non-negative symmetric matrix factorization (PCSNMF) method, which imposes pairwise constraints generated from ground-truth community information, to improve the performance of community detection. Sun et al. [81] design a non-negative symmetric encoder-decoder approach to derive a better latent representation to improve community detection. Unlike other NMF-based methods that merely pay attention to the loss of the decoder, they combine the loss of the decoder and encoder to construct a unified loss function, so that the community membership of each node obtained is clearer and more explanatory.
Overlapping NMF. Overlapping community detection is another active research topic due to the overlapping and nesting properties of real-world networks. Wang et al. [21] develop a NMF framework to identify non-overlapping and overlapping community structure, and give a symmetric NMF formula for undirected networks. Moreover, they clarify the methods on asymmetric NMF and joint NMF, where the former is capable of identifying community structures in directed networks, while the latter is more suitable for compound networks (e.g., an automatic movie recommendation system which contains three networks: user network, movie network and user-movie network). Yang et al. [82] present a cluster affiliation model BIGCLAM to detect densely overlapping, hierarchically nested, and nonoverlapping communities in a massive network. Specifically, BIGCLAM first builds on communities based on community affiliation of nodes, i.e., each node has an affiliation strength to each community via assigning node-community pair a non-negative latent factor, and then combines the NMF with block stochastic gradient descent, so as to estimate the non-negative latent factors to detect communities in large networks. The loss function of the model is defined as: The time complexity of BIGCLAM is O(n). Attribute NMF. Recently, it has attracted a substantial amount of interest to the semantic information of com- Develop a symmetric NMF framework based on Newton-like for graph clustering.
Present a symmetric NMF method with pairwise constraints generated from the ground-truth community information.
Pose a non-negative symmetric encoder and decoder approach to obtain a better network representation.
Present a cluster affiliation model for overlapping, hierarchically nested community detection in large scale networks.

Yes Yes
Attribute NMTF (2015) [83] Develop a NMF clustering framework combining nodes' relations and users' contents to detect community structure.
Propose a semantic community identification method, which can annotate semantic as well as detect community.
Present a Bayesian probabilistic model based on NMF to identify overlapping communities in temporal networks.
Develop a semi-supervised evolutionary NMF framework for dynamic community detection via prior information.
Present a unified semi-supervised community detection algorithm based on combination of prior and topology information aimed NMF.
No No munity structure utilizing NMF, i.e., delineating the corresponding community semantic information while identifying community structure [83], [84], [88]. In particular, Pei et al. [83] combine social relations and content of users to detect communities via a non-negative matrix trifactorization (NMTF)-based clustering with three types of graph regularization. However, the above method merely exploits network topology and content information to discover communities, without considering how to utilize the mined contents, i.e., semantic information, to explain the meaning of communities. To address this issue, wang et al. [84] propose a semantic community identification called SCI, which integrates the community membership matrix denoting network topology and community attribute matrix representing semantic information. The loss function of the model is defined as: where S represents attribute community matrix, α is a tradeoff hyper-parameter between the first error and the second sparsity term, and β is a positive parameter for setting the proportion of the contribution of network topology. The time complexity of SCI is O((nqk + n 2 k)), where q is the dimension of node attribute. Dynamic and semi-supervised NMF. It deserves further attention that, during recent years, several investigators have extended NMF in the field of dynamic and semisupervised community detection, and achieved encouraging results. For dynamic community detection, Wang et al. [85] utilize a Bayesian model based on NMF to identify overlapping communities on temporal networks, and automatically derive the number of communities in each snapshot network based on automatic relevance determination. The loss function is as follows: where V t is a snapshot of a temporal network, B t is the nonnegative matrix obtained via V t , and B ′′ t−1 is the new B t−1 which has been adjusted according to the node distribution of B t . β (·) is a parameter from a half normal distribution, and α is a parameter to balance the clustering results of the current and previous snapshot networks. Later, Ma et al. [86] show that NMF can be applied to dynamic community detection via clarifying the equivalence relationship among evolutionary spectral clustering, evolutionary NMF and optimization of evolutionary modularity density. Therefore, they employ the above equivalence relationship to develop a semi-supervised evolutionary NMF method, named sE-NMF, to integrate the prior information to detect communities in dynamic temporal networks.
For semi-supervised community detection, Yang et al. [87] put forward a unified semi-supervised algorithm by combining prior information and topology information aimed at two non-negative matrices generated by NMF. Moreover, with the must-link prior information (i.e., the prior information that a node pair composed of two nodes must belong to the same community [94]), they add a graph regularization item as a penalty function to the loss function to minimize the difference between nodes in the same community, thereby improving the performance of community detection. The loss function is defined as: where O denotes the matrix of prior information. L α (A, B) is the loss function of NMF, where α ∈ {LSE, KL, SYM, MOD, ADJ, LAP, NLAP} is the parameter to measure similarity. λR β (O, B) is a graph regulation term, where λ is the tradeoff parameter between the loss function and graph regulation term, and β ∈ {LSE, KL} is the specific graph regulation term.

Summary for Direct Graphical Models
The direct graphical models typically transform the community detection problem into a Bayesian inference problem based on the observed network data and then optimize model parameters utilizing a maximum likelihood function or a maximum of a posteriori to obtain hidden variables of the model to discover network community structures. However, these methods often ignore the diversity of community patterns (e.g., community structure with homophily or heterophily) in the real world, and the network topology used is often noisy and sparse, limiting the performance of community detection.

Undirected Graphical Models
To the best of our knowledge, the existing studies of undirected graphical models for community detection mainly exploit Markov random field (MRF) [95]. MRF, a kind of random field, has enjoyed much success covering a variety of applications, such as computer vision and image processing. Particularly, we are interested in its applications to community detection. The MRF-based methods can be grouped into three categories (as summarized in Table 4): the first is the modeling based on MRF that detects community relation based on network topology, the second exploits the information of semantic attributes, and the third combines MRF with graph neural network (GNN). Topology MRF. He et al. [31] first apply MRF to network analysis where data are organized on networks with irregular structures, and propose a network-specific MRF approach, namely NetMRF, for community detection. This method effectively encodes the structural properties of an irregular network in an energy function so that the minimization of the energy function gives rise to the best community structures. The energy function can be represented as the sum of pairwise potential functions, written as follows: where δ is the probability of nodes v i and v j falling into the same community partition, d i is the degree of node v i , and m is the numbers of edges. According to [95], the smaller the function, the better the community partition. Further, Jin et al. [90] formalize the modularity function as a statistical model and propose a novel MRF method for community detection. This method redefines the energy function via the approach of modularity representation, and leverages the max-sum belief propagation (BP) to infer model parameters to improve the performance. The energy function is represented as follows: The time complexity is O(m). Moreover, to overcome the issue of losing vital structural information between nodes after network embedding, Jin et al. [89] propose a general MRF method to incorporate coupling relationship between pairs of nodes in network embedding to better detect community. In this method, the energy function is composed of two components: a set of unary potentials that make the network embedding to play a dominant role and a set of pairwise potentials that utilize constraints on node pairs to fine-tune unary potentials. Formally, the complete energy function can be defined as: where Θ i and Θ ij are the unary potential function and pairwise potential function respectively.
Topology & attribute MRF. The combination of MRF and node semantic models (e.g., a topic model) have been a recent research focus. However, methods that directly integrate MRF with node semantic models cannot in general achieve satisfactory results. It is mainly because the parameters of the two models cannot be adjusted to support each other, making it difficult to combine the advantages of the two methods. He et al. [91] propose a new model, named attrMRF, to integrate LDA [68] and MRF to form an end-to-end learning system to train the parameters jointly. Concretely, attrMRF first transforms LDA and MRF into a unified factor graph, realizing the effective integration of directed graphic model (i.e., LDA) and undirected graphic model (i.e., MRF). Then it adopts a backpropagation (BP) algorithm to train the parameters simultaneously, resulting in an end-to-end learning of the two models. The global energy function of this model is represented as: GMRF (2019) [89] Optimize network embedding and develop a general MRF framework by incorporating network embedding into MRF to better detect community structure.
ModMRF (2020) [90] Propose a MRF method formalizing modularity as the energy function for community detection.
Topology & attribute attrMRF (2019) [91] Present a model integrating LDA into MRF to form an end-to-end learning system for community detection.
Design a new approach based on the combination of GCN and MRF for semi-supervised community detection. − Propose a new approach combining the advantages of both statistical relational learning and graph neural network for semi-supervised node classification.
where vi =vj Θ ij (c i , c j ; a ij ) denotes the global energy potential of MRF as defined in (15), β 1 is a temperature coefficient, f θr and f φp are the intermediate results generated by LDA joint probability distribution. Besides attrMRF, there are also several approaches incorporating probabilistic graphical models into deep learning, such as MRFasGCN [92] and GMNN [93], which will be covered in detail later. The undirected graphical models mainly use the characteristics of MRF, i.e., unary and pairwise potentials for irregular network structure and node attribute, to identify community structures. Nevertheless, different energy functions need to be fine-tuned.

Integrating Directed and Undirected Models
Directed and undirected graphical models have also been integrated to detect communities in complex networks. This type of integration is typically implemented via a factor graph model. A factor graph [96] is a tuple (V, F , ε) consisting a set V of variable nodes, a set F of factor nodes, and a set ε ⊆ V × F of edges each of which connects a variable node and a factor node. Taking MRF as an example, the joint probability distribution of a factor graph is described as: where Z = y∈Y F ∈F ψ F (y N (F ) ) denotes a normalization factor, and N (F ) = {v i ∈ V : (v i , F ) ∈ ε} is the set of variable nodes adjacent to factor node F . Yang et al. [97] first propose an instantiation model based on factor graph, which incorporates three layers, bottom layer (observed nodes), middle layer (hidden vector) and top layer (latent variables for communities). It utilizes nodefeature and edge-feature functions to mine dependencies between bottom and top layer nodes to represent corresponding communities, so as to better detect communities. Further, Jia et al. [98] apply factor graph model to egocenter network (a kind of representation of human social networks, which is used to represent the network between an individual and others that the ego has a social relationship with [99]), and propose an ego-centered method to analyze social academic influence on co-author networks. This method model the ego-centered community detection in a unified factor graph, employing a parameter learning algorithm to estimate the topic-level social influence, the social relationship strength between these nodes and community structures to detect ego-community structures.
These methods merely identify the structure of communities and ignore the semantic information of community, which is much critical for understanding the meaning of community structure. He et al. [91] employ a factor model to overcome the deficiency that directed graphical model (i.e., LDA) and undirected graphical model (i.e., MRF) are insufficient to integrate due to parameter sharing and joint training and to make the discovered community structure semantically interpretable. The joint probability distribution of MRF and LDA formulated in factor graph is written as: where Z denotes normalization term, f θr and f φp are defined in (18), and f γij is the pairwise potential of nodes v i and v j . Their major contributions lie in that they adopt the fusion technique of MRF and LDA to deal with community detection, which can well overcome the difficulties that two model's parameters are hard to share and train together via factor graphs and belief propagation. The emergence of factor graph models that integrate directed and undirected graphical models has greatly improved the performance of community detection. However, these probabilistic graph models generally adopt variational inference or Markov chain Monte Carlo (MCMC) sampling for model optimization, which inevitablely leads to high computational complexity. Deep learning, with the ability to effectively optimize on high-dimensional network data, has a potential in handling community detection.

COMMUNITY DETECTION WITH DEEP LEARNING
In recent years, deep learning has drawn a great deal of attention and has been demonstrated to have great power on 4: Summary of auto-encoder-based community detection, where "A" and "X" denote whether the approach utilize network topology and node attributes respectively, and "-" represents no constraint.  [117] propose a probabilistic generative model, i.e., vGraph, to jointly detect overlapping (and nonoverlapping) communities and learn node (and community) representation. vGraph represents each node by a mixture of communities and defines a community as a Multinomial distribution over nodes. Furthermore, Cavallari et al. [118] find that there is a closed-loop relationship among community detection, community embedding, and node embedding. Guided by this insight, they present a novel community embedding method, called ComE, to jointly solve the three tasks altogether. He et al. [119] design a novel selftranslation network embedding (STNE) approach, which maps the content sequence to node identity sequence to improve community detection. Although these methods have had reasonable performance on discovering communities, they are straightforward applications of deep learning to community detection [120], without considering the characteristics of networks, e.g., irregularity of network topology and complex network structures. In this section, we will discuss the following four types of methods that are designed for complex networks, i.e., auto-encoder-based, generative adversarial networkbased, graph convolutional network-based, and methods integrating graph convolutional network and undirected graphical models.

Auto-encoder-based Methods
Auto-encoders [121] are simple but important neural models that convert high-dimensional (network) data into low-dimensional representations. Concretely, auto-encoders learn a new representation of data in an unsupervised manner using the encoder and decoder components. They always have multi-hidden layers and a symmetrical architecture, and the output of one layer is the input to its successive layer. The objective of auto-encoders is to minimize the error between original input and reconstructed data to learn an optimal hidden representation, which can be denoted as: where f (·; θ 1 ) and g(·; θ 2 ) are the encoder and decoder with parameters θ 1 and θ 2 , and l(·) is the loss function. Herein, we choose several representative auto-encoderbased models for network community detection, and summarize their main characteristics in Table 4. Since most auto-encoder-based methods derive network embeddings as their outputs (e.g., [100], [103]), clustering, such as Kmeans and spectral clustering, is subsequently applied to extract communities. An alternative is to integrate clustering into the model (e.g., [105], [108]), to directly discover communities. Depending on the type of auto-encoder used, we divide the models into four types, namely stacked, sparse, denoising and variational auto-encoders. Stacked auto-encoder, a basic type that consists of a series of autoencoders, is often used as a block for other types of autoencoders. Particularly, when a stacked model has other targets, such as sparsity and denoise, we classify them as sparse or denoising auto-encoders.
Stacked auto-encoders. The semi-DNR [100] stacks a sequence of auto-encoders to form a deep nonlinear reconstruction of the input networks (DNR), and requires that each layer of the encoder contains fewer neurons than the previous layer to reduce the data dimension and extract the most salient features in the input data. Semi-DNR makes full use of the prior knowledge if v i and v j belong to the same community to incorporate pairwise constraints between the two nodes in the network. Specifically, it defines a prior information matrix O = (o ij ) n×n , where o ij = 1 if v i and v j are known to be in the same community, or 0, otherwise. The loss function for semi-DNR is represented as: where L = D − O, Tr(·) is the trace of a matrix, M the modularity matrix, Z the reconstruction data, H the representation matrix and λ a parameter for making a tradeoff between the reconstruction error and consistency of the new representation given the prior information. Further, a layer-wise stacked auto-encoder in DeCom [105] is adopted to find seed nodes and add nodes to communities according to the structure of the network. It is remarkable that DeCom is suitable for handling large networks and there is no need to pre-define the number of communities due to the adaptive learning process. Besides, CDDTA [104] effectively combines transfer learning and auto-encoder. AAGR [103] and DIR [101] utilize stacked auto-encoders to incorporate the information of topology and attributes adaptively, thus well realizing the balance between network topology and node attributes. NEC [106] employs graph convolutional networks to encode and decode network data, which takes topology and attribute information as input, but only selects to reconstruct the adjacency matrix to ensure that the model can still work without node attributes.
Sparse auto-encoders. Large-scale networks are in general difficult to store and process, so it is necessary to have a sparse representation. A new line of research is to adaptively find the optimal representation by adding a sparse constraint to auto-encoder for this purpose. GraphEncoder [107] introduces an explicit regularization term for the hidden layer to restrict the size of hidden representation. If z i is the i-th vector of reconstructed data, the reconstruction error with sparsity constraints are as follows: where β controls the sparsity penalty, ρ and ρ are the sparsity parameters, where the former denotes the average activation of a neuron across a collection of training samples, and the latter denotes the average activation across all training samples. The time complexity of GraphEncoder is O(nbd), where b is the maximum number of hidden layer nodes, and d is the average degree of the graph. DFuzzy [108] is a parallel and scalable fuzzy clustering model with sparse auto-encoders as building blocks. It trains an autoencoder using personalized PageRank, which is effective for capturing relationships among network nodes. Besides, CD-MEC [109] combines transfer learning with auto-encoder, where input matrix A is used to build four similarity matrices of complex networks. CDMEC takes one matrix as the source domain, and the other three matrices as the target domain to obtain multiple distinct low-dimensional feature representations. All representations are then put into a clustering algorithm, and the clustering results are integrated into a new, concensus matrix Q. The consensus matrix Q is introduced to measure the co-occurrence of samples in the clustering result, where Q ij represents the average times that v i and v j are grouped into the same class. Denoising auto-encoders. Denoising auto-encoders can be applied to noisy inputs to get node representation that is robust to noise. MAGE [24] first employs a convolutional network to integrate content and structure information, and then iteratively adds random noises to content information in the auto-encoder process. In this way, the structure information and content information are integrated into a unified framework, and the interplay between the two can be analyzed. Further, Yang et al. [110] propose GRACE to deal with dynamic networks. They model clusters under the consideration of network dynamics, and believe that the formation of clusters requires dynamic embedding to reach a stable state.
Variational auto-encoders. There are also approaches based on variational auto-encoder [122], which views the hidden representation as a latent variable with its own prior distribution. In variational inference, it exploits an approximation q(H|X) of the true posterior p(H|X) of the latent variable and tries to approximate the variational posterior q(H|X) to the true prior p(H) using the KL-divergence as a measure. For instance, the theme of ARVGA [111] is not only to minimize the reconstruction errors of network structure, but also to enforce the latent codes to match a prior distribution: (24) During the training of VGAECD [112], the reconstruction loss deviates from its primary objective of clustering. The new VGAECD [114] rectifies this issue by introducing a dual variational objective. Further, Sarkar et al. [115] propose a gamma ladder VAE based deep generative model that infers multilayered embeddings for the nodes via multiple layers of stochastic latent variables to improve the performance of community detection. Jin et al. [116] propose the NetVAE that uses one encoder and one dual decoder with two different generative mechanisms to reconstruct network topology and node attributes separately.

Generative Adversarial Network-based Methods
Generative adversarial networks (GANs) [123], which are inspired by the minimax two-player game, have achieved unprecedented success in various fields. GANs typically consist of two modules, a generator G and a discriminator D. The generator is to capture the data distribution, i.e., to generate samples that are as similar to the real data as possible; while the discriminator is to estimate the probability that a sample a piece of real data rather than synthetic data generated by the generator. Formally, the training process of GANs can be defined as: D(G(z)))]), (25) where the first expectation is the loss of discriminator for real data and the second is the loss of discriminator for synthetic data generated by the generator.
The inspiration of applying GANs to community detection came from the fact that GANs are usually unsupervised, and (in theory) the new data generated have the same distribution as real data, which provides a powerful network data analysis capability. Jia et al. [26] propose a novel method called CommunityGAN to adopt the idea of affiliation graph model (AGM) to boost the performance by introducing the minimax competition between the network motif-level generator and the discriminator. It first composes some representation vectors of nodes by assigning each node-community pair a nonnegative factor that represents the degree of membership of the node to community, and then optimizes such representation through a specifically designed GAN to detect communities. The joint value function is formulated as: where θ D (and θ G ) is the union of representation vectors of all nodes in the discriminator D (and generator G), m the motifs of networks and s the subset of nodes. By employing GANs, CommunityGAN can find overlapping communities and learn a graph representation altogether. Further, Zhang et al. [27] present a novel approach of seed expansion with generative adversarial learning (SEAL). It employs a discriminator to predict whether a community is real or not and a generator to construct communities to trick the discriminator by implicitly fitting features of real ones for learning heuristics for community detection. Tao et al. [124] propose an adversarial graph auto-encoder (AGAE) method, which incorporates ensemble clustering into a deep graph embedding process to guide the network training utilizing an adversarial regularizer.
There are also methods based on GANs to derive node representation that can be applied to community detection, e.g., employing clustering algorithms such as K-means for deriving embeddings to acquire resulting communities [125], [126], [127]. He et al. [128] further argue that the existing GANs-based methods do not make full use of the essential advantages of GANs, which are to learn the underlying representation mechanism rather than the representation itself. To this end, they propose to utilize adversarial idea on the representation mechanism to acquire node representation for downstream tasks. Specifically, the training loss is defined as follows: where E represents the encoder that derives node representation, M I(x, E(x)) is the mutual information between the node attributes and node representation, D is the discriminator that identifies the mutual information from either positive or negative samples, and G is the generator that generates negative samples by calculating the mutual information between fake node attributes based on Guassian noise. Yang et al. [129] argue that most GANs compare the results of embeddings with samples obtained from Gaussian distribution without rectification from real data, making them not truly beneficial for adversarial learning. Therefore, they design a joint adversarial network embedding (JANE) model, which jointly distinguishes the real and fake combi-nations of embeddings, topology information and node attributes, to improve node embeddings and the performance of network analysis.

Graph Convolutional Network-based Methods
Graph convolutional networks (GCNs) [33], the most representative branch of graph neural network methods [130] for learning representation from graph data, have attracted a great deal of attention thanks to its success on supervised and semi-supervised classification of nodes in a network. Several novel GCNs-based algorithms have also been developed lately to exploit the power of GCNs for effectively modeling and inferring high-dimensional complex network data for community detection.
Jin et al. [131] raise the concern that embeddings derived from GCNs are not community-oriented and community detection is inherently unsupervised. To address this problem, they introduce an unsupervised model, named JGE-CD, for community detection through joint GCN embedding. It consists of three modules, a dual encoder that derives two embeddings using the original attribute network and its variant; a community detection module that stacks on top of dual encoder to detect community; and a topology reconstruction module that is employed to reconstruct network topology. Formally, the probability that the i-th node belongs to the r-th community is defined as: where h i represents the embedding of node v i obtained from GCN and θ the model parameters. Furthermore, He et al. [132] extend JGE-CD by designing a new GCN approach that casts MRFasGCN (to be discussed in Section 4.4 shortly) as an encoder, and exploits a community-centric dual encoder to reconstruct network topology and node attributes separately, so as to perform unsupervised community detection. In particular, the decoder for reconstructing network topology is denoted as: where U is the probability distribution matrix of nodes belonging to different communities derived from the encoder, D the node degree matrix and W the weight matrix of neural networks. The decoder for reconstructing attributes is inspired by topic modeling, i.e., nodes in the same community are more likely to have similar distributions of attribute words. The attribute matrix can be generated by: where the definition of U is the same as that in (29) and R is the probability matrix of communities selecting attribute words from the entire word set. More recently, some researches for community detection make use of GCNs on heterogeneous networks that contain a diversity of types of nodes and relationships. Zheng et al. [133] design a heterogeneous-temporal GCN, namely HTGCN, to detect community from hetergeneous and temporal networks. Concretely, it first obtains feature representation of each hetergeneous network at each time step by adopting a heterogeneous GCN, and then utilizes a residual compressed aggregation mechanism to express both the static and dynamic characteristics of community. Beyond that, there are also certain approaches incorporating graph convolutional network with undirected graphical models, e.g., MRFasGCN [92] and GMNN [93], which will be discussed next.

Integrating Graph Convolutional Network and Undirected Graphical Models
In the last few years, a number of studies have begun to integrate graph convolutional network (GCN) and undirected graphical models (e.g., MRF or CRF) for community detection. The main idea of this line of research is that GCN essentially constructs node embeddings through local feature smoothing, which does not consider community properties and makes the node embeddings not communityoriented. While undirected graphical models generally offer a good global objective to describe community, it does not consider information on nodes and requires a substantial amount of computation for learning the model. Therefore, GCN and undirected graphical models are complementary and can be combined to take advantage of their strengths.
A major work in this line is MRFasGCN [92], which integrates GCN with MRF to solve the problem of semisupervised community detection in attributed networks. The method first extends NetMRF (as discussed in Section 3.2) to extended MRF (eMRF) by adding both unary potentials and attribute information, and then reparameterizes the MRF model to make it fit to the GCN architecture. The energy function of eMRF is defined as: where −p(h ci i ), whose value comes from the result of GCN, denotes the unary potential representing the probability that node v i belongs to community c i , µ(c i , c j )η(v i , v j ) is the pairwise potential where µ(c i , c j ) represents the similarity relationship between communities of nodes v i and v j , and η(v i , v j ) is the similarity of attributes of nodes v i and v j , and α is the parameter for making a tradeoff between the unary and pairwise potentials. The time complexity of MRFasGCN is O(mqlk 2 ), where q is the dimension of node attribute and l is the number of hidden units of the first layer.
After MRFasGCN, several other lines of work incorporate MRF or CRF into GCN to learn node embedding for community detection. Qu et al. [93] propose a new approach, called graph Markov neural network (GMNN), combines the advantages of both statistical relational learning and graph neural networks. A GMNN is able to learn an effective node representation and model label dependency between different nodes, thereby completing the task of semi-supervised node classification. The model parameters can be learned by employing pseudolikelihood variational expectation-maximization [134] to optimize the evidence lower bound (ELBO) of log-likelihood function, which is formulated as: where log p φ (y L |x V ) is the log-likelihood function of observed node labels, and q θ (y U |x V ) is any distribution over y U . Noting that the equality holds when q θ (y U |x V ) = p φ (y U |y L , x V ). Gao et al. [135] find that the existing GCNs fail to preserve the similarity relationship between different nodes hidden in network data. To handle this issue, they add a CRF layer to GCNs to force similar nodes to have similar hidden features. This will enhance the quality of node embeddings and, in turn, improve the performance of network analysis.

Summary for deep learning
Deep learning-based methods usually realize community detection by designing a community-oriented or universal network representation, followed by some clustering algorithms. Different types of deep-learning methods have been adopted to derive network representations, e.g., GCN or GAN. Learning such representations is to map network data from a high-dimensional input space to a low-dimensional feature space, with the superiority of low computational complexity and effective data fusion. However, similar to the most probabilistic graphical models, the existing deep learning-based methods are more suitable for community structures with homophily (where the nodes in a community are densely connected whereas nodes in different communities are sparsely linked), which may limit the robustness of these models.

APPLICATIONS OF COMMUNITY DETECTION
We start our discussion with a summary of the benchmark datasets that have been used in the area of community detection. We then describe real applications of community detection in many application fields.

Open Datasets
We have put the detailed information of the datasets used for community detection in a publicly accessible web 1 to facilitate open research on this rapidly-developing topic. These datasets can be separated into two groups, synthetic networks and real-world networks.

Synthetic networks
There are two classes of randomly generated synthetic networks with known community structures, i.e., the Girvan-Newman (GN) [1] and LFR networks [136]. The GN network consists of four non-overlapping communities with the same size. Each community has 32 nodes, each of which connects with 16 other nodes on average. Among these 16 edges, Z in edges connect to nodes of the same community, Z out edges to nodes of different communities, and Z in + Z out = 16. The LFR network, another widely adopted benchmark for testing the performance of algorithms for community detection, has distributions of node degree and community size which follow power laws with tunable exponents. The LFR network captures several important features of real-world systems, e.g., the scale free property.

Real-world Networks
The real-world networks that we examine include four types, i.e., social networks, citation networks, collaboration networks, and others, listed in Table 5. To be specific, social networks are formed by individuals and their interactions, including eight representative datasets such as Football and DBLP (Table 5). Citation networks consist of papers (or patents) and their relationships (e.g., citation or inclusion), including eight classic datasets such as Cora and arXiv. Collaboration networks are comprised of scientists and their collaborations (i.e., co-authoring papers), including four typical datasets such as Computer Science and Medicine. The nodes in these networks range from tens to millions, and the maximum number of edges reaches hundreds to hundreds of millions.  [140] 1490 16718 Cora [141] 2708 5429 Citeseer [141] 3312 4732 Large-hep 2 11,752 134,956 Pubmed [142] 19,729 44,338 arXiv [143] 576,000 6,640,000 US patents [144] 3,700,000 16,500,000 Collaboration Networks Computer Science [145] 22,000 96,800 Chemistry [145] 35,400 157,400 Medicine [145] 63,300 810,300 Engineering [145] 14,900 49,300 Others Amazon [139] 334,863 925,872 Google [146] 875,000 4,320,000

Practical Applications
We first discuss the applications of community detection on different domains, and then extend to other network analysis tasks. We finish by discussing the potential of community detection to network science.

Applications in Different Areas
Community detection has diverse applications across different domains [147], such as online social networks, neuroscience and image understanding. Online social networks, including Facebook, Twitter and Wechat, comprise the interactions among people through the web. Discovering community in such networks is an effective way to infer the relationships of individuals, which has been adopted for tasks such as spammer detection and crisis response. Yin et al. [148] develop a unified probabilistic generative model, namely user-community-geo-topic (UCGT), based on a Bayesian network that infers users' social communities by incorporating spatio-temporal data and semantic information to improve the accuracy and interpretability of social community detection. Wu et al. [149] design a novel MRFwithGCN model, which introduce a MRF layer 2. https://www.cs.cornell.edu/projects/kddcup/datasets.html that captures user following information to refine prediction made by GCN for social spammer detection. Neuroscience is a discipline studying the nervous systems and brain. With the recent development of brain mapping and neuroimaging techniques, the brain has begun to be modeled as networks. A large amount of effort has been put forward to exploit such networks to help extract the functional subdivisions of the brain. Liu et al. [150] propose a framework of siamese community preserving graph convolutional network (SCP-GCN). The method first retains the community structure considering the intra-community and inter-community properties in learning process, and then uses siamese architecture that models the pair-wise similarity to guide this learning process. Jin et al. [151] argue that the existing studies typically construct community structures of brain networks employing resting-state functional magnetic resonance imaging (fMRI) data. They introduce the dynamic time warping (DTW) algorithm that analyzes the synchronization and asynchronism of fMRI time series to extract the correlation between brain regions.
Image understanding is to generate semantic descriptions of images. Recently, works on image understanding utilizing community have emerged. Li et al. [152] present a novel deep collaborative embedding (DCE) model, which learns knowledge from weakly supervised communitycontributed resources, for multiple image understanding tasks simultaneously. Li et al. [153] propose a novel semisupervised RSNMF model by explicitly exploring the blockdiagonal structure of data for image representation.

Promotion of Network Analysis
With the great success of community detection, numerous application problems, e.g., recommendation and link prediction, have been formulated as finding community structures in network systems. We now discuss how the existing community detection methods are utilized to solve some of these problems.
Recommendation is a common task that addresses the issue of information overload for users by establishing a profile of user interests based on items in their purchasing or browsing history and later recommending similar items to users. The existing methods for recommendation including collaborative filtering [154] and neural networks [155]. In particular, the concept of community has been employed to improve the quality of recommendation. Eissa et al. [156] make recommendation based on interest-based communities that generated from topic based attributed social networks. Satuluri et al. [2] present a general-purpose representation layer, i.e., similarity-based clusters (SimClusters), which settles a multitude of recommendation tasks at Twitter via detecting bipartite communities from the useruser network and leveraging them as a representation space.
Link prediction is another important task in network mining. It deals with missing connections and predicts possible connections in the future through the analysis of observed network structure and external information. A large number of approaches have been proposed to facilitate link prediction via considering community. Xu et al. [157] indicate that the existing metric learning for link prediction ignores community that contain abundant structural information. Therefore, they design community specific similar-ity metrics by means of joint community detection to deal with cold-start link prediction where edges between nodes are unavailable. De et al. [158] propose a stacked two-level learning framework, which first learns a local similarity model exploiting locality structures and node attributes, and then combines the model with community-level features that derive utilizing co-clustering for link prediction.

Promotion of Network Science
Network science is an interdisciplinary research area, which can be used not only in computer science, but also in other fields such as sociology and biology. Community detection, one of the most important problem in network analysis, can tremendously promote the development of network science. For example, in citation network, nodes represent papers and edges represent the citations among papers. By grouping the papers (i.e., discovering communities where papers have similar attributes such as belonging to the same author or topic), we can analyze the influence of authors and accurately grasp the latest research trends or technologies, which is of guiding significance for comprehending network and further analyzing network pattern [159]. Similarly, in sociology and biology, community detection also provides a deeper understanding of network structure and promotes its development both in academia and industry.

FUTURE DIRECTIONS
While learning-based community detection, including probabilistic graphical model and deep learning, has demonstrated superior performance across a variety of problems and domains, there are challenges that need to be addressed. In this section, we briefly discuss these challenges and future research directions potentially worth pursuing.

Large Networks
With the rapidly increasing scale of network data, more large networks have become the standard across many different scientific domains. These networks typically have tens of thousand or billions of nodes and edges as well as complex structural patterns. Most existing community detection methods face excessive constraints on such large networks due to the potentially prohibitive demand on memory and computation. They may require a large number of training instances [160] or model parameters [161] to make the existing methods effective. Moreover, the existing approaches typically handle these problems by network reduction or approximation, which may lose some important network information and affect the modeling accuracy. This raises the question of how to devise a framework that far exceeds the current benchmarks in accuracy and efficiency.

Community Interpretability
Although community detection has been studied for more than a decade, the interpretability of community remains an important and critical issue to be adequately addressed. Most current community detection methods utilize top ranked words or short phrases in the results to summarize communities, even though the attribute information of nodes is typically complete sentences that have more information than individual words [73], [162]. However, these methods may not be intuitive enough for understanding the semantics of communities due to the small number of words and unclear relationship between words. How to make the best use of network information to provide a better semantic interpretation for community is one of future research directions.

Adaptive Community Model Selection
Adaptive model selection for community detection aims to choose the most appropriate algorithm for discovering community, according to the characteristics of different networks (e.g., heterogeneous or dynamic) or specific requirements of different tasks (e.g., the highest accuracy or the lowest time complexity). Although the existing methods can be extended from one network or task to another to some extent (which inevitably affects the accuracy and stability of the resulting model) [163], [164], few of them consider how to perform model adaptation. Thus, focus has shifted to designing a unified architecture that can automatically adapt to specific tasks or networks while maintaining model accuracy and stability instead of proposing diverse frameworks for different networks or tasks. This is an emerging research area that would be challenging but rewarding.

Networks with Complex Structures
Many real-world networks are heterogeneous, dynamic, hierarchical, or incomplete. Heterogeneous networks [165] are those that contain different types of nodes and edges, or different types of descriptions on nodes and edges, such as text and images. Dynamic networks [166] are networks whose topology and/or attributes change over time. Dynamic networks appear when nodes and edges are added or deleted, thus altering the properties of nodes or edges. Hierarchical networks [167] are composed of several layers, each of which has specific semantics and functions. Incomplete networks [168] are the ones with missing information of their topology, nodes, or edges. While these networks can be partly explored by the learning-based community detection, there still exist several serious issues. First, most existing methods assume homogeneous networks, which may in fact difficult to handle. Second, due to the variability of dynamic networks, most existing methods, especially the ones based on deep learning, need to be re-trained over a series of steps when the networks evolve, which is very time consuming and may not meet the real time processing demand. Third, hierarchical networks typically have different types of relationships across the network hierarchies, which are important while often not well handled by the existing methods. Moreover, almost all the existing methods regard the networks to be analyzed to be complete and accurately documented without noise. Unfortunately, this is rarely the case in practice as it is challenging to obtain complete information of the networks. Therefore, new methods should be developed to handle these issues to better improve the performance of community detection on these types of complex networks.

Integrating Statistical Modeling and Deep Learning
Although several methods have been proposed to combine statistical modeling with deep learning, such as MRFas-GCN, it is still a virgin but promising research area. For instance, the existing methods typically utilize the prior knowledge (e.g., communities) that statistical model offers to refine the embeddings of GCN to improve resulting communities. However, these methods may not fully consider the time complexity or interpretability of the models, raising enormous challenges to community detection in practice. In addition, the community patterns in the real world networks are usually diverse, e.g., community structure with heterophily (where the nodes in different communities are closely connected while the nodes in the same community are sparsely connected) or randomness (where the edges between nodes are more likely to be randomly generated), it is essential to design new robust methods by integrating statistical modeling and deep learning [92], thereby detecting the community structure in the network more accurately. Furthermore, it remains an open problem to integrate statistical modeling in deep learning methods. For example, it is difficult to apply a strategy for recommendation or medical diagnosis to make deep learning become better representation learning, which in turn facilitates more accurate recommendation or diagnose. New innovative algorithms are highly desirable to integrate statistical inference and deep learning to help deep learning more produce interpretable network representation models that are suitable for various network problems in broad application fields.

CONCLUSION
In this paper, we provide a comprehensive and up-to-date literature review on the community detection approaches. One of our main objectives is to organize and present most of the work conducted so far in a unified perspective. In a first step, we discuss in details the problem of community detection, and provide a new taxonomy to group most existing methods into two categories from the perspective of learning: probabilistic graphical model and deep learning. We then thoroughly review, compare, and summarize the existing methods in these two categories, and discuss how some of these methods can be interested. Moreover, since the problem is highly application oriented, we introduce a wide range of applications of community detection in various fields. We also highlight that more effort is needed to address several challenging open problems for the research of community detection. Last but not least, while we cannot list all the literature on community detection, we expect that our view that attempts to synthesize the state-of-the-art of community detection will contribute to a better understanding of this highly active and increasingly important area of study in network science, serve as a source of information for new researchers entering this field and the researchers working in this area, and promote future developments of next-generation community detection approaches.

APPENDIX A
Here we list the key terms and notations in the main text in Table 1.

Notations Descriptions
The sets of nodes and edges of a network. A, X The adjacency matrix and node attribute matrix. D The node degree matrix. n, m The numbers of nodes and edges. e ij The edge between nodes v i and v j . a ij The connection between nodes v i and v j .
The attribute vector and degree of node v i . q The maximal number of node attributes. C The set of communities. C The community assignments of nodes. k The numbers of communities. c i The community which node v i belongs to. ωr The probability of nodes assigned to community Cr. πrs The probability of link generation within two communities Cr and Cs. δ(c i , c j ) The probability of nodes v i and v j falling into the same community partition.

E(C; A)
The energy function in MRF.

Θ i
The unary potential function in E(C; A).

Θ ij
The pairwise potential function in E(C; A).

B, S
Community membership matrix and attribute community matrix in NMF.

H, W
Node representation matrix and weight matrix of neural networks. M, L Modularity matrix and Laplacian matrix. F The set of factor nodes.

A, X
Reconstructed adjacency matrix and node attribute matrix.

G, D
The generator and discriminator of GAN. E The encoder that derives node representation.