A graph compression method for semantic topology decoupling of a graph neural network

By constructing a semantic-topological decoupling graph compression method, the semantic and topological factors of node features are separated. Combining category relationships and block structure priors, a compressed graph is generated, which solves the computation and storage problems of graph neural networks in large-scale graph data processing and achieves efficient graph compression and task performance preservation.

CN122862646BActive Publication Date: 2026-11-24SHANDONG UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611375555.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-24
Estimated Expiration
2046-09-07

Smart Images

  • Figure CN122862646B_ABST
    Figure CN122862646B_ABST
Patent Text Reader

Abstract

This invention provides a graph compression method for semantic topological decoupling in graph neural networks, relating to the field of graph data processing technology. The specific steps are as follows: acquiring original graph data and obtaining initial node features; constructing category semantic prototypes and calculating the distribution of category relationships between different categories; constructing a semantic topological decoupling feature refinement module to obtain refined node features; calculating node importance scores and edge importance scores; determining the number of nodes and edges to be retained after compression, selecting nodes and edges from high to low according to node importance scores and edge importance scores to generate the final compressed graph; inputting the compressed graph structure into a graph neural network classifier to obtain node category prediction results, and optimizing through a joint loss function. The technical solution of this invention overcomes the problems of existing technologies, such as over-reliance on local topology, failure to distinguish between semantic and topological factors in features, susceptibility to noise in the original graph, and neglect of global category semantic relationships and block structure priors.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of graph data processing technology, and more specifically to a graph compression method for semantic topological decoupling of graph neural networks. Background Technology

[0002] Graph data structures are widely present in the real world. Graph neural networks, by performing neighbor aggregation and message passing along the graph structure, can effectively extract nodes, edges, and graph-level representations, and have become an important technique for graph data analysis.

[0003] As the scale of graph data continues to increase, graph neural networks face challenges during training and inference, including high computational complexity, large memory consumption, high message passing costs, and slow model convergence. Especially in large-scale graphs containing millions of nodes and tens of millions of edges, training graph neural networks directly on the complete graph typically requires significant hardware resources, making it difficult to meet the efficiency requirements of practical deployments. Graph compression can select from or generate smaller, more information-preserving compressed graphs from the original graph. While this reduces the graph size to some extent, it still presents the following problems: First, existing methods often rely too heavily on local topological statistics and lack explicit modeling of category semantic information.

[0004] Second, existing graph compression methods typically do not distinguish between semantic and topological factors in node features.

[0005] Third, the original graph may contain noisy edges, redundant edges, and missing edges. If compression is performed only based on the original adjacency matrix, noisy connections may be retained and potentially valid connections may be deleted, thereby affecting the message transmission quality on the compressed graph.

[0006] Fourth, existing methods rarely consider global semantic relationships between categories and prior knowledge of the block structure of the graph.

[0007] Therefore, there is a need for a graph compression method for semantic topology decoupling of graph neural networks that can not overly rely on local topology, accurately distinguish semantic and topological factors in features, be less affected by noise in the original graph, and take into account global category semantic relations and block structure priors. Summary of the Invention

[0008] The main objective of this invention is to provide a graph compression method for semantic topological decoupling in graph neural networks, in order to solve the problems of over-reliance on local topology, failure to distinguish between semantic and topological factors in features, susceptibility to noise in the original graph, and neglect of global category semantic relationships and block structure priors in the prior art.

[0009] To achieve the above objectives, this invention provides a graph compression method for semantic topological decoupling of graph neural networks, specifically including the following steps: S1. Obtain the original graph data, and perform feature pre-calculation on the original graph data through a pre-trained graph neural network to obtain the initial features of the nodes.

[0010] S2, construct a category semantic prototype based on the category information of the labeled nodes, and calculate the category relationship distribution between different categories.

[0011] S3 constructs a semantic topology decoupling feature refinement module, which decomposes node features into semantic components related to category discrimination and topological components related to topology structure, and obtains refined node features through gating fusion.

[0012] S4 calculates node importance scores and edge importance scores based on refined node features, category relationship distribution, node topological centrality, and random block model priors.

[0013] S5. Based on the target compression ratio, determine the number of nodes and edges to be retained after compression. Select nodes and edges from high to low according to their importance scores, and generate the final compressed graph.

[0014] S6 inputs the compressed graph structure corresponding to the target citation network dataset into the graph neural network classifier to obtain the category prediction results of the paper nodes, and optimizes them through the joint loss function.

[0015] Furthermore, the initial features of the nodes in step S1 are calculated as follows: S1.1, Obtain the raw graph data, including: citation network graph data. ,in, Represents the set of paper nodes; This represents a set of citation relationships between papers; Represents the node attribute matrix, For the number of nodes, The attribute feature dimension of a single node; Represents the adjacency matrix; This indicates the category label for some paper nodes.

[0016] S1.2, Initial feature matrix of nodes for: ; ; in, This represents a pre-trained graphical neural network model; Indicates the dimension of node features; For transpose; Indicates the first The initial feature vector of a single node corresponding to each node.

[0017] Furthermore, step S2 specifically includes the following steps: S2.1, calculate the category semantic prototype using the initial feature mean of the labeled nodes of this category, as shown in the following formula: ; ; ; in, For the first The semantic prototype of a class category; Indicates the first The semantic prototype of a class category; Represents the category prototype matrix; Indicates the number of categories; Indicates the first A collection of class nodes; For the first One node; Indexed by category; For the first Category labels for each node; For the first The initial feature vectors of each node.

[0018] S2.2, Calculate the cosine similarity between nodes. The formula is as follows: ; in, For the first The initial feature vectors of each node; It is an L2 norm.

[0019] S2.3, Category With category Relationship strength for: ; in, For the first A collection of class nodes.

[0020] S2.4, the category relationship distribution is obtained through temperature normalization. The formula is as follows: ; in, Indicates the temperature coefficient; Use the Softmax activation function; For category The relationship strength vector between the data and all categories.

[0021] Furthermore, step S3 specifically includes the following steps: S3.1, Generate semantic offsets based on node attributes and corresponding category semantic prototypes, and add the semantic offsets and semantic prototypes to obtain semantic components: ; ; in, Represents a semantic mapping function; Indicates semantic offset; Represents a node semantic components; For the first The original node feature vectors of each node; For the first The category semantic prototype vector corresponding to the category to which each node belongs.

[0022] S3.2, construct the category relationship context based on the category relationship distribution and category semantic prototype, and generate topological components by combining node topological statistical features. The formula is as follows: ; ; ; in, Represents the context of category relationships; Representing topological statistical characteristics; For the first The category semantic relationship distribution vector corresponding to the category to which each node belongs; For the first Topological offset of each node; This is a topology mapping function.

[0023] S3.3, Node-level fusion weights are generated based on semantic components, topological components, and category relationship context to obtain refined node features: ; ; in, Represents a node The fusion weight; For gated mapping functions; Represents the Sigmoid function; For the first Refined node characteristics of each node.

[0024] Furthermore, the node importance score in step S4 The calculation formula is as follows: ; in, Indicates semantic representativeness; Indicates topological centrality; Indicates category coverage; Indicates the degree of contribution to the task; , , and They are respectively , , and The weighting coefficients.

[0025] Furthermore, the formula for calculating the edge importance score in step S4 is as follows: ; in, Representing an edge Importance score; Indicating that under the prior of the random block model, the node With nodes The probability of connection between them; Indicate the contribution of an edge to the locally connected structure; For the first Refined node characteristics of each node; The adjacency matrix of the original graph is the first... Line number Column elements; , , and They are respectively , , and Weighting coefficients; Prior of random block model The specific formula is as follows: ; in, Assign matrices to the node blocks; Inter-block connectivity probability matrix; This is a transpose.

[0026] Furthermore, the specific formula for generating the compressed image in step S5 is as follows: ; ; ; in, Represents a compressed set of nodes; Represents the set of compressed edges; This represents the generated compressed image; This is the node feature matrix of the compressed graph; The adjacency matrix of the compressed graph; The target node compression ratio; The target edge compression ratio.

[0027] Further, step S6 specifically involves inputting the compressed graph structure corresponding to the target dataset into the graph neural network classifier, and jointly applying the loss function. The specific formula is as follows: ; in, , , and These are the loss weighting coefficients; For classification loss; Category relationship retention loss; For structural reconstruction loss; Topology preservation loss; This represents the loss in compressibility coefficient; Category Relationship Preservation Loss The specific formula is as follows: ; in, This represents the distribution of category relationships in the compressed graph; Indicates KL divergence; Used as a separator; Structural Reconfiguration Loss The specific formula is as follows: ; in, Represents the estimated node With nodes The probability of connection between them; This is a logarithmic function.

[0028] Further, the specific steps of step S6 are as follows: input the compressed graph structure corresponding to the target dataset into the graph neural network classifier to obtain the class prediction results of the nodes, and perform iterative updates by minimizing the joint loss function until convergence.

[0029] The present invention has the following beneficial effects: This invention, while maintaining the protection scope of general graph compression methods, provides clear parameter meanings, application examples, and technical effect support for citation network datasets such as Cora, CiteSeer, PubMed, and Arxiv, ensuring that technical features such as nodes, edges, categories, attribute matrices, category semantic prototypes, category relationship distributions, and loss functions are fully supported in the specification.

[0030] The graph compression in this invention does not simply reduce the graph size, but rather reduces redundant paper nodes and redundant citation edges, filters low-value or noisy connections, reduces the computational cost of message passing in graph neural networks, and retains the core subgraph that can represent the semantic relationships of paper categories and key topological structures while maintaining the performance of downstream node classification tasks.

[0031] This invention establishes a semantic-topological decoupling mechanism to separate modeling category discrimination from topological structure information to eliminate interference from mixed features. It combines category semantic prototypes, category relationship distribution, and random block model priors to jointly evaluate the importance of nodes and edges to collaboratively complete graph compression, fully preserving local key node edges, global category associations, and community module topology to ensure topological stability. On the other hand, it employs two core strategies: non-uniform synthetic graph initialization and bi-branch adaptive pruning. This balances task relevance and structural integrity during the graph construction and pruning stages, avoiding the loss of weak class information and imbalance of compressed information. It can also adaptively adjust the compression degree according to memory, computing power, and accuracy requirements. This scheme can significantly reduce the graph size, reduce the memory, time, and message passing overhead of GNN training and inference, maintain excellent downstream task accuracy under various extremely low compression ratios, and is suitable for multi-dimensional graph data scenarios such as citation, social, molecular, and transportation data. Attached Figure Description

[0032] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings: Figure 1 A flowchart of a graph compression method for semantic topological decoupling of graph neural networks according to the present invention is shown.

[0033] Figure 2 A comparison chart of ablation study results on the Cora dataset is shown.

[0034] Figure 3 The image shows a comparison of ablation study results on the Arxiv dataset. Detailed Implementation

[0035] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0036] like Figure 1 The graph compression method for semantic topological decoupling of graph neural networks, as shown, includes the following steps: S1. Obtain the original graph data, and perform feature pre-calculation on the original graph data through a pre-trained graph neural network to obtain the initial features of the nodes.

[0037] S2, construct category semantic prototypes based on the category information of labeled nodes, and calculate the semantic relationship distribution between different categories.

[0038] S3 constructs a semantic topology decoupling feature refinement module, which decomposes node features into semantic components related to category discrimination and topological components related to topology structure, and obtains refined node features through gating fusion.

[0039] S4 calculates node importance scores and edge importance scores based on refined node features, category relationship distribution, node topological centrality, and random block model priors.

[0040] S5. Based on the target compression ratio, determine the number of nodes and edges to be retained after compression. Select nodes and edges from high to low according to their importance scores, and generate the final compressed graph.

[0041] S6 inputs the compressed graph structure corresponding to the target dataset into the graph neural network classifier to obtain the node category prediction results, and optimizes it through the joint loss function. The target datasets include Cora, CiteSeer, PubMed and Arxiv.

[0042] Specifically, step S1 includes the following steps: S1.1, Obtain the raw graph data, including: citation network graph data. ,in Represents the set of paper nodes; This represents a set of citation relationships between papers; Represents the node attribute matrix, For the number of nodes, This represents the attribute feature dimension of a single node. The node attribute matrix represents the text features or topic features of the paper nodes. This represents the adjacency matrix, which is used to indicate whether there are citation relationships between nodes in a paper. This indicates the category label for some paper nodes.

[0043] S1.2, Initial feature matrix of nodes for: ; ; in, This represents a pre-trained graphical neural network model; Indicates the dimension of node features; For transpose; Indicates the first The initial feature vector of a single node corresponding to each node.

[0044] In a specific application example, when the original graph is a citation network, the node set represents the set of paper nodes, the edge set represents the set of citation relationships between paper nodes, the node attribute matrix represents the attribute feature matrix of paper nodes, and the paper node attribute features include at least one of the following: paper text features, keyword features, topic features, bag-of-words features, or existing literature attribute features; the adjacency matrix indicates whether there are citation relationships or preprocessed connection relationships between paper nodes; and partial node labels represent the category labels of some known paper nodes, including the research field, topic category, or literature category label of the paper.

[0045] Specifically, for the first Class Node Collection The mean of the node features for that category is calculated as the category semantic prototype. The category semantic prototype represents the semantic center of that category in the graph feature space and can serve as a global reference for subsequent feature decoupling and compression selection.

[0046] Step S2 specifically includes the following steps: S2.1, calculate the category semantic prototype using the initial feature mean of the labeled nodes of this category, as shown in the following formula: ; ; ; in, For the first The semantic prototype of a class category; Indicates the first The semantic prototype of a class category; Represents the category prototype matrix; Indicates the number of categories; Indicates the first A collection of class nodes; For the first A node is used to refer to a single node in the graph; This is a category index used to refer to a specific category in the graph; For the first Category labels for each node; For the first The initial feature vectors of each node.

[0047] When the original graph is a citation network, the first... A class node set represents a set of paper nodes belonging to the same research field, topic category, or document category. The class semantic prototype represents the common topic semantics, text semantics, or domain semantic center of the paper nodes in the feature space. By introducing the class semantic prototype, the compression process not only selects nodes based on node connectivity or topological centrality, but also retains representative nodes of different paper categories in the semantic space. This avoids the compressed graph structure being overly biased towards highly connected paper nodes while ignoring paper nodes from a few or key categories.

[0048] S2.2, The distribution of category relationships is determined based on the average feature similarity between categories, and the cosine similarity between nodes is calculated. The formula is as follows: ; in, For the first The initial feature vectors of each node; It is an L2 norm.

[0049] S2.3, Category With category Relationship strength for: ; in, For the first A collection of class nodes.

[0050] S2.4, the category relationship distribution is obtained through temperature normalization. This distribution is used to describe the semantic relevance between a category and other categories, and the formula is as follows: ; in, Indicates the temperature coefficient; Use the Softmax activation function; For category The relationship strength vector between the data and all categories.

[0051] When the original graph is a citation network, the strength of the relationship between categories represents the average semantic relevance between different research fields, topic categories, or document categories. The category relationship distribution is used to characterize the global relationships between different paper categories at the level of topic association, research field intersection, or document citation. For example, if paper nodes in two paper categories have high similarity in the feature space and strong connectivity in the citation network, the category relationship distribution can reflect the topic association or field intersection of that category, thus maintaining key cross-category connections in subsequent graph compression.

[0052] Specifically, step S3 includes the following steps: S3.1, Semantic Component Generation Unit. The semantic component is mainly used to maintain category discrimination information. It generates a semantic offset based on the node attributes and the corresponding category semantic prototype. The semantic offset and the semantic prototype are added together to obtain the semantic component. ; ; in, Represents a semantic mapping function; Indicates semantic offset; Represents a node semantic components; For the first The original node feature vectors of each node; For the first The category semantic prototype vector corresponding to the category to which each node belongs represents the semantic center of all nodes of that category in the feature space.

[0053] When the node is a paper node, the node attributes include at least one of the following: paper text features, keyword features, topic features, bag-of-words features, or existing document attribute features. The semantic offset represents the offset representation obtained by semantically correcting the paper node features based on the category semantic prototype of the corresponding paper category. The paper category includes research field category, topic category, or document category.

[0054] S3.2, Topology Component Generation Unit. Topology components are mainly used to maintain the connectivity and structural functions of nodes in the graph structure. It constructs the category relationship context based on the category relationship distribution and category semantic prototype, and generates topology components by combining the topological statistical features of nodes. The formula is as follows: ; ; ; in, Represents the context of category relationships; It represents topological statistical characteristics, including node degree, local clustering coefficient PageRan value, and k-core value; For the first The category semantic relationship distribution vector corresponding to the category to which each node belongs; For the first Topological offset of each node; This is a topology mapping function, typically a learnable neural network, such as a multilayer perceptron (MLP).

[0055] In a specific application example, when the node is a paper node, the topological statistical features represent at least one of the following: the number of connections of the paper node in the citation network, the degree of local clustering, the network centrality, the k-core level, the topic community location, or the composition of the citation neighborhood.

[0056] S3.3, different nodes have varying degrees of dependence on semantic and topological information. For example, nodes with clear category semantics rely more on semantic components, while structural bridging nodes rely more on topological components. Therefore, this invention utilizes a gating mechanism to adaptively generate fusion weights for each node, generating node-level fusion weights based on semantic components, topological components, and category relationship context, resulting in refined node features: ; ; in, Represents a node The fusion weight; For the gated mapping function, a multilayer perceptron (MLP) is typically used; Represents the Sigmoid function; For the first Refined node characteristics of each node.

[0057] When a node is a paper node, the fusion weight is used to control the fusion ratio between category semantic information and citation topology information of the paper node, so that paper nodes with category representativeness, topic relevance or key topological connection function can obtain refined feature representation suitable for graph compression.

[0058] Specifically, node importance is determined by semantic representativeness, topological centrality, class coverage, and task contribution. Semantic representativeness reflects the proximity of a node to its class prototype; topological centrality reflects the important position of a node in the graph structure; class coverage is used to avoid excessive deletion of nodes from a minority class; and task contribution can be estimated by gradient contribution, confidence change, or validation loss change.

[0059] Node importance score in step S4 The calculation formula is as follows: ; in, Indicates semantic representativeness; Indicates topological centrality; Indicates category coverage; Indicates the degree of contribution to the task; , , and They are respectively , , and The weighting coefficients.

[0060] In a specific application example, when the node is a paper node, semantic representativeness indicates the degree to which the paper node represents the research field, topic category, or document category it belongs to; topological centrality indicates the centrality of the paper node in the citation network; category coverage indicates the contribution of the paper node to the coverage of different paper categories or topic communities; and task contribution indicates the degree of contribution of the paper node to the tasks of paper node classification, topic category prediction, or document category identification.

[0061] Specifically, edge importance is jointly determined by semantic similarity, original adjacency relations, random block model prior, and local structural contribution. Semantic similarity is used to preserve connections between homogeneous or related nodes; random block model prior is used to maintain categorical block structure; and local structural contribution is used to maintain connectivity and local message passing paths.

[0062] The formula for calculating the edge importance score in step S4 is as follows: ; in, Representing an edge Importance score; Indicating that under the prior of the random block model, the node With nodes The connection probabilities between edges are used to provide a global block structure prior for edge importance assessment; Indicate the contribution of an edge to the locally connected structure; For the first The refined node features of each node are the output representation after the semantic components and topological components are fused through a gating mechanism. The adjacency matrix of the original graph is the first... Line number Column elements; , , and They are respectively , , and The weighting coefficients.

[0063] In a specific application example, when an edge is a citation relationship edge in a citation network or a preprocessed connection edge, the semantic similarity of the nodes at both ends of the edge represents the degree of similarity between the two papers in terms of textual semantics, topic semantics, or research domain semantics; the prior connection probability of the random block model represents the prior probability that there is a citation relationship or connection between the research domains, topic categories, or document categories to which the two paper nodes belong; the local connectivity contribution represents the contribution of the citation relationship or connection to maintaining the connectivity of the topic community, research domain community, or local citation structure. Edge importance assessment can distinguish between key citation relationship edges and low-value or noisy connection edges. For edges connecting the same topic community, the same research domain, or related document categories, if the semantic similarity of the paper nodes at both ends is high, conforms to the prior of the random block model, and makes a significant contribution to the local connectivity structure, then the edge has a higher retention priority.

[0064] Prior of random block model The specific formula is as follows: ; in, Assign matrices to the node blocks; Inter-block connectivity probability matrix; This is a transpose.

[0065] When the original graph is a citation network, the node block assignment matrix represents the allocation relationship between paper nodes and research field communities, topic communities, or document category communities, and the inter-block connection probability matrix represents the prior connection probability that there are citation relationships or connection relationships between different communities.

[0066] Specifically, the method for generating the compressed image in step S5 is as follows: Based on the target node compression rate and target edge compression rate, determine the number of nodes and edges to be retained after compression. Select nodes and edges from high to low importance scores, respectively, to finally generate the compressed graph. The specific formula is as follows: ; ; ; in, Represents a compressed set of nodes; Represents the set of compressed edges; This represents the generated compressed image; This is the node feature matrix of the compressed graph; The adjacency matrix of the compressed graph; The target node compression ratio; The target edge compression ratio.

[0067] The formula only defines the target size of nodes and edges after compression. In actual construction, the basic definition of a graph is followed, and only edges whose two endpoints belong to the same node set are retained as candidates. Under Top-K selection, the probability of isolated nodes appearing is extremely low. If they do appear, they can be removed through post-processing and added to the next node according to the score.

[0068] The compression ratio can be adaptively adjusted based on graph size, number of categories, validation set loss, memory budget, training time budget, or target accuracy constraints. When the original graph is a citation network, the compression ratio is adaptively adjusted based on the number of paper nodes, number of citation edges, number of paper categories, target node classification accuracy, available computing resources, or real-time requirements of the citation network analysis task.

[0069] Specifically, the compressed graph structure corresponding to the target dataset is input into a graph neural network classifier to obtain prediction results, and then a multi-objective joint loss function is applied. End-to-end optimization is performed using the following formula: ; ; in, , , and These are the loss weighting coefficients; For classification loss; Category relationship retention loss; For structural reconstruction loss; Topology preservation loss; This represents the loss in compressibility coefficient; For graph neural network classifiers; The output is the prediction result; This is the compressed adjacency matrix; This is the compressed node attribute matrix.

[0070] Topology preservation loss includes at least one of degree distribution preservation term, connectivity preservation term, and random block model prior preservation term. When the original graph is a citation network, topology preservation loss is used to preserve at least one of the following in the citation network before and after compression: node degree distribution, key paper node connectivity, topic community structure, document category community structure, or local citation clustering structure.

[0071] When the original graph is a citation network, the classification loss is used to constrain the prediction results of the paper node categories, the category relationship preservation loss is used to maintain the consistency of the paper category relationship distribution before and after compression, the structure reconstruction loss is used to maintain the reconstruction capability of the citation network structure, the topology preservation loss is used to maintain the key topological structure in the citation network, and the compression sparsity loss is used to control the size of the compressed citation network.

[0072] The class relation preservation loss is used to ensure that the distribution of class relations remains consistent before and after compression. The class relation preservation loss in the joint loss function in step S6... The specific formula is as follows: ; in, This represents the distribution of category relationships in the compressed graph; Indicates KL divergence; This is a separator.

[0073] When the original graph is a citation network, the category relationship distribution in the original graph represents the semantic and topological relationships between different research field categories, topic categories, or document categories in the original citation network. The category relationship distribution in the compressed graph represents the semantic and topological relationships between corresponding paper categories in the compressed citation network.

[0074] The structural reconstruction loss is used to maintain the structural consistency between the compressed graph and the original graph. The structural reconstruction loss in the joint loss function in step S6... The specific formula is as follows: ; in, Represents the estimated node With nodes The probability of connection between them; This is a logarithmic function.

[0075] In a specific application example, when the node is a paper node, the connection probability represents the probability of estimating the existence of a citation relationship or connection relationship between two paper nodes. The structural reconstruction loss is used to constrain the compressed graph to maintain the main citation network structure after removing redundant paper nodes and redundant citation relationship edges.

[0076] Specifically, step S6 involves inputting the compressed graph structure corresponding to the target dataset into the graph neural network classifier to obtain the node category prediction results, and then iteratively updating by minimizing the joint loss function until convergence.

[0077] Topology preservation loss includes at least one of degree distribution preservation term, connectivity preservation term, and random block model prior preservation term.

[0078] When the original graph is a citation network, the topology preservation loss is used to preserve at least one of the following in the citation network before and after compression: node degree distribution, key paper node connectivity, topic community structure, document category community structure, or local citation clustering structure.

[0079] The method proposed in this invention is applicable to tasks such as node classification, link prediction, graph classification, recommendation systems, social network analysis, knowledge graph compression, and citation network analysis.

[0080] To objectively and reproducibly verify the effectiveness and universality of the graph compression method proposed in this invention, this experiment uses the widely recognized standard benchmark citation datasets Cora, CiteSeer, PubMed, and Arxiv in the field of graph learning for comparative experiments. These datasets have a unified and publicly available data partitioning method and industry-recognized comparison baselines, enabling fair verification of the compression performance preservation capability of this method in node classification tasks. The experimental task is semi-supervised node classification, and the evaluation metric is classification accuracy; a higher value indicates a stronger ability of the compressed graph to preserve information for downstream tasks. The method of this invention is not limited to citation network scenarios and can be similarly extended to various graph structure data with node attributes and labels, such as protein-protein interaction networks, social networks, and recommender system interaction networks.

[0081] In the experimental setup, Cora, CiteSeer, and PubMed employed common citation network partitioning methods, while Arxiv used a social graph node classification setup. For each dataset, multiple random seeds were run at different compression rates, and the node classification accuracy of Seed1, Seed2, Seed3, Seed4, and Seed5 was recorded. The optimal value, the average result of the original GCPA method, and the result of the modified method of this invention were statistically analyzed. The experimental results of different methods on four real datasets are shown in Table 1: Table 1. Experimental results of node classification under different compression ratios

[0082] As shown in Table 1, on the Cora dataset, the method provided by this invention can achieve high node classification accuracy at compression rates of 1.3%, 2.6%, and 5.2%, indicating that this invention can effectively preserve key category discrimination information in the citation network through semantic prototype and topology preservation mechanisms. In particular, this invention can still maintain high performance at a low compression rate of 1.3%, indicating that it has good adaptability to extreme compression scenarios.

[0083] On the CiteSeer dataset, the proposed method demonstrates stability across different compression ratios, with the modified results showing an improvement over the average results of the original GCPA. This phenomenon indicates that in datasets with sparse node features and ambiguous class boundaries, the class semantic prototype and class relationship distribution can provide additional global semantic constraints for the compressed graph, thereby reducing the possibility of key class nodes being mistakenly deleted.

[0084] On the PubMed dataset, the proposed method achieved good performance at a low compression rate of 0.08%, demonstrating that it can effectively filter representative key nodes and edges in large-scale citation graphs. The fluctuations in individual results at higher compression rates may be related to long-distance propagation paths and class imbalances in the PubMed graph structure. Further optimization can be achieved through more refined adaptive compression rate adjustment and class coverage constraints.

[0085] On the Arxiv dataset, the proposed method achieves improved classification accuracy, outperforming all baselines such as K-Cen, GCond, and GCPA at compression rates of 0.05% and 0.5%. Given the sparse node features and large data size of the Arxiv dataset, this result demonstrates that the proposed method can retain key semantic and structural information of the original image with a very small proportion, efficiently selecting representative nodes. However, there is still a certain gap between the accuracy and the baseline of the whole complete original image at each compression ratio. Further optimization of global structural constraints can further narrow this performance gap.

[0086] Figure 2 The bar chart shows the comparison of ablation experiment results of this invention on the Cora dataset. It can be seen that the method proposed in this invention has higher accuracy than the other three methods.

[0087] Figure 3 The figure shows a comparison of ablation experiment results of the present invention on the Arxiv dataset. It can be seen that the method proposed in this invention has a higher accuracy rate compared with the other three methods.

[0088] Overall, this invention, through the synergistic effect of semantic and topological decoupling, category relationship preservation, joint importance assessment of nodes and edges, and prior random block model, enables compressed graphs to retain key information related to downstream classification tasks even at a relatively small scale, effectively alleviating the problems of semantic loss and topological distortion in traditional graph compression methods.

[0089] This invention can be applied to graph compression for citation network node classification: In a citation network, nodes represent papers, edges represent citation relationships between papers, node attributes represent textual features generated from paper titles, abstracts, or keywords, and node labels represent the research topic of the paper. Because citation networks contain a large number of weakly related citations, historical citations, and cross-domain citations, training a graph neural network directly on the complete graph may lead to high computational costs and noise propagation problems.

[0090] When using the method of this invention, a lightweight graph neural network is first trained on the original citation network to obtain the initial features of the paper nodes. Then, based on the labeled papers in the training set, a category semantic prototype for each research topic is constructed, and the distribution of category relationships between different research topics is calculated.

[0091] In the semantic-topological decoupling phase, the semantic components of a paper node represent the paper's topic content, while the topological components represent the paper's structural role in the citation network, such as a core paper, a bridging paper, or a peripheral paper. Through gated fusion, the model can adaptively assign weights of semantic and structural information to different paper nodes.

[0092] During the compression phase, paper nodes with strong semantic representativeness, high citation centrality, and high category coverage value are prioritized for retention. Simultaneously, citation edges with similar semantics, significant structural contributions, and conformity to the prior category block structure are also retained. The resulting compressed citation network maintains good node classification accuracy with fewer nodes and edges.

[0093] This invention can also be applied to graph compression for social network user classification: In social networks, nodes represent users, edges represent follow relationships, friend relationships, or interaction relationships, and node attributes represent user profiles, behavioral statistics, text content, or interest tags. Node tags can represent user interest categories, risk levels, or group types. Social networks are typically large in scale and contain a large number of low-frequency interactions, weak ties, and abnormal connections.

[0094] This invention models representative features of different user groups through category semantic prototype modeling, models the association strength between different groups through category relationship distribution, and distinguishes user attribute semantics from social structure roles through a semantic topology decoupling module. For users with obvious interest characteristics, the model can assign higher weights to semantic components; for social bridging users or core community users, the model can assign higher weights to topology components.

[0095] By jointly compressing nodes and edges, a large number of redundant weak relationships can be removed, while key user nodes and key social connections are retained. This reduces the training cost of social network graph neural networks and improves their robustness in user classification and risk identification tasks.

[0096] This invention can also be applied to the compression of user-item graphs in recommendation systems: In recommender systems, users and items can form a bipartite graph or a heterogeneous graph, with edges representing interactions such as clicks, purchases, ratings, favorites, and browsing. Because user interactions are often random, short-lived, and noisy, the original user-item graph typically contains a large number of low-value interaction edges.

[0097] This invention first utilizes a graph neural network to obtain initial representations of user nodes and item nodes, and then constructs category prototypes and category relationship distributions based on user groups, item categories, or implicit clustering results. Subsequently, a semantic topology decoupling module distinguishes user preference semantics, item content semantics, and interaction structure information.

[0098] During the compressed graph generation stage, the model retains representative users, representative items, and high-value interaction edges, while removing accidental clicks, weakly relevant browsing, and noisy interactions. The compressed recommendation graph reduces the training cost of large-scale recommendation models while preserving the main preference structure and potential interest relationships.

[0099] This invention can also be applied to knowledge graph compression applications: In knowledge graphs, nodes represent entities, and edges represent semantic relationships between entities. Large-scale knowledge graphs typically contain massive amounts of entities and relationships, and training graph neural networks or graph representation learning models directly on the complete knowledge graph would impose significant computational burdens.

[0100] When using the method of this invention, entity categories, relationship types, or entity clustering results can be used as category or block structure information to construct category semantic prototypes and category relationship distributions. Through joint evaluation of node importance and edge importance, key entities, core relationships, and structural bridging relationships are retained, while redundant entities and low-contribution relationships are deleted.

[0101] This experiment can be used for tasks such as knowledge graph completion, entity classification, relation prediction, and semantic retrieval, and has good scalability.

[0102] This invention can also be applied to graph compression applications for protein-protein interaction networks: Nodes represent proteins, and edges represent physical interactions, functional interactions, or regulatory relationships between proteins. Node attributes can consist of protein sequence, domains, physicochemical properties, expression levels, and existing functional annotations. Node labels can represent protein functional categories, disease association categories, or biological pathway categories. Due to potential issues such as experimental noise, missing interactions, redundant interactions, and overlapping functional modules in protein interaction networks, training graph neural networks directly on a complete network incurs high computational costs and may be affected by noisy connections. The significance of graph compression for this type of network lies in: while preserving key proteins, protein complexes, functional modules, and important pathway connections, reducing the number of nodes and edges involved in message passing, lowering memory usage and training / inference time, and simultaneously mitigating the interference of low-confidence interaction edges on the model learning process.

[0103] When using the method of this invention, the initial features of protein nodes are first obtained by using a pre-trained graph neural network; then, category semantic prototypes of different functional categories, disease association categories or pathway categories are constructed based on the labeled proteins, and the semantic relationship distribution between categories is calculated; subsequently, the functional semantic components and interaction topological components of proteins are extracted by the semantic topology decoupling feature refinement module, and refined node features are generated by using a gating fusion mechanism.

[0104] During the compression phase, this invention calculates the importance of protein nodes based on semantic representativeness, topological centrality, category coverage, and task contribution. It also calculates the importance of interaction edges based on protein semantic similarity, original interaction relationships, prior knowledge of the random block model, and local connectivity contribution. This prioritizes retaining key protein nodes with strong functional representativeness, significant disease associations, and substantial pathway module support, as well as interaction edges that contribute significantly to maintaining the connectivity of protein complexes, functional modules, or biological pathways. The compressed protein interaction network can reduce the number of nodes and edges while maintaining the main functional category relationships and key interaction topologies. It can be used for tasks such as protein function prediction, disease-associated protein identification, biological pathway relationship analysis, and biological network visualization.

[0105] Of course, the above description is not intended to limit the present invention, and the present invention is not limited to the examples given above. Any changes, modifications, additions or substitutions made by those skilled in the art within the scope of the present invention should also fall within the protection scope of the present invention.

Claims

1. A graph compression method for semantic topological decoupling in graph neural networks, characterized in that, Includes the following steps: S1, Obtain the original graph data, and perform feature pre-calculation on the original graph data through a pre-trained graph neural network to obtain the initial features of the nodes; S2, construct category semantic prototypes based on the category information of labeled nodes, and calculate the category relationship distribution between different categories; S3, construct a semantic topology decoupling feature refinement module, decompose node features into semantic components related to category discrimination and topology components related to topology structure, and obtain refined node features through gating fusion; S4 calculates node importance score and edge importance score based on refined node features, category relationship distribution, node topological centrality, and random block model prior. S5. Based on the target compression rate, determine the number of nodes and edges to be retained after compression. Select nodes and edges from high to low according to their importance scores, and finally generate a compressed graph. S6. Input the compressed graph structure corresponding to the target dataset into the graph neural network classifier to obtain the node category prediction results, and optimize it through the joint loss function; Step S1 specifically includes the following steps: S1.1, Obtain the raw graph data, including: citation network graph data. ,in Represents the set of paper nodes; This represents a set of citation relationships between papers; Represents the node attribute matrix, For the number of nodes, The attribute feature dimension of a single node; Represents the adjacency matrix; Category labels representing some paper nodes; S1.2, Initial feature matrix of nodes for: ; ; in, This represents a pre-trained graphical neural network model; Indicates the dimension of node features; For transpose; Indicates the first The initial feature vector of a single node corresponding to each node.

2. The graph compression method for semantic topological decoupling of graph neural networks according to claim 1, characterized in that, Step S2 specifically includes the following steps: S2.1, calculate the category semantic prototype using the initial feature mean of the category labeled nodes, as shown in the following formula: ; ; ; in, For the first The category semantic prototype of a class; Indicates the first The semantic prototype of a class category; Represents the category prototype matrix; Indicates the number of categories; Indicates the first A collection of class nodes; For the first One node; Indexed by category; For the first Category labels for each node; For the first The initial feature vectors of each node; S2.2, Calculate the cosine similarity between nodes. The formula is as follows: ; in, For the first The initial feature vectors of each node; It is an L2 norm; S2.3, Category With category Relationship strength for: ; in, For the first A collection of class nodes; S2.4, the category relationship distribution is obtained through temperature normalization. The formula is as follows: ; in, Indicates the temperature coefficient; Use the Softmax activation function; For category The relationship strength vector between the data and all categories.

3. The graph compression method for semantic topological decoupling of graph neural networks according to claim 1, characterized in that, Step S3 specifically includes the following steps: S3.1, Generate semantic offsets based on node attributes and corresponding category semantic prototypes, and add the semantic offsets and semantic prototypes to obtain semantic components: ; ; in, Represents a semantic mapping function; Indicates semantic offset; Represents a node semantic components; For the first The original node feature vectors of each node; For the first The category semantic prototype vector corresponding to the category to which each node belongs; S3.2, construct the category relationship context based on the category relationship distribution and category semantic prototype, and generate topological components by combining node topological statistical features. The formula is as follows: ; ; ; in, Represents the context of category relationships; Representing topological statistical characteristics; For the first The category semantic relationship distribution vector corresponding to the category to which each node belongs; For the first Topological offset of each node; It is a topology mapping function; Represents the category prototype matrix; S3.3, Node-level fusion weights are generated based on semantic components, topological components, and category relationship context to obtain refined node features: ; ; in, Represents a node The fusion weight; For gated mapping functions; Represents the Sigmoid function; For the first Refined node characteristics of each node.

4. The graph compression method for semantic topological decoupling of graph neural networks according to claim 1, characterized in that, Node importance score in step S4 The calculation formula is as follows: ; in, Indicates semantic representativeness; Indicates topological centrality; Indicates category coverage; Indicates the degree of contribution to the task; , , and They are respectively , , and The weighting coefficients.

5. The graph compression method for semantic topological decoupling of graph neural networks according to claim 1, characterized in that, The formula for calculating the edge importance score in step S4 is as follows: ; in, Representing an edge Importance score; Indicating that under the prior of the random block model, the node With nodes The probability of connection between them; Indicate the contribution of an edge to the locally connected structure; For the first Refined node characteristics of each node; The adjacency matrix of the original graph is the first... Line number Column elements; , , and They are respectively , , and Weighting coefficients; Prior of random block model The specific formula is as follows: ; in, Assign matrices to the node blocks; Inter-block connectivity probability matrix; This is a transpose.

6. The graph compression method for semantic topological decoupling of graph neural networks according to claim 1, characterized in that, The specific formula for generating the compressed image in step S5 is as follows: ; ; ; in, Represents a compressed set of nodes; Represents the set of compressed edges; This represents the generated compressed image; This is the node feature matrix of the compressed graph; The adjacency matrix of the compressed graph; The target node compression ratio; The target edge compression ratio.

7. A graph compression method for semantic topological decoupling of graph neural networks according to claim 1, characterized in that, Step S6 is as follows: Input the compressed graph structure corresponding to the target dataset into the graph neural network classifier, and use the joint loss function. The specific formula is as follows: ; in, , , and These are the loss weighting coefficients; For classification loss; Category relationship retention loss; For structural reconstruction loss; Topology preservation loss; This represents the loss in compressibility coefficient; Category Relationship Preservation Loss The specific formula is as follows: ; in, This represents the distribution of category relationships in the compressed graph; Indicates KL divergence; Used as a separator; Indicates the number of categories; Distribution of category relationships; Structural Reconfiguration Loss The specific formula is as follows: ; in, Represents the estimated node With nodes The probability of connection between them; For taking the logarithmic function; The adjacency matrix of the original graph is the first... Line number The elements of the column.

8. A graph compression method for semantic topological decoupling in graph neural networks according to claim 1, characterized in that, The specific steps of step S6 are as follows: input the compressed graph structure corresponding to the target dataset into the graph neural network classifier to obtain the class prediction results of the nodes, and iteratively update by minimizing the joint loss function until convergence.

Citation Information

Patent Citations

  • Graph neural network-oriented adaptive graph compression method

    CN122023547A

  • Enterprise operation data semantic risk identification method and system based on neural network

    CN122198667A