Graph neural network method, device and apparatus for maintaining similarity transformation invariance

Through feature transformation network extraction and message passing network update node representation, combined with the processing of the result output network, the problem of graph neural network being unable to maintain the invariance of similar transformation of graph data is solved, and the processing effect and accuracy are improved.

CN114239802BActive Publication Date: 2024-09-13TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111516838.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2024-09-13
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

Existing graph neural networks cannot effectively maintain the invariance of similar transformations of graph data, resulting in poor processing results.

Method used

Extract the initial node representation in the graph data through the feature transformation network, update the representation combined with the message passing network, and use the result output network to perform calculations based on the task type to ensure the invariance of the graph data under similar transformations such as rotation, translation, and scaling.

Benefits of technology

It improves the accuracy and robustness of graph neural network in processing graph data and ensures the consistency of the effect under similar transformation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114239802B
    Figure CN114239802B
Patent Text Reader

Abstract

The embodiments of the present application relate to the field of data processing technology, and specifically to a graph neural network method, device and equipment that maintains similarity transformation invariance. The purpose is to maintain the similarity transformation invariance of graph data when the graph neural network processes graph data, and improve the processing effect of the graph neural network on the graph data. The method includes: receiving graph data, extracting features of the graph data through a feature transformation network, obtaining an initial node representation of each node in the graph data, and transmitting the initial node representation to a message passing network; updating the initial node representation through the message passing network to obtain a final node representation corresponding to each node in the graph data, and transmitting the final node representation to a result output network; through the result output network, in combination with the current task type, calculating the final node representation to obtain a graph data processing result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing technology, and more specifically, to a graph neural network method, apparatus, and device that maintains similarity transformation invariance. Background Art

[0002] Graph Neural Network is a type of neural network algorithm that has developed rapidly in recent years. It is widely used in scenarios that analyze various types of graph data, such as social networks, e-commerce, protein networks, computer vision, knowledge graphs, graph combination optimization and other tasks. Most graph data itself has similarity transformation invariance. Similarity transformation invariance means that in Euclidean space, after translating, rotating, reflecting, scaling and any combination of objects, the shape of the object remains unchanged. Ensuring the similarity transformation invariance of graph data plays a vital role in ensuring the effectiveness of graph neural networks in performing various tasks.

[0003] Existing graph neural networks cannot maintain the invariance of similarity transformations of graph data when processing graph data. Summary of the invention

[0004] The embodiments of the present application provide a graph neural network method, apparatus, and device for maintaining similarity transformation invariance, aiming to maintain the similarity transformation invariance of graph data when the graph neural network processes graph data, thereby improving the processing effect of the graph neural network on graph data.

[0005] A first aspect of an embodiment of the present application provides a graph neural network method that maintains similarity transformation invariance, the method comprising:

[0006] Receiving graph data, performing feature extraction on the graph data through a feature transformation network to obtain an initial node representation of each node in the graph data, and transmitting the initial node representation to a message passing network;

[0007] The initial node representation is updated through the message passing network to obtain a final node representation corresponding to each node in the graph data, and the final node representation is transmitted to a result output network;

[0008] The final node representation is calculated through the result output network in combination with the current task type to obtain the graph data processing result.

[0009] Optionally, feature extraction is performed on the graph data through a feature transformation network to obtain an initial node representation of each node in the graph data, including:

[0010] Calculating the Euclidean distance between each node in the graph data;

[0011] Calculate the normalized similarity matrix of the nodes according to the Euclidean distance;

[0012] Calculating the eigenvectors and eigenvalues ​​of the normalized similarity matrix;

[0013] The product of the eigenvector and the eigenvalue is calculated, and normalized according to the maximum eigenvalue to obtain an initial node representation of each node in the graph data.

[0014] Optionally, updating the initial node representation through the message passing network to obtain a final node representation corresponding to each node in the graph data includes:

[0015] Performing a message passing mechanism on the initial node representation once through each message passing neural network layer in the message passing network;

[0016] When all message passing neural network layers have completed executing the message passing mechanism, the final node representation corresponding to each node in the graph data is obtained.

[0017] Optionally, executing a message passing mechanism once on the initial node representation through each message passing neural network layer in the message passing network comprises:

[0018] The information between the initial node and its neighboring nodes is exchanged to update the representation of the initial node.

[0019] Optionally, the task types include node type tasks and graph type tasks.

[0020] Optionally, when the task type is a node type task, the method includes:

[0021] The final node representation corresponding to each node is input into the node discriminator to obtain the graph data processing result.

[0022] Optionally, when the task type is a graph type task, the method includes:

[0023] Inputting the final node representation corresponding to each node into the node aggregator to obtain the representation of the graph data;

[0024] The representation of the graph data is input into a graph discriminator to obtain the graph data processing result.

[0025] A second aspect of an embodiment of the present application provides a graph neural network device that maintains similarity transformation invariance, the device comprising:

[0026] A feature extraction module is used to receive graph data, perform feature extraction on the graph data through a feature transformation network, obtain an initial node representation of each node in the graph data, and transmit the initial node representation to a message passing network;

[0027] A representation updating module, used for updating the initial node representation through the message passing network, obtaining a final node representation corresponding to each node in the graph data, and transmitting the final node representation to a result output network;

[0028] The result output module is used to calculate the final node representation through the result output network in combination with the current task type to obtain the graph data processing result.

[0029] Optionally, the feature extraction module includes:

[0030] A first calculation submodule, used to calculate the Euclidean distance between each node in the graph data;

[0031] A second calculation submodule, used for calculating a normalized similarity matrix of nodes according to the Euclidean distance;

[0032] A third calculation submodule, used to calculate the eigenvectors and eigenvalues ​​of the normalized similarity matrix;

[0033] The fourth calculation submodule is used to calculate the product of the eigenvector and the eigenvalue, normalize according to the maximum eigenvalue, and obtain the initial node representation of each node in the graph data.

[0034] Optionally, the representation updating module includes:

[0035] A message passing submodule, configured to execute a message passing mechanism on the initial node representation once through each message passing neural network layer in the message passing network;

[0036] The representation acquisition submodule is used to obtain the final node representation corresponding to each node in the graph data after all message passing neural network layers have completed executing the message passing mechanism.

[0037] Optionally, the message transmission submodule includes:

[0038] The information exchange submodule is used to exchange information between the initial node and its neighboring nodes, and update the representation of the initial node.

[0039] Optionally, the task types include node type tasks and graph type tasks.

[0040] Optionally, when the task type is a node type task, the result output module includes:

[0041] The node discrimination submodule is used to input the final node representation corresponding to each node into the node discriminator to obtain the graph data processing result.

[0042] Optionally, when the task type is a graph type task, the result output module includes:

[0043] A node aggregation submodule, used for inputting the final node representation corresponding to each node into a node aggregator to obtain the representation of the graph data;

[0044] The graph discriminant submodule is used to input the representation of the graph data into the graph discriminator to obtain the graph data processing result.

[0045] A third aspect of an embodiment of the present application provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the method described in the first aspect of the present application are implemented.

[0046] A fourth aspect of an embodiment of the present application provides an electronic device, including 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, the steps of the method described in the first aspect of the present application are implemented.

[0047] The graph neural network method for maintaining similarity transformation invariance provided by the present application is adopted to receive graph data, extract features of the graph data through a feature transformation network, obtain the initial node representation of each node in the graph data, and transmit the initial node representation to a message passing network; update the initial node representation through the message passing network to obtain the final node representation corresponding to each node in the graph data, and transmit the final node representation to a result output network; calculate the final node representation through the result output network in combination with the current task type to obtain the graph data processing result. In the present application, the initial node representation of each node in the graph data is first obtained by using a feature transformation network, and then the information in each initial node representation is exchanged through a message passing network, the representation of each node is updated, and finally, according to the representation of each node, the current task is combined to calculate and output the graph data processing result. When processing the graph data, the invariance of similarity transformations such as rotation, translation, and scaling of the node data is strictly guaranteed, which improves the effect of the entire graph neural network when performing tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0049] Figure 1 This is a flowchart of a graph neural network method for maintaining similarity transformation invariance proposed in one embodiment of the present application;

[0050] Figure 2 This is a schematic diagram of a graph neural network device that maintains similarity transformation invariance proposed in one embodiment of the present application. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0052] The embodiment of the present invention is implemented based on a graph neural network that maintains similarity transformation invariance. The neural network mainly includes three parts: a feature transformation network, a message passing network, and a result output network.

[0053] refer to Figure 1 , Figure 1 1 is a flowchart of a graph neural network method for maintaining similarity transformation invariance proposed in one embodiment of the present application. Figure 1 As shown, the method comprises the following steps:

[0054] S11: receiving graph data, performing feature extraction on the graph data through a feature transformation network, obtaining an initial node representation of each node in the graph data, and transmitting the initial node representation to a message passing network.

[0055] In this embodiment, graph data is a type of data consisting of nodes and edges. Nodes represent objects and contain various related information of the objects. Edges between nodes represent the connections between objects. The feature transformation network is a part of the graph neural network, which is used to extract features from the input graph data and obtain the initial node representation of the nodes in the graph data. The specific steps are:

[0056] S11-1: Calculate the Euclidean distance between each node in the graph data.

[0057] S11-2: Calculate a normalized similarity matrix of the nodes according to the Euclidean distance.

[0058] S11-3: Calculate the eigenvectors and eigenvalues ​​of the normalized similarity matrix.

[0059] S11-4: Calculate the product of the eigenvector and the eigenvalue, normalize according to the maximum eigenvalue, and obtain an initial node representation of each node in the graph data.

[0060] In this embodiment, the above calculation steps are an improved multi-dimensional calibration algorithm, and the above calculation steps of the algorithm are executed to obtain the initial node representation of each node in the graph data.

[0061] In this embodiment, the feature transformation network processes the graph data through the above algorithm to obtain the initial node representation that maintains the invariance of similarity transformation. That is, any similarity transformation is performed on the input graph data, such as rotation, scaling, translation and other similarity transformations, and the initial node representation output by the feature transformation network remains unchanged.

[0062] For example, the graph data may be a social network relationship graph, where a node represents each person, and the edges between nodes represent the relationship between the people. The social network relationship graph is input into the graph neural network, and the feature transformation network in the graph neural network uses the above algorithm to calculate the nodes in the social network relationship graph to obtain the initial node representation of each node in each graph.

[0063] In this embodiment, the initial node representation of each node is extracted through the feature transformation network, ensuring the similarity transformation invariance of each node in the graph data.

[0064] S12: updating the initial node representation through the message passing network to obtain a final node representation corresponding to each node in the graph data, and transmitting the final node representation to a result output network.

[0065] In this embodiment, the message passing network includes several layers of message passing graph neural network layers, each of which executes a message passing mechanism. After several layers of message passing graph neural network layers have executed the message passing mechanism once, each node obtains the corresponding final node representation. The specific steps are:

[0066] S12-1: Execute a message passing mechanism on the initial node representation once through each message passing neural network layer in the message passing network.

[0067] In this embodiment, the message passing mechanism is to pass messages between each node, and each node can exchange information with its neighbor nodes and update its own representation. The specific steps are:

[0068] S12-1-1: Exchange information between the initial node and its neighboring nodes to update the representation of the initial node.

[0069] S12-2: When all message passing neural network layers have completed executing the message passing mechanism, a final node representation corresponding to each node in the graph data is obtained.

[0070] In this embodiment, the feature transformation network extracts the initial node representation of each node in the graph data, while in the message passing neural network, based on the neighbor nodes of each node, that is, the features of multiple adjacent nodes of each node in the graph data, the information between nodes is exchanged and the representation of each node is updated to obtain the final node representation corresponding to each node.

[0071] In this embodiment, each node transmits a message vector to its neighbor nodes according to the node representation, where the neighbor nodes of each node v refer to the set of all nodes connected to the node v in the graph data. Each node receives the message vectors transmitted by all neighbor nodes, aggregates the message vectors through the aggregation function, and obtains an aggregated message vector. Each node updates its node representation through its own node representation and the obtained aggregated message vector. The exchange of information between nodes can better characterize and utilize the structural information in the graph data, where the structural information refers to the information contained in the edges between nodes.

[0072] For example, the input graph data is a social network relationship graph. After obtaining the representation of each node in the graph, it is transmitted to the message passing network. The message passing network executes the message passing mechanism to update the node information in the social network graph and obtain the final node representation corresponding to each node. In the credit investigation problem of social networks, the initial node representation can only use the characteristics of each node (such as age, gender, location, etc.) to judge the credit level of the object corresponding to the node. After a layer of message passing neural network processing (i.e., one information exchange), the information of all neighboring nodes (i.e., the nodes corresponding to all friends of the object corresponding to the node) can be used to help judge. After two layers of message passing, the information of neighboring nodes of all neighboring nodes can be used for judgment. After multiple message passing, i.e., after processing by multiple layers of message passing neural networks, a comprehensive evaluation of the object corresponding to the node can be made, which is more accurate.

[0073] S13: The final node representation is calculated through the result output network in combination with the current task type to obtain a graph data processing result.

[0074] In this embodiment, when the graph neural network performs different tasks, the result output network will calculate the final node representation according to the type of task and the goal of the task to obtain the result of graph data processing.

[0075] In this embodiment, the types of tasks include node type tasks and graph type tasks. Node type tasks are tasks for each node in the graph data and require the representation of the node. Graph type tasks are tasks for the entire graph data and require the representation of the entire graph data based on the representation of each node in order to execute the corresponding task.

[0076] For example, a node-type task may be a node classification, a node regression, a node prediction task, etc. A graph-type task may be a graph classification, a graph regression task, etc.

[0077] In another embodiment of the present application, when the task type is a node type task, the method includes:

[0078] S21: Input the final node representation corresponding to each node into the node discriminator to obtain the graph data processing result.

[0079] In this embodiment, the node discriminator is a fully connected network, which receives the final node representation corresponding to each node and outputs the discriminant result, and is used to judge the type of the node and give the result.

[0080] When the type of task performed by the graph neural network is a node type task, a node discriminator is used to discriminate the final node representation of each node in the graph data, obtain the discrimination result, and then output the final graph data processing result.

[0081] For example, when the graph neural network performs a node classification task, the graph data is a personnel relationship graph of a company, each node represents an employee, and the task to be performed is to classify the gender of the employees. The graph data is input into the graph neural network, and the feature transformation network of the graph neural network first obtains the initial representation of each node, and then updates the features of the node through the message passing network to obtain the final representation corresponding to each node. After that, the final representation corresponding to each node is input into the node discriminator, and the node discriminator discriminates the final representation of the node to obtain the processing result, that is, whether the employee corresponding to the node is male or female.

[0082] In another embodiment of the present application, when the task type is a graph type task, the method includes:

[0083] S31: Input the final node representation corresponding to each node into the node aggregator to obtain the representation of the graph data.

[0084] S32: Input the representation of the graph data into the graph discriminator to obtain the graph data processing result.

[0085] In this embodiment, the node aggregator is an aggregation function, which is used to fuse the representations of each node to obtain the representation of the entire graph data. The graph discriminator is a fully connected network that receives the representation of the graph data and outputs the discrimination result.

[0086] When the task type is a graph type task, it is necessary to judge the representation of the entire graph data. Therefore, it is necessary to input the features of multiple nodes into the node aggregation to obtain the representation of the graph data, and then obtain the graph data processing result based on the representation of the graph data.

[0087] For example, a molecular graph is input into the graph neural network. The nodes in the graph represent each atom in the molecule, and the edges between the nodes represent the chemical bonds between the atoms. The task to be performed is to identify whether the molecule is toxic. First, the initial node representation of each node in the molecular graph data is extracted through the feature transformation network, and then the representation of each node is updated through the message passing network to obtain the final representation corresponding to each node. The final representation corresponding to each node is input into the node aggregator to obtain the representation of the entire graph data. For example, if a toxic functional group is found in the molecule, the representation of the entire graph obtained by the node aggregator is then used. The graph discriminator is used to discriminate that the molecule represented by the graph is toxic, and the final output result is that the molecular graph is toxic.

[0088] In this embodiment, the initial node representation of each node in the graph data is extracted through the feature transformation network of the graph neural network. Regardless of any similarity transformation such as translation, scaling, rotation, etc. of the graph data, the initial node representation extracted by the feature transformation network is the same, that is, the representation extracted from the graph data will not change due to the similarity transformation of the graph data. The node representation is then updated through the message passing network to obtain the final representation of each node, and finally the result of the graph data processing is output according to the specific task. Since the invariance of the similarity transformation of the graph data is guaranteed, the effect and robustness of the entire algorithm are guaranteed, and the accuracy of the graph neural network in performing various tasks is improved.

[0089] In another embodiment of the present application, the present invention is further described in combination with a specific scenario:

[0090] Scenario 1: 3D point cloud data analysis.

[0091] In this embodiment, three-dimensional point cloud data refers to a group of vector combinations in a three-dimensional coordinate system. Each vector has a three-dimensional coordinate and is generally used to represent the outer surface shape of an object. Three-dimensional point cloud data is often used in surveying and mapping, virtual reality / augmented reality, computer-aided design and other scenarios.

[0092] For example, in an object recognition task, a three-dimensional point cloud image of a vehicle is collected by a three-dimensional point cloud data acquisition device, and the point cloud image is translated, rotated and other operations are performed and then input into the graph neural network. The feature transformation network in the graph neural network extracts features from the point cloud image that has undergone translation, rotation and other operations to obtain an initial representation of each node, and then exchanges information between nodes through a message passing network to obtain a final node representation. In order to identify the object, the final representation of the node is input into the node aggregator to obtain a representation of the entire graph data, which is then input into the graph discriminator to identify the object as a car.

[0093] During the processing, the algorithm used by the entire graph neural network can strictly guarantee the invariance of similar transformations such as rotation, translation, and scaling of three-dimensional point cloud data, ensuring the effectiveness and robustness of the entire algorithm and improving the accuracy of object recognition by the entire network.

[0094] Scenario 2: Graph combinatorial optimization problem.

[0095] In this embodiment, the graph combinatorial optimization problem is to plan the path between nodes according to the positional relationship between nodes in the graph data. For example, the traveling salesman problem and the capacity-constrained vehicle routing problem have wide applications in logistics, vehicle scheduling, operations research and other issues.

[0096] For example, when a deliveryman receives multiple orders, he needs to plan a route to find the best route and save the deliveryman's delivery time. The graph data consisting of multiple delivery addresses and roads is input into the graph neural network. First, the initial node representation of each node is extracted through the feature transformation network, which contains the address information of each node, the time required for delivery, etc., and then the representation of each node is updated through the message passing network. The updated final node representation may include the relationship between each delivery address and other delivery addresses and road conditions. Since an overall route planning is to be done, the final node representation is input into the node aggregator to obtain the representation of the entire graph data, and the representation of the entire graph data is input into the graph discriminator, which outputs the best path planning.

[0097] During the processing, the graph neural network can strictly guarantee the invariance of similar transformations such as data rotation, translation, and scaling in graph combinatorial optimization problems, thereby improving the effect and robustness of the entire algorithm and the accuracy of the entire graph neural network for route planning.

[0098] Scenario 3: Molecular modeling and analysis.

[0099] Molecular modeling and analysis is an important interdisciplinary field among computer science, chemistry and biology. Molecular modeling and analysis is to use computers to model the structure of molecules and analyze their internal structures.

[0100] For example, when using a graph neural network to analyze molecular modeling, each atom in the molecule is taken as a feature point, and the three-dimensional graph structure of the molecule is input. The feature transformation network is used to extract features from the molecular graph data to obtain the initial node representation of each node. Each initial node representation is then updated through a message passing network to obtain the final node representation. Thereafter, according to the content that needs to be analyzed, the final node representation is calculated through the result output network to obtain the processing result.

[0101] During the processing process, graph neural networks can strictly guarantee the invariance of similar transformations such as rotation, translation, and scaling of molecular data, thereby improving the effectiveness and robustness of the entire algorithm and improving the accuracy of the entire network for molecular modeling and analysis.

[0102] Based on the same inventive concept, an embodiment of the present application provides a graph neural network device that maintains similarity transformation invariance. Figure 2 , Figure 2 is a schematic diagram of a graph neural network device 200 that maintains similarity transformation invariance according to an embodiment of the present application. Figure 2 As shown, the device comprises:

[0103] A feature extraction module 201 is used to receive graph data, perform feature extraction on the graph data through a feature transformation network, obtain an initial node representation of each node in the graph data, and transmit the initial node representation to a message passing network;

[0104] A representation updating module 202 is used to update the initial node representation through the message passing network to obtain a final node representation corresponding to each node in the graph data, and transmit the final node representation to a result output network;

[0105] The result output module 203 is used to calculate the final node representation through the result output network in combination with the current task type to obtain the graph data processing result.

[0106] Optionally, the feature extraction module includes:

[0107] A first calculation submodule, used to calculate the Euclidean distance between each node in the graph data;

[0108] A second calculation submodule, used for calculating a normalized similarity matrix of nodes according to the Euclidean distance;

[0109] A third calculation submodule, used to calculate the eigenvectors and eigenvalues ​​of the normalized similarity matrix;

[0110] The fourth calculation submodule is used to calculate the product of the eigenvector and the eigenvalue, normalize according to the maximum eigenvalue, and obtain the initial node representation of each node in the graph data.

[0111] Optionally, the representation updating module includes:

[0112] A message passing submodule, configured to execute a message passing mechanism on the initial node representation once through each message passing neural network layer in the message passing network;

[0113] The representation acquisition submodule is used to obtain the final node representation corresponding to each node in the graph data after all message passing neural network layers have completed executing the message passing mechanism.

[0114] Optionally, the message transmission submodule includes:

[0115] The information exchange submodule is used to exchange information between the initial node and its neighboring nodes, and update the representation of the initial node.

[0116] Optionally, the task types include node type tasks and graph type tasks.

[0117] Optionally, when the task type is a node type task, the result output module includes:

[0118] The node discrimination submodule is used to input the final node representation corresponding to each node into the node discriminator to obtain the graph data processing result.

[0119] Optionally, when the task type is a graph type task, the result output module includes:

[0120] A node aggregation submodule, used for inputting the final node representation corresponding to each node into a node aggregator to obtain the representation of the graph data;

[0121] The graph discriminant submodule is used to input the representation of the graph data into the graph discriminator to obtain the graph data processing result.

[0122] Based on the same inventive concept, another embodiment of the present application provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the graph neural network method for maintaining similarity transformation invariance as described in any of the above embodiments of the present application are implemented.

[0123] Based on the same inventive concept, another embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executed, implements the steps of the graph neural network method for maintaining similarity transformation invariance as described in any of the above embodiments of the present application.

[0124] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0125] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0126] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0127] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0128] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0129] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1The steps for the functions specified in one or more boxes.

[0130] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present application.

[0131] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0132] The above is a detailed introduction to the graph neural network method, device and equipment for maintaining similarity transformation invariance provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A graph neural network method that maintains similarity transformation invariance, characterized in that: The method comprises: Receiving graph data, the graph data being a molecular graph, wherein a node represents each atom in a molecule, and an edge between nodes represents a chemical bond between atoms, performing feature extraction on the graph data through a feature transformation network, obtaining an initial node representation of each node in the graph data, and transmitting the initial node representation to a message passing network, including: Calculating the Euclidean distance between each node in the graph data; Calculate the normalized similarity matrix of the nodes according to the Euclidean distance; Calculating the eigenvectors and eigenvalues ​​of the normalized similarity matrix; Calculate the product of the eigenvector and the eigenvalue, normalize according to the maximum eigenvalue, and obtain an initial node representation of each node in the graph data; The initial node representation is updated through the message passing network to obtain a final node representation corresponding to each node in the graph data, and the final node representation is transmitted to the result output network, including: Executing a message passing mechanism on the initial node representation through each message passing neural network layer in the message passing network, including: Exchanging information between the initial node and its neighboring nodes to update the representation of the initial node; When all message passing neural network layers have completed executing the message passing mechanism, a final node representation corresponding to each node in the graph data is obtained; The final node representation is calculated through the result output network in combination with the current task type to obtain a processing result of whether the molecule is toxic.

2. The method according to claim 1, characterized in that The task types include node type tasks and graph type tasks.

3. The method according to claim 2, characterized in that When the task type is a node type task, the method includes: The final node representation corresponding to each node is input into the node discriminator to obtain the graph data processing result.

4. The method according to claim 2, characterized in that: When the task type is a graph type task, the method includes: Inputting the final node representation corresponding to each node into the node aggregator to obtain the representation of the graph data; The representation of the graph data is input into a graph discriminator to obtain the graph data processing result.

5. A graph neural network device that maintains similarity transformation invariance, characterized in that: The device comprises: A feature extraction module is used to receive graph data, where the graph data is a molecular graph, a node represents each atom in a molecule, and an edge between nodes represents a chemical bond between atoms. Feature extraction is performed on the graph data through a feature transformation network to obtain an initial node representation of each node in the graph data, and the initial node representation is transmitted to a message passing network, including: Calculating the Euclidean distance between each node in the graph data; Calculate the normalized similarity matrix of the nodes according to the Euclidean distance; Calculating the eigenvectors and eigenvalues ​​of the normalized similarity matrix; Calculate the product of the eigenvector and the eigenvalue, normalize according to the maximum eigenvalue, and obtain an initial node representation of each node in the graph data; A representation updating module, used to update the initial node representation through the message passing network, obtain a final node representation corresponding to each node in the graph data, and transmit the final node representation to a result output network, including: Executing a message passing mechanism on the initial node representation through each message passing neural network layer in the message passing network, including: Exchanging information between the initial node and its neighboring nodes to update the representation of the initial node; When all message passing neural network layers have completed executing the message passing mechanism, a final node representation corresponding to each node in the graph data is obtained; The result output module is used to calculate the final node representation through the result output network in combination with the current task type to obtain a processing result of whether the molecule is toxic.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.