Community detection method based on high-order Jaccard similarity and class depth auto-encoder
By introducing high -end Jaccard similarity indicators and class depth self -encoders in community testing, the problem of difficulty capturing high -level structural information in the superficial community testing method is solved, and more accurate community testing is achieved.
Patent Information
- Application Number
- CN202411388504.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The shallow community detection method based on the adjacency matrix is difficult to capture high-order structural information in the network and cannot conduct in-depth analysis.
The input matrix of the community detection is enriched by high -end Jaccard similarity indicators, and the input matrix is deeply decomposed through the depth self -encoder to tap the more accurate node relationship in the network.
It significantly improves the accuracy of community testing and can better capture the relationship between high -level structural information and deep node nodes in the network.
Smart Images

Figure CN119378606A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of complex networks and relates to a community detection method based on high-order Jaccard similarity and deep autoencoder-like. Background Art
[0002] Community detection is a core task in complex network analysis, which can reveal the potential modular structure and close connections between nodes in the network. Complex networks are widely present in various real-world scenarios, such as social networks, biological networks, transportation networks, and power networks. The nodes of these networks are large in scale and sparsely connected, showing high-dimensional sparse characteristics. Therefore, how to efficiently and accurately identify community structures is of great significance for understanding the organizational laws and functions of complex networks. The non-negative matrix factorization (NMF) method can decompose the original network representation into a community member matrix with its easy-to-interpret characteristics, so it is a good tool for community detection. However, traditional NMF methods mainly rely on the adjacency matrix of the network. This method can only use local node connection information and ignores the deeper structural features in the network. With the expansion of network scale and the increase of complexity, shallow community detection methods based only on the adjacency matrix are difficult to capture high-order structural information in the network, which will affect the accuracy and completeness of the detection results. The network topology has multi-level and complex characteristics. The community is not only composed of directly connected nodes, but also may contain node relationships connected by multi-hop paths. Therefore, when faced with complex hierarchical information, shallow NMF methods are prone to information loss and fail to reveal node connections hidden in the deep layer. In order to make up for this defect, researchers began to explore the combination of deep learning and community detection, and use more complex model structures to mine deep information in the network. In this context, using high-order node similarity indicators to construct high-order neighborhood information of the network has become an effective strategy in community detection. Among them, high-order Jaccard similarity can capture the indirect connection between nodes, thereby supplementing the missing information of the adjacency matrix. In addition, the introduction of deep autoencoders provides a new path for the deep decomposition of network structure. By using deep autoencoders to model the multi-layer structure of the network, the hidden relationship between nodes can be extracted, so as to more accurately divide the community. This community detection method that combines high-order similarity and deep autoencoders not only enriches the information dimension in the input matrix, but also better adapts to the multi-level structure of complex networks through the powerful representation ability of autoencoders, and significantly improves the accuracy of community detection. This method has broad application prospects in the fields of social network analysis, biological network functional module identification, etc., and also provides new ideas and directions for future community detection research in complex networks. Summary of the invention
[0003] The problem to be solved by the present invention is that the shallow community detection method based on the adjacency matrix is difficult to capture the high-order structural information in the network, and it is also unable to perform in-depth analysis of the network structure. On the basis of the traditional NMF algorithm, the present invention considers the structural information of the high-order neighborhood in the network, uses the high-order Jaccard node similarity index to enrich the input matrix of community detection, and deeply decomposes the input matrix to mine more accurate node relationships in the network.
[0004] The technical solution of the present invention is:
[0005] (1) Constructing a high-order Jaccard similarity index
[0006] The similarity of a pair of nodes (e.g., v i and v j ) is a measure of whether two nodes should be assigned to the same community. Existing similarity measures are divided into two categories: local similarity measures and global similarity measures. Local similarity measures include common neighbor measures, cosine measures, and traditional Jaccard measures. The common neighbor measure is defined as the number of common neighbors between two nodes. The cosine measure is a measure of the similarity between two numerical sequences, which is defined as the dot product of the vectors divided by the product of their lengths. The traditional Jaccard measure is defined as the size of the intersection of the neighbor sets of two nodes divided by the size of the union. Since the Jaccard measure is an enhanced version of the common neighbor measure, the Jaccard measure is now basically used instead of the common neighbor measure to calculate node similarity. The calculation formula of the traditional Jaccard measure is as follows:
[0007]
[0008] Γ(v i ),Γ(v j ) represent the nodes v i and v j The disadvantages of local similarity measures are also obvious. They only consider the impact of directly connected neighbor nodes on similarity calculation, ignoring a lot of useful information, such as the information of node high-order neighbors. The present invention uses high-order Jaccard metric to enrich the input matrix of community detection based on traditional Jaccard metric.
[0009] Let h be a non-negative constant for the number of hops, and p be an integer in the range [1, h]. For a given node v i , and the set of neighbors directly connected to it is recorded as Γ(v i ), and its high-order neighbors are recorded as:
[0010] Γ p (v i )={v j∈V:v j Located at i In the p-hop neighborhood, and 2≤p≤h} (2) where V represents the set of network nodes, on this basis, the calculation formula of the h-order Jaccard metric is as follows:
[0011]
[0012] When h is 1, the ω-Jaccard metric is the square of the Jaccard metric. If h is too large, the complexity of the calculation will increase. It is recommended that the parameter h be in {1, 2, 3}, and the node similarity index calculated using the h-order Jaccard metric is used to form a similarity matrix S as the input matrix of the model.
[0013] Table 1 High-order Jaccard similarity index calculation algorithm proposed in this invention
[0014]
[0015] (2) Constructing an autoencoder-like objective function
[0016] The traditional NMF community detection method decomposes the input matrix S into a mapping matrix U and a community member matrix V. The specific decomposition formula is:
[0017] S≈UV(4)
[0018] Formula (4) shows that the mapping matrix U and the community member matrix V can be learned from the input matrix S. However, in real life, community networks are generally very complex, and the mapping matrix U contains a relatively complex hierarchical structure. Deep NMF is to decompose the mapping matrix U to learn the hidden hierarchical structure. Deep NMF helps to discover the final community members of the network. Therefore, the input matrix can be decomposed into p+1 matrices:
[0019] S≈U 1 U 2 ...U P V P (5)
[0020] in At the same time n = r 0 ≥r 1 ≥…r p-1 ≥r p =k. Formula (5) can also be specifically decomposed into:
[0021]
[0022] Through the above decomposition, we can get V of each layer i , to calculate U i U2 …U p ,V p Construct the following objective function:
[0023]
[0024] Formula (5) decomposes the input matrix. It is essentially the decoder corresponding to the autoencoder. The encoder is now introduced to make it have a better effect. In NMF, the encoder corresponds to V = U T A, it can be seen that this formula can project the input matrix S onto the community member matrix V with the help of the mapping matrix U, integrate the encoder and decoder into an objective function at the same time, let them learn from each other in iterative optimization, and thus obtain a more accurate community member matrix V. The objective function of the encoder can be defined as follows:
[0025]
[0026] After unifying the objective functions of the encoder and decoder, we can get:
[0027]
[0028] This formula adds graph regularization λ represents the regularization parameter, L represents the Laplace matrix, and the optimal U can be obtained by minimizing the objective function (8): i ,U 2 ,…U p ,V p matrix.
[0029] (3) Optimizing the objective function
[0030] By fixing all variables except U, we can obtain the update rule of the mapping matrix U. Then formula (8) becomes:
[0031]
[0032] Among them Ψ i+1 =U 1 U 2 …U i-1 , Φ i+1 =U i+1 …U p-1 U p , when i=1, set Ψ 0 =I, and similarly when i=p, set Φ p+1 =I, I is the identity matrix. Now we introduce the Lagrange multiplier matrix Θ i Come to U i Imposing non-negative constraints, the equivalent objective function is as follows:
[0033]
[0034] It can also be further written as:
[0035]
[0036] By L(U i ,Θ i ) for U i The derivative of is set to 0, we can get:
[0037]
[0038] in:
[0039]
[0040] According to the Karush-Kuhn-Tucker (KKT) condition, we can get:
[0041]
[0042] Equation (12) is the fixed point equation that the solution must satisfy when it converges. By solving this equation, we can get the mapping matrix U i The update rule is:
[0043]
[0044] By fixing the V p All variables except , formula (8) can be changed to:
[0045]
[0046] According to the derivation process similar to that of the mapping matrix U, the update rule of the community matrix can be obtained as follows:
[0047]
[0048] About the feature matrix V i , because it does not affect the value of the objective function in equation (8), so its update rule is arbitrary, but we hope that it can extract the hidden attributes of each intermediate layer, so we need to solve V i , which actually optimizes the following objective function:
[0049]
[0050] and V p The derivation process is similar to that of i The update rules are as follows:
[0051]
[0052] So far, we have completed the update rules of all matrices. The overall process of the community detection method proposed in the present invention is given below:
[0053] Table 2 Community detection algorithm proposed by the present invention
[0054] BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to make the purpose, technical solution and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:
[0056] Figure 1 This is a flow chart of the community detection method proposed in the present invention.
[0057] Figure 2 This is the result of performing community detection on an LFR randomly generated network with 1000 nodes and using normalized mutual information (NMI) to evaluate the detection effect.
[0058] Figure 3 This is the result of performing community detection on an LFR randomly generated network with 2000 nodes and using normalized mutual information (NMI) to evaluate the detection effect.
[0059] Figure 4 This is the result of performing community detection on an LFR randomly generated network with 3000 nodes and using normalized mutual information (NMI) to evaluate the detection effect.
[0060] Figure 5 This is the result of performing community detection on an LFR randomly generated network with 4000 nodes and using normalized mutual information (NMI) to evaluate the detection effect. DETAILED DESCRIPTION
[0061] In order to make the technical solutions, advantages and purposes of the present invention more clear, the present invention is described in detail below with reference to the accompanying drawings and specific implementation methods.
[0062] In order to evaluate the advantages of the present invention over other community detection methods, a public data set is obtained from the Internet and the present invention is compared with the classic community detection method:
[0063] (1) Public datasets
[0064] The real network dataset selected in the field of community detection is now explained.
[0065] Table 3 Real network dataset information
[0066]
[0067] (2) Evaluation indicators
[0068] The present invention selects two commonly used evaluation indicators in community detection algorithms: NMI (Normalized Mutual Information) and ARI (Adjusted Rand Index).
[0069] 1)NMI
[0070] NMI (normalized mutual information) is an indicator used to detect the effectiveness of community detection. It is mainly calculated by comparing the difference between the true label and the predicted label of the node. The calculation formula of NMI is:
[0071]
[0072] Where M represents the mixing matrix; |C 1 | represents the real number of communities in the community network; |C 2 | represents the predicted number of communities in the community network; M i ; represents the number of nodes with the real label i; M ;j Indicates the number of nodes with the predicted label j; M ij Indicates the number of nodes whose true label is i but predicted label is j.
[0073] The value range of NMI is [0,1]. The larger the value of NMI, the better the community detection effect. The smaller the value of NMI, the worse the community detection effect. The quality of community detection directly affects whether similar nodes can be classified into one category. Nodes with larger similarity gaps are divided into different communities. A good community detection effect means that the community detection algorithm can classify more nodes into the correct community, while a poor community detection effect means that the community detection algorithm classifies more nodes into the wrong community.
[0074] 2) ARI
[0075] ARI (Adjusted Rand Index) is the full name of the adjusted Rand Index, which reflects the degree of overlap of data divided into different categories. The use of this metric requires the data itself to be labeled with categories. It is a common evaluation indicator in community detection. The ARI value range is [-1,1]. The larger the value, the more consistent the division result is with the actual situation, and the better the effect. In a broad sense, ARI essentially measures the degree of consistency between the distributions of two data. Its calculation method is:
[0076]
[0077] Among them, RI refers to the Rand Index, and E(RI) represents the expected value of the Rand Index. For random results, RI cannot guarantee that the score value is close to zero. Therefore, ARI is proposed to achieve "when the clustering results are randomly generated, the index should be close to zero". Its advantage is that it makes the division results have a higher degree of distinction. The specific definition of RI is as follows:
[0078]
[0079] Among them, TP is True positive, which refers to the number of data points where the same type of nodes are correctly classified into one category; TN is Truenegative, which is the number of data points where nodes that do not belong to the same category are correctly separated; FP is False positive, which is the number of data points where nodes of different categories are mistakenly classified into one cluster; FN is False negative, which is the number of data points where nodes of the same category are mistakenly divided into different clusters.
[0080] (3) Benchmark Algorithm
[0081] NSED: A non-negative symmetric encoder-decoder approach for community detection that explicitly centralizes the encoder and decoder into a unified loss function;
[0082] J-MNMF: A community detection algorithm that replaces the input matrix with the traditional Jaccard similarity matrix and retains the structure and inherent properties of the network in the input matrix;
[0083] EdMot: A community detection algorithm for motif edge enhancement, which first creates a graph consisting of high-order motifs and clusters the created graph via the Louvain method;
[0084] Bigclam: Essentially a cluster membership model, it relaxes the graph fitting problem into a continuous optimization problem for community detection;
[0085] (4) Experimental results on real network datasets
[0086] Parameter settings:
[0087] The parameters of the present invention are set as: h=2, λ=1;
[0088] The rest of the benchmark algorithms use the default algorithm parameters.
[0089] Table 3 NMI comparison of various algorithms on real data sets
[0090] Wiki Email Football Polbooks Cora EdMot 0.240837 0.617858 0.246715 0.379868 0.052562 NESD 0.2659 0.030096 0.660735 0.363029 0.006688 bigclam 0.019143 0.028201 0.174989 0.091699 0.026964 J-MNMF 0.289407 0.694796 0.923864 0.423599 0.159904 The present invention 0.344107 0.709614 0.929807 0.548678 0.261737
[0091] Table 4 ARI comparison of various algorithms on real datasets
[0092] Wiki Email Football Polbooks Cora EdMot 0.081233 0.402487 0.002231 0.422487 -0.00060 NESD 0.1253 -0.000488 0.425688 0.377237 -0.00232 bigclam 0.003535 0.001061 0.003174 0.048372 -0.000288 J-MNMF 0.145090 0.428739 0.858813 0.470875 0.091389 The present invention 0.196123 0.435416 0.920334 0.605264 0.171094
[0093] (5) Experimental results on LFR random generation network
[0094] The mixing parameter μ in the LFR randomly generated network represents the complexity of the network structure. The four result graphs all show that when the network node scale remains unchanged, as the mixing parameter increases, the NMI values of all algorithms are constantly decreasing. The larger the mixing parameter, the more fuzzy and complex the network structure is, so it becomes difficult to accurately detect the community structure of the network.
[0095] Figure 1 The parameters of the LFR network are set as follows: the number of nodes N is 1000, the average degree of the network is 10, the maximum degree of the nodes in the network is 40, the power-law distribution exponent of the degree distribution is 2, the power-law distribution exponent of the community size distribution is 1, the minimum community size is 30, the maximum community size is 60, and the mixing parameter setting range is 0.1 to 0.7.
[0096] Figure 2 The parameter setting of the LFR network is only Figure 1 The number of nodes is changed to 2000, and other parameters remain unchanged.
[0097] Figure 3 The parameters of the LFR network are set as follows: the number of nodes N is 3000, the average degree of the network is 20, the maximum degree of nodes in the network is 100, the power-law distribution exponent of the degree distribution is 2, the power-law distribution exponent of the community size distribution is 1, the minimum community size is 20, the maximum community size is 100, and the mixing parameter setting range is 0.1 to 0.7.
[0098] Figure 4 The parameter setting only Figure 3 The number of nodes is changed to 4000, and other parameters remain unchanged.
[0099] From the four result graphs, it can be seen that as the complexity of the network increases, the community detection method proposed by the present invention is always better than the traditional community detection method, and has higher stability. The present invention introduces a high-order Jaccard metric based on the deep autoencoder, and the detection effect is greatly improved compared with the NSED method that only uses the deep autoencoder; at the same time, compared with the J-MNF method using the traditional Jaccard indicator, the present invention can also achieve better detection results in the above LFR network setting.
[0100] The above description is only a specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technology can understand and think of any changes or substitutions within the technical scope disclosed by the present invention, which should be included in the scope of the present invention.
Claims
1. A community detection method based on high-order Jaccard similarity and deep autoencoder, characterized in that The traditional Jaccard index is improved, and the high-order Jaccard node similarity index is used to obtain the deep information of the network structure, thereby enriching the input matrix of community detection; and the deep structure of the network is decomposed through a deep autoencoder to extract the hidden relationship between nodes, so as to perform community detection more accurately. The specific method is to integrate the objective functions of the encoder and decoder into the same objective function, and obtain the update rule of each parameter through iterative update, and finally perform iterative training until the model converges.
2. The high-order Jaccard index according to claim 1, characterized in that: The following steps are involved: The similarity of a pair of nodes (e.g., v i and v j ) is a measure of whether two nodes should be assigned to the same community. Existing similarity measures are divided into two categories: local similarity measures and global similarity measures. Local similarity measures include common neighbor measures, cosine measures, and traditional Jaccard measures. The common neighbor measure is defined as the number of common neighbors between two nodes. The cosine measure is a measure of the similarity between two numerical sequences, which is defined as the dot product of the vectors divided by the product of their lengths. The traditional Jaccard measure is defined as the size of the intersection of the neighbor sets of two nodes divided by the size of the union. Since the Jaccard measure is an enhanced version of the common neighbor measure, the Jaccard measure is now basically used instead of the common neighbor measure to calculate node similarity. The calculation formula of the traditional Jaccard measure is as follows: Γ(v i ),Γ(v j ) represent the nodes v i and v j The disadvantages of local similarity measures are also obvious. They only consider the impact of directly connected neighbor nodes on similarity calculation, ignoring a lot of useful information, such as the information of node high-order neighbors. The present invention uses high-order Jaccard metric to enrich the input matrix of community detection based on traditional Jaccard metric. Let h be a non-negative constant for the number of hops, and p be an integer in the range [1, h]. For a given node v i , and the set of neighbors directly connected to it is recorded as Γ(v i ), and its high-order neighbors are recorded as: Γ p (v i )={v j ∈V:v j Located at i Within the p-hop neighborhood of , and 2≤p≤h} (2) Where V represents the set of network nodes. On this basis, the calculation formula of the h-order Jaccard metric is as follows: When h is 1, the ω-Jaccard metric is the square of the Jaccard metric. If h is too large, the complexity of the calculation will increase. Here, it is recommended that the parameter h be in {1, 2, 3}. The node similarity index results calculated using the h-order Jaccard metric form a similarity matrix S as the input matrix of the model. Table 1 High-order Jaccard similarity index calculation algorithm proposed in this invention 3. According to claim 1, the objective functions of the encoder and the decoder are integrated into the same objective function, and the deep structure of the network is decomposed, characterized in that: The steps include: The traditional NMF community detection method decomposes the input matrix S into a mapping matrix U and a community member matrix V. The specific decomposition formula is: S≈UV (4) Formula (4) shows that the mapping matrix U and the community member matrix V can be learned from the input matrix S. However, in real life, community networks are generally very complex, and the mapping matrix U contains a relatively complex hierarchical structure. Deep NMF is to decompose the mapping matrix U to learn the hidden hierarchical structure. Deep NMF helps to discover the final community members of the node, so the input matrix can be decomposed into p+1 matrices: S≈U1U2...U P V P (5) in At the same time n=r0≥r1≥…r p-1 ≥r p =k. Formula (5) can also be specifically decomposed into: V p-1 ≈U p V p V2≈U3…U p V p V1≈U2…U p V p Through the above decomposition, we can get V of each layer i , to calculate U i U2…U p ,V p Construct the following objective function: Formula (5) decomposes the input matrix. It is essentially the decoder corresponding to the autoencoder. The encoder is now introduced to make it have a better effect. In NMF, the encoder corresponds to V = U T A, it can be seen that this formula can project the input matrix S onto the community member matrix V with the help of the mapping matrix U, integrate the encoder and decoder into an objective function at the same time, let them learn from each other in iterative optimization, and thus obtain a more accurate community member matrix V. The objective function of the encoder can be defined as follows: After unifying the objective functions of the encoder and decoder, we can get: This formula adds graph regularization λ represents the regularization parameter, L represents the Laplace matrix, and the optimal U can be obtained by minimizing the objective function (8): i ,U2,…U p ,V p matrix.
4. The method of claim 1, wherein the update rule for each parameter in the objective function is obtained by iterative updating and the training is performed until the model converges, wherein: The scheme is as follows: By fixing all variables except U, we can obtain the update rule of the mapping matrix U. Then formula (8) becomes: Among them Ψ i+1 =U1U2…U i-1 , Φ i+1 =U i+1 …U p-1 U p , when i = 1, set Ψ0 = I, and similarly when i = p, set Φ p+1 =I, I is the identity matrix. Now we introduce the Lagrange multiplier matrix Θ i Come to U i Imposing non-negative constraints, the equivalent objective function is as follows: It can also be further written as: By L(U i ,Θ i ) for U i The derivative of is set to 0, we can get: in: According to the Karush-Kuhn-Tucker (KKT) condition, we can get: Equation (12) is the fixed point equation that the solution must satisfy when it converges. By solving this equation, we can get the mapping matrix U i The update rule is: By fixing the V p All variables except , formula (8) can be changed to: According to the derivation process similar to that of the mapping matrix U, the update rule of the community matrix can be obtained as follows: About the feature matrix V i , because it does not affect the value of the objective function in equation (8), so its update rule is arbitrary, but we hope that it can extract the hidden attributes of each intermediate layer, so we need to solve V i , which actually optimizes the following objective function: and V p The derivation process is similar to that of i The update rules are as follows: So far, we have completed the update rules of all matrices. The overall process of the community detection method proposed in the present invention is given below: Table 2 Community detection algorithm proposed by the present invention
Citation Information
Patent Citations
Similarity community discovery method based on k-means
CN108833158A
Community discovery analysis method combining depth sparse encoder and quasi-Newton method
CN109859062A
Semi-supervised community discovery method fusing node attributes and graph structure
CN110442800A
Community discovery information processing method and system based on fuzzy mathematics
CN110781940A
Attribute graph community search method and system based on representation learning
CN113626723A