Graph data denoising method and system, computer equipment and storage medium

By using a graph convolutional network method that dynamically adjusts the similarity threshold, noisy edges in graph data are identified and removed, thus solving the robustness problem of graph neural networks under noise and attacks and improving the robustness and adaptability of the model.

CN121685307APending Publication Date: 2026-03-17CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing graph neural networks are not robust enough when facing noisy data or adversarial attacks. Existing denoising methods are difficult to adapt to dynamically changing noise patterns in graph data, and have high computational costs or limited generalization capabilities.

Method used

Feature propagation is performed through a graph convolutional network with no activation function, no bias term, and all weights set to 1. The difference between the node aggregated features and the initial features is calculated, the similarity threshold is dynamically adjusted, and noise edges are identified and removed. A dynamic thresholding method is used to identify and remove noise edges in the graph.

Benefits of technology

It improves the robustness and adaptability of graph neural networks, enabling them to better cope with noise and adversarial attacks in different graph data, and enhances the reliability and stability of the model in practical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121685307A_ABST
    Figure CN121685307A_ABST
Patent Text Reader

Abstract

The invention relates to graph data denoising, in particular to a graph data denoising method and system, computer equipment and a storage medium, and the method comprises the steps: initializing graph data, and inputting the graph data comprising a node feature matrix and an adjacent matrix into a graph convolutional network; aggregating the graph data through a graph convolutional network to obtain an aggregated node feature matrix, and calculating the difference between the node feature matrix and the initial feature to obtain a feature difference value set; determining a selected disturbance node type and a selected disturbance node number according to the skewness value; dynamically adjusting a similarity threshold value according to the mean value and the standard deviation with the large characteristic difference values so as to identify neighbor nodes with low similarity with the disturbance nodes; calculating the similarity between the selected disturbance nodes and first-order neighbors thereof, and removing edges of which the similarity is lower than a dynamic threshold value to obtain de-noised graph data; according to the method, more accurate and more adaptive recognition and removal of noise edges are realized, and the robustness and interpretability of graph structure disturbance in the denoising process are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to graph data denoising, and particularly to a graph data denoising method, system, computer device, and storage medium. Background Technology

[0002] Graph Neural Networks (GNNs), as powerful tools for processing graph-structured data, have achieved remarkable results in recent years in fields such as social network analysis, recommender systems, prediction of chemical molecular properties, and knowledge graph reasoning. GNNs learn representations of nodes or graphs by aggregating information about nodes and their neighbors; this message-passing-based mechanism enables them to effectively capture complex relationships within graph structures. However, despite their excellent performance in many tasks, the robustness of GNNs to noisy data or adversarial attacks remains a significant research challenge. Real-world graph data is often imperfect, potentially containing noise, missing information, or malicious attacks. For example, in social networks, fake social relationships (such as mistakenly added friends) may be unintentionally introduced; in recommender systems, attackers may influence recommendation results by forging user-item interaction edges. These noises or attacks significantly impact the performance of GNNs, leading to a decrease in the reliability of the model in practical applications.

[0003] To improve the robustness of GNNs, researchers have proposed various methods, mainly including graph cleaning, adversarial training, and robust graph model design. Graph cleaning methods identify and remove noisy edges or nodes in the graph through preprocessing, but they usually rely on static thresholds or fixed rules, making it difficult to adapt to dynamically changing noise patterns in graph data. Adversarial training enhances the model's resistance to attacks by introducing adversarial samples during training, but it is computationally expensive and may not completely eliminate the impact of adversarial attacks. Robust graph neural network design reduces the impact of noisy edges by introducing attention mechanisms or regularization techniques, but these methods usually need to be customized for specific types of noise or attacks, resulting in limited generalization ability. Although these methods improve the robustness of GNNs to some extent, they still have limitations such as insufficient static thresholds, sensitivity to noise types, and the difficulty in balancing robustness and accuracy. Summary of the Invention

[0004] To remove noise from graph data and improve its performance in graph convolutional networks, this invention proposes a graph data denoising method, which includes the following steps:

[0005] S1: Initialize graph data by inputting graph data, including node feature matrices and adjacency matrices, into the graph convolutional network;

[0006] S2: The graph data is propagated through a graph convolutional network with no activation function, no bias term and all weights set to 1, to obtain the aggregated node feature matrix;

[0007] S3: Calculate the difference between the aggregated features and the initial features of each node to obtain a set of feature difference values;

[0008] S4: Sort the calculated feature difference values ​​and determine the type and number of perturbation nodes to be selected based on the skewness values;

[0009] S5: Because existing graph attack methods tend to add edges between nodes with large feature differences to create perturbations, this invention dynamically adjusts the method based on the mean and standard deviation of the feature difference values. A similarity threshold is used to identify neighboring nodes that have a low similarity to the disturbing node;

[0010] S6: Calculate the relationship between the selected perturbation node and its first-order neighbors. Similarity is used to remove edges with similarity below a dynamic threshold, resulting in denoised graph data.

[0011] This invention also proposes a graph data denoising system for implementing a graph data denoising method, comprising:

[0012] The aggregation module includes a graph convolutional network with no activation function, no bias term and all weights set to 1, which is used to aggregate the aggregated features based on the original features of the graph data to be denoised.

[0013] The difference calculation module is used to calculate the difference between the original features and the aggregated features of the image data to be denoised based on the L2 norm.

[0014] The sorting module is used to sort the nodes based on the results of the difference calculation module;

[0015] The denoising parameter calculation module is used to determine the type and number of perturbation nodes to be selected based on the skewness value of the nodes, and to dynamically adjust... Similarity threshold;

[0016] The denoising module is used to remove noise between nodes and disturbance nodes. Similarity less than Edges with similarity thresholds.

[0017] The present invention also proposes a computer device, the computer device comprising:

[0018] One or more processors;

[0019] Memory, used to store one or more programs;

[0020] When the one or more programs are executed by the one or more processors, the one or more processors implement a graph data denoising method.

[0021] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a graph data denoising method.

[0022] Compared with the prior art, the present invention has the following beneficial effects:

[0023] 1. This invention uses graph convolutional networks to propagate features from graph data, calculates the difference between the aggregated features of nodes and the initial features, and dynamically filters candidate perturbation nodes based on the skewness value obtained from the difference value. This can accurately locate possible perturbation nodes and provide accurate targets for subsequent perturbation removal.

[0024] 2. This invention dynamically adjusts the mean and standard deviation based on the feature differences. The similarity threshold allows the threshold to adapt to the feature distribution of the graph data, effectively avoiding the inaccurate recognition problem that may be caused by a fixed threshold, and improving the universality and adaptability to different graph data.

[0025] 3. Experiments show that re-inputting the updated adjacency matrix and the original feature matrix of this invention into the GNN model for training enables the model to learn on cleaner and more accurate graph data, thereby better evaluating and improving the model's robustness to perturbations and enhancing the model's reliability and stability in practical applications. Attached Figure Description

[0026] Figure 1 This is a structural block diagram of a graph data denoising method according to the present invention;

[0027] Figure 2 This is a flowchart of a graph data denoising method according to the present invention. Detailed Implementation

[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. 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.

[0029] To overcome the limitations of existing graph data denoising methods, dynamic thresholding has emerged as a promising solution. Dynamic thresholding adaptively adjusts the threshold based on the local structure and global characteristics of the graph data, thereby more accurately identifying and removing noisy edges. Compared to static thresholding methods, dynamic thresholding offers greater adaptability, a better balance between robustness and accuracy, and higher versatility. The core idea of ​​dynamic thresholding is to adjust the threshold according to the dynamic changes in the graph data, adapting to different noise patterns, thus minimizing the impact on important edges while removing noisy edges. This method is independent of specific types of noise or attacks, applicable to various scenarios, and effectively addresses noise and adversarial attacks.

[0030] A dynamic threshold-based perturbation edge identification and removal method aims to improve the robustness of graph neural networks (GNNs) by dynamically adjusting thresholds to identify and remove noisy edges in the graph. This method dynamically calculates the importance threshold for each edge, identifies potential noisy or adversarial edges, and optimizes the GNN training process while removing noisy edges, making it more robust to the remaining graph structure. This approach not only effectively addresses noise and adversarial attacks but also improves robustness while maintaining model accuracy, possessing significant theoretical and practical value.

[0031] This invention denoises graph data based on graph convolution feature differences and dynamic thresholds. The invention provides a graph data denoising method for removing disturbances from graph data, specifically including the following steps:

[0032] S1: Initialize graph data by inputting graph data, including node feature matrices and adjacency matrices, into the graph convolutional network;

[0033] S2: The graph data is propagated through a graph convolutional network with no activation function, no bias term and all weights set to 1, to obtain the aggregated node feature matrix;

[0034] S3: Calculate the difference between the aggregated features and the initial features of each node to obtain a set of feature difference values;

[0035] S4: Sort the calculated feature difference values ​​and determine the type and number of perturbation nodes to be selected based on the skewness values;

[0036] S5: Dynamically adjust based on the mean and standard deviation of the selected disturbance nodes. A similarity threshold is used to identify neighboring nodes that have a low similarity to the disturbing node;

[0037] S6: Calculate the relationship between the selected perturbation node and its first-order neighbors. Similarity is used to remove edges with similarity below a dynamic threshold, resulting in denoised graph data.

[0038] As an optional implementation, the graph data is preprocessed before being initialized and fed into the graph convolutional network, specifically including the following steps:

[0039] Adding a self-loop to the adjacency matrix, the resulting adjacency matrix is ​​represented as follows: ,in For the initial adjacency matrix, It is the identity matrix;

[0040] Calculate the degree matrix, i.e. ,in For degree matrix, This indicates that a diagonal matrix is ​​generated using the elements within the parentheses as the elements on the diagonal. This indicates that the sum of the elements in each row of the adjacency matrix is ​​calculated.

[0041] The adjacency matrix after adding self-loops is normalized and then used as input to the graph convolutional network. The normalized adjacency matrix is ​​represented as follows: .

[0042] The traditional graph convolutional layer aggregates graph data as follows:

[0043]

[0044] in, It is the first Information after layer aggregation; It is a degree matrix; It is information from the previous level; It is weight information.

[0045] However, if this clustering method is used in this invention, then this invention chooses to propagate features from the graph data using a single-layer graph convolutional network with no activation function, no bias term, and all weights set to 1. However, if this aggregation method is used, the feature dimensions of the aggregated nodes will be inconsistent with the original node feature dimensions, thus failing to effectively compare and analyze the differences between nodes before and after aggregation. Therefore, this invention employs a special graph convolutional network for feature propagation: this network does not set an activation function, omits bias terms, and initializes the weight matrix to all 1s to ensure that the node features maintain their dimensionality during propagation while achieving effective feature transformation.

[0046] Since the initial feature vectors of the graph data are in the form of 0s and 1s, while the feature vectors after the adjusted GCN propagation are in the form of decimals, and may be positive or negative, this embodiment adopts... Norm is used to calculate the feature difference value between each pair of nodes. Then use a set Save the obtained set of feature difference values.

[0047] Specifically, The norm (also known as the Euclidean norm) is a measure of the length of a vector in a vector space. It is defined as the square root of the sum of the squares of the vector's elements. The specific formula is as follows:

[0048] For vectors ,That The norm is:

[0049] If the coordinates of two nodes are represented as vectors and The difference between them (i.e., the Euclidean distance) is the difference between the two vectors. Norm: ;

[0050] In this embodiment, the node feature vector of the perturbation graph is Where n is the dimension of the node feature vector, and the node feature vector after passing through one layer of GCN aggregation in this invention is: Therefore, the node feature difference value calculated by this invention can be expressed as:

[0051]

[0052] Save the node feature difference values ​​of each node to a set. This facilitates the subsequent use of the present invention.

[0053] After obtaining the set of feature difference values, the nodes are sorted, and then the skewness value of the feature difference values ​​is calculated. The proportion of candidate nodes selected is then dynamically adjusted based on the obtained skewness value. The calculation of the skewness value specifically includes the following steps:

[0054] Sort the nodes in descending order of their differences to obtain the sorted index sequence:

[0055]

[0056] The set of feature differences for candidate perturbation nodes Calculate the mean, standard deviation, and skewness coefficient of the set:

[0057] Mean:

[0058] Standard deviation:

[0059] Skewness coefficient:

[0060] Where N is the number of nodes. This represents the node with index i in the graph.

[0061] The proportion of perturbation nodes is dynamically adjusted based on the obtained skewness values, specifically including:

[0062] like This indicates that the set of difference values ​​obtained in the graph data contains a few maxima, suggesting that the similarity between the nodes' neighbors is too low. In this case, the focus should be on nodes with low similarity, selecting a minority of nodes with large differences as perturbation nodes. The minority nodes in this invention are... For reference, a minority of nodes refers to nodes with fewer than [number of nodes]. As another optional implementation method, the number of nodes selected at that time can be based on majority and minority, as long as the number of minority nodes is less than the number of majority nodes.

[0063] like This indicates that the set of differences obtained in the graph data contains a few minimum values, suggesting high similarity between the nodes' neighbors. In this case, the scope should be broadened, and the majority of nodes with small differences should be selected as the perturbation nodes. The majority nodes in this invention are... For reference, a majority of nodes refers to nodes with more than [a certain number]. The number of nodes selected at that time;

[0064] like At this point, a fixed percentage of nodes are randomly selected from all nodes as the disturbed nodes. This percentage is generally set to 5% to 15%, that is, 5% to 15% of the nodes are randomly selected from all nodes.

[0065] A skewness value of exactly 0 is unlikely to occur. To balance the three states, a minimum value ε can be set, typically between 0.1% and 0.5%. As a more efficient implementation, a minimum value is set, and the proportion of perturbation nodes is dynamically adjusted based on the obtained skewness value. Specifically, this includes:

[0066] like Select a small number of nodes with large differences as disturbance nodes;

[0067] like Select the majority of nodes with small differences as the perturbation nodes;

[0068] like At this point, a fixed proportion of nodes are randomly selected from all nodes as the disturbed nodes.

[0069] This embodiment provides a specific method for determining the number of perturbed nodes, namely:

[0070]

[0071] Where P is the proportion of the disturbing node among all nodes; To adjust the coefficients, optimization can be performed based on experiments; finally, in this embodiment, the selected perturbation nodes are saved to a set. middle.

[0072] Based on the mean and standard deviation of the feature differences obtained above, dynamically adjust... A similarity threshold is used to identify neighboring nodes with low similarity to the disturbing node, specifically including:

[0073] The dynamic threshold is set based on the characteristic differences of each perturbation node. The greater the feature difference, the more severe the perturbation of the node, so a higher similarity threshold can be set to remove more edges; the smaller the feature difference, the less severe the perturbation of the node, so a lower threshold can be set to retain more edges; by calculating the mean and standard deviation of the feature difference, different thresholds can be set for graphs with different degrees of perturbation.

[0074] This embodiment provides a method combining mean. and standard deviation The method for calculating the threshold is as follows:

[0075]

[0076] in, This is a control factor used to adjust the stringency of the filtration.

[0077] Calculate the relationship between the selected perturbation node and its first-order neighbors. Similarity is used to remove edges with similarity below a dynamic threshold, thereby optimizing the graph structure. Similarity is expressed as:

[0078]

[0079] in, It is a node eigenvectors, It is a node The vector; where the numerator is the intersection of the non-zero value features of the two nodes, and the denominator is the number of the union of the non-zero value features of the two nodes.

[0080] Based on the perturbation candidate set obtained above This embodiment calculates the values ​​of a node in a set and its first-order neighbors. Similarity; if the similarity is less than the calculated threshold... If the edge is larger than a certain threshold, then remove it; otherwise, keep it. Specifically, this includes:

[0081] For sets Each node in First, obtain the node. First-order neighbor list , It is the name of the method for obtaining first-order neighbors;

[0082] For each neighbor node exist In the middle, to calculate the nodes and nodes of Similarity ,like Then in the adjacency matrix Remove the edge from the array, which means changing the original 1 to 0, and finally return the cleaned adjacency matrix. .

[0083] This embodiment also provides an experimental method for verifying a graph data denoising method, which is to use the same noisy graph data after denoising by different methods to train a graph convolutional network, and then compare it with the graph convolutional model trained on clean graph data. If the accuracy obtained is closer to the accuracy of the clean graph, it means that the effect is better, that is, the perturbation nodes have been successfully identified and the perturbation edges have been removed, thereby improving the robustness of the graph neural network.

[0084] In this invention, the nodes in the graph data refer to specific entity nodes, such as user nodes in a social network, and user, product, and store nodes in a shopping network. The node features in this invention refer to the attributes of the node itself. For example, in a social network, user nodes generally use their information as node features, such as gender, location, and interests. Each attribute is an element value in the node feature vector. The adjacency matrix between nodes refers to the relationship between nodes. For example, in a social network, two nodes have interacted through likes, reposts, comments, and follows. Different edge weights can generally be set for different interaction relationships. However, in this application, all adjacency relationships are converted to 0 and 1, that is, only edge relationships exist and edge relationships do not exist. There is an edge relationship between two nodes that have interacted. That is, the graph data in this invention is graph data formed by entity nodes as nodes and the interaction relationships between entity nodes as edge relationships. After extracting features from the graph data using a graph convolutional network, it is used to predict whether there may be an edge relationship between two nodes, thereby recommending another entity node to the corresponding entity node. For example, recommending another user node to a user node in a social network, or recommending product nodes, store nodes, or user nodes to a user node in a shopping website.

[0085] This invention also proposes a graph data denoising system for implementing a graph data denoising method, comprising:

[0086] The aggregation module includes a graph convolutional network with no activation function, no bias term and all weights set to 1, which is used to aggregate the aggregated features based on the original features of the graph data to be denoised.

[0087] The difference calculation module is used to calculate the difference between the original features and the aggregated features of the image data to be denoised based on the L2 norm.

[0088] The sorting module is used to sort the nodes based on the results of the difference calculation module;

[0089] The denoising parameter calculation module is used to determine the type and number of perturbation nodes to be selected based on the skewness value of the nodes, and to dynamically adjust... Similarity threshold;

[0090] The denoising module is used to remove noise between nodes and disturbance nodes. Similarity less than Edges with similarity thresholds.

[0091] The present invention also proposes a computer device, the computer device comprising:

[0092] One or more processors;

[0093] Memory, used to store one or more programs;

[0094] When the one or more programs are executed by the one or more processors, the one or more processors implement a graph data denoising method.

[0095] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a graph data denoising method.

[0096] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A method for graph data denoising, characterized in that, A method for removing disturbance in graph data, comprising the following steps: S1: initializing graph data, inputting graph data including node feature matrix and adjacency matrix into graph convolution network; S2: propagating features of graph data through a graph convolution network without activation function, bias term and with all weight matrices set to 1, to obtain aggregated node feature matrix; S3: calculating difference between aggregated features and initial features of each node to obtain a set of feature difference values; S4: sorting the calculated feature difference values, and determining selected disturbance node type and disturbance node number according to skewness value; S5: Calculate the mean and standard deviation of the perturbed nodes to dynamically adjust a similarity threshold to identify neighbor nodes with low similarity to the perturbed nodes; S6: Calculate the similarity between the selected perturbed nodes and their first-order neighbors, remove edges with similarity lower than a dynamic threshold, and obtain the denoised graph data. S6: Calculate the similarity between the selected perturbed nodes and their first-order neighbors, remove edges with similarity lower than a dynamic threshold, and obtain the denoised graph data.

2. The graph data denoising method of claim 1, wherein, The initialized graph data is input into the graph convolution network after preprocessing, and the preprocessing process includes: adding a self-loop to the adjacency matrix, the adjacency matrix after adding the self-loop is denoted as wherein is an initialized adjacency matrix, is a unit matrix; computing the degree matrix, i.e. where is the degree matrix, denotes generating a diagonal matrix with the elements in the parentheses as the diagonal elements, denotes computing the sum of the elements of each row of the adjacency matrix; The normalized adjacency matrix after adding the self-loop is taken as the input of the graph convolution network, and the normalized adjacency matrix is represented as .

3. The method of claim 1, wherein, Using The norm calculates the difference between the aggregated features and the initial features for each node.

4. The method of claim 1, wherein, The process of selecting nodes as candidate disturbance nodes according to skewness value includes: When the skewness value is greater than 0, nodes with large feature difference values are selected as disturbance nodes, and a small number of nodes with large difference are selected as disturbance nodes; When the skewness value is less than 0, nodes with small feature difference values are selected as disturbance nodes, and a large number of nodes with small difference are selected as disturbance nodes; When the skewness value is 0, a fixed ratio of nodes are randomly selected as disturbance nodes.

5. The graph data denoising method of claim 1 or 4, wherein, Determining the number of disturbance nodes according to skewness value includes: Wherein, P is the proportion of the disturbance node in all nodes; is the skewness value; is the adjustment coefficient.

6. The method of claim 1, wherein, The similarity threshold value is directly proportional to the standard deviation of the feature difference value, that is, the greater the standard deviation of the feature difference value, the The higher the similarity threshold value, the smaller the standard deviation of the feature difference value, and the The lower the similarity threshold value.

7. The method of claim 6, wherein, The similarity threshold is expressed as: wherein, is a similarity threshold value; is the mean of the perturbed nodes; is the variance of the perturbed nodes; k is a control coefficient.

8. A graph data denoising system, comprising: A method for removing disturbance in graph data according to claim 1, comprising: An aggregation module comprising a graph convolution network without activation function, bias term and with all weight matrices set to 1, for aggregating original features of to-be-removed graph data to obtain aggregated features thereof; A difference calculation module for calculating difference between original features of to-be-removed graph data and aggregated features thereof based on L2 norm; A sorting module for sorting nodes according to results of the difference calculation module; The de-noising parameter calculation module is configured to determine the selected disturbance node type and the number of disturbance nodes according to the skewness value of the node, and dynamically adjust The similarity threshold value; The denoising module is used to remove noise between nodes and disturbance nodes. Similarity less than Edges with similarity thresholds.

9. A computer device, comprising: The computer device comprises: One or more processors; Memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a graph data denoising method as claimed in any one of claims 1-7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement a graph data denoising method as claimed in any one of claims 1-7.