Small molecule generation method and device, electronic equipment and storage medium
By constructing a small molecule safety knowledge map and adjusting the generation preferences of the generative model, the problem that the existing technology small molecule generation model cannot effectively evaluate safety is solved, and the generated small molecules are taken into account in terms of efficacy and safety.
Patent Information
- Application Number
- CN202510281618.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2045-03-11
AI Technical Summary
The existing small molecule generation model cannot effectively evaluate the safety of new small molecules, especially when facing complex small molecule structures and variable toxicity mechanisms, it is difficult to comprehensively evaluate the safety of small molecules.
By constructing a small molecule safety knowledge graph, extracting and constructing embedded vectors, screening out important nodes, and adjusting the generation preferences of the small molecule generation model based on these important nodes, so that they generate new small molecules that meet the set toxicity requirements and functional requirements.
It realizes the real-time evaluation and optimization of small molecules' safety during the small molecule generation process, ensuring that the generated small molecules can maximize the avoidance of potential biosafety problems while meeting the drug efficacy needs.
Smart Images

Figure CN119785922A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of small molecule generation, and in particular to a small molecule generation method, device, electronic device and storage medium. Background Art
[0002] In recent years, the design and optimization of small molecule drugs has become a research hotspot in the field of biomedicine, especially playing an important role in new drug development and personalized medicine. Traditional drug design methods rely on empirical rules, chemical synthesis, and in vitro experiments, which are costly, inefficient, and have a long R&D cycle.
[0003] Generative models based on deep learning are widely used in the design of small molecule drugs because they can automatically identify and generate molecules with specific pharmacological activity and low toxicity. For example, the solution disclosed in Chinese patent CN116741309A converts small molecules into 3D molecular graphs and generates new small molecules using a diffusion model. At the same time, a discriminator is constructed using a graph neural network to judge the generated small molecules to ensure that the generated molecules meet the structural requirements of real molecules. However, existing generative models, such as GANs and variational autoencoders (VAE), cannot guarantee the safety of generating new small molecules. Their inferences are mainly focused on the rationality of the molecular structure and the pharmacological properties, but the consideration of the toxic reactions and adverse biological activity evaluation that may be caused by new small molecules is obviously insufficient.
[0004] New small molecules may have unknown toxicity or produce adverse reactions with certain receptors in the human body, which may lead to health problems such as allergies and toxic reactions. Therefore, how to evaluate the potential safety of small molecules in real time during their generation and ensure that the generated small molecules meet the expected biosafety standards has become a technical problem that needs to be solved urgently, especially when faced with complex small molecule structures and variable toxicity mechanisms, it is difficult to fully evaluate the safety of generated small molecules. Summary of the invention
[0005] The main purpose of the present disclosure is to provide a method, device, electronic device and storage medium for generating small molecules, so as to solve the technical problem that the generated new small molecules are not safe due to failure to consider both toxic reactions and pharmacological functions in the related art.
[0006] In order to achieve the above object, the first aspect of the present disclosure provides a method for producing a small molecule, comprising: Acquire a small molecule safety knowledge graph, wherein in the small molecule safety knowledge graph, each of the plurality of nodes stores attribute data of an existing small molecule, and each of the plurality of first branches and leaves stores chemical relationship data between the existing small molecules corresponding to the nodes located at both ends of the first branch and leaf; For each of the existing small molecules, extract the attribute data related to the toxicity type and functional type of the existing small molecule from the corresponding node in the small molecule safety knowledge graph, and construct an embedding vector based on the extracted attribute data; Filter out important nodes of the small molecule safety knowledge graph based on the embedding vector; and, Based on the important nodes, the generation preference of the pre-set small molecule generation model is adjusted so that the small molecule generation model generates new small molecules that meet the set toxicity requirements and the set functional requirements.
[0007] Furthermore, the method further comprises: Predicting the attribute data of the new small molecule based on the small molecule safety knowledge graph; Based on the predicted property data of the new small molecule, evaluating whether the new small molecule has potential toxicity characteristics and whether it meets the biosafety requirements; If the new small molecule contains potential toxicity characteristics or does not meet the biosafety requirements, the new small molecule is eliminated and the new small molecule is generated again; and, If the new small molecule does not contain potential toxic characteristics and meets the biosafety requirements, the new small molecule is output as a small molecule generation result.
[0008] Further, the attribute data is configured to include small molecule ontology terms, chemical structure data, toxicity type data, and target data; and, The chemical relationship data is configured to include first relationship data for characterizing whether there is a pharmacological effect between two adjacent existing small molecules, and second relationship data for characterizing whether one of the two adjacent existing small molecules has an inhibitory effect on the other; The existing small molecules are configured to include harmful small molecules and harmless small molecules.
[0009] Further, the obtaining of the small molecule safety knowledge graph includes: obtaining a plurality of the existing small molecules; For each of the existing small molecules, small molecule ontology terms, toxicity type data, and target data are obtained respectively, and a node of the existing small molecule in the small molecule safety knowledge graph is constructed, and the small molecule ontology terms, the toxicity type data, and the target data are respectively used as subnodes in the node; Obtaining the associated edges between the small molecule ontology term and the toxicity type data and the target data, and constructing the second branch of the existing small molecule in the small molecule safety knowledge graph; and Acquire chemical relationship data between the existing small molecule and other existing small molecules, and construct the first branch and leaf of the existing small molecule in the small molecule safety knowledge graph; Generate the small molecule safety knowledge graph including all the nodes, the first branches and leaves, and the second branches and leaves.
[0010] Further, extracting the attribute data related to the toxicity type and functional type of the existing small molecule from the corresponding node in the small molecule safety knowledge graph, and constructing an embedding vector based on the extracted attribute data, includes: Embedding the small molecule safety knowledge graph through a pre-selected knowledge graph embedding model to obtain an initial embedding vector for each of the existing small molecules, wherein the elements of the initial embedding vector include the attribute data related to the toxicity type and functional type of the existing small molecule in the small molecule safety knowledge graph; External knowledge related to the toxicity type and functional type of the existing small molecule is obtained, and the external knowledge is fused with the initial embedding vector to obtain the finally constructed embedding vector.
[0011] Further, the knowledge graph embedding model is configured as a TransE model; and the important nodes of the small molecule safety knowledge graph are screened out based on the embedding vector, including: Obtaining an importance score for each of the nodes in the small molecule safety knowledge graph by using a pre-selected node importance scoring model, wherein the input of the node importance scoring model includes the embedding vector matched with the node; Key nodes and nodes whose importance scores exceed a set threshold are screened out from all the nodes in the small molecule safety knowledge graph as the important nodes.
[0012] Further, the adjusting of the generation preference of the pre-set small molecule generation model based on the important nodes so that the small molecule generation model generates new small molecules that meet the set toxicity requirements and the set functional requirements includes: Generate a pruned sub-knowledge graph based on the important nodes; Obtaining small molecule preference pairs in the sub-knowledge graph; The generation preference of the small molecule generation model is adjusted according to the small molecule preference pair, so that the new small molecule output by the small molecule generation model meets the characteristics of a harmless small molecule, wherein the small molecule generation model includes a pre-trained language model.
[0013] A second aspect of the present disclosure provides a small molecule generating device, comprising: A graph acquisition unit is configured to acquire a small molecule safety knowledge graph, wherein in the small molecule safety knowledge graph, each of the plurality of nodes stores attribute data of an existing small molecule, and each of the plurality of first branches and leaves stores chemical relationship data between the existing small molecules corresponding to the nodes located at both ends of the first branch and leaf; an embedding representation unit, configured to extract, for each of the existing small molecules, the attribute data related to the toxicity type and the functional type of the existing small molecule from a corresponding node in the small molecule safety knowledge graph, and construct an embedding vector based on the extracted attribute data; a node screening unit, configured to screen out important nodes of the small molecule safety knowledge graph based on the embedding vector; and The small molecule generation unit is configured to adjust the generation preference of the pre-set small molecule generation model based on the important nodes, so that the small molecule generation model generates new small molecules that meet the set toxicity requirements and set functional requirements.
[0014] A third aspect of the present disclosure provides a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the small molecule generation method provided by any one of the schemes of the first aspect.
[0015] The fourth aspect of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor executes the small molecule generation method provided by any one of the schemes of the first aspect above.
[0016] In the small molecule generation method provided in the embodiment of the present disclosure, the knowledge graph is combined with reinforcement learning to provide a knowledge preference optimization enhanced controllable generation scheme based on the small molecule safety knowledge graph, which effectively realizes the fusion of safety assessment and small molecule generation model, combines large-scale pre-training models and knowledge graphs, and guides the safe and controllable generation of small molecules through knowledge preference learning to ensure that the generated small molecules can avoid potential biosafety issues to the greatest extent while meeting the efficacy requirements. Especially in the face of complex small molecule structures and variable toxicity mechanisms, traditional bioinformatics methods are difficult to fully evaluate the safety of generated small molecules. The small molecule generation method provided in the embodiment of the present disclosure can generate new small molecules based on the small molecule safety knowledge graph, and can instantly evaluate and optimize the safety of small molecules during the generation process, ensuring the evaluation and control of potential toxicity risks during the generation process, thereby solving the technical problem that the generated new small molecules are not safe due to the failure to simultaneously consider toxic reactions and pharmacological functions in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A schematic diagram of the steps of the method for generating small molecules provided in the embodiments of the present disclosure; Figure 2 A schematic diagram of the steps for obtaining a graph provided in an embodiment of the present disclosure; Figure 3 A schematic diagram of the embedding representation steps provided for an embodiment of the present disclosure; Figure 4 A schematic diagram of node screening steps provided in an embodiment of the present disclosure; Figure 5 A schematic diagram of the steps for generating small molecules provided in the embodiments of the present disclosure; Figure 6 A block diagram of a small molecule generation device provided in an embodiment of the present disclosure; Figure 7 A block diagram of an electronic device is also provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] In order to enable those skilled in the art to better understand the scheme of the present disclosure, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present disclosure.
[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0021] In the present disclosure, the directions or positional relationships indicated by the terms "upper", "lower", "left", "right", "front", "rear", etc. are based on the directions or positional relationships shown in the drawings. These terms are mainly used to better describe the present disclosure and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific direction, or to be constructed and operated in a specific direction.
[0022] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this disclosure can be understood according to specific circumstances.
[0023] In addition, the terms "disposed", "provided with", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in this disclosure can be understood according to specific circumstances.
[0024] The term "molecular safety knowledge graph" is a comprehensive knowledge system that integrates various knowledge in the field of molecular biology to form a systematic and queryable network. This graph not only helps to deeply understand safety issues at the molecular level, but also provides strong support for drug development, disease diagnosis and other fields.
[0025] The term "toxicity type" mainly includes two types: acute toxicity and chronic toxicity. In addition to the two main toxicity reactions, there are some other types of toxicity, such as thyrotoxicosis, syphilitic encephalitis, etc.
[0026] The term "functional type" refers to a classification based on pharmacological properties, which may include, for example, acting as an agonist, antagonist, or inverse agonist of a receptor.
[0027] The term "knowledge graph embedding method" refers to a technique that maps entities and relations in a knowledge graph into a continuous vector space. Its main purpose is to address the challenges of knowledge graph representation, so that entities and relations in the knowledge graph can be efficiently operated through vector representation, such as relation extraction.
[0028] The term "knowledge graph embedding model" refers to a model used in knowledge graph embedding methods, such as the transfer distance model and the TransE model. The main idea of the transfer distance model is to transform the problem of measuring the rationality of triples in the vectorized knowledge graph into the problem of measuring the distance between the head entity and the tail entity. The focus of this method is how to design a scoring function, which is often designed as a function that uses relations to transfer the rationality of the head entity to the tail entity. The TransE model is inspired by the translation invariance in word vectors and represents both entities and relations as vectors. See the following description for details.
[0029] The term "small molecule preference pair" refers to the preference or selective behavior of certain small molecules under specific conditions. For example, in the field of immunology, a small molecule preference pair can be a certain enzyme or protein that exhibits higher activity or affinity on a specific DNA sequence or structure. Small molecule preference pairs include harmful small molecules and harmless small molecules.
[0030] The term "knowledge preference optimization method", abbreviated as KPO, mainly involves how to optimize the objective function to make the small molecule generation model more in line with user preferences and needs.
[0031] The term "TransE model" is a widely used knowledge graph embedding method. Its main goal is to map entities and relations in the knowledge graph into a low-dimensional continuous vector space. This method represents relations by adding vectors, aiming to solve the semantic computing problem and data sparsity of the knowledge graph. The core idea is to regard the relations in the knowledge base as a kind of translation vector between entities. Specifically, it converts each triple instance (head entity vector h , the relationship vector r , tail entity vector t ) as vector addition. h , r and t ,make h + r As much as possible t Equal, that is h + r = t . The entity vectors and relation vectors of small molecules are embedded into vector space for use in small molecule generation models.
[0032] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0033] The related technology has a technical problem that the new small molecules generated are not safe because the toxic reactions and pharmacological functions are not taken into consideration simultaneously.
[0034] In order to solve the above technical problems, the embodiments of the present disclosure provide a method for generating small molecules. Figure 1 Schematic diagram of the steps of the small molecule generation method provided in the embodiment of the present disclosure. Figure 1 As shown, the small molecule generation method includes the following steps S11 to S14.
[0035] Step S11: Obtain a small molecule safety knowledge graph, wherein, in the small molecule safety knowledge graph, each of a plurality of nodes stores attribute data of an existing small molecule, and each of a plurality of first branches stores chemical relationship data between existing small molecules corresponding to the nodes located at both ends of the first branch.
[0036] Step S12: For each existing small molecule, extract attribute data related to the toxicity type and functional type of the existing small molecule from the corresponding node in the small molecule safety knowledge graph, and construct an embedding vector based on the extracted attribute data.
[0037] Step S13: Filter out important nodes of the small molecule safety knowledge graph based on the embedding vector.
[0038] Step S14: adjusting the generation preference of the pre-set small molecule generation model based on the important nodes, so that the small molecule generation model generates new small molecules that meet the set toxicity requirements and set functional requirements.
[0039] For step S11, the small molecule safety knowledge graph can be an existing graph directly obtained or constructed through sub-steps S111 to S115. The attribute data of the corresponding small molecules can be captured through the nodes in the small molecule safety knowledge graph, and the complex chemical relationship data between small molecules can be captured through the first branches in the small molecule safety knowledge graph.
[0040] For step S12, any knowledge graph embedding method in related technologies, such as the transfer distance model and the TransE model, can be used to extract attribute data related to the toxicity type and functional type of the existing small molecule, construct an embedding vector, and complete the embedding representation function of extracting small molecules and their toxicity-related attributes from the small molecule safety knowledge graph.
[0041] For step S13, there are many screening methods that can be used. In addition to the solutions described in sub-steps S131 to S132 below, deep learning networks, vector machines, etc. can also be used, and the embodiments of the present disclosure do not limit this.
[0042] For step S14, the generation preference of the pre-set small molecule generation model is adjusted based on the important nodes by the knowledge preference optimization method, which can be directly adjusting the parameters of the small molecule generation model based on the important nodes, or it can be the scheme described in sub-steps S141 to S143 in the following text, and the embodiments of the present disclosure are not limited to this. The new small molecule finally generated meets the set toxicity requirements (also called safety drugs) and the set functional requirements (also called efficacy requirements).
[0043] It should be noted that, in addition to the pre-trained language model, the small molecule generation model may also be GANs, variational autoencoders (VAE), etc. The embodiments of the present disclosure are not limited to this.
[0044] Some embodiments of the present disclosure also provide a small molecule generating device, an electronic device, and a storage medium corresponding to the above method.
[0045] The small molecule generation method provided by the embodiment of the present disclosure is applicable to any existing occasion of small molecule safety generation, as well as occasions of knowledge graph application, or other required scenarios, and the embodiment of the present disclosure does not limit this. Compared with the prior art, the small molecule generation method provided by the above-mentioned embodiment of the present disclosure combines the knowledge graph with reinforcement learning, and provides a knowledge preference optimization and enhanced controllable generation scheme based on the small molecule safety knowledge graph, which effectively realizes the fusion of safety assessment and small molecule generation model, combines large-scale pre-training model and knowledge graph, and guides the safe and controllable generation of small molecules through knowledge preference learning, so as to ensure that the generated small molecules can avoid potential biosafety issues to the greatest extent while meeting the efficacy requirements. Especially in the face of complex small molecule structures and variable toxicity mechanisms, traditional bioinformatics methods are difficult to comprehensively evaluate the safety of generated small molecules. The small molecule generation method provided by the embodiment of the present disclosure can generate new small molecules based on the small molecule safety knowledge graph, and can instantly evaluate and optimize the safety of small molecules during the generation process, ensuring the evaluation and control of potential toxicity risks during the generation process, thereby solving the technical problem that the generated new small molecules are not safe due to the failure to consider toxic reactions and pharmacological functions at the same time in the related technology.
[0046] exist Figure 1 Based on the method shown, as a preferred embodiment, the method also includes steps S15 to S18 to complete the safety assessment function of the candidate small molecule.
[0047] Step S15: predicting the attribute data of the new small molecule based on the small molecule safety knowledge graph; Step S16: Based on the predicted property data of the new small molecule, evaluating whether the new small molecule has potential toxicity characteristics and whether it meets the biosafety requirements; Step S17: If the new small molecule contains potential toxicity characteristics or does not meet the biosafety requirements, the new small molecule is eliminated and a new small molecule is generated again; and, Step S18: If the new small molecule does not contain potential toxic characteristics and meets the biosafety requirements, the new small molecule is output as a small molecule generation result.
[0048] Specifically, the property data of the new small molecule is predicted by comparing and verifying the existing data of the existing small molecules in the small molecule safety knowledge graph through step S15. Check whether the small molecule meets the toxicity safety standards through step S16, and evaluate the biological reactions it may cause. This module can be combined with a toxicity database or a bioactivity model to perform accurate risk assessment. The generated small molecules are subjected to biological reaction and toxicity analysis to ensure their biological activity and biosafety, and to ensure that the generated new small molecules do not contain potential toxic characteristics.
[0049] exist Figure 1 Based on the method shown, as another preferred embodiment, the above-mentioned attribute data is configured to include small molecule ontology terms, toxicity type data, target data, and chemical structure data. The chemical relationship data is configured to include first relationship data for characterizing whether there is a pharmacological effect between two adjacent existing small molecules, and second relationship data for characterizing whether one of the two adjacent existing small molecules has an inhibitory effect on the other. The existing small molecules are configured to include harmful small molecules and harmless small molecules.
[0050] In some embodiments of the present disclosure, step S1 may be configured to construct a small molecule safety knowledge graph, which includes harmful small molecules, harmless small molecules and their related properties, and captures the complex chemical relationships between small molecules.
[0051] Figure 2 Schematic diagram of the steps for obtaining the graph provided in the embodiment of the present disclosure. Figure 2 As shown, step S11 further includes the following sub-steps S111 to S115 to complete the function of constructing a small molecule safety knowledge graph.
[0052] Sub-step S111: Acquire multiple existing small molecules.
[0053] Sub-step S112: For each existing small molecule, obtain small molecule ontology terms, toxicity type data, and target data respectively, construct a node of the existing small molecule in the small molecule safety knowledge graph, and use the small molecule ontology terms, toxicity type data, and target data as sub-nodes in the node respectively.
[0054] Sub-step S113: Obtain the associated edges between the small molecule ontology terms and the toxicity type data and target data, and construct the second branches and leaves of the existing small molecules in the small molecule safety knowledge graph.
[0055] Sub-step S114: Obtain the chemical relationship data between the current existing small molecule and other existing small molecules, and construct the first branch and leaf of the existing small molecule in the small molecule safety knowledge graph.
[0056] Sub-step S115: Generate a small molecule safety knowledge graph including all nodes, first branches and leaves, and second branches and leaves.
[0057] Specifically, in some embodiments of the present disclosure, sub-step S111 can collect small molecule data marked as "toxic" and "safe" (antigenic) from public databases such as ChEMBL database, PubChem database, DrugBank database, to form a set of harmful small molecules and a set of harmless small molecules; and collect and organize small molecules with toxic or potentially harmful biological activity or antigenicity and their toxicity description information, and after deduplication and cleaning, construct a set of harmful small molecules. Sub-step S112 can use the small molecule ontology and its toxicity description information (small molecule annotation data), and extract the small molecule ontology structure data, the association relationship between the small molecule and the toxicity ontology, construct sub-nodes such as small molecule ontology terms, toxicity type data, and target data, and characterize the relationship between small molecules and their attributes by constructing triples or higher tuples, for example, <small molecule ontology term (h), relationship (r), toxicity type data or target data (t)>, where the relationship can be "having pharmacological activity" or "having an inhibitory effect on a certain target". Sub-step S113 can construct the associated edges between the small molecule ontology terms and the toxicity type data and the target data (pharmacological reaction) through relationship extraction. Sub-step S115 can form a knowledge graph including harmful small molecules and harmless small molecules, toxicity-related attributes and relationships between small molecules.
[0058] The small molecule safety knowledge graph constructed through sub-steps S111 to S115 can capture the chemical relationships between small molecules and their safety information, providing knowledge support for subsequent small molecule generation models.
[0059] Figure 3 The following is a schematic diagram of the embedding steps provided by the embodiment of the present disclosure. Figure 3 As shown, step S12 further includes the following sub-steps S121 and S122 to complete the embedded representation function of extracting the small molecule sequence.
[0060] Sub-step S121: embed the small molecule safety knowledge graph through a pre-selected knowledge graph embedding model to obtain an initial embedding vector for each existing small molecule, wherein the elements of the initial embedding vector include attribute data related to the toxicity type and functional type of the existing small molecules in the small molecule safety knowledge graph.
[0061] Sub-step S122: Acquire external knowledge related to the toxicity type and functional type (pharmacological properties) of existing small molecules, and fuse the external knowledge with the initial embedding vector to obtain the final constructed embedding vector.
[0062] Specifically, in some embodiments of the present disclosure, the knowledge graph embedding model of substep S121 is configured as a TransE model. By embedding the small molecule safety knowledge graph through the TransE model, the initial embedding vector of the small molecule can be obtained. The TransE model embeds entities and relations in the graph through the following formula: (1) In the formula, is the head entity vector in the small molecule safety knowledge graph (such as small molecule ontology terms), is the tail entity vector in the small molecule safety knowledge graph (such as attribute data related to the toxicity type of small molecules and attribute data related to the functional type), is the relation vector (the embedding vector related to toxicity type and functional type). The goal is to minimize the distance between the head entity adjacent and tail entity vectors by adding the relation vector. Include header entity vector , tail entity vector , relationship vector . Among them, the attribute data related to the functional type is also called pharmacological property data. And, preferably, an interval-based loss function is adopted so that the score of the correct triplet is lower than the score of the incorrect triplet by a safe interval. When updating the model parameters, ensure that the correct embedding vectors are closer in the vector space.
[0063] By minimizing the distance between entities and relations, an initial embedding vector with effective representation is obtained, which supports the subsequent small molecule generation model training.
[0064] In some other embodiments of the present disclosure, sub-step S121 uses a language model to extract the initial embedding vector of the small molecule sequence, including: masking the small molecule sequence to obtain a masked sequence after masking part of the chemical structure or functional description therein; and encoding the masked sequence using a generation method based on a language model (such as BERT) to obtain the initial embedding vector of the small molecule.
[0065] Sub-step S122 converts external knowledge (such as toxicity description and pharmacological function of small molecules) into low-dimensional embedding vectors based on the small molecule safety knowledge graph through the encoder. These low-dimensional embedding vectors are combined with the initial embedding vector of the small molecule itself. A weighted fusion is performed to form a comprehensive, enhanced embedding vector containing pharmacological and toxicological information. That is, the initial embedding vector based on the small molecule sequence and the external knowledge based on the small molecule safety knowledge graph are fused, knowledge is embedded, and an enhanced embedding vector is obtained. External knowledge is embedded into the final embedding vector based on the small molecule safety knowledge graph.
[0066] Figure 4 Schematic diagram of node screening steps provided by the embodiment of the present disclosure. Figure 4As shown, step S13 further includes the following sub-steps S131 and S132 to complete the node screening function.
[0067] Sub-step S131: Obtaining the importance score of each node in the small molecule safety knowledge graph through a pre-selected node importance scoring model, wherein the input of the node importance scoring model includes an embedding vector matching each node.
[0068] Sub-step S132: Filter out key nodes and nodes whose importance scores exceed a set threshold from all nodes in the small molecule safety knowledge graph as important nodes.
[0069] Specifically, in some embodiments of the present disclosure, the input of the node importance scoring model also includes the first branch number and the second branch number of each node. Sub-step S131 calculates the importance score of each node based on the node importance scoring algorithm of weighted indicators, taking into account the connectivity and functional relevance of the node. Nodes whose importance scores exceed the set threshold are screened out based on the connectivity and functional relevance of the nodes, and key nodes can be set and derived. Sub-step S132 is used to generate a pruned sub-knowledge graph by screening out important nodes, retaining key small molecule nodes and high-scoring toxicity-related nodes (nodes with the largest amount of information), and the sub-knowledge graph is used to generate small molecule preference pairs. The graph structure is simplified while retaining core safety information.
[0070] For example, the importance score of each node By its connectivity and functional relevance Determine. Connectivity To measure the node Strength of relationship with other nodes, functional relevance A measure of the importance of a node in small molecule function and toxicity. Node importance score Defined as: (2) In the formula, and It is a weighting factor, which is usually adjusted through experiments or cross-validation to balance the impact of node connectivity and functional relevance on the final result.
[0071] Connectivity Nodes are measured Connectivity in a graph is the number of edges between it and other nodes. In a knowledge graph, connectivity represents the strength of a node's relationship with other nodes, which can usually be calculated as follows: (3) In the formula, Is a node The degree of the node The number of directly connected branches and leaves (including the first branch and leaf, and the second branch and leaf).
[0072] In the small molecule safety knowledge graph, nodes with higher connectivity usually mean that they have more relationships in the graph, so these nodes tend to contain more information and play a more important role in the subsequent small molecule generation and optimization.
[0073] Functional relevance Nodes are measured The relevance to the target function in the small molecule generation task. This relevance is usually based on toxicity relevance and pharmacological relevance. Toxicity relevance is a node Is it closely related to harmful small molecules or toxic properties? Pharmacological relevance is a node Whether it is closely related to pharmacological properties such as pharmacological activity, target, metabolic pathway, etc. Specifically, functional relevance can be quantitatively evaluated based on the relationship between small molecules and their targets, toxicity, efficacy, etc. For example, if the node If it represents a small molecule with important pharmacological effects or specific toxicity characteristics, then the functional relevance of the node is high. It can be calculated by the following formula: (4) In the formula, Representation Node With a certain functional feature (such as toxicity, pharmacological effects, etc.), is the weight associated with each feature, reflecting the importance of the feature in the total relevance.
[0074] Figure 5 Schematic diagram of the steps for generating small molecules provided in the embodiments of the present disclosure. Figure 5 As shown, step S14 further includes the following sub-steps S141 to S143 to complete the function of optimizing the generation model based on the knowledge preference optimization method.
[0075] Sub-step S141: Generate a pruned sub-knowledge graph based on important nodes.
[0076] Sub-step S142: Obtain small molecule preference pairs in the sub-knowledge graph.
[0077] Sub-step S143: adjusting the generation preference of the small molecule generation model according to the small molecule preference pair, so that the new small molecule output by the small molecule generation model meets the characteristics of a harmless small molecule, wherein the small molecule generation model includes a pre-trained language model.
[0078] Specifically, in some embodiments of the present disclosure, sub-step S141 reduces the complexity of graph calculation by pruning graph nodes, optimizes the small molecule safety knowledge graph, and retains only important nodes. In the small molecule safety knowledge graph, there are usually a large number of redundant and low-correlation nodes, and the computational burden can be reduced by sub-step S141. Sub-step S142 constructs small molecule preference pairs based on the structural relationship and embedding vector (potential embedding representation) in the small molecule safety knowledge graph, and generates small molecule preference pairs by identifying harmless small molecules with high correlation with harmful small molecules. Sub-step S143 adjusts the preference of model generation based on the small molecule preference pairs (harmless small molecules and harmful small molecules) in the small molecule safety knowledge graph, so that the generated new small molecules meet the characteristics of harmless small molecules, avoid generating new small molecules with toxic characteristics, and complete the optimization process of the small molecule generation model. The generation process is guided by designing knowledge preference pairs. The preference pairs include pairings of harmless small molecules and harmful small molecules, which are used to train the small molecule generation model to ensure that the generated small molecules meet the safety requirements and give priority to the characteristics of harmless small molecules in the generation process. The knowledge preference optimization method is used to fine-tune the generation model. This optimization method constructs preference pairs between harmless small molecules and harmful small molecules, and optimizes the objective function to make the new small molecules generated by the small molecule generation model more inclined to the characteristics of harmless small molecules, avoiding the generation of small molecules with toxicity or adverse reactions.
[0079] Sub-step S141: According to the node importance score , filtering out the most informative nodes. Nodes with lower importance will be pruned, leaving the core nodes that are most critical to the small molecule generation task. The pruned subgraph will only contain high-scoring nodes and key edges, thus reducing computational complexity.
[0080] Sub-step S143 uses the pruned sub-knowledge graph to train the small molecule generation model based on the learning algorithm of the graph model to ensure that the small molecule generation model can focus on the most important information and improve the generation quality. Through the optimization objective function in the following formula, the knowledge preference optimization method (KPO) is applied to make the small molecule generation model more inclined to generate harmless small molecules and avoid generating small molecules with toxic characteristics. Optimization goal of the small molecule generation model It can be expressed by the following formula: (5) In the formula, It is a harmless small molecule. For harmful small molecules, represents the generation score of the small molecule in brackets, P Preference pair collection for small molecules.
[0081] The design process of optimizing the objective function is as follows: based on the difference between the generated new small molecules and the target harmless small molecules, a loss function is designed; the generated small molecules are combined with the safety assessment results output by the safety assessment model, and the reward function is used to guide the small molecule generation model to generate new small molecules that meet safety standards. By optimizing the objective function to guide the generation model, it is ensured that the generated molecules are closer to the characteristics of harmless small molecules in terms of chemical structure.
[0082] The small molecule generation model fine-tunes (harmless small molecules and harmful small molecules) through small molecule preferences. During the generation process, it gives priority to properties similar to harmless small molecules to avoid generating molecules with potential toxicity. By optimizing the objective function, the small molecule generation model gradually learns the priority generation method of harmless small molecule characteristics. Through the above knowledge preference optimization process, the generated small molecules will gradually meet the efficacy requirements and avoid generating molecules with toxicity or adverse reactions.
[0083] It should be noted that the above steps omit the construction of a small molecule generation model, and the small molecule generation model can use an existing pre-trained language model, etc. The above steps can be performed in a system such as a control chip, and although a logical order is shown, in some cases, the steps described above can be performed in an order different from that shown here.
[0084] From the above description, it can be seen that the present disclosure achieves the following technical effects: 1. This method combines the small molecule safety knowledge graph with the knowledge preference optimization technology to ensure that the generated molecules not only meet the efficacy standards but also have a high degree of biosafety during the small molecule generation process. By constructing a small molecule safety knowledge graph, key information such as the toxicity, pharmacological effects, and molecular targets of small molecules are effectively integrated into the generation model to ensure that the generated small molecules meet the efficacy requirements while meeting high safety standards. This method can effectively identify potentially toxic small molecules and avoid the generation of compounds that do not meet biosafety requirements. 2. Use the knowledge preference optimization method to fine-tune the generative model so that the generated new small molecules give priority to the characteristics of harmless small molecules and avoid the generation of harmless small molecules. By constructing small molecule preference pairs and combining the knowledge preference optimization method, the generative model is guided to give priority to the chemical characteristics of harmless small molecules during the generation process. This optimization process makes the generated molecules not only innovative, but also avoids the generation of potentially toxic molecules, thereby improving the safety and reliability of drug design.
[0085] 3. Generate new small molecules based on the optimized small molecule generation model and enhanced embedding vector. The generated small molecules should not only meet the efficacy requirements, but also meet the biosafety standards.
[0086] 4. The small molecule generation model can be used to generate candidate new small molecules, and further evaluated according to safety requirements through steps S15 to S18. The evaluation method includes comparing the generated small molecules with existing small molecules in the small molecule safety knowledge graph to detect whether the generated small molecules have potential toxic characteristics or adverse reactions.
[0087] 5. This method has strong flexibility and adaptability and can be applied to different types of small molecule generation tasks, including drug design, chemical screening and other fields. Through this flexible generation mechanism, not only can new small molecules with drug efficacy be generated, but also their safety can be ensured, which is suitable for multiple application scenarios such as biopharmaceuticals and environmental protection.
[0088] 6. This method is not limited to the traditional field of drug design, but can also be extended to the generation and optimization of other biomacromolecules, such as proteins, natural products, etc. In addition, with the continuous development of new small molecule databases and safety assessment technologies, it can easily adapt to the needs of these emerging fields and has broad application prospects.
[0089] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0090] The disclosed embodiment also provides a small molecule generating device for implementing the above method embodiment. Figure 6 This is a block diagram of a small molecule generation device provided in an embodiment of the present disclosure. Figure 6 As shown, the small molecule generating device 20 includes a graph acquiring unit 21 , an embedding representation unit 22 , a node screening unit 23 , and a small molecule generating unit 24 .
[0091] The graph acquisition unit 21 is configured to acquire a small molecule safety knowledge graph, wherein in the small molecule safety knowledge graph, each of a plurality of nodes stores attribute data of an existing small molecule, and each of a plurality of first branches stores chemical relationship data between existing small molecules corresponding to the nodes located at both ends of the first branch.
[0092] The embedding representation unit 22 is configured to extract attribute data related to the toxicity type and functional type of the existing small molecule from the corresponding node in the small molecule safety knowledge graph for each existing small molecule, and construct an embedding vector based on the extracted attribute data.
[0093] The node screening unit 23 is configured to screen out important nodes based on the embedding vector.
[0094] The small molecule generation unit 24 is configured to adjust the generation preference of the pre-set small molecule generation model based on the important nodes, so that the small molecule generation model generates new small molecules that meet the set toxicity requirements and set functional requirements.
[0095] In some embodiments of the present disclosure, the graph acquisition unit 21 can construct a small molecule safety knowledge graph, which contains chemical structure information of small molecules, harmful small molecule knowledge, harmless small molecule knowledge, and the association relationship between them. The embedding representation unit 22 uses the TransE model to convert the attribute data of the small molecule into a low-dimensional embedding vector, embeds the small molecule safety knowledge graph, generates the initial embedding vector of the small molecule, and minimizes the distance between the entity and the relationship, thereby obtaining a small molecule vector with an effective representation, and fuses the external knowledge with the initial embedding vector based on the small molecule safety knowledge graph to obtain an enhanced embedding limit. The node screening unit 23 is used to optimize the small molecule safety knowledge graph and reduce the computational burden. In the constructed small molecule safety knowledge graph, there are usually a large number of redundant and low-association nodes. The node screening unit 23 can screen out important nodes based on the connectivity and functional relevance of the nodes by calculating the importance score of each node. The small molecule generation unit 24 can fine-tune the small molecule generation model according to the preference pairs (harmless small molecules and harmful small molecules) in the important nodes to optimize the learning process of the small molecule generation model. Through the knowledge preference optimization method, this module prioritizes the characteristics of harmless small molecules in the generation process, ensuring that the generated molecules are closer to the characteristics of harmless small molecules in chemical structure. The small molecules generated by this module should not only meet the requirements of efficacy, but also meet the biosafety standards.
[0096] In some embodiments of the present disclosure, the small molecule generation device 20 includes a safety assessment module. The safety assessment module is configured to execute the scheme of step S15-step S18. The assessment method includes comparing the generated small molecules with the existing data in the small molecule safety knowledge graph to detect whether the generated small molecules have potential toxic characteristics or adverse reactions. Specifically, it will check whether the small molecules meet the toxicity safety standards and evaluate the biological reactions they may cause. This module can perform accurate risk assessment by combining with a toxicity database or a biological activity model.
[0097] The specific manner in which each unit in the above device embodiment performs operations has been described in detail in the embodiment of the method, and will not be elaborated on here.
[0098] The present disclosure also provides an electronic device, such as Figure 7 As shown, the electronic device 30 includes one or more processors 31 and a memory 32. Figure 7 A processor 31 is taken as an example.
[0099] The controller may further include: an input device 33 and an output device 34 .
[0100] The processor 31, the memory 32, the input device 33 and the output device 34 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0101] The processor 31 may be a central processing unit (CPU), or other general-purpose processors, 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, discrete hardware components, or a combination of the above chips. The general-purpose processor may be a microprocessor or any conventional processor.
[0102] The memory 32 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the control method in the embodiment of the present disclosure. The processor 31 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 32, that is, the small molecule generation method of the above method embodiment is implemented.
[0103] The memory 32 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of a processing device operated by the server, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 32 may optionally include a memory remotely arranged relative to the processor 31, and these remote memories may be connected to a network connection device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0104] The input device 33 can receive input digital or character information, and generate key signal input related to user settings and function control of the processing device of the server. The output device 34 can include display devices such as a display screen.
[0105] One or more modules are stored in the memory 32, and when executed by one or more processors 31, the execution is as follows: Figure 1 The method shown.
[0106] Those skilled in the art can understand that the implementation of all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes in the above method embodiments. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (FM), a hard disk (HDD), or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.
[0107] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for generating small molecules, characterized in that: include: Acquire a small molecule safety knowledge graph, wherein in the small molecule safety knowledge graph, each of the plurality of nodes stores attribute data of an existing small molecule, and each of the plurality of first branches and leaves stores chemical relationship data between the existing small molecules corresponding to the nodes located at both ends of the first branch and leaf; For each of the existing small molecules, extract the attribute data related to the toxicity type and functional type of the existing small molecule from the corresponding node in the small molecule safety knowledge graph, and construct an embedding vector based on the extracted attribute data; Filter out important nodes of the small molecule safety knowledge graph based on the embedding vector; and Based on the important nodes, the generation preference of the pre-set small molecule generation model is adjusted so that the small molecule generation model generates new small molecules that meet the set toxicity requirements and the set functional requirements.
2. The method for producing small molecules according to claim 1, characterized in that: Also includes: Predicting the attribute data of the new small molecule based on the small molecule safety knowledge graph; Based on the predicted property data of the new small molecule, evaluating whether the new small molecule has potential toxicity characteristics and whether it meets the biosafety requirements; If the new small molecule contains potential toxicity characteristics or does not meet the biosafety requirements, the new small molecule is eliminated and the new small molecule is generated again; and, If the new small molecule does not contain potential toxic characteristics and meets the biosafety requirements, the new small molecule is output as a small molecule generation result.
3. The method for producing small molecules according to claim 1 or 2, characterized in that: The attribute data is configured to include small molecule ontology terms, chemical structure data, toxicity type data, and target data; and, The chemical relationship data is configured to include first relationship data for characterizing whether there is a pharmacological effect between two adjacent existing small molecules, and second relationship data for characterizing whether one of the two adjacent existing small molecules has an inhibitory effect on the other; and The existing small molecules are configured to include harmful small molecules and harmless small molecules.
4. The method for producing small molecules according to claim 1 or 2, characterized in that: The obtaining of the small molecule safety knowledge graph comprises: obtaining a plurality of the existing small molecules; For each of the existing small molecules, small molecule ontology terms, toxicity type data, and target data are obtained respectively, and a node of the existing small molecule in the small molecule safety knowledge graph is constructed, and the small molecule ontology terms, the toxicity type data, and the target data are respectively used as subnodes in the node; Obtaining the associated edges between the small molecule ontology term and the toxicity type data and the target data, and constructing the second branch of the existing small molecule in the small molecule safety knowledge graph; and Acquiring chemical relationship data between the existing small molecule and other existing small molecules, and constructing the first branch and leaf of the existing small molecule in the small molecule safety knowledge graph; and, Generate the small molecule safety knowledge graph including all the nodes, the first branches and leaves, and the second branches and leaves.
5. The method for producing small molecules according to claim 1 or 2, characterized in that: The extracting the attribute data related to the toxicity type and functional type of the existing small molecule from the corresponding node in the small molecule safety knowledge graph, and constructing an embedding vector based on the extracted attribute data, comprises: Embedding the small molecule safety knowledge graph through a pre-selected knowledge graph embedding model to obtain an initial embedding vector for each of the existing small molecules, wherein the elements of the initial embedding vector include the attribute data related to the toxicity type and functional type of the existing small molecule in the small molecule safety knowledge graph; External knowledge related to the toxicity type and functional type of the existing small molecule is obtained, and the external knowledge is fused with the initial embedding vector to obtain the finally constructed embedding vector.
6. The method for producing small molecules according to claim 5, characterized in that: The knowledge graph embedding model is configured as a TransE model; and the important nodes of the small molecule safety knowledge graph are screened out based on the embedding vector, including: Obtaining an importance score for each of the nodes in the small molecule safety knowledge graph by using a pre-selected node importance scoring model, wherein the input of the node importance scoring model includes the embedding vector matched with the node; Key nodes and nodes whose importance scores exceed a set threshold are screened out from all the nodes in the small molecule safety knowledge graph as the important nodes.
7. The method for producing small molecules according to claim 1 or 2, characterized in that: The adjusting of the generation preference of the preset small molecule generation model based on the important nodes so that the small molecule generation model generates new small molecules that meet the set toxicity requirements and the set functional requirements includes: Generate a pruned sub-knowledge graph based on the important nodes; Obtaining small molecule preference pairs in the sub-knowledge graph; and, The generation preference of the small molecule generation model is adjusted according to the small molecule preference pair, so that the new small molecule output by the small molecule generation model meets the characteristics of a harmless small molecule, wherein the small molecule generation model includes a pre-trained language model.
8. A small molecule generating device, characterized in that: include: A graph acquisition unit is configured to acquire a small molecule safety knowledge graph, wherein in the small molecule safety knowledge graph, each of the plurality of nodes stores attribute data of an existing small molecule, and each of the plurality of first branches and leaves stores chemical relationship data between the existing small molecules corresponding to the nodes located at both ends of the first branch and leaf; an embedding representation unit, configured to extract, for each of the existing small molecules, the attribute data related to the toxicity type and the functional type of the existing small molecule from a corresponding node in the small molecule safety knowledge graph, and construct an embedding vector based on the extracted attribute data; a node screening unit, configured to screen out important nodes of the small molecule safety knowledge graph based on the embedding vector; and The small molecule generation unit is configured to adjust the generation preference of the pre-set small molecule generation model based on the important nodes, so that the small molecule generation model generates new small molecules that meet the set toxicity requirements and set functional requirements.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the small molecule generation method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor performs the small molecule generation method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Small molecule generation method based on deep learning model
CN116741309A
Construction method and system of small molecule drug crystal form knowledge graph
CN113268605A
Healthy diet knowledge graph construction method and food material recommendation method
CN113486186A
Knowledge representation learning method fusing molecular structure characteristics
CN113590843A
Method for predicting environmental harmfulness of compounds based on machine learning
CN114171137A