Graph clustering method based on confidence coefficient, centrality and sharpening smoothing
By introducing a change direction Laplace autoencoder and high confidence edge correction strategy in the graph clustering method, combined with a global-local perceived diffusion fusion module, the problems of excessive smoothing of deep GCN and poor utilization of graph structure information are solved, and clustering accuracy and fusion effect of dual-channel embedding are improved.
Patent Information
- Application Number
- CN202411771178.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119622391A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unsupervised classification, and in particular to a graph clustering method based on confidence, centrality and sharpening and smoothing. Background Art
[0002] In today's data analysis field, graph clustering technology has become one of the key technologies with wide application due to its important role in revealing the underlying structure and patterns within the data. In many practical application scenarios, data can be modeled in the form of graphs, such as user relationships in social networks and gene interactions in biological networks. In these graph data, nodes represent individuals and edges represent the associations between individuals. However, with the development of deep learning technology, graph clustering methods based on graph neural networks (GNNs) have gradually attracted attention. GNNs can effectively learn the embedded representation of nodes, thereby improving the performance of graph clustering. By constructing adjacency relationships between nodes and combining graph convolutional networks (GCNs), existing graph clustering methods can use the structural information of graphs for unsupervised learning, thereby discovering clustering structures hidden in complex data.
[0003] The most classic and pioneering work in deep clustering is Deep Embedding Clustering (DEC), which uses an optimization method similar to t-SNE to calculate the Kullback–Leibler (KL) divergence loss between the soft assignment distribution and its distribution variant to fine-tune the pre-trained encoder. However, deep clustering methods for non-graph data do not utilize any graph structure information, so they cannot achieve ideal performance in graph clustering. Due to the excellent structure extraction ability of graph neural networks (GNNs), graph clustering methods using graph convolutional networks (GCNs) or graph attention networks began to emerge. Subsequently, since the models based only on graph neural networks ignored the powerful feature extraction ability of autoencoders (AEs), some hybrid models combining AEs and GNNs began to appear, using a hybrid method of AEs and GNNs, designing an information fusion mechanism to integrate structural information and attribute information, and adopting the self-supervision method of DEC. DFCN also proposed a symmetric graph autoencoder structure, reconstructed attribute and structural losses, and introduced an autocorrelation matrix to extract global information.
[0004] However, there are still several challenges to be addressed in the above methods: GNN-based models such as GCN usually have problems with oversmoothing (deep layers) or limited locality (shallow layers). In terms of autoencoders, even if the embedding provides good clustering results, some nodes may still be located on the cluster boundaries, making accurate assignment difficult. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a graph clustering method based on confidence, centrality and sharpening and smoothing to overcome many limitations of the previous dual-channel graph clustering methods: such as (1) the over-smoothing problem of deep GCN; (2) the effective use of graph structure information; (3) the problem of fuzzy cluster boundary assignment; and (4) the problem of effective fusion of dual-channel embedding.
[0006] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is: a graph clustering method based on confidence, centrality and sharpening and smoothing, including:
[0007] S1. Initialize the graph clustering model and obtain the original feature matrix and adjacency matrix of the graph to be clustered;
[0008] S2, input the original feature matrix and adjacency matrix into the graph clustering model to generate the soft assignment distribution Q;
[0009] S3, calculate the loss function of the graph clustering model, perform back-propagation optimization, and update the parameters of the entire model;
[0010] S4. Calculate the cluster allocation index according to the updated model parameters and the soft allocation distribution Q;
[0011] S5. Complete graph clustering according to the clustering allocation index.
[0012] Further: In S1, initializing the graph clustering model includes:
[0013] S11, initialize the weight matrix of the autoencoder and perform pre-training;
[0014] S12, initializing the weight matrix of the directional Laplacian graph autoencoder, and pre-training the embedding result of the directional Laplacian graph autoencoder;
[0015] S13. Initialize the cluster center of each cluster using the k-median algorithm.
[0016] Further: S2 includes:
[0017] S21, input the original feature matrix X into the encoding and decoding module, and obtain the potential representation H through the autoencoder;
[0018] S22, inputting the adjacency matrix A into the confidence centrality enhancement module to obtain the enhanced adjacency matrix A';
[0019] S23, input the latent representation H into the confidence centrality enhancement module, and obtain the enhanced embedding H';
[0020] S24, inputting the enhanced adjacency matrix A' into the encoding and decoding module, encoding it through the directional Laplacian graph autoencoder, and obtaining the encoding representation Z;
[0021] S25, input the enhanced embedding H' and the encoded representation Z into the diffusion mixing module to generate a soft allocation distribution Q.
[0022] Further: S22 includes:
[0023] S221, inputting the adjacency matrix A into the confidence centrality enhancement module, and obtaining the confidence and centrality of each node in the adjacency matrix A through the initialized cluster center;
[0024] S222, determining a high confidence edge correction strategy;
[0025] S223. Correct the adjacency matrix A according to the high confidence edge correction strategy to obtain an enhanced adjacency matrix A'.
[0026] Further: in S222, the high confidence edge correction strategy includes a high confidence high centrality edge correction strategy and a high confidence low centrality edge correction strategy;
[0027] The high confidence and high centrality edge correction strategy is corrected by the soft assignment distribution Q result of any two points;
[0028] The high-confidence and low-centrality edge correction strategy is performed through the cosine similarity of two nodes in the same cluster.
[0029] Further: in S222, the high confidence edge correction strategy includes a high confidence high centrality edge correction strategy and a high confidence low centrality edge correction strategy;
[0030] The high confidence and high centrality edge correction strategy is corrected by the soft assignment distribution Q result of any two points;
[0031] The high-confidence and low-centrality edge correction strategy is performed through the cosine similarity of two nodes in the same cluster.
[0032] Further: S24 includes:
[0033] S241, inputting the enhanced adjacency matrix A' into the encoding and decoding module, and calculating the Laplace smoothing matrix and the Laplace sharpening matrix according to the enhanced adjacency matrix A', the identity matrix I and the degree matrix D respectively;
[0034] S242, obtaining a smoothed GCN layer and a sharpened GCN layer according to the Laplace smoothing matrix and the Laplace sharpening matrix respectively;
[0035] S243. Obtain the encoded representation Z according to the smoothed GCN layer and the sharpened GCN layer.
[0036] Further: S25 includes:
[0037] S251, inputting the enhanced embedding H' and the coded representation Z into a diffusion mixing module, performing channel averaging, and obtaining an average representation Z';
[0038] S252, respectively perform Laplace smoothing and Laplace smoothing graph diffusion on the average representation Z' to obtain intermediate representations Z G and Z L ;
[0039] S253, the middle represents Z G and Z L Weighted, the final representation Z is obtained F ;
[0040] S254, according to the final representation Z F Calculate the soft allocation distribution Q.
[0041] Furthermore: In S3, the loss function of the graph clustering model includes the autoencoder reconstruction loss, the transformed Laplacian graph autoencoder reconstruction loss, the Kullback–Leibler divergence loss of the P and Q distributions, and the Kullback–Leibler divergence loss of the Q and S distributions.
[0042] The beneficial effects of the present invention are:
[0043] 1. By introducing a directional Laplace graph autoencoder based on Laplace smoothing and sharpening, the over-smoothing problem of deep GCN is effectively alleviated; more specifically, the Laplace sharpening operation is the dual operation of Laplace smoothing, which can "offset" the over-smoothing effect brought by Laplace smoothing, which enhances the discriminability of node representation and thus improves the accuracy of clustering;
[0044] 2. By designing an enhancement module based on centrality and confidence, and adopting a high-confidence edge correction strategy, the co-cluster relationship between nodes is divided according to confidence and centrality, and the graph structure is enhanced in combination with the homogeneous relationship between nodes, thereby enhancing the effectiveness of the graph structure. This ensures that the model can still make full use of effective structural information to improve clustering performance when the graph information is sparse or unreasonable;
[0045] 3. Through the low-confidence embedding and reconstruction strategy, the local linear embedding method is used to embed and reconstruct these boundary nodes, which effectively reduces the ambiguity of the boundary nodes and improves the accuracy of the clustering results;
[0046] 4. Through the global-local perception diffusion fusion module, the effective fusion of the dual-channel embedding representation of the autoencoder and the directional Laplacian graph autoencoder is achieved. Thanks to the globality of graph diffusion, this module can not only extract detailed information from the local level, but also capture the overall structural information of the graph from the global level, ensuring that the representations from two different sources complement each other, thereby significantly improving the clustering effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 Flowchart of the graph clustering method based on confidence, centrality, and sharpening and smoothing.
[0048] Figure 2 This is the architecture diagram of the graph clustering model. DETAILED DESCRIPTION
[0049] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0050] like Figure 1 and Figure 2 As shown, in one embodiment of the present invention, a graph clustering method based on confidence, centrality and sharpening and smoothing is provided, characterized in that it includes:
[0051] S1. Initialize the graph clustering model and obtain the original feature matrix and adjacency matrix of the graph to be clustered;
[0052] S2, input the original feature matrix and adjacency matrix into the graph clustering model to generate the soft assignment distribution Q;
[0053] S3, calculate the loss function of the graph clustering model, perform back-propagation optimization, and update the parameters of the entire model;
[0054] S4. Calculate the cluster allocation index according to the updated model parameters and the soft allocation distribution Q;
[0055] S5. Complete graph clustering according to the clustering allocation index.
[0056] Specifically, in S1, initializing the graph clustering model includes:
[0057] S11, initialize the weight matrix of the autoencoder and perform pre-training;
[0058] S12, initializing the weight matrix of the directional Laplacian graph autoencoder, and pre-training the embedding result of the directional Laplacian graph autoencoder;
[0059] S13. Use the k-median algorithm to initialize the cluster center μ of each cluster.
[0060] Specifically, S2 includes:
[0061] S21. Input the original feature matrix X into the encoding and decoding module, and obtain the potential representation H through the autoencoder, which is expressed as:
[0062] H=Linear4(Linear3(Linear2(Linear1(X))))
[0063] Among them, Linear i represents the i-th linear layer.
[0064] S22, inputting the adjacency matrix A into the confidence centrality enhancement module to obtain the enhanced adjacency matrix A';
[0065] S23, input the latent representation H into the confidence centrality enhancement module, and obtain the enhanced embedding H';
[0066] The specific calculation method is:
[0067]
[0068] Among them, H i ' represents the enhanced embedding representation of node i, which is initially H; δ i represents the neighbor set of node i, w i represents the reconstruction weight, γ represents the embedding enhancement weight, G i represents the covariance matrix, Represents the potential representation of the neighbor nodes of node i;
[0069] S24, inputting the enhanced adjacency matrix A' into the encoding and decoding module, encoding it through the directional Laplacian graph autoencoder, and obtaining the encoding representation Z;
[0070] S25. Input the enhanced embedding H' and the encoded representation Z into the diffusion mixing module to generate the target distribution P.
[0071] Specifically, S22 includes:
[0072] S221, input the adjacency matrix A into the confidence centrality enhancement module, and obtain the confidence and centrality of each node in the adjacency matrix A through the initialized cluster center, and the calculation method is:
[0073]
[0074] Cnt i =d ii
[0075]
[0076] Among them, Cnf i Indicates the confidence of node i, Cnt i represents the centrality of node i, d ii represents the degree of node i, h represents the potential representation of the previous step, and s ik represents the soft probability of node i being assigned to cluster k, that is, the soft assignment distribution S derived from H, μ k is the cluster center of the kth cluster; ||·|| 2 is the square of the modulus length.
[0077] S222, determining a high confidence edge correction strategy;
[0078] The high confidence edge correction strategy includes the high confidence high centrality edge correction strategy and the high confidence low centrality edge correction strategy;
[0079] The high confidence and high centrality edge correction strategy is corrected through the soft allocation distribution Q results of any two points. The specific correction method is: if the soft allocation distribution results of any two points are consistent, an edge is added to them (if there is no edge), otherwise, if they are inconsistent, an edge is deleted (if there is an edge), that is:
[0080]
[0081] Among them, M inc represents the cluster filtering matrix, represents a set of nodes with high confidence and high centrality, express The cluster filter matrix submatrix at the node set, express The adjacency matrix submatrix at the node set, represents the modified adjacency matrix submatrix, n represents the number of nodes, Represents logical AND operation;
[0082] The high confidence and low centrality edge correction strategy is corrected by the cosine similarity of two nodes in the same cluster. The specific correction method is: if the cosine similarity of two nodes in the same cluster is high, add an edge to it (if not), that is:
[0083]
[0084] Among them, M hom represents the homogeneity filtering matrix, represents a set of nodes with high confidence and low centrality, represents the submatrix of the homogeneity filter matrix at the node set subscript, δ represents the homogeneity threshold, express The adjacency matrix submatrix at the node set, represents the modified adjacency matrix submatrix, H i and H j represents the potential representation at nodes i and j, i and j are the row and column indices of the filter matrix, express The cluster filter matrix submatrix at the node set, Represents logical OR operation, superscript T represents transposition,
[0085] S223, modifying the adjacency matrix A according to the high confidence edge modification strategy to obtain an enhanced adjacency matrix A';
[0086] in, as well as All are regarded as sub-matrices of A';
[0087] Specifically, S24 includes:
[0088] S241, input the enhanced adjacency matrix A' into the encoding and decoding module, and calculate the Laplace smoothing matrix according to the enhanced adjacency matrix A', the identity matrix I and the degree matrix D respectively. and the Laplacian sharpening matrix
[0089]
[0090] S242, according to the Laplace smoothing matrix and the Laplace sharpening matrix, the smoothed GCN layer is obtained respectively and sharpening GCN layer
[0091] Among them, φ represents the activation function ReLU, Θ i Represents trainable weight parameters;
[0092] S243. According to the smoothing GCN layer and the sharpening GCN layer, the encoding representation Z is obtained, and the expression is:
[0093]
[0094] Specifically, S25 includes:
[0095] S251, input the enhanced embedding H' and the coded representation Z into the diffusion mixing module, perform channel averaging, and obtain the average representation Z', that is, Z'=(Z+H') / 2;
[0096] S252, respectively perform Laplace smoothing and Laplace smoothing graph diffusion on the average representation Z' to obtain intermediate representations Z G and Z L , specifically:
[0097]
[0098] Among them, η is the graph diffusion parameter;
[0099] S253, the middle represents Z G and Z L Weighted, the final representation Z is obtained F , that is, Z F= Z L +vZ G , where v is the fusion ratio parameter;
[0100] S254, according to the final representation Z F Calculate the soft allocation distribution Q, which is used to derive the cluster allocation result;
[0101]
[0102] Among them, q ik represents the soft probability of node i being assigned to cluster k according to the soft assignment distribution Q, z i Z F The component at node i;
[0103] Optionally, a target distribution P can also be generated according to the soft assignment distribution Q. The target distribution P is used to assist the self-supervision of the soft assignment distribution Q, and its expression is:
[0104]
[0105] Among them, p ik represents the soft probability that node i is assigned to cluster k according to the P distribution, q im represents the soft probability that node i is assigned to cluster m according to the soft assignment distribution Q,
[0106] The autoencoder also needs to decode and reconstruct the feature data. The feature data reconstructed by the autoencoder The expression is:
[0107]
[0108] The directional Laplacian graph autoencoder also needs to decode and reconstruct the features and structure data. The features reconstructed by the directional Laplacian graph autoencoder And structure data The expression is:
[0109]
[0110] Among them, σ represents the Sigmoid activation function.
[0111] Furthermore, in S3, the loss function L of the graph clustering model includes the autoencoder reconstruction loss L AE , the reconstruction loss L of the transformed Laplacian graph autoencoder GNN , Kullback–Leibler divergence loss L for P and Q distributions aux And the Kullback–Leibler divergence loss L of Q and S distributions con , the specific expression is:
[0112] L=λ1L aux +λ2L con +L AE +αL GNN
[0113]
[0114] L aux =KL(P||Q)
[0115] L con =KL(Q||S)
[0116] Among them, λ1, λ2, α, β are all hyperparameters, KL represents the Kullback–Leibler divergence function, N represents the number of samples, CrossEntropy(.) represents the cross entropy loss, represents the Frobenius norm.
[0117] Specifically, in S5, the clustering allocation index The expression is:
[0118] in, represents the clustering assignment index of node i, ε is a hyperparameter that can be updated iteratively, and Q represents Z F Derived soft allocation distribution Q,S represents the soft allocation distribution S derived from H.
[0119] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A graph clustering method based on confidence, centrality and sharpening and smoothing, characterized in that: include: S1. Initialize the graph clustering model and obtain the original feature matrix and adjacency matrix of the graph to be clustered; S2, input the original feature matrix and adjacency matrix into the graph clustering model to generate the soft assignment distribution Q; S3, calculate the loss function of the graph clustering model, perform back-propagation optimization, and update the parameters of the entire model; S4. Calculate the cluster allocation index according to the updated model parameters and the soft allocation distribution Q; S5. Complete graph clustering according to the clustering allocation index.
2. The graph clustering method based on confidence, centrality and sharpening and smoothing according to claim 1, characterized in that: In S1, the initialization graph clustering model includes: S11, initialize the weight matrix of the autoencoder and perform pre-training; S12, initializing the weight matrix of the directional Laplacian graph autoencoder, and pre-training the embedding result of the directional Laplacian graph autoencoder; S13. Initialize the cluster center of each cluster using the k-median algorithm.
3. The graph clustering method based on confidence, centrality and sharpening and smoothing according to claim 2, characterized in that S2 include: S21, input the original feature matrix X into the encoding and decoding module, and obtain the potential representation H through the autoencoder; S22, inputting the adjacency matrix A into the confidence centrality enhancement module to obtain the enhanced adjacency matrix A'; S23, input the latent representation H into the confidence centrality enhancement module, and obtain the enhanced embedding H'; S24, inputting the enhanced adjacency matrix A' into the encoding and decoding module, encoding it through the directional Laplacian graph autoencoder, and obtaining the encoding representation Z; S25, input the enhanced embedding H' and the encoded representation Z into the diffusion mixing module to generate a soft allocation distribution Q.
4. The graph clustering method based on confidence, centrality and sharpening and smoothing according to claim 3, characterized in that: S22 includes: S221, inputting the adjacency matrix A into the confidence centrality enhancement module, and obtaining the confidence and centrality of each node in the adjacency matrix A through the initialized cluster center; S222, determining a high confidence edge correction strategy; S223. Correct the adjacency matrix A according to the high confidence edge correction strategy to obtain an enhanced adjacency matrix A'.
5. The graph clustering method based on confidence, centrality and sharpening and smoothing according to claim 4, characterized in that: In S222, the high confidence edge correction strategy includes a high confidence high centrality edge correction strategy and a high confidence low centrality edge correction strategy; The high confidence and high centrality edge correction strategy is corrected by the soft assignment distribution Q result of any two points; The high-confidence and low-centrality edge correction strategy is performed through the cosine similarity of two nodes in the same cluster.
6. The graph clustering method based on confidence, centrality and sharpening and smoothing according to claim 3, characterized in that: In S222, the high confidence edge correction strategy includes a high confidence high centrality edge correction strategy and a high confidence low centrality edge correction strategy; The high confidence and high centrality edge correction strategy is corrected by the soft assignment distribution Q result of any two points; The high-confidence and low-centrality edge correction strategy is performed through the cosine similarity of two nodes in the same cluster.
7. The graph clustering method based on confidence, centrality and sharpening and smoothing according to claim 3, characterized in that: S24 includes: S241, inputting the enhanced adjacency matrix A' into the encoding and decoding module, and calculating the Laplace smoothing matrix and the Laplace sharpening matrix according to the enhanced adjacency matrix A', the identity matrix I and the degree matrix D respectively; S242, obtaining a smoothed GCN layer and a sharpened GCN layer according to the Laplace smoothing matrix and the Laplace sharpening matrix respectively; S243. Obtain the encoded representation Z according to the smoothed GCN layer and the sharpened GCN layer.
8. The graph clustering method based on confidence, centrality and sharpening and smoothing according to claim 3, characterized in that: S25 includes: S251, inputting the enhanced embedding H' and the coded representation Z into a diffusion mixing module, performing channel averaging, and obtaining an average representation Z'; S252, respectively perform Laplace smoothing and Laplace smoothing graph diffusion on the average representation Z' to obtain intermediate representations Z G and Z L ; S253, the middle represents Z G and Z L Weighted, the final representation Z is obtained F ; S254, according to the final representation Z F Calculate the soft allocation distribution Q.
9. The graph clustering method based on confidence, centrality and sharpening and smoothing according to claim 1, characterized in that: In S3, the loss functions of the graph clustering model include autoencoder reconstruction loss, directional Laplacian graph autoencoder reconstruction loss, Kullback–Leibler divergence loss of P and Q distributions, and Kullback–Leibler divergence loss of Q and S distributions.
Citation Information
Patent Citations
Node deep clustering method based on joint learning
CN115511000A
Multi-view clustering model implementation method based on graph contrast learning
CN117036760A