Unsupervised drug similarity evaluation method based on graph neural network
By constructing a drug molecule graph and using graph neural networks for information propagation and embedding representation, the negative sample dependency problem in existing drug similarity prediction methods is solved, achieving stable and generalizable drug similarity assessment, which is applicable to drug screening and molecular ranking.
Patent Information
- Application Number
- CN202511144345.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-10-31
AI Technical Summary
Existing binary classification-based drug similarity prediction methods rely on negative sample sets, resulting in unstable performance and poor generalization ability, making them difficult to apply effectively in actual drug development.
An unsupervised model based on graph neural networks is adopted. By constructing a drug molecule graph and extracting multidimensional chemical features, information is propagated using a multilayer graph neural network to learn the embedding representation of the drug molecule graph, and drug similarity is evaluated by combining minimum hypersphere embedding and distance scoring mechanism.
It achieves stable drug similarity assessment independent of negative samples, improves the stability and generalization ability of prediction results, effectively captures molecular topological and chemical properties, provides continuous and interpretable drug similarity scores, and is applicable to drug screening with different chemical diversity and structural similarity.
Smart Images

Figure CN120877946A_ABST
Abstract
Description
Technical fields:
[0001] This invention belongs to the field of computer-aided drug discovery technology, and more specifically, relates to an unsupervised drug similarity evaluation method based on graph neural networks. Background technology:
[0002] With the continuous rise in new drug development costs and persistently high clinical failure rates, how to quickly and accurately screen for promising candidate compounds in the early stages of drug discovery has become a crucial issue for the pharmaceutical industry. Drug similarity, as a key indicator of a compound's potential as a drug candidate, is widely used in scenarios such as virtual drug screening, molecular generation, and lead compound optimization. Traditional drug similarity assessment methods, such as scoring methods based on the Lipinski rule and QED, rely on statistical modeling of physicochemical properties. While intuitive and easy to use, they struggle to characterize the potential relationship between complex structures and activities, especially when faced with overlapping structural distributions.
[0003] With the development of machine learning technology, researchers have attempted to use deep learning models to automatically extract features and classify drugs. However, most current deep learning methods employ a binary classification framework, using "known drugs" as positive samples and "hypothesized non-drug molecules" as negative samples for training. While this method can achieve high accuracy on known datasets, its performance is highly dependent on the quality of the negative samples. In actual drug development, truly "undruggable" negative samples are difficult to define precisely, and their construction often involves random sampling from chemical databases (such as ZINC and GDB17). This approach introduces significant data bias and results in a lack of generalization ability for unseen negative sample types. Therefore, developing an unsupervised drug similarity prediction method that relies solely on real drug data and can stably generalize to sets of molecules with significant structural differences has significant practical application value. Summary of the Invention:
[0004] This invention aims to address the performance instability and poor generalization capabilities of existing binary-class drug similarity prediction methods that rely on negative sample sets. To this end, this invention proposes an unsupervised model based on graph neural networks, trained solely on representations of real drug molecules, to achieve a more robust and interpretable drug similarity scoring method.
[0005] To achieve the above objectives, this invention provides an unsupervised drug similarity evaluation method based on graph neural networks, which includes the following steps:
[0006] S100: By parsing approved real-world drug molecule datasets in SMILES format, a drug molecule graph with atomic attributes is constructed. Each drug molecule is modeled as an attribute graph G = (V, E, X), where V represents the set of atoms in the molecule; E represents the covalent bond connections between atoms; This is a node attribute matrix, where each row corresponds to the eigenvector of an atom, describing its chemical properties. The steps are as follows.
[0007] S101: For each drug molecule, construct a molecular graph G = (V, E, X). Each node in the graph corresponds to an atom. If there is a covalent bond between two atoms, add an edge between their corresponding nodes to represent the connection between the atoms.
[0008] S102: In the molecular diagram, each node attribute is represented by a multidimensional feature vector of the corresponding atom. The feature acquisition method is as follows: (1) Atom type encoding: Construct a unique thermal vector encoding according to the atom type [carbon, nitrogen, oxygen, sulfur, fluorine, phosphorus, chlorine, bromine, iodine, others]. For example, the encoding of oxygen atom is [0,0,1,0,0,0,0,0,0,0]. (2) Hydrogen atom number encoding: Construct a unique thermal vector encoding according to the number of hydrogen atoms directly connected to the atom [0,1,2,3,4,5, others]. (3) Atom degree encoding: Construct a unique thermal vector encoding according to the number of connections between the atom and other non-hydrogen atoms [0,1,2,3,4,5, others]. (4) Implicit valence encoding: Construct a unique thermal vector encoding according to the implicit valence value of the atom: [0,1,2,3,4, others]. (5) Aromaticity identifier: Construct an encoding according to the atom taking a value of 1 in the aromatic ring structure and a value of 0 in the non-aromatic ring structure. Finally, the generated codes are concatenated in sequence into a fixed-length vector, which serves as the attribute vector for the node.
[0009] S103: The completed molecular diagram can be represented as G=(V,E,X), where V represents the set of atoms in the molecule, and E represents the set of covalent bonds between atoms. It is a matrix composed of node attributes, where each row of the matrix corresponds to a multidimensional feature representation of an atom.
[0010] S200: Construct a graph neural network model to learn the representation of the drug molecule graph structure generated in step S100, extracting the embedding representation of the graph structure in the vector space. The graph neural network, through a layer-by-layer information propagation mechanism, enables nodes to fuse structural and attribute information from multi-order neighbors, thereby learning a discriminative graph representation. The steps are as follows.
[0011] S201: Construct an L-layer graph neural network, where each layer employs an iterative message-passing mechanism, and nodes update their representations through information exchange with their neighbors. The preferred L-layer graph neural network is a three-layer graph neural network. Specifically, for any node v∈V, its representation update rule in the l-th layer is: in, Let N(v) represent the representation of node v at level l, and let N(v) represent the set of neighboring nodes of node v. l For the learnable weights of the l-th layer, MLP l This is a two-layer multilayer perceptron, where the l-th layer is the nonlinear transformer. l The hierarchy includes Linear, BatchNorm, ReLU, and Dropout operations.
[0012] S202: Preferably, after processing by a three-layer graph neural network, the representation set of all nodes in the molecular graph G=(V,E,X) is obtained, denoted as {h1,…,h...}. n}. Average pooling is used to obtain the graph representation from the final representation set of the nodes, according to the following rules: Among them, H G Let n represent the overall representation of graph G, where n is the number of nodes in graph G.
[0013] S203: Preferably, for all molecular graph structure data constructed in step S100, a three-layer graph neural network is used to obtain its corresponding graph-level representation set, denoted as {H1,…,H...}. m The representation center C of a graph is obtained from its representation set according to the following rule: Where m is the number of drug molecule maps.
[0014] S204: To learn a well-aggregated and compactly distributed graph representation space of drug molecules, the objective loss function for training the graph neural network is set as follows: Among them, W l Let L be the learnable parameters of the l-th layer of the graph neural network; λ is the regularization weight coefficient. Preferably, L = 3, meaning the graph neural network has three layers. By minimizing the above loss function, the graph neural network model is trained, and the trained model is saved for subsequent candidate molecule scoring.
[0015] S300: Based on the drug molecule graph representation set {H1,…,H...} obtained in step S203. m Given a graph representation and its center C, calculate the Euclidean distance of each graph representation to center C. Further, sort all distances in ascending order and record the distance D corresponding to the third-quarter digit. Q3 , represents the boundary of the more concentrated area; records the maximum distance D max, representing the drug molecule furthest from the center. At this point, the smallest hypersphere drug molecule representation space, constructed from the drug molecule diagram centered at C, is obtained.
[0016] S400: The candidate molecules to be evaluated are converted into attributed molecular graph structures according to the method in step S100, and their graph-level representations are extracted using a trained graph neural network model. Based on the distance between the representation center C of the candidate molecule graph and the representation center C of the drug molecule graph, combined with the boundary parameter D of the minimum hypersphere... Q3 and D max Candidate molecules are scored for drug similarity. The scoring results can be used to screen potential drug molecules. The steps are as follows.
[0017] S401: Construct the molecular graph G′=(V′,E′,X′) of the candidate molecules to be scored using the same procedure as in step S100.
[0018] S402: Input G′ into the trained graph neural network model to obtain the graph-level representation H of G′. G′ .
[0019] S403: Calculate the representation H of G′ G′ The Euclidean distance between the drug molecule characterization center C and the drug molecule characterization center C is denoted as D. G′ .
[0020] S404: Distance D calculated based on step S403 G′ According to the scoring function Calculate the similarity score of candidate molecular drugs. The score ranges from (0,1), with a higher score indicating a higher similarity between the candidate molecular drugs.
[0021] This invention presents an unsupervised drug similarity evaluation method based on graph neural networks. Addressing the technical problems of performance instability and insufficient generalization ability caused by the reliance on negative sample sets in existing binary drug similarity prediction methods, a novel framework is proposed. First, approved drug molecules represented in SMILES format are parsed into molecular graph structures with atomic attributes, and the multidimensional chemical features of atoms are extracted as node attributes. Second, a multi-layer graph neural network is constructed, fusing multi-order neighbor information through an iterative message passing mechanism. Average pooling is used to obtain the overall representation of the molecular graph, and the representation center is calculated based on the set of all drug molecule representations, forming a drug molecule representation space. Third, the graph neural network model is optimized by minimizing the Euclidean distance between drug molecule embeddings and representation centers, resulting in a compact and transferable drug molecule embedding space. Finally, in the prediction stage, candidate molecules are transformed into molecular graphs and their representations are obtained. The distance between the candidate molecule and the drug molecule representation center is calculated, and drug similarity scoring is performed using the boundary parameters of the minimum hypersphere, achieving a quantitative assessment of the drug potential of candidate molecules.
[0022] The present invention has the following beneficial effects:
[0023] (1) This invention proposes a drug similarity evaluation method that does not rely on a negative sample set and is trained solely on real drug molecules. This overcomes the performance fluctuations and model biases caused by the construction of negative samples in existing binary classification methods, and significantly improves the stability and generalization ability of the prediction results.
[0024] (2) The drug molecule characterization space constructed in this invention is based on the structure-aware features automatically extracted by graph neural networks, which can effectively capture the comprehensive information of molecular topology and chemical properties. Compared with traditional methods based on rules or manual features, it has stronger discrimination ability and adaptability.
[0025] (3) The minimum hypersphere embedding and distance scoring mechanism proposed in this invention can provide candidate molecules with continuous and interpretable drug similarity scores, which facilitates molecular ranking, priority assessment and multi-stage filtering in the actual drug screening process.
[0026] (4) The unsupervised training strategy of the present invention eliminates the dependence on artificially constructed negative samples, so that the model exhibits stable performance under different chemical diversity and structural similarity conditions, and is suitable for promotion and application in different data scales and different drug development scenarios. Attached image description:
[0027] Figure 1 This is a flowchart illustrating a specific implementation of an unsupervised drug similarity evaluation method based on graph neural networks according to the present invention.
[0028] Figure 2 This is a schematic diagram illustrating the operation of an unsupervised drug similarity evaluation method based on graph neural networks according to the present invention. Detailed implementation method:
[0029] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.
[0030] Example
[0031] Figure 1 This is a flowchart illustrating a specific implementation of an unsupervised drug similarity evaluation method based on graph neural networks according to the present invention. Figure 1 As shown, the specific steps of the unsupervised drug similarity evaluation method based on graph neural networks of the present invention include:
[0032] S100: In this embodiment, an approved drug molecule database is selected as the positive sample dataset. The data is stored in SMILES format, and a drug molecule graph with atomic attributes is constructed. Each drug molecule is modeled as an attribute graph G = (V, E, X), where V represents the set of atoms in the molecule; E represents the covalent bond connection between atoms; This is a node attribute matrix, where each row corresponds to the eigenvector of an atom, describing its chemical properties. The steps are as follows.
[0033] S101: For each drug molecule, construct a molecular graph G = (V, E, X). Each node in the graph corresponds to an atom. If there is a covalent bond between two atoms, add an edge between their corresponding nodes to represent the connection between the atoms.
[0034] S102: In the molecular diagram, each node attribute is represented by a multidimensional feature vector of the corresponding atom. The feature acquisition method is as follows: (1) Atom type encoding: Construct a unique thermal vector encoding according to the atom type [carbon, nitrogen, oxygen, sulfur, fluorine, phosphorus, chlorine, bromine, iodine, others]. For example, the encoding of oxygen atom is [0,0,1,0,0,0,0,0,0,0]. (2) Hydrogen atom number encoding: Construct a unique thermal vector encoding according to the number of hydrogen atoms directly connected to the atom [0,1,2,3,4,5, others]. (3) Atom degree encoding: Construct a unique thermal vector encoding according to the number of connections between the atom and other non-hydrogen atoms [0,1,2,3,4,5, others]. (4) Implicit valence encoding: Construct a unique thermal vector encoding according to the implicit valence value of the atom: [0,1,2,3,4, others]. (5) Aromaticity identifier: Construct an encoding according to the atom taking a value of 1 in the aromatic ring structure and a value of 0 in the non-aromatic ring structure. Finally, the generated codes are concatenated in sequence into a fixed-length vector, which serves as the attribute vector for the node.
[0035] S103: The completed molecular diagram can be represented as G=(V,E,X), where V represents the set of atoms in the molecule, and E represents the set of covalent bonds between atoms. It is a matrix composed of node attributes, where each row of the matrix corresponds to a multidimensional feature representation of an atom.
[0036] S200: Construct a graph neural network model to learn the representation of the drug molecule graph structure generated in step S100, extracting the embedding representation of the graph structure in the vector space. The graph neural network, through a layer-by-layer information propagation mechanism, enables nodes to fuse structural and attribute information from multi-order neighbors, thereby learning a discriminative graph representation. The steps are as follows.
[0037] S201: Preferably, a three-layer graph neural network is constructed, with each layer employing an iterative message-passing mechanism. Nodes update their representations through information exchange with their neighboring nodes. Specifically, for any node v∈V, its representation update rule in the l-th layer is: in, Let N(v) represent the representation of node v at level l, and let N(v) represent the set of neighboring nodes of node v. l For the learnable weights of the l-th layer, MLP l This is a two-layer multilayer perceptron, where the l-th layer is the nonlinear transformer. l The layers include Linear, BatchNorm, ReLU, and Dropout operations. Each layer has a hidden dimension of 64.
[0038] S202: Preferably, after processing by a three-layer graph neural network, the representation set of all nodes in the molecular graph G=(V,E,X) is obtained, denoted as {h1,…,h...}. n}. Average pooling is used to obtain the graph representation from the final representation set of the nodes, according to the following rules: Among them, H G Let n represent the overall representation of graph G, where n is the number of nodes in graph G.
[0039] S203: Preferably, for all molecular graph structure data constructed in step S100, a three-layer graph neural network is used to obtain its corresponding graph-level representation set, denoted as {H1,…,H...}. m The representation center C of a graph is obtained from its representation set according to the following rule: Where m is the number of drug molecule maps.
[0040] S204: To learn a well-aggregated and compactly distributed graph representation space of drug molecules, the objective loss function for training the graph neural network is set as follows: Among them, W l Let L be the learnable parameters of the l-th layer of the graph neural network; λ is the regularization weight coefficient. Preferably, L = 3, meaning the graph neural network has three layers. Preferably, λ = 1.0, the optimizer is Adam, and the learning rate and weight decay are selected via grid search, with ranges of {10}. -4 10 -3 10 -2} and {10 -4 10 -3 By minimizing the above loss function, the graph neural network model is trained, and the trained model is saved for subsequent candidate molecule scoring.
[0041] S300: Based on the drug molecule graph representation set {H1,…,H...} obtained in step S203. mGiven a graph representation and its center C, calculate the Euclidean distance of each graph representation to center C. Further, sort all distances in ascending order and record the distance D corresponding to the third-quarter digit. Q3 , represents the boundary of the more concentrated area; records the maximum distance D max , representing the drug molecule furthest from the center. At this point, the smallest hypersphere drug molecule representation space, constructed from the drug molecule diagram centered at C, is obtained.
[0042] S400: The candidate molecules to be evaluated are converted into attributed molecular graph structures according to the method in step S100, and their graph-level representations are extracted using a trained graph neural network model. Based on the distance between the representation center C of the candidate molecule graph and the representation center C of the drug molecule graph, combined with the boundary parameter D of the minimum hypersphere... Q3 and D max The candidate molecules are scored for drug similarity. The scoring results can be used to screen potential drug molecules. A schematic diagram of the operation is shown below. Figure 2 As shown, the steps are as follows.
[0043] S401: Construct the molecular graph G′=(V′,E′,X′) of the candidate molecules to be scored using the same procedure as in step S100.
[0044] S402: Input G′ into the trained graph neural network model to obtain the graph-level representation H of G′. G′ .
[0045] S403: Calculate the representation H of G′ G′ The Euclidean distance between the drug molecule characterization center C and the drug molecule characterization center C is denoted as D. G′ .
[0046] S404: Distance D calculated based on step S403 G′ According to the scoring function Calculate the similarity score of candidate molecular drugs. The score ranges from (0,1), with a higher score indicating a higher similarity between the candidate molecular drugs.
[0047] To verify the effectiveness of the proposed graph neural network-based drug molecule similarity assessment method, specific examples were used for experimental verification. This experimental verification utilized publicly available chemical molecule datasets. Worlddrug and FDA are two well-known drug molecule datasets, used as positive samples in the experiment. The Worlddrug dataset served as the training set, and the FDA dataset as the test set. To ensure fairness in the evaluation, if a Worlddrug molecule had a Tanimoto similarity greater than or equal to 0.8 with any FDA molecule, that molecule was removed from Worlddrug. The GDB17 dataset, consisting of molecules with no more than 17 C, N, O, S, and halogen atoms, served as the negative sample set. The ZINC15 dataset, composed of commercially available compounds suitable for virtual screening, served as the negative sample set. The ChEMBL dataset contains molecules known to have biological activity. We selected only highly biologically active molecules with pChEMBL values ≥ 5.85 as the negative sample set. For the test set, FDA was used as the positive sample set, and 10,000 molecules were randomly selected from each negative sample set as the test count. Detailed descriptions of the datasets are shown in the table below.
[0048] Table 1 Information about the experimental dataset
[0049]
[0050]
[0051] To ensure the fairness and unbiasedness of the experimental evaluation, during the training phase, all compounds with a Tanimoto similarity greater than or equal to 0.8 to any molecule in the FDA dataset were removed from the WorldDrug training set. This avoids data leakage and performance overestimation due to overlapping training and testing data structures. The method of this invention did not encounter any compounds from the FDA, ChEMBL, ZINC15, and GDB17 datasets during the training phase. In the molecular graph representation learning phase, a three-layer graph neural network was constructed, with each layer containing a two-layer multilayer perceptron. The structure consisted of Linear, BatchNorm, ReLU, and Dropout, with the hidden dimension of each layer fixed at 64 to ensure consistent output embedding dimensions. After node-level information transfer, average pooling was used to aggregate the node representations into a single graph-level representation. The model training used the Adam optimizer, with a total of 150 training epochs, a batch size of 64, a Dropout ratio of 0.2, and a fixed regularization coefficient λ of 1.0. The optimal hyperparameter combination was determined through grid search, with the learning rate within the range of {10...}. -4 10 -3 10 -2 Search within the range}, the weight decay parameter is in {10} -4 10 -3The search was conducted within the range of 0, and a learning rate of 10 was ultimately selected. -3 Weight decay 10 -4 As the optimal configuration.
[0052] Table 2 Comparison of drug similarity assessment methods across different datasets
[0053]
[0054] The experimental results are shown in Table 2, comparing drug similarity assessment methods on different datasets. In the table, "Max Pooling" and "Average Pooling" represent two variants of the proposed unsupervised drug similarity prediction boxes. They employ the same graph neural network architecture but differ in their readout strategies for obtaining graph-level representations. "Average Pooling" is the method proposed in this invention, while "Max Pooling" is a control scheme that replaces the readout strategy for obtaining graph-level representations in this invention with max pooling. QED represents a rule-based drug similarity scoring function derived from an idealized function of physicochemical properties. "Supervised Model" represents a three-layer graph neural network model that uses max pooling in the graph-level representation extraction stage, followed by training using a multilayer perceptron classifier. The training data includes manually labeled negative samples. This invention's method, without using any negative samples for training and without knowledge of their distribution, can still effectively distinguish between drug-like and non-drug-like molecules in test sets across three different chemical spaces, and maintains stable performance under varying chemical diversity conditions. This demonstrates that training solely on real drug molecules can construct a stable and transferable molecular similarity metric, fundamentally alleviating the difficulty of constructing high-quality negative samples in binary classification frameworks. Comparative experimental results show that replacing average pooling with max pooling leads to performance degradation on all test sets, indicating that average pooling can more comprehensively preserve the global feature distribution of the molecular graph, thereby generating a more discriminative graph-level embedding representation. Furthermore, comparing the method of this invention with the drug similarity scoring method QED based on physicochemical property rules shows that QED's performance on all three test sets is significantly lower than the two pooling variants of the method of this invention. To verify the robustness of the method to negative sample selection, an additional supervised model based on a three-layer graph neural network was constructed for comparison. This model uses the WorldDrug dataset as positive samples and randomly selects 50% of the ChEMBL compounds as negative samples for training, with the remaining ChEMBL compounds used as the test set. The results show that the supervised model performs well on negative samples seen during training, but its performance is unstable on unseen ZINC15 and GDB17 test sets. In contrast, the unsupervised method of this invention performs more consistently and is more generalizable across different chemical spaces. Furthermore, experiments revealed that the method of this invention has a higher average precision (AP) in classification tasks, but a relatively lower AUROC value. This is mainly due to the significantly fewer positive FDA drug molecules than negative compounds in the test set, resulting in class imbalance.
[0055] Based on the above experimental results, the unsupervised drug molecule similarity assessment method based on graph neural networks proposed in this invention can construct a stable, compact, and generalizable molecular representation space without the need for negative samples, significantly improving the efficiency and accuracy of candidate molecule screening in the early stages of drug discovery, and has good practical value and industrial application potential.
[0056] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. An unsupervised drug similarity evaluation method based on graph neural networks, characterized in that, Includes the following steps: S100: By parsing approved real-world drug molecule datasets in SMILES format, a drug molecule graph with atomic attributes is constructed. Each drug molecule is modeled as an attribute graph G = (V, W, X), where V represents the set of atoms in the molecule; E represents the covalent bond connections between atoms; This is a node attribute matrix, where each row corresponds to the feature vector of an atom, describing its chemical properties. S200: Construct a graph neural network model to learn the representation of the drug molecule graph structure generated in step S100, extracting the embedding representation of the graph structure in the vector space. The graph neural network, through a layer-by-layer information propagation mechanism, enables nodes to fuse structural and attribute information from multi-order neighbors, thereby learning a discriminative graph representation. S300: Based on the drug molecule graph representation set {H1,…,H...} obtained in step S203. m Given a graph representation and its center C, calculate the Euclidean distance of each graph representation to center C. Further, sort all distances in ascending order and record the distance D corresponding to the third-quarter digit. Q3 , represents the boundary of the more concentrated area; records the maximum distance D max , representing the drug molecule furthest from the center. At this point, the smallest hypersphere drug molecule representation space, constructed from the drug molecule diagram centered at C, is obtained. S400: The candidate molecules to be evaluated are converted into molecular graph structures with attributes according to the method in step S100, and their graph-level representations are extracted using a trained graph neural network model. Based on the distance between the characterization centers C of the candidate molecule map and the drug molecule map, combined with the boundary parameter D of the minimum hypersphere. Q3 and D max Candidate molecules are scored for drug similarity. The scoring results can be used to screen potential drug molecules.
2. The unsupervised drug similarity evaluation method based on graph neural networks according to claim 1, characterized in that, The steps in step S100 for constructing the drug molecule map with atomic properties include: S101: For each drug molecule, construct a molecular graph G = (V, E, X). Each node in the graph corresponds to an atom. If there is a covalent bond between two atoms, add an edge between their corresponding nodes to represent the connection between the atoms. S102: In the molecular diagram, each node attribute is represented by a multidimensional feature vector of the corresponding atom. The feature acquisition method is as follows: (1) Atom type encoding: Construct a unique thermal vector encoding according to the atom type [carbon, nitrogen, oxygen, sulfur, fluorine, phosphorus, chlorine, bromine, iodine, others]. (2) Hydrogen atom number encoding: Construct a unique thermal vector encoding according to the number of hydrogen atoms directly connected to the atom [0, 1, 2, 3, 4, 5, others]. (3) Atom degree encoding: Construct a unique thermal vector encoding according to the number of connections between the atom and other non-hydrogen atoms [0, 1, 2, 3, 4, 5, others]. (4) Implicit valence encoding: Construct a unique thermal vector encoding according to the implicit valence values of the atom: [0, 1, 2, 3, 4, others]. (5) Aromaticity identifier: Construct an encoding according to the atom taking a value of 1 in the aromatic ring structure and a value of 0 outside the aromatic ring structure. Finally, the above generated encodings are concatenated in order into a vector of fixed length, which serves as the attribute vector of the node. S103: The completed molecular diagram can be represented as G=(V,E,X), where V represents the set of atoms in the molecule, and E represents the set of covalent bonds between atoms. It is a matrix composed of node attributes, where each row of the matrix corresponds to a multidimensional feature representation of an atom.
3. The unsupervised drug similarity evaluation method based on graph neural networks according to claim 1, characterized in that, The step S200 of extracting the drug molecule diagram structure and embedding its representation in the vector space includes: S201: Construct an L-layer graph neural network, where each layer employs an iterative message-passing mechanism, and nodes update their representations through information exchange with their neighbors. Specifically, for any node v∈V, its representation update rule in the l-th layer is: in, Let N(v) represent the representation of node v at level l, and let N(v) represent the set of neighboring nodes of node v. l For the learnable weights of the l-th layer, MLP l This is a two-layer multilayer perceptron, where the l-th layer is the nonlinear transformer. l The hierarchy includes Linear, BatchNorm, ReLU, and Dropout operations. S202: After processing by an L-layer graph neural network, the representation set of all nodes in the molecular graph G=(V,E,X) is obtained, denoted as {h1,…,h...}. n }. Average pooling is used to obtain the graph representation from the final representation set of the nodes, according to the following rules: Among them, H G Let n represent the overall representation of graph G, where n is the number of nodes in graph G. S203: For all molecular graph structure data constructed in step S100, an L-layer graph neural network is used to obtain their corresponding graph-level representation set, denoted as {H1,…,H...}. m The representation center C of a graph is obtained from its representation set according to the following rule: Where m is the number of drug molecule maps. S204: Set the target loss function for training the graphical neural network as follows: Among them, W l Let be the learnable parameters of the l-th layer of the graph neural network; λ be the regularization weight coefficient. By minimizing the above loss function, the graph neural network model is trained, and the trained model is saved for subsequent candidate molecule scoring.
4. The unsupervised drug similarity evaluation method based on graph neural networks according to claim 1, characterized in that, The step of scoring the drug similarity of the candidate molecules to be evaluated in step S400 includes: S401: Construct the molecular graph G′=(V′,E′,X′) of the candidate molecules to be scored using the same procedure as in step S100. S402: Input G′ into the trained graph neural network model to obtain the graph-level representation H of G′. G′ . S403: Calculate the representation H of G′ G′ The Euclidean distance between the drug molecule characterization center C and the drug molecule characterization center C is denoted as D. G′ . S404: Distance D calculated based on step S403 G′ According to the scoring function The similarity score of the candidate molecular drugs was calculated. The score ranges from (0,1), and the higher the score, the higher the similarity of the candidate molecular drugs.