# CDCN: A New NMF-Based Community Detection Method with Community Structures and Node Attributes

Authors: Zhiwen Ye; Hui Zhang; Libo Feng; Zhangming Shan
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

Community discovery can discover the community structure in a network, and it provides consumers with personalized services and information pushing. It plays an important role in promoting the intelligence of the network society. Most community networks have a community structure whose vertices are gathered into groups which is significant for network data mining and identification. Existing community detection methods explore the original network topology, but they do not make the full use of the inherent semantic information on nodes, e.g., node attributes. To solve the problem, we explore networks by considering both the original network topology and inherent community structures. In this paper, we propose a novel nonnegative matrix factorization (NMF) model that is divided into two parts, the community structure matrix and the node attribute matrix, and we present a matrix updating method to deal with the nonnegative matrix factorization optimization problem. NMF can achieve large-scale multidimensional data reduction processing to discover the internal relationships between networks and find the degree of network association. The community structure matrix that we proposed provides more information about the network structure by considering the relationships between nodes that connect directly or share similar neighboring nodes. The use of node attributes provides a semantic interpretation for the community structure. We conduct experiments on attributed graph datasets with overlapping and nonoverlapping communities. The results of the experiments show that the performances of the F1-Score and Jaccard-Similarity in the overlapping community and the performances of normalized mutual information (NMI) and accuracy (AC) in the nonoverlapping community are significantly improved. Our proposed model achieves significant improvements in terms of its accuracy and relevance compared with the state-of-the-art approaches.


---

## Body

## 1. Introduction

The science of networks is a modern discipline spanning the natural, social, and computer sciences, as well as engineering. There are different kinds of networks in the real world, such as citation networks, social networks, and collaboration networks [1]. Community detection algorithms are important methods for analyzing the networks’ structure and understanding the node semantics, which play important roles in the era of network intelligence [2–5]. First, analyzing the community structure of the network is helpful for people to study the composition and evolution of the whole network, and it can better explain the intrinsic characteristics and causes of the network. Furthermore, community detection algorithms are the key to understanding complex network systems and have important applications in different networks in various fields. For example, they are very useful for social networks to recommend friends and groups to users by analyzing the inherent structure and characteristics of their social network and clustering the user nodes. Community detection is very useful in the application of disease spread analysis, e.g., it can be used in reality epidemic spreading [6].Most existing community detection algorithms analyze the network by using the original network topology information [7–15]. Girvan and Newman [7] analyzed the community structures in social and biological networks. Newman and Leicht [8] analyzed the mixture models of networks. Rosvall and Bergstrom [9] revealed the community structure of complex networks utilizing the maps of random walks. Xie et al. [1] proposed a method for uncovering overlapping communities in social networks named SLPA via a speaker-listener interaction dynamic process. Coscia et al. [12] proposed a local first discovery method for overlapping communities. He [13] utilized the Markov random field approach for community detection in a specific network. Clauset et al. [14] and Li et al. [15] analyzed the community structure in large scale networks. Cui and Wang [16] used the key bicommunity and intimate degree uncover the overlapping community structures in bipartite networks.However, for some networks, there are not only network topology information but also node attribute information that is a semantic interpretation of the community structure. For example, papers in citation networks contain titles, abstracts, and keywords that may be represented using binary-valued vectors. We binarize the categorical input so that they can be thought of as vectors in Euclidean space (we call this embedding the vector in Euclidean space).Such networks with node attributes are named attributed graphs [17, 18]. It is a great challenge to discover the community structure with node attributes in an effective way. To characterize a community, the existing community detection methods mainly rely on the original network topology. The missing and meaningless information in the network topology often leads to poor results. The node attributes of a network may carry essential community information that is complementary to the network topology information. Therefore, even though two nodes are not directly connected, they may belong to the same community according to the node attributes. Several algorithms that consider both structural and attribute information have been proposed in [17, 19–22]. Yang and Leskovec [17] used the nonnegative matrix factorization approach to find the overlapping communities in large scale networks. Atzmueller et al. [19] proposed an exhaustive subgroup discovery method for description-oriented community detection. Wang et al. [20] proposed a semantic community identification method to find the community structures in large attribute networks. Huang et al. [21] analyzed the attributes of community networks. Yang et al. [22] proposed a discriminative approach that combined links and content for community detection. However, all of those methods assign each edge of the attribute graphs the same value. This will lose information about the network. For example, edges that form densely connected subgraphs are much more likely to be in the same community than edges that connect separate subgraphs. Thus, utilizing the original network topology directly causes indiscriminate penalizing of node pairs, whether they are in densely connected structures or not. It means that we should assign the different characteristic nodes various values.Nonnegative matrix factorization (NMF) is an effective method in community detection. Some scholars have studied it. Luo et al. [23] proposed a symmetric NMF method via pointwise mutual information-incorporated that has highly accurate. Lu et al. [24] used the NMF method to improve density peak clustering in community detection. Zhang and Zhou [25] studied the structure of deep NMF in community detection. Wang et al. [26] used the constraint NMF to detect the community in dynamic networks. These studies laid the foundation for our experiments.The state-of-the-art methods (e.g., CDE [27]) use both a community structure matrix and a node attribute matrix in the NMF framework, and CDE also considers the densely connected subgraphs. However, CDE only considers the relationship between two nodes directly connected while they analyze the community structure matrix. This behavior will lose information about the community structure.Scholars have proposed some important methods for large-scale community detection such as neighborhood, maximal subgraph, intimate degree, and core-vertices [28]; these studies provide important ideas for our paper. More importantly, the main contributions of this paper are as follows.
(1)
We propose a novel method that generates the community structure matrix, which retains the relationship between two nodes that are directly connected or share the same neighbors(2)
We combine node attribute information and community structure information in an effective way. Then, we propose our method, named Community Detection with Community Structure and Node Attributes (CDCN), to identify the network communities with semantic annotation and community structures using nonnegative matrix factorization framework [29, 30](3)
Extensive experiments were conducted on public datasets to demonstrate the effectiveness of CDCN, and its accuracy and performance were better than those of the state-of-the-art methodsThe remainder of the paper is organized as follows. Section2 briefly summarizes the three different types of community detection models. Section 3 describes the community detection model, deduces its theory and formula, and describes the solution algorithm for our model. Section 4 conducts extensive comparative experiments to evaluate the effectiveness of our proposed CDCN model on real graph datasets with the ground-truth communities delineated. Section 5 presents the conclusions of this paper and discusses future research directions.


## 2. Related Works

This section will briefly summarize the three different types of community detection models that use different information to determine the network information. We briefly summarize the three types of community detection models in Table1.Table 1
A brief summarization of community detection.
TypesRepresentative worksOriginal network topologyGN [7], NMM [8], InfoMap [9], CPM [10], SLPA [11], DEMON [12], SNMF [31], NetMRF [13], SBM [32], and SPAEM [33]Node attributesCAN [34], SMR [35], and NC [36]Both original network topology and node attributesCOMODO [19], PCL-DC [22], SCI [20], BIGCLAM [17], and CDE [27]The first type of community detection method focuses on the original network topology. GN [7] was built around the idea of using centrality indices to find community boundaries. NMM [8] was used to find the mechanism of probabilistic mixture models and the expectation maximization algorithm to understand the structure of networks. CPM [10] is a clique percolation method, and it consists of two steps. The first step is to construct the vertices of the k-clique graph, and the second is to find the connected components and set-union vertices within each connected component to get a new community. SLPA [11] was presented as general framework for detecting and analyzing both individual overlapping nodes and entire communities. In it, the nodes exchange labels according to dynamic interaction rules. The stochastic block model (SBM [32]) is the simplest node-based community detection model. The nodes of the network randomly fall into K communities, which are denoted as zi∈1,2,⋯,k, and the edges are independently generated at a probability wzizj. McDaid et al. [37] improved Bayesian inference for the stochastic block model for large networks.However, the above community detection methods directly utilized the original network topology and ignore the inherent community structures (e.g., node attributes). The missing and meaningless information in the network topology often leads to poor results. Therefore, the second type of method focuses on node attributes, and it includes some classical or state-of-the-art clustering methods. Strictly speaking, those methods are not community methods, but they could use node attributes information to discover communities. Thus, in this paper, we also regard them as related work. CAN [34] was proposed as a clustering model to learn the data similarity matrix by assigning the adaptive and optimal neighbors for each data point based on the local distances. SMR [35] uses for the kernelized random walks on the global KNN graph and the Smooth Representation Clustering to improve the clustering result. NC [5, 36] uses the eigenvectors of the matrix representations of the network to solve the community detection problem.The third type of community detection method considers both the original network topology and node attribute information. Several algorithms that consider both structural and attribute information have been proposed in [17, 19–22]. However, all of those methods assign each edge of the attributed graph the same value. This will lose information about the network. The state-of-the-art method SCI [20] uses both the community structure matrix and the node attribute matrix in NMF framework, and CDE [27] encodes the inherent community structures for community detection via the underlying community memberships. However, they only considered the relationship between two directly connected nodes when they analyze the community structure matrix.Nonnegative matrix factorization (NMF) [38] is an effective means of data dimensionality reduction. It can discover the hidden information and the relationship between multidimensional data and lay the foundation for data mining and knowledge discovery. At present, NMF has been widely used in data mining [39], image retrieval [40], community discovery [41], hotspot prediction [42], social network privacy protection [43], signal processing [44], and other fields. In terms of community discovery [45, 46], NMF can find the associations between networks based on network node attributes, which is an important community detection method [47]. Many scholars have studied the application of NMF in community detection and provided some ideas for the research of our paper.Different from all those methods, we combine node attribute information and community structure information by generating the community structure matrix, which retains the relationship between two directly connected nodes or nodes that share the same neighbors. This method can more accurately find the relationships between networks. The topology diagram of the three methods can be seen in Figure1.Figure 1
The community structure matrix of different methods.
(a)
Using adjacency matrix(b)
Embedding matrix of CDE(c)
Community structure matrix of our modelsFigure1 shows an unweighted graph with two communities, where the different shapes stand for the nodes of different communities. Figure 1(a) is the result of using the adjacency matrix directly, and Figure 1(b) is the community structure embedding matrix of the CDE model. They both focus on the relationship between two directly connected nodes. Figure 1(c) shows the community structure matrix of our models, where the dotted lines are the correlations of the nodes that share the same neighbors but are not directly connected. In other words, compared with existing models, we can not only express the node relationship using a continuous numerical value, but we can also describe the relationship between nonadjacent nodes. Otherwise, the isolated nodes (cold nodes) have no neighbor nodes. It increases the scale of the system and can be ignored when constructing the adjacent matrix. In this paper, the influence of the isolated node on the system is not considered.


## 3. CDCN: The Community Detection Model

In this section, we propose a novel algorithm for community detection that combines the community structure and node attribute information. We will introduce the community structure, node attributes, the overall model, and the algorithm in detail.


### 3.1. Community Structure Part

The community structure part models the network structure. Given an undirected networkG=P,E with n nodes P and e edges E, we could get a binary-valued adjacency matrix A from G. If node i and node j have a direct connection, the value of Aij is 1, and otherwise, it is 0, where i=1,2,⋯,n and j=1,2,⋯,n.As one of the state-of-the-art methods, SCI directly regards the binary-valued adjacency matrixA as community structure matrix. It will degrade the effectiveness of the community detection model without embedding the adjacency matrix due to the sparsity of A. The CDE model is proposed as a novel community structure embedding method to quantify the structural closeness of nodes to offer a good depiction of the inherent community structures in graphs. Though CDE solved the problem of the sparsity of the adjacency matrix, it still has limitations in that CDE only considers the relationship between two directly connected nodes when it analyze the network structure. Both SCI and CDE will lose the relationship information between nodes that are not directly connected.We start with a concise and reasonable observation regarding whether two nodes belong to the same community. They may be surrounded by the similar environment that means the two nodes may share the similar neighbor nodes.Therefore, we measure the similarity in a community memberships as follows:(1)Similarityi,j=logPi,jPiPj,where Pi,j can be expressed by Jaccardi,j/D, and Jaccardi,j is the Jaccard index value if node i and node j. Pi=di/D, where di=∑j=1JAi,j is the degree of node i and D=∑i=1Idi is the total degree for network G. The Jaccard index value can be expressed as follows:
(2)Jaccardi,j=∣Ni∣∩∣Nj∣∣Ni∣∪∣Nj∣,where i=1,2,⋯,n; j=1,2,⋯,n; and Ni is the neighboring nodes of node i.According to the similarity of the node community member ships, we could get a community structure matrixS∈Rn×n, where Si,j=Similarityi,j.In our daily lives, if two people like the same movie, can we think that they share similar hobbies? That may be right but insufficient if the movie is popular and everyone would like it. Thus, if the movie is unfashionable, we could be sure that the two people share similar hobbies. Obviously, this is also suitable for community detection. If two nodes have a same cold neighboring node (few nodes are connected to it), it will make a great contribution to the similarity between the two nodes. In other words, we should add a penalty to the hot neighboring nodes (many nodes are connected to it). By replacingJaccardi,j with Li,j, Pi,j can be expressed as Li,j/D, Li,j=∑p=1P1/1+Ntp/∣Ni∣∪∣Nj∣, where P is the count of ∣Ni∣∩∣Nj∣, tp∈∣Ni∣∩∣Nj∣, and p=1,2,⋯,P; Ntp is the count of tp. If Ntp=0, Jaccardi,j and Li,j will be the same.Figure1(a) illustrates an unweighted graph with two communities. It uses the SCI method. The edge value is 1 if two nodes are directly connected, and it cannot describe which edges are more important when detecting two communities’ structure. Figure 1(b) is the result of the embedding method of CDE. It can assign more weights to the edges that form densely connected subgraphs while assigning less weight to the connection between two communities. Figure 1(c) is the display of our proposed community structure matrix. We show more information about the network structure by considering the relationships between nodes that are directly connected or share similar neighboring nodes.We defineU∈RN×K as the probability distribution matrix between nodes and communities. Uij stands for the propensity of node i belonging to community j, where i=1,2,⋯,N and j=1,2,⋯,K. The community structure matrix S∈Rn×n can be approximately decomposed into the multiplication between the probability distribution matrix U and its transpose. For a formal model, the following holds:
(3)minU≥0S−UUTF2,where Si,j=∑k=1KUi,kUk,jT. The process implies that if node i and node j have similar community memberships, they have a high similarity.


### 3.2. Community Node Structure Part

We defineT∈RN×F as the node attribute matrix, where N is the count of the nodes in network and F is the feature dimension of a node. The attributes of a node are in the form of an N-dimensional binary-valued vector, and Ti∗ represents the vector of node i, where i=1,2,⋯,N. The node attribute function is as follows:
(4)minU≥0,M≥0T−UMF2,where M∈RK×F andTi,j=∑k=1KUi,kMk,j.The node attribute matrixT is decomposed into two matrixes, U and M. As mentioned above, U is the probability distribution matrix between nodes and communities, Ui,k stands for the propensity of node i belonging to community k, M is the probability distribution matrix between nodes feature and communities, and Mk,j is the weight of the j-th node attribute feature for community k.In this way, we can use the node attribute information to divide the communities.


### 3.3. The CDCN Model

In this subsection, we will elaborate the overall model of our CDCN method. There are two parts of our method, which include the community structure part and the node attribute part.We combine the community structure part in equation (3) and the node attribute part in equation (4) together. Therefore, our proposed model is written as follows:
(5)minU≥0,M≥0S−UUTF2+αT−UMF2,where α is a positive parameter that adjusts the weight for the two items. If α>1, it means that we are more inclined to the node attribute information; in contrast, we are more inclined to the network topology information.To make the model more generalized, we do not strictly restrict the symmetric decomposition ofS. In regard to the original model in equation (3), it can be equivalently converted into the following:
(6)minU≥0,V≥0S−UVTF2,s.t.U=V,where V is a surrogate variable for U. For further relaxation, equation (5) can be changed to the following:
(7)LU,V,M=minU≥0,V≥0,M≥0S−UVTF2+αT−UMF2+βU−VF2,where β is a positive parameter to adjust the closeness between U and V. The higher it is, the closer the two variables are.In practice, it is common to setβ to a moderate value for real applications. In this way, we can enhance the generalization ability of the model. This means that we do not need to limit the community structure matrix S to be decomposed into the same matrix. In other words, we relax the matrix decomposition condition.In summary, we use the same variableU to combine the two parts, the community structure matrix and the node attribute matrix, and to make the model more generalized, we do not strictly restricted the symmetric decomposition of S. In this way, we get the optimization function of the model.As for the detection of overlapping communities, we identify that nodevi belongs to the j-th community when Uij is higher than a predefined threshold ε. Following CDE, we set ε=0.1 in our paper.


### 3.4. The Algorithm for CDCN

In this subsection, we will share the solution algorithm for our proposed model. The learning process algorithm for CDCN can be seen in Algorithm1.Algorithm 1: The learning process: CDCN.
Input:network graph G, node attributes matrix T, hyper-parameters α and β, number of communities K and maximum number of iterations maxIter.Output:the probability distribution matrix U.BeginAccording to network graphG and Eq.(1), generate the community structure matrix and randomly initialize the probability distribution matrixU0~0,1N×K,V0~0,1N×KM0~0,1K×F;i=0Whilei≤maxIterdoUmk⟵UmkSV+αTMT+βV/UVTV+αUTMMT+βU;Vmk⟵VmkSU+βU/VUTU+βV);Mkf⟵MkfUTT/UTUM;End While.EndThe matrixUmk,Vmk, and Mkf in Algorithm 1 can be derived from the following derivation. According to equation (7), take the derivatives of LU,V,M with respect to U, V, and M, we can get the formulas (8), (9), and (10), respectively:
(8)∂LU,V,M∂U=2UVTV−2SV+α2UTMMT−2TMT+β2U−2V,(9)∂LU,V,M∂V=2VUTU−2SU+β2V−2U,(10)∂LU,V,M∂M=α2UTUM−2UTT.Based on this, the updating rules for the variables are given as follows:(11)Umk⟵Umk−ρmk∂LU,V,M∂Umk,(12)Vmk⟵Vmk−θmk∂LU,V,M∂Vmk,(13)Mkf⟵Mkf−ϕkf∂LU,V,M∂Mkf,where ρmk, θmk, and ϕkf denote the step sizes for the mkth element of matrix U, the mkth element of matrix V and the kfth element of matrix M, respectively, in the gradient descent methods. If we set ρmk=Umk/2UVTV+αUTMMT+βU, θmk=Vmk/2VUTU+βV, and ϕkf=Mkf/2αUTUM, then the following holds:
(14)Umk⟵UmkSV+αTMT+βVUVTV+αUTMMT+βU,(15)Vmk⟵VmkSU+βUVUTU+βV,(16)Mkf⟵MkfUTTUTUM.The algorithm for the optimization (7) is summarized in Algorithm 1. Note that the updating with variable step sizes will naturally maintain the nonnegative constraints. Because the number of nodes N is far greater than the number of node features F, the time complexity is OKN2.


## 3.1. Community Structure Part

The community structure part models the network structure. Given an undirected networkG=P,E with n nodes P and e edges E, we could get a binary-valued adjacency matrix A from G. If node i and node j have a direct connection, the value of Aij is 1, and otherwise, it is 0, where i=1,2,⋯,n and j=1,2,⋯,n.As one of the state-of-the-art methods, SCI directly regards the binary-valued adjacency matrixA as community structure matrix. It will degrade the effectiveness of the community detection model without embedding the adjacency matrix due to the sparsity of A. The CDE model is proposed as a novel community structure embedding method to quantify the structural closeness of nodes to offer a good depiction of the inherent community structures in graphs. Though CDE solved the problem of the sparsity of the adjacency matrix, it still has limitations in that CDE only considers the relationship between two directly connected nodes when it analyze the network structure. Both SCI and CDE will lose the relationship information between nodes that are not directly connected.We start with a concise and reasonable observation regarding whether two nodes belong to the same community. They may be surrounded by the similar environment that means the two nodes may share the similar neighbor nodes.Therefore, we measure the similarity in a community memberships as follows:(1)Similarityi,j=logPi,jPiPj,where Pi,j can be expressed by Jaccardi,j/D, and Jaccardi,j is the Jaccard index value if node i and node j. Pi=di/D, where di=∑j=1JAi,j is the degree of node i and D=∑i=1Idi is the total degree for network G. The Jaccard index value can be expressed as follows:
(2)Jaccardi,j=∣Ni∣∩∣Nj∣∣Ni∣∪∣Nj∣,where i=1,2,⋯,n; j=1,2,⋯,n; and Ni is the neighboring nodes of node i.According to the similarity of the node community member ships, we could get a community structure matrixS∈Rn×n, where Si,j=Similarityi,j.In our daily lives, if two people like the same movie, can we think that they share similar hobbies? That may be right but insufficient if the movie is popular and everyone would like it. Thus, if the movie is unfashionable, we could be sure that the two people share similar hobbies. Obviously, this is also suitable for community detection. If two nodes have a same cold neighboring node (few nodes are connected to it), it will make a great contribution to the similarity between the two nodes. In other words, we should add a penalty to the hot neighboring nodes (many nodes are connected to it). By replacingJaccardi,j with Li,j, Pi,j can be expressed as Li,j/D, Li,j=∑p=1P1/1+Ntp/∣Ni∣∪∣Nj∣, where P is the count of ∣Ni∣∩∣Nj∣, tp∈∣Ni∣∩∣Nj∣, and p=1,2,⋯,P; Ntp is the count of tp. If Ntp=0, Jaccardi,j and Li,j will be the same.Figure1(a) illustrates an unweighted graph with two communities. It uses the SCI method. The edge value is 1 if two nodes are directly connected, and it cannot describe which edges are more important when detecting two communities’ structure. Figure 1(b) is the result of the embedding method of CDE. It can assign more weights to the edges that form densely connected subgraphs while assigning less weight to the connection between two communities. Figure 1(c) is the display of our proposed community structure matrix. We show more information about the network structure by considering the relationships between nodes that are directly connected or share similar neighboring nodes.We defineU∈RN×K as the probability distribution matrix between nodes and communities. Uij stands for the propensity of node i belonging to community j, where i=1,2,⋯,N and j=1,2,⋯,K. The community structure matrix S∈Rn×n can be approximately decomposed into the multiplication between the probability distribution matrix U and its transpose. For a formal model, the following holds:
(3)minU≥0S−UUTF2,where Si,j=∑k=1KUi,kUk,jT. The process implies that if node i and node j have similar community memberships, they have a high similarity.


## 3.2. Community Node Structure Part

We defineT∈RN×F as the node attribute matrix, where N is the count of the nodes in network and F is the feature dimension of a node. The attributes of a node are in the form of an N-dimensional binary-valued vector, and Ti∗ represents the vector of node i, where i=1,2,⋯,N. The node attribute function is as follows:
(4)minU≥0,M≥0T−UMF2,where M∈RK×F andTi,j=∑k=1KUi,kMk,j.The node attribute matrixT is decomposed into two matrixes, U and M. As mentioned above, U is the probability distribution matrix between nodes and communities, Ui,k stands for the propensity of node i belonging to community k, M is the probability distribution matrix between nodes feature and communities, and Mk,j is the weight of the j-th node attribute feature for community k.In this way, we can use the node attribute information to divide the communities.


## 3.3. The CDCN Model

In this subsection, we will elaborate the overall model of our CDCN method. There are two parts of our method, which include the community structure part and the node attribute part.We combine the community structure part in equation (3) and the node attribute part in equation (4) together. Therefore, our proposed model is written as follows:
(5)minU≥0,M≥0S−UUTF2+αT−UMF2,where α is a positive parameter that adjusts the weight for the two items. If α>1, it means that we are more inclined to the node attribute information; in contrast, we are more inclined to the network topology information.To make the model more generalized, we do not strictly restrict the symmetric decomposition ofS. In regard to the original model in equation (3), it can be equivalently converted into the following:
(6)minU≥0,V≥0S−UVTF2,s.t.U=V,where V is a surrogate variable for U. For further relaxation, equation (5) can be changed to the following:
(7)LU,V,M=minU≥0,V≥0,M≥0S−UVTF2+αT−UMF2+βU−VF2,where β is a positive parameter to adjust the closeness between U and V. The higher it is, the closer the two variables are.In practice, it is common to setβ to a moderate value for real applications. In this way, we can enhance the generalization ability of the model. This means that we do not need to limit the community structure matrix S to be decomposed into the same matrix. In other words, we relax the matrix decomposition condition.In summary, we use the same variableU to combine the two parts, the community structure matrix and the node attribute matrix, and to make the model more generalized, we do not strictly restricted the symmetric decomposition of S. In this way, we get the optimization function of the model.As for the detection of overlapping communities, we identify that nodevi belongs to the j-th community when Uij is higher than a predefined threshold ε. Following CDE, we set ε=0.1 in our paper.


## 3.4. The Algorithm for CDCN

In this subsection, we will share the solution algorithm for our proposed model. The learning process algorithm for CDCN can be seen in Algorithm1.Algorithm 1: The learning process: CDCN.
Input:network graph G, node attributes matrix T, hyper-parameters α and β, number of communities K and maximum number of iterations maxIter.Output:the probability distribution matrix U.BeginAccording to network graphG and Eq.(1), generate the community structure matrix and randomly initialize the probability distribution matrixU0~0,1N×K,V0~0,1N×KM0~0,1K×F;i=0Whilei≤maxIterdoUmk⟵UmkSV+αTMT+βV/UVTV+αUTMMT+βU;Vmk⟵VmkSU+βU/VUTU+βV);Mkf⟵MkfUTT/UTUM;End While.EndThe matrixUmk,Vmk, and Mkf in Algorithm 1 can be derived from the following derivation. According to equation (7), take the derivatives of LU,V,M with respect to U, V, and M, we can get the formulas (8), (9), and (10), respectively:
(8)∂LU,V,M∂U=2UVTV−2SV+α2UTMMT−2TMT+β2U−2V,(9)∂LU,V,M∂V=2VUTU−2SU+β2V−2U,(10)∂LU,V,M∂M=α2UTUM−2UTT.Based on this, the updating rules for the variables are given as follows:(11)Umk⟵Umk−ρmk∂LU,V,M∂Umk,(12)Vmk⟵Vmk−θmk∂LU,V,M∂Vmk,(13)Mkf⟵Mkf−ϕkf∂LU,V,M∂Mkf,where ρmk, θmk, and ϕkf denote the step sizes for the mkth element of matrix U, the mkth element of matrix V and the kfth element of matrix M, respectively, in the gradient descent methods. If we set ρmk=Umk/2UVTV+αUTMMT+βU, θmk=Vmk/2VUTU+βV, and ϕkf=Mkf/2αUTUM, then the following holds:
(14)Umk⟵UmkSV+αTMT+βVUVTV+αUTMMT+βU,(15)Vmk⟵VmkSU+βUVUTU+βV,(16)Mkf⟵MkfUTTUTUM.The algorithm for the optimization (7) is summarized in Algorithm 1. Note that the updating with variable step sizes will naturally maintain the nonnegative constraints. Because the number of nodes N is far greater than the number of node features F, the time complexity is OKN2.


## 4. Experiments and Analysis

In this section, we have conducted extensive comparative experiments to evaluate the effectiveness of our proposed CDCN model on real graph datasets with ground-truth communities.


### 4.1. Datasets

We consider 7 widely accepted network ground-truth community datasets, i.e., Karate, Polbooks, Football (http://www-personal.umich.edu/ mejn/netdata/), Citeseer, WebKB (http://linqs.cs.umd.edu/projects/projects/lbc/), Facebook (http://snap.stanford.edu/data/ego-Facebook.html), and HEP-TH (http://snap.stanford.edu/data/cit-HepTh.html). The network statistics are reported in Table 2. The Citeseer network consists of 3312 scientific publications with 4732 edges. The number of node attribute features in Citeseer is 3703. The WebKB network includes 4 subnetworks (i.e., Cornell, Texas, Washington, and Wisconsin), and each subnetwork consists of 5 communities. There are 877 web pages with 1608 edges, and each webpage is annotated by 1703-dimensional binary-valued word attributes. Karate, Polbooks, and Football are nonoverlapping communities without node attributes. The HEP-TH (high energy physics theory) citation graph is from the ePrint arXiv and covers all the citations within a dataset of 27770 papers with 352807 edges, and we believe that the papers published in the same journal belong to the same community. There are some communities that contain very few nodes; therefore, we exclude these communities (less than 10 nodes) and then get the dataset of 20048 papers with 236230 edges.Table 2
Dataset statistics.∣V∣: number of nodes; ∣E∣: number of edges; f: number of node attribute features; K: number of communities.
Datasets∣V∣∣E∣fKKarate34156—2Polbooks105882—3Football1151226—12Cornell19528317035Texas18728017035Washington23036617035Wisconsin26545917035Citeseer3312453637036Facebook40398824310193HEP-TH20048236230300537The node attributes of Cornell, Texas, Washington, Wisconsin, Citeseer, and Facebook are binary vectors where the elements are either 0 or 1. The node attributes of HEP-TH are dense vector with a dimension of 300. We extract the paper titles and abstracts and then the train word vector model [41] to get the vector.We compare different methods in these networks to prove the effectiveness of our community structure matrix. The detailed information of the datasets can be seen in Table2.


### 4.2. Evaluation Methods

The compared methods may include nonoverlapping and overlapping communities, and so we choose different evaluation metrics.(i)
For nonoverlapping communities:In terms of the measures to evaluate the quality of nonoverlapping communities, we use two evaluation metrics. We adopt the same evaluation procedure used in [17] that every detected community is matched with its most similar ground-truth community.The first metric is the accuracy (AC [48]). Given a network containing ∣V∣ nodes, for each node, predicti is the community label we obtain by applying different algorithms, and reali is the ground-truth label provided by the datasets. The accuracy is defined as follows:
(17)C=∑i=1nδreali,mappredicti∣V∣,where δx,y is the function δ that equals 1 if x=y and it equals 0 otherwise, and mappredicti is the mapping function that maps each community label reali to the equivalent label from the datasets. The best mapping can be found by using the Kuhn-Munkres algorithm [49].The second metric is the normalized mutual information (NMI [48]). In clustering applications, mutual information is used to measure the similarity of two sets of clusters. Given the discovered communities C of the results of community detection methods and a set of ground-truth communities C∗, their mutual information metric NMIC,C∗ is defined as follows:
(18)NMIC,C∗=∑ci∈C,cj∗∈C∗,pci,cj∗.logpci,cj∗pci.pcj∗,where pci and pcj∗ denote the probabilities that a node arbitrarily selected from the network belongs to the community ci and cj∗, respectively, and pci,cj∗ denotes the joint probability that this arbitrarily selected node belongs to clusters ci and cj∗ at the same time.
(ii)
For overlapping communities:We compare a set of detected communitiesM with the ground-truth communities M∗ as in [15], and the evaluation function is as follows:
(19)12∣C∗∣∑ci∗∈C∗maxcj∈Cδci∗,cj+12∣C∣∑ci∈Cmaxcj∈Cδci∗∈C∗,where δci∗,cj is the similarity measure between communities ci∗ and cj. We consider a standard metric δ. to quantify the similarity between a pair of communities, and the similarity score will be between 0 and 1.1 indicates the perfect recovery of the ground-truth communities.


### 4.3. Parameter Sensitivity Analysis

In this section, we perform the parameter sensitivity analysis of CDCN on the Wisconsin and Washington dataset. The number of nodes in these two is appropriate, which makes it easier to see the effect. Our algorithm has two hyperparameters:α is a nonnegative constant that controls the balance between the original network topology information and node attribute information, and β is a nonnegative constant for the relaxation of matrix U. For each hyperparameter value, we repeated the experiments ten times and took the average of the ten results. The results of other datasets are similar. These two parameters are also applicable to other datasets because they have similar topological structures and network characteristics. The results of the two parameters can be seen in following figures.Figures2 and 3 illustrate that CDCN achieves better performances in the range of α=0.15 through α=0.3, and specifically, CDCN achieves the highest AC and NMI scores when α=0.2. This indicates the different importance of the original network topology information and the node attribute information. In terms of the parameter β, we set α=0.2 and vary β from 0 to 0.05.Figure 2
Fixingβ=0.01 then varying α from 0 to 0.5 on the Wisconsin dataset.Figure 3
Fixingβ=0.01 then varying α from 0 to 0.5 on the Washington dataset.Figures4 and 5 illustrate that CDCN achieves the highest AC and NMI scores when β=0.02. These results indicate that if we use both node attribute information and community structure information, we will get better results for real networks.Figure 4
Fixingα=0.2 then varying β from 0 to 0.05 on the Wisconsin dataset.Figure 5
Fixingα=0.2 then varying β from 0 to 0.05 on the Washington dataset.


### 4.4. Experimental Setups

We compared our algorithm against six topology based methods, i.e., SNMF, SLPA, DEMON, CPM, Louvain, and InfoMap; three node attributes based methods, i.e., CAN, SMR, and NC; and three methods that consider both network topologies and node attributes, i.e., PCL-DC, SCI, and CDE.As with the experiments in [27], it is hard to compare the quality of community results when the numbers of communities are different for baseline methods. Therefore, we set the number of detected communities K as the number of ground-truth communities. We applied our proposed method and other baseline methods on the public datasets, repeat the tests ten times, and take the average of the ten results.For all baseline methods, we set their parameters by default to achieve the best results for those methods. For example, for CDE, we setα=1, β=2, and κ=5, and for SCI, we set α=50 and β=1. For more information, please refer to their papers. Regarding the parameters of our CDCN approach, maxIter is set to100 to achieve convergence, and the hyperparameters α and β are set as 0.2 and 0.02, respectively. Our algorithms are implemented in python, and all experiments are performed on a PC with Windows 7, Intel(R) Core(TM) i7-4790 CPU @ 3.60 GHz and 24 GB of main memory.


### 4.5. Evaluation on Nonoverlapping Communities

In this subsection, we evaluate the results on nonoverlapping communities. We report the ACs and NMIs of all methods in Table3. The results indicate that CDCN outperforms all comparison algorithms for the nonoverlapping community detection task.Table 3
The performances of different community detection algorithms on nonoverlapping communities measured by the AC and NMI.
MetricDatasetsInfoMapCPMSLPALouvainDEMONSNMFCANSMRNCPLC-DCSCICDECDCNACCornell0.20.4460.2390.2660.3770.3710.4460.4150.3170.3480.3540.4490.569Texas0.2140.4710.5230.2690.4750.4960.5450.4700.5400.3690.4880.4980.641Washington0.1430.4690.4340.2040.3810.4100.4910.5080.4560.4080.4010.5680.695Wisconsin0.1520.4710.2620.2230.4300.3860.4710.4710.4220.3540.3960.6450.694Citeseer0.0530.1780.0900.2380.2080.3090.2120.2110.3140.4520.3270.4740.544HEP-TH0.0410.1230.0910.1350.1130.1680.1350.1620.1430.1930.1840.2010.215NMICornell0.1470.050.1380.1090.0510.0610.0450.0610.0840.0810.0730.3110.358Texas0.1020.0770.0400.0590.0430.0970.0210.090.1150.0680.0970.2520.328Washington0.1170.0060.1580.0870.0790.0350.0460.1170.0380.1030.0860.3410.406Wisconsin0.1110.0270.1060.0780.0470.0700.0370.0700.0770.0710.0690.4060.427Citeseer0.2140.1990.2140.2280.1660.0960.0030.0070.0030.2210.0830.2080.263HEP-TH0.0350.0920.0840.1120.0930.1370.1140.1230.1140.1520.1450.1790.191The baseline comparison methods include InfoMap, CPM, SLPA, Louvain, DEMON, SNMF, CAN, SMR, NC, PCL-DC, SCI, and CDE. The real datasets include Cornell, Texas, Washington, Wisconsin, and Citeseer. All the datasets are independent of each other, and there is no connection between them; therefore, they are nonoverlapping communities. We apply our method to the above datasets by using the different baseline methods.Compared with the algorithms that focus on the original network topology or node attributes, the results show that combining both the original network topology and the inherent community structure information together will result in making great improvements. For example, among the algorithms that focus on the original network topology or node attributes, the highest ACs on Cornell, Texas, Washington, Wisconsin, and Citeseer are, respectively, 0.446, 0.545, 0.508, 0.471, 0.314, and 0.168, and ACs on our methods are 0.569, 0.641, 0.695, 0.694, 0.544, and 0.215, respectively. The values increased by 0.123, 0.096, 0.187, 0.223, 0.230, and 0.047, respectively. The same as the AC, our method also greatly improved the NMI.The experiments results can be seen in Table3. From Table 3, we can see that compared with the PCL-DC, SCI, and CDE models that combine both original network topology information and node attribute information, obviously, PCL-DC, SCI, and CDE will lose the information on the relationships between nodes that are not directly connected, and our model considers the relationships between nodes that share the same neighbors. The results in Table 3 prove this. In Table 3, CDE gets the best results compared with PCL-DC and SCI. The highest ACs of CDE on Cornell, Texas, Washington, Wisconsin, Citeseer, and HEP-TH are, respectively, 0.499, 0.498, 0.568, 0.645, 0.474, and 0.201. Our model improves the AC values by 0.07, 0.143, 0.127, 0.049, 0.07, and 0.014, respectively. Regarding the AC, compared with the methods that combine both the original network topology information and node attribute information, there are also huge improvements in the results.


### 4.6. Evaluation on Overlapping Communities

Some scholars have proposed effective methods in the detection of overlapping communities, such as subspace decomposition, maximal cliques, maximal subgraph, and the clustering coefficient. Li et al. [50] proposed a method to measure the performance of the overlapping communities. They are the state-of-the-art methods in recent years. With reference to these methods, we proposed evaluation metrics under overlapping communities.For the overlapping communities, we use the F1-Score and Jaccard-Similarity to evaluate the partitioned results of all the methods, except the clustering methods that could not discover the overlapping communities. The tested network is the complete Facebook data, and it contains 10 different ego-networks with manually identified circles. We select 4 representative ego-networks from them. The experiment results can be seen in Table4.Table 4
The performances of different community detection algorithms on overlapping communities measured by the F1-Score and Jaccard-Similarity.
MetricDatasetsInfoMapSLPALouvainDEMONSNMFPCL-DCSCICDECDCNF1-ScoreFaceBook ego-network 1070.4480.5100.2640.5170.3780.3840.4050.4740.539FaceBook ego-network 6980.6360.6280.5880.5760.6120.3450.2390.5740.640FaceBook ego-network 19120.3720.3230.3660.3280.3780.3120.3160.3220.379FaceBook ego-network 39080.5790.5280.5670.3870.4100.4210.3880.4710.580FaceBook0.3300.3510.3210.2140.1340.2240.2130.3240.372Jaccard-SimilarityFaceBook ego-network 1070.3720.4100.2050.4210.2670.3040.2940.3690.432FaceBook ego-network 6980.5560.5290.4820.4640.4870.2560.1410.4410.571FaceBook ego-network 19120.2860.2720.2510.2290.2490.2000.2020.2150.290FaceBook ego-network 39080.4320.4410.4210.3130.2870.3100.2680.3520.441FaceBook0.2060.2130.2420.1780.1690.1820.1680.2240.262The baseline comparison methods include InfoMap, CPM, SLPA, Louvain, DEMON, SNMF, PCL-DC, SCI, and CDE. The real datasets include FaceBook Ego-network 107, FaceBook Ego-network 698, FaceBook Ego-network 1912, FaceBook Ego-network 3908, and FaceBook. There are some intersections between datasets, and some overlapping areas appear; therefore, there are overlapping communities. We apply our method to the above datasets by using the different baseline methods.Ego-network 107 has the most nodes, Ego-network 698 has the fewest nodes, Ego-network 1912 has the highest intensive degree, and Ego-network 3908 has lowest intensive degree.As shown in Table4, CDCN achieves the best performances on all the tested networks. In addition, it also shows that our model greatly improves community detection by combining both the original network topology and the inherent community structure information together. For instance, the highest F1-Score among the methods that focus on network topology information is 0.517, and the highest F1-Score among the methods that combine both the original network topology and the inherent community structures information together is 0.474 on FaceBook ego-network 107. Compared with those methods, our model achieves an F1-Score of 0.539. The other ego-network results are similar with those of FaceBook ego-network 107. On the complete Facebook data, our model gets an F1-Score of 0.372, which is greater than the best results of the other methods. For the Jaccard-Similarity, the results in Table 4 also indicate that CDCN outperforms all comparison algorithms.


### 4.7. Evaluation on Nonnode Attributes Communities

There are some communities without node attributes, and it is hard to divide these communities using the majority methods that use node attributes. However, it is easy to deal with the problem using CDCN since we could use only the community structure part of our method. Therefore, our method will be simplified as follows:(20)LU,V=minU≥0,V≥0S−UVTF2+βU−VF2.The update formulas are changed into the following:(21)Umk⟵UmkSV+βVUVTV+βU,(22)Vmk⟵VmkSU+βUVUTU+βV.To prove the usefulness of our community structure matrix, we add two more baselines, which are called Adj-Mat and Emb-Mat. Adj-Mat just replaces the community structure matrixS in equation (20) with the adjacency matrix of network. Similarly, Emb-Mat just replaces the community structure matrix in equation (20) with the embedding matrix of CDE. Then, the optimization algorithm is changed, as shown in Algorithm 2.Algorithm 2: The optimization process of CDCN.
Input:network graph G, hyper-parameters β, number of communities K and maximum number of iterations maxIter.Output:the probability distribution matrix U.BeginAccording to the network graphG and Eq.(1), generate the community structure matrix and randomly initialize the probability distribution matrixU0∈0,1N×K,V0∈0,1N×K;i=0Whilei≤maxIterdoUpdateU(i+1) according to Eq.(21);UpdateV(i+1) according to Eq.(22);End WhileEndThe baseline comparison methods include InfoMap, CPM, SLPA, Louvain, DEMON, SNMF, Adj-Mat, and Emb-Mat. We assessed the NMI and AC values on the karate, football, and polbooks datasets.In addition, in this part, we compare our method with the methods that focus on the original network topology and that do not node attribute information on four datasets. The four datasets are nonoverlapping communities, and so, we use AC and NMI to evaluate the partitioning result of all the methods. The results can be seen in Table5.Table 5
The performances of the different community detection algorithms on nonoverlapping as community measured by the AC and NMI.
MetricDatasetsInfoMapCPMSLPALouvainDEMONSNMFAdj-MatEmb-MatCDCNNMIKarate0.5810.6520.6580.5690.4290.8360.8250.9121.0Football0.9010.8550.5820.7130.4630.8940.8750.9030.909Polbooks0.4120.5380.4980.5470.3830.5080.4870.5240.570ACKarate0.8940.8880.8200.7410.6880.9700.9620.9701.0Football0.9180.8970.6130.7160.5460.8910.8670.9110.923Polbooks0.6950.8190.7850.8230.7400.7430.7240.7980.838As shown in Table5, the results indicate that CDCN outperforms all comparison algorithms for the nonoverlapping community detection task. The NMI reached 1.0, 0.916, and 0.570 on the karate, football, and polbooks datasets, respectively, which are better than the above methods. The AC value reached 1.0, 0.909, and 0.838 on karate, football, and polbooks datasets, respectively, which are also better than the above methods. Furthermore, the results compared with the Adj-Mat and Emb-Mat also show the great usefulness of our community structure matrix.


## 4.1. Datasets

We consider 7 widely accepted network ground-truth community datasets, i.e., Karate, Polbooks, Football (http://www-personal.umich.edu/ mejn/netdata/), Citeseer, WebKB (http://linqs.cs.umd.edu/projects/projects/lbc/), Facebook (http://snap.stanford.edu/data/ego-Facebook.html), and HEP-TH (http://snap.stanford.edu/data/cit-HepTh.html). The network statistics are reported in Table 2. The Citeseer network consists of 3312 scientific publications with 4732 edges. The number of node attribute features in Citeseer is 3703. The WebKB network includes 4 subnetworks (i.e., Cornell, Texas, Washington, and Wisconsin), and each subnetwork consists of 5 communities. There are 877 web pages with 1608 edges, and each webpage is annotated by 1703-dimensional binary-valued word attributes. Karate, Polbooks, and Football are nonoverlapping communities without node attributes. The HEP-TH (high energy physics theory) citation graph is from the ePrint arXiv and covers all the citations within a dataset of 27770 papers with 352807 edges, and we believe that the papers published in the same journal belong to the same community. There are some communities that contain very few nodes; therefore, we exclude these communities (less than 10 nodes) and then get the dataset of 20048 papers with 236230 edges.Table 2
Dataset statistics.∣V∣: number of nodes; ∣E∣: number of edges; f: number of node attribute features; K: number of communities.
Datasets∣V∣∣E∣fKKarate34156—2Polbooks105882—3Football1151226—12Cornell19528317035Texas18728017035Washington23036617035Wisconsin26545917035Citeseer3312453637036Facebook40398824310193HEP-TH20048236230300537The node attributes of Cornell, Texas, Washington, Wisconsin, Citeseer, and Facebook are binary vectors where the elements are either 0 or 1. The node attributes of HEP-TH are dense vector with a dimension of 300. We extract the paper titles and abstracts and then the train word vector model [41] to get the vector.We compare different methods in these networks to prove the effectiveness of our community structure matrix. The detailed information of the datasets can be seen in Table2.


## 4.2. Evaluation Methods

The compared methods may include nonoverlapping and overlapping communities, and so we choose different evaluation metrics.(i)
For nonoverlapping communities:In terms of the measures to evaluate the quality of nonoverlapping communities, we use two evaluation metrics. We adopt the same evaluation procedure used in [17] that every detected community is matched with its most similar ground-truth community.The first metric is the accuracy (AC [48]). Given a network containing ∣V∣ nodes, for each node, predicti is the community label we obtain by applying different algorithms, and reali is the ground-truth label provided by the datasets. The accuracy is defined as follows:
(17)C=∑i=1nδreali,mappredicti∣V∣,where δx,y is the function δ that equals 1 if x=y and it equals 0 otherwise, and mappredicti is the mapping function that maps each community label reali to the equivalent label from the datasets. The best mapping can be found by using the Kuhn-Munkres algorithm [49].The second metric is the normalized mutual information (NMI [48]). In clustering applications, mutual information is used to measure the similarity of two sets of clusters. Given the discovered communities C of the results of community detection methods and a set of ground-truth communities C∗, their mutual information metric NMIC,C∗ is defined as follows:
(18)NMIC,C∗=∑ci∈C,cj∗∈C∗,pci,cj∗.logpci,cj∗pci.pcj∗,where pci and pcj∗ denote the probabilities that a node arbitrarily selected from the network belongs to the community ci and cj∗, respectively, and pci,cj∗ denotes the joint probability that this arbitrarily selected node belongs to clusters ci and cj∗ at the same time.
(ii)
For overlapping communities:We compare a set of detected communitiesM with the ground-truth communities M∗ as in [15], and the evaluation function is as follows:
(19)12∣C∗∣∑ci∗∈C∗maxcj∈Cδci∗,cj+12∣C∣∑ci∈Cmaxcj∈Cδci∗∈C∗,where δci∗,cj is the similarity measure between communities ci∗ and cj. We consider a standard metric δ. to quantify the similarity between a pair of communities, and the similarity score will be between 0 and 1.1 indicates the perfect recovery of the ground-truth communities.


## 4.3. Parameter Sensitivity Analysis

In this section, we perform the parameter sensitivity analysis of CDCN on the Wisconsin and Washington dataset. The number of nodes in these two is appropriate, which makes it easier to see the effect. Our algorithm has two hyperparameters:α is a nonnegative constant that controls the balance between the original network topology information and node attribute information, and β is a nonnegative constant for the relaxation of matrix U. For each hyperparameter value, we repeated the experiments ten times and took the average of the ten results. The results of other datasets are similar. These two parameters are also applicable to other datasets because they have similar topological structures and network characteristics. The results of the two parameters can be seen in following figures.Figures2 and 3 illustrate that CDCN achieves better performances in the range of α=0.15 through α=0.3, and specifically, CDCN achieves the highest AC and NMI scores when α=0.2. This indicates the different importance of the original network topology information and the node attribute information. In terms of the parameter β, we set α=0.2 and vary β from 0 to 0.05.Figure 2
Fixingβ=0.01 then varying α from 0 to 0.5 on the Wisconsin dataset.Figure 3
Fixingβ=0.01 then varying α from 0 to 0.5 on the Washington dataset.Figures4 and 5 illustrate that CDCN achieves the highest AC and NMI scores when β=0.02. These results indicate that if we use both node attribute information and community structure information, we will get better results for real networks.Figure 4
Fixingα=0.2 then varying β from 0 to 0.05 on the Wisconsin dataset.Figure 5
Fixingα=0.2 then varying β from 0 to 0.05 on the Washington dataset.


## 4.4. Experimental Setups

We compared our algorithm against six topology based methods, i.e., SNMF, SLPA, DEMON, CPM, Louvain, and InfoMap; three node attributes based methods, i.e., CAN, SMR, and NC; and three methods that consider both network topologies and node attributes, i.e., PCL-DC, SCI, and CDE.As with the experiments in [27], it is hard to compare the quality of community results when the numbers of communities are different for baseline methods. Therefore, we set the number of detected communities K as the number of ground-truth communities. We applied our proposed method and other baseline methods on the public datasets, repeat the tests ten times, and take the average of the ten results.For all baseline methods, we set their parameters by default to achieve the best results for those methods. For example, for CDE, we setα=1, β=2, and κ=5, and for SCI, we set α=50 and β=1. For more information, please refer to their papers. Regarding the parameters of our CDCN approach, maxIter is set to100 to achieve convergence, and the hyperparameters α and β are set as 0.2 and 0.02, respectively. Our algorithms are implemented in python, and all experiments are performed on a PC with Windows 7, Intel(R) Core(TM) i7-4790 CPU @ 3.60 GHz and 24 GB of main memory.


## 4.5. Evaluation on Nonoverlapping Communities

In this subsection, we evaluate the results on nonoverlapping communities. We report the ACs and NMIs of all methods in Table3. The results indicate that CDCN outperforms all comparison algorithms for the nonoverlapping community detection task.Table 3
The performances of different community detection algorithms on nonoverlapping communities measured by the AC and NMI.
MetricDatasetsInfoMapCPMSLPALouvainDEMONSNMFCANSMRNCPLC-DCSCICDECDCNACCornell0.20.4460.2390.2660.3770.3710.4460.4150.3170.3480.3540.4490.569Texas0.2140.4710.5230.2690.4750.4960.5450.4700.5400.3690.4880.4980.641Washington0.1430.4690.4340.2040.3810.4100.4910.5080.4560.4080.4010.5680.695Wisconsin0.1520.4710.2620.2230.4300.3860.4710.4710.4220.3540.3960.6450.694Citeseer0.0530.1780.0900.2380.2080.3090.2120.2110.3140.4520.3270.4740.544HEP-TH0.0410.1230.0910.1350.1130.1680.1350.1620.1430.1930.1840.2010.215NMICornell0.1470.050.1380.1090.0510.0610.0450.0610.0840.0810.0730.3110.358Texas0.1020.0770.0400.0590.0430.0970.0210.090.1150.0680.0970.2520.328Washington0.1170.0060.1580.0870.0790.0350.0460.1170.0380.1030.0860.3410.406Wisconsin0.1110.0270.1060.0780.0470.0700.0370.0700.0770.0710.0690.4060.427Citeseer0.2140.1990.2140.2280.1660.0960.0030.0070.0030.2210.0830.2080.263HEP-TH0.0350.0920.0840.1120.0930.1370.1140.1230.1140.1520.1450.1790.191The baseline comparison methods include InfoMap, CPM, SLPA, Louvain, DEMON, SNMF, CAN, SMR, NC, PCL-DC, SCI, and CDE. The real datasets include Cornell, Texas, Washington, Wisconsin, and Citeseer. All the datasets are independent of each other, and there is no connection between them; therefore, they are nonoverlapping communities. We apply our method to the above datasets by using the different baseline methods.Compared with the algorithms that focus on the original network topology or node attributes, the results show that combining both the original network topology and the inherent community structure information together will result in making great improvements. For example, among the algorithms that focus on the original network topology or node attributes, the highest ACs on Cornell, Texas, Washington, Wisconsin, and Citeseer are, respectively, 0.446, 0.545, 0.508, 0.471, 0.314, and 0.168, and ACs on our methods are 0.569, 0.641, 0.695, 0.694, 0.544, and 0.215, respectively. The values increased by 0.123, 0.096, 0.187, 0.223, 0.230, and 0.047, respectively. The same as the AC, our method also greatly improved the NMI.The experiments results can be seen in Table3. From Table 3, we can see that compared with the PCL-DC, SCI, and CDE models that combine both original network topology information and node attribute information, obviously, PCL-DC, SCI, and CDE will lose the information on the relationships between nodes that are not directly connected, and our model considers the relationships between nodes that share the same neighbors. The results in Table 3 prove this. In Table 3, CDE gets the best results compared with PCL-DC and SCI. The highest ACs of CDE on Cornell, Texas, Washington, Wisconsin, Citeseer, and HEP-TH are, respectively, 0.499, 0.498, 0.568, 0.645, 0.474, and 0.201. Our model improves the AC values by 0.07, 0.143, 0.127, 0.049, 0.07, and 0.014, respectively. Regarding the AC, compared with the methods that combine both the original network topology information and node attribute information, there are also huge improvements in the results.


## 4.6. Evaluation on Overlapping Communities

Some scholars have proposed effective methods in the detection of overlapping communities, such as subspace decomposition, maximal cliques, maximal subgraph, and the clustering coefficient. Li et al. [50] proposed a method to measure the performance of the overlapping communities. They are the state-of-the-art methods in recent years. With reference to these methods, we proposed evaluation metrics under overlapping communities.For the overlapping communities, we use the F1-Score and Jaccard-Similarity to evaluate the partitioned results of all the methods, except the clustering methods that could not discover the overlapping communities. The tested network is the complete Facebook data, and it contains 10 different ego-networks with manually identified circles. We select 4 representative ego-networks from them. The experiment results can be seen in Table4.Table 4
The performances of different community detection algorithms on overlapping communities measured by the F1-Score and Jaccard-Similarity.
MetricDatasetsInfoMapSLPALouvainDEMONSNMFPCL-DCSCICDECDCNF1-ScoreFaceBook ego-network 1070.4480.5100.2640.5170.3780.3840.4050.4740.539FaceBook ego-network 6980.6360.6280.5880.5760.6120.3450.2390.5740.640FaceBook ego-network 19120.3720.3230.3660.3280.3780.3120.3160.3220.379FaceBook ego-network 39080.5790.5280.5670.3870.4100.4210.3880.4710.580FaceBook0.3300.3510.3210.2140.1340.2240.2130.3240.372Jaccard-SimilarityFaceBook ego-network 1070.3720.4100.2050.4210.2670.3040.2940.3690.432FaceBook ego-network 6980.5560.5290.4820.4640.4870.2560.1410.4410.571FaceBook ego-network 19120.2860.2720.2510.2290.2490.2000.2020.2150.290FaceBook ego-network 39080.4320.4410.4210.3130.2870.3100.2680.3520.441FaceBook0.2060.2130.2420.1780.1690.1820.1680.2240.262The baseline comparison methods include InfoMap, CPM, SLPA, Louvain, DEMON, SNMF, PCL-DC, SCI, and CDE. The real datasets include FaceBook Ego-network 107, FaceBook Ego-network 698, FaceBook Ego-network 1912, FaceBook Ego-network 3908, and FaceBook. There are some intersections between datasets, and some overlapping areas appear; therefore, there are overlapping communities. We apply our method to the above datasets by using the different baseline methods.Ego-network 107 has the most nodes, Ego-network 698 has the fewest nodes, Ego-network 1912 has the highest intensive degree, and Ego-network 3908 has lowest intensive degree.As shown in Table4, CDCN achieves the best performances on all the tested networks. In addition, it also shows that our model greatly improves community detection by combining both the original network topology and the inherent community structure information together. For instance, the highest F1-Score among the methods that focus on network topology information is 0.517, and the highest F1-Score among the methods that combine both the original network topology and the inherent community structures information together is 0.474 on FaceBook ego-network 107. Compared with those methods, our model achieves an F1-Score of 0.539. The other ego-network results are similar with those of FaceBook ego-network 107. On the complete Facebook data, our model gets an F1-Score of 0.372, which is greater than the best results of the other methods. For the Jaccard-Similarity, the results in Table 4 also indicate that CDCN outperforms all comparison algorithms.


## 4.7. Evaluation on Nonnode Attributes Communities

There are some communities without node attributes, and it is hard to divide these communities using the majority methods that use node attributes. However, it is easy to deal with the problem using CDCN since we could use only the community structure part of our method. Therefore, our method will be simplified as follows:(20)LU,V=minU≥0,V≥0S−UVTF2+βU−VF2.The update formulas are changed into the following:(21)Umk⟵UmkSV+βVUVTV+βU,(22)Vmk⟵VmkSU+βUVUTU+βV.To prove the usefulness of our community structure matrix, we add two more baselines, which are called Adj-Mat and Emb-Mat. Adj-Mat just replaces the community structure matrixS in equation (20) with the adjacency matrix of network. Similarly, Emb-Mat just replaces the community structure matrix in equation (20) with the embedding matrix of CDE. Then, the optimization algorithm is changed, as shown in Algorithm 2.Algorithm 2: The optimization process of CDCN.
Input:network graph G, hyper-parameters β, number of communities K and maximum number of iterations maxIter.Output:the probability distribution matrix U.BeginAccording to the network graphG and Eq.(1), generate the community structure matrix and randomly initialize the probability distribution matrixU0∈0,1N×K,V0∈0,1N×K;i=0Whilei≤maxIterdoUpdateU(i+1) according to Eq.(21);UpdateV(i+1) according to Eq.(22);End WhileEndThe baseline comparison methods include InfoMap, CPM, SLPA, Louvain, DEMON, SNMF, Adj-Mat, and Emb-Mat. We assessed the NMI and AC values on the karate, football, and polbooks datasets.In addition, in this part, we compare our method with the methods that focus on the original network topology and that do not node attribute information on four datasets. The four datasets are nonoverlapping communities, and so, we use AC and NMI to evaluate the partitioning result of all the methods. The results can be seen in Table5.Table 5
The performances of the different community detection algorithms on nonoverlapping as community measured by the AC and NMI.
MetricDatasetsInfoMapCPMSLPALouvainDEMONSNMFAdj-MatEmb-MatCDCNNMIKarate0.5810.6520.6580.5690.4290.8360.8250.9121.0Football0.9010.8550.5820.7130.4630.8940.8750.9030.909Polbooks0.4120.5380.4980.5470.3830.5080.4870.5240.570ACKarate0.8940.8880.8200.7410.6880.9700.9620.9701.0Football0.9180.8970.6130.7160.5460.8910.8670.9110.923Polbooks0.6950.8190.7850.8230.7400.7430.7240.7980.838As shown in Table5, the results indicate that CDCN outperforms all comparison algorithms for the nonoverlapping community detection task. The NMI reached 1.0, 0.916, and 0.570 on the karate, football, and polbooks datasets, respectively, which are better than the above methods. The AC value reached 1.0, 0.909, and 0.838 on karate, football, and polbooks datasets, respectively, which are also better than the above methods. Furthermore, the results compared with the Adj-Mat and Emb-Mat also show the great usefulness of our community structure matrix.


## 5. Conclusions

Community detection has been widely used in recommendation systems, social networks, and network security. Efficient and fast community detection algorithms contribute to the development of intelligent networks. Based on the analysis of the network characteristics, in this paper, in order to solve the problem of community detection in attributed graphs, we propose a novel method to generate the community structure matrix, which retains the relationship between two directly nodes connected or nodes that share the same neighbors, and named it CDCN. We combine node attribute information and community structure information in an effective way in the nonnegative matrix factorization framework. We used two indicators named AC and NMI on nonoverlapping communities and two indicators named F1-Score and Jaccard-Similarity on overlapping communities to evaluate our method. On nonoverlapping communities, the AC and NMI values of CDCN are better than those of other methods. On overlapping communities, the F1-score and Jaccard-Similarity value of CDCN are better than those of other methods. The extensive experimental results demonstrated that our algorithm can effectively discover the communities in real networks.



---

*Source: 5517204-2021-05-26.xml*