Sequentially-aware string-based molecular representations for conditional molecule generation
By maintaining the consistency of molecular traversal order through the O-SMILES method, the problem of high molecular representation complexity in existing technologies is solved, enabling more efficient conditional molecule generation and model training.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MICROSOFT TECHNOLOGY LICENSING LLC
- Filing Date
- 2024-01-12
- Publication Date
- 2026-07-14
Smart Images

Figure CN122397085A_ABST
Abstract
Description
Background Technology
[0001] Effective molecular representation is a fundamental part of chemical research, applied in fields such as drug discovery and materials design. Two common types of molecular representation are molecular diagrams and string-based sequences. Molecular diagrams consist of atoms as nodes and chemical bonds as edges between nodes. They are powerful tools for describing the topological structure of molecules and are widely used for visualization. The most common string-based sequence representation is the Simplified Molecular Linear Input System (SMILES), a way of representing molecules and reactions using linear notation, which facilitates their storage and input into computer systems.
[0002] Conditional molecule generation (a key application in computer-aided drug discovery) involves generating target molecules based on conditional inputs. This can include forward synthesis prediction, retrosynthesis prediction, and molecular property improvement. The inherent vastness of the search space with all possible transformations makes conditional molecule generation a formidable challenge. Traditional methods rely on human-designed rules and expert chemical knowledge. Computer-aided planning programs have also been available for many years. However, the increasing number of chemical reaction rules makes manually hard-coding these rules into computer systems impractical and inefficient. Recently, researchers have begun to explore fully data-driven approaches relying on artificial intelligence and machine learning, thereby eliminating the need for expertise or manual rule coding.
[0003] However, representing molecules in a way that is easily interpretable by current machine learning models can be challenging. Therefore, there is a need for a molecular representation that can be easily understood and efficiently processed by machine learning models. This disclosure is made in response to these and other considerations. Summary of the Invention
[0004] This disclosure relates to a technique for sequence-aware string-based molecular representation, specifically designed for conditional molecule generation using machine learning. This disclosure provides a novel molecular representation method. This molecular representation method uses text strings to represent molecules and is based on SMILES; however, it can also be used with other string-based representations besides SMILES. The molecular representation of this disclosure may be referred to as sequence-aware SMILES or "O-SMILES".
[0005] The standard normalization algorithm used by SMILES to generate string-based representations of molecules is not sequence-aware. Canonical SMILES generates a string-based representation of each molecule independently, without considering any relationships between molecules in a chemical reaction. Due to the rules used when generating string-based representations of molecules with SMILES, two molecules with very similar structures may be represented by different text strings. This presents problems when using SMILES strings to train machine learning models to perform conditional molecule generation. The complexity of the chemical rules defined in the canonical SMILES grammar affects the text strings representing molecules, making it difficult for the decoder to autoregressively learn the relationships between the source and target molecules used for training. This is because the machine learning model attempts to learn the SMILES grammar rules, as well as molecular and chemical changes, in order to understand the relationships between the source and target SMILES.
[0006] To generate text string representations, there exists a traversal order for molecules, specifying the order in which atoms are represented in the text string. Changing the traversal order can lead to different text strings being generated for the same molecule. The O-SMILES technique differs from canonical SMILES and other techniques for string-based molecular representations because it attempts to maintain the same traversal order as much as possible between the source and target molecules. String-based molecular representations of the source and target molecules generated in this order-aware manner can be used to train machine learning models for conditional molecule generation. O-SMILES utilizes the traversal order of the source molecule as a priori and follows it to traverse the target molecule, thus eliminating the need for the decoder to infer and predict atomic orders. Because the traversal order is consistent, the differences in the text strings used for training primarily stem from actual differences in chemical structure. Removing the confounding differences introduced solely by the techniques used to generate string-based molecular representations simplifies decoder generation and potentially reduces overfitting.
[0007] This technique maintains the same traversal order by using the same root node for both the source and target molecules and assigning unique sequences to the atoms in the source molecule. The string-based molecular representation of the target molecule is then determined by mapping the same atoms in the source molecule to those in the target molecule according to this sequence. The correspondence between atoms in the source and target molecules can be identified using an atom mapper. Using the same root node and the same traversal order to generate the SMILES representations of the source and target molecules makes the two SMILES strings more similar than strings generated using different techniques. This similarity can be measured by the edit distance between the source and target molecule strings.
[0008] The string-based molecular representations of the source and target molecules created using this technique were then used to train a machine learning model for conditional molecule generation. Due to the similarity of the string-based molecular representations, the machine learning model can learn chemical and molecular relationships without being misled by differences introduced solely by how the SMILES string is generated. Once trained, the machine learning model is used to perform conditional molecule generation tasks such as retrosynthetic prediction, forward reaction prediction, and molecular property improvement.
[0009] Features and technical benefits beyond those explicitly described above will become apparent from reading the following detailed description and viewing the associated drawings. This summary is provided to present, in a simplified form, the selection of concepts further described below in the detailed description. This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to help determine the scope of the claimed subject matter. For example, the term "technology" may refer to systems, methods, computer-readable instructions, modules, algorithms, hardware logic, and / or operations permitted in the foregoing context and throughout this document. Attached Figure Description
[0010] Detailed embodiments are described with reference to the accompanying drawings. In the drawings, the leftmost numeral of the reference numeral indicates the drawing in which that reference numeral first appears. Identical reference numerals in different drawings indicate similar or identical items. References to individual items among multiple items can use reference numerals with letters in a letter sequence to refer to each individual item. General references to items can use specific reference numerals without a letter sequence.
[0011] Figure 1 This is a diagram illustrating the use of a machine learning model to perform conditional molecule generation.
[0012] Figure 2 It is a graph that compares the traversal order of molecules used to generate string-based representations with canonical SMILES, R-SMILES, and O-SMILES.
[0013] Figure 3 This is a diagram of a pipeline for generating string-based molecular representations of source and target molecules using the techniques disclosed herein.
[0014] Figure 4 This is a flowchart of a method for generating string-based molecular representations of source and target molecular models for training machine learning models.
[0015] Figure 5 This is a flowchart of a method for performing conditional molecule generation using a machine learning model.
[0016] Figure 6It is an illustrative computer architecture diagram showing the computing device that enables the implementation of various aspects of the technologies and techniques presented herein, including computer hardware and software architecture. Detailed Implementation
[0017] This disclosure provides a technique for generating string-based molecular representations of molecules that are well-suited for training machine learning models. Molecules can be part of a labeled training dataset, such as a collection of chemical reactions including reactants and products. The technique of this disclosure generates string-based molecular representations in a sequence-aware manner, such that the structural similarity between a pair of molecules in the training data is reflected in the order of characters in the string-based molecular representation.
[0018] Training datasets containing this type of string-based molecular representation can be used to train machine learning models to perform conditional molecule generation. Conditional molecule generation is a method used in drug discovery and molecular design, where machine learning models learn the distribution of molecular structures with given properties. It involves generating one or more target molecules based on one or more source molecules and conditional inputs. The conditional inputs can be specific properties and characteristics desired for the target molecule. Examples of conditional molecule generation include forward synthesis prediction, retrosynthesis prediction, and molecular property improvement.
[0019] Forward synthesis prediction involves predicting the reaction outcome (product) given a set of substrates (reactants and reagents). Retrosynthesis predicts possible reactants for the product molecule. This process involves converting the product molecule into a simpler precursor structure, regardless of any potential reactivity or interaction with the reagents. Each precursor material is examined using the same method, and the procedure is repeated until a simple or commercially available structure is identified. Molecular property improvement aims to improve specific molecular properties by modifying the molecule under certain similarity constraints. For example, the source molecule is a molecule with poor property values, while the target molecule is a molecule with better property values. Given a source molecule, the task of molecular property improvement is to output a different target molecule with better molecular properties, whose similarity to the source molecule is higher than a certain similarity threshold.
[0020] In conditional molecular formation, there exists a pair of molecules. <G S G T >, among which the source molecule G S and target molecule G T They come from the source domain S and the target domain T, respectively. For example, G S and G T These are the products and reactants predicted in retrosynthesis, and G is used to improve molecular properties. S and G T These are molecules with undesirable and desirable properties, respectively. Conditional molecule generation aims to learn the mapping function. The mapping function S→T can generate a function with input molecule G.S For the target molecule G under the condition T Therefore, it is named "conditional molecular generation".
[0021] When using text strings to represent molecules, such as G S X= G T :Y= ,in These are tokens in the text string of the source / target molecule, which can be used to train a machine learning model using sequence-to-sequence modeling. The training objective is formulated as minimizing:
[0022] Where P θ This represents the parameterized conditional probability with parameters θ to be learned. During the inference phase, a trained machine learning model can be used to autoregressively generate string-based molecular representations of the target. Using strings as molecular representations, conditional molecule generation can be formulated as similar to sequence-to-sequence translation problems handled by natural language processing. Methods or models from natural language processing can be applied to conditional molecule generation.
[0023] Machine learning models can be trained to perform any type of conditional molecule generation using an appropriate training dataset. The training dataset consists of source and target molecule pairs specific to a particular type of conditional molecule generation. The training dataset will include products and reactants for both forward and retrosynthetic predictions. For molecular property improvement, the training dataset can contain multiple molecules, each labeled with a value for a specific property. Training pairs are not necessarily limited to two molecules; there can be multiple source molecules and / or multiple target molecules, such as multiple reactant molecules that can be used to synthesize a single product molecule. The accuracy of the machine learning model is based on relationships learned from the training data.
[0024] Of course, the training data is not the actual molecules themselves, but rather representations of those molecules in a format that the machine learning model can understand. One contribution of this disclosure is a technique for generating string-based molecular representations, in which the machine learning model more readily understands chemical relationships. Machine learning models trained with the string-based molecular representations of this disclosure are more accurate and provide better predictions than machine learning models trained with previous types of string-based molecular representations.
[0025] Figure 1This diagram illustrates the use of machine learning model 100 to perform conditional molecule generation. Machine learning model 100 can be any type of machine learning model capable of performing sequence-to-sequence translation. In some implementations, machine learning model 100 is an encoder-decoder based model. The decoder can be an autoregressive decoder. An autoregressive decoder is a model that generates an output sequence based on an input representation. It predicts each label conditional on a previous label. The autoregressive decoder generates elements of the output sequence one by one until the decoder decides the sequence is ready, and then it generates the final label. This means that the decoder uses its own estimated output at time t as input for the next time step. The next input to the decoder is selected based on the decoder's parameters. This selected input (also called an input vector) is then added to the existing input sequence. This process is repeated in an autoregressive manner, meaning that each new input depends on the previous input. Machine learning models that include autoregressive decoders perform well on language generation tasks.
[0026] One class of machine learning models that can be used is the Transformer-based model. The Transformer architecture and model are described in "Attention Is All You Need" by Vaswani, Ashish, et al., Advances in Neural Information Processing Systems, Vol. 30, Curran Associates, Inc. (2017): 5998-6008. The Transformer model described in Vaswani's work without modifying the architecture is called the "vanilla transformer" model. The Transformer is an autoregressive model where the last predicted token is considered as input for predicting the next token. Cross-attention represents the correlation between the tokens from the input string and the tokens in the output string.
[0027] During inference, input molecule 102 is provided to machine learning model 100. Depending on the specific task to which machine learning model 100 is trained, input molecule 102 can be a product, a reactant, or a molecule with undesirable molecular properties. Input molecule 102, or more precisely, data representing input molecule 102, can be provided in any form. For example, a user can specify a common name, trade name, International Union of Pure and Applied Chemistry (IUPAC) name, select a molecule from a menu or list, etc. In some embodiments, input molecule 102 is provided as molecular graph 104. Alternatively, known techniques can be used to convert input molecule 102, identified in another format (e.g., by name), into molecular graph 104.
[0028] Molecular diagram 104 is a graph-based method that depicts a molecule as a set of vertices and edges, where vertices represent atoms and edges represent chemical bonds. Vertices are labeled with the type of the corresponding atom, and edges are labeled with the type of bond. This provides a convenient way to visualize and analyze the structure of molecules. Molecular diagrams are powerful tools for describing the topological structure of molecules and are widely used for visualization purposes. However, molecular diagram 104 is not necessarily shown or visualized to the user. Molecular diagram 104 can be used to generate a string-based molecular representation of input molecule 102. However, if a string-based molecular representation of input molecule 102 has already been generated or is known, that representation can be obtained or looked up without using molecular diagram 104.
[0029] The string-based molecule representation 106 is how the input molecule 102 is represented when it is provided to the machine learning model 100. The string-based molecule representation uses a linear representation to describe the structure of the input molecule 102. This string-based representation (like natural language text) provides an ordered sequence of characters, where each character has meaning, and the order of the characters relative to each other also conveys meaning. The string-based molecule representation 106 can be processed by the machine learning model 100, which is similar to a natural language text string, and divided into tags using known techniques.
[0030] The input string-based molecular representation 106, and all other string-based molecular representations mentioned in this disclosure, can be any type of linear symbol or string-based sequence representing the molecular structure as a string. Currently, the most commonly used representation is SMILES, but other representations known to those skilled in the art exist, such as DeepSMILES, SMARTS, SMIRKS, and SELFIES. Any of these representations, or other formats yet to be developed, can be used in conjunction with the techniques of this disclosure.
[0031] The machine learning model 100 is trained to generate a string-based molecular representation 108 of the output based on a string-based molecular representation 106 of the input and potential other inputs or commands provided by the user. The additional inputs or commands can vary depending on the conditional molecular generation task to which the machine learning model 100 is trained. For example, if the conditional molecular generation task is molecular property improvement, the machine learning model 100 can also receive instructions that provide a target value for the property (i.e., how much it should be improved) and a molecular similarity threshold indicating how much the input molecule 102 can be changed.
[0032] During the inference phase, machine learning model 100 is used to autoregressively generate a string-based molecular representation 108 of the output. The accuracy of the string-based molecular representation 108, representing the output molecule 110 which has the desired relationship with the input molecule 102, is based on the training of machine learning model 100. The output string-based molecular representation 108 has the same representation format as the input string-based molecular representation 106. That is, if the input string-based molecular representation 106 is SMILES, then the output string-based molecular representation 108 is also a SMILES string.
[0033] The output string-based molecular representation 108 can be converted into different representations of the output molecule 110, such as a common name, skeleton structure, or any other format. The output string-based molecular representation 108 can also be provided directly to the user without translation or conversion. In some implementations, the output string-based molecular representation 108 can be provided to other computer-based processing, for example, through an application programming interface (API), instead of being directly presented to the user.
[0034] Figure 2 The traversal order of molecules used to generate string-based molecular representations is compared with canonical SMILES, R-SMILES, and O-SMILES. Figure 2 This diagram illustrates the traversal order of the molecular diagrams used to generate three different versions of SMILES for the same set of products and reactants. Each atom in the molecular diagram is labeled with a number. These numbers provide a unique identifier for each atom. The order of the numbers also indicates the traversal order used by the algorithm that generates the corresponding SMILES strings. Therefore, the traversal order starts with the atom labeled 0, proceeds to the atom labeled 1, and so on, traversing all atoms in the molecular diagram.
[0035] The techniques used to generate canonical SMILES strings are documented and vary depending on the specific software used. SMILES are generated through a depth-first traversal of the molecular graph, and a molecule can have multiple valid SMILES representations, resulting in multiple correct output SMILES for a given input SMILES. This one-to-many mapping between input and output SMILES makes synthetic prediction extremely challenging because the computational model learns not only the chemical rules of the chemical reaction but also the SMILES syntax for string validity. Several normalization methods can be employed to generate canonical SMILES, ensuring a one-to-one mapping between molecules and SMILES. However, these methods are designed to create representations of individual molecules without considering the relationship between product and reactant molecules.
[0036] In some implementations, Morgan's algorithm is used to assign a unique sequential atom number to each atom in a given molecule. It operates in two phases by first enumerating all atom numbers that conform to certain rules, and then iteratively eliminating assignments until only one remains. The initial values assigned to each atom specify the following atomic invariants: the number of heavy atom bonds; the number of non-hydrogen bonds; the atomic number; the charge sign; the absolute charge; and the number of bonded hydrogen atoms. Morgan's algorithm is described in H.L. Morgan's book, "Generation of Unique Machine Descriptions of Chemical Structures – Techniques for the Development of Chemical Abstraction Services." J. of Chem. Documentation 1965 5 (2), 107-113.
[0037] The CANGEN algorithm is a technique that can be used to generate SMILES strings. The iterative refinement process in the CANGEN algorithm involves assigning initial values to atoms based on atomic properties, updating these values based on neighboring atomic values, and repeating this process until a steady state is reached, thus producing a unique identifier for each atom. The CANGEN algorithm is described in "SMILES. 2. Algorithm for Generation of Unique SMILES Notation" by David Weininger, Arthur Weininger, and Joseph L. Weininger, J. Chem. Inf. Comput. Sci. 1989, 29(2), 97-101. Both the Morgan algorithm and the CANGEN algorithm can be used to standardize SMILES generation.
[0038] like Figure 2 As shown, canonical SMILES generation is not order-aware. The starting atom 0 is oxygen in the product and nitrogen in the reactant. Even with similar structures, the traversal order of products and reactants is very different. This difference in traversal order results in generating product / reactant strings that are distinct from each other, not only due to differences in molecular structure but also due to the arbitrary order in which the algorithm traverses the molecular graph. Therefore, using canonical SMILES to generate string-based molecular representations for training machine learning models creates challenging training data for the model to learn from.
[0039] R-SMILES is a modification of the canonical SMILES that uses the same root (i.e., starting atom) for both product and reactant molecules, thereby reducing the edit distance between the corresponding string-based representations and facilitating the input-output mapping process. R-SMILES is described in "Root-aligned SMILES: a tight representation for chemical reaction prediction" by Zipeng Zhong et al., *Chem. Sci.*, 2022, 13, 9023-9034. However, even when sharing the same root, the traversal order may differ. Figure 2 This illustrates an example where the traversal order of ring structures differs in products and reactants even when nodes 0 and 1 represent the same atoms. Differences in traversal order can lead to distinct string-based molecular representations with large edit distances, even when products and reactants are structurally similar.
[0040] The O-SMILES generated according to the technology of this disclosure is a molecular representation method that aligns not only the root node but also adjacent nodes to make the input and output SMILES more similar, thereby further reducing the edit distance significantly. Figure 2 The same traversal order is shown, not only for the starting node but also for all parts of products and reactants with the same structure. O-SMILES is specifically designed for conditional molecule generation, where the string-based molecular representation of the target molecule is determined by the traversal order of the input molecules. Specifically, the method utilizes the canonical algorithm and root alignment of R-SMILES, but expands them by first assigning a unique order to the atoms in the input SMILES sequence. The input molecule will be a product in retrosynthesis or a reactant in forward synthesis. The target molecule is then determined by mapping the same atoms in the input molecule to the output molecule according to this order. Therefore, O-SMILES eliminates the problems discussed above and makes training machine learning models easier because it maintains a one-to-one mapping between input and output molecules. When trained on O-SMILES strings, the machine learning model primarily learns the chemical relationships between products and reactants. This minimizes the need for the model to learn the complex syntax of the canonical algorithm.
[0041] The iterative refinement process of the normalization algorithm used to generate canonical SMILES (and R-SMILES after the root atom) can pose a challenge to the autoregressive decoder's inference of the atomic order, since the same chemical structure can be represented by different strings. O-SMILES improves upon other representation techniques because it preserves order dependencies. The autoregressive decoder generates the sequence one element at a time, and each prediction depends on the previous one. In the context of molecule generation, this means that the order in which atoms are added to the molecule can significantly influence the final structure. However, the iterative refinement process in algorithms like CANGEN does not inherently have a specific order of atoms.
[0042] O-SMILES technology enables the generation of string-based molecular representations with lower computational complexity. The iterative nature of both the refinement process used for canonical SMILES and R-SMILES, and autoregressive decoding, can lead to increased computational complexity. This can make the process slower and more resource-intensive, especially for larger molecules. Therefore, using O-SMILES can reduce processor cycles and energy consumption during the generation of string-based molecular representations and the training of machine learning models. It also results in more accurate predictions from the machine learning models.
[0043] Figure 3 This is a diagram illustrating the overall framework and an example of O-SMILES generation for retrosynthetic prediction. Due to the random selection in the molecular graph traversal, a large number of valid SMILES sequences exist for a given molecule. For conditional molecule generation, the traversal order between source molecule 300 and the corresponding target molecule 302 should be approximately a one-to-one mapping, making it easier for the model to learn using this prior knowledge. Therefore, this technique preserves the randomness in SMILES generation while utilizing the one-to-one mapping property preserved in the source and target molecules to ensure the uniqueness of the tag sequences.
[0044] In this example, source molecule 300 (G S ) is the target molecule 302 (G T The product of the synthetic reaction between ) and the target molecule 302 (G T ) are reactants that can be used to synthesize products. Current methods for generating conditional molecules involve sequentially generating tags in a string-based molecular representation. However, in supervised learning, sequence labels need to be assigned to each training sample, and the effective traversal order is arbitrary. In addition to employing a normalization algorithm, the technique in this disclosure assigns a unique sequence label to each training sample based on its source molecule 300. In this way, how the target molecule 302 is traversed is determined by its input rather than by an external algorithm or black-box tool.
[0045] First, a source neighbor priority queue 304 is randomized for each atom in the source molecule 300. The source neighbor priority queue 304 is a random ordering of the atoms in the source molecule 300, and it also identifies neighboring atoms for each atom in the source molecule 300. This is achieved by first assigning a unique identifier to each atom in the source molecule 300. To generate source neighbor priority queue 304, where | M | represents the number of atoms in the source molecule.
[0046] For all molecules except the simplest ones, multiple source neighbor priority queues 304 can be generated. Q A random neighbor priority queue can be generated for each atom and all its neighboring nodes. ,in The priority queue can be initialized randomly, rather than being provided by an external tool. Then, an atom is selected from the source molecule 300 as the root node. The root node can be selected randomly.
[0047] Next, starting from the root node and the source neighbor priority queue 304 for each node, a depth-first search (DFS) algorithm is applied to obtain the source traversal order 306 (LS). Each source neighbor priority queue 304 can result in a different source traversal order 306. DFS is an algorithm used to traverse or search tree or graph data structures. The function of the source neighbor priority queue 304 is that when visiting node i, the earlier a neighbor node is in the queue, the higher its priority is when it is visited. However, the source neighbor priority queue 304 may not be entirely accurate in order to later form valid SMILES (or other string-based molecular representations). For example, when the current node is on a ring system, according to the rules used to generate SMILES, the priority of its branch neighbors should be higher than that of its neighbors in the same ring. Therefore, the order generated by the source neighbor priority queue 304 can be post-processed using the rules used to generate valid string-based molecular representations (such as SMILES) to obtain the source traversal order 306 (LS). Finally, the source neighbor priority queue 304 Q is updated with the source traversal order 306 to ensure the validity of the source-based string-based molecular representation 316 used to generate the source.
[0048] Third, based on the source traversal order 306 of the source molecule 300, the source neighbor priority queue 304 is transformed from the source side to the target side. In the implementation, the atom mapper 308 can be used to perform this transformation. The unique source-based string molecule representation 316 generated for the source molecule 300 is used as a label for the target molecule 302. This creates a target neighbor priority queue 310 for the structure of the target molecule 302, which is determined based on the identifiers of the corresponding atoms, which may but not necessarily be identified by the atom mapper 308.
[0049] Atom mapping is the process of identifying the correspondence between atoms of reactants and products in a chemical reaction. It is a one-to-one correspondence, also known as an atom-to-atom mapping, and remains unchanged even as chemical bonds rearrange during the reaction. Atom maps convey the complete information needed to unravel the mechanism of a chemical reaction (i.e., bond rearrangement) because they clearly identify the distinct bonds between reactant and product molecules.
[0050] Atom mapper 308 is used to establish a one-to-one mapping between the unchanged portions of source molecule 300 and target molecule 302. Atom mapper 308 transfers the source neighbor priority queue 304 from the source side to the target side. In one embodiment, the queue order based on the mapping information is maintained for those atoms common to both source molecule 300 and target molecule 302; atoms present in source molecule 300 but not in target molecule 302 are discarded; atoms present in target molecule 302 but not in source molecule 300 are placed at the end of the target neighbor priority queue 310.
[0051] Any existing or later-developed atom mapper 308 can be used. An atom mapper 308 is a tool in computational chemistry used to map atoms of reactants to corresponding atoms of products in a chemical reaction. Various open-source and commercial atom mappers exist, known to those skilled in the art, including but not limited to RXNMapper, Indigo, ChemAxon, RDTool (part of RDKit), and NextMove. Similar to the source neighbor priority queue 304, multiple target neighbor priority queues 310 exist that can be generated from the target molecule 302.
[0052] Next, the DFS algorithm is applied again to the target neighbor priority queue 310 in the same manner as before to obtain the target traversal order 312. L T A separate target traversal order 312 can be generated for each target neighbor priority queue 310.
[0053] Finally, a string generator 314 (e.g., but not limited to the existing SMILES generator) is used to generate source string-based molecular representations 316 from the source traversal order 306 (LS) and target string-based molecular representations 318 from the target traversal order 312 (LT). For example, to generate the SMILES string, RDKit (available at rdkit.org) can be used by replacing the traversal order generated by the Morgan algorithm with either the source traversal order 306 or the target traversal order 312. Each pair of string-based molecular representations generated from the same traversal order can be used as a training pair. Because multiple possible source traversal orders 306 and possible target traversal orders 312 can exist, the string generator 314 can generate multiple different source string-based molecular representations 316 and multiple different target string-based molecular representations 318. Note that for each source molecule 300 and target molecule 302 pair, the training pair is not unique due to possible randomness in selecting the root node and initializing the source neighbor priority queue 304 of the source molecule 300. Unbound by theory, these various traversal orders are believed to enable decoder machine learning models to learn more molecular graphs from an expanded string-based molecular representation space and improve the model's generalization ability.
[0054] One advantage of this technique is data augmentation. This technique for generating string-based molecular representations can also be viewed as a simple and effective data augmentation method that considers molecular graph information between the input and output molecular graphs. The technique can augment data at two levels (random roots and sampled atom order), which can be achieved by enumerating different atoms as root nodes and generating multiple input-output pairs as training data by following different traversal orders of atoms based on a random neighbor priority queue. Generating multiple different strings representing molecules (where each string is paired with another string generated using the same starting node and traversal order) can improve the generalization of machine learning models because more training data is available, and the data includes multiple alternative string-based representations of the same chemical structure.
[0055] Figure 4 This is a flowchart illustrating a string-based molecular representation method 400 for generating source and target molecule models for training machine learning models. Method 400 can use... Figure 3 The technology shown below Figure 6 The system shown is used to execute this.
[0056] At operation 402, an instruction for the source molecule is received. The instruction for the source molecule can be any type of representation of the source molecule, such as, but not limited to, a molecular diagram representing the source molecule. It can also be the name of the source molecule or a selection, database, or list of source molecules. The instruction for the source molecule can be provided by the user, or it can be provided by another software program.
[0057] At operation 404, a source neighbor priority queue is constructed to capture the neighbor relationships between atoms in the source molecule. The source neighbor priority queue assigns a unique identifier to each atom in the source molecule and identifies the neighboring atoms of each atom in the source molecule. In some implementations, the atoms in the source neighbor priority queue are ordered according to a random priority order.
[0058] At operation 406, an atom from the source molecule is selected as the root node. The root node can be selected according to a set of rules. For example, it can be based on the type of atom or its connectivity with other atoms. It can also be selected randomly.
[0059] At operation 408, the source traversal order of the source molecules is generated. This source traversal order can be generated by performing a Depth-First Search (DFS) from the root node through a source neighbor priority queue. The DFS traverses the source neighbor priority queue in a specific order that becomes the source traversal order. The source traversal order initially generated by the DFS can be modified based on the rules used to generate a valid string-based molecular representation. For example, if the string-based molecular representation is SMILES, rules used for traversing the molecular graph, such as the order in which atoms in rings are processed, can be applied to modify the traversal order generated by the DFS algorithm. Doing so ensures that the final traversal order conforms to any rules used to generate a valid string-based molecular representation.
[0060] At operation 410, an indication of the target molecule is received. This indication can be received in the same manner as the indication of the source molecule is received at operation 402. Therefore, in some embodiments, the indication of the target molecule can be received as a molecular map representing the target molecule. The target molecule and the source molecule are a pair of labeled data used for training. The relationship between the target molecule and the source molecule depends on the specific conditional molecular generation task being trained. For example, when training for retrosynthetic prediction, the target molecule can be a product and the source molecule can be a reactant.
[0061] At operation 412, the target neighbor priority queue for the target molecule is constructed based on the source traversal order of the source molecules generated at operation 408 and the atomic correspondences between the source and target molecules. An atomic correspondence is an identification of identical atoms in the source and target molecules after molecular arrangement. In some labeled reaction data, such as USPTO-50K, atomic correspondences between products and reactants are provided. However, if atomic correspondences are not provided in the training data, they can be identified using any of many readily available atom mappers using techniques known to those skilled in the art. Constructing the target neighbor priority queue may include maintaining the same queue order for atoms in the target molecule that have a one-to-one correspondence with atoms in the source molecule, omitting atoms in the source molecule that are not present in the target molecule, and including atoms present in the target molecule but not in the source molecule at the end of the target neighbor priority queue.
[0062] At operation 414, the atom in the target molecule corresponding to the root node from the source molecule is selected as the root node of the target molecule. An atom mapper can be used to identify the root node in the target molecule.
[0063] At operation 416, the target traversal order in the target molecule is generated. This target traversal order can be generated by performing a Depth-First Search (DFS) starting from the root node through the target neighbor priority queue. The technique used to generate the target traversal order can be the same as the technique used to generate the source traversal order at operation 408. Therefore, the target traversal order can also be based on the rules used to generate a valid string-based molecule representation.
[0064] At operation 418, a source-based string-based molecular representation is generated by a string generator using the source traversal order. The specific technique used to generate the source-based string-based molecular representation can be the same as that used for molecular structures of strings represented in existing techniques (such as SMILES). The difference lies in that the standard procedure for determining the traversal order of the molecular structure to generate the string is replaced by the source traversal order generated according to method 400. The source-based string-based molecular representation of the source molecule is a string representing the structure of the source molecule.
[0065] At operation 420, the string generator uses the target traversal order to generate the target string-based molecule representation. The target string-based molecule representation is generated using the same technique used to generate the source string-based molecule representation. Because the traversal order from the source molecule is transferred to the target molecule's traversal order, the difference between the source string-based molecule representation and the target string-based molecule representation will be due to the difference in molecules, not due to any difference in arbitrary traversal order.
[0066] At operation 422, a machine learning model is trained using the source-based string-based molecular representation and the target-based string-based molecular representation as training pairs. The machine learning model can be a model that includes an autoregressive decoder, such as, but not limited to, a transformer model. The machine learning model is typically trained on a large amount of training data containing multiple training pairs. These multiple training pairs can come from multiple labeled responses. Additional training pairs can come from data augmentation techniques available using this method 400.
[0067] A single source molecule and target molecule pair can be used to generate multiple source and target string-based molecule representations. Multiple possible source neighbor priority queues exist that can be generated from the source molecules. Their number typically increases with the complexity of the source molecules. Further variations can be introduced by using different root nodes. By using Depth-First Search (DFS), different source traversal orders can be created for each different source neighbor priority queue. Therefore, method 400 can generate multiple source traversal orders of source molecules, represented by alternative traversal orders of the source molecules.
[0068] Similarly, multiple target neighbor priority queues can exist. Based on these queues, DFS can be used to generate multiple target traversal orders for the target molecule, representing alternative traversal orders through the target molecule. Each of the multiple source traversal orders is paired with one of the multiple target traversal orders based on atomic correspondences. Atomic correspondences can be included in the training data or identified by an atomic mapper. This ensures that each source and target traversal order is paired, such that, given the structure of a molecule, the traversal orders are as similar as possible.
[0069] Now, by utilizing multiple source traversal orders and multiple target traversal orders, multiple paired source-string-based molecular representations and target-string-based molecular representations can be generated for the source and target molecules. Each pair of these string-based molecular representations is generated from a different traversal order. This provides multiple training pairs from a single molecular pair that can be used to train a machine learning model.
[0070] Once trained, the machine learning model can be used for inference by providing it with instructions for input molecules and receiving instructions for output molecules. Instructions for input molecules are converted to the same string-based molecular representation used to train the machine learning model, if it has not already adopted that format. As used herein, source and target molecules refer to the molecules used to train the machine learning model. Input and output molecules refer to the molecules provided to and received from the machine learning model when it is used to generate predicted molecular structures.
[0071] Figure 5This is a flowchart illustrating a method 500 for performing conditional molecule generation using a machine learning model. Method 500 can use... Figure 1 The technology shown or below Figure 6 The system shown is used to execute this.
[0072] At operation 502, an instruction for the input molecule is received. The instruction for the source molecule can be any type of representation of the source molecule, such as, but not limited to, a molecular diagram representing the source molecule. It can also be the name of the source molecule or a selection, database, or list of source molecules. The instruction for the source molecule can be provided by the user, or it can be provided by another software program.
[0073] If the conditional molecule generation task is retrosynthetic prediction, the input molecule is the product. If the conditional molecule generation task is for synthetic protection, the input molecule is the reactant. If the conditional molecule generation task is for molecular property improvement, the input molecule is the source molecule with a first value for the molecular property.
[0074] At operation 504, a string-based molecular representation of the input molecule is provided to the machine learning model. If the indication of the input molecule received at operation 502 is in another format, it is converted into a string-based molecular representation for training the machine learning model. For example, if the machine learning model is trained on SMILES, the indication of the input molecule is provided as a SMILES string. The machine learning model may include an autoregressive decoder, and in some implementations, may be a converter model. The machine learning model may include a tokenizer that divides the string-based molecular representation into tokens using any of a variety of known techniques.
[0075] A machine learning model is trained on multiple pairs of source and target molecules represented as string-based molecular representations. For each of the source and target molecule pairs, the target traversal order of the target molecule is determined by the source traversal order of the source molecules. The same root node is used for both the target and source traversal orders, and the target traversal order is identical to the source traversal order of all atoms sharing a one-to-one correspondence between the source and target molecules. In some implementations, atoms sharing a one-to-one correspondence between the source and target molecules are thus identified in the training data. However, in other implementations, one-to-one correspondences are identified using an atom mapper. Therefore, structurally identical portions of the target molecule to those of the source molecules are traversed in the same order.
[0076] In some implementations, a source traversal order is generated by constructing a source neighbor priority queue that captures the neighbor relationships between atoms in the source molecule. A depth-first search (DFS) is then performed using this source neighbor priority queue to generate the source traversal order. Alternatively, in another implementation, a target traversal order is generated by constructing a target neighbor priority queue that captures the neighbor relationships between atoms in the target molecule. A DFS is then performed using this target neighbor priority queue to generate the target traversal order.
[0077] Then, the source traversal order is used to generate the source string-based molecular representation of the source molecule. Similarly, the target traversal order is used to generate the target string-based molecular representation of the target molecule. Because the traversal orders are as similar as possible, this minimizes the edit distance between the source and target string-based molecular representations. In other words, the difference between the two string representations is due to structural differences in the molecules, not due to arbitrary differences in the traversal order used to generate the string-based molecular representations. Using the string-based molecular representations generated in this way to train a machine learning model affects the weights of the neural network within the machine learning model and the structure of the model itself.
[0078] At operation 506, an indication of the output molecule is generated by a machine learning model. If implemented as a converter model, the machine learning model can autoregressively generate a string-based representation of the output molecule. If the conditional molecule generation task is retrosynthetic prediction, the output molecule is a reactant. If the conditional molecule generation task is forward synthesis prediction, the output molecule is a product. If the conditional molecule generation task is molecular property improvement, the output molecule is a molecule that has a similarity to the source molecule exceeding a threshold and has a second value for the molecular property. The second value represents a property value that is better than or superior to the first value associated with the input molecule.
[0079] The indication of the output molecule is generated from a string-based molecular representation as input to a machine learning program. However, this string-based representation can be converted into one or more other formats using known techniques, such as skeletal structures or chemical names. The indication of the output molecule can be provided to the user or sent to another software program.
[0080] Figure 6 Details of an example computing system 600, such as a computer or server configured as part of a cloud-based platform, are shown. These devices are capable of executing computer instructions (e.g., modules or components described herein). Figure 6The illustrated computer architecture 600 includes one or more processors 602, a system memory 604 including random access memory 606 (“RAM”) and read-only memory (“ROM”) 608, and a system bus 610 coupling the memory 604 to the processor 602. The processor 602 may also include a processing system or a portion thereof. In various examples, the processors 602 of the processing system are distributed. In other words, one or more processors 602 of the processing system may be located in a first location (e.g., a rack within a data center), while another or more processors 602 of the processing system are located in a second location separate from the first location.
[0081] The processing unit (such as processor 602) may represent, for example, a CPU-type processing unit, a GPU-type processing unit, a field-programmable gate array (FPGA), another type of digital signal processor (DSP), or other hardware logic components that can be driven by a CPU in some cases. For example, illustrative types of hardware logic components that can be used include application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), etc.
[0082] A basic input / output system, containing fundamental routines such as those facilitating the transfer of information between components within the computer architecture 600 during startup, is stored in ROM 608. Computer architecture 600 also includes a mass storage device 612 for storing operating system 614, applications 616, modules / components 618, and other data described herein. Operating system 614, applications 616, and modules / components 618 may include computer-executable instructions implemented by processor 602. Examples of modules / components 618 include machine learning model 100, atomic mapper 308, and string generator 314.
[0083] Mass storage device 612 is communicatively connected to processor 602 via a mass storage controller connected to bus 610. Mass storage device 612 provides non-volatile storage for computer architecture 600. Those skilled in the art will understand that mass storage device 612 can be any available computer-readable storage or communication medium accessible by computer architecture 600. Mass storage device 612 is a type of memory. Any content shown as stored in mass storage device 612 could alternatively be stored on another computing device, such as a computing device accessible via network 620.
[0084] Computer-readable media can include computer-readable storage media and / or communication media. Computer-readable storage media can include one or more of volatile memory, non-volatile memory, and / or other persistent and / or auxiliary computer storage media, removable and non-removable computer storage media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules, or other data. Therefore, computer storage media includes tangible and / or physical media included in a device and / or as part of a device or in hardware components external to a device, including RAM, static random access memory (SRAM), dynamic random access memory (DRAM), phase-change memory (PCM), ROM, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, optical disc read-only memory (CD-ROM), digital versatile disc (DVD), optical cards or other optical storage media, magnetic tape cassettes, magnetic tape, disk storage, magnetic cards or other magnetic storage devices or media, solid-state storage devices, storage arrays, network-attached storage, storage area networks, hosted computer storage, or any other storage memory, storage device, and / or storage medium that can be used to store and maintain information for access by computing devices.
[0085] In contrast to computer-readable storage media, communication media embody computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms. As defined herein, computer-readable storage media do not include communication media. That is, computer-readable storage media do not include communication media, and therefore exclude media consisting solely of modulated data signals, carrier waves, or propagation signals themselves.
[0086] Depending on the configuration, computer architecture 600 can operate in a networked environment using a logical connection to a remote computer via network 620. Computer architecture 600 can be connected to network 620 via network interface unit 622 connected to bus 610. I / O controller 624 can also be connected to bus 610 to control communication in input and output devices.
[0087] It should be understood that the software components described herein, when loaded into and executed by processor(s) 602, can transform processor(s) 602 and the entire computer architecture 600 from a general-purpose computing system into a dedicated computing system tailored to facilitate the functions presented herein. Processor 602 can be composed of any number of transistors or other discrete circuit elements, which can individually or collectively present any number of states. More specifically, processor 602 can operate as a finite state machine in response to executable instructions contained within the software modules disclosed herein. These computer-executable instructions can transform processor 602 by specifying how processor 602 transitions between states, thereby transforming the transistors or other discrete hardware elements constituting processor 602.
[0088] Example (1) Inverse Synthesis Prediction The retrosynthesis prediction task aims to predict the reactants (target) of the product molecule (source). Retrosynthesis experiments use a widely used benchmark called USPTO-50K, extracted from USPTO literature. USPTO-50K consists of 50K reaction pairs, with available reaction types and atom mapping information. Therefore, no atom mapper is needed to generate training data for this dataset. For fair comparison with existing work, the data used is the same as in the following literature: "Retrosynthesis prediction with conditional graph logic network" by Hanjun Dai, Chengtao Li, Connor Coley, Bo Dai, and Le Song, *Advances in Neural Information Processing Systems*, Vol. 32, 2019. The dataset pre-splits training, validation, and test data into 80%, 10%, and 10% portions. Experiments are conducted in both settings, with known and unknown reaction types.
[0089] The dataset created to have string-based molecular representations generated according to the techniques disclosed herein will be compatible with any model architecture designed for sequence-to-sequence translation. In this example, the original converter architecture is used. Specifically, both the encoder and decoder have 8 converter layers with an embedding dimension of 256, a feedforward layer dimension of 1024, and an attention head of 4. The random inactivation rate before the residual connections is 0.3, and the label smoothing weight is 0.1. The optimization algorithm is Adam with a learning rate of 0.0005 and an invert_sqrt (inverse square root) learning rate scheduler
[36] . The Adam algorithm is described in “Adam: A method for stochastic optimization” by Diederik P Kingma and Jimmy Bam, arXiv preprint arXiv:1412.6980, 2014.
[0090] This method is evaluated by the accuracy of the top k exact matches (or the top k accuracies), where k ∈ {1, 3, 5}, and one of the top k predicted reactants is exactly the same as the baseline true value. For each product molecule, the root node and neighbor priority queues are randomized, then sorted by their scores, and the last set of the top k reactants is filtered as the prediction. This is a template tree method and is compared with other template-free methods, including Transformer, MEGAN, GTA, Dual-TF, Chemformer, and R-SMILES with canonical SMILES.
[0091] Experimental results for USPTO-50K are shown in Table 1, with both known and unknown reaction types. The technique disclosed herein achieves better results compared to state-of-the-art template tree methods. Specifically, O-SMILES differs from canonical SMILES (denoted as C-SMILES) and R-SMILES in that it systematically alters the model input and labels (i.e., by generating string-based molecular representations in a sequence-aware manner). This alteration alone leads to improvements, demonstrating that forcing the decoder to learn external canonical rules is a source of error and that allowing the decoder to infer atomic orders from the source molecule is effective.
[0092] Table 1. Performance comparison of molecular retrosynthesis. Results are reported based on the average performance of five runs.
[0093]
[0094] (2) Forward reaction prediction The technique disclosed herein can be applied to forward reaction prediction in the same manner as retrosynthetic prediction because it maps the atomic order between the source and target molecules, regardless of whether the source / target is product / reactant or vice versa. The technique used to perform forward reaction prediction is the same as that described by Zhong et al. Using this technique (which differs from R-SMILES in that the same traversal order is used after the root node) leads to significant improvements.
[0095] Table 2. Performance comparison of forward reaction prediction.
[0096]
[0097] (3) Improvement of molecular properties For improving molecular properties, given an input molecule x, the task is to output a different molecule y with better molecular properties. To prevent the model from ignoring the input molecule x and generating arbitrary molecules, the output molecule y must be above a similarity threshold, i.e., sim(x, y) > δ. Because the input and output molecules must be similar to some extent, RDKit is used to find the maximum common substructure between a pair of molecules for this task. Then, when constructing the O-SMILES representation, the unchanged common substructure is used for atomic mapping information.
[0098] This example considers three molecular properties. The first is the penalized logP score (or logP), which measures the solubility and synthetic accessibility of a compound. The task is to improve this property such that logP(y) > logP(x). We perform this property with two settings where the similarity thresholds δ = {0.4, 0.6} are referred to as LogP0.4 and LogP0.6, respectively. The second is a qualitative estimate of the drug-likeness score (QED), which quantifies the drug-likeness of a compound. The task is to improve molecules with QED scores from a lower range [0.7, 0.8] to a higher range [0.9, 1.0]. The similarity threshold for this task is δ = 0.4. The third is the DRD2 score, which uses a property prediction model to assess the biological activity of a compound against its dopamine type 2 receptor. The task is to improve inactive molecules (i.e., DRD2 < 0.5) to active molecules (i.e., DRD2 > 0.5). The similarity threshold for this dataset is δ = 0.4.
[0099] The original Transformer is used again as the basic machine learning architecture. The Transformer layer has 6 layers, an embedding dimension of 256, an attention head of 4, a feedforward layer dimension of 1024, and a random dropout rate of 0.3. For evaluation, in each task, the root node and neighbor priority queues are randomized, and then the top k predictions are selected. This is the model output. k=20 across all tasks. For the LogP0.4 and LogP0.6 datasets, the average maximum property improvement is used as the evaluation metric. Specifically, the compound y with the largest property improvement is selected. i As the final prediction, i = argmax(logP(y i ), i = {1, ..., k} and satisfy sim(x, y i If ≥ δ, then the mean on the test set is calculated. For the QED and DRD2 datasets, the average success rate is used as the evaluation metric. Specifically, for each test data point, the model is considered successful only if one of all k predictions satisfies all similarity and property improvement constraints. The similarity function is defined as func(x, y) = 1 - Dist(x, y), where Dist(·, ·) is the Tanimoto distance on the Morgan fingerprint of the two molecules. Techniques used to determine the similarity between two molecules (such as the Tanimoto distance) are known to those skilled in the art.
[0100] Compared to the following pre-existing methods, the results show improvements in molecular properties: JT-VAE, which generates two-stage molecular graphs by utilizing effective subgraphs as components; CG-VAE, which incorporates hard domain-specific constraints into molecular generation; GCPN, a general graph convolutional network-based model for generating goal-oriented graphs via reinforcement learning; MMPA, a platform for matched molecular pair analysis; JTNN, a concatenated tree encoder-decoder framework; C-SMILES, a converter model with all SMILES specifications for input and output; HierG2G, which generates molecules in a hierarchical encoder-decoder model; BT4MolGen, which utilizes inverse models and unlabeled data to generate molecules better; and R-SMILES.
[0101] The results are shown in Table 3 below. It is evident from the table that the technique of this disclosure outperforms the standard SMILES (C-SMILES) on all four datasets, particularly on the QED and DRD2 datasets. For example, it achieves a QED score of 71.9 with C-SMILES and a QED score of 94.5 with O-SMILES, where the source and target molecules are located in two distinct regions, demonstrating the effectiveness of this method for improving molecular properties. Furthermore, the method of this disclosure performs complex model generation methods, such as HierG2G and BT4MolGen, with lower training costs and simpler training strategies. Lower training costs mean that the model can be trained using fewer processor cycles and less energy. Finally, maintaining the same traversal order between the source and target molecules simplifies decoder learning and improves generation performance compared to R-SMILES.
[0102] Table 3. Performance comparison of molecular property improvements. Results reported based on the average performance of five runs.
[0103]
[0104] Illustrative Examples The following clauses describe a number of possible embodiments for implementing the features described in this disclosure. The various embodiments described herein are not limiting, and each feature from any given embodiment is not required to exist in another embodiment. Unless the context clearly states otherwise, any two or more embodiments may be combined together. As used herein, “or” means and / or. For example, “A or B” means A without B, B without A, or A and B. As used herein, “comprising” means including all listed features and potentially including additional features not listed. “substantially consisting of” means including the listed features and those additional features that do not substantially affect the basic and novel characteristics of the listed features. “consisting of” means only the listed features, excluding any features not listed.
[0105] Clause 1. A method for training a machine learning model (100) to perform conditional molecule generation, the method comprising: Receiving instructions from the source molecule (300); Construct a source neighbor priority queue (304) to capture the neighbor relationships between atoms in the source molecule; Randomly select one atom from the source molecule as the root node; The source traversal order of the generated source molecules (306); Receive instructions from the target molecule (302); The target neighbor priority queue of the target molecule is constructed based on the source traversal order of the source molecule and the atomic correspondence between the source molecule and the target molecule (310); The target traversal order of the target molecule is generated by performing DFS on the target neighbor priority queue starting from the root node (312); Source-based string-based molecule representations of source molecules generated using source traversal order (316); The target molecule is generated using the target traversal order, and the target string-based molecular representation is generated (318); and A machine learning model is trained using source-based string-based molecular representations and target-based string-based molecular representations as training pairs. The machine learning model includes an autoregressive decoder.
[0106] Clause 2. The method according to Clause 1, wherein the indication of the source molecule is a molecular map representing the source molecule, and the indication of the target molecule is a molecular map representing the target molecule.
[0107] Clause 3. The method of Clause 1 or 2, wherein the source neighbor priority queue assigns a unique identifier to each atom in the source molecule, identifies the neighboring atoms of each atom in the source molecule, and sorts the atoms in the source neighbor priority queue according to a random priority order.
[0108] Clause 4. The method of any one of Clauses 1-3, wherein an atom in the source molecule that serves as the root node is randomly selected.
[0109] Clause 5. The method of any one of Clauses 1-4, wherein the source traversal order is generated by performing a depth-first search (DFS) from the root node through a priority queue of source neighbors.
[0110] Clause 6. The method of any one of Clauses 1-5, wherein the generation of the source traversal order and the target traversal order is also based on rules for generating valid string-based molecular representations.
[0111] Clause 7. The method according to any one of Clauses 1-6, wherein the atomic correspondence between the source molecule and the target molecule is identified by an atom mapper.
[0112] Clause 8. The method of any one of Clauses 1-7, wherein constructing the target neighbor priority queue includes: Atoms in the target molecule that have a one-to-one correspondence with atoms in the source molecule maintain the same queue order. Omit atoms from the source molecule that are not present in the target molecule, and Atoms that exist in the target molecule but not in the source molecule are included at the end of the target neighbor priority queue.
[0113] Clause 9. The method of any one of Clauses 1-8, wherein the target traversal order of the target molecule is generated by performing a DFS on the target neighbor priority queue starting from the root node.
[0114] Clause 10. The method pursuant to any one of Clauses 1-9 further includes: Multiple source traversal orders that generate source molecules, where multiple source traversal orders represent the substitution traversal order through source molecules; Multiple target traversal sequences are generated for the target molecule, where each source traversal sequence is paired with one of the target traversal sequences based on atomic correspondences. Generate multiple paired source string-based molecular representations and target string-based molecular representations for the source and target molecules, where each pair of string-based molecular representations is generated from a different traversal order; and A machine learning model is trained by using multiple paired source-based string molecular representations and target-based string molecular representations as labeled training pairs.
[0115] Clause 11. The method according to Clause 10, wherein the atomic correspondence is identified by an atomic mapper.
[0116] Clause 12. The method of any one of Clauses 1-11, wherein the machine learning model is a Transformer model.
[0117] Clause 13. The method according to any one of Clauses 1-12 further includes providing instructions to the machine learning model on input molecules and receiving instructions from the machine learning model on output molecules.
[0118] Clause 14. A computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform any of the methods described in Clauses 1-13.
[0119] Clause 15. A system comprising a processor and a memory storing instructions that, when executed by the processor, cause the system to perform any of the methods described in Clauses 1-13.
[0120] Clause 16. A system for training a machine learning model (100) to perform conditional molecule generation, the system comprising: Processor (602); Memory (612) that stores instructions that, when executed by the processor, cause the system to perform operations including: Receiving instructions from the source molecule (300); The source traversal order of the generated source molecules (306); Receive instructions from the target molecule (302); The target traversal order of the target molecule is generated based on the source traversal order of the source molecule (312). The target traversal order (312) maintains the same traversal order for the part of the target molecule that has a one-to-one atomic correspondence with a part of the source molecule. Source-based string-based molecule representations of source molecules generated using source traversal order (316); The target molecule is generated using the target traversal order, and the target string-based molecular representation is generated (318); and A machine learning model is trained using source-based string-based molecular representations and target-based string-based molecular representations as training pairs. The machine learning model includes an autoregressive decoder.
[0121] Clause 17. According to the system of Clause 16, the source traversal order in which the source molecules are generated includes: Construct a source neighbor priority queue to capture the neighbor relationships between atoms in the source molecule. Choose one atom from the source molecule as the root node, and The source traversal order is generated by performing a Depth-First Search (DFS) on the source neighbor priority queue starting from the root node.
[0122] Clause 18. In a system according to Clause 16 or 17, the target traversal order in which the target molecule is generated includes: A target neighbor priority queue for the target molecule is constructed based on the source traversal order of the source molecules and the atomic correspondence between the source and target molecules. The target traversal order is generated by performing a Depth-First Search (DFS) on the target neighbor priority queue, starting from the root node used to generate the source traversal order.
[0123] Clause 19. In a system pursuant to Clause 18, the construction of a target neighbor priority queue includes: Atoms in the target molecule that have a one-to-one correspondence with atoms in the source molecule maintain the same queue order. Omit atoms from the source molecule that are not present in the target molecule, and Atoms that exist in the target molecule but not in the source molecule are included at the end of the target neighbor priority queue.
[0124] Clause 20. A system according to any one of Clauses 16-19, wherein the generation of the source traversal order and the target traversal order is also based on rules for generating valid string-based molecular representations.
[0125] Clause 21. A method for performing conditional molecule generation, the method comprising: Receive the instruction from the input molecule (102); The string-based molecular representation (106) of the input molecule is provided to the machine learning model (100), which includes an autoregressive decoder and is trained on multiple pairs of source and target molecules represented as string-based molecular representations. For each pair of source and target molecules, the target traversal order (312) of the target molecule (302) is determined by the source traversal order (306) of the source molecule (300), such that the same root node is used in both the target and source traversal orders, and the target traversal order is the same as the source traversal order for all atoms that share a one-to-one correspondence between the source and target molecules. The source traversal order is used to generate the source string-based molecular representation of the source molecule (316), and the target traversal order is used to generate the target string-based molecular representation of the target molecule (318), thereby minimizing the edit distance between the source string-based molecular representation and the target string-based molecular representation; and Instructions for generating output molecule (110) by a machine learning model.
[0126] Clause 22. The method according to Clause 21, wherein conditional molecular generation is a molecular retrosynthetic prediction, the input molecule is the product, and the output molecule is the reactant.
[0127] Clause 23. The method according to Clause 21, wherein conditional molecule generation is a molecular property improvement, the input molecule is a source molecule having a first value for the molecular property, and the output molecule has a similarity greater than a threshold to the source molecule and has a second value for the molecular property.
[0128] Clause 24. The method according to any one of Clauses 21-23, wherein the machine learning model includes a converter model that uses the machine learning model during inference to regressively generate a string-based molecular representation of the output molecule.
[0129] Clause 25. The method of any one of Clauses 21-24, wherein the source traversal order is generated by constructing a source neighbor priority queue that captures the neighbor relationships between atoms in the source molecule and by performing a DFS on the source neighbor priority queue starting from the root node.
[0130] Clause 26. The method of any one of Clauses 21-25, wherein the target traversal order is generated by constructing a target neighbor priority queue and performing a DFS on the target neighbor priority queue starting from the root node, the target neighbor priority queue capturing the neighbor relationships between atoms in the target molecule and sorting them based on the source traversal order of the source molecule and the atomic correspondence between the source molecule and the target molecule.
[0131] Clause 27. The method according to any one of Clauses 21-26, wherein atoms sharing a one-to-one correspondence between source and target molecules are identified by an atom mapper.
[0132] Clause 28. A computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform any of the methods of Clauses 21-27.
[0133] Clause 29. A system comprising a processor and a memory storing instructions that, when executed by the processor, cause the system to perform a method according to any one of Clauses 21-27.
[0134] in conclusion While certain exemplary embodiments have been described, including the best modes known to the inventors for carrying out this disclosure, these embodiments are presented by way of example only and are not intended to limit the scope of the invention disclosed herein. Therefore, nothing in the foregoing description is intended to imply that any particular feature, characteristic, step, module, or block is necessary or indispensable. In fact, the novel methods and systems described herein can be embodied in a variety of other forms; furthermore, various omissions, substitutions, and changes can be made to the form of the methods and systems described herein without departing from the spirit of the inventions disclosed herein. Those skilled in the art will know how to appropriately employ such variations, and the embodiments disclosed herein can be practiced in ways other than those specifically described. The appended claims and their equivalents are intended to cover these forms or modifications that fall within the scope and spirit of certain inventions disclosed herein.
[0135] The terms “a,” “an,” “the,” and similar indicators used in the context of describing this disclosure shall be construed as encompassing both the singular and plural, unless otherwise stated herein or clearly contradicted by the context. Unless otherwise stated or clearly contradicted by the context, the terms “based on,” “based on,” and similar indicators shall be construed as meaning “at least partially based,” including both “partially based” and “entirely based.” The terms “part,” “component,” or similar indicators shall be construed as meaning at least a portion or part of the whole, including up to the whole referred to.
[0136] It should be understood that any reference to elements such as “first” and “second” in the summary and / or detailed description is not intended and should not be construed as necessarily corresponding to any reference to elements such as “first” and “second” in the claims. Rather, any use of “first” and “second” in the summary, detailed description, and / or claims may be used to distinguish two different instances of the same element (e.g., two different sensors).
[0137] Finally, although various configurations have been described in language specific to structural features and / or methodological actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described. Rather, specific features and actions are disclosed as exemplary forms for implementing the claimed subject matter.
[0138] Furthermore, publications, patents, and / or patent applications have been referenced throughout the specification. For each cited teaching and all its disclosed teachings, each cited reference is incorporated herein by way of individual citation.
Claims
1. A method for training a machine learning model (100) to perform conditional molecule generation, the method comprising: Receiving instructions from the source molecule (300); Construct a source neighbor priority queue (304) to capture the neighbor relationships between atoms in the source molecule; Select one atom from the source molecule as the root node; The source traversal order of the source molecule is generated (306); Receive instructions from the target molecule (302); The target neighbor priority queue of the target molecule is constructed based on the source traversal order of the source molecule and the atomic correspondence between the source molecule and the target molecule (310); Generate the target traversal order of the target molecule (312); The source molecule is generated using the source traversal order as a source string-based molecule representation (316); The target molecule is generated using the target traversal order as a target string-based molecular representation (318); as well as The machine learning model is trained using the source-based string molecular representation and the target-based string molecular representation as training pairs. The machine learning model includes an autoregressive decoder.
2. The method of claim 1, wherein the indication of the source molecule is a molecular map representing the source molecule, and the indication of the target molecule is a molecular map representing the target molecule.
3. The method according to claim 1, wherein the source neighbor priority queue assigns a unique identifier to each atom in the source molecule, identifies the neighboring atoms of each atom in the source molecule, and sorts the atoms in the source neighbor priority queue according to a random priority order.
4. The method of claim 1, wherein the source traversal order is generated by performing a depth-first search (DFS) on the source neighbor priority queue starting from the root node.
5. The method according to claim 1, wherein constructing the target neighbor priority queue comprises: Atoms in the target molecule that have a one-to-one correspondence with atoms in the source molecule maintain the same queue order. Atoms not present in the target molecule are omitted from the source molecule, and Atoms present in the target molecule but not in the source molecule are included at the end of the target neighbor priority queue.
6. The method according to claim 1, further comprising: Multiple source traversal orders are generated for the source molecule, wherein the multiple source traversal orders represent the substitution traversal order through the source molecule; Multiple target traversal sequences are generated for the target molecule, the multiple target traversal sequences representing alternative traversal sequences through the target molecule, wherein each of the multiple source traversal sequences is paired with one of the multiple target traversal sequences based on atomic correspondences; For the source molecule and the target molecule, multiple paired source string-based molecule representations and target string-based molecule representations are generated, wherein each pair of string-based molecule representations is generated according to a different traversal order; as well as The machine learning model is trained using the multiple paired source-based string molecular representations and target-based string molecular representations as labeled training pairs.
7. The method of claim 1, wherein the machine learning model is a Transformer model.
8. The method of claim 1, further comprising providing an instruction to the machine learning model of an input molecule and receiving an instruction from the machine learning model of an output molecule.
9. A system for training a machine learning model (100) to perform conditional molecule generation, the system comprising: Processor (602); A memory (612) stores instructions that, when executed by the processing unit, cause the system to perform operations, including: Receiving instructions from the source molecule (300); The source traversal order of the source molecule is generated (306); Receive instructions from the target molecule (302); The target traversal order (312) of the target molecule is generated based on the source traversal order of the source molecule. The target traversal order (312) maintains the same traversal order for a portion of the target molecule that has a one-to-one atomic correspondence with a portion of the source molecule. The source molecule is generated using the source traversal order as a source string-based molecule representation (316); The target traversal order is used to generate the target string-based molecular representation of the target molecule (318); and The machine learning model is trained using the source-based string molecular representation and the target-based string molecular representation as training pairs. The machine learning model includes an autoregressive decoder.
10. The system of claim 9, wherein the source traversal order for generating the source molecule comprises: Construct a source neighbor priority queue to capture the neighbor relationships between atoms in the source molecule. Select one atom from the source molecule as the root node, and The source traversal order is generated by performing a Depth-First Search (DFS) on the source neighbor priority queue starting from the root node.
11. The system of claim 9, wherein the target traversal order for generating the target molecule comprises: A target neighbor priority queue for the target molecule is constructed based on the source traversal order of the source molecules and the atomic correspondence between the source molecules and the target molecule. The target traversal order is generated by performing a depth-first search (DFS) on the target neighbor priority queue, starting from the root node used to generate the source traversal order.
12. The system of claim 11, wherein constructing the target neighbor priority queue comprises: Atoms in the target molecule that have a one-to-one correspondence with atoms in the source molecule maintain the same queue order. Atoms not present in the target molecule are omitted from the source molecule, and Atoms present in the target molecule but not in the source molecule are included at the end of the target neighbor priority queue.
13. The system of claim 9, wherein the generation of the source traversal order and the target traversal order is further based on rules for generating valid string-based molecular representations.
14. A method for performing conditional molecule generation, the method comprising: Receive the instruction from the input molecule (102); The string-based molecular representation (106) of the input molecule is provided to a machine learning model (100), which includes an autoregressive decoder and is trained on multiple pairs of source and target molecules represented as string-based molecular representations. For each pair of source and target molecules, the target traversal order (312) of the target molecule (302) is determined by the source traversal order (306) of the source molecule (300), such that the same root node is used in the target traversal order and the source traversal order, and the target traversal order is the same as the source traversal order for all atoms that share a one-to-one correspondence between the source and target molecules. The source traversal order is used to generate the source string-based molecular representation (316) of the source molecule, and the target traversal order is used to generate the target string-based molecular representation (318) of the target molecule, thereby minimizing the edit distance between the source string-based molecular representation and the target string-based molecular representation; as well as Instructions for generating output molecule (110) by the machine learning model.
15. The method of claim 14, wherein the conditional molecule generation is a molecular retrosynthetic prediction, the input molecule is a product, and the output molecule is a reactant.
16. The method of claim 14, wherein the conditional molecule generation is a molecular property improvement, the input molecule is a source molecule having a first value for the molecular property, and the output molecule has a similarity greater than a threshold to the source molecule, and the output molecule has a second value for the molecular property.
17. The method of claim 14, wherein the machine learning model comprises a Transformer model that uses the machine learning model to regressively generate a string-based molecular representation of the output molecule during inference.
18. The method of claim 14, wherein the source traversal order is generated by constructing a source neighbor priority queue that captures the neighbor relationships between atoms in the source molecule and by performing DFS on the source neighbor priority queue starting from the root node.
19. The method of claim 14, wherein the target traversal order is generated by constructing a target neighbor priority queue and performing a Depth-First Search (DFS) on the target neighbor priority queue starting from the root node, the target neighbor priority queue capturing the neighbor relationships between atoms in the target molecule and sorting them based on the source traversal order of the source molecule and the atomic correspondence between the source molecule and the target molecule.
20. The method of claim 14, wherein the atoms sharing the one-to-one correspondence between the source molecule and the target molecule are identified by an atom mapper.