Method, system and equipment for optimizing chemical reaction yield and medium
By constructing a similarity-constrained representation mapping model and a substructure masking method, the contribution of substructures in chemical reactions is quantified, solving the problem of inefficient chemical reaction yield optimization in existing technologies, and achieving efficient white-box interpretation and yield improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UNIV OF SCI & TECH OF CHINA
- Filing Date
- 2026-04-02
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies rely on researchers' experience to optimize chemical reaction yields, resulting in low efficiency, difficulty in understanding the chemical mechanisms in the reaction system, and the lack of explanatory power of black box models, making it impossible to achieve targeted modifications.
A similarity-constrained representation mapping model is constructed to map molecular fingerprints to reaction latent representations. The contribution of each substructure to the yield is quantified by the substructure masking method, realizing the transformation from black box to white box.
Precisely identifying specific substructures that promote or inhibit reaction yields can improve chemical reaction yields, shorten the cycle from laboratory to industrial application, and increase R&D efficiency.
Smart Images

Figure CN121958905A_ABST
Abstract
Description
Methods, systems, equipment, and media for optimizing chemical reaction yields Technical Field
[0001] This invention relates to the field of artificial intelligence, and specifically to a method, system, device, and medium for optimizing the yield of a chemical reaction. Background Technology
[0002] Chemical reaction yield is a core indicator for evaluating the economics and feasibility of a synthetic route, directly determining raw material costs, waste treatment load, and the difficulty of subsequent separation and purification. In organic synthesis research and industrial production, pursuing high-yield reaction conditions has always been the ultimate goal of process development. A typical reaction system usually involves multiple reaction elements, including but not limited to reaction substrates, ligands, solvents, additives, and catalysts. These reaction elements often have complex nonlinear coupling relationships, resulting in an extremely large reaction space. Traditional reaction condition optimization relies heavily on researchers' prior knowledge, trial-and-error experience, and intuitive judgment, often requiring significant experimental resources and time for single-factor rotation or orthogonal experimental screening. This experience-driven development model is not only inefficient and prone to getting stuck in local optima when facing novel reactions or complex systems, but it also significantly lengthens the technology transfer cycle from laboratory discovery to industrial production in fields such as drug development and materials synthesis, becoming a key bottleneck restricting the improvement of chemical synthesis efficiency.
[0003] In recent years, with the rapid development of machine learning technology, data-driven reaction performance prediction models have provided a new approach to solving the aforementioned problems. Existing techniques typically begin by using molecular fingerprints (such as Morgan fingerprints), molecular descriptors, or graph neural networks to structurally characterize the molecules involved in the reaction (such as substrates, ligands, and catalysts), converting these chemical structures into numerical vectors that can be processed by computers. Subsequently, based on these feature vectors and corresponding experimental data on reaction yields, supervised learning models such as support vector machines, random forests, or deep neural networks are used for training, aiming to fit the complex relationship between "molecular structure-reaction conditions-reaction yield." A well-trained model can provide yield predictions for new reaction combinations, thereby assisting researchers in narrowing down the experimental selection range and, to some extent, achieving "prediction-driven" experimental design. However, the above methods essentially construct a black box model, whose core function is limited to outputting a predicted value. It lacks the ability to explain the key structural factors affecting reaction yields, preventing researchers from gaining deep insights into the chemical mechanisms from the model's predictions. It is difficult to understand the specific mechanisms by which different substructures in the reaction system affect the stability of the reaction transition state or the efficiency of the catalytic cycle, and therefore, it is impossible to effectively translate the model's knowledge into targeted modification strategies for reaction schemes. Summary of the Invention
[0004] To address the above problems, this invention provides a method, system, equipment, and medium for optimizing chemical reaction yield.
[0005] The first aspect of this invention discloses a method for optimizing the yield of a chemical reaction, comprising: obtaining multiple training samples and a yield label for each training sample based on the reaction elements and candidate list of the target chemical reaction; generating a molecular fingerprint for each reaction element of each training sample, constructing an initial representation of each training sample based on the molecular fingerprint, and determining the substructures contained in each training sample; training a representation mapping model to be trained to map the initial representation using the yield label as supervision, such that the similarity relationship between the mapped features of each training sample and the similarity relationship between the yield labels of each training sample satisfy a preset similarity constraint, thereby obtaining a representation mapping model; inputting the initial representation into the representation mapping model to obtain a reaction latent representation; inputting the reaction latent representation into a yield prediction model to obtain a predicted yield for each training sample; wherein, the yield prediction model is a regression model trained based on the reaction latent representation and the yield label; for each substructure contained in all training samples, calculating the influence of masking its corresponding encoding in the initial representation on the predicted yield, thereby obtaining the contribution of each substructure to the target chemical reaction; and optimizing the target chemical reaction based on the contribution.
[0006] Furthermore, using yield labels as supervision, the training of the representation mapping model maps the initial representations, ensuring that the similarity between the mapped features of each training sample and the similarity between the yield labels of each training sample satisfy a preset similarity constraint. The steps to obtain the representation mapping model include: inputting the initial representations of all training samples into the representation mapping model to obtain the corresponding mapped features; selecting multiple training samples as reference samples based on the yield labels; for each training sample, calculating the first membership degree of each training sample belonging to each reference sample based on the distance between its corresponding mapped features and the corresponding mapped features of each reference sample, obtaining a first membership degree vector; for each training sample, calculating the second membership degree of each training sample belonging to each reference sample based on the difference between its corresponding yield label and the corresponding yield labels of each reference sample, obtaining a second membership degree vector; using the relative entropy between the first and second membership degree vectors as the loss function, adjusting the parameters of the representation mapping model to be trained until the value of the loss function is less than a threshold, thus obtaining the representation mapping model.
[0007] Furthermore, the training samples are calculated according to the following formula. Belonging to the Reference samples First membership vector : ;in, This represents the representation mapping model to be trained. Indicates training samples The corresponding mapping features, This represents the square of the Euclidean distance between vectors.
[0008] Furthermore, the training samples are calculated according to the following formula. Belonging to the Reference samples The second membership vector : ; ;in, Indicates training samples Corresponding yield label Compared with reference sample Corresponding yield label similarity, This represents the natural exponential function. This represents the preset Gaussian kernel bandwidth parameter.
[0009] Furthermore, for each substructure contained in all training samples, the step of calculating the influence of masking its corresponding encoding in the initial representation on the predicted yield to obtain the contribution of each substructure to the target chemical reaction includes: for each substructure contained in all training samples, selecting training samples containing that substructure from all training samples to form the associated samples corresponding to each substructure; for each associated sample of each substructure, setting the feature bits corresponding to that substructure in its initial representation to zero, and inputting them into the representation mapping model to generate the masked reaction latent representation corresponding to that associated sample; using the yield prediction model to generate the predicted yield corresponding to the masked reaction latent representation to obtain the comparative predicted yield corresponding to that associated sample; and calculating the contribution of each substructure to the target chemical reaction based on all comparative predicted yields corresponding to each substructure.
[0010] Furthermore, the step of calculating the contribution of each substructure to the target chemical reaction based on all the comparative predicted yields corresponding to each substructure includes: for each associated sample of each substructure, calculating the difference between the predicted yield of the associated sample and the comparative predicted yield, as the sample contribution value of the substructure in the associated sample; for each substructure, calculating the arithmetic mean of the sample contribution values of all its associated samples to obtain the contribution of the substructure to the target chemical reaction.
[0011] Furthermore, the steps for optimizing the target chemical reaction based on the contribution include: screening out multiple favorable substructures with the largest contribution and multiple unfavorable substructures with the smallest contribution from all substructures; introducing molecules containing favorable substructures and / or removing molecules containing unfavorable substructures into the reaction elements of the target chemical reaction to optimize the target chemical reaction.
[0012] The second aspect of this invention discloses a chemical reaction yield optimization system, comprising: an acquisition module for acquiring multiple training samples and a yield label for each training sample based on the reaction elements of the target chemical reaction and their candidate list; a generation module for generating molecular fingerprints for each reaction element of each training sample, constructing an initial representation of each training sample based on the molecular fingerprints, and determining the substructures contained in each training sample; and a training module for training a representation mapping model to be trained to map the initial representation using the yield labels as supervision, such that the similarity relationship between the mapped features of each training sample is similar to the similarity relationship between the yield labels of each training sample. A representation mapping model is obtained by satisfying preset similarity constraints; a mapping module is used to map the initial representation into the representation mapping model to obtain the reaction latent representation; a prediction module is used to input the reaction latent representation into the yield prediction model to obtain the predicted yield of each training sample; wherein, the yield prediction model is a regression model trained based on the reaction latent representation and the yield label; a calculation module is used to calculate the influence of masking its corresponding encoding in the initial representation on the predicted yield for each substructure contained in all training samples, thereby obtaining the contribution of each substructure to the target chemical reaction; an optimization module is used to optimize the target chemical reaction according to the contribution.
[0013] A third aspect of the present invention discloses an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of any of the chemical reaction yield optimization methods disclosed in the first aspect of the present invention.
[0014] A fourth aspect of the present invention discloses a storage medium storing a computer program that, when executed by a processor, implements the steps of any of the chemical reaction yield optimization methods disclosed in the first aspect of the present invention.
[0015] This invention constructs a representation mapping model with similarity constraints, mapping molecular fingerprints to latent reaction representations rich in semantic information about reaction yields. Based on this, a substructure masking method is used to quantify the contribution of each substructure to the predicted yield. Since this contribution is directly related to specific chemical fragments, this invention can transform the model's black-box prediction results into a white-box structure-performance relationship interpretation. That is, it can accurately locate specific substructures that promote or inhibit reaction yields, and selectively introduce beneficial substructures or avoid detrimental substructures to improve the yield of the target chemical reaction. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 is a flowchart illustrating a method for optimizing chemical reaction yield according to an embodiment of the present invention; Figure 2 is a structural diagram illustrating a system for optimizing chemical reaction yield according to an embodiment of the present invention; Figure 3 is a structural diagram illustrating an electronic device according to an embodiment of the present invention. Detailed Implementation
[0018] To enable those skilled in the art to better understand the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, apparatus, or product comprising a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, apparatus, or products.
[0020] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0021] Please refer to Figure 1, which is a flowchart illustrating a method for optimizing chemical reaction yield according to an embodiment of the present invention. As shown in Figure 1, the method for optimizing chemical reaction yield may include the following operations: S101, obtaining multiple training samples and a yield label for each training sample based on the reaction elements and candidate list of the target chemical reaction; in this optional embodiment, the target chemical reaction refers to the specific chemical reaction system whose reaction yield needs to be optimized, and the chemical product produced is the target product; the reaction yield refers to the ratio in quantity of the actual target product obtained in the target chemical reaction process to the theoretically obtainable maximum target product, which is a real number between 0 and 1, used to characterize the reaction efficiency; the reaction elements refer to the variable components constituting the target chemical reaction, such as reactants, catalysts, solvents, additives, etc.; the candidate list refers to the specific set of types that can be selected for each reaction element; the training sample refers to the specific reaction combination selected from the candidate list of each reaction element of the target chemical reaction, and each training sample is composed of a candidate value of each reaction element, used for subsequent model training; the yield label refers to the reaction yield obtained for a specific training sample through literature retrieval, database query, or experimental measurement, etc.
[0022] For example, a Lewis base-boron-promoted coupling reaction can be used as the target chemical reaction. This reaction promotes the coupling between a trichloromethyl substrate and an alkene via boron radicals, and is used to construct a multi-substituted quaternary carbon center. In this target chemical reaction, the reaction elements include a Lewis base-boron reagent, a substrate combination, additives, a solvent, and an initiator. There are four candidates for the Lewis base-boron reagent, including 4-dimethylaminopyridine·borane and triethylamine·borane.
[0023] S102. Generate a molecular fingerprint for each reaction element of each training sample, construct an initial representation of each training sample based on the molecular fingerprint, and determine the substructures contained in each training sample. In this optional embodiment, the molecular fingerprint is a representation that converts molecular structures into binary codes, where each bit of the code corresponds to a specific substructure. In this optional embodiment, the molecular fingerprint is a Morgan fingerprint with a dimension of 2048 and a radius of 2. Its generation method is common knowledge in the art and will not be described in detail here.
[0024] In this optional embodiment, the molecular fingerprints of all reaction elements in the same training sample are spliced together in a fixed order, such as in the order of "reactant-ligand-base-solvent-additive," to ensure that the feature vectors of different training samples have a consistent structure. The resulting feature is a high-dimensional vector, which is then subjected to principal component analysis for dimensionality reduction to obtain an initial characterization used to comprehensively describe the structural information of all molecules in a training sample.
[0025] Substructures refer to molecular segments in a molecule that are predefined based on a chemical rule base and are formed by specific types of atoms linked by specific chemical bonds, such as functional groups or carbon skeletons.
[0026] By statistically analyzing each bit of the molecular fingerprint of all training samples, mapping each bit of the code to a specific substructure, and removing duplicate substructures, all substructures contained in each training sample can be determined.
[0027] S103. Using yield labels as supervision, train the representation mapping model to be trained to map the initial representations, so that the similarity relationship between the mapped features of each training sample and the similarity relationship between the yield labels of each training sample satisfy a preset similarity constraint, thus obtaining the representation mapping model; In an optional embodiment, the step of training the representation mapping model to be trained to map the initial representations using yield labels as supervision, so that the similarity relationship between the mapped features of each training sample and the similarity relationship between the yield labels of each training sample satisfy a preset similarity constraint, thus obtaining the representation mapping model, includes: inputting the initial representations of all training samples into the representation mapping model to be trained to obtain the corresponding mapped features; according to the yield... For each training sample, multiple training samples are selected as reference samples based on their rate labels. For each training sample, the first membership degree of each training sample is calculated based on the distance between its corresponding mapping feature and the mapping features of each reference sample, resulting in a first membership degree vector. For each training sample, the second membership degree of each training sample is calculated based on the difference between its corresponding yield label and the yield labels of each reference sample, resulting in a second membership degree vector. The relative entropy between the first and second membership degree vectors is used as the loss function. The parameters of the representation mapping model to be trained are adjusted until the value of the loss function is less than a threshold, thus obtaining the representation mapping model.
[0028] In this optional embodiment, a clustering algorithm can be used to select reference samples, such as using the K-means clustering algorithm to cluster all training samples to obtain... Each cluster center serves as a reference sample. The value can be, for example, the square root of the total number of training samples, rounded up.
[0029] The training representation mapping model employs a neural network structure, such as a multilayer perceptron (MLP), a one-dimensional convolutional neural network (1D-CNN), or a residual neural network (ResNet). All of these network structures can accept fixed-length molecular fingerprint vectors as input and learn high-level feature representations of training samples through multi-layer nonlinear transformations. The number of network layers and the number of neurons in each layer of the training representation mapping model can be adjusted according to actual needs.
[0030] In this optional embodiment, the loss function for: ;in, Indicates training samples Belonging to the Reference samples The first membership vector, Indicates training samples Belonging to the Reference samples The second membership vector.
[0031] In this alternative embodiment, the model parameters of the representation mapping model to be trained are optimized by stochastic gradient descent combined with an adaptive moment estimation optimizer (Adam) until the value of the loss function is less than a threshold.
[0032] As can be seen, this optional embodiment uses reference samples as anchors, employs a first membership degree to characterize the local neighborhood relationships of training samples in the feature space, and uses a second membership degree to accurately reflect yield similarity. It forces the two to converge through relative entropy loss, thereby enabling the trained representation mapping model to generate response latent representations rich in yield discriminative information. These response latent representations provide high-quality input for the subsequent training of the yield prediction model, avoiding noise that might be introduced by directly using the initial representations, improving prediction accuracy, and laying a reliable foundation for substructure contribution analysis, making the analysis results more interpretable and credible.
[0033] In an optional embodiment, training samples are calculated according to the following formula. Belonging to the Reference samples First membership vector : ;in, This represents the representation mapping model to be trained. Indicates training samples The corresponding mapping features, This represents the square of the Euclidean distance between vectors.
[0034] As can be seen, in this optional embodiment, the squared distance term gives higher unnormalized weights to training samples that are closer in distance, while the weights of training samples that are farther away decay rapidly. The first membership vector obtained after normalization can smoothly reflect the local structural relationship between the training samples and each reference sample. Compared with simple linear distance, this nonlinear metric can better capture the complex distribution patterns in the feature space, which helps the characterization mapping model learn more discriminative response latent representations.
[0035] In an optional embodiment, training samples are calculated according to the following formula. Belonging to the Reference samples The second membership vector : ; ;in, Indicates training samples Corresponding yield label Compared with reference sample Corresponding yield label similarity, This represents the natural exponential function. This represents the preset Gaussian kernel bandwidth parameter.
[0036] In this optional embodiment, the Gaussian kernel bandwidth parameter The default value is 0.1.
[0037] As can be seen, this optional embodiment further specifies that the calculation of the second membership vector adopts a Gaussian kernel function, which transforms the numerical differences between yield labels into probabilistic similarity weights. The Gaussian kernel is based on the square of the yield difference, and the similarity decay rate is controlled by a preset Gaussian kernel bandwidth parameter, which can accurately quantify the closeness of the yields between training samples and improve the prediction accuracy of the subsequent yield prediction model.
[0038] S104. Input the initial representation into the representation mapping model to obtain the response latent representation; S105. Input the response latent representation into the yield prediction model to obtain the predicted yield of each training sample; wherein, the yield prediction model is a regression model trained based on the response latent representation and the yield label; in an optional embodiment, the regression model is a random forest regression model.
[0039] S106. For each substructure contained in all training samples, the contribution of each substructure to the target chemical reaction is obtained by calculating the influence of the corresponding encoding of the masking in the initial representation on the predicted yield. In an optional embodiment, the step of obtaining the contribution of each substructure to the target chemical reaction by calculating the influence of the corresponding encoding of the masking in the initial representation on the predicted yield for each substructure contained in all training samples includes: for each substructure contained in all training samples, selecting training samples containing the substructure from all training samples to form associated samples corresponding to each substructure; for each associated sample of each substructure, setting the feature bit corresponding to the substructure in its initial representation to zero, and inputting it into the representation mapping model to generate the masked reaction latent representation corresponding to the associated sample; using the yield prediction model to generate the predicted yield corresponding to the masked reaction latent representation to obtain the comparative predicted yield corresponding to the associated sample; and calculating the contribution of each substructure to the target chemical reaction based on all comparative predicted yields corresponding to each substructure.
[0040] In this optional embodiment, for a substructure, since it only actually exists in its associated samples, the true role of the substructure can only be reflected by analyzing the changes in predicted yield under both the presence and absence of the substructure in these associated samples. For a given associated sample, the feature bit corresponding to the substructure in its initial characterization is set to zero, which is equivalent to removing the substructure from the molecular structure information, while retaining all other structural information from the training samples unchanged. Comparing the predicted yield with the predicted yield reflects the degree of contribution of the substructure to the yield in that associated sample. If the predicted yield is lower than the predicted yield, it indicates that the presence of the substructure helps to improve the reaction yield; conversely, it indicates that the substructure has an inhibitory effect on the reaction yield.
[0041] As can be seen, this optional embodiment only analyzes training samples containing the substructure, avoiding interference from irrelevant training samples and focusing the contribution calculation on the actual reaction scenario in which the substructure appears. The masking operation sets the feature position of the corresponding substructure in the initial representation to zero, simulating the case where the substructure is missing. Then, the yield is predicted by comparing the mask generated by the representation mapping model and the yield prediction model. Since the reaction latent representation has been trained to be highly correlated with the yield, the prediction change brought about by masking can truly reflect the impact of the substructure on the yield. This model-based attribution method does not rely on human experience, can automatically identify key structural units, and is applicable to various organic reaction systems, providing an objective basis for subsequent optimization and significantly improving the interpretability and practicality of the invention.
[0042] In an optional embodiment, the step of calculating the contribution of each substructure to the target chemical reaction based on all the comparative predicted yields corresponding to each substructure includes: for each associated sample of each substructure, calculating the difference between the predicted yield of the associated sample and the comparative predicted yield as the sample contribution value of the substructure in the associated sample; for each substructure, calculating the arithmetic mean of the sample contribution values of all its associated samples to obtain the contribution of the substructure to the target chemical reaction.
[0043] As can be seen, this optional embodiment calculates the difference between the predicted yield and the comparative predicted yield of each associated sample as the sample contribution value, and then takes the arithmetic mean to obtain the substructure contribution degree, ensuring the robustness and comparability of the results. The contribution value of a single sample may be affected by other factors in the reaction system. However, by averaging, the performance of the substructure in different reaction combinations can be comprehensively considered, eliminating random errors and obtaining a contribution degree that reflects its average influence. A positive contribution value indicates that the substructure promotes the yield in most cases, while a negative value indicates its inhibitory effect. The absolute value directly reflects the intensity of the influence. This quantitative result allows for direct comparison between different substructures, facilitating the subsequent screening of beneficial and detrimental substructures, providing clear guidance for reaction optimization, thereby improving optimization efficiency and reducing unnecessary experimental exploration.
[0044] S107. Optimize the target chemical reaction based on the stated contribution.
[0045] In an optional embodiment, the step of optimizing the target chemical reaction based on the contribution includes: screening out multiple favorable substructures with the largest contribution and multiple unfavorable substructures with the smallest contribution from all substructures; introducing molecules containing favorable substructures and / or removing molecules containing unfavorable substructures into the reaction elements of the target chemical reaction to optimize the target chemical reaction.
[0046] In this optional embodiment, by introducing molecules containing favorable substructures into the reaction elements of the target chemical reaction, new candidate reaction schemes can be generated based on the original reaction combinations, or existing reaction schemes can be improved to obtain new candidate reaction schemes. Similarly, by removing molecules containing unfavorable substructures from the reaction elements of the target chemical reaction, new candidate reaction schemes can be generated, or existing reaction schemes can be improved to obtain new candidate reaction schemes. Subsequently, these candidate reaction schemes can be experimentally verified, or their predicted yields can be further evaluated using yield prediction models, thereby screening out reaction schemes with higher reaction yields.
[0047] As can be seen, this alternative embodiment is optimized by introducing or removing corresponding molecules. This strategy directly targets the structural root causes affecting yield and has clear chemical operability. Introducing molecules containing favorable substructures can enhance the yield-promoting effect, while removing molecules containing unfavorable substructures can eliminate inhibitory factors. The combination of the two can achieve targeted optimization. Compared with traditional trial-and-error methods, this data-driven optimization path significantly improves R&D efficiency and shortens the cycle from laboratory to industrial application, demonstrating the practical value of this invention.
[0048] Please refer to Figure 2, which is a schematic diagram of the structure of a chemical reaction yield optimization system disclosed in an embodiment of the present invention. The system includes: an acquisition module 201, used to acquire multiple training samples and a yield label for each training sample based on the reaction elements and candidate list of the target chemical reaction; a generation module 202, used to generate molecular fingerprints for each reaction element of each training sample, construct an initial representation of each training sample based on the molecular fingerprints, and determine the substructures contained in each training sample; and a training module 203, used to train a representation mapping model to map the initial representation using the yield labels as supervision, so that the similarity relationship between the mapped features of each training sample is consistent with the yield labels of each training sample. The similarity relationships between the samples satisfy a preset similarity constraint to obtain a representation mapping model; the mapping module 204 is used to map the initial representation into the representation mapping model to obtain the reaction latent representation; the prediction module 205 is used to input the reaction latent representation into the yield prediction model to obtain the predicted yield of each training sample; wherein, the yield prediction model is a regression model trained based on the reaction latent representation and the yield label; the calculation module 206 is used to calculate the influence of masking its corresponding encoding in the initial representation on the predicted yield for each substructure contained in all training samples to obtain the contribution of each substructure to the target chemical reaction; the optimization module 207 is used to optimize the target chemical reaction according to the contribution.
[0049] Specific limitations regarding the optimization system for chemical reaction yields can be found in the limitations of the optimization methods for chemical reaction yields described above, and will not be repeated here. Each module in the aforementioned optimization system for chemical reaction yields can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware format within or independently of the processor in an electronic device, or stored in software format in the memory of an electronic device, so that the processor can call the corresponding operations of each module.
[0050] It should be noted that, in order to highlight the innovative aspects of this invention, this embodiment does not include modules that are not closely related to solving the technical problems proposed by this invention, but this does not mean that there are no other modules in this embodiment.
[0051] As shown in Figure 3, the electronic device 1 provided by the present invention may include a memory 12, a processor 13 and a bus, and may also include a computer program stored in the memory 12 and executable on the processor 13, such as a chemical reaction yield optimization program.
[0052] The memory 12 includes at least one type of readable storage medium, such as flash memory, portable hard drive, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 12 can be an internal storage unit of the electronic device 1, such as a portable hard drive. In other embodiments, the memory 12 can be an external storage device of the electronic device 1, such as a plug-in portable hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 1. Furthermore, the memory 12 can include both internal and external storage units of the electronic device 1. The memory 12 can be used not only to store application software and various types of data installed on the electronic device 1, such as code for optimizing chemical reaction yields, but also to temporarily store data that has been output or will be output.
[0053] In some embodiments, the processor 13 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips. The processor 13 is the control unit of the electronic device 1, connecting various components of the electronic device 1 via various interfaces and lines. It executes programs or modules (such as chemical reaction yield optimization programs) stored in the memory 12, and calls data stored in the memory 12 to perform various functions of the electronic device 1 and process data.
[0054] The processor 13 executes the operating system of the electronic device 1 and various installed applications. The processor 13 executes the applications to implement the steps in the above-described method for optimizing the yield of the chemical reaction.
[0055] For example, the computer program may be divided into one or more modules, which are stored in the memory 12 and executed by the processor 13 to complete this application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device 1. For example, the computer program may be divided into an acquisition module 201, a generation module 202, a training module 203, a mapping module 204, a prediction module 205, a calculation module 206, and an optimization module 207.
[0056] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium, which can be non-volatile or volatile. The software functional module stored in the storage medium includes several instructions to cause a computer device (which may be a personal computer, computer equipment, or network device, etc.) or processor to execute some functions of the chemical reaction yield optimization method described in the various embodiments of this application.
[0057] In summary, the present invention discloses a method, system, device, and medium for optimizing chemical reaction yields. By constructing a characterization mapping model with similarity constraints, molecular fingerprints are mapped to latent reaction representations rich in yield semantic information. Based on this, a substructure masking method is used to quantitatively evaluate the contribution of each substructure to the predicted yield. Since this contribution is directly related to specific chemical fragments, the present invention can transform the black-box prediction results of the model into a white-box structure-performance relationship interpretation. That is, it can accurately locate specific substructures that promote or inhibit reaction yields, and selectively introduce beneficial substructures or avoid unfavorable substructures to improve the target chemical reaction yield. Therefore, the present invention effectively overcomes the various shortcomings of existing technologies and has high industrial application value.
[0058] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A method for optimizing the yield of a chemical reaction, characterized in that, The method includes: obtaining multiple training samples and a yield label for each training sample based on the reaction elements and candidate list of the target chemical reaction; generating a molecular fingerprint for each reaction element of each training sample, constructing an initial representation of each training sample based on the molecular fingerprint, and determining the substructures contained in each training sample; training a representation mapping model to map the initial representation using the yield label as supervision, such that the similarity relationship between the mapped features of each training sample and the similarity relationship between the yield labels of each training sample satisfy a preset similarity constraint, thus obtaining a representation mapping model; mapping the initial representation into the representation mapping model to obtain a reaction latent representation; inputting the reaction latent representation into a yield prediction model to obtain a predicted yield for each training sample; wherein, the yield prediction model is a regression model trained based on the reaction latent representation and the yield label; for each substructure contained in all training samples, calculating the influence of masking its corresponding encoding in the initial representation on the predicted yield, thus obtaining the contribution of each substructure to the target chemical reaction; and optimizing the target chemical reaction based on the contribution.
2. The method for optimizing chemical reaction yield according to claim 1, characterized in that, Using yield labels as supervision, a training representation mapping model is developed to map initial representations, ensuring that the similarity between the mapped features of each training sample and the similarity between the yield labels of each training sample satisfy a preset similarity constraint. The steps to obtain the representation mapping model include: inputting the initial representations of all training samples into the training representation mapping model to obtain corresponding mapped features; selecting multiple training samples as reference samples based on the yield labels; for each training sample, calculating the first membership degree of each training sample belonging to each reference sample based on the distance between its corresponding mapped features and the corresponding mapped features of each reference sample, obtaining a first membership degree vector; for each training sample, calculating the second membership degree of each training sample belonging to each reference sample based on the difference between its corresponding yield label and the corresponding yield labels of each reference sample, obtaining a second membership degree vector; using the relative entropy between the first and second membership degree vectors as the loss function, adjusting the parameters of the training representation mapping model until the value of the loss function is less than a threshold, thus obtaining the representation mapping model.
3. The method for optimizing chemical reaction yield according to claim 2, characterized in that, The training samples are calculated using the following formula. Belonging to the Reference samples First membership vector : ;in, This represents the representation mapping model to be trained. Indicates training samples The corresponding mapping features, This represents the square of the Euclidean distance between vectors.
4. The method for optimizing the yield of a chemical reaction according to claim 2, characterized in that, The training samples are calculated using the following formula. Belonging to the Reference samples The second membership vector : ; ;in, Indicates training samples Corresponding yield label Compared with reference sample Corresponding yield label similarity, This represents the natural exponential function. This represents the preset Gaussian kernel bandwidth parameter.
5. The method for optimizing the yield of a chemical reaction according to claim 1, characterized in that, The steps for calculating the contribution of each substructure to the target chemical reaction by calculating the impact of masking its corresponding encoding in the initial representation on the predicted yield for each substructure included in all training samples are as follows: For each substructure included in all training samples, training samples containing that substructure are selected from all training samples to form associated samples corresponding to each substructure; for each associated sample of each substructure, the feature bits corresponding to that substructure in its initial representation are set to zero, and then input into the representation mapping model to generate the masked reaction latent representation corresponding to that associated sample; the predicted yield corresponding to the masked reaction latent representation is generated using the yield prediction model to obtain the comparative predicted yield corresponding to that associated sample; and the contribution of each substructure to the target chemical reaction is calculated based on all comparative predicted yields corresponding to each substructure.
6. The method for optimizing chemical reaction yield according to claim 5, characterized in that, The steps for calculating the contribution of each substructure to the target chemical reaction based on all the comparative predicted yields for each substructure include: for each associated sample of each substructure, calculating the difference between the predicted yield of the associated sample and the comparative predicted yield, as the sample contribution value of the substructure in the associated sample; for each substructure, calculating the arithmetic mean of the sample contribution values of all its associated samples to obtain the contribution of the substructure to the target chemical reaction.
7. The method for optimizing the yield of a chemical reaction according to claim 1, characterized in that, The steps for optimizing the target chemical reaction based on the contribution include: screening out the multiple favorable substructures with the largest contribution and the multiple unfavorable substructures with the smallest contribution from all substructures; introducing molecules containing favorable substructures and / or removing molecules containing unfavorable substructures into the reaction elements of the target chemical reaction to optimize the target chemical reaction.
8. A system for optimizing the yield of a chemical reaction, characterized in that, The system includes: an acquisition module for acquiring multiple training samples and a yield label for each training sample based on the reaction elements and candidate list of the target chemical reaction; a generation module for generating molecular fingerprints for each reaction element of each training sample, constructing an initial representation of each training sample based on the molecular fingerprints, and determining the substructures contained in each training sample; a training module for training a representation mapping model to be trained to map the initial representation using the yield labels as supervision, such that the similarity relationship between the mapped features of each training sample and the similarity relationship between the yield labels of each training sample satisfy a preset similarity constraint, thereby obtaining a representation mapping model; a mapping module for mapping the initial representation into the representation mapping model to obtain a reaction latent representation; a prediction module for inputting the reaction latent representation into a yield prediction model to obtain the predicted yield of each training sample; wherein, the yield prediction model is a regression model trained based on the reaction latent representation and the yield labels; a calculation module for calculating the influence of masking the corresponding encoding in the initial representation on the predicted yield for each substructure contained in all training samples, thereby obtaining the contribution of each substructure to the target chemical reaction; and an optimization module for optimizing the target chemical reaction based on the contribution.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method for optimizing the chemical reaction yield as described in any one of claims 1 to 7.
10. A storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for optimizing the chemical reaction yield as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Reactivity prediction model training method, reactivity prediction method and device
CN116978467A
Chemical reaction yield prediction method and electronic equipment
CN117116370A
Method and device for predicting yield of chemical reaction
CN119049593A
Yield prediction method and device and electronic equipment
CN119446313A