Robust learning graph intelligence-based knowledge graph abnormal relationship detection and cleaning method

CN123012457APending Publication Date: 2026-10-30SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611400642.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]本发明旨在解决现有图中毒防御方法采用单一排序或阈值过滤时难以区分高置信恶意边与边界模糊可疑边、可能误删良性边或漏检隐蔽攻击边的问题,提供一种基于鲁棒学习图智能的知识图谱异常关系检测清洗方法,以在识别可疑边并生成清洗图的同时,兼顾检测效果与图结构完整性

Benefits of technology

[0016]与现有技术相比,本发明的有益效果包括:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012457A_ABST
    Figure CN123012457A_ABST
Patent Text Reader

Abstract

The application discloses a knowledge graph abnormal relation detection and cleaning method based on robust learning graph intelligence, and relates to the method, which comprises the following steps: obtaining an original clean graph and injecting malicious edges to generate a poisoned graph, extracting edge level structure features, degree features, node embedding similarity features and node attribute consistency features of each edge in the poisoned graph, and constructing an edge feature vector; training a basic detector based on labeled edge samples, outputting suspicious degree scores of each edge and generating a global ranking sequence; determining a boundary threshold according to a sliding window statistic quantity of the global ranking sequence, and dividing a high-risk area and an uncertain area; using a tail rearranger to perform secondary sorting on the edges in the uncertain area, and determining tail high-risk edges; merging the edges in the high-risk area and the tail high-risk edges, and removing corresponding edges from the poisoned graph to generate a cleaned graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of graph neural network security technology, and in particular to a method for detecting and cleaning abnormal relationships in knowledge graphs based on robust learning graph intelligence. Background Technology

[0002] Graph Neural Networks (GNNs) are capable of performing relationship learning tasks such as node classification and link prediction based on graph structure and node attributes. Because these models typically rely on message passing between nodes, perturbations to the graph topology and neighborhood relationships can affect node representations and the results of corresponding downstream tasks.

[0003] Malicious edge injection is a type of graph data poisoning attack. Attackers can inject fake edges between originally unrelated nodes, altering the graph topology and the semantics of node neighborhoods. Existing defense methods mainly include model-level robustness, graph cleaning, and detection filtering: Model-level robustness can enhance the model's tolerance to perturbations, but it usually does not directly identify specific malicious edges; graph cleaning often filters suspicious edges based on thresholds, but single-stage thresholds are difficult to balance between precision and recall; if detection filtering mainly relies on a single global ranking, it may be difficult to further distinguish suspicious edges near the ranking boundary.

[0004] Therefore, existing methods still have room for improvement in distinguishing between high-confidence malicious edges and ambiguous suspicious edges; if single-stage filtering is used directly, there may be cases of mistakenly deleting benign edges, missing hidden attack edges, or causing unnecessary impact on benign connectivity relationships. Summary of the Invention

[0005] This invention aims to address the problem that existing graph poisoning defense methods, which use single sorting or threshold filtering, struggle to distinguish between high-confidence malicious edges and ambiguous suspicious edges, potentially deleting benign edges or missing hidden attack edges. It provides a knowledge graph abnormal relationship detection and cleaning method based on robust learning graph intelligence, which can identify suspicious edges and generate a cleaned graph while taking into account both detection effectiveness and graph structure integrity.

[0006] To achieve the above objectives, the technical solution of the present invention includes: A method for detecting and cleaning abnormal relationships in knowledge graphs based on robust learning graph intelligence, comprising: S1. Obtain the original clean image. Inject malicious edges into the original clean graph Generate poisoning image For each edge in the poisoning diagram The edge-level structure features, degree features, node embedding similarity features, and node attribute consistency features are extracted and concatenated to obtain the edge feature vector. ; S2. Train a basic detector based on labeled edge samples, and use the basic detector to output the suspicion score of each edge in the poisoned graph. A global sorted sequence is generated based on the descending order of the suspicion scores. ; S3. Calculate the sliding window statistic for the global sorting sequence, and adaptively determine the boundary threshold based on the sliding window statistic. Divide the global sorting sequence into a high-risk area and an uncertain area based on the boundary threshold. S4. For the edges in the uncertainty region, construct tail features based on the original edge features and the sorting information of the edges in the global sorting sequence, train a tail rearranger based on the labeled edge samples in the uncertainty region, and use the tail rearranger to perform a secondary sorting of the edges in the uncertainty region to determine the high-risk tail edges. S5. Merge the edges in the high-risk area with the tail high-risk edges to obtain the final suspicious edge set. Remove the edges corresponding to the final suspicious edge set from the poisoned graph to generate a cleaning graph. .

[0007] A further improvement of the present invention is that, in step S1, the injection strategy of the malicious edge includes: random injection, semantic injection, degree target injection, and cross-community injection.

[0008] A further improvement of the present invention is that the edge-level structure features include the number of common neighbors and the Jaccard coefficient; the degree features include the node degree and degree difference of the two ends of the edge; the node embedding similarity features include the TF-IDF and SVD text embedding similarity of the two ends of the edge; and the node attribute consistency features include the industry attribute matching degree and product attribute matching degree of the two ends of the edge.

[0009] A further improvement of the present invention is that the labeled edge samples include injected edges as positive samples and original edges as negative samples, and negative sampling is used to alleviate class imbalance when training the base detector.

[0010] A further improvement of the present invention is that the basic detector adopts the LightGBM model, the LightGBM model outputs the suspicion score of each edge, and generates the global sorting sequence in descending order of the suspicion scores.

[0011] A further improvement of the present invention is that, in step S3, the sliding window statistics include the mean, standard deviation, and difference between adjacent windows of the suspicion score within the window, and the boundary threshold is adaptively determined based on the mean, standard deviation, and difference between adjacent windows.

[0012] A further improvement of the present invention is that, in step S4, the tail features include the original edge features, sorting position, sorting percentile, local window statistics, score change magnitude and structural conflict index; the tail rearranger adopts the LightGBM model and uses the samples in the uncertainty region as the training set.

[0013] A further improvement of the present invention is that, in step S5, the edges in the high-risk area are removed first, and then the tail high-risk edges are removed to generate the cleaning map.

[0014] A further improvement of the present invention is that a node classification task or a link prediction task is performed on the cleaned graph, and at least one of the following is used to evaluate the defense effect: suspicious edge detection precision, suspicious edge detection recall, accuracy, macro F1, AUC, AP, and performance recovery rate; wherein the performance recovery rate is the ratio of the difference between the performance of the cleaned graph and the performance of the poisoned graph to the difference between the performance of the original clean graph and the performance of the poisoned graph.

[0015] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the above-described adaptive detection and cleaning method for abnormal relationships oriented towards supply chain knowledge graphs.

[0016] Compared with the prior art, the beneficial effects of the present invention include: By integrating edge-level structural features, degree features, node embedding similarity features, and node attribute consistency features, the basic detector can characterize edges from dimensions such as structure, node connectivity, embedding similarity, and attribute consistency. This provides complementary information for identifying semantic spoofing, cross-community, and other covert attack edges, and helps improve the reliability of suspicious edge judgment.

[0017] By first generating a global sorting sequence using a basic detector, then using sliding window statistics to divide high-risk and uncertain regions, and rearranging the tail of the uncertain regions, the global coarse screening of high-confidence-risk edges is combined with the local refinement of samples with ambiguous boundaries, which helps to balance the accuracy and recall of suspicious edge detection.

[0018] By merging edges within high-risk areas and high-risk edges at the tail, and cleaning by first removing edges within high-risk areas and then removing high-risk edges at the tail, the cleaning targets are concentrated on the final set of suspicious edges obtained from the phased detection. This helps to reduce the excessive removal of benign edges and maintain the usability of the graph structure. Attached Figure Description

[0019] Figure 1 This is a flowchart of the knowledge graph anomaly relationship detection and cleaning method based on robust learning graph intelligence according to the present invention; Figure 2This is a schematic diagram of the boundary-aware partitioning and tail rearrangement of the uncertain region in the global sorting sequence of the present invention. Figure 3 This is a comparison chart of the detection precision and recall of the basic detector and the tail rearranger of this invention. Figure 4 The figure shows the ablation experiment results of the cascaded sorting method of this invention. Detailed Implementation

[0020] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0021] Example 1: As Figure 1 As shown, this embodiment uses the ChainKG-industry dataset to perform node classification tasks and the ChainKG dataset to perform link prediction tasks. Through data preprocessing and feature construction, global suspicious edge sorting, boundary-aware risk classification, tail refinement of uncertain regions, phased graph cleaning, and defense effect evaluation, malicious edge injection attacks are detected and cleaned.

[0022] Obtain the original clean image Four strategies—random injection, semantic injection, degree-target injection, and cross-community injection—are employed to inject malicious edges. Generate poisoning image The original clean graph in this embodiment includes 48,995 nodes and 54,032 edges, with malicious edges injected at ratios of 5%, 10%, and 15%, respectively.

[0023] For each edge of the poisoning diagram The edge structure features, degree features, node embedding similarity features, and node attribute consistency features are extracted, and these features are concatenated into an edge feature vector. Among them, the edge-level structure features include the number of common neighbors and the Jaccard coefficient; the degree features include node degree and degree difference; the node embedding similarity feature is the embedding similarity obtained after processing the node text with TF-IDF and SVD; and the node attribute consistency feature is the matching degree of the node's industry attribute and product attribute.

[0024] A binary classification training set is constructed using injected edges as positive samples and original edges as negative samples, with negative sampling used to alleviate class imbalance. In this embodiment, the training set is constructed with a positive-to-negative sample ratio of 1:5, using LightGBM as the base detector, and iteratively trained for 100 epochs. The base detector outputs a suspicion score for each edge. A global sorted sequence is generated based on the doubt score in descending order. .

[0025] For boundary-aware partitioning of the global sorted sequence and tail rearrangement relationships within the uncertainty region, see [link to relevant documentation]. Figure 2 A sliding window with a size of 50 is set along the global sorting sequence. The mean, standard deviation, and difference between adjacent windows of the suspicion score within the window are calculated, and the boundary threshold is adaptively determined based on the statistics. In this embodiment, the first 20% of the global sorting sequence is divided into a high-risk area, and the remaining 80% is divided into an uncertain area.

[0026] For edges within the uncertainty region, tail features are constructed, including original edge features, sorting position, sorting percentile, local window statistics, score change magnitude, and structural conflict index. Using samples from the uncertainty region as the training set, a LightGBM tail rearranger is trained. The tail rearranger outputs a tail suspicion ranking for edges within the uncertainty region and identifies high-risk tail edges accordingly.

[0027] The edges within the high-risk area are merged with the high-risk edges at the tail, resulting in the final set of suspicious edges. First, remove edges within high-risk areas, then remove high-risk edges at the tail end, and finally remove the final set of suspicious edges from the poisoned graph. Generate a cleaning graph from the corresponding edges. .

[0028] Perform node classification or link prediction tasks on the cleaned graph and calculate the precision, recall, accuracy, macro F1 score, AUC, AP, and performance recovery rate for suspicious edge detection. The performance recovery rate is the ratio of the difference between the performance of the cleaned graph and the poisoned graph to the difference between the performance of the original clean graph and the poisoned graph. For a comparison of the precision and recall rates of the base detector and the tail rearranger, see [link to relevant documentation]. Figure 3 See the results of the cascaded ablation experiment. Figure 4 .

[0029] In the node classification task, the accuracy rate of the original clean graph was 63.54%, the accuracy rate of the poisoned graph after a 15% cross-community injection attack was 43.65%, and the accuracy rate of the cleaned graph was 51.93%. In the link prediction task, the AUC of the original clean graph was 93.43%, the AUC of the poisoned graph after a 15% random injection attack was 89.79%, and the AUC of the cleaned graph was 93.70%.

[0030] Example 2: This example uses the Cora-text citation dataset, which includes 7674 nodes and 10172 edges. A semantic injection strategy is used to inject 15% spoofed edges, generating a poisoned graph. The process described in Example 1 is then followed, including edge feature construction, global suspicious edge sorting, boundary-aware risk classification, tail refinement of uncertain regions, and phased graph cleaning. The macro F1 score of the poisoned graph is 61.01%, and the macro F1 score of the cleaned graph is 75.20%.

[0031] This invention proposes a boundary-aware cascaded sorting-based graph poisoning defense method. Through global coarse screening, boundary partitioning, tail refinement, and staged cleaning, it effectively identifies malicious edges and restores the graph structure. Experiments show that this invention performs excellently across multiple datasets and attack scenarios, and can be widely applied in graph security fields such as supply chain, finance, and social networks.

[0032] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A method for detecting and cleaning abnormal relationships in a knowledge graph based on robust learning graph intelligence, characterized in that, include: S1. Obtain the original clean image. Inject malicious edges into the original clean graph Generate poisoning image ; For each edge in the poisoning graph The edge-level structure features, degree features, node embedding similarity features, and node attribute consistency features are extracted and concatenated to obtain the edge feature vector. ; S2. Train a basic detector based on labeled edge samples, and use the basic detector to output the suspicion score of each edge in the poisoned graph. A global sorted sequence is generated based on the descending order of the suspicion scores. ; S3. Calculate the sliding window statistic for the global sorting sequence, and adaptively determine the boundary threshold based on the sliding window statistic. Divide the global sorting sequence into a high-risk area and an uncertain area based on the boundary threshold. S4. For the edges in the uncertainty region, construct tail features based on the original edge features and the sorting information of the edges in the global sorting sequence, train a tail rearranger based on the labeled edge samples in the uncertainty region, and use the tail rearranger to perform a secondary sorting of the edges in the uncertainty region to determine the high-risk tail edges. S5. Merge the edges in the high-risk area with the tail high-risk edges to obtain the final suspicious edge set. Remove the edges corresponding to the final suspicious edge set from the poisoned graph to generate a cleaning graph. .

2. The knowledge graph anomaly relationship detection and cleaning method based on robust learning graph intelligence according to claim 1, characterized in that, In step S1, the injection strategies for malicious edges include: random injection, semantic injection, degree target injection, and cross-community injection.

3. The knowledge graph anomaly detection and cleaning method based on robust learning graph intelligence according to claim 1, characterized in that, The edge-level structure features include the number of common neighbors and the Jaccard coefficient; the degree features include the node degree and degree difference of the two ends of the edge; the node embedding similarity features include the TF-IDF and SVD text embedding similarity of the two ends of the edge; and the node attribute consistency features include the industry attribute matching degree and product attribute matching degree of the two ends of the edge.

4. The knowledge graph anomaly detection and cleaning method based on robust learning graph intelligence according to claim 1, characterized in that, The labeled edge samples include injected edges as positive samples and original edges as negative samples, and negative sampling is used to alleviate class imbalance when training the base detector.

5. The knowledge graph anomaly relationship detection and cleaning method based on robust learning graph intelligence according to claim 1, characterized in that, The basic detector uses the LightGBM model, which outputs the suspicion score of each edge and generates the global sorting sequence in descending order of the suspicion scores.

6. The knowledge graph anomaly relationship detection and cleaning method based on robust learning graph intelligence according to claim 1, characterized in that, In step S3, the sliding window statistics include the mean and standard deviation of the suspicion scores within the window, as well as the differences between adjacent windows. The boundary threshold is adaptively determined based on the mean, standard deviation, and differences between adjacent windows.

7. The knowledge graph anomaly detection and cleaning method based on robust learning graph intelligence according to claim 1, characterized in that, In step S4, the tail features include the original edge features, sorting position, sorting percentile, local window statistics, score change magnitude, and structural conflict index; the tail rearranger adopts the LightGBM model and uses the samples in the uncertainty region as the training set.

8. The knowledge graph anomaly detection and cleaning method based on robust learning graph intelligence according to claim 1, characterized in that, In step S5, the edges in the high-risk area are removed first, and then the tail high-risk edges are removed to generate the cleaning map.

9. The knowledge graph anomaly relationship detection and cleaning method based on robust learning graph intelligence according to claim 1, characterized in that, Perform a node classification task or a link prediction task on the cleaned graph, and evaluate the defense effect using at least one of the following: suspicious edge detection precision, suspicious edge detection recall, accuracy, macro F1, AUC, AP, and performance recovery rate; wherein, the performance recovery rate is the ratio of the difference between the performance of the cleaned graph and the performance of the poisoned graph to the difference between the performance of the original clean graph and the performance of the poisoned graph.