Sparse graph clustering pooling method based on reconstruction regularization
By employing a sparse graph clustering pooling method based on reconstruction regularization, and utilizing a bi-branch graph convolutional network and Gumbel-Softmax sampling mechanism, combined with entropy constraints and multi-level reconstruction, a sparse allocation matrix is generated. This solves the sparsity and discriminative problems of dense matrices in graph pooling, thereby improving the stability and efficiency of graph representation learning.
Patent Information
- Application Number
- CN202512040411.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-10
AI Technical Summary
Existing graph pooling methods in graph representation learning suffer from a lack of sparsity and discriminativeness in dense allocation matrices, resulting in blurred cluster structures, insufficient information retention, and difficulty in preserving local features while taking into account global structural information. They perform particularly poorly in dynamic and multi-level graph structure data.
A sparse graph clustering pooling method based on reconstruction regularization is adopted. The node embedding and initial assignment matrix are generated through a dual-branch graph convolutional network. Gumbel noise and Top-K differentiable sampling mechanism are introduced. Combined with dual entropy constraints and a multi-level reconstruction regularization framework, a sparse assignment matrix is generated to realize the aggregation of node embeddings and graph-level representation.
It improves the model's adaptability and stability on graph-structured data, effectively alleviates information loss and feature drift problems, and enhances the graph neural network's ability to preserve multi-level features and its computational efficiency in complex scenarios.
Smart Images

Figure CN121835744A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence and data mining technology, and in particular to a sparse graph clustering pooling method based on reconstruction regularization. Background Technology
[0002] Graph-structured data can simultaneously characterize entity attributes and relationships between entities, making it an important data form for representing complex information. With the development of artificial intelligence technology, graph signal processing and graph representation learning have gradually become research hotspots. Graph neural networks, as important models for processing graph-structured data, demonstrate high application value in fields such as social network analysis, drug discovery, and recommender systems by propagating and aggregating node information on graph structures.
[0003] In graph-level tasks, graph neural networks typically need to aggregate node-level information into graph-level representations for subsequent classification or prediction tasks. Due to the non-Euclidean spatial properties of graph-structured data, effectively aggregating local node features into a global representation while preserving structural information has become a key problem in graph representation learning. Inspired by pooling and downsampling operations in convolutional neural networks in computer vision, graph pooling has been introduced to generate compact graph-level representations from node embeddings while preserving topological structure and node feature information as much as possible. Depending on the implementation, graph pooling can directly compress node representations into a single vector, forming a global pooling or readout function, or it can simplify the graph structure by progressively reducing the graph size, thereby achieving hierarchical pooling and extracting multi-scale features.
[0004] Existing hierarchical graph pooling methods can generally be categorized into cluster pooling, node selection pooling, edge pooling, and hybrid pooling, with cluster pooling and node selection pooling being the most widely used. Node selection-based pooling methods typically select key nodes by calculating node importance scores. While computationally efficient, these methods discard some node information during pooling, potentially leading to the loss of fine-grained features. Cluster pooling methods, on the other hand, coarsen the graph structure by mapping graph nodes to clusters or supernodes. Node-to-cluster mapping methods include those based on traditional clustering algorithms, community detection algorithms, topology partitioning methods, and soft assignment methods based on graph neural network learning.
[0005] Clustering pooling operators that map nodes to the cluster space using soft allocation matrices have been shown to have high expressive power, but they still have significant shortcomings in practical applications. The allocation matrices generated by these methods are typically dense, lacking sufficient sparsity and discriminativity, which can easily lead to blurred cluster structures, insufficient information retention, and reduced model interpretability. Furthermore, existing clustering pooling methods generally lack effective mechanisms for preserving hierarchical information during the pooling process, making them prone to feature drift in deep networks and unable to simultaneously maintain local features and global structural information.
[0006] To address the aforementioned issues, researchers have begun to explore introducing sparsity mechanisms into the clustering and pooling process. Sparse sampling-based methods have gained increasing attention, typically employing random noise and selective sampling strategies to reduce the density of the assignment matrix. However, these methods still face limitations in practical applications. While noise injection enhances exploration capabilities, it can disrupt the continuity of the feature space; the randomness introduced during sampling, while increasing assignment diversity, can easily lead to instability during training; furthermore, gradient interruption is a common problem in discrete sampling operations, making it difficult to effectively backpropagate the loss signal, thus limiting the model's optimization performance. These issues make it difficult for existing methods to achieve effective structural sparsity while maintaining training stability.
[0007] Furthermore, real-world graph data typically exhibits dynamic evolution and multi-level structural features. For example, in social networks, node relationships change over time; in molecular and protein structures, local chemical bonds and global spatial configurations simultaneously influence functional performance. Short-range and long-range dependencies in graphs require different information processing and preservation strategies. However, as the number of layers in graph neural networks increases, problems such as over-smoothing, over-compression, and feature drift become increasingly apparent, making it difficult for traditional pooling methods to simultaneously capture local structural details and global topological features. In applications such as protein function prediction in bioinformatics and community detection in social networks, existing methods often fail to balance microscopic interaction patterns with macroscopic structural regularities, exhibiting insufficient multi-level feature preservation capabilities, thus limiting the effectiveness of graph neural networks in complex scenarios. Summary of the Invention
[0008] The purpose of this invention is to address the shortcomings of existing technologies by proposing a sparse graph clustering pooling method based on reconstruction regularization.
[0009] To achieve the above objectives, the present invention adopts the following technical solution:
[0010] The sparse graph clustering pooling method based on reconstruction regularization includes the following steps:
[0011] A dual-branch graph convolutional network architecture is used as the basic encoder. The node feature matrix and adjacency matrix corresponding to the input graph structure data are respectively input into two graph convolutional networks. The node embedding is obtained through the first graph convolutional network, and the initial assignment matrix is obtained through the second graph convolutional network.
[0012] Gumbel noise is introduced into the initial assignment matrix, and a Top-K differentiable sampling mechanism based on Gumbel-Softmax is adopted. For each row of the input graph node in the initial assignment matrix, only the top K largest cluster assignment values are retained to obtain a sparsified assignment matrix. In the forward propagation of the differentiable sampling mechanism, a discretized Top-K mask matrix is used, and in the backward propagation of the differentiable sampling mechanism, the gradient is passed to the continuous relaxation output of Gumbel-Softmax through a pass-through estimator.
[0013] In the process of generating the sparse allocation matrix, a dual entropy constraint mechanism is introduced. The node-level entropy constraint acts as a constraint term on the allocation results corresponding to the input graph nodes in the sparse allocation matrix. By minimizing the entropy value of the allocation probability distribution of each input graph node, it ensures that the input graph node clearly belongs to a single cluster. The cluster-level entropy constraint acts as a constraint term on the aggregation allocation results corresponding to each cluster in the sparse allocation matrix. By maximizing the entropy value of the cluster activation distribution corresponding to each cluster, it prevents cluster allocation collapse and achieves balanced utilization of cluster resources.
[0014] In the process of node embedding aggregation based on a sparse allocation matrix, a multi-level reconstruction-driven regularization framework is introduced. This framework includes short-range reconstruction and long-range reconstruction. In the multi-level reconstruction-driven regularization framework, node embeddings are aggregated using a sparse allocation matrix to obtain cluster embeddings corresponding to each cluster in the current pooling layer for reconstruction constraints. Short-range reconstruction minimizes the difference between the original node embeddings and the node embeddings reconstructed based on cluster embeddings and the sparse allocation matrix, as well as the difference between the original adjacency matrix and the adjacency matrix reconstructed based on the sparse allocation matrix, by establishing a mapping path from coarsened features to the original features. Long-range reconstruction applies reconstruction constraints to node embeddings across multiple graph neural network layers.
[0015] The node embeddings are aggregated using a sparse allocation matrix to generate the node embeddings and adjacency matrix of the coarsened graph. A graph convolutional network is then applied to the coarsened graph for feature extraction, and a readout operation is performed to obtain a graph-level representation for downstream graph classification or graph representation learning tasks.
[0016] Preferably, the formula for calculating Gumbel noise is:
[0017] ;
[0018] in, This represents a uniform distribution between 0 and 1. It is a stability constant to prevent numerical overflow.
[0019] Preferably, the value of K satisfies: ;in Indicates the number of clusters, This is a hyperparameter used to control the sparsity ratio.
[0020] Preferably, the temperature parameter of Softmax in Top-K sparsification Used to adjust the smoothness of the allocation results, where, The smaller the value, the closer the generated distribution is to a one-hot distribution; The larger the value, the smoother the generated distribution.
[0021] Preferably, the loss function of the node-level entropy constraint is defined as the Shannon entropy of the node allocation distribution.
[0022] Preferably, the node-level entropy and cluster-level entropy loss functions are defined as follows:
[0023] ;
[0024]
[0025] in Indicates the first The entropy function of the probability distribution of the distribution of nodes. This indicates that the node is assigned to the first... The proportion of clusters is called cluster activation. It is a stability constant, introduced to prevent numerical instability.
[0026] A sparse graph clustering pooling system based on reconstruction regularization, the system comprising:
[0027] The encoding module uses a dual-branch graph convolutional network architecture as the basic encoder. It inputs the node feature matrix and adjacency matrix corresponding to the input graph structure data into two graph convolutional networks respectively. The node embedding is obtained through the first graph convolutional network, and the initial assignment matrix is obtained through the second graph convolutional network.
[0028] A differentiable sparsity module is used to introduce Gumbel noise into the initial assignment matrix and adopt a Top-K differentiable sampling mechanism based on Gumbel-Softmax. For each row of the input graph node in the initial assignment matrix, only the top K largest cluster assignment values are retained to obtain a sparsified assignment matrix. In the forward propagation of the differentiable sampling mechanism, a discretized Top-K mask matrix is used, and in the backward propagation of the differentiable sampling mechanism, the gradient is passed to the continuous relaxation output of Gumbel-Softmax through a pass-through estimator.
[0029] The dual entropy constraint module introduces a dual entropy constraint mechanism during the generation of the sparse allocation matrix. Node-level entropy constraints act as constraints on the allocation results corresponding to input graph nodes in the sparse allocation matrix, minimizing the entropy value of the allocation probability distribution of each input graph node to ensure that the input graph node explicitly belongs to a single cluster. Cluster-level entropy constraints act as constraints on the aggregate allocation results corresponding to each cluster in the sparse allocation matrix, maximizing the entropy value of the cluster activation distribution corresponding to each cluster to prevent cluster allocation collapse and achieve balanced utilization of cluster resources.
[0030] A multi-level reconstruction regularization module is used to introduce a multi-level reconstruction-driven regularization framework during the node embedding aggregation process based on a sparse allocation matrix. This framework includes short-range reconstruction and long-range reconstruction. In the multi-level reconstruction-driven regularization framework, node embeddings are aggregated using a sparse allocation matrix to obtain cluster embeddings corresponding to each cluster in the current pooling layer, used for reconstruction constraints. Short-range reconstruction establishes a mapping path from coarsened features to original features, minimizing the differences between the original node embeddings and the node embeddings reconstructed based on cluster embeddings and the sparse allocation matrix, as well as the differences between the original adjacency matrix and the adjacency matrix reconstructed based on the sparse allocation matrix. Long-range reconstruction applies reconstruction constraints to node embeddings across multiple graph neural network layers.
[0031] The graph pooling and readout module is used to aggregate node embeddings using a sparse allocation matrix to generate node embeddings and adjacency matrices of a coarsened graph. It then applies a graph convolutional network to the coarsened graph for feature extraction and performs a readout operation to obtain a graph-level representation for downstream graph classification or graph representation learning tasks.
[0032] The beneficial effects of this invention are as follows:
[0033] This invention, through systematic theoretical analysis and experimental verification, demonstrates the crucial role of differentiable pooling in graph-structured data representation learning. By introducing a Gumbel-Softmax-based differentiable sampling mechanism combined with a dual-entropy constraint mechanism, a sparse allocation matrix with clear discriminativeness is constructed. The dual-entropy constraint mechanism provides collaborative constraints at both the node and cluster levels, dynamically balancing the clarity of node allocation with the balance of cluster resources, thereby enhancing the model's adaptability and stability across different graph-structured data. Furthermore, by combining a pass-through estimator technique with a temperature regulation strategy, both sparsity effectiveness and gradient propagation are achieved while ensuring end-to-end training stability.
[0034] The graph pooling method proposed in this invention, based on differentiable sparsity and multi-scale reconstruction, exhibits excellent performance when processing hierarchical graph structure information. By constructing a multi-scale reconstruction-driven regularization framework that includes short-range and long-range reconstruction, the pooling process simultaneously constrains local feature reconstruction errors and cross-layer feature consistency, effectively alleviating the information loss and feature drift problems commonly found in traditional pooling methods. The multi-scale reconstruction mechanism can preserve local structural details and global topological patterns while compressing the graph structure, providing a stable feature preservation method for graph neural networks to process complex structural data.
[0035] This invention, based on the Gumbel-Softmax differentiable sparsity method, the dual entropy constraint mechanism of node-level and cluster-level synergy, and the application of the multi-scale reconstruction framework in the sparse clustering graph pooling process, constitutes a complete sparse clustering graph pooling scheme, providing systematic technical support for hierarchical representation learning of graph neural networks. Its scope of protection covers the method implementation, system architecture, and its use in application scenarios such as bioinformatics and social network analysis.
[0036] This invention optimizes the hierarchical representation process and feature preservation mechanism of graph-structured data by combining differentiable sparsity, multi-scale reconstruction, and dual entropy constraints. Through the synergistic effect of Gumbel-Softmax sampling and Top-K selection, a balance between the sparsity and differentiability of the allocation matrix is achieved, enhancing the model's ability to identify key structures and community patterns in the graph, thereby improving the quality of multi-level representation of complex graph data and the interpretability of the model. The reconstruction-guided pooling strategy improves classification accuracy while reducing computational redundancy in the pooling process, contributing to improved overall computational efficiency.
[0037] Regarding computational efficiency and training stability, this invention employs a joint optimization mechanism that incorporates both short-range and long-range reconstruction losses. This allows the model to maintain consistent local features and stable global structure during training, thereby improving convergence behavior and generalization performance. By combining an end-to-end gradient propagation mechanism with a pass-through estimator technique, the model's processing efficiency in large-scale graph data and sparse graph structures is significantly improved. This efficient and stable feature preservation and structural coarsening capability ensures stable and excellent performance across complex structures and datasets of varying sizes, while also exhibiting stronger adaptability and robustness to noisy data and dynamic graph changes.
[0038] This invention demonstrates excellent comprehensive performance and practical value in graph representation learning and graph classification tasks, effectively alleviating problems commonly found in traditional graph pooling methods such as redundant allocation matrices, information loss, and insufficient gradient propagation. Furthermore, it provides a stable and feasible technical implementation path for graph-based data analysis, facilitating the practical application of graph neural networks in bioinformatics, social network analysis, and other application scenarios. Attached Figure Description
[0039] Figure 1 This is a schematic diagram of the architecture of the sparse graph clustering pooling method based on reconstruction regularization proposed in an embodiment of the present invention;
[0040] Figure 2 This is a schematic diagram of the overall process of the sparse graph clustering pooling method based on reconstruction regularization proposed in this embodiment of the invention. Detailed Implementation
[0041] To provide a clearer understanding of the technical features, objectives, and beneficial effects of this invention, the technical solution of this invention is described in detail below, but this should not be construed as limiting the scope of implementation of this invention. Unless otherwise specified, the methods used in this invention are conventional methods in this technical field. In this invention, materials, reagents, or instruments whose manufacturers are not specified are all conventional products that can be purchased commercially.
[0042] Figure 1 A flowchart of the method provided by an embodiment of the present invention is shown.
[0043] Specifically, the sparse graph clustering pooling method based on reconstruction regularization includes the following steps:
[0044] Step S100: A dual-branch graph convolutional network architecture is used as the basic encoder. The node feature matrix and adjacency matrix corresponding to the input graph structure data are input into two graph convolutional networks respectively. The node embedding is obtained through the first graph convolutional network, and the initial assignment matrix is obtained through the second graph convolutional network.
[0045] In this embodiment of the invention, a single-layer clustering mechanism is focused on capturing the direct relationships between the original nodes, rather than establishing a clustering relationship model across multiple abstract layers. During the stage of learning the node embedding and assignment matrix, a two-branch graph convolutional network architecture is used as the basic encoder. The graph convolutional module, as the core building block, can effectively acquire and propagate structural and feature information throughout the entire graph structure.
[0046] Specifically, two independent graph convolutional network branches process the node feature matrix and adjacency matrix in the input graph structure data, respectively. One graph convolutional network branch generates the node embedding vector matrix, and the other graph convolutional network branch outputs the initial assignment matrix. Its mathematical expression is defined as:
[0047] ;
[0048] ;
[0049] in, and These represent the feature matrix and adjacency matrix of the input graph, respectively, and the node embedding vector matrix generated by a branch of a graph neural network. Another branch of the graph neural network outputs the initial assignment matrix. Although dense assignment matrices have strong expressive power and good robustness, in practical applications, not all calculated assignments contribute equally to graph label prediction. Typically, some redundant assignments and connections can be safely pruned without affecting network performance.
[0050] Theoretically, the cluster node most likely to be mapped to each node can be determined by performing multiple random samplings from the assignment probability distribution, thus preserving representative assignment relationships. However, random sampling can easily introduce discontinuities in the discrete decision-making process, hindering the effective propagation of gradients in the network and affecting the stability and optimization effect of end-to-end training.
[0051] Furthermore, the sparse graph clustering pooling method based on reconstruction regularization also includes the following steps:
[0052] Step S200: Gumbel noise is introduced into the initial assignment matrix, and a Top-K differentiable sampling mechanism based on Gumbel-Softmax is adopted. For each row of the input graph node in the initial assignment matrix, only the top K largest cluster assignment values are retained to obtain a sparsified assignment matrix. In the forward propagation process of the differentiable sampling mechanism, a discretized Top-K mask matrix is used, and in the backward propagation process of the differentiable sampling mechanism, the gradient is passed to the continuous relaxation output of Gumbel-Softmax through a pass-through estimator.
[0053] In this embodiment of the invention, a Top-K differentiable sampling mechanism based on Gumbel-Softmax is employed to introduce sparsity while maintaining the differentiability of the allocation process. This mechanism achieves sparsity of the allocation matrix by retaining only the top K largest cluster allocation values corresponding to each node, while ensuring key allocation relationships, thereby effectively reducing computational complexity and improving training efficiency.
[0054] The Gumbel-Softmax technique provides a differentiable approximation method that achieves continuous modeling of the discrete sampling process by introducing random perturbations and continuous relaxation during the allocation decision process. This method is based on the continuous relaxation form of the Gumbel-Max trick, replacing the non-differentiable argmax operation with a continuous Softmax function. This establishes a connection between discrete decision-making and continuous optimization within the deep learning framework.
[0055] Specifically, the Top-K sampling mechanism first introduces Gumbel noise independently into each element of the initial allocation matrix to achieve random perturbation. The formula for calculating the Gumbel noise is as follows:
[0056] ;
[0057] in, This represents a uniform distribution between 0 and 1. It is a stability constant to prevent numerical overflow. The introduction of this Gumbel noise ensures the unbiasedness of the sampling process while allowing gradients to propagate normally in the network. This noise calculation method relies solely on a uniform distribution and two logarithmic transformations to generate it, resulting in high computational efficiency and good preservation of the statistical properties of the original distribution.
[0058] After introducing Gumbel noise into the assignment matrix, a Top-K selection operation is performed on the matrix, retaining only the K most important connections for each node. The value of K satisfies: ;in Indicates the number of clusters, These are hyperparameters used to control the sparsity ratio. This method effectively reduces redundant allocation relationships without disrupting the overall allocation structure.
[0059] To adjust the smoothness of the Softmax output distribution, a temperature parameter is introduced. .when As the value approaches 0, the Softmax output distribution gradually approaches a discrete one-hot form; when When the value is large, the output distribution tends to be more uniform and smooth. The final allocation matrix is generated from the sampled node allocation results using the following temperature-controlled Softmax function:
[0060] ;
[0061] To simultaneously maintain the discrete nature of forward propagation and the differentiability of backpropagation, this invention employs a direct-pass estimator. During forward propagation, a discretized mask matrix generated by Top-K selection is used for computation; during backpropagation, the gradient is directly passed to the continuous relaxation output of Gumbel-Softmax, i.e., the Softmax probability distribution before the argmax operation, thereby ensuring that the model can undergo stable end-to-end training.
[0062] Furthermore, the sparse graph clustering pooling method based on reconstruction regularization also includes the following steps:
[0063] Step S300: In the process of generating the sparse allocation matrix, a dual entropy constraint mechanism is introduced. The node-level entropy constraint acts as a constraint term on the allocation results corresponding to the input graph nodes in the sparse allocation matrix. By minimizing the entropy value of the allocation probability distribution of each input graph node, it ensures that the input graph node clearly belongs to a single cluster. The cluster-level entropy constraint acts as a constraint term on the aggregate allocation results corresponding to each cluster in the sparse allocation matrix. By maximizing the entropy value of the cluster activation distribution corresponding to each cluster, it prevents cluster allocation collapse and achieves balanced utilization of cluster resources.
[0064] In this embodiment of the invention, to improve the discriminative power and structural rationality of the allocation matrix, a dual entropy constraint mechanism is introduced at both the node and cluster levels during the optimization process of the sparse allocation matrix. The dual entropy constraint acts on the node allocation distribution and the cluster activation distribution, respectively, to simultaneously constrain the clarity of node affiliation and the balanced utilization of cluster resources.
[0065] Node-level entropy constraints are achieved by minimizing the entropy value of the probability distribution of each node's assignment, thereby reducing the uncertainty of node assignment and encouraging each node to explicitly belong to a single cluster. Correspondingly, its loss function is used to characterize the Shannon entropy of the node assignment distribution, making the model tend to generate clear and highly confident cluster assignments for each node during training.
[0066] Cluster-level entropy constraints are implemented by maximizing the entropy value of the cluster activation distribution. This avoids the over-concentration of allocation results in a few clusters, which could lead to cluster allocation collapse. Consequently, the model utilizes cluster resources more evenly at the global level. This constraint effectively prevents the model from over-relying on a small number of clusters, improving the overall rationality of the clustering structure.
[0067] Specifically, the node-level entropy loss function and the cluster-level entropy loss function are defined as follows:
[0068] ;
[0069] ;
[0070] in Indicates the first The entropy function of the probability distribution of the distribution of nodes. This indicates that the node is assigned to the first... The proportion of clusters is called cluster activation. This is a stability constant introduced to prevent numerical instability. The final entropy constraint loss consists of a weighted sum of node-level entropy loss and cluster-level entropy loss, used to balance the optimization objectives of node allocation explicitness and cluster allocation balance during training, thereby guiding the model to learn an allocation strategy with discriminative and structural rationality.
[0071] Furthermore, the sparse graph clustering pooling method based on reconstruction regularization also includes the following steps:
[0072] Step S400: In the process of node embedding aggregation based on the sparse allocation matrix, a multi-level reconstruction-driven regularization framework is introduced. The regularization framework includes short-range reconstruction and long-range reconstruction. In the multi-level reconstruction-driven regularization framework, node embeddings are aggregated through the sparse allocation matrix to obtain the cluster embeddings corresponding to each cluster in the current pooling layer for reconstruction constraints. Short-range reconstruction establishes a mapping path from coarsened features to original features, minimizing the difference between the original node embeddings and the node embeddings reconstructed based on the cluster embeddings and the sparse allocation matrix, as well as the difference between the original adjacency matrix and the adjacency matrix reconstructed based on the sparse allocation matrix, to maintain local structure and feature information. Long-range reconstruction applies reconstruction constraints to node embeddings across multiple graph neural network layers to mitigate feature drift in deep networks.
[0073] In this embodiment of the invention, to ensure the effective preservation of key structural and feature information during the pooling process, a multi-level reconstruction-driven regularization framework is introduced. This regularization framework includes two types of reconstruction loss functions: short-range reconstruction and long-range reconstruction. These functions exert constraints at different levels of the model, respectively, to maintain the integrity of information at both the local and global levels during graph structure compression.
[0074] In the multi-level reconstruction-driven regularization framework, node embeddings are aggregated using a sparse allocation matrix to obtain the cluster embeddings corresponding to each cluster in the current pooling layer, which are used for reconstruction constraints. Short-range reconstruction establishes a mapping path from coarsened features to original features, constraining the feature reconstruction error and topological consistency within the pooling layer. Specifically, the short-range reconstruction loss function includes two optimization objectives: first, to achieve feature-level alignment by minimizing the difference between the original node embeddings and the node embeddings reconstructed based on cluster embeddings and the sparse allocation matrix; second, to achieve topological preservation by minimizing the difference between the original adjacency matrix and the adjacency matrix reconstructed based on the sparse allocation matrix. These two constraints work together to maintain key local structure and feature information while compressing the graph structure during pooling operations. The mathematical expression of the short-range reconstruction loss function is:
[0075] ;
[0076] Long-range reconstruction is used to impose reconstruction constraints on node embeddings across multiple graph neural network layers to mitigate feature drift issues that may occur in deep networks. After each convolutional layer is computed, the model reconstructs the node representation of the input graph using the node embeddings and assignment matrix of the current layer, and calculates the corresponding reconstruction error. Furthermore, by setting up a dedicated graph neural network to map the embedding dimension, the original node features are reconstructed layer by layer from the final embedding of the coarsened graph, thus establishing a long-range reconstruction constraint mechanism across multiple graph neural network layers. This mechanism preserves multi-scale feature information during the encoding stage and fuses deep semantic information during the decoding stage to enhance the completeness of feature reconstruction. The long-range reconstruction loss is represented as the sum of the reconstruction errors of each layer, and its mathematical expression is:
[0077] .
[0078] Furthermore, the sparse graph clustering pooling method based on reconstruction regularization also includes the following steps:
[0079] Step S500: Aggregate node embeddings using a sparse allocation matrix to generate node embeddings and adjacency matrices of a coarsened graph. Apply a graph convolutional network to the coarsened graph for feature extraction and further perform a readout operation to obtain a graph-level representation for downstream graph classification or graph representation learning tasks.
[0080] In embodiments of the present invention, such as Figure 2 As shown, by integrating the above components, a complete process is achieved, including node-to-cluster assignment matrix calculation and optimization, cluster-level node feature extraction, graph-level readout, and classification prediction. The modules collaborate with each other, working in conjunction with the basic graph convolutional network module, readout function, and classification prediction module to realize graph representation learning and graph classification tasks.
[0081] Furthermore, this invention proposes a sparse graph clustering pooling system based on reconstruction regularization, the system comprising:
[0082] The encoding module uses a dual-branch graph convolutional network architecture as the basic encoder. It inputs the node feature matrix and adjacency matrix corresponding to the input graph structure data into two graph convolutional networks respectively. The node embedding is obtained through the first graph convolutional network, and the initial assignment matrix is obtained through the second graph convolutional network.
[0083] A differentiable sparsity module is used to introduce Gumbel noise into the initial assignment matrix and adopt a Top-K differentiable sampling mechanism based on Gumbel-Softmax. For each row of the input graph node in the initial assignment matrix, only the top K largest cluster assignment values are retained to obtain a sparsified assignment matrix. In the forward propagation of the differentiable sampling mechanism, a discretized Top-K mask matrix is used, and in the backward propagation of the differentiable sampling mechanism, the gradient is passed to the continuous relaxation output of Gumbel-Softmax through a pass-through estimator.
[0084] The dual entropy constraint module introduces a dual entropy constraint mechanism during the generation of the sparse allocation matrix. Node-level entropy constraints act as constraints on the allocation results corresponding to input graph nodes in the sparse allocation matrix, minimizing the entropy value of the allocation probability distribution of each input graph node to ensure that the input graph node explicitly belongs to a single cluster. Cluster-level entropy constraints act as constraints on the aggregate allocation results corresponding to each cluster in the sparse allocation matrix, maximizing the entropy value of the cluster activation distribution corresponding to each cluster to prevent cluster allocation collapse and achieve balanced utilization of cluster resources.
[0085] A multi-level reconstruction regularization module is used to introduce a multi-level reconstruction-driven regularization framework during the node embedding aggregation process based on a sparse allocation matrix. This framework includes short-range reconstruction and long-range reconstruction. In the multi-level reconstruction-driven regularization framework, node embeddings are aggregated using a sparse allocation matrix to obtain cluster embeddings corresponding to each cluster in the current pooling layer, used for reconstruction constraints. Short-range reconstruction establishes a mapping path from coarsened features to original features, minimizing the differences between the original node embeddings and the node embeddings reconstructed based on cluster embeddings and the sparse allocation matrix, as well as the differences between the original adjacency matrix and the adjacency matrix reconstructed based on the sparse allocation matrix. Long-range reconstruction applies reconstruction constraints to node embeddings across multiple graph neural network layers.
[0086] The graph pooling and readout module is used to aggregate node embeddings using a sparse allocation matrix to generate node embeddings and adjacency matrices of a coarsened graph. It then applies a graph convolutional network to the coarsened graph for feature extraction and performs a readout operation to obtain a graph-level representation for downstream graph classification or graph representation learning tasks.
[0087] The core operation of the method described in this invention lies in converting the input graph structure data into a coarsened representation. This conversion process generates node embeddings of the coarsened graph and the corresponding adjacency matrix. This coarsening process is implemented using a sparse allocation matrix learned from a graph neural network, and a hierarchical processing architecture is constructed by stacking multiple graph neural network modules, thereby supporting the allocation and aggregation of nodes from one layer to the next.
[0088] After the sparse allocation matrix is optimized, the graph structure is coarsened by performing an aggregation operation on the node embeddings. This process remains robust to changes in the node numbering order while satisfying the permutation invariance requirement. Simultaneously, by introducing reasonable algebraic constraints, the consistency of the spectral structure between the original and coarsened graphs is ensured, thereby maintaining a stable representation of the graph's structural features.
[0089] Furthermore, this method can derive coarse-grained graph-level representations based on node embeddings generated by graph neural networks. After coarsening, a readout operation is performed on the coarsened graph to obtain graph-level representation results for downstream graph classification or graph representation learning tasks. The aforementioned technical solution, combining sparsity allocation constraints and algebraic consistency constraints, ensures that graph structure information is effectively preserved during multi-level abstraction, providing a stable and reliable representation foundation for complex graph data analysis tasks.
[0090] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0091] Example 1: Biochemical Molecular Graph Classification Task. This example uses biochemical molecular graph data from the TU dataset, including subsets such as PROTEINS, MUTAG, ENZYMES, PTC_FM, and Mutagenicity. These datasets are publicly available through the PyTorchGeometric library. Their nodes represent atoms or amino acids, and edges represent chemical bonds or spatial proximity relationships. Some datasets include node features (such as atom type) or edge label information.
[0092] In the experimental setup, 10-fold cross-validation was used to evaluate model performance, and an early stopping strategy was implemented to prevent overfitting during training. During the experiments, various existing graph neural network models and graph pooling methods (e.g., GCN, GAT, DiffPool, and SAGPool) were used as benchmarks for comparison. Accuracy (ACC) was used as the performance evaluation metric, and the mean accuracy and standard deviation under 10-fold cross-validation were reported.
[0093] Under the above experimental settings, the classification performance of different methods on various datasets was compared and analyzed, and the results are shown in Table 1. Table 1 presents the comparison results of classification accuracy of GCN, GAT, DiffPool, SAGPool, and the method of this invention on the PROTEINS, MUTAG, ENZYMES, PTC_FM, and Mutagenicity datasets.
[0094] Table 1 Comparison results on the biochemical molecular map classification task
[0095] PROTEINS MUTAG ENZYMES PTC_FM Mutagenicity GCN 70.97±3.94 73.45±8.72 18.5±4.25 63.64±7.35 67.19±1.61 GAT 75.38±3.03 69.21±9.09 29±7.82 63.34±7.12 70.16±2.75 DiffPool 74.39±2.22 81.37±10.67 62.17±5.17 61.92±8.09 77.15±2.57 SAGPool 72.68±4.69 73.42±12.24 30.5±6.54 63.05±5.98 67.97±3.2 Inventive Method 77.53±3.22 87.78±7.06 65.83±4.36 65.64±5.6 77.63±2.1
[0096] Experimental results demonstrate that the proposed method exhibits superior classification performance and stability on multiple biochemical datasets. Specifically, on the ENZYMES and MUTAG datasets, the proposed method achieves classification accuracies of 65.83% and 87.78%, respectively, representing improvements of 3.66% and 6.41% compared to benchmark methods. Furthermore, on datasets with high structural complexity, such as MUTAG and Mutagenicity, the proposed method significantly reduces performance variance, demonstrating its robustness against noise and structural variations.
[0097] The experimental results show that by introducing a multi-level reconstruction-driven regularization mechanism and sparsity constraints into the model, the local features and global topological patterns of molecular functional groups can be effectively preserved during graph structure compression, thereby enhancing the model's ability to capture discriminative representations of biochemical entities.
[0098] Example 2: Social Network Graph Classification Task. This example uses the IMDB-BINARY, IMDB-MULTI, and COLLAB social network datasets for graph classification experiments. These datasets capture large-scale interaction patterns in actor collaboration networks and scientific research collaboration networks. All datasets used are from the TU dataset and have been standardized using the PyTorch Geometric framework. Since social network data lacks node attribute information, one-hot encoding of node degree is uniformly used as the initial feature to ensure the standardization and consistency of the input feature representation.
[0099] The experimental setup remained consistent with Example 1, including the use of 10-fold cross-validation to evaluate model performance, and the same parameter configurations and training strategies. To ensure fairness in the comparative experiments, all baseline methods were tested using the parameter settings recommended by the original authors or the optimal parameters reported in the literature.
[0100] Under the experimental setup described above, the performance of different methods in the social network graph classification task was compared and analyzed, and the results are shown in Table 2. Table 2 presents the comparison results of classification accuracy of GCN, GAT, DiffPool, SAGPool, and the method of this invention on the IMDB-BINARY, IMDB-MULTI, and COLLAB datasets.
[0101] Table 2 Comparison results on the social network graph classification task
[0102] IMDB-B IMDB-M COLLAB GCN 71.7±5.8 47.2±5.33 73.82±4.31 GAT 72±4.75 48.33±5.13 76.26±2.43 DiffPool 72.8±4.45 50.8±5.1 77.86±2.03 SAGPool 70.6±4.98 48.07±5.85 74.76±1.5 Inventive Method 72.9±4.01 51.07±4.47 79.92±2.61
[0103] Experimental results show that the proposed method achieves state-of-the-art classification performance on all three social network datasets. Specifically, on the COLLAB dataset, the proposed method achieves a classification accuracy of 79.92%, a 2.06% improvement over the benchmark methods. This result demonstrates that by introducing a differentiable sparsity design based on Gumbel-Softmax, the model can adaptively identify key community structures and influential nodes in social networks, while maintaining cross-layer feature consistency through long-range reconstruction loss.
[0104] Furthermore, when processing large-scale graph data, this method maintains high classification accuracy while exhibiting good computational efficiency. On the COLLAB dataset (with a total of 5000 graphs and an average number of 2,457.78 edges, significantly higher than other datasets), the training time is reduced compared to traditional pooling methods, while still maintaining the best classification performance, demonstrating excellent scalability in large-scale graph processing scenarios.
[0105] Existing graph neural network models and graph pooling methods exhibit different advantages and limitations in various application scenarios. GCN models typically perform well in processing local structural information in social networks, but their ability to model global dependencies in small-scale molecular structural data is relatively insufficient. GAT models enhance the representation of neighborhood information by introducing attention mechanisms, but their performance is heavily dependent on the quality of local neighborhoods, and their ability to capture implicit relationships remains limited. Clustering-based pooling methods such as DiffPool can construct hierarchical graph representations, but the generated allocation matrices are often dense and lack discriminative power, easily leading to decreased model interpretability and the loss of some fine-grained structural information during pooling. While node selection-based pooling methods such as SAGPool can achieve high sparsity, they typically rely on local importance scoring mechanisms, making it difficult to effectively maintain the consistency of the global topology during pooling. Although some methods proposed in recent years have attempted to introduce attention mechanisms or adaptive sparsity strategies, deep graph neural networks still generally face problems such as feature drift and unstable gradient propagation.
[0106] To address the aforementioned issues, this invention proposes a graph pooling method based on reconstruction guidance and differentiable sparsity, organically integrating the Gumbel-Softmax sampling mechanism, the dual entropy constraint mechanism, and the multi-scale reconstruction mechanism. During node-to-cluster allocation, differentiable sparsity techniques are used to sparsify and regularize the node-cluster allocation matrix, thereby improving the clarity of allocation decisions and the rationality of the overall structure. Furthermore, by jointly designing a multi-scale optimization framework for short-range and long-range reconstruction losses, local feature reconstruction errors and cross-layer semantic consistency are simultaneously constrained during pooling, effectively mitigating feature drift and maintaining the stability of the global semantic structure. In addition, by introducing a dual entropy constraint mechanism consisting of node-level and cluster-level entropy constraints, the model can adaptively balance the clarity of node allocation and the balanced utilization of cluster resources during training.
[0107] Experimental results show that this method achieves superior performance on multiple graph classification benchmark datasets, adapts to different task settings such as binary and multi-class classification, and is applicable to graph structure data with or without node attribute information. Especially on biochemical molecular graph datasets and social network graph datasets, this method demonstrates high stability and generalization ability under different data partitioning conditions.
[0108] This invention proposes a reconstruction-guided graph pooling method that combines differentiable sparsity, multi-scale reconstruction mechanisms, and entropy-constrained optimization to work synergistically in graph structure compression and representation learning. Through the combined application of these techniques, the method effectively alleviates common problems in traditional methods such as information loss, feature drift, and structural degradation during pooling.
[0109] Compared to existing graph pooling methods, this method achieves comprehensive improvements in classification accuracy, model robustness, and interpretability. Furthermore, relying on an end-to-end gradient optimization mechanism, it enhances the model's efficiency in processing large-scale graph-structured data. This technical solution is applicable to various graph-structured application scenarios and can provide stable and reliable technical support for the application of graph neural networks in fields such as bioinformatics and social network analysis.
[0110] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A sparse graph clustering and pooling method based on reconstruction regularization, characterized in that, Includes the following steps: A dual-branch graph convolutional network architecture is used as the basic encoder. The node feature matrix and adjacency matrix corresponding to the input graph structure data are respectively input into two graph convolutional networks. The node embedding is obtained through the first graph convolutional network, and the initial assignment matrix is obtained through the second graph convolutional network. Gumbel noise is introduced into the initial assignment matrix, and a Top-K differentiable sampling mechanism based on Gumbel-Softmax is adopted. For each row of the input graph node in the initial assignment matrix, only the top K largest cluster assignment values are retained to obtain a sparsified assignment matrix. In the forward propagation of the differentiable sampling mechanism, a discretized Top-K mask matrix is used, and in the backward propagation of the differentiable sampling mechanism, the gradient is passed to the continuous relaxation output of Gumbel-Softmax through a pass-through estimator. In the process of generating the sparse allocation matrix, a dual entropy constraint mechanism is introduced. The node-level entropy constraint acts as a constraint term on the allocation results corresponding to the input graph nodes in the sparse allocation matrix. By minimizing the entropy value of the allocation probability distribution of each input graph node, it ensures that the input graph node clearly belongs to a single cluster. The cluster-level entropy constraint acts as a constraint term on the aggregation allocation results corresponding to each cluster in the sparse allocation matrix. By maximizing the entropy value of the cluster activation distribution corresponding to each cluster, it prevents cluster allocation collapse and achieves balanced utilization of cluster resources. In the process of node embedding aggregation based on a sparse allocation matrix, a multi-level reconstruction-driven regularization framework is introduced. This framework includes short-range reconstruction and long-range reconstruction. In the multi-level reconstruction-driven regularization framework, node embeddings are aggregated using a sparse allocation matrix to obtain cluster embeddings corresponding to each cluster in the current pooling layer for reconstruction constraints. Short-range reconstruction minimizes the difference between the original node embeddings and the node embeddings reconstructed based on cluster embeddings and the sparse allocation matrix, as well as the difference between the original adjacency matrix and the adjacency matrix reconstructed based on the sparse allocation matrix, by establishing a mapping path from coarsened features to the original features. Long-range reconstruction applies reconstruction constraints to node embeddings across multiple graph neural network layers. The node embeddings are aggregated using a sparse allocation matrix to generate the node embeddings and adjacency matrix of the coarsened graph. A graph convolutional network is then applied to the coarsened graph for feature extraction, and a readout operation is performed to obtain a graph-level representation for downstream graph classification or graph representation learning tasks.
2. The sparse graph clustering and pooling method based on reconstruction regularization according to claim 1, characterized in that, The formula for calculating the Gumbel noise is: ; in, This represents a uniform distribution between 0 and 1. It is a stability constant.
3. The sparse graph clustering and pooling method based on reconstruction regularization according to claim 1, characterized in that, The value of K satisfies: ;in Indicates the number of clusters, This is a hyperparameter used to control the sparsity ratio.
4. The sparse graph clustering and pooling method based on reconstruction regularization according to claim 1, characterized in that, Temperature parameters of Softmax in Top-K sparsity Used to adjust the smoothness of the allocation results, where, The smaller the value, the closer the generated distribution is to a one-hot distribution; The larger the value, the smoother the generated distribution.
5. The sparse graph clustering and pooling method based on reconstruction regularization according to claim 1, characterized in that, The loss function for the node-level entropy constraint is defined as the Shannon entropy of the node allocation distribution.
6. The sparse graph clustering and pooling method based on reconstruction regularization according to claim 4, characterized in that, The node-level entropy and cluster-level entropy loss functions are defined as follows: ; in Indicates the first The entropy function of the probability distribution of the distribution of nodes. This indicates that the node is assigned to the first... The proportion of clusters is called cluster activation. It is a stability constant.
7. A sparse graph clustering and pooling system based on reconstruction regularization, characterized in that, The system includes: The encoding module uses a dual-branch graph convolutional network architecture as the basic encoder. It inputs the node feature matrix and adjacency matrix corresponding to the input graph structure data into two graph convolutional networks respectively. The node embedding is obtained through the first graph convolutional network, and the initial assignment matrix is obtained through the second graph convolutional network. A differentiable sparsity module is used to introduce Gumbel noise into the initial assignment matrix and adopt a Top-K differentiable sampling mechanism based on Gumbel-Softmax. For each row of the input graph node in the initial assignment matrix, only the top K largest cluster assignment values are retained to obtain a sparsified assignment matrix. In the forward propagation of the differentiable sampling mechanism, a discretized Top-K mask matrix is used, and in the backward propagation of the differentiable sampling mechanism, the gradient is passed to the continuous relaxation output of Gumbel-Softmax through a pass-through estimator. The dual entropy constraint module introduces a dual entropy constraint mechanism during the generation of the sparse allocation matrix. Node-level entropy constraints act as constraints on the allocation results corresponding to input graph nodes in the sparse allocation matrix, minimizing the entropy value of the allocation probability distribution of each input graph node to ensure that the input graph node explicitly belongs to a single cluster. Cluster-level entropy constraints act as constraints on the aggregate allocation results corresponding to each cluster in the sparse allocation matrix, maximizing the entropy value of the cluster activation distribution corresponding to each cluster to prevent cluster allocation collapse and achieve balanced utilization of cluster resources. A multi-level reconstruction regularization module is used to introduce a multi-level reconstruction-driven regularization framework during the node embedding aggregation process based on a sparse allocation matrix. This framework includes short-range reconstruction and long-range reconstruction. In the multi-level reconstruction-driven regularization framework, node embeddings are aggregated using a sparse allocation matrix to obtain cluster embeddings corresponding to each cluster in the current pooling layer, used for reconstruction constraints. Short-range reconstruction establishes a mapping path from coarsened features to original features, minimizing the differences between the original node embeddings and the node embeddings reconstructed based on cluster embeddings and the sparse allocation matrix, as well as the differences between the original adjacency matrix and the adjacency matrix reconstructed based on the sparse allocation matrix. Long-range reconstruction applies reconstruction constraints to node embeddings across multiple graph neural network layers. The graph pooling and readout module is used to aggregate node embeddings using a sparse allocation matrix to generate node embeddings and adjacency matrices of a coarsened graph. It then applies a graph convolutional network to the coarsened graph for feature extraction and performs a readout operation to obtain a graph-level representation for downstream graph classification or graph representation learning tasks.