Graph structure imbalance data processing method and device, equipment and medium

By generating virtual center nodes mixed with a few class nodes, and combining information propagation and distance perception adjustment mechanisms, the decision-making boundaries of graph neural networks are optimized, and the overfitting and classification accuracy of graph neural networks under class imbalance data is solved, and the recognition effect of a few class nodes is improved.

CN120451624APending Publication Date: 2025-08-08XINJIANG TECH INST OF PHYSICS & CHEM CHINESE ACAD OF SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510449530.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

When processing class imbalanced graph data, the model generalization ability of graph neural networks decreases, overfits, and has low classification accuracy and reliability, especially in the identification and classification of a few class nodes.

Method used

By generating virtual center nodes and mixed with a few types of nodes, the information dissemination mechanism is used to extract higher-order node information, and the distance-aware adjustment mechanism is used to optimize decision boundaries and adjust decision boundaries between categories.

Benefits of technology

It enhances the representation ability of a few class nodes, optimizes the decision boundaries between categories, and improves the node classification accuracy and robustness of the model in class imbalance scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451624A_ABST
    Figure CN120451624A_ABST
Patent Text Reader

Abstract

The invention provides a graph structure imbalance data processing method and device, equipment and a medium, and the method comprises the steps: obtaining a graph data set corresponding to a graph, processing the graph data set, and constructing a first data set and a second data set with class imbalance, the first data set comprising minority class nodes and majority class nodes with determined class distribution; based on the minority class nodes in the first data set, a spectral clustering algorithm is adopted to generate a virtual center node, and the virtual center node and the minority class nodes are mixed to generate a synthetic node; an information propagation mechanism is adopted to perform feature propagation on the synthetic nodes, high-order node information is extracted, and a distance perception adjustment mechanism is adopted to adjust decision boundaries among different categories; and based on the high-order node information and the adjusted decision boundary, calculating the probability of the category to which each second node in the second data set belongs, and obtaining a classification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of information technology or data mining, and in particular to a method, device, equipment and medium for processing graph structure imbalanced data. Background Art

[0002] Graph Neural Networks (GNNs), a graph data analysis method, have achieved remarkable results in recent years in tasks such as node and graph classification. Node classification, a core application of GNNs, aims to predict the category of each node based on its feature information and the topological structure between nodes. However, in many practical applications, graph data often suffers from class imbalance, where the number of nodes in some categories is far smaller than that of nodes in other categories. This is especially true in long-tail data, where minority class nodes often make up a small proportion. This results in majority class nodes dominating the model training process, thus affecting the recognition and classification of minority class nodes. Summary of the Invention

[0003] (1) Technical issues to be resolved

[0004] In view of the above problems, the present disclosure provides a method, device, equipment and medium for processing graph structure imbalanced data to at least partially solve technical problems such as decreased model generalization ability, overfitting, and low classification accuracy and reliability due to the inability of sample data to accurately reflect the distribution of actual data.

[0005] (2) Technical solution

[0006] On the one hand, the present disclosure provides a method for processing data with an imbalanced graph structure, including: obtaining a graph dataset corresponding to a graph, and processing the graph dataset to construct a first dataset and a second dataset with class imbalance, wherein the first dataset contains minority class nodes and majority class nodes with a determined class distribution; based on the minority class nodes in the first dataset, using a spectral clustering algorithm to generate a virtual central node, and mixing the virtual central node with the minority class nodes to generate a synthetic node; using an information propagation mechanism to propagate features on the synthetic node, extracting high-order node information, and using a distance-aware adjustment mechanism to adjust the decision boundary between different categories; based on the high-order node information and the adjusted decision boundary, calculating the probability of each second node in the second dataset to which it belongs, to obtain a classification result.

[0007] According to an embodiment of the present disclosure, the generation of a virtual central node based on the minority class nodes in the first data set using a spectral clustering algorithm includes: obtaining a Laplace matrix corresponding to the graph, and performing eigendecomposition on the Laplace matrix to obtain eigenvalues and corresponding eigenvectors; selecting K eigenvectors with minimum eigenvalues, and forming a new feature space with the K eigenvectors, where K is a preset number of clusters; and clustering the feature space to generate the virtual central node.

[0008] According to an embodiment of the present disclosure, the mixing of the virtual center node and the minority class node to generate a synthetic node includes: based on a pre-set mixing coefficient, weighted mixing of the virtual center node and the minority class node, and adding Gaussian noise to generate the synthetic node.

[0009] According to an embodiment of the present disclosure, the information propagation mechanism is used to perform feature propagation on the synthetic nodes, and the high-order node information is extracted, including: extracting the initial feature information of the synthetic nodes; using the information propagation mechanism to propagate the initial feature information between the synthetic nodes through a graph neural network to obtain the high-order node information of the synthetic nodes.

[0010] According to an embodiment of the present disclosure, the use of a distance-aware adjustment mechanism to adjust the decision boundary between different categories includes: calculating the connection relationship between the synthetic nodes, constructing an adjacency matrix, and determining the intra-class similarity and inter-class separation based on the distribution of neighbor nodes in the adjacency matrix; based on the intra-class similarity and the inter-class separation, calculating the similarity measure between different categories, and adjusting the decision boundary according to the similarity measure.

[0011] According to an embodiment of the present disclosure, determining the intra-class similarity and inter-class separation based on the distribution of neighbor nodes in the adjacency matrix includes: calculating the distribution matching degree between each neighbor node and the category to which it belongs based on the distribution of neighbor nodes in the adjacency matrix, and maximizing the distribution matching degree between neighbor nodes in the same category to determine the intra-class similarity; calculating the distance between each neighbor node and neighbor nodes of other categories based on the distribution of neighbor nodes in the adjacency matrix, and maximizing the distance between neighbor nodes of different categories to determine the inter-class separation.

[0012] According to an embodiment of the present disclosure, the method further includes: performing cluster analysis on the first nodes in the first data set using a spectral clustering algorithm to identify a potential distribution pattern among the first nodes; and determining minority nodes and majority nodes among the first nodes based on the potential distribution pattern.

[0013] A second aspect of the present disclosure provides a data processing device for graph structure imbalance, comprising: a construction module for obtaining a graph dataset corresponding to a graph, and processing the graph dataset to construct a first dataset and a second dataset with class imbalance, wherein the first dataset contains minority class nodes and majority class nodes with determined class distribution; a synthesis module for generating a virtual central node based on the minority class nodes in the first dataset using a spectral clustering algorithm, and mixing the virtual central node with the minority class nodes to generate a synthetic node; a propagation and adjustment module for performing feature propagation on the synthetic node using an information propagation mechanism, extracting high-order node information, and adjusting the decision boundary between different categories using a distance-aware adjustment mechanism; and a classification module for calculating the probability of each second node in the second dataset belonging to a category based on the high-order node information and the adjusted decision boundary to obtain a classification result.

[0014] The third aspect of the present disclosure provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, each step in the method for processing graph structure imbalanced data is implemented.

[0015] A fourth aspect of the present disclosure provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the computer program implements the various steps in the method for processing graph structure imbalanced data.

[0016] (3) Beneficial effects

[0017] The graph structure imbalance data processing method, device, equipment and medium provided by the present disclosure enhance the representation ability of minority class nodes by introducing virtual central nodes, and optimize the decision boundary between categories by combining the information propagation mechanism and the distance perception adjustment mechanism, thereby avoiding overfitting and fuzzy decision boundaries while maintaining classification accuracy, enabling the model to more accurately model node classification tasks in class imbalance scenarios, effectively improving the classification effect of minority class nodes, and optimizing the robustness of the model's overall classification tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] For a more complete understanding of the present disclosure and its advantages, reference will now be made to the following description taken in conjunction with the accompanying drawings, in which:

[0019] Figure 1 The flowchart of the method for processing graph structure imbalanced data provided by an embodiment of the present disclosure is schematically shown;

[0020] Figure 2 A flowchart schematically illustrates the mixing of virtual central nodes and minority class nodes provided by an embodiment of the present disclosure;

[0021] Figure 3 A flowchart of adjusting the decision boundary by the distance-aware adjustment mechanism provided by an embodiment of the present disclosure is schematically shown;

[0022] Figure 4 The following schematically shows a structural block diagram of a device for processing graph structure imbalance data provided by an embodiment of the present disclosure;

[0023] Figure 5 The figure schematically shows a hardware structure diagram of an electronic device. DETAILED DESCRIPTION

[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0026] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0027] The accompanying drawings show some block diagrams and / or flow charts. It should be understood that some blocks in the block diagrams and / or flow charts, or combinations thereof, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when these instructions are executed by the processor, they can create a device for implementing the functions / operations described in the block diagrams and / or flow charts.

[0028] The inventors have discovered that, in related technologies, GNNs can process and analyze complex graph data by capturing the relationships between nodes and graph structure information. Consequently, they have been widely used in a variety of fields, including social network analysis, knowledge graph construction, recommendation systems, and IoT data processing. However, in many practical applications, graph data often suffers from class imbalance, which is particularly prominent in scenarios such as social networks, recommendation systems, and malicious behavior detection. For example, in social networks, the number of ordinary users far exceeds that of malicious users or users with little influence, causing the model to be biased towards majority class nodes, thereby affecting the identification and classification of minority class nodes.

[0029] Most current methods balance class distributions through oversampling or undersampling, but these methods often fail to fully enhance the representation of minority class nodes. This is especially true for graph-structured data, where the generated synthetic samples may not accurately reflect the distribution of the actual data, leading to a decrease in the model's generalization ability and even overfitting. Furthermore, many methods focus too much on enhancing the representation of minority class nodes while neglecting to optimize the decision boundary between classes. This can be especially true when there is similarity or label overlap between nodes, making the decision boundary unclear, thus affecting the model's classification accuracy and reliability. While some methods optimize the decision boundary by adjusting the loss function or introducing auxiliary information, these methods often fail to fully consider the graph's topological structure, making it difficult to achieve ideal inter-class distinction in complex graph data.

[0030] Therefore, in order to solve the problems existing in the above-mentioned class-imbalanced node classification method, the embodiment of the present disclosure provides a graph structure imbalanced data processing method based on virtual center node mixing and distance-aware adjustment, which can be applied to technical fields such as graph neural networks and data imbalance.

[0031] like Figure 1 As shown, the flowchart of the method for processing graph structure imbalanced data includes S1 to S4.

[0032] In operation S1, a graph dataset corresponding to a graph is obtained, and the graph dataset is processed to construct a first dataset and a second dataset with class imbalance, wherein the first dataset contains minority class nodes and majority class nodes with determined class distribution.

[0033] A graph dataset is obtained and processed to construct a class-imbalanced node classification dataset. Specifically, the dataset partitioning unit divides the entire dataset into a training set, a validation set, and a test set. The training set constitutes the first dataset, while the validation and test sets constitute the second dataset. During the training, validation, and testing phases, multiple distinct class-imbalanced node classification tasks are constructed, each consisting of a training node (i.e., the first node), a validation node, and a test node (i.e., the second node). The nodes in the training, validation, and test sets are drawn from the same graph. During training, the model has access to the entire graph's structural information, including all nodes and edges. Edges between nodes can represent similarities, associations, or spatial relationships between images. Furthermore, the nodes in each subset represent different classes. Furthermore, to ensure the effectiveness of the class-imbalanced node classification task, the class distributions in the training, validation, and test sets can be adjusted according to the long-tail distribution rule.

[0034] It's important to note that during the training phase based on the first dataset (i.e., the training set), the model is exposed to labeled data (including majority and minority class samples) and builds a classifier by learning these labels. However, during the prediction phase, the model receives unlabeled nodes, meaning it doesn't know whether the node belongs to the majority or minority class, and needs to predict the class.

[0035] In operation S2, a spectral clustering algorithm is used to generate a virtual central node based on the minority class nodes in the first data set, and the virtual central node is mixed with the minority class nodes to generate a synthetic node.

[0036] Using the aforementioned training set, we generate virtual center nodes through a spectral clustering algorithm. These nodes are then mixed with minority class nodes to create synthetic nodes. This enhances the representation of minority class nodes, making their distribution more balanced in the feature space and improving their classification. This also expands the minority class sample space and enhances the model's ability to learn about minority classes.

[0037] In operation S3, an information propagation mechanism is used to perform feature propagation on the synthesized nodes to extract high-order node information, and a distance-aware adjustment mechanism is used to adjust the decision boundaries between different categories.

[0038] By using an information propagation mechanism, the generated synthetic nodes are trained and feature propagated through a graph neural network framework to further extract node features (i.e., high-order node information). At the same time, by building a distance-aware adjustment mechanism, the inter-class decision boundary is optimized to improve classification performance.

[0039] In operation S4, based on the high-order node information and the adjusted decision boundary, the probability of each second node in the second data set belonging to a category is calculated to obtain a classification result.

[0040] The extracted node features and the adjusted and optimized decision boundary are used to perform classification tasks and calculate the probability of each second node in the second data set belonging to a category. For example, the distance between each node and different categories can be calculated, and the target category with the shortest distance is selected as the final classification result.

[0041] It can be understood that generating virtual center nodes and mixing them with minority class nodes to generate new nodes enhances the representation ability of minority class samples. At the same time, introducing a distance-aware adjustment mechanism to maximize the inter-class distance and minimize the intra-class distance, optimize the decision boundary between classes, thereby improving the classification performance, effectively adapting to the class imbalance node classification task, and improving the classification accuracy of minority class nodes.

[0042] Based on the above embodiment, in this embodiment, the generation of a virtual central node based on the minority class nodes in the first data set using a spectral clustering algorithm includes: obtaining a Laplacian matrix corresponding to the graph, and performing eigendecomposition on the Laplacian matrix to obtain eigenvalues and corresponding eigenvectors; selecting K eigenvectors with minimum eigenvalues, and forming a new feature space with the K eigenvectors, where K is a preset number of clusters; and clustering the feature space to generate the virtual central node.

[0043] Specifically, when performing spectral clustering on a graph dataset, the Laplacian matrix L corresponding to the graph is first obtained. The Laplacian matrix L is calculated from the graph's degree matrix D and adjacency matrix A, i.e., L = D – A. Next, the graph's Laplacian matrix is subjected to eigendecomposition to obtain the eigenvalues and corresponding eigenvectors. The k eigenvectors with the smallest eigenvalues are then selected and arranged column-wise into a matrix, with each row corresponding to a node and each column corresponding to an eigenvector value, to form a new feature space for the graph. The representation of each node in this k-dimensional space is its projection onto these eigenvectors. Furthermore, using the vector of each node in the k-dimensional space as input, the k-means clustering algorithm can be used to cluster them into k clusters, with the center of each cluster being the virtual center node.

[0044] It can be understood that the virtual center node represents the feature information of the majority class and is used to enhance the representation of the minority class nodes.

[0045] Furthermore, the mixing of the virtual center node and the minority class node to generate a synthetic node includes: based on a pre-set mixing coefficient, performing weighted mixing of the virtual center node and the minority class node, and adding Gaussian noise to generate the synthetic node.

[0046] In the process of mixing the virtual center node with the minority class nodes to generate new synthetic node features, the mixing coefficient is set to control the feature ratio between the virtual center node and the minority class nodes, and Gaussian noise is added to increase the diversity of the synthetic nodes, thereby generating more representative minority class node features.

[0047] Figure 2 A flowchart of mixing a virtual central node with minority class nodes provided by an embodiment of the present disclosure is schematically shown, and the method includes S21-S23.

[0048] In operation S21 , a spectral clustering algorithm is used to perform cluster analysis on the nodes in the training set to identify potential distribution patterns of minority class nodes.

[0049] Specifically, a spectral clustering algorithm is used to perform cluster analysis on the first nodes in the first dataset to identify the underlying distribution pattern among the first nodes. Based on the underlying distribution pattern, the minority class nodes and the majority class nodes in the first nodes are determined. During this process, the clustering results can be compared with the true labels, or a semi-supervised method can be used to incorporate information about known labels into the clustering process.

[0050] In operation S22 , based on the result of spectral clustering, a virtual central node is generated and mixed with the minority class nodes to enhance the feature representation of the minority class nodes.

[0051] In operation S23 , the features of the virtual center node and the minority class node are fused through a weighted strategy, and Gaussian noise is introduced, so that the generated synthetic node can cover the minority class sample space more widely.

[0052] For example, we first apply the spectral clustering algorithm to the nodes in the training set. The spectral clustering algorithm first calculates the Laplacian matrix of the graph:

[0053] L = D–A

[0054] Where D is the degree matrix and A is the adjacency matrix. Then calculate the eigenvector of the matrix and select the k eigenvectors corresponding to the minimum eigenvalue , thus constructing a new feature space:

[0055] Y=XU

[0056] In this feature space, k-means clustering is used to classify the nodes and calculate the center of each cluster:

[0057]

[0058] Among them, V j represents all nodes of the jth cluster, C jAs the virtual center node of the cluster. Then, in the virtual center node mixing stage, the characteristics of the virtual center node are used to enhance the representation ability of the minority class nodes. Specifically, the synthetic node is generated by weighted fusion:

[0059]

[0060] in, is the feature of the virtual center node, x m is the feature of the minority class node, a is the mixing coefficient that controls the ratio of the two. is a Gaussian noise term used to increase the diversity of the synthesis nodes.

[0061] In some embodiments, the generation method of virtual center nodes can be optimized based on the distribution characteristics of the dataset. For example, hierarchical clustering or the DBSCAN algorithm can be used instead of k-means clustering to make the virtual center nodes more closely match the distribution of minority class nodes. Furthermore, during the synthesis process, contrastive learning techniques can be used to optimize the generated features to make them more discriminative.

[0062] It can be understood that by introducing virtual central nodes and feature mixing strategies, the representation ability of minority class nodes is enhanced, making minority class samples more evenly distributed in the feature space, thereby effectively alleviating the class imbalance problem and improving the classification performance of the model on imbalanced data sets.

[0063] Furthermore, the information propagation mechanism is used to propagate features of the synthetic nodes, and the extraction of high-order node information includes: extracting the initial feature information of the synthetic nodes; and using the information propagation mechanism to propagate the initial feature information between the synthetic nodes through a graph neural network to obtain high-order node information of the synthetic nodes.

[0064] For example, for image features, a graph neural network can be used to extract features from synthetic nodes to obtain initial feature information derived from the content of the image itself, such as visual features such as color, texture, shape, and edges. Then, an information propagation mechanism can be used. Through the convolution operation or attention mechanism of the graph neural network, each node can aggregate the image feature information of its neighboring nodes and update its own feature representation. By iteratively propagating and aggregating image feature information between nodes, high-order representations of nodes in the graph can be learned. These high-order representations contain not only the initial image feature information of the node, but also the image feature information of its neighboring nodes and information about other related nodes in the graph. After multiple rounds of image feature information propagation and aggregation, each node can obtain a high-order image feature representation, that is, high-order node information.

[0065] It is understandable that the information propagation mechanism propagates feature information between nodes through graph neural networks, which can further optimize the node classification results.

[0066] Based on the above embodiment, in this embodiment, the use of a distance-aware adjustment mechanism to adjust the decision boundary between different categories includes: calculating the connection relationship between the synthetic nodes, constructing an adjacency matrix, and determining the intra-class similarity and inter-class separation based on the distribution of neighbor nodes in the adjacency matrix; based on the intra-class similarity and the inter-class separation, calculating the similarity measure between different categories, and adjusting the decision boundary according to the similarity measure.

[0067] The distance-aware adjustment mechanism calculates the adjacency matrix between nodes and determines intra-class similarity and inter-class separation. This increases the relative distance between classes while minimizing the distance within the class. This adjusts the relative positions of nodes, optimizing intra-class cohesion and inter-class divergence to improve classification performance. Specifically, this mechanism adjusts the similarity measure between nodes based on the distribution of neighboring nodes, thereby enhancing the model's ability to identify minority class nodes and avoiding excessive overlap between classes.

[0068] Furthermore, classification performance can be further optimized by adjusting the output results. During this process, similarity metrics between categories and the similarity of neighbor node distributions can be calculated and fed back into the model output. Specifically, by adjusting the weighted combination of the loss function, node classification accuracy during training can be further optimized to adaptively adjust the nodes in each category, making the model more adaptable to categories with long-tail distributions.

[0069] Furthermore, determining the intra-class similarity and inter-class separation based on the distribution of neighbor nodes in the adjacency matrix includes: calculating the distribution matching degree between each neighbor node and the category to which it belongs based on the distribution of neighbor nodes in the adjacency matrix, and maximizing the distribution matching degree between neighbor nodes in the same category to determine the intra-class similarity; calculating the distance between each neighbor node and neighbor nodes of other categories based on the distribution of neighbor nodes in the adjacency matrix, and maximizing the distance between neighbor nodes of different categories to determine the inter-class separation.

[0070] By calculating the distribution match between each node and its category, we optimize the similarity of nodes within a class and improve intra-class consistency. Specifically, we calculate the relative position of node features within the intra-class distribution and optimize the intra-class representation by maximizing the distribution match between the node and similar nodes. This improves the cohesion of nodes within the class, bringing nodes of the same category closer together and thus enhancing the classification ability of nodes.

[0071] By calculating the distance between a node and nodes of other categories and maximizing the distance between nodes in different categories, the separation of the decision boundary between classes is optimized, making nodes of different categories more separated. Specifically, the similarity between the distribution of a node and the distribution of other classes can be evaluated. JS divergence and cosine similarity can be used to dynamically adjust the decision boundary between classes, enhance the distinction between classes, and improve the model's ability to identify nodes of minority classes, thereby improving classification accuracy.

[0072] Figure 3 A flowchart of adjusting the decision boundary by the distance-aware adjustment mechanism provided by an embodiment of the present disclosure is schematically shown. The method includes steps S31-S33.

[0073] In operation S31 , the connection relationship between the synthesized nodes is calculated, an adjacency matrix is constructed, and initial features of the nodes are extracted based on the neighbor node information (distribution) of the adjacency matrix.

[0074] In operation S32 , the intra-class similarity and inter-class separation are calculated, the node feature distribution is optimized, and the intra-class cohesion and inter-class divergence are adjusted.

[0075] In operation S33 , the JS divergence is used to calculate the similarity measure between the categories, and the decision boundary is adjusted to make the different categories more separated in the feature space.

[0076] For example, first calculate the connection relationship between nodes and construct an adjacency matrix A, whose elements A ij Represents the connection between node i and node j. Based on this adjacency matrix, the feature propagation of the nodes is calculated:

[0077]

[0078] in, represents the node features of the lth layer, W is the trainable transformation matrix, is a non-linear activation function.

[0079] Then, in the intra-class similarity optimization phase, the feature distribution within each class is calculated and the similarity between nodes of the same class is maximized. Specifically, for all nodes x belonging to class c, i , calculate its intra-class similarity:

[0080]

[0081] Among them, N c represents all nodes in category c, is the cosine similarity, which indicates the similarity of the features of two nodes.

[0082] In the inter-class separation optimization phase, the feature distribution between different categories is calculated and the distance between different categories is maximized. To this end, JS divergence can be introduced as a measure of inter-class separation:

[0083]

[0084] Among them, P and Q are the feature distributions of two categories, M is their average distribution, and D KL is the KL divergence.

[0085] In some embodiments, adversarial training strategies can be combined to further optimize the decision boundary by increasing the relative distance between samples of a specific class. Furthermore, a weighted loss function can be used for minority class nodes in imbalanced datasets to give them greater influence in the optimization process.

[0086] It's understandable that by building a mechanism for intra-class cohesion and inter-class divergence, the model can more accurately adjust the decision boundary, improving classification performance under imbalanced data. Furthermore, by calculating a similarity metric between classes, the distinction between different classes in the feature space is optimized, effectively alleviating the class imbalance problem and improving the classification accuracy of minority classes.

[0087] The graph structure imbalanced data processing method for class imbalanced node classification provided by the embodiment of the present disclosure first obtains a graph data set and constructs a virtual center node through a spectral clustering method to represent the feature information of the majority class. Then, the virtual center node is weightedly mixed with the minority class nodes to generate new synthetic node features. The generated synthetic nodes are then trained through a graph neural network to optimize the node feature representation. A distance-aware adjustment mechanism is further introduced to maximize the distance between nodes between classes and minimize the distance between nodes of the same type to optimize the decision boundary. Finally, the embodiment of the present disclosure optimizes the separability between categories by calculating the distance between each node and the target category, thereby improving the accuracy of node classification. This method makes full use of the knowledge transfer of the majority class, avoids the performance degradation caused by the class imbalance problem, and improves the classification accuracy of minority class nodes.

[0088] Figure 4 The structural block diagram of the graph structure imbalance data processing device provided by an embodiment of the present disclosure is schematically shown.

[0089] like Figure 4 As shown, the graph structure imbalance data processing device 400 of this embodiment includes a construction module 401, a synthesis module 402, a propagation and adjustment module 403 and a classification module 404.

[0090] The construction module 401 is used to obtain a graph dataset corresponding to the graph and process the graph dataset to construct a first dataset and a second dataset with class imbalance, wherein the first dataset contains minority class nodes and majority class nodes with determined class distribution.

[0091] The synthesis module 402 is configured to generate a virtual central node based on the minority class nodes in the first data set by using a spectral clustering algorithm, and to mix the virtual central node with the minority class nodes to generate a synthesized node.

[0092] The propagation and adjustment module 403 is used to adopt an information propagation mechanism to perform feature propagation on the synthetic nodes, extract high-order node information, and adopt a distance-aware adjustment mechanism to adjust the decision boundaries between different categories.

[0093] The classification module 404 is configured to calculate the probability of each second node in the second data set belonging to a category based on the high-order node information and the adjusted decision boundary, and obtain a classification result.

[0094] It is understood that construction module 401, synthesis module 402, propagation and conditioning module 403, and classification module 404 can be implemented in a single module, or any of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in a single module. According to embodiments of the present disclosure, at least one of construction module 401, synthesis module 402, propagation and conditioning module 403, and classification module 404 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented in hardware or firmware using any other reasonable method of circuit integration or packaging, or can be implemented using a suitable combination of software, hardware, and firmware. Alternatively, at least one of construction module 401, synthesis module 402, propagation and conditioning module 403, and classification module 404 can be at least partially implemented as a computer program module that, when executed by a computer, performs the functionality of the corresponding module.

[0095] Figure 5 The figure schematically shows a hardware structure diagram of an electronic device provided by an embodiment of the present disclosure.

[0096] like Figure 5 As shown, the electronic device described in this embodiment includes: the electronic device 500 includes a processor 510 and a computer readable storage medium 520. The electronic device 500 can execute the above reference Figure 2 Describes the method to detect specific operations.

[0097] Specifically, the processor 510 may include, for example, a general-purpose microprocessor, an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 510 may also include an onboard memory for cache purposes. The processor 510 may be a processor for executing reference Figure 2 The described method flow according to the embodiments of the present disclosure may be performed by a single processing unit or multiple processing units for different actions.

[0098] Computer-readable storage medium 520 can be, for example, any medium capable of containing, storing, conveying, propagating, or transmitting instructions. For example, computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, components, or propagation media. Specific examples of computer-readable storage media include: magnetic storage devices, such as magnetic tape or hard disk drives (HDDs); optical storage devices, such as compact discs (CD-ROMs); memory, such as random access memory (RAM) or flash memory; and / or wired or wireless communication links.

[0099] The computer readable storage medium 520 may include a computer program 521 that may include code / computer executable instructions that, when executed by the processor 510, cause the processor 510 to perform, for example, the above-mentioned combination of Figure 2 The described method sequence and any variations thereof.

[0100] The computer program 521 may be configured to have computer program code, for example, including computer program modules. For example, in an exemplary embodiment, the code in the computer program 521 may include one or more program modules, for example, 521A, 521B, etc. It should be noted that the division method and number of modules are not fixed, and those skilled in the art may use appropriate program modules or combinations of program modules according to actual circumstances. When these program module combinations are executed by the processor 510, the processor 510 may execute, for example, the above combination of Figure 2~Figure 3 The described method sequence and any variations thereof.

[0101] According to an embodiment of the present disclosure, at least one of the construction module 401, the synthesis module 402, the propagation and adjustment module 403, and the classification module 404 can be implemented as a reference. Figure 5 The computer program modules described above, when executed by the processor 510, can implement the corresponding operations described above.

[0102] The present disclosure also provides a computer-readable medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.

[0103] Those skilled in the art will appreciate that the features described in the various embodiments of the present disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in the present disclosure. In particular, the features described in the various embodiments of the present disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of the present disclosure. All such combinations and / or couplings fall within the scope of the present disclosure.

[0104] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present disclosure. It should be understood that the above are only specific embodiments of the present disclosure and are not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A method for processing graph structure imbalanced data, characterized in that: include: Obtain a graph dataset corresponding to the graph, and process the graph dataset to construct a first dataset and a second dataset with class imbalance, wherein the first dataset includes minority class nodes and majority class nodes with determined class distribution; Based on the minority class nodes in the first data set, a spectral clustering algorithm is used to generate a virtual central node, and the virtual central node is mixed with the minority class nodes to generate a synthetic node; An information propagation mechanism is used to propagate features of the synthesized nodes, extract high-order node information, and a distance-aware adjustment mechanism is used to adjust the decision boundaries between different categories. Based on the high-order node information and the adjusted decision boundary, the probability of each second node in the second data set belonging to a category is calculated to obtain a classification result.

2. The method according to claim 1, characterized in that The generating of a virtual central node by using a spectral clustering algorithm based on the minority class nodes in the first data set includes: Obtaining a Laplace matrix corresponding to the graph, and performing eigendecomposition on the Laplace matrix to obtain eigenvalues and corresponding eigenvectors; Select K eigenvectors with the smallest eigenvalues, and combine the K eigenvectors into a new feature space, where K is a preset number of clusters; The feature space is clustered to generate the virtual central node.

3. The method according to claim 1, characterized in that The mixing of the virtual central node and the minority class node to generate a synthetic node includes: Based on a preset mixing coefficient, the virtual center node and the minority class node are weighted mixed, and Gaussian noise is added to generate the synthetic node.

4. The method according to claim 1, wherein The adopting of the information propagation mechanism to perform feature propagation on the synthesized node and extracting high-order node information includes: Extracting initial feature information of the synthetic node; An information propagation mechanism is adopted to propagate the initial feature information between the synthetic nodes through a graph neural network to obtain high-order node information of the synthetic nodes.

5. The method according to claim 1, wherein The distance-aware adjustment mechanism is used to adjust the decision boundaries between different categories, including: Calculating the connection relationship between the synthesized nodes, constructing an adjacency matrix, and determining the intra-class similarity and inter-class separation based on the distribution of neighbor nodes in the adjacency matrix; Based on the intra-class similarity and the inter-class separation, a similarity metric between different classes is calculated, and the decision boundary is adjusted according to the similarity metric.

6. The method according to claim 5, characterized in that Determining the intra-class similarity and inter-class separation according to the distribution of neighbor nodes in the adjacency matrix includes: Based on the distribution of neighbor nodes in the adjacency matrix, calculating the distribution matching degree between each neighbor node and the category to which it belongs, and maximizing the distribution matching degree between neighbor nodes in the same category to determine the intra-category similarity; Based on the distribution of neighbor nodes in the adjacency matrix, the distance between each neighbor node and neighbor nodes of other categories is calculated, and the distance between neighbor nodes of different categories is maximized to determine the inter-class separation degree.

7. The method according to claim 1, characterized in that The method further comprises: performing a cluster analysis on the first nodes in the first data set using a spectral clustering algorithm to identify a potential distribution pattern among the first nodes; Based on the potential distribution pattern, minority nodes and majority nodes in the first nodes are determined.

8. A graph structure imbalance data processing device, characterized in that: include: A construction module is configured to obtain a graph dataset corresponding to the graph and process the graph dataset to construct a first dataset and a second dataset with class imbalance, wherein the first dataset includes minority class nodes and majority class nodes with determined class distribution; a synthesis module, configured to generate a virtual central node based on the minority class nodes in the first data set by using a spectral clustering algorithm, and to mix the virtual central node with the minority class nodes to generate a synthesized node; a propagation and adjustment module, configured to use an information propagation mechanism to propagate features of the synthesized nodes, extract high-order node information, and use a distance-aware adjustment mechanism to adjust the decision boundaries between different categories; A classification module is used to calculate the probability of each second node in the second data set belonging to a category based on the high-order node information and the adjusted decision boundary to obtain a classification result.

9. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, each step of the method for processing graph structure imbalanced data according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method for processing graph structure imbalanced data according to any one of claims 1 to 7 is implemented.