A graph classification method based on a weighted signed graph neural network

By using a weighted symbolic graph neural network for graph classification, combining link weights and symbol information, an end-to-end graph classification model is designed. This solves the problem of the ineffective use of link information in existing technologies and achieves high-accuracy graph classification.

CN117235329BActive Publication Date: 2025-12-30TSINGHUA SHENZHEN INTERNATIONAL GRADUATE SCHOOL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311170678.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-12
Publication Date
2025-12-30
Estimated Expiration
2043-09-12

AI Technical Summary

Technical Problem

Existing technologies fail to effectively utilize link symbols and link weights in graph classification, causing node ranking to depend on the magnitude of feature channel values, which affects the quality of network embedding.

Method used

A graph classification method based on weighted symbolic graph neural networks is adopted. By combining the link weights and symbol information between nodes, a graph neural network, node feature ranking layer, convolutional layer, pooling layer, connection layer and classifier are designed and trained end-to-end to obtain high-quality graph embeddings.

Benefits of technology

It improves the prediction accuracy of graph classification, effectively aggregates microbial node attributes and graph structure topological features, and achieves efficient weighted symbolic graph classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117235329B_ABST
    Figure CN117235329B_ABST
Patent Text Reader

Abstract

A kind of graph classification method based on weighted signed graph neural network, aggregation node attribute, graph structure topological feature and link information, for the message passing problem of weighted signed graph and the classification problem of weighted signed graph, the designed graph classification model includes weighted signed graph neural network based on link weight between nodes and link symbol information, node feature ordering layer, convolution layer, pooling layer, fully connected layer and classifier, graph classification model is designed as end-to-end structure, the weight parameter and weight matrix of weighted signed graph neural network, the importance score coefficient of node feature ordering layer, the convolution kernel coefficient matrix of convolution layer, the weight matrix of connecting layer are trained simultaneously, i.e. feature aggregator and node sorter can be trained simultaneously to obtain weighted signed graph whole graph representation feature vector, the prediction accuracy of network weighted signed graph such as microorganism co-occurrence network, protein interaction network, social network is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of graph machine learning and representation learning technology, and in particular to a graph classification method based on a weighted symbolic graph neural network. Background Technology

[0002] Graph embedding aims to learn low-dimensional representations of nodes in a graph, also known as representation learning. The resulting node representations can be applied to downstream data mining tasks within the graph structure. Graph neural networks have achieved excellent results in many machine learning tasks, such as semi-supervised node classification and link prediction. With the advancement of graph machine learning and deep learning technologies, methods using graph neural networks to aggregate neighbor information to learn node embeddings have seen significant development and application. Graphs are a special form of data representation, characterized by their unstructured nature, making them unsuitable for direct processing using convolutional neural networks from the image domain. Currently, the main graph modeling approach is unsigned graphs, where links only represent relationships between nodes. However, some real-world networks are symbolic graph structures, such as social networks, protein-protein interaction networks, and microbial co-occurrence networks. In these symbolic graphs, links are labeled with both positive and negative symbols. Negative and positive links have different semantic information, significantly impacting the quality of network embeddings. Weighted symbolic graphs, building upon symbolic graphs, add weight information to the links between nodes. Because the strength of relationships between nodes varies in real-world networks, capturing these interactions for modeling research can help better explore patterns in graph-structured data.

[0003] In graph classification, existing technologies suffer from several shortcomings: they cannot effectively utilize link symbols and weights within the graph, and when obtaining the overall graph representation features, node ranking relies solely on the numerical values ​​of their feature channels. Graph neural network models are a major method for mining graph-structured data, capable of efficiently aggregating node attribute features; however, their application in weighted symbolic graphs remains limited.

[0004] It should be noted that the information disclosed in the background section above is only for understanding the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The main objective of this invention is to overcome the shortcomings of the aforementioned background technology and provide a graph classification method based on a weighted symbolic graph neural network, thereby improving the accuracy of graph classification prediction.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] A graph classification method based on a weighted symbolic graph neural network includes:

[0008] S1. Obtain a weighted symbol graph, which includes multiple microbial nodes of the network to be predicted and multiple actual weighted links connecting two microbial nodes. The degree of each node is used as its corresponding attribute feature vector to form the initial feature vector of the node in the message passing process of the graph neural network.

[0009] S2. Input the attribute feature vector and node connection information into a preset weighted symbolic graph classification model. After processing by the weighted symbolic graph neural network based on the link weight and link symbol information between nodes, the model consists of a node feature ranking layer, a convolutional layer, a pooling layer, a connection layer, and a classifier. Iteratively output the predicted category of any microbial co-occurrence network to be predicted in the weighted symbolic graph. Analyze the error between the predicted category and the true category of the weighted symbolic graph, and adjust the model parameters of the weighted symbolic graph classification model according to the error until the training termination condition is met.

[0010] S3. Use the trained weighted symbolic graph classification model to classify and predict the co-occurrence network of the target microorganism to be predicted, wherein the target microorganism to be predicted co-occurrence network is one or more microorganism co-occurrence networks in the weighted symbolic graph.

[0011] Furthermore, the network to be predicted is a social network, a microbial co-occurrence network, or a protein-protein interaction network.

[0012] Furthermore, one or more of the following design options may be adopted:

[0013] The convolutional layer is a one-dimensional convolutional layer; the pooling layer is a max pooling layer; the connection layer is a fully connected layer; the classifier is a binary classifier; and an additional one-dimensional convolutional layer is provided between the pooling layer and the connection layer.

[0014] Furthermore, step S2 specifically includes:

[0015] S21. The weighted symbolic graph neural network based on the link weights and link symbol information between nodes in the graph classification model is applied to process the attribute feature vector to obtain the feature representation of each microbial node after message passing;

[0016] S22. The feature representations of each microbial node after each message transmission are sorted and concatenated to form the feature vector matrix of the whole image. This matrix is ​​then applied to the one-dimensional convolutional layer, the node feature sorting layer, the max pooling layer, the fully connected layer, and the binary classifier for processing, and outputs the predicted category of any microbial co-occurrence network.

[0017] Furthermore, step S21 specifically includes:

[0018] S211. Obtain the eigenvector matrix corresponding to the weighted symbolic graph based on the weighted symbolic graph;

[0019] S212. Based on the feature vector matrix, the weighted symbolic graph neural network based on the link weights and link symbol information between nodes is applied to process the feature representation corresponding to each microbial node.

[0020] Furthermore, step S211 specifically includes:

[0021] Obtain the weighted symbol map degree matrix corresponding to the weighted symbol map based on the weighted symbol map;

[0022] Each row of the weighted symbolic graph degree matrix is ​​used as the attribute feature matrix of each corresponding microbial node to obtain the feature vector matrix.

[0023] Furthermore, the weighted symbolic graph neural network based on link weights and link symbol information between nodes is as follows:

[0024]

[0025]

[0026]

[0027] in, This represents the activation function. , , This represents the trainable weight parameters. This indicates a splicing operation. Representing microbial nodes In the The layer's attribute feature vector matrix, Representing microbial nodes In the The feature vector matrix of positive neighbor nodes in layer aggregation. Represents a node In the The negative neighbor node attribute feature vector matrix of layer aggregation. Indicates the first The trainable weight matrix of the layer used for feature transformation. and These represent the normalized microbial nodes. and The positive and negative link weights between them, the initial attribute feature vector of each microbial node is each row of the weighted symbolic graph degree matrix and the number of rows of the weighted symbolic graph degree matrix is ​​equal to the total number of microbial nodes.

[0028] Furthermore, the node feature sorting layer is as follows:

[0029]

[0030]

[0031]

[0032] in, Represents the node topology feature score. Represents the node attribute feature score. The importance score of each node is used as the basis for sorting from largest to smallest. This represents the activation function. The graph adjacency matrix represents the weighted symbolic graph. This represents the initial feature vector matrix of the microbial nodes. This represents a graph neural network. This represents the coefficient that adjusts the topological feature score and the feature score of the node's own attributes.

[0033] Furthermore, step S22 specifically includes:

[0034] Step S221: Based on the feature representation of the microbial node obtained after each message transmission of the weighted symbolic graph neural network, sort and concatenate the multiple feature representations corresponding to each microbial node to obtain the whole graph feature vector matrix of the weighted symbolic graph.

[0035] Step S222: Apply the one-dimensional convolutional layer to perform feature extraction processing on any weighted symbol map based on the integral image feature vector matrix corresponding to each weighted symbol map;

[0036] Step S223: Apply the max pooling layer to perform feature dimensionality reduction based on any of the weighted symbol map feature vector matrices output by the one-dimensional convolutional layer, and output a low-dimensional feature vector matrix of any of the weighted symbol maps;

[0037] Step S224: Apply the fully connected layer to concatenate any low-dimensional feature according to the low-dimensional feature vector matrix corresponding to each weighted symbol map;

[0038] Step S225: Apply the binary classifier to any one of the weighted symbol maps output by the fully connected layer to perform classification prediction, and output the predicted category of any one of the weighted symbol maps.

[0039] Further, in step S2, the following relationship is applied to analyze the error between the predicted category and the actual category of the weighted symbol map:

[0040]

[0041] in, The weighted symbol diagram represents the above. The label was 1 for the case group and 0 for the control group; The weighted symbol diagram represents the above. The probability of being predicted as a case group.

[0042] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method.

[0043] The present invention has the following beneficial effects:

[0044] This invention provides a graph classification method based on a weighted symbolic graph neural network, which can effectively solve the classification problems of networks such as microbial co-occurrence networks. The graph classification method of this invention simultaneously aggregates microbial node attributes, graph structure topology features, and link information. Addressing the message passing problem and weighted symbolic graph classification problem, the designed graph classification model includes a weighted symbolic graph neural network based on link weights and link symbol information between nodes, a node feature ranking layer, convolutional layers, pooling layers, fully connected layers, and a classifier. The graph classification model is designed as an end-to-end structure. The weight parameters and weight matrix of the weighted symbolic graph neural network, the importance score coefficients of the node feature ranking layer, the convolution kernel coefficient matrix of the convolutional layer, and the weight matrix of the connected layer are trained simultaneously. This allows for the simultaneous training of the feature aggregator and the node ranking classifier to obtain the weighted symbolic graph whole-graph representation feature vector, resulting in high prediction accuracy for graph classification.

[0045] This invention designs a novel weighted symbolic graph convolutional neural network and an end-to-end computation framework, which can fully extract latent information from the weighted symbolic graph to obtain higher-quality graph embeddings and apply them to weighted symbolic graph classification prediction. The weighted symbolic graph neural network designed in this invention trains both the feature extractor and the weighted symbolic graph classifier simultaneously in an end-to-end training manner, and has high prediction accuracy for weighted symbolic graphs of microbial co-occurrence networks.

[0046] Other beneficial effects of the embodiments of the present invention will be further described below. Attached Figure Description

[0047] Figure 1 This is a flowchart illustrating an embodiment of the weighted symbolic graph neural network map classification method of the present invention;

[0048] Figure 2 This is a schematic diagram of the process of training a classification model in one embodiment of the present invention;

[0049] Figure 3 This is an internal structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0050] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0051] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" indicate that the element or object preceding the word encompasses the element or object listed following the word and its equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include connections with related functions, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0052] like Figure 1 As shown, this embodiment of the invention provides a graph classification method based on a weighted symbolic graph neural network. Taking a microbial co-occurrence network as an example, the method specifically includes the following steps:

[0053] S1: Obtain the weighted symbolic graph, which includes multiple microbial nodes and multiple actual links connecting two microbial nodes. Each microbial node is associated with a corresponding degree as an attribute feature.

[0054] Specifically, obtaining the weighted symbolic graph requires first acquiring the microbial co-occurrence network dataset. This dataset contains multiple microbial co-occurrence networks, which can be divided into case group networks and control group networks. Each microbial co-occurrence network contains n microbial nodes. The degree of each microbial node is associated with its corresponding attribute feature. The weighted symbolic graph is denoted by G. ,in, Let n be the set of nodes, and n be the total number of microbial nodes. This is a set of links (i.e., a set of edges). This is the link weight set.

[0055] In this embodiment, the microbial co-occurrence network is obtained by applying a correlation inference method based on microbial abundance data. The correlation coefficient truncation threshold is selected by excluding the autocorrelation coefficient of a node and taking the average of the absolute values ​​of the correlation coefficients of all other nodes. The link weight set... The microbial node attribute characteristics are composed of the correlation coefficients corresponding to all links, and are represented solely by the corresponding degree. In other embodiments, the microbial node attribute characteristics may also include other features.

[0056] S2: Input the attribute feature vectors of nodes in the microbial co-occurrence network, the links between nodes, and the link weights into a preset graph classification model. After processing by a weighted symbolic graph neural network based on the link weights and symbol information between nodes, a node feature ranking layer, a one-dimensional convolutional layer, a max pooling layer, a fully connected layer, and a binary classifier in the graph classification model, iteratively output the predicted category of any microbial co-occurrence network in the weighted symbolic graph. Analyze the error between the predicted category and the true category in the weighted symbolic graph, and adjust the model parameters of the weighted symbolic graph classification model according to the error until the training termination condition is met.

[0057] like Figure 2 As shown, in a preferred embodiment, the graph classification model comprises six parts: a weighted symbolic graph neural network, a node feature ranking layer, a one-dimensional convolutional layer, a max pooling layer, a fully connected layer, and a binary classifier. Optionally, a one-dimensional convolutional layer can also be placed between the max pooling layer and the fully connected layer. During the training of the graph classification model, all weighted symbolic graphs are divided into a training set and a test set. First, a network capable of accurately classifying microbial co-occurrence as a case group network or a control group network is trained on the training set. Then, the test set is used to verify the classification performance of the model.

[0058] Specifically, the node attribute feature matrix, the interconnected links between nodes, and the link weight information of the weighted symbolic graph are used as inputs to the graph classification model. Each row of the attribute feature matrix consists of the feature attributes of a microbial node, and the number of rows in the attribute feature matrix is ​​equal to the total number of microbial nodes.

[0059] First, a weighted symbolic graph neural network based on the link weights and symbol information between nodes is applied in the graph classification model to process the attribute feature matrix, the links between nodes, and the link weight information to obtain the embedding vector representation of each microbial node in each microbial co-occurrence network. The weighted symbolic graph neural network is then processed twice by message passing. Then, based on the two sets of embedding vector representations of each microbial node, a node feature sorting layer, a one-dimensional convolutional layer, a max pooling layer, a fully connected layer, and a binary classifier are applied to process the data and output the predicted category of any microbial co-occurrence network.

[0060] In this embodiment, a weighted symbolic graph neural network based on link weights and symbol information between nodes is applied in a graph classification model to process the attribute feature matrix, the links between nodes, and the link weight information to obtain the embedding vector representation corresponding to each microbial node in each microbial co-occurrence network, including:

[0061] Obtain the weighted positive adjacency matrix of the weighted symbolic map based on the weighted symbolic map. Weighted symbolic graph with weighted negative adjacency matrix and weighted symbolic graph degree matrix Then, the weighted symbolic graph degree matrix Each row serves as the initial attribute feature vector for the microbial node.

[0062] Then, based on the weighted sign graph with weighted positive adjacency matrix Weighted symbolic graph with weighted negative adjacency matrix and weighted symbolic graph degree matrix We apply a weighted symbolic graph neural network based on the link weights and symbol information between nodes to obtain a low-dimensional feature representation of each microbial node in the co-occurrence network of each microorganism.

[0063] Specifically, the weighted symbolic graph neural network based on link weights and link symbol information between nodes is as follows:

[0064]

[0065]

[0066]

[0067] in, This represents the activation function. , , This represents the trainable weight parameters. This indicates a splicing operation. Representing microbial nodes In the The layer's attribute feature vector matrix, Representing microbial nodes In the The feature vector matrix of positive neighbor nodes in layer aggregation. Representing microbial nodes In the The negative neighbor node attribute feature vector matrix of layer aggregation. Indicates the first The trainable weight matrix of the layer used for feature transformation. and These represent the normalized microbial nodes. and The positive and negative link weights between them, the initial attribute feature vector of each microbial node is each row of the weighted symbolic graph degree matrix and the number of rows of the weighted symbolic graph degree matrix is ​​equal to the total number of microbial nodes.

[0068] When aggregating the features of surrounding neighbors for microbial nodes, two aggregators are used to extract the features of positive neighbors and negative neighbors respectively. The feature aggregator makes full use of the link weight information between nodes. Then, learnable coefficients are added to the positive neighbor attribute features, negative neighbor attribute features and self attribute features after the microbial node has been aggregated. The three sets of attribute features are concatenated and processed by MLP to obtain a high-quality low-dimensional feature representation of microbial nodes with rich weighted symbol graph information.

[0069] In this embodiment, a node sorting layer is applied based on the low-dimensional feature representation corresponding to each microbial node to obtain a uniform-sized whole-image feature vector representation.

[0070] Specifically, the node feature sorting layer is as follows:

[0071]

[0072]

[0073]

[0074] in, Represents the node topology feature score. Represents the node attribute feature score. The importance score of each node is used as the basis for sorting from largest to smallest. This represents the activation function. The graph adjacency matrix represents the weighted symbolic graph. This represents the initial feature vector matrix of the microbial nodes. This embodiment represents a graph neural network. GraphSAGE is used to extract node topological feature scores, but it is not limited to using GraphSAGE as a type of GNN. This represents the coefficient that adjusts the topological feature score and the feature score of the node's own attributes.

[0075] A two-layer weighted symbolic graph neural network is applied to each microbial co-occurrence network. Each microbial node in the microbial co-occurrence network obtains two sets of low-dimensional feature representations. The two sets of low-dimensional feature representations are concatenated to obtain the final low-dimensional feature representation of the microbial node. A node ranking layer is used to rank the microbial nodes in the microbial co-occurrence network according to their importance scores. The low-dimensional feature representations of the top K nodes are concatenated to obtain the one-dimensional feature vector representation of the entire graph.

[0076] In this embodiment, based on the entire network corresponding to each microbial co-occurrence network... Figure 1The dimensional feature representation is processed using a one-dimensional convolutional layer, a max pooling layer, a fully connected layer, and a binary classifier to output the predicted category of any microbial co-occurrence network. This process includes: extracting the full image features using a one-dimensional convolutional layer based on the one-dimensional feature vector representation corresponding to each microbial co-occurrence network; further reducing the dimensionality of the full image feature vector output by the one-dimensional convolutional layer using a max pooling layer; concatenating the full image features using a fully connected layer using the low-dimensional representation of the full image output by the max pooling layer; and finally, performing classification prediction using a binary classifier on the low-dimensional feature representation of the full image output by the fully connected layer to output the predicted category of any microbial co-occurrence network.

[0077] Specifically, in this embodiment, the graph classification model applies the following relational formula to analyze the error between the predicted category and the actual category of the weighted symbolic graph:

[0078]

[0079] in, The weighted symbol diagram represents the above. The label was 1 for the case group and 0 for the control group; The weighted symbol diagram represents the above. The probability of being predicted as a case group.

[0080] like Figure 2 As shown, during the training of the graph classification model, a weighted symbolic graph neural network is first used to obtain low-dimensional feature representations of each microbial node in the weighted symbolic graph. The weighted symbolic graph neural network is applied twice to each weighted symbolic graph, obtaining a set of low-dimensional feature representations for each microbial node each time. The two sets of feature representations for each microbial node are concatenated to obtain a new feature representation of the microbial node. Then, the output of the weighted symbolic graph neural network is input to the node ranking layer. In the node ranking layer, the importance score of the microbial node is obtained by combining the node's topological structure feature score and its own feature score. The importance scores of all microbial nodes in the microbial co-occurrence network are sorted in descending order, and the feature representations of the top K microbial nodes are selected and concatenated to obtain the complete microbial co-occurrence network. Figure 1 3D feature representation, then, the whole Figure 1The dimensionality reduction (DCR) features are output to a 1D convolutional layer to further extract the full-image features of the microbial co-occurrence network. These new full-image features are then input to a max-pooling layer for further dimensionality reduction, and finally to a fully connected layer and a binary classifier. The binary classifier predicts the output label of the microbial co-occurrence network, with the output label being either "1" or "0," representing the category of the microbial co-occurrence network. "1" indicates the case group network, and "0" indicates the control group network. The model parameters of the graph classification model are adjusted based on the error between the output label and the actual graph category of the weighted symbolic graph. Iterative optimization calculations are performed in the above manner to adjust the model parameters until the training termination condition is met. The training termination condition is generally reaching a preset number of iterations or the error being within an allowable range. The graph classification model parameters include the weight matrix of the weighted symbolic graph neural network, three weight coefficients, the weight matrix of the 1D convolutional layer, and the weight matrix of the fully connected layer. In this embodiment, the weight matrix of the weighted symbolic graph neural network, the three weight coefficients, the weight matrix of the 1D convolutional layer, and the weight matrix of the fully connected layer are trained simultaneously.

[0081] S3: Use the trained graph classification model to perform graph classification prediction on the microbial co-occurrence network to be predicted. The microbial co-occurrence network to be predicted is one or more microbial co-occurrence networks in a weighted symbol graph.

[0082] By using a weighted symbolic graph neural network based on the link weights and symbol information between nodes in a pre-trained graph classification prediction model, the whole graph embedding vector (i.e., the final low-dimensional feature representation) of the weighted symbolic graph can be obtained. The graph classification model of this invention, as an end-to-end graph neural network model, can predict the unknown category of the weighted symbolic graph. During graph classification prediction, the weighted symbolic graph is input into the pre-trained graph classification model. In the pre-trained graph classification model, the node embedding results from the first and second processing by the weighted symbolic graph neural network are concatenated and sorted, and the top K node features are selected. These features are then input into a one-dimensional convolutional layer, a max-pooling layer, another one-dimensional convolutional layer, and a fully connected layer. The output of the fully connected layer is then input into a binary classifier to obtain the graph classification prediction result of the corresponding microbial co-occurrence network.

[0083] Based on this example, a simulation example is provided for microbial co-occurrence network classification.

[0084] Specifically, the method of this embodiment is applied to three colorectal cancer research microbiome relative abundance datasets obtained from the gutMDisorder website: PRJDB4176, PRJEB10878, and PRJNA397219. First, the datasets are preprocessed, retaining only microorganisms appearing in 20% of the samples with a relative abundance > 0.0001. Each dataset is divided into two subsets based on phenotype: a case group and a control group. The same number of samples are drawn from each subset in each step. Then, a correlation inference method (SparCC is chosen in this embodiment, but it is not limited to this method) is used to obtain the case group correlation coefficient matrix and the control group correlation coefficient matrix for each dataset. After removing autocorrelation coefficients, the absolute values ​​of all correlation coefficients are averaged to obtain the microbial co-occurrence network cutoff threshold. Only correlation coefficients with absolute values ​​greater than the cutoff threshold are retained, resulting in the final microbial co-occurrence network, with 500 networks for each of the case and control groups.

[0085] The absolute values ​​of the correlation coefficients between microbial nodes form a link weight matrix, representing the correlation strength. A "+" sign indicates a positive correlation between microbial nodes, while a "-" sign indicates a negative correlation. Because our current understanding of microbial characteristics is limited, this embodiment only uses the degree of microbial nodes as their initial attribute feature. In this simulation example, the graph classification method of this invention is compared with Deep Graph Neural Networks (DGCNN) and the Symbolic Graph Embedding (SNEA) method based on an attention mechanism using AUC and F1 scores. A detailed description of the dataset is shown in Table 1.

[0086] Table 1. Dataset Description

[0087]

[0088] In this simulation experiment, the number of iterations for each method was 100. The output embedding dimension of the two-layer weighted symbolic graph neural network was 32. The kernel size and stride of the first one-dimensional convolutional layer were both 64, and the number of kernels was 16. The kernel size and stride of the second one-dimensional convolutional layer were both 3, and the number of kernels was 32. The kernel size and stride of the max pooling layer were 2, and the number of neurons in the fully connected layer was 128. The node embedding dimension of SNEA and DGCNN was also 32. To achieve fair comparison, the features of all microbial nodes in each microbial co-occurrence network were concatenated and sorted to obtain the whole graph feature representation, and thus a weighted symbolic graph classification model based on the link weight and link symbol information between nodes was obtained.

[0089] In this simulation experiment, the prediction performance of SNEA and DGCNN on the three datasets PRJDB4176, PRJEB10878, and PRJNA397219 is shown in Tables 2-4. AUC (Area Under the Curve) is a model evaluation metric, especially one of the main offline evaluation metrics used in binary classification models. The AUC value is the area enclosed by the ROC curve and the x-axis. The AUC value represents the distance between y=1 and y=0, that is, the larger the AUC, the larger the interval between the two data points, and the higher the classification accuracy. F1 is a metric for classification problems, representing the average of precision and recall. Ours represents the graph classification method of this invention.

[0090] Table 2: Prediction performance results on the PRJDB4176 dataset

[0091]

[0092] Table 3: Prediction performance results on the PRJEB10878 dataset

[0093]

[0094] Table 4: Prediction performance results on the PRJNA397219 dataset

[0095]

[0096] By observing the prediction performance results in Tables 2, 3, and 4, it can be found that the prediction performance of the present invention is significantly better than that of SNEA and DGCNN on the AUC and F1 indices of the three microbial datasets. The method of the present invention achieves high-standard prediction results.

[0097] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, one embodiment of the present invention also provides a computer-readable storage medium, such as a memory, on which a computer program executable by a processor is stored, wherein the processor executes the program to implement the graph classification method based on a weighted symbolic graph neural network as described in any of the above embodiments.

[0098] Figure 3 The diagram shown is a more specific hardware illustration of an electronic device provided in this embodiment. The device may include: a processor 10, a memory 20, an input / output interface 30, a communication interface 40, and a bus 50. The processor 10, memory 20, input / output interface 30, communication interface 40, and bus 50 are internally connected to each other for communication.

[0099] The processor 10 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0100] The memory 20 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 20 can store the operating system and other applications. When the technical solutions provided in the embodiments of the present invention are implemented by software or firmware, the relevant program code is stored in the memory 20 and is called and executed by the processor 10.

[0101] Input / output interface 30 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touch screens, microphones, various sensors, etc., and output devices may include displays, speakers, vibrators, indicator lights, etc.

[0102] The communication interface 40 is used to connect the communication module (not shown in the figure) to enable communication and interaction between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0103] Bus 50 includes a pathway for transmitting information between various components of the device (e.g., processor 10, memory 20, input / output interface 30, and communication interface 40).

[0104] It should be noted that although the above-described device only shows the processor 10, memory 20, input / output interface 30, communication interface 40, and bus 50, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.

[0105] The computer-readable storage medium of this embodiment includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information; the information may be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transfer medium that can be used to store information that can be accessed by computer devices.

[0106] The computer program stored in the computer storage medium of the above embodiments is used to enable the computer to execute the graph classification method based on the weighted symbolic graph neural network as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0107] In summary, the graph classification method and apparatus based on weighted symbolic graph neural networks of the present invention can be used to solve classification problems such as microbial co-occurrence networks. It simultaneously aggregates node attributes, graph structure topology features, and link information. For the message passing problem and weighted symbolic graph classification problem, the designed graph classification model includes six parts: a weighted symbolic graph neural network based on link weights and link symbol information between nodes, a node feature ranking layer, a one-dimensional convolutional layer, a max-pooling layer, a fully connected layer, and a binary classifier. The graph classification model is designed as an end-to-end structure. The weight parameters and weight matrix of the weighted symbolic graph neural network, the importance score coefficients of the node feature ranking layer, the convolution kernel coefficient matrix of the one-dimensional convolutional layer, and the weight matrix of the fully connected layer are trained simultaneously. This allows for the simultaneous training of the feature aggregator and the node ranking classifier to obtain the weighted symbolic graph whole-graph representation feature vector, resulting in high prediction accuracy for graph classification.

[0108] Compared with traditional technologies, the main technical advantages of this invention are:

[0109] 1. To address the poor performance of traditional graph neural networks in classifying weighted symbolic graphs, a weighted symbolic graph classification and prediction method based on link weights and link symbol information between nodes is proposed. Node embedding utilizes both link symbol and weight information.

[0110] 2. This method is based on an end-to-end graph classification neural network structure. By making full use of the semantic information of the weighted symbol graph, it can effectively obtain node embeddings and thus obtain the feature representation of the whole graph.

[0111] 3. Based on the structural features of nodes and the attribute features of nodes themselves, this method can efficiently sort the importance of all nodes in a weighted symbol graph.

[0112] 4. This method has higher accuracy than existing similar methods and is a promising weighted symbolic graph classification prediction method.

[0113] Specific application scenarios include weighted symbolic graph classification and link prediction.

[0114] 1. It can achieve microbial co-occurrence network classification and identify important nodes in the network for screening biomarkers.

[0115] 2. Predict the types and extent of relationships between nodes in a social network.

[0116] 3. Rank the nodes in social networks, biological networks, and protein interaction networks by importance, and obtain the nodes of importance in the network for network mining tasks.

[0117] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of protection of the present invention is limited to these examples; within the framework of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of the present invention as described above, which are not provided in detail for the sake of brevity.

[0118] One or more embodiments of this invention are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this invention. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this invention should be included within the protection scope of this invention.

Claims

1. A method for classifying microbial co-occurrence network graphs based on a weighted signed graph neural network, characterized in that, The method comprises the following steps: S1, obtaining a microbial co-occurrence network dataset, and obtaining a weighted signed graph based on the dataset, wherein the weighted signed graph comprises a plurality of microbial nodes of the microbial co-occurrence network and a plurality of actual weighted links connecting two microbial nodes, the degree of each microbial node is taken as a corresponding attribute feature vector, and the attribute feature vector constitutes an initial feature vector of a node in a message passing process of a graph neural network; the microbial co-occurrence network is obtained by applying a correlation reasoning method to microbial abundance data; S2, inputting the attribute feature vector and node connection information into a preset weighted signed graph classification model, and iteratively outputting a predicted category of any microbial co-occurrence network in the weighted signed graph after processing by a weighted signed graph neural network based on link weights and link symbol information between nodes, a node feature ordering layer, a convolution layer, a pooling layer, a connection layer and a classifier in the weighted signed graph classification model; analyzing an error between the predicted category and an actual category of the weighted signed graph, and adjusting model parameters of the weighted signed graph classification model according to the error until a training end condition is met; S3, classifying and predicting a target microbial co-occurrence network to be predicted by using the trained weighted signed graph classification model, wherein the target network to be predicted is one or more microbial co-occurrence networks in the weighted signed graph.

2. The microbial co-occurrence network graph classification method based on the weighted signed graph neural network according to claim 1, wherein one or more of the following design options are adopted: the convolution layer is a one-dimensional convolution layer; the pooling layer is a maximum pooling layer; the connection layer is a full connection layer; the classifier is a binary classifier; and an additional one-dimensional convolution layer is arranged between the pooling layer and the connection layer. Step S2 specifically comprises:

3. The weighted signed graph neural network-based microbial co-occurrence network graph classification method of claim 2, wherein, S21, processing the attribute feature vector by using the weighted signed graph neural network based on link weights and link symbol information between nodes in the graph classification model, to obtain a feature representation corresponding to each microbial node after message passing; S22, splicing the feature representation corresponding to each microbial node after each message passing to obtain an integral graph feature vector matrix, and applying the integral graph feature vector matrix to the one-dimensional convolution layer, the node feature ordering layer, the maximum pooling layer, the full connection layer and the binary classifier for processing, to output the predicted category of the any microbial co-occurrence network. Step S21 specifically comprises:

4. The weighted signed graph neural network-based microbial co-occurrence network graph classification method of claim 3, wherein, S211, obtaining a feature vector matrix corresponding to the weighted signed graph according to the weighted signed graph; S212, processing the feature vector matrix by using the weighted signed graph neural network based on link weights and link symbol information between nodes, to obtain the feature representation corresponding to each microbial node. Step S211 specifically comprises:

5. The weighted signed graph neural network-based microbial co-occurrence network graph classification method of claim 4, wherein, obtaining a weighted signed graph degree matrix corresponding to the weighted signed graph according to the weighted signed graph; taking each row of the weighted signed graph degree matrix as an attribute feature matrix of a corresponding microbial node, to obtain the feature vector matrix. ​ 6. The weighted signed graph neural network-based microbial co-occurrence network graph classification method of any one of claims 1-2, wherein, The weighted signed graph neural network based on link weight and link sign information between nodes is: ; wherein, denotes an activation function, , , denotes a trainable weight parameter, denotes a concatenation operation, denotes a microbe node In the first layer, the attribute feature vector matrix of the microbe node denotes a microbe node In the first layer, the positive neighbor node attribute feature vector matrix aggregated from the positive neighbor nodes of the microbe node denotes a node In the first layer, the negative neighbor node attribute feature vector matrix aggregated from the negative neighbor nodes of the microbe node denotes the trainable weight matrix for feature transformation in the first layer, and denote the positive and negative link weights between the normalized microbe nodes and respectively, and the initial attribute feature vector of each microbe node is each row of the weighted signed graph degree matrix corresponding to the weighted signed graph degree matrix, and the number of rows of the weighted signed graph degree matrix is equal to the total number of microbe nodes.

7. The weighted signed graph neural network-based microbial co-occurrence network graph classification method of any one of claims 1-2, wherein, The node feature ordering layer is: ; ; ; wherein, denotes a node topology feature score, denotes a node attribute feature score, denotes a node importance score and serves as a basis for ordering from large to small, denotes an activation function, denotes a graph adjacency matrix of the weighted signed graph, denotes an initial feature vector matrix of the microbial nodes, denotes a graph neural network, denotes a coefficient for adjusting the node topology feature score and the attribute feature score of itself.

8. The weighted signed graph neural network-based microbial co-occurrence network graph classification method of claim 3, wherein, Step S22 specifically comprises: Step S221, according to the feature representation of each microorganism node obtained after each message passing of the weighted signed graph neural network, performing ordering and splicing processing on the multiple feature representations corresponding to each microorganism node to obtain an integral graph feature vector matrix of the weighted signed graph; Step S222, applying the one-dimensional convolution layer to each integral graph feature vector matrix corresponding to each weighted signed graph to perform feature extraction processing on any weighted signed graph; Step S223, applying the max-pooling layer to any weighted signed graph feature vector matrix output by the one-dimensional convolution layer to perform feature dimension reduction, and outputting a low-dimensional feature vector matrix of any weighted signed graph; Step S224, applying the fully connected layer to the low-dimensional feature corresponding to each weighted signed graph according to the low-dimensional feature vector matrix corresponding to each weighted signed graph to perform splicing processing on the low-dimensional feature; Step S225, applying the binary classifier to any weighted signed graph output by the fully connected layer to perform classification prediction, and outputting the predicted category of any weighted signed graph.

9. The weighted signed graph neural network-based microbial co-occurrence network graph classification method of any one of claims 1 to 2, wherein, In step S1, the microorganism co-occurrence network dataset comprises multiple microorganism co-occurrence networks, which are divided into case group networks and control group networks. In step S2, the error between the predicted category and the actual category of the weighted signed graph is analyzed by using the following relationship: ; wherein, represents the weighted sign pattern of the label, case group is 1, control group is 0; represents the weighted sign pattern predicted as the case group.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the microorganism co-occurrence network graph classification method in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Self-encoding neural network-based symbol diagram node classification method

    CN108345901A

  • Microorganism high-order network establishment method based on hypergraph clustering model and device thereof

    CN113345514A