Drug analysis method, model training method and device, storage medium and equipment
By using graph wavelet harmonic graph convolutional neural networks in the graph spectral domain, the problems of global information loss and excessive parameter complexity in GAT in drug analysis are solved, and more accurate node representation and data classification are achieved.
Patent Information
- Application Number
- CN202111314495.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-08
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2041-11-08
AI Technical Summary
Currently, graph attention mechanism networks (GAT) suffer from global information loss and excessive parameter complexity in drug analysis, resulting in inaccurate node representation and affecting classification performance.
We use graph wavelets in the graph spectral domain as the spectral basis, learn signal weights at different frequencies through a Harmony-GCN convolutional neural network, and accelerate computation by using Chebyshev polynomial approximation to reduce parameter complexity and capture local and global information.
It improves the accuracy of node characterization of drug molecules, enhances the accuracy of data classification, reduces the parameter complexity of graph neural networks, and improves the ability to process large-scale molecular graphs.
Smart Images

Figure CN114334035B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technology, specifically to a drug analysis method, a model training method, an apparatus, a storage medium, and a device. Background Technology
[0002] The use of Graph Neural Networks (GNNs) to extend representation learning on graph-structured data has demonstrated great success in various fields, including drug screening, protein analysis, and knowledge graph completion. Among these applications, GNNs are particularly noteworthy in drug analysis. In drug analysis, determining the chemical and biological properties of compounds / proteins, such as toxicity, solubility, and carcinogenicity, based on their structures is a crucial task. This type of task can be modeled as a classification problem in machine learning. Specifically, compounds / proteins can be modeled using a graph data structure, and then their structural formulas can be transformed into vectors in Euclidean space through representation learning. Classical machine learning algorithms can then be used to classify these vectors and determine their chemical and biological properties. Therefore, improving the performance of graph-based classification is of significant practical importance in the field of drug analysis.
[0003] A major representative technique in graph neural networks is the Graph Attention Network (GAT). GAT is a spatial domain-based graph neural network that aims to learn the weights between nodes by using an attention mechanism, starting from the node's own representation, through a neural network composed of neural encoding and decoding functions. This ability to learn graph representations has led to significant progress in various practical applications, especially in drug analysis, compared to previous research. However, current GAT applications suffer from problems such as global information loss and excessive parameter complexity. Summary of the Invention
[0004] This application provides a drug analysis method, model training method, apparatus, storage medium, and device that can effectively utilize global information in graph structure data, reduce the parameter complexity of graph neural networks, improve the accuracy of representation learning, and enhance the accuracy of data classification.
[0005] In a first aspect, a drug analysis method is provided, the method comprising: determining a target map based on the molecular structure of a drug molecule to be tested; calculating graph wavelets corresponding to different frequency bands in the target map based on the target map; calculating node representations of the target map based on the graph wavelets corresponding to different frequency bands in the target map; and analyzing the node representations of the target map using a trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested, wherein the trained drug analysis model is obtained by training on training sample data with physicochemical property labels.
[0006] Secondly, a method for training a drug analysis model is provided. The method includes: acquiring training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and physicochemical property labels of each sample drug molecule; determining a sample molecular graph based on the molecular structure of the sample drug molecule; calculating graph wavelets corresponding to different frequency bands in the sample molecular graph based on the sample molecular graph; calculating node representations of the sample molecular graph based on the graph wavelets corresponding to different frequency bands in the sample molecular graph; and training model parameters of a drug analysis model based on the node representations of the sample molecular graph and the physicochemical property labels of each sample drug molecule to obtain a trained drug analysis model.
[0007] Thirdly, a drug analysis device is provided, the device comprising: a first determining unit for determining a target map based on the molecular structure of a drug molecule to be tested; a first calculating unit for calculating graph wavelets corresponding to different frequency bands in the target map based on the target map; a second calculating unit for calculating node representations of the target map based on the graph wavelets corresponding to the different frequency bands; and an analysis unit for analyzing the node representations of the target map according to a trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested, wherein the trained drug analysis model is trained based on training sample data with physicochemical property labels.
[0008] Fourthly, a drug analysis model training device is provided, characterized in that the device comprises: an acquisition unit for acquiring training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and a physicochemical property label for each of the at least one sample drug molecule; a second determination unit for determining a sample molecular graph based on the molecular structure of the sample drug molecule; a third calculation unit for calculating graph wavelets corresponding to different frequency bands in the sample molecular graph based on the sample molecular graph; a fourth calculation unit for calculating node representations of the sample molecular graph based on the graph wavelets corresponding to different frequency bands in the sample molecular graph; and a training unit for training model parameters of a drug analysis model based on the node representations of the sample molecular graph and the physicochemical property labels of each sample drug molecule, to obtain a trained drug analysis model.
[0009] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program adapted for loading by a processor to perform steps in the drug analysis method or the drug analysis model training method as described in any of the above embodiments.
[0010] Sixthly, a computer device is provided, the computer device including a processor and a memory, the memory storing a computer program, the processor executing steps in the drug analysis method or the drug analysis model training method as described in any of the above embodiments by calling the computer program stored in the memory.
[0011] In a seventh aspect, a computer program product is provided, including computer instructions that, when executed by a processor, implement the steps in the drug analysis method or the drug analysis model training method as described in any of the above embodiments.
[0012] This application embodiment determines a target map based on the molecular structure of the drug molecule to be tested; based on the target map, it calculates graph wavelets corresponding to different frequency bands in the target map, where graph wavelets are used to capture the node information of the molecule; it processes the graph wavelets corresponding to different frequency bands in the target map according to a trained drug analysis model to obtain the node representation of the target map, where the trained drug analysis model is trained based on training sample data with physicochemical property labels; and it analyzes the node representation of the target map according to the trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested. This application embodiment can use graph wavelets in the graph spectral domain as a spectral basis to learn harmonic graph convolutional neural networks with different weights for signals of different frequencies, thereby obtaining a trained drug analysis model. It can effectively capture node information of different frequency bands based on graph wavelets. This node information contains more local information (such as information within node clusters) and global information (such as information between node clusters). Then, it can calculate the node representation of the target graph of the drug molecule to be tested with higher accuracy based on the graph wavelets. Then, it can analyze the node representation of the target graph of the drug molecule to be tested through the trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested. It can effectively utilize the global information in the graph structure data, reduce the parameter complexity of the graph neural network, improve the accuracy of representation learning, and classify the physicochemical properties of the drug based on the node representation of the target graph, thereby improving the accuracy of data classification. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a schematic diagram of a graph structure provided for an embodiment of the application.
[0015] Figure 2 A schematic diagram illustrating the application scenario of the drug analysis model provided in the application embodiments.
[0016] Figure 3 This is a schematic flowchart of the drug analysis method provided in the embodiments of this application.
[0017] Figure 4 This is a schematic diagram of an example molecular structure provided in an embodiment of this application.
[0018] Figure 5 This is a flowchart illustrating the drug analysis model training method provided in the embodiments of this application.
[0019] Figure 6This is a schematic diagram of the structure of the drug analysis device provided in the embodiments of this application.
[0020] Figure 7 This is a schematic diagram of the structure of the drug analysis model training device provided in the embodiments of this application.
[0021] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] This application provides a drug analysis method, apparatus, computer device, and storage medium. Specifically, the drug analysis method of this application can be executed by a computer device, which can be a terminal or server, etc. This application can be applied to scenarios such as artificial intelligence, machine learning, graph neural networks, and drug analysis.
[0024] First, some of the nouns or terms that appear in the description of the embodiments of this application are explained as follows:
[0025] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0026] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0027] Deep Learning (DL) is a branch of machine learning that attempts to perform high-level abstractions of data using multiple processing layers with complex structures or multiple nonlinear transformations. Deep learning learns the inherent patterns and hierarchical representations of training sample data; the information gained during this learning process greatly aids in interpreting data such as text, images, and sound. The ultimate goal of deep learning is to enable machines to possess analytical and learning capabilities similar to humans, capable of recognizing data such as text, images, and sound. Deep learning is a complex machine learning algorithm, and its performance in speech and image recognition far surpasses previous related technologies.
[0028] Neural Network (NN): A deep learning model in the fields of machine learning and cognitive science that mimics the structure and function of biological neural networks.
[0029] Graph Neural Networks (GNNs) are a type of neural network that operates directly on graph structures, primarily processing data with non-Euclidean spatial structures (graph structures). They ignore the input order of nodes; during computation, the representation of a node is influenced by its neighboring nodes, while the graph's connections remain unchanged; the graph structure allows for graph-based reasoning. Typically, a GNN consists of two modules: a propagation module and an output module. The propagation module transmits information and updates the state between nodes in the graph, while the output module provides vector representations of the nodes and edges, defining the objective function according to the specific task. Types of GNNs include Graph Convolutional Networks (GCNs), Gated Graph Neural Networks (GGNNs), and Graph Attention Networks (GATs), which utilize attention mechanisms.
[0030] Directed graph: Represents the relationship between objects. It can be represented by an ordered triple (V(D), A(D), ψD), where ψD is the correlation function, which is the ordered pair of elements in V(D) corresponding to each element in A(D).
[0031] Molecules: A whole composed of atoms bonded together in a certain order and spatial arrangement. This order and spatial arrangement is called molecular structure.
[0032] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Based on the cloud computing business model, cloud technology encompasses network technology, information technology, integration technology, management platform technology, and application technology. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to backend systems for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0033] A blockchain system can be a distributed system formed by clients and multiple nodes (any form of computing device connected to the network, such as servers and user terminals) connected through network communication. The nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). In a distributed system, any machine, such as a server or terminal, can join and become a node. A node includes a hardware layer, a middleware layer, an operating system layer, and an application layer.
[0034] The use of Graph Neural Networks (GNNs) to extend representation learning on graph-structured data has demonstrated great success in various fields, including drug screening, protein analysis, and knowledge graph completion. Among these applications, GNNs are particularly noteworthy in drug analysis. In drug analysis, determining the chemical and biological properties of compounds / proteins, such as toxicity, solubility, and carcinogenicity, based on their structures is a crucial task. This type of task can be modeled as a classification problem in machine learning. Specifically, compounds / proteins can be modeled using a graph data structure, and then their structural formulas can be transformed into vectors in Euclidean space through representation learning. Classical machine learning algorithms can then be used to classify these vectors and determine their chemical and biological properties. Therefore, improving the performance of graph-based classification is of significant practical importance in the field of drug analysis.
[0035] A major representative technique in graph neural networks is the Graph Attention Network (GAT). GAT is a spatial domain-based graph neural network that aims to learn the embedding representations of nodes by using an attention mechanism, starting from the node's own representation and utilizing an attention mechanism. Because of GAT's significant graph representation learning capability, it has made substantial progress in various practical applications, especially in drug analysis, compared to previous research. However, current GAT applications face significant challenges, namely, global information loss and excessive parameter complexity.
[0036] Global information loss: Because GAT utilizes local graph information to calculate attention weights between nodes, it cannot explicitly incorporate global information into the learning of node representations. This results in GAT not always effectively capturing enough information when learning graph structures with different properties. For example, when dealing with long chain-like graph structures in molecular structures, the node representations at one end cannot be combined with information from the nodes at the other end for learning in GAT.
[0037] Excessive parameter complexity: For each edge connecting nodes, GAT requires calculating a separate weight for it at each layer, resulting in excessively high parameter complexity. For example, for a neural network with input dimension p and output dimension q, the parameter complexity of a regular Graph Convolutional Network (GCN) is O(p×q), while the parameter complexity of GAT using K-head attention is O((p+2)×q×K). This demonstrates that this problem becomes increasingly severe as the graph size increases.
[0038] like Figure 1 The diagram shown is a schematic representation of the structure. Figure 1 This illustrates local and global information within the graph structure data. For example... Figure 1 The leftmost image shows a classic graph structure—the barbell graph structure. The second image (leftmost) and the first image (rightmost) can be reconstructed using the low-frequency and high-frequency signals of this graph, respectively. Darker edges represent fewer reconstructed edge weights. Observation reveals that the low-frequency and high-frequency signals contain more local information (e.g., information within node clusters) and global information (e.g., information between node clusters), respectively. Due to the loss of global information, general-purpose GATs can only learn node representations using information within node clusters, failing to capture node information from distant node clusters. This problem becomes increasingly severe as the number of nodes between node clusters increases.
[0039] The key problem addressed by this application is to resolve the issues of global information loss and excessive parameter complexity in the current GAT learning process, thereby enabling better vector representation of drug properties and obtaining more accurate classification results. This application provides a Harmony Graph Convolutional Network (Harmony-GCN) based on graph wavelets in the graph spectral domain as a spectral basis, learning different weights for signals of different frequencies. To accelerate the computation of Harmony-GCN, a variant algorithm, Fast-Harmony-GCN, is proposed, using Chebyshev polynomials to approximate the graph wavelets, resulting in a faster fitting process. This method effectively utilizes global information in graph-structured data while significantly reducing parameter complexity and improving the ability to process large-scale molecular graphs.
[0040] In this application, embodiments can be implemented using cloud technology or blockchain network technology. For example, in the audio data processing method disclosed in this application, this data can be stored on a blockchain. For instance, a trained drug analysis model, the target graph of the drug molecule to be tested, its adjacency matrix and node feature matrix, graph wavelets corresponding to different frequency bands in the target graph, node representations of the target graph, and the physicochemical properties of the drug molecule to be tested can all be stored on a blockchain.
[0041] To facilitate the storage and retrieval of the trained drug analysis model, the target graph of the drug molecule to be tested, its adjacency matrix and node feature matrix, the graph wavelets corresponding to different frequency bands in the target graph, the node representation of the target graph, and the physicochemical properties of the drug molecule to be tested, the drug analysis method may optionally further include: sending the trained drug analysis model, the target graph of the drug molecule to be tested, its adjacency matrix and node feature matrix, the graph wavelets corresponding to different frequency bands in the target graph, the node representation of the target graph, and the physicochemical properties of the drug molecule to be tested to a blockchain network. This allows the nodes of the blockchain network to fill the new block with the trained drug analysis model, the target graph of the drug molecule to be tested, its adjacency matrix and node feature matrix, the graph wavelets corresponding to different frequency bands in the target graph, the node representation of the target graph, and the physicochemical properties of the drug molecule to be tested. When a consensus is reached on the new block, the new block is appended to the end of the blockchain. This application embodiment can store the trained drug analysis model, the target graph of the drug molecule to be tested and its adjacency matrix and node feature matrix, the graph wavelets corresponding to different frequency bands in the target graph, the node representation of the target graph, and the physicochemical properties of the drug molecule to be tested on the blockchain to achieve backup of the records. When it is necessary to analyze the physicochemical properties of the drug molecule to be tested, the corresponding trained drug analysis model, the target graph of the drug molecule to be tested and its adjacency matrix and node feature matrix, the graph wavelets corresponding to different frequency bands in the target graph, the node representation of the target graph, and the physicochemical properties of the drug molecule to be tested can be obtained directly and quickly from the blockchain, without having to perform a series of processing through the intelligent drug analysis model to obtain the node representation and physicochemical properties of the drug molecule to be tested, thereby improving the efficiency of data analysis and data acquisition.
[0042] Please see Figure 2 , Figure 2This is a schematic diagram illustrating an application scenario of the drug analysis model provided in this application embodiment. Taking the drug analysis method executed by a computer device as an example, the computer device can be a terminal or a server, etc. During the training phase, the computer device acquires training sample data. Each training sample in the training sample data includes at least one sample drug molecule and the physicochemical property labels of each sample drug molecule. Based on the molecular structure of the sample drug molecule, a sample molecular graph is determined, and the adjacency matrix and node feature matrix corresponding to the sample molecular graph are determined. The sample molecular graph includes the node set and edge set corresponding to the sample drug molecule. Based on the adjacency matrix corresponding to the sample molecular graph, graph wavelets corresponding to different frequency bands in the sample molecular graph are calculated. The graph wavelets are used to capture the node information of the molecules. Based on the node feature matrix corresponding to the sample molecular graph and the graph wavelets corresponding to different frequency bands in the sample molecular graph, the node representation of the sample molecular graph is calculated. Based on the node representation of the sample molecular graph and the physicochemical property labels of each sample drug molecule, the model parameters of the drug analysis model are trained to obtain a trained drug analysis model. During the analysis phase, users can upload drug molecules to be tested via a client, browser client, or instant messaging client installed on their computer devices. After acquiring the uploaded drug molecules, the computer device determines a target map based on the molecular structure of the drug molecules. Based on the target map, graph wavelets corresponding to different frequency bands in the target map are calculated, whereby the graph wavelets are used to capture the node information of the molecules. Based on the graph wavelets corresponding to different frequency bands in the target map, the node representation of the target map is calculated. The node representation of the target map is analyzed using a trained drug analysis model to obtain the physicochemical properties of the drug molecules to be tested. The trained drug analysis model is obtained based on training sample data with physicochemical property labels.
[0043] It should be noted that the drug analysis process and the actual analysis process can be completed either on the server or on the terminal. When both the model training and the actual analysis process are completed on the server, and a trained drug analysis model is needed, the drug molecule to be analyzed can be input into the server. After the server completes the actual prediction, it sends the obtained physicochemical properties of the drug molecule to the terminal for display. Alternatively, when both the model training and the actual analysis process are completed on the terminal, and a trained drug analysis model is needed, the drug molecule to be analyzed can be input into the terminal. After the terminal completes the actual prediction, it displays the physicochemical properties of the drug molecule. Finally, when both the model training and the actual analysis process are completed on the terminal, and a trained drug analysis model is needed, the drug molecule to be analyzed can be input into the terminal. After the terminal completes the actual prediction, it displays the physicochemical properties of the drug molecule. Optionally, the pre-trained model file (model file) in the server can be ported to the terminal. If it is necessary to predict the input drug molecule to be tested, the drug molecule to be tested is input into the pre-trained model file (model file), and the pharmacological and chemical properties of the drug molecule to be tested can be obtained through calculation.
[0044] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.
[0045] This application provides a drug analysis method, which can be executed by a terminal or a server, or by both a terminal and a server. This application uses the example of a drug analysis method executed by a server to illustrate the method.
[0046] Please see Figures 3 to 4 , Figure 3 This is a schematic flowchart of the drug analysis method provided in the embodiments of this application. Figure 4 A schematic diagram of an example molecular structure provided in an embodiment of this application. The method includes:
[0047] Step 310: Determine the target map based on the molecular structure of the drug molecule to be tested.
[0048] For example, a target graph can be obtained by graph modeling based on the molecular structure of the drug molecule to be tested, and the adjacency matrix and node feature matrix corresponding to the target graph can be determined. The target graph includes a set of nodes and a set of edges corresponding to the drug molecule to be tested. Each node in the node set represents the attribute features of each atom in the molecule, and each edge in the edge set represents the attribute features of the chemical bonds connecting each atom.
[0049] For example, a target graph can be obtained by modeling the molecular structure of the drug molecule to be tested based on the atomic properties and chemical bond properties. The target graph can be defined as G(V, E), where V represents the set of nodes corresponding to the drug molecule being tested, E represents the set of edges corresponding to the drug molecule being tested, and G(V, E) defines the topological relationships in the information graph. Let A represent the adjacency matrix of the target graph. If v i With v j If there is an edge between them, then A ij =1; if v i With v j If there is no edge between them, then A ij =0. Let X represent the node feature matrix of the input layer. X represents the feature information of the nodes in the graph in matrix form. Such a data structure can conveniently characterize chemical molecules. In the analysis phase, X represents the node feature matrix of the target graph.
[0050] Each node in the node set represents a property characteristic of an atom in the molecule. The property characteristics of an atom may include one or more of the following: atom type, number of chemical bonds, formal charge, number of charges, number of protons, number of neutrons, atomic chirality, number of connected hydrogen atoms, atomic orbitals, aromaticity, etc. These examples are provided here and are not intended to limit the scope of this application.
[0051] In this set of edges, each edge represents a property characteristic corresponding to the chemical bond connecting the atoms. The property characteristics corresponding to the chemical bond may include the type of chemical bond, the valence state of the chemical bond, etc.
[0052] For example, such as Figure 4 The molecular structure diagram shown is as follows. Figure 4 The leftmost image shows the molecular structure of a nicotine molecule (C10H4N2). A nicotine molecule (C10H4N2) can be represented as follows: Figure 4 The data structure shown, where atoms are Figure 4 The node in the rightmost position; the chemical bond is Figure 4 In the rightmost graph, the properties of atoms, such as the number of charges, protons, and neutrons, can be modeled as the feature vectors of those atoms (i.e., the feature vectors of the nodes). Chemical bond properties, such as the type of chemical bond and its valence state, can be modeled as the feature vectors of the edges. This allows us to model a chemical molecule as a graph G. The properties we want to predict (such as water solubility and toxicity) are then determined using labels (marked as y). i ) is used to represent this.
[0053] Step 320: Based on the target image, calculate the graph wavelets corresponding to different frequency bands in the target image, wherein the graph wavelets are used to capture the node information of molecules.
[0054] The graph wavelet can capture the node information of the drug molecule to be tested. This node information can include local information (such as information within a node cluster) and global information (such as information between node clusters).
[0055] Optionally, the step of calculating the graph wavelets corresponding to different frequency bands in the target graph based on the target graph includes: calculating the graph wavelets corresponding to different frequency bands in the target graph based on the adjacency matrix corresponding to the target graph.
[0056] Optionally, the step of calculating the graph wavelets corresponding to different frequency bands in the target graph based on the target graph includes: determining the Laplacian matrix of the target graph based on the adjacency matrix of the target graph, and calculating the graph wavelets corresponding to different frequency bands in the target graph based on the Laplacian matrix of the target graph.
[0057] For example, in which, the graph wavelet ψ s As an important tool in graph analysis, it has excellent sparsity and node information capture capabilities, and its definition can be expressed as the following formula:
[0058] ψ s (λ)=Ug s (λ)U T (1);
[0059] Where U represents the eigenvector matrix obtained by eigenvalue decomposition of the Laplacian matrix L of the target graph G, where the Laplacian matrix L of the target graph can be constructed from the adjacency matrix A of the target graph, L = DA, where D is a diagonal matrix, and the n elements on its main diagonal represent the degree of the n vertices of the graph, with the remaining elements being zero; g s (λ) represents a diagonal scaling matrix that controls the heat kernel using a scaling parameter s; U T The transpose of U is a matrix, and λ represents the eigenvalues obtained by eigenvalue decomposition of the Laplacian matrix of the target graph G.
[0060] Where, ψ s The basis for the wavelet transform of the graph is represented by ψ. s -1 The basis for the inverse wavelet transform is represented by ψ. s -1 By using ψ s g in s (λ) is replaced with g s (-λ) is obtained.
[0061] If the spectral signals of different frequency bands in the target graph are calculated based on the above formula (1), the graph wavelets corresponding to different frequency bands in the target graph will be obtained. The calculated graph wavelets may include the graph wavelet transform basis and the graph wavelet inverse transform basis.
[0062] Optionally, calculating the graph wavelets corresponding to different frequency bands in the target graph based on the adjacency matrix corresponding to the target graph includes:
[0063] Based on the adjacency matrix corresponding to the target graph, the graph wavelets corresponding to different frequency bands in the target graph are calculated using the Chebyshev polynomial approximation method.
[0064] For example, to accelerate the computation of Harmony-GCN, a variant algorithm, Fast-Harmony-GCN, was proposed that uses Chebyshev polynomials to approximate the graph wavelets, thereby obtaining a faster fitting algorithm. This method effectively utilizes the global information in graph structure data, while effectively reducing parameter complexity and improving the ability to process large-scale molecular graphs.
[0065] Among them, due to the direct calculation of graph wavelet ψ s Eigenvalue decomposition of the Laplacian matrix is required, which consumes significant computational resources and time for large graphs. Based on the principle of Chebyshev polynomial approximation, a method for quickly approximating the graph wavelet ψ is proposed. s A variant of Fast-Harmony-GCN, in which the graph wavelet ψ s The calculation method can be expressed as the following formulas (2), (3), and (4):
[0066]
[0067] c i,s =2e s J i (s) (3);
[0068]
[0069] in, Let L represent the processed Laplacian matrix, and I represent the unprocessed Laplacian matrix. n Represents the identity matrix; J represents the Chebyshev polynomial approximation of order i; i (s) represents the modified Bessel function of the first kind, whose value can be obtained by looking up a table or using the scipy toolkit; c 0,s c represents the intermediate parameter when i equals 0. i,s This represents the intermediate parameter corresponding to i, e s λ represents e raised to the power of s, where s represents the scaling factor; M represents the node number; maxThis represents the largest eigenvalue obtained by performing eigenvalue decomposition on the Laplacian matrix of the target graph G.
[0070] Optionally, the spectral signal in the target image can be divided into high-frequency signal, medium-frequency signal, and low-frequency signal based on the low-frequency boundary parameters and the high-medium-frequency boundary parameters; then, the graph wavelets corresponding to the high-frequency signal, the medium-frequency signal, and the low-frequency signal in the target image can be calculated respectively, and the graph wavelets include the graph wavelet transform basis and the graph wavelet inverse transform basis.
[0071] Fast-Harmony-GCN obtains the graph wavelet ψ through a fast approximation method. s Then, it can be used as the spectral basis for hierarchical updates and input into the neural network.
[0072] Step 330: Process the graph wavelets corresponding to different frequency bands in the target graph according to the trained drug analysis model to obtain the node representation of the target graph. The trained drug analysis model is trained based on training sample data with physicochemical property labels.
[0073] Optionally, the step of processing graph wavelets corresponding to different frequency bands in the target graph according to the trained drug analysis model to obtain the node representation of the target graph includes:
[0074] The node representation of the target graph is calculated based on the node feature matrix corresponding to the target graph, the graph wavelets corresponding to different frequency bands in the target graph, and the weight parameters corresponding to different frequency bands determined in the trained drug analysis model.
[0075] In this embodiment of the application, when defining Harmony-GCN, the single-layer iterative learning of Harmony-GCN is defined as follows: Formula (5) and Formula (6):
[0076] X = H (l) W (5);
[0077]
[0078] Where X represents the node feature matrix corresponding to the target graph, ψ sL The graph wavelet transform basis, ψ, represents the low-frequency signal in a target graph with a scaling scale of s. sM The graph wavelet transform basis, ψ, represents the intermediate frequency signal in a target graph with a scaling scale of s. sH The graph wavelet transform basis, ψ, represents the high-frequency signal in a target graph with a scaling scale of s. sL =(ψ s1 ,…,ψ sm ),ψ sM =(ψ s(m+1) ,…,ψsh ) and ψ sH =(ψ s(h+1) ,…,ψ sn The parameters include low-frequency, mid-frequency, and high-frequency signals respectively; m represents the mid-low frequency boundary parameter, which is used to determine the hyperparameters of the low-frequency and mid-frequency boundary; h represents the mid-high frequency boundary parameter, which is used to determine the hyperparameters of the mid-frequency and high-frequency boundary. The graph wavelet inverse transform basis represents the low-frequency signal in the target graph with a scaling scale of s. The graph wavelet inverse transform basis represents the intermediate frequency signal in the target graph with a scaling scale of s. The graph wavelet inverse transform basis represents the high-frequency signal in the target graph at a scaling scale of s. α L The weighting parameter α represents the low-frequency signal. M α represents the weighting parameter of the intermediate frequency signal. H The weighting parameter represents the high-frequency signal.
[0079] Specifically, the processing steps of step 330 above are achieved by performing single-layer iterative learning calculations of Harmony-GCN using formulas (5) and (6) above, that is, calculating the node representation of the target graph based on the graph wavelets corresponding to different frequency bands in the target graph. Optionally, the node representation of the target graph is calculated based on the node feature matrix corresponding to the target graph, the graph wavelets corresponding to different frequency bands in the target graph, and the weight parameters corresponding to different frequency bands, that is, calculating the node representation of the (l+1)th layer corresponding to the target graph.
[0080] Step 340: Analyze the node representation of the target graph according to the trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested, wherein the trained drug analysis model is trained based on training sample data with physicochemical property labels.
[0081] This can be achieved by modeling the target graph of the drug molecule to be tested using a data structure such as a graph. Then, through representation learning, the structural formula of the drug molecule to be tested is transformed into node representation vectors in Euclidean space. A good drug analysis model is then constructed and trained using classical machine learning algorithms to analyze the node representation vectors. This allows for the prediction of the probability score of the drug molecule to be tested for certain physicochemical properties. Finally, the physicochemical properties (physical / chemical properties) of the drug molecule to be tested are determined based on the predicted probability score.
[0082] Among them, the physicochemical properties of a drug refer to its physical and chemical properties; physical properties include drug solubility, melting point, volatility, hygroscopicity, and decomposition; chemical properties include the characteristics of oxidation, reduction, and decomposition chemical reactions. The physicochemical properties of a drug can include its toxicity, carcinogenicity, solubility, partition coefficient, degree of dissociation, surface activity, thermodynamic properties, and spectroscopic properties.
[0083] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.
[0084] This application embodiment determines a target map based on the molecular structure of the drug molecule to be tested; calculates graph wavelets corresponding to different frequency bands in the target map based on the target map, wherein the graph wavelets are used to capture the node information of the molecule; calculates the node representation of the target map based on the graph wavelets corresponding to different frequency bands in the target map; and analyzes the node representation of the target map based on a trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested, wherein the trained drug analysis model is trained based on training sample data with physicochemical property labels. This application embodiment can use graph wavelets in the graph spectral domain as a spectral basis to learn harmonic graph convolutional neural networks with different weights for signals of different frequencies, thereby obtaining a trained drug analysis model. It can effectively capture node information of different frequency bands based on graph wavelets. This node information contains more local information (such as information within node clusters) and global information (such as information between node clusters). Then, it can calculate the node representation of the target graph of the drug molecule to be tested with higher accuracy based on the graph wavelets. Then, it can analyze the node representation of the target graph of the drug molecule to be tested through the trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested. It can effectively utilize the global information in the graph structure data, reduce the parameter complexity of the graph neural network, improve the accuracy of representation learning, and classify the physicochemical properties of the drug based on the node representation of the target graph, thereby improving the accuracy of data classification.
[0085] Please refer to 5. Figure 5 A flowchart illustrating the drug analysis model training method provided in this application embodiment. The method includes:
[0086] Step 510: Obtain training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and a physicochemical property label for each sample drug molecule in the at least one sample drug molecule.
[0087] In the application of Harmony-GCN in drug analysis, a set of chemical molecule data with known properties is first provided: This set of chemical molecule data with known properties constitutes the training sample data. Each training sample in this data includes at least one sample drug molecule and a physicochemical property label for each sample drug molecule. Wherein, G i Let y represent the i-th sample drug molecule in the training sample data. iThis can represent the physicochemical property label corresponding to the i-th sample drug molecule in the training sample data. A drug analysis model is trained using the aforementioned training sample data. This model can be used to predict the physicochemical properties of any compound molecule with unknown properties by inputting it into the model. More specifically, the embodiments of this application aim to enable the model to learn and transform any compound molecule into a fixed-length representation vector H after inputting it into Harmony-GCN, and then use a classifier / regressor to predict the target attribute or property.
[0088] Step 520: Determine the sample molecule map based on the molecular structure of the sample drug molecule.
[0089] For example, a sample molecular graph can be obtained by graph modeling based on the molecular structure of the sample drug molecule, and the adjacency matrix and node feature matrix corresponding to the sample molecular graph can be determined. The sample molecular graph includes the set of nodes and the set of edges corresponding to the sample drug molecule.
[0090] For example, a target graph can be obtained by modeling the sample drug molecule using the atomic and chemical bond properties of the molecular structure. The target graph can be defined as G(V, E), where V represents the set of nodes corresponding to the detected drug molecules, E represents the set of edges corresponding to the detected drug molecules, and G(V, E) defines the topological relationships in the information graph. Let A denote the adjacency matrix of the target graph. If v i With v j If there is an edge between them, then A ij =1; if v i With v j If there is no edge between them, then A ij =0. Let X represent the node feature matrix of the input layer. X represents the feature information of the nodes in the graph in matrix form. Such a data structure can conveniently characterize chemical molecules. In the analysis phase, X represents the node feature matrix of the target graph.
[0091] Each node in the node set represents a property characteristic of an atom in the molecule. The property characteristics of an atom may include one or more of the following: atom type, number of chemical bonds, formal charge, number of charges, number of protons, number of neutrons, atomic chirality, number of connected hydrogen atoms, atomic orbitals, aromaticity, etc. These examples are provided here and are not intended to limit the scope of this application.
[0092] In this set of edges, each edge represents a property characteristic corresponding to the chemical bond connecting the atoms. The property characteristics corresponding to the chemical bond may include the type of chemical bond, the valence state of the chemical bond, etc.
[0093] Step 530: Based on the sample molecular graph, calculate the graph wavelets corresponding to different frequency bands in the sample molecular graph, wherein the graph wavelets are used to capture the node information of the molecules.
[0094] Optionally, the step of calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the sample molecular graph includes: calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the adjacency matrix corresponding to the sample molecular graph.
[0095] Optionally, the step of calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the adjacency matrix corresponding to the sample molecular graph includes:
[0096] Based on the Chebyshev polynomial and the adjacency matrix corresponding to the sample molecular graph, the graph wavelets corresponding to different frequency bands in the sample molecular graph are calculated.
[0097] Optionally, calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the sample molecular graph includes:
[0098] The Laplacian matrix of the sample molecular graph is determined based on the adjacency matrix corresponding to the sample molecular graph, and the graph wavelets corresponding to different frequency bands in the sample molecular graph are calculated based on the Laplacian matrix of the sample molecular graph.
[0099] Optionally, before calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph, the method further includes: dividing the spectral signal in the sample molecular graph into high-frequency signal, medium-frequency signal and low-frequency signal according to the low-frequency boundary parameter and the high-frequency boundary parameter;
[0100] The calculation of graph wavelets corresponding to different frequency bands in the sample molecular graph includes:
[0101] Calculate the graph wavelets corresponding to the high-frequency signal, the mid-frequency signal, and the low-frequency signal in the sample molecular graph, respectively. The graph wavelets include graph wavelet transform basis and graph wavelet inverse transform basis.
[0102] Step 540: Calculate the node representation of the sample molecular graph based on the graph wavelets corresponding to different frequency bands in the sample molecular graph.
[0103] Optionally, the step of calculating the node representation of the sample molecular graph based on the graph wavelets corresponding to different frequency bands in the sample molecular graph includes:
[0104] The node representation of the sample molecular graph is calculated based on the node feature matrix corresponding to the sample molecular graph and the graph wavelets corresponding to different frequency bands in the sample molecular graph.
[0105] Optionally, the step of calculating the node representation of the sample molecular graph based on the node feature matrix corresponding to the sample molecular graph and the graph wavelets corresponding to different frequency bands in the sample molecular graph includes:
[0106] Based on the node feature matrix corresponding to the sample molecular graph, the graph wavelets corresponding to different frequency bands in the sample molecular graph, and the weight parameters corresponding to different frequency bands, the node representation of the sample molecular graph is calculated.
[0107] Optionally, the method further includes: calculating the weight parameters corresponding to the different frequency bands using a normalized exponential function.
[0108] Step 550: Based on the node representation of the sample molecule graph and the physicochemical property labels of each sample drug molecule, train the model parameters of the drug analysis model to obtain a trained drug analysis model.
[0109] Optionally, the step of training the model parameters of the drug analysis model based on the node representations of the sample molecule graph and the physicochemical property labels of each sample drug molecule includes:
[0110] Based on the node characterization of the sample molecular graph, the predicted physicochemical properties of the sample molecular graph are calculated;
[0111] The model parameters of the drug analysis model are trained based on the cross-entropy loss function and according to the predicted physicochemical properties of the sample molecular map and the physicochemical property labels of the sample drug molecules corresponding to the sample molecular map.
[0112] To facilitate a better understanding of the drug analysis method in the embodiments of this application, the embodiments of this application are also described in conjunction with the reasoning process of the graph neural network algorithm.
[0113] In order to define the graph attention mechanism network GAT, we first explain it from the perspective of graph convolutional network (GCN). From the perspective of the spatial domain, the graph convolutional layer of a single-layer graph convolutional network GCN can be defined by the following formula (7):
[0114]
[0115] Among them, H (l+1) H represents the node representation learned in layer l+1; (l) This represents the node representation learned in the l-th layer; Let A = A + I represent the adjacency matrix of the regularized graph. N I represents the adjacency matrix with added self-connections. N Let A represent the identity matrix, and D represent the degree matrix of A, i.e., the degree of the corresponding node on the diagonal; W(l) This represents the model parameter matrix; σ(·) represents the activation function, common activation functions include ReLU(x)=max(0,x) and Sigmoid(x)=1 / (1+e -x )wait.
[0116] The constructed graph neural network has N nodes, each representing a related object of the target object. The features of these nodes form an N×D node feature matrix X, and the relationships between the nodes form an N×N adjacency matrix A. X and A are the inputs to the training module of the drug analysis device. The node feature matrix of the input layer is X, where H... (0) =X.
[0117] From the perspective of the spatial domain, the learning of node features by GCN can be regarded as the aggregation of the features of the neighboring nodes of the current node in the spatial domain of the graph. Therefore, the learning of a single-layer GCN can be defined in a more general form, for example, as shown in the following formula (8):
[0118]
[0119] Where, N i Let α represent the set of neighbors of the current node i. ij This represents the aggregate weight between the current node i and its neighbor node j during the learning process. AGG(·) represents the weight between the current node i and its neighbor node j∈N. i Aggregate functions between terms, such as the summation function SUM or the averaging function MEAN. Under this definition, it can be seen that GCN is actually in this more general form, when... And a special case when AGG = SUM. h (l+1) h represents the node feature vector learned in the (l+1)th layer; j Let W represent the learned node feature vector of node j, and let W represent the model parameter matrix.
[0120] Similarly, the GAT for a single head is based on this more general form, and further introduces the self-attention mechanism shown in Equation (3) to calculate the more meaningful aggregation weight α. ij :
[0121]
[0122] Among them, e ij This represents the learned current node i and its neighbor nodes j∈N. i The weight of the edge between them, e ij =β(Wh i ,Wh j () utilizes attention weights β∈R2q The calculation is performed where W represents the model parameter matrix, and h... i h is the feature vector learned by the current node i. j Let be the feature vector learned by neighbor node j, where R represents the dimension of the real number space, 2q represents the dimension of the vector, β is a vector with a length space of 2q, and k represents the base of the summation. In practical applications, to obtain a better node representation, the number of heads is usually increased to calculate the GAT of K heads, and the node representations calculated by each head are concatenated to obtain the final learned node representation.
[0123] Since the GAT with K heads performs K aggregation weight calculations on each edge in the graph structure, its parameter complexity is O((p+2)×q×K), which is much greater than the parameter complexity O(p×q) of GCN.
[0124] In the embodiment of this application, when defining Harmony-GCN, graph convolution can be defined from the perspective of the spectral domain as the following two-stage formulas (10) and (11):
[0125] Feature transformation: X = H (l) W (10);
[0126] Graph convolution: H (l+1) =σ(BFB) T X) (11);
[0127] Where F represents the diagonal matrix used as the graph convolution kernel, and B represents the spectral basis used for the graph convolution operation. Based on this, according to the emphasis of different frequency signals on global and local information respectively, the spectral basis is divided into high-frequency, mid-frequency, and low-frequency signals. Simultaneously, graph wavelets (for ease of description, graph wavelets can be simply referred to as graph wavelets ψ) are utilized. s As a spectral basis, a self-attention mechanism is introduced to learn the diagonal matrix F as the graph convolution kernel. The single-layer iterative learning of Harmony-GCN is defined as follows: Equation (12) and Equation (13):
[0128] X = H (l) W (12);
[0129]
[0130] Where X represents the node feature matrix corresponding to the sample molecular graph, ψ sL The graph wavelet transform basis, ψ, represents the low-frequency signal in a sample molecular graph with a scaling scale of s. sMThe graph wavelet transform basis, ψ, represents the intermediate frequency signal in a sample molecular graph with a scaling scale of s. sH The graph wavelet transform basis, ψ, represents the high-frequency signal in a sample molecular graph with a scaling scale of s. sL =(ψ s1 ,…,ψ sm ),ψ sM =(ψ s(m+1) ,…,ψ sh ) and ψ sH =(ψ s(h+1) ,…,ψ sn The parameters include low-frequency, mid-frequency, and high-frequency signals respectively; m represents the mid-low frequency boundary parameter, which is used to determine the hyperparameters of the low-frequency and mid-frequency boundary; h represents the mid-high frequency boundary parameter, which is used to determine the hyperparameters of the mid-frequency and high-frequency boundary. The graph wavelet inverse transform basis represents the low-frequency signal in a sample molecular graph with a scaling scale of s. The graph wavelet inverse transform basis represents the mid-frequency signal in a sample molecular graph with a scaling scale of s. The graph wavelet inverse transform basis represents the high-frequency signal in a sample molecular graph with a scaling scale of s. α L The weighting parameter α represents the low-frequency signal. M α represents the weighting parameter of the intermediate frequency signal. H The weighting parameter represents the high-frequency signal.
[0131] Specifically, the processing of step 540 above is achieved by iteratively learning Harmony-GCN using the above formulas (12) and (13), that is, calculating the node representation of the sample molecular graph based on the node feature matrix corresponding to the sample molecular graph and the graph wavelets corresponding to different frequency bands in the sample molecular graph. Optionally, the node representation of the sample molecular graph is calculated based on the node feature matrix corresponding to the sample molecular graph, the graph wavelets corresponding to different frequency bands in the sample molecular graph, and the weight parameters corresponding to different frequency bands, that is, calculating the node representation of the (l+1)th layer.
[0132] Optionally, the weight parameters corresponding to the different frequency bands can be calculated using a normalized exponential function.
[0133] For example, observations in experiments show that a small m (around 10%) and a large h (around 90%) usually achieve good results. The AGG aggregation function is defined as MAX in practical applications. For example, the weight parameter matrix for different frequency bands can be calculated using the normalized exponential function (softmax function), which can be expressed as the following formula (14):
[0134]
[0135] Optionally, to better utilize the different signal capture capabilities at different frequencies while minimizing parameter complexity, it is possible to use identical weight parameters in the weight matrices controlling the three frequency bands, i.e.:
[0136] α L =diag(α) L ,…,α L ), α M =diag(α) M ,…,α M ), α H =diag(α) H ,…,α H The `diag` function in FreeMat and Matlab is used to construct a diagonal matrix, a square matrix with all non-diagonal elements being 0, or to return the diagonal elements of a matrix as a vector.
[0137] Before performing step 540 to calculate the node representation of the sample molecular graph, the graph wavelets corresponding to different frequency bands in the sample molecular graph can be calculated using the following graph wavelet calculation method.
[0138] Optionally, the step of calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the sample molecular graph includes: determining the Laplacian matrix of the sample molecular graph based on the adjacency matrix corresponding to the sample molecular graph, and calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the Laplacian matrix of the sample molecular graph.
[0139] Specifically, the process of calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph according to the adjacency matrix corresponding to the sample molecular graph described in step 530 can be achieved by the following formula (15).
[0140] Among them, the graph wavelet ψ s As an important tool in graph analysis, it has excellent sparsity and node information capture capabilities, and its definition can be expressed as the following formula (15):
[0141] ψ s (λ)=Ug s (λ)U T (15);
[0142] Where U represents the eigenvector matrix obtained by performing eigenvalue decomposition on the Laplacian matrix L of graph G, where the graph Laplacian matrix L can be constructed from the adjacency matrix A, L = DA, and D is a diagonal matrix whose n elements on the main diagonal represent the degree of the n vertices of the graph, and the remaining elements are all zero; g s(λ) represents a diagonal scaling matrix that controls the heat kernel using a scaling parameter s; U T The transpose of U is given by λ, which represents the eigenvalues obtained by eigenvalue decomposition of the Laplacian matrix of graph G.
[0143] Where, ψ s The basis for the wavelet transform of the graph is represented by ψ. s -1 The basis for the inverse wavelet transform is represented by ψ. s -1 By using ψ s g in s (λ) is replaced with g s (-λ) is obtained.
[0144] It should be noted that during the training phase, the above-mentioned graph G represents the sample molecule graph corresponding to the sample drug molecule, and the graph wavelet corresponding to the sample molecule graph is calculated by the above formula (15); during the analysis phase, the above-mentioned graph G represents the target graph corresponding to the drug molecule to be tested, and the graph wavelet corresponding to the target graph is calculated by the above formula (15).
[0145] Optionally, the step of calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the adjacency matrix corresponding to the sample molecular graph includes: calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph using the Chebyshev polynomial approximation method based on the adjacency matrix corresponding to the sample molecular graph.
[0146] Among them, due to the direct calculation of graph wavelet ψ s Eigenvalue decomposition of the Laplacian matrix is required, which consumes significant computational resources and time for large graphs. Based on the principle of Chebyshev polynomial approximation, a method for quickly approximating the graph wavelet ψ is proposed. s A variant of Fast-Harmony-GCN, in which the graph wavelet ψ s The calculation method can be expressed as the following formulas (16), (17), and (18):
[0147]
[0148] c i,s =2e s J i (s) (17);
[0149]
[0150] in, Let L represent the processed Laplacian matrix, and I represent the unprocessed Laplacian matrix. n Represents the identity matrix; J represents the Chebyshev polynomial approximation of order i; i (s) represents the modified Bessel function of the first kind, whose value can be obtained by looking up a table or using the scipy toolkit; c 0,s c represents the intermediate parameter when i equals 0. i,s This represents the intermediate parameter corresponding to i, e s λ represents e raised to the power of s, where s represents the scaling factor; M represents the node number; max This represents the largest eigenvalue obtained by eigenvalue decomposition of the Laplacian matrix of graph G. During the training phase, the graph G mentioned above represents the sample molecule graph corresponding to the sample drug molecule, and the graph wavelet corresponding to the sample molecule graph is calculated by the above formulas (16)-(18).
[0151] Optionally, the spectral signals in the sample molecular graph can be divided into high-frequency signals, mid-frequency signals, and low-frequency signals based on the mid-to-low frequency boundary parameters and the mid-to-high frequency boundary parameters; then, the graph wavelets corresponding to the high-frequency signals, mid-frequency signals, and low-frequency signals in the sample molecular graph can be calculated respectively.
[0152] Specifically, when calculating the graph wavelets corresponding to different frequency bands, the graph wavelets corresponding to the high-frequency, mid-frequency, and low-frequency signals in the sample molecular graph can be calculated based on the adjacency matrices corresponding to the high-frequency, mid-frequency, and low-frequency signals in the sample molecular graph.
[0153] Fast-Harmony-GCN obtains the graph wavelet ψ through a fast approximation method. s Then, it can be used as the spectral basis for hierarchical updates and input into the neural network.
[0154] For example, taking supervised learning as an example, where Y is the set of node labels, the algorithm flow is described as follows:
[0155] The algorithm's inputs include the adjacency matrix A, the node feature matrix X, and the node label Y, and the algorithm's output is H.
[0156] (1) Initialize the model parameter matrix W, the low-to-mid frequency boundary parameter m, the high-to-mid frequency boundary parameter h, the scaling parameter s for the control chart wavelet calculation, and the weight parameter α. L α M and α H ;
[0157] (2) The graph wavelet ψs (Fast-Harmony-GCN) is calculated by a fast approximation method based on Chebyshev polynomials;
[0158] (3) For epochs in epochs:
[0159] (4) W = Model_Training(X,Y,ψ) s ,α L ,α M ,α H );
[0160] (5) End
[0161] (6) return H = Model(A,X,W).
[0162] In this context, an epoch is defined as the process of a complete dataset passing through a neural network once and returning once. An epoch refers to the entire dataset undergoing one forward and one backward training iteration; that is, all training samples in the neural network undergo one forward propagation and one backward propagation. Understandably, after initializing the parameters and calculating the graph wavelet, iterative training using the entire dataset requires multiple epochs. These epochs can be specified using the `epochs` parameter. For each epoch, the aforementioned parameters and data are fed into the model for training. The purpose of training is to optimize the neural network model parameter matrix W, which is based on node features X, node labels Y, and graph wavelet ψ. s Low-frequency weighting parameter α L Intermediate frequency weighting parameter α M and high-frequency weighting parameter α H The model parameters W are trained. After training, a trained model parameter matrix W is obtained. Then, based on the adjacency matrix A, node features X, and model parameters W, the node representation H is calculated.
[0163] The drug analysis model built using Harmony-GCN can generate higher-quality node feature representations by effectively utilizing the different roles of different frequency signals in capturing global and local information and assigning them different attention weights, while maintaining a very low level of parameter complexity. As can be seen from the definition of Harmony-GCN, maintaining its parameter complexity at O(p×q), the same as GCN, is far less than the parameter complexity of GAT (O((p+2)×q×K)). This allows for the effective utilization of the different capabilities of different frequency signals in capturing graph structure information while maintaining very low parameter complexity.
[0164] Meanwhile, thanks to the Chebyshev polynomial approximation algorithm, the embodiments of this application can obtain the graph wavelet ψ within linear complexity. sThe approximate solution obtained by Fast-Harmony-GCN significantly improves the ability of the drug analysis model to handle large-scale graph-structured data.
[0165] In the application scenario of Harmony-GCN in drug analysis, the objective of this application embodiment is to provide a set of chemical molecule data with known properties: A drug analysis model is trained using the aforementioned training sample data. This model can be used to predict the physicochemical properties of any compound molecule with unknown properties by inputting it into the model. More specifically, the embodiments of this application aim to enable the model to learn and transform any compound molecule into a fixed-length representation vector H after inputting it into Harmony-GCN, and then use a classifier / regressor to predict the target attribute or property.
[0166] Specifically, given graph G as input, embodiments of this application obtain the node characterization of each compound molecule through a drug analysis model. Among them, h i h represents the node feature vector corresponding to each atom. i The dimension is C, which is the number of physicochemical property categories. In this application embodiment, a cross-entropy loss function is defined to train the entire drug analysis model, which can be expressed as the following formula (13):
[0167]
[0168] Where: y i It is a C-dimensional vector, y i This represents the actual category (i.e., class label) to which the i-th sample drug molecule belongs. Each position in y can only have two values: 0 and 1. For example, if there are C = 6 categories, then y i It can be [0, 0, 0, 1, 0, 0]; p i =softmax(h i ), p i It is also a C-dimensional vector, p i This determines the probability that the i-th sample drug molecule belongs to a certain category in a drug analysis model. For example, if there are C = 6 categories, the drug analysis model outputs p. iThe value could be [0.1, 0, 0, 0.7, 0, 0.2], indicating that the drug analysis model judges this sample drug molecule to have a high probability of belonging to the fourth category, because the fourth category output by the drug analysis model has the highest probability. The model parameters of the drug analysis model are optimized by training with the cross-entropy function, so that the predicted category of the final predicted sample drug molecule is the same as the true category label, thus completing the model training. After training, a drug analysis model that can simultaneously predict the physicochemical properties of multiple drugs can be obtained. For example, this category can include drug physicochemical properties, which refer to physical and chemical properties; physical properties include drug solubility, melting point, volatility, hygroscopicity, and differentiation, etc.; chemical properties include oxidation, reduction, and decomposition chemical reaction characteristics. The physicochemical properties of a drug can include its toxicity, carcinogenicity, solubility, partition coefficient, degree of dissociation, surface activity, thermodynamic properties, and spectroscopic properties, etc.
[0169] Cross-entropy measures the difference between two different probability distributions of the same random variable; in machine learning, it represents the difference between the true probability distribution and the predicted probability distribution. The smaller the cross-entropy value, the better the model's prediction performance.
[0170] This application employs a novel fast approximation method based on Chebyshev polynomial fitting to compute graph wavelets as a spectral basis for a fast approximation of the Harmony-GCN drug analysis method (Fast-Harmony-GCN). This addresses the issues of global information loss and excessive parameter complexity in the construction of current complex graph convolutional networks, thereby improving the quality of node representations learned on graph-structured data. This enables more accurate prediction of molecular properties and further enhances performance on tasks including molecular attribute prediction. Simultaneously, it empowers the original model to effectively process large-scale graph-structured data, significantly improving the efficiency of handling such data.
[0171] The embodiments of this application have strong versatility and broad application prospects. In addition to drug analysis, they can be easily and widely applied to various graph-based data tasks. The entire method can improve the performance of various graph-related problems.
[0172] Harmony-GCN can be applied not only to node representation learning tasks, but also to graph representation learning tasks, improving task performance while learning high-quality graph representations.
[0173] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.
[0174] This application embodiment obtains training sample data, where each training sample includes at least one sample drug molecule and physicochemical property labels for each sample drug molecule; determines a sample molecular graph based on the molecular structure of the sample drug molecule; calculates graph wavelets corresponding to different frequency bands in the sample molecular graph based on the sample molecular graph, wherein the graph wavelets are used to capture the node information of the molecule; calculates the node representation of the sample molecular graph based on the graph wavelets corresponding to different frequency bands in the sample molecular graph; and trains the model parameters of the drug analysis model based on the node representation of the sample molecular graph and the physicochemical property labels for each sample drug molecule to obtain a trained drug analysis model. This application embodiment can use graph wavelets in the graph spectral domain as a spectral basis. These wavelets at different frequency bands effectively capture node information at different frequency bands. This node information contains more local information (such as information within node clusters) and global information (such as information between node clusters). Iterative learning can then be performed based on the graph wavelets to learn node representations of sample molecular graphs with higher accuracy. This involves training the correspondence between node representations and physicochemical properties based on the node representations of the sample molecular graphs obtained through iterative learning, and learning harmonic graph convolutional neural networks with different weights for signals of different frequencies to obtain a trained drug analysis model. Finally, this trained drug analysis model can be used to process the drug molecule under test to obtain the node representations of the target graph of the drug molecule under test. The trained drug analysis model can then be used to analyze the node representations of the target graph of the drug molecule under test to obtain the drug's physicochemical properties. This effectively utilizes global information in graph structure data, reduces the parameter complexity of the graph neural network, improves the accuracy of representation learning, and enhances the accuracy of data classification by classifying the drug's physicochemical properties based on the node representations of the target graph.
[0175] To facilitate better implementation of the drug analysis method of this application, this application also provides a drug analysis apparatus. Please refer to... Figure 6 , Figure 6 This is a schematic diagram of the structure of a drug analysis device provided in an embodiment of this application. The drug analysis device 600 may include:
[0176] The first determining unit 601 is used to determine the target map based on the molecular structure of the drug molecule to be tested;
[0177] The first calculation unit 602 is used to calculate graph wavelets corresponding to different frequency bands in the target image based on the target image, wherein the graph wavelets are used to capture the node information of molecules;
[0178] The processing unit 603 is used to process the graph wavelets corresponding to the different frequency bands according to the trained drug analysis model to obtain the node representation of the target graph, wherein the trained drug analysis model is trained based on training sample data with physicochemical property labels.
[0179] The analysis unit 604 is used to analyze the node representation of the target graph according to the trained drug analysis model to obtain the pharmacological and chemical properties of the drug molecule to be tested.
[0180] The first calculation unit 602 can be used to calculate the graph wavelets corresponding to different frequency bands in the target graph based on the adjacency matrix corresponding to the target graph.
[0181] Optionally, the first calculation unit 602 can be used to calculate the graph wavelets corresponding to different frequency bands in the target graph using the Chebyshev polynomial approximation method, based on the adjacency matrix corresponding to the target graph.
[0182] Optionally, the first calculation unit 602 can be used to determine the Laplacian matrix of the target graph based on the adjacency matrix corresponding to the target graph, and to calculate the graph wavelets corresponding to different frequency bands in the target graph based on the Laplacian matrix of the target graph.
[0183] Optionally, before calculating the graph wavelets corresponding to different frequency bands in the target graph, the first calculation unit 602 can also be used to: divide the spectral signal in the target graph into high-frequency signals, mid-frequency signals, and low-frequency signals according to the mid-low frequency boundary parameters and the mid-high frequency boundary parameters; the calculation of the graph wavelets corresponding to different frequency bands in the target graph includes: calculating the graph wavelets corresponding to the high-frequency signals, the mid-frequency signals, and the low-frequency signals in the target graph, respectively, wherein the graph wavelets include a graph wavelet transform basis and a graph wavelet inverse transform basis.
[0184] Optionally, the processing unit 603 can be used to: calculate the node representation of the target graph based on the node feature matrix corresponding to the target graph, the graph wavelets corresponding to different frequency bands in the target graph, and the weight parameters corresponding to different frequency bands determined in the trained drug analysis model.
[0185] Optional, such as Figure 7 The diagram shown is a structural schematic of the drug analysis model training device provided in this embodiment of the application. The drug analysis model training device 700 further includes:
[0186] The acquisition unit 701 is used to acquire training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and a physicochemical property label for each sample drug molecule in the at least one sample drug molecule.
[0187] The second determining unit 702 is used to determine the sample molecule map based on the molecular structure of the sample drug molecule;
[0188] The second calculation unit 703 is used to calculate graph wavelets corresponding to different frequency bands in the sample molecular graph based on the sample molecular graph, wherein the graph wavelets are used to capture the node information of the molecule;
[0189] The third calculation unit 704 is used to calculate the node representation of the sample molecular graph based on the graph wavelets corresponding to different frequency bands in the sample molecular graph.
[0190] Training unit 705 is used to train the model parameters of the drug analysis model based on the node representation of the sample molecule graph and the physicochemical property labels of each sample drug molecule, so as to obtain a trained drug analysis model.
[0191] Optionally, the second calculation unit 703 can be used to calculate the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the adjacency matrix corresponding to the sample molecular graph.
[0192] Optionally, the second calculation unit 703 can be used to calculate the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the adjacency matrix corresponding to the sample molecular graph using the Chebyshev polynomial approximation method.
[0193] Optionally, before calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph, the second calculation unit 703 can also be used to: divide the spectral signal in the sample molecular graph into high-frequency signal, mid-frequency signal and low-frequency signal according to the mid-low frequency boundary parameter and the mid-high frequency boundary parameter; the calculation of the graph wavelets corresponding to different frequency bands in the sample molecular graph includes: calculating the graph wavelets corresponding to the high-frequency signal, the mid-frequency signal and the low-frequency signal in the sample molecular graph respectively, wherein the graph wavelet includes a graph wavelet transform basis and a graph wavelet inverse transform basis.
[0194] Optionally, the third calculation unit 704 can be used to calculate the node representation of the sample molecular graph based on the node feature matrix corresponding to the sample molecular graph and the graph wavelets corresponding to different frequency bands in the sample molecular graph.
[0195] Optionally, the third calculation unit 704 can be used to calculate the node representation of the sample molecular graph based on the node feature matrix corresponding to the sample molecular graph, the graph wavelets corresponding to different frequency bands in the sample molecular graph, and the weight parameters corresponding to different frequency bands.
[0196] Optionally, the third calculation unit 704 can also be used to calculate the weight parameters corresponding to the different frequency bands through a normalized exponential function.
[0197] Optionally, when training the model parameters of the drug analysis model based on the node representations of the sample molecular graph and the physicochemical property labels of each sample drug molecule, the training unit 705 can be used to: calculate the predicted physicochemical properties of the sample molecular graph based on the node representations of the sample molecular graph; and train the model parameters of the drug analysis model based on the cross-entropy loss function and according to the predicted physicochemical properties of the sample molecular graph and the physicochemical property labels of the sample drug molecules corresponding to the sample molecular graph.
[0198] It should be noted that the functions of each module in the drug analysis device 600 and the drug analysis model training device 700 in the embodiments of this application can be referred to the specific implementation of any embodiment in the above method embodiments, and will not be repeated here.
[0199] Each unit in the aforementioned drug analysis device can be implemented entirely or partially through software, hardware, or a combination thereof. These units can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each unit.
[0200] For example, the drug analysis device 600 or the drug analysis model training device 700 can be integrated into a terminal or server with storage and a processor, thus possessing computing capabilities; alternatively, the drug analysis device 600 or the drug analysis model training device 700 can serve as the terminal or server. The terminal can be a smartphone, tablet, laptop, smart TV, smart speaker, wearable smart device, personal computer (PC), etc. The terminal can also include a client, which can be a video client, browser client, or instant messaging client, etc. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.
[0201] Figure 8 A schematic structural diagram of the computer device provided in the embodiments of this application, such as Figure 8As shown, the computer device 800 may include: a communication interface 801, a memory 802, a processor 803, and a communication bus 804. The communication interface 801, memory 802, and processor 803 communicate with each other via the communication bus 804. The communication interface 801 is used for data communication between the device 800 and external devices. The memory 802 can be used to store software programs and modules, and the processor 803 runs the software programs and modules stored in the memory 802, such as the software programs for the corresponding operations in the aforementioned method embodiments.
[0202] Optionally, the processor 803 can call software programs and modules stored in the memory 802 to perform the following operations: determine a target map based on the molecular structure of the drug molecule to be tested; calculate graph wavelets corresponding to different frequency bands in the target map based on the target map; calculate the node representation of the target map based on the graph wavelets corresponding to different frequency bands in the target map; analyze the node representation of the target map based on a trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested, wherein the trained drug analysis model is trained based on training sample data with physicochemical property labels.
[0203] Optionally, the processor 803 can call software programs and modules stored in the memory 802 to perform the following operations: acquire training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and physicochemical property labels of each sample drug molecule; determine a sample molecular graph based on the molecular structure of the sample drug molecule; calculate graph wavelets corresponding to different frequency bands in the sample molecular graph based on the sample molecular graph; calculate the node representation of the sample molecular graph based on the graph wavelets corresponding to different frequency bands in the sample molecular graph; and train the model parameters of the drug analysis model based on the node representation of the sample molecular graph and the physicochemical property labels of each sample drug molecule to obtain a trained drug analysis model.
[0204] Optionally, the computer device 800 may be integrated into a terminal or server that has storage and a processor, thus possessing computing capabilities; or the computer device 800 may be such a terminal or server. The terminal may be a smartphone, tablet, laptop, smart TV, smart speaker, wearable smart device, personal computer, or similar device. The server may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0205] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0206] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the methods described above in the embodiments of this application; for brevity, further details are omitted here.
[0207] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding processes in the methods described above in the embodiments of this application. For brevity, these details will not be elaborated further here.
[0208] This application also provides a computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding processes in the methods described above in the embodiments of this application. For brevity, these details will not be elaborated further here.
[0209] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0210] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0211] It should be understood that the above-described memory is exemplary and not a limiting description. For example, the memory in the embodiments of this application may also be static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM), etc. That is to say, the memory in the embodiments of this application is intended to include, but is not limited to, these and any other suitable types of memory.
[0212] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0213] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0214] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0215] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0216] In addition, the functional units in the embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0217] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0218] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A pharmaceutical analysis method, characterized in that, The method includes: Determining a target graph based on the molecular structure of the drug molecule to be tested includes: performing graph modeling based on the molecular structure of the drug molecule to obtain the target graph, and determining the adjacency matrix and node feature matrix corresponding to the target graph. The target graph includes a set of nodes and a set of edges corresponding to the drug molecule to be tested. Each node in the node set represents the attribute characteristics of each atom in the molecule. The attribute characteristics of the atom include one or more of the following: atom type, number of chemical bonds, formal charge, number of charges, number of protons, number of neutrons, atomic chirality, number of connected hydrogen atoms, atomic orbitals, and aromaticity. Each edge in the edge set represents the attribute characteristics corresponding to the chemical bonds connecting the atoms. The attribute characteristics corresponding to the chemical bonds include at least one of the following: chemical bond type and chemical bond valence state. Based on the low-frequency boundary parameters and the high-frequency boundary parameters, the spectral signal in the target image is divided into high-frequency signal, medium-frequency signal and low-frequency signal; Based on the adjacency matrix corresponding to the target graph, the graph wavelets corresponding to different frequency bands in the target graph are calculated, including: based on the adjacency matrix corresponding to the target graph, the graph wavelets corresponding to the high-frequency signal, the mid-frequency signal, and the low-frequency signal in the target graph, respectively, wherein the graph wavelets include a graph wavelet transform basis and a graph wavelet inverse transform basis; wherein the graph wavelets are used to capture the node information of the molecules, the node information includes local information and global information, the local information represents the information within the node cluster, and the global information represents the information between node clusters; The target image is processed using graph wavelets corresponding to different frequency bands based on a trained drug analysis model to obtain node representations of the target image. This includes: calculating node representations of the target image based on the node feature matrix corresponding to the target image, the graph wavelet transform basis and inverse graph wavelet transform basis corresponding to different frequency bands in the target image, and the weight parameters corresponding to different frequency bands determined in the trained drug analysis model. The weight parameters in the weight matrices corresponding to different frequency bands are the same. The trained drug analysis model is obtained based on training sample data with physicochemical property labels. The node representation of the target graph is analyzed based on the trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested. The physicochemical properties of the drug molecule to be tested include at least one of the following: toxicity, carcinogenicity, solubility, partition coefficient, degree of dissociation, surface activity, thermodynamic properties, and spectroscopic properties. The trained drug analysis model is obtained by training sample data with physicochemical property labels, including: Acquire training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and a physicochemical property label Y for each sample drug molecule in the at least one sample drug molecule; A graph model is performed based on the molecular structure of the sample drug molecule to obtain the sample molecule graph, and the adjacency matrix A and node feature matrix X corresponding to the sample molecule graph are determined. Initialize the model parameter matrix W of the drug analysis model, set the low-to-mid frequency boundary parameter m, the high-to-mid frequency boundary parameter h, the scaling parameter s for the control chart wavelet calculation, and initialize the low-frequency weight parameter α. L Intermediate frequency weighting parameter α M and high-frequency weighting parameter α H ; Based on the adjacency matrix A corresponding to the sample molecular graph, calculate the graph wavelet ψ corresponding to different frequency bands in the sample molecular graph corresponding to the scaling parameter s. s ; In multiple training rounds, based on the node feature matrix X, the physicochemical property labels Y, and the graph wavelet ψ s The initial low-frequency weight parameter α L The intermediate frequency weighting parameter α M and the high-frequency weighting parameter α H The model parameter matrix W is iteratively optimized to obtain the trained drug analysis model; wherein each training round includes forward propagation and backward propagation, and the optimization objective is to minimize the error between the predicted physicochemical properties output by the model and the physicochemical property label Y.
2. The pharmaceutical analysis method as described in claim 1, characterized in that, The step of calculating the graph wavelets corresponding to different frequency bands in the target graph based on the adjacency matrix corresponding to the target graph includes: Based on the adjacency matrix corresponding to the target graph, the graph wavelets corresponding to different frequency bands in the target graph are calculated using the Chebyshev polynomial approximation method.
3. The pharmaceutical analysis method as described in claim 1, characterized in that, The step of calculating the graph wavelets corresponding to different frequency bands in the target graph based on the adjacency matrix corresponding to the target graph includes: The Laplacian matrix of the target graph is determined based on the adjacency matrix of the target graph, and the graph wavelets corresponding to different frequency bands in the target graph are calculated based on the Laplacian matrix of the target graph.
4. A method for training a drug analysis model, characterized in that, The method includes: Acquire training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and a physicochemical property label Y for each sample drug molecule in the at least one sample drug molecule; Determining a sample molecular graph based on the molecular structure of the sample drug molecule includes: performing graph modeling based on the molecular structure of the sample drug molecule to obtain the sample molecular graph, and determining the adjacency matrix A and node feature matrix X corresponding to the sample molecular graph. The sample molecular graph includes a set of nodes and a set of edges corresponding to the sample drug molecule. Each node in the node set represents the attribute characteristics of each atom in the molecule. The attribute characteristics of the atom include one or more of the following: atom type, number of chemical bonds, formal charge, number of charges, number of protons, number of neutrons, atomic chirality, number of connected hydrogen atoms, atomic orbitals, and aromaticity. Each edge in the edge set represents the attribute characteristics corresponding to the chemical bonds connecting the atoms. The attribute characteristics corresponding to the chemical bonds include at least one of the following: chemical bond type and chemical bond valence state. Initialize the model parameter matrix W of the drug analysis model, set the low-to-mid frequency boundary parameter m, the high-to-mid frequency boundary parameter h, the scaling parameter s for the control chart wavelet calculation, and initialize the low-frequency weight parameter α. L Intermediate frequency weighting parameter α M and high-frequency weighting parameter α H ; Based on the low-frequency boundary parameter m and the high-frequency boundary parameter h, the spectral signal in the sample molecular diagram is divided into high-frequency signal, mid-frequency signal and low-frequency signal; Based on the adjacency matrix A corresponding to the sample molecular graph, calculate the graph wavelet ψ corresponding to different frequency bands in the sample molecular graph corresponding to the scaling parameter s. s This includes: calculating the graph wavelets ψ corresponding to the high-frequency signal, the mid-frequency signal, and the low-frequency signal in the sample molecular graph based on the adjacency matrix A corresponding to the scaling parameter s. s The graph wavelet ψ s It includes a graph wavelet transform basis and a graph wavelet inverse transform basis; wherein, the graph wavelet ψ s The node information used to capture molecules includes local information and global information. The local information represents information within a node cluster, and the global information represents information between node clusters. Based on the wavelet ψ corresponding to different frequency bands in the sample molecular graph s The calculation of the node representation of the sample molecular graph includes: calculating the node representation of the sample molecular graph based on the node feature matrix X corresponding to the sample molecular graph, the graph wavelet transform basis and the graph wavelet inverse transform basis corresponding to different frequency bands in the sample molecular graph, and the weight parameters corresponding to different frequency bands, wherein the weight parameters in the weight matrix corresponding to different frequency bands are the same. Based on the node representation of the sample molecule graph and the physicochemical property label Y of each sample drug molecule, the model parameters of the drug analysis model are trained to obtain a trained drug analysis model. The physicochemical property label includes at least one of the following labels: toxicity, carcinogenicity, solubility, partition coefficient, degree of dissociation, surface activity, thermodynamic properties and spectroscopic properties of the sample drug molecule. In multiple training rounds, based on the node feature matrix X, the physicochemical property labels Y, and the graph wavelet ψ... s The initial low-frequency weight parameter α L The intermediate frequency weighting parameter α M and the high-frequency weighting parameter α H The model parameter matrix W is iteratively optimized to obtain the trained drug analysis model; wherein each training round includes forward propagation and backward propagation, and the optimization objective is to minimize the error between the predicted physicochemical properties output by the model and the physicochemical property label Y.
5. The drug analysis model training method as described in claim 4, characterized in that, The step of calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the adjacency matrix corresponding to the sample molecular graph includes: Based on the adjacency matrix corresponding to the sample molecular graph, the graph wavelets corresponding to different frequency bands in the sample molecular graph are calculated using the Chebyshev polynomial approximation method.
6. The drug analysis model training method as described in claim 4, characterized in that, The step of calculating the graph wavelets corresponding to different frequency bands in the sample molecular graph based on the adjacency matrix corresponding to the sample molecular graph includes: The Laplacian matrix of the sample molecular graph is determined based on the adjacency matrix corresponding to the sample molecular graph, and the graph wavelets corresponding to different frequency bands in the sample molecular graph are calculated based on the Laplacian matrix of the sample molecular graph.
7. The drug analysis model training method as described in claim 4, characterized in that, The method further includes: The weight parameters corresponding to the different frequency bands are calculated using a normalized exponential function.
8. The drug analysis model training method as described in claim 4, characterized in that, The model parameters for training the drug analysis model based on the node representations of the sample molecule graph and the physicochemical property labels of each sample drug molecule include: Based on the node characterization of the sample molecular graph, the predicted physicochemical properties of the sample molecular graph are calculated; The model parameters of the drug analysis model are trained based on the cross-entropy loss function and according to the predicted physicochemical properties of the sample molecular map and the physicochemical property labels of the sample drug molecules corresponding to the sample molecular map.
9. A drug analysis device, characterized in that, The device includes: The first determining unit is used to determine a target graph based on the molecular structure of the drug molecule to be tested. This includes: performing graph modeling based on the molecular structure of the drug molecule to obtain the target graph, and determining the adjacency matrix and node feature matrix corresponding to the target graph. The target graph includes a set of nodes and a set of edges corresponding to the drug molecule to be tested. Each node in the node set represents the attribute characteristics of each atom in the molecule. The attribute characteristics of the atom include one or more of the following: atom type, number of chemical bonds, formal charge, number of charges, number of protons, number of neutrons, atomic chirality, number of connected hydrogen atoms, atomic orbitals, and aromaticity. Each edge in the edge set represents the attribute characteristics corresponding to the chemical bonds connecting the atoms. The attribute characteristics corresponding to the chemical bonds include at least one of the following: chemical bond type and chemical bond valence state. The first calculation unit is used to: divide the spectral signals in the target image into high-frequency signals, mid-frequency signals, and low-frequency signals according to the mid-low frequency boundary parameters and the mid-high frequency boundary parameters; and calculate the graph wavelets corresponding to different frequency bands in the target image according to the adjacency matrix corresponding to the target image, including: calculating the graph wavelets corresponding to the high-frequency signals, mid-frequency signals, and low-frequency signals in the target image respectively according to the adjacency matrix corresponding to the target image, wherein the graph wavelets include a graph wavelet transform basis and a graph wavelet inverse transform basis; wherein the graph wavelets are used to capture the node information of molecules, the node information includes local information and global information, the local information represents the information within node clusters, and the global information represents the information between node clusters; The processing unit is configured to process the graph wavelets corresponding to the different frequency bands according to the trained drug analysis model to obtain the node representation of the target graph. This includes: calculating the node representation of the target graph based on the node feature matrix corresponding to the target graph, the graph wavelet transform basis and inverse graph wavelet transform basis corresponding to the different frequency bands in the target graph, and the weight parameters corresponding to the different frequency bands determined in the trained drug analysis model. The weight parameters in the weight matrices corresponding to the different frequency bands are the same. The trained drug analysis model is obtained based on training sample data with physicochemical property labels. The analysis unit is used to analyze the node representation of the target graph according to the trained drug analysis model to obtain the physicochemical properties of the drug molecule to be tested. The physicochemical properties include at least one of the following: toxicity, carcinogenicity, solubility, partition coefficient, degree of dissociation, surface activity, thermodynamic properties and spectroscopic properties of the drug molecule to be tested. The first training unit, used to train the trained drug analysis model based on training sample data with physicochemical property labels, includes: acquiring training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and a physicochemical property label Y for each of the at least one sample drug molecule; performing graph modeling based on the molecular structure of the sample drug molecule to obtain a sample molecule graph, and determining the adjacency matrix A and node feature matrix X corresponding to the sample molecule graph; initializing the model parameter matrix W of the drug analysis model, setting the low-frequency boundary parameter m, the high-frequency boundary parameter h, the scaling parameter s for controlling the wavelet calculation of the control graph, and initializing the low-frequency weight parameter α. L Intermediate frequency weighting parameter α M and high-frequency weighting parameter α H Based on the adjacency matrix A corresponding to the sample molecular graph, calculate the graph wavelet ψ corresponding to different frequency bands in the sample molecular graph for the scaling parameter s. s In multiple training rounds, based on the node feature matrix X, the physicochemical property labels Y, and the graph wavelet ψ... s The initial low-frequency weight parameter α L The intermediate frequency weighting parameter α M and the high-frequency weighting parameter α H The model parameter matrix W is iteratively optimized to obtain the trained drug analysis model; wherein each training round includes forward propagation and backward propagation, and the optimization objective is to minimize the error between the predicted physicochemical properties output by the model and the physicochemical property label Y.
10. A drug analysis model training device, characterized in that, The device includes: An acquisition unit is used to acquire training sample data, wherein each training sample in the training sample data includes at least one sample drug molecule and a physicochemical property label Y for each sample drug molecule in the at least one sample drug molecule; The second determining unit is used to determine a sample molecular graph based on the molecular structure of the sample drug molecule, including: performing graph modeling based on the molecular structure of the sample drug molecule to obtain the sample molecular graph, and determining the adjacency matrix A and node feature matrix X corresponding to the sample molecular graph. The sample molecular graph includes a set of nodes and a set of edges corresponding to the sample drug molecule. Each node in the node set represents the attribute characteristics of each atom in the molecule. The attribute characteristics of the atom include one or more of the following: atom type, number of chemical bonds, formal charge, number of charges, number of protons, number of neutrons, atomic chirality, number of connected hydrogen atoms, atomic orbitals, and aromaticity. Each edge in the edge set represents the attribute characteristics corresponding to the chemical bonds connecting each atom. The attribute characteristics corresponding to the chemical bonds include at least one of the following: chemical bond type and chemical bond valence state. The second calculation unit is used to: initialize the model parameter matrix W of the drug analysis model, set the low-frequency boundary parameter m, the high-frequency boundary parameter h, the scaling parameter s for the control chart wavelet calculation, and initialize the low-frequency weight parameter α. L Intermediate frequency weighting parameter α M and high-frequency weighting parameter α H Based on the low-to-mid frequency boundary parameter m and the high-to-mid frequency boundary parameter h, the spectral signals in the sample molecular graph are divided into high-frequency signals, mid-frequency signals, and low-frequency signals; based on the adjacency matrix A corresponding to the sample molecular graph, the graph wavelet ψ corresponding to different frequency bands in the sample molecular graph with the scaling parameter s is calculated. s This includes: calculating the graph wavelet ψ corresponding to the high-frequency signal, the mid-frequency signal, and the low-frequency signal in the sample molecular graph based on the adjacency matrix corresponding to the scaling parameter s. s The graph wavelet ψ s It includes a graph wavelet transform basis and a graph wavelet inverse transform basis; wherein, the graph wavelet ψ s The node information used to capture molecules includes local information and global information. The local information represents information within a node cluster, and the global information represents information between node clusters. The third calculation unit is used to calculate the graph wavelet ψ corresponding to different frequency bands in the sample molecular graph. s The calculation of the node representation of the sample molecular graph includes: calculating the node representation of the sample molecular graph based on the node feature matrix X corresponding to the sample molecular graph, the graph wavelet transform basis and the graph wavelet inverse transform basis corresponding to different frequency bands in the sample molecular graph, and the weight parameters corresponding to different frequency bands, wherein the weight parameters in the weight matrix corresponding to different frequency bands are the same. The training unit is used to train the model parameters of the drug analysis model based on the node representations of the sample molecule graph and the physicochemical property labels of each sample drug molecule, so as to obtain a trained drug analysis model. The physicochemical property labels include at least one label selected from the following categories: toxicity, carcinogenicity, solubility, partition coefficient, degree of dissociation, surface activity, thermodynamic properties, and spectral properties of the sample drug molecule. In multiple training rounds, the model parameters are trained based on the node feature matrix X, the physicochemical property labels Y, and the graph wavelet ψ. s The initial low-frequency weight parameter α L The intermediate frequency weighting parameter α M and the high-frequency weighting parameter α H The model parameter matrix W is iteratively optimized to obtain the trained drug analysis model; wherein each training round includes forward propagation and backward propagation, and the optimization objective is to minimize the error between the predicted physicochemical properties output by the model and the physicochemical property label Y.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the steps of the drug analysis method as described in any one of claims 1-3 or the drug analysis model training method as described in any one of claims 4-8.
12. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the steps of the drug analysis method as described in any one of claims 1-3 or the drug analysis model training method as described in any one of claims 4-8 by calling the computer program stored in the memory.
13. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps in the drug analysis method as described in any one of claims 1-3 or the drug analysis model training method as described in any one of claims 4-8.
Citation Information
Patent Citations
Graph neural network training method, graph neural network equipment and device and medium
CN110348573A