Antibiotic production method based on search optimization guided by antibacterial activity
By constructing an antibacterial activity prediction network model and an antibiotic generation network model, and utilizing the latent space characterization relationship with the antibacterial activity of compound molecules, the problems of low generation efficiency and insufficient expected activity in existing technologies are solved, and the efficient generation of antibiotic molecules with expected activity is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies are inefficient at generating antibiotic molecules and cannot guarantee that all generated compounds will have the expected activity.
An antimicrobial activity prediction network model and an antibiotic generation network model were constructed. By optimizing the encoder-decoder latent space, the latent space of the antimicrobial activity prediction network model was used to characterize the relationship between the antimicrobial activity of the compound molecule and the generation network model to guide the generation network model to generate compound molecules with the expected activity.
This improved the efficiency of compound molecule generation, ensuring that the generated compound molecules all have the expected antibacterial activity, thus achieving highly efficient antibiotic production.
Smart Images

Figure CN115732040B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of bioinformatics technology and relates to a method for generating active compound molecules, specifically an antibiotic generation method based on antibacterial activity-guided search optimization, which can be used to guide the research and development of new drugs. Background Technology
[0002] Antibiotics are a class of secondary metabolites produced by microorganisms or higher plants and animals that possess antipathogenic or other activities, as well as similar compounds that are artificially synthesized or semi-synthesized. Antibiotic resistance, the ability of bacteria and other microorganisms to prevent the effects of antibiotics and other drugs, rendering standard treatments ineffective, is one of the most pressing public health problems facing the world today, making the development of new antibiotics urgent. However, due to unresolved regulatory issues and a lack of commercial appeal, the development of new antibiotics is often abandoned. Furthermore, industry experts have analyzed unsuccessful antibiotic development programs and found that high-throughput screening of synthetic chemicals often fails to identify promising compounds with the expected performance. Therefore, new methods are needed to identify and develop new antibiotics to address antibiotic resistance. In this context, generating active compound molecules using deep learning methods would be an ideal approach for discovering candidate antibiotic molecules.
[0003] To date, methods for generating active compound molecules using deep learning can be categorized into two types: translation-based methods and optimization-based methods. These two categories are not mutually exclusive. Translation-based methods can be further divided into two subcategories based on different representations of the compound molecules: SMILES-based methods and molecular graph-based methods. SMILES-based methods transform the compound molecule generation task into a sequence-to-sequence generation task; molecular graph-based methods transform the compound molecule generation task into a graph-to-graph generation task.
[0004] In optimization-based methods, optimization can be performed in the generated molecular graph or SMILES space, or in the encoder-decoder latent space. For optimization in the generated molecular graph or SMILES space, a common paradigm is the combination of the generative model and a reinforcement learning attribute prediction model or scoring function: the generated result is evaluated using the reinforcement learning attribute prediction model or scoring function, and the evaluation is fed back to the generative model to guide it in generating the expected compound molecule. For optimization in the encoder-decoder latent space, existing methods use different optimization strategies to optimize and generate compound molecules: in the encoder-decoder latent space, the characterization of existing compound molecules is optimized to obtain new characterizations, and the encoder-decoder is used to generate new compound molecule characterizations corresponding to these new characterizations.
[0005] Methods that optimize within the encoder-decoder latent space can generate compounds with better activity by avoiding optimization in a large, discrete, and unstructured generative space. However, existing methods neglect guidance from expected properties. For example, the 2022 paper "Design of potent antimalarials with generative chemistry" by Godinez WJ et al. in *Nature Machine Intelligence* disclosed a generative chemistry-based method for generating antimalarial drugs. This method trains an encoder-decoder using an antimalarial drug dataset, then performs principal component analysis (PCA) on the latent space, sampling the principal components and inputting the sampled latent space representation into the decoder to generate new candidate active compounds. This method shortens computation time and achieves reproducibility by sampling the principal components of the latent space. However, this method requires PCA across the entire latent space and only samples the principal components, failing to effectively utilize the relationship between latent space representation and compound activity. This results in low generation efficiency and an inability to guarantee that all optimized compounds possess the expected activity. Summary of the Invention
[0006] The purpose of this invention is to overcome the shortcomings of the prior art and propose an antibiotic generation method based on antibacterial activity-guided search optimization, which solves the technical problems of low generation efficiency and inability to guarantee that the optimized compound molecules have the expected activity.
[0007] To achieve the above objectives, the technical solution adopted by the present invention includes the following steps:
[0008] (1) Obtaining antibiotic molecular datasets:
[0009] Obtain a dataset D containing N antibiotic molecules. ori ={d1 ori ,d2 ori ,...,d n ori ,...,d N ori}, where N≥1000, d n ori S represents the linear input specification SMILES of the nth simplified molecule. n ori The molecular diagram is G. n ori The minimum inhibitory concentration (MIC) is l n antibiotic molecules, d n ori={S n ori G n ori ,l n}, S n ori ={s1 ori_n ,s2 ori_n ,...s nl ori_n ,...s NL ori_n}, 0 < NL < 500, s nl ori_n S represents n ori The character at position nl, G n ori ={A n ori ED n ori}, A n ori Molecular diagram G n ori The set of atoms contained, ED n ori Molecular diagram G n ori The set of edges connecting the atoms in l n Indicates the measurement d n ori Strength or weakness of antibacterial activity;
[0010] (2) Construct the training sample set and the test sample set:
[0011] Antibiotic molecular dataset D ori Each antibiotic molecule in the sample is pretreated to obtain a pretreated sample set D = {d1, d2, ..., d...} n ,...,d N}, randomly select R samples from the preprocessed sample set D as the training sample set Dt, and use the remaining NR samples as the test sample set Dte, where d n ={S n G n ,l n},
[0012] (3) Constructing an antibacterial activity prediction network model C:
[0013] (3a) Constructing the structure of the antimicrobial activity prediction network model C:
[0014] Construct an antimicrobial activity prediction network model C consisting of a sequentially connected encoder E and a predictor P, wherein the encoder E adopts a message-passing neural network, and the predictor P consists of a series of sequentially connected feature extraction blocks composed of fully connected layers, ReLU activation function output layers and Dropout layers, and an output fully connected layer.
[0015] (3b) Define the loss function L1 for the antibacterial activity prediction network model C:
[0016]
[0017] Among them, l r For sample d r The minimum inhibitory concentration (MIC) value, l r 'For sample d r The predicted minimum inhibitory concentration (MIC) value;
[0018] (4) Iteratively train the antibacterial activity prediction network model C:
[0019] (4a) The initial number of iterations is j, the maximum number of iterations is J, J≥30, and the network parameters of the antibacterial activity prediction network model C are θ. C ={θ E ,θ P}, θ E Let θ be the network parameters of encoder E. P Let j be the network parameters of the predictor P, and let j = 0;
[0020] (4b) The training sample set Dt is used as the input to the antibacterial activity prediction network model C, and the encoder E processes each training sample d. r The molecular diagram is message-passed and read out to obtain the latent spatial representation z. r Predictor P for z r Feature extraction is performed and output to obtain the predicted minimum inhibitory concentration (MIC) value. r ';
[0021] (4c) The loss function L1 is used, and the minimum inhibitory concentration (MIC) value is predicted by l. r 'and minimum inhibitory concentration value l r Calculate the loss L of the antibacterial activity prediction network model C. 1j Then, the backpropagation method is used, and through L 1j Calculate the parameter gradients of C, and finally use the gradient descent algorithm to apply the parameter gradients to the network parameters θ of C. C Update;
[0022] (4d) Determine whether j≥J holds true. If so, obtain the trained antimicrobial activity prediction network model C. * Otherwise, let j = j + 1 and execute step (4b);
[0023] (5) Constructing an antibiotic production network model H:
[0024] (5a) Constructing the structure of the antibiotic generation network model H:
[0025] Construct an antibiotic generation network model H consisting of a sequentially connected encoder E and a generator G, where the encoder E and its network parameters adopt a pre-trained antibacterial activity prediction network model C. * Encoder E in * The generator G, along with its network parameters, consists of a sequentially connected fully connected input layer and multiple decoding blocks composed of a self-attention layer, a layer normalization layer, a Dropout layer, a fully connected layer, and a GELU activation function output layer.
[0026] (5b) Define the loss function L2 for the antibiotic generation network model H:
[0027]
[0028] Among them, S r It is the sample d in the training sample set Dt r SMILES, y r It is d r Molecular diagram G r The latent space representation, S, obtained by the encoder E of the input antibiotic generation network model H. r 'is d r The generation of SMILES, s v r It is S r The character at the vth position;
[0029] (6) Iteratively train the antibiotic generation network model H:
[0030] (6a) Initialize the number of iterations to i, the maximum number of iterations to I, I≥10, and the network parameters of the antibiotic generation network model H are θ. H ={θ E * ,θ G}, θ E * For encoder E * Network parameters, θ G For the network parameters of the generator G, the encoder E is fixed. * Network parameters θ E * Keep it unchanged, and let i = 0;
[0031] (6b) The training sample set Dt is used as the input to the antibiotic generation network model H, and the encoder E * For each training sample dr The molecular diagram is message-passed and read out to obtain the latent spatial representation y. r Generator G for E * The latent space representation y of the output r Perform dimensional transformation and decoding to obtain d. r The generation of SMILES S r ';
[0032] (6c) Employ the loss function L2, and use d r The generation of S r 'For the actual S r Likelihood estimation calculates the loss L of the antibiotic generation network model H. 2i Then, the backpropagation method is used, and through L 2i The gradients of the generator G's parameters are calculated, and finally, the gradient descent algorithm is used to apply the gradients to the network parameters θ of G. G Update;
[0033] (6d) Determine if i ≥ I. If so, obtain the trained antibiotic generation network model H. * Otherwise, let i = i + 1 and execute step (6b);
[0034] (7) Optimization of antibiotic molecule antibacterial activity-guided search:
[0035] (7a) Randomly select Q antibiotic molecules from the test sample set Dte, Dop = {d1, d2, ..., d...} q ,...,d Q As the optimization objective, Dop is used as the antibiotic generation network model H. * encoder E * The input is used to obtain the pre-optimization latent space representation Y of Q samples. Dop ={y1,y2,...,y q ,...,y Q}, where 0≤Q≤T;
[0036] (7b) Sample Gaussian noise to obtain Y Dop Optimization starting point set Y f As a predictor P * Input Y to get Y f Corresponding to the predicted antibacterial activity set
[0037] (7c) Let the minimum threshold of the minimum inhibitory concentration be fit_min and the maximum threshold be fit_max. The set of latent space representations after Dop optimization is Y, Y={Y1,Y2,...,Y}. q ,...,YQ Let L' be the set of minimum inhibitory concentrations (MICs), where L' = {L1', L2', ..., L}. q ',...,L Q '}, where fit_min>0, fit_max≤3, Y q For d q The set of optimized latent space representations, L q 'For Y q Let Y be the set of minimum inhibitory concentrations. q ={}, L q '={};
[0038] (7d) Initialize the number of optimizations num and the total number of optimizations NUM, where NUM > 10000, and set num = 0;
[0039] (7e) Using the search optimization function F, guided by the antibacterial activity in L', the Y... f Perform search optimization to obtain a new optimization starting point set Y. f and predicted antibacterial activity set L f ', and obtain the optimized and updated set Y and the corresponding set L';
[0040] (7f) Determine if num < NUM. If yes, num = num + 1 and execute step (7e). Otherwise, obtain the optimized potential space representation set Y and the corresponding minimum inhibitory concentration value set L'.
[0041] (8) Generate optimization results:
[0042] Input the optimized latent space representation set Y obtained in step (7f) into the trained antibiotic generation network model H. * Generator G * Perform dimensional transformation and decoding to obtain the optimized set of SMILES, SC = {SC1, SC2, ..., SC...}. q ,...,SC Q The predicted antibacterial activity of antibiotics SMILES generated in SC is obtained from the corresponding subscript in L', where SC q It is an antibiotic molecule d q The optimized set of SMILES is generated.
[0043] Compared with the prior art, the present invention has the following advantages:
[0044] In constructing the antibiotic generation network model, this invention first builds an antibacterial activity prediction network model. During the training of this model, the key factor of the relationship between the latent space representation and the antibacterial activity of the compound molecules is considered, and a connection is established between the latent space representation and the antibacterial activity of the compound molecules. Therefore, during the optimization process, antibacterial activity can guide the entire optimization process towards stronger antibacterial activity. Furthermore, the encoder and its network parameters of the antibacterial activity prediction network model are incorporated into the antibiotic generation network model, establishing a connection between the latent space and the generation space. This allows for the direct generation of optimization results from the latent space. Compared with existing technologies, this invention effectively improves generation efficiency and avoids the problem that existing technologies cannot guarantee that all generated compound molecules have the expected activity. Attached Figure Description
[0045] Figure 1 This is a flowchart illustrating the implementation of the present invention. Detailed Implementation
[0046] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0047] Reference Figure 1 The present invention includes the following steps:
[0048] Step 1, Obtain the compound molecule dataset:
[0049] Obtain a dataset D containing N antibiotic molecules. ori ={d1 ori ,d2 ori ,...,d n ori ,...,d N ori}, where N = 2334, d n ori S represents the linear input specification SMILES of the nth simplified molecule. n ori The molecular diagram is G. n ori The minimum inhibitory concentration (MIC) is l n antibiotic molecules, d n ori ={S n ori G n ori ,l n}, S n ori ={s1 ori_n ,s2 ori_n ,...s nl ori_n ,...sNL ori_n}, 0 < NL < 500, s nl ori_n S represents n ori The character at position nl, G n ori ={A n ori ED n ori}, A n ori Molecular diagram G n ori The set of atoms contained, ED n ori Molecular diagram G n ori The set of edges connecting the atoms in l n Indicates the measurement d n ori The strength of antibacterial activity, l n The smaller the size, the stronger the antibacterial activity. n The larger the size, the weaker the antibacterial activity.
[0050] Step 2, construct the training sample set and the test sample set:
[0051] Step 2a) On the antibiotic molecular dataset D ori Each antibiotic molecule in the mixture undergoes pretreatment:
[0052] Antibiotic molecular dataset D ori S in n ori Each character s nl ori_n Perform one-hot encoding to obtain the encoded S n ={s1 n ,s2 n ,...s nl n ,...s NL n}, for G n ori A in n ori Each atom and ED n ori Each edge is feature-encoded to obtain the encoded molecular graph G. n ={A n ED n}, obtain the preprocessed sample d n ={S n G n ,ln}, and obtain the sample set D = {d1, d2, ..., d} n ,...,d N The preprocessed sample set can be directly used as input for a machine learning model;
[0053] Step 2b) Randomly select R samples from the preprocessed sample set D as the training sample set Dt, and use the remaining NR samples as the test sample set Dte, where d n ={S n G n ,l n}, R = 1867.
[0054] Step 3, construct antibacterial activity prediction network model C:
[0055] Step 3a) Construct the structure of the antibacterial activity prediction network model C:
[0056] Construct an antimicrobial activity prediction network model C consisting of a sequentially connected encoder E and a predictor P, wherein the encoder E adopts a message-passing neural network, and the predictor P consists of a series of sequentially connected feature extraction blocks composed of fully connected layers, ReLU activation function output layers and Dropout layers, and an output fully connected layer.
[0057] The message passing process of the message passing neural network used by encoder E is as follows:
[0058]
[0059]
[0060]
[0061]
[0062] h a =α(W y [x a ,m a ])
[0063] Where a, b, and c represent molecular diagram G r In the atom, N(a) represents the set of atoms connected to atom a. This indicates a hidden state. Indicates a message, x a Represents atomic feature encoding, e ab Indicates key feature encoding, and W k W y ∈R h*hLet represent the learning matrix, α be the ReLU activation function, [·,·] be the connections, and t∈{1,2,···,T} be the number of message passes, where T=3; then, the data is read out according to the following equation:
[0064]
[0065] Obtain the molecular graph G with y vector as input. r The potential spatial representation;
[0066] The specific structure of the predictor P is as follows:
[0067] The predictor P includes one fully connected output layer;
[0068] The feature extraction block consists of a sequentially connected fully connected layer, a ReLU activation function output layer, and a Dropout layer;
[0069] The predictor P consists of two sequentially connected feature extraction blocks and an output fully connected layer;
[0070] The parameters of each layer of the predictor P are set as follows: the shape of the fully connected layer in the first feature extraction block is 1900x256, the shape of the fully connected layer in the second feature extraction block is 256x256, the probability of Dropout in each fully connected layer in all extraction blocks is 0.3, and the shape of the output fully connected layer is 256x1.
[0071] The antimicrobial activity prediction network model C is used to learn a latent space related to antimicrobial activity, in which each latent space representation corresponds to an antimicrobial activity value;
[0072] Step 3b) Define the loss function L1 for the antibacterial activity prediction network model C:
[0073]
[0074] Among them, l r For sample d r The minimum inhibitory concentration (MIC) value, l r 'For sample d r The predicted minimum inhibitory concentration (MIC) value.
[0075] Step 4: Iteratively train the antibacterial activity prediction network model C:
[0076] Step 4a) Initialize the number of iterations to j, the maximum number of iterations to J, J = 30, and the network parameters of the antibacterial activity prediction network model C are θ. C ={θ E ,θ P}, θ E Let θ be the network parameters of encoder E. PLet j be the network parameters of the predictor P, and let j = 0;
[0077] Step 4b) Use the training sample set Dt as input to the antibacterial activity prediction network model C, and the encoder E processes each training sample d. r The molecular diagram is message-passed and read out to obtain the latent spatial representation z. r Predictor P for z r Feature extraction is performed and output to obtain the predicted minimum inhibitory concentration (MIC) value. r ';
[0078] Step 4c) employs the loss function L1 and predicts the minimum inhibitory concentration (MIC) value l. r 'and minimum inhibitory concentration value l r Calculate the loss L of the antibacterial activity prediction network model C. 1j Then, the backpropagation method is used, and through L 1j Calculate the parameter gradients of C, and finally use the gradient descent algorithm to apply the parameter gradients to the network parameters θ of C. C Update;
[0079] During the backpropagation process, antibacterial activity information is fed back to encoder E and predictor P. Encoder E learns the latent spatial representation of antibiotic molecules based on this information, thereby establishing a link between latent spatial representation and antibacterial activity. Predictor P makes the latent spatial representation and antibacterial activity correspond one-to-one, laying the foundation for the search and optimization of latent space guided by antibacterial activity.
[0080] Step 4d) Determine whether j≥J holds true. If so, obtain the trained antibacterial activity prediction network model C. * Otherwise, let j = j + 1 and execute step 4b).
[0081] Step 5, construct the antibiotic generation network model H:
[0082] Step 5a) Construct an antibiotic generation network model H consisting of a sequentially connected encoder E and a generator G, wherein the encoder E and its network parameters adopt a pre-trained antibacterial activity prediction network model C. * Encoder E in * The generator G, along with its network parameters, consists of sequentially connected input fully connected layers and multiple decoding blocks composed of self-attention layers, layer normalization layers, Dropout layers, fully connected layers, and GELU activation function output layers. The specific structure of generator G is as follows:
[0083] The decoding block includes a self-attention layer, two normalization layers, a Dropout layer, two fully connected layers, and a GELU activation function output layer. The specific structure is as follows: first normalization layer → self-attention layer → second normalization layer → first fully connected layer → GELU activation function output layer → second fully connected layer → Dropout layer.
[0084] The generator G consists of a sequentially connected fully connected input layer and a decoding block;
[0085] The parameters of each layer of the generator G are set as follows: the shape of the fully connected layer of the generator G is 1900x256, the shape of the first fully connected layer in all decoding blocks is 256x1024, the shape of the second fully connected layer is 1024x256, and the probability of the first and second fully connected layers performing Dropout is 0.3.
[0086] The encoder E and its network parameters of the antibiotic generation network model H are derived from a pre-trained antibacterial activity prediction network model C. * Encoder E in * The network parameters are connected to the sequential generator G, which establishes a connection between the learned latent space and the generated space. Therefore, the latent space representation obtained by searching and optimizing in the latent space can be directly used as the input of the generator G to obtain the corresponding generated active compound molecules.
[0087] Step 5b) Define the loss function L2 for the antibiotic generation network model H:
[0088]
[0089] Among them, S r It is the sample d in the training sample set Dt r SMILES, y r It is d r Molecular diagram G r The latent space representation, S, obtained by the encoder E of the input antibiotic generation network model H. r 'is d r The generation of SMILES, s v r It is S r The character at the vth position.
[0090] Step 6: Iteratively train the antibiotic generation network model H:
[0091] Step 6a) Initialize the number of iterations to i, the maximum number of iterations to I, I = 10, and the network parameters of the antibiotic generation network model H are θ. H ={θ E * ,θ G}, θ E* For encoder E * Network parameters, θ G For the network parameters of the generator G, the encoder E is fixed. * Network parameters θ E * Keep it unchanged, and let i = 0;
[0092] Step 6b) Use the training sample set Dt as input to the antibiotic generation network model H, and encoder E * For each training sample d r The molecular diagram is message-passed and read out to obtain the latent spatial representation y. r Generator G for E * The latent space representation y of the output r Perform dimensional transformation and decoding to obtain d. r The generation of SMILES S r ';
[0093] Step 6c) Employ the loss function L2 and use d r The generation of S r 'For the actual S r Likelihood estimation calculates the loss L of the antibiotic generation network model H. 2i Then, the backpropagation method is used, and through L 2i The gradients of the generator G's parameters are calculated, and finally, the gradient descent algorithm is used to apply the gradients to the network parameters θ of G. G Update;
[0094] Step 6d) Determine if i ≥ I. If so, obtain the trained antibiotic generation network model H. * Otherwise, let i = i + 1 and execute step 6b).
[0095] Step 7: Optimize the antibacterial activity-guided search for antibiotic molecules:
[0096] Step 7a) Randomly select Q antibiotic molecules from the test sample set Dte, where Dop = {d1, d2, ..., d...} q ,...,d Q As the optimization objective, Dop is used as the antibiotic generation network model H. * encoder E * The input is used to obtain the pre-optimization latent space representation Y of Q samples. Dop ={y1,y2,...,y q ,...,y Q}, where Q = 4;
[0097] Step 7b) Sample Gaussian noise to obtain Y Dop Optimization starting point set Y f As a predictor P * Input Y to get Y f Corresponding to the predicted antibacterial activity set The specific implementation steps are as follows:
[0098] Step 7b1) Sample Gaussian noise n1, n2...n NP ~N(0,D1), the calculation process for D1 is as follows:
[0099] d2 = max(cov1,cov2,...,cov vc ,...,cov VC )
[0100]
[0101] D1=d1I
[0102] Among them, cov vc Y represents the latent space representation set of the training sample set Dt. Dt ={y1,y2,...,y r ,...,y R The variance of the vc-th dimension of the latent space, where VC is the dimension representing the latent space, and VC = 1900;
[0103] The choice of D1' mitigates the problems of high similarity between the sampling point and the latent space representation of the optimization target leading to low efficiency in the latent space search, and low similarity leading to the sampling point failing to maintain the features of the optimization target.
[0104] Step 7b2) Add Gaussian noise to Y Dop Up, get Y Dop The set of optimization starting points in, Representing the latent space representation y q The set of optimization starting points, NP = 600;
[0105] Step 7b3) Y f C, as an antibacterial activity prediction network model * Predictor P * Input to obtain predicted antibacterial activity in, It is d q The predicted antibacterial activity corresponding to the np-th optimization starting point in the potential space is used to determine whether the corresponding optimization starting point needs to be updated in a round of optimization, and to determine whether the optimization starting point has the expected antibacterial activity.
[0106] Step 7c) Set the minimum threshold value of the minimum inhibitory concentration (MIC) as fit_min and the maximum threshold value as fit_max, d q The optimized set of latent space representations is Y. q The set of corresponding minimum inhibitory concentration values is L. q ', Obtain the set Y of latent space representations after Dop optimization, Y = {Y1, Y2, ..., Y} q ,...,Y Q} and the set of corresponding minimum inhibitory concentrations L', L'={L1',L2',...,L q ',...,L Q '}, where fit_min = -0.08, fit_max = 0.02, let Y q ={}, L q '={};
[0107] Step 7d) Initialize the number of optimizations num and the total number of optimizations NUM, where NUM = 12000, and set num = 0;
[0108] Step 7e) Define the search update function F as follows:
[0109]
[0110] v w+1 =v w wei+r1(x b1 -y w )+βr2(y b2 -y w )
[0111] y w+1 =v w+1 +y w
[0112] Where f(·) is the predictor P * ,y w It is the latent space representation before the update, y w+1 It is the updated latent space representation, v w and v w+1 This is an intermediate output; v0 is randomly initialized to: {v1, v2, ... v vc ,...v VC ξ is a very small number to avoid the denominator being zero; wei, r1, and r2 are hyperparameters; v vc ∈[0,0.0001], ξ≤0.0001, wei=0.8, r1=r2=0.5, exp is an exponential function with the natural constant e as the base;
[0113] Using the search optimization function F, guided by the antibacterial activity in L', the study optimizes Y. f Perform search optimization, obtain the optimized updated set Y and the corresponding set L', and obtain the new optimization starting set Y. f and predicted antibacterial activity set L f The implementation steps are as follows:
[0114] Step 7e1) Generate a random number set B = {B1, B2, ..., B} q ,...,B Q},in,
[0115] Step 7e2) from Y f Get from in, and from L f Obtain the corresponding predicted minimum inhibitory concentration value from '. in
[0116] Step 7e3) Initialization and judge If so, use the search update function F to update the pair. Perform a search update; the input to the update function is... The output is the updated version. Using predictor P * right Update, the predictor input is The output is the updated version. otherwise,
[0117] The update based on the antibacterial activity judgment ensures that the optimization direction is always towards the direction with stronger antibacterial activity, i.e., a lower minimum inhibitory concentration, avoiding exploration in the direction with weaker antibacterial activity, improving the efficiency of potential space optimization, and thus improving the generation efficiency.
[0118] Step 7e4) Obtain Y f ', Get L f ”, And obtain the new optimization starting point set Y after one round of optimization. f and predicted antibacterial activity set L f ', where Y f =Y f ', L f '=L f ”;
[0119] Step 7e5) Initialize Y q '、L q "Let Yq '=Y q L q =L q ', get The index of the element that satisfies the threshold interval [fit_min, fit_max] will be used. Add the element corresponding to the index in Y to Y q 'In the middle, will Add the element corresponding to the index in L q "middle;
[0120] The threshold range limitation makes saving to Y q The predicted antibacterial activity corresponding to the optimized latent space representation in the invention is stronger than that before optimization. That is, the antibiotic molecules generated after optimization have better antibacterial activity than the optimization target, which ensures the quality of the generated molecules and proves that the molecules generated by this invention have the expected activity.
[0121] Step 7e6) Obtain Y' = {Y1', Y2', ..., Y q ',...,Y Q '} and L”={L1”,L2”,...,L q ”,...,L Q "}, and obtain the set Y of the optimized latent space representation set and the set L' of the corresponding predicted antibacterial activity set after one round of optimization, Y = Y', L' = L";
[0122] Step 7f) Determine if num < NUM. If yes, num = num + 1 and execute step (7e). Otherwise, obtain the optimized potential space representation set Y and the corresponding minimum inhibitory concentration value set L'.
[0123] After NUM round optimization, Y contains Q antibiotic molecules. Guided by antibacterial activity, the latent space characterization of compound molecules with stronger antibacterial activity is optimized by searching the latent space. L' records the antibacterial activity corresponding to the latent space characterization in Y.
[0124] Step 8, generate optimization results:
[0125] Input the optimized latent space representation set Y obtained in step 7f) into the trained antibiotic generation network model H. * Generator G * Perform dimensional transformation and decoding to obtain the optimized set of SMILES, SC = {SC1, SC2, ..., SC...}. q ,...,SC Q The predicted antibacterial activity of antibiotics SMILES generated in SC is obtained from the corresponding subscript in L', where SCq It is an antibiotic molecule d q The optimized set of SMILES is generated.
Claims
1. An antibiotic production method based on search optimization guided by antibacterial activity, characterized by, Comprising the following steps: (1) Obtain an antibiotic molecule dataset: Get including Dataset of antibiotic molecules ,in, , Indicates the first A simplified molecular linear input specification for Molecular diagram The minimum inhibitory concentration is antibiotic molecules, , , , express No. The character at position 1, , Molecular diagram A collection of atoms. Molecular diagram The set of edges connecting all atoms in the middle. Indicates measurement Strength or weakness of antibacterial activity; (2) Construct a training sample set and a test sample set: Antibiotic molecular dataset Each antibiotic molecule in the sample is pretreated to obtain a pretreated sample set. Randomly select preprocessed sample sets middle 1 sample set as training sample set and the remaining One sample was used as the test sample set. ,in, , ; (3) Constructing an antibacterial activity prediction network model : (3a) Constructing a network model for predicting antibacterial activity structures: Construct an encoder including sequential connections and predictor Antimicrobial activity prediction network model The encoder Using message-passing neural networks, predictors Including multiple fully connected layers connected in sequence, Activation function output layer and The feature extraction block consists of layers and the output fully connected layer; (3b) defining an antibacterial activity prediction network model loss function : ; wherein, the minimum inhibitory concentration value of the sample, the minimum inhibitory concentration value of the sample, the predicted minimum inhibitory concentration value of the sample, the predicted minimum inhibitory concentration value of the sample; (4) Network model for predicting antibacterial activity Iterative training is performed: (4a) initializing the number of iterations as , the maximum number of iterations as , , the network parameters of the antibacterial activity prediction network model as , , the network parameters of the encoder as , the network parameters of the predictor , and letting ; (4b) The training sample set As an antibacterial activity prediction network model Input, encoder For each training sample The molecular diagram is message-passed and read out to obtain the latent spatial representation. Predictor right Feature extraction is performed and output to obtain the predicted minimum inhibitory concentration (MIC). ; (4c) using the loss function and by predicting the minimum inhibitory concentration value and the minimum inhibitory concentration value of the antibacterial activity prediction network model the loss is then calculated, and by using the backpropagation method and by calculating the parameter gradient of the network parameters of the antibacterial activity prediction network model are finally updated by the gradient descent algorithm (4d) judging whether it is true, if yes, obtaining the trained antibacterial activity prediction network model , otherwise, letting and executing step (4b); (5) Constructing antibiotic production network model : (5a) Constructing a network model of antibiotic production Structure: Constructing an antibiotic production network model comprising sequentially connected encoders and generators wherein the encoders and their network parameters adopt the encoders and their network parameters in a trained antibacterial activity prediction network model and the generators comprise sequentially connected input fully connected layers and a plurality of decoding blocks composed of a self-attention layer, a layer normalization layer, a layer, a fully connected layer and an activation function output layer; (5b) Defining the antibiotic production network model loss function : ; wherein, is a training sample set is a sample in the training sample set , is a molecular graph of the sample input to an antibiotic generation network model encoder obtained latent space representation, is a generation of the antibiotic , is a character at the th position of the antibiotic . (6) Network model for antibiotic production Iterative training is performed: (6a) Initialize the number of iterations to be The maximum number of iterations is , Antibiotic generation network model The network parameters are , For encoder Network parameters, For generator Network parameters, fixed encoder Network parameters Unchanged, and let ; (6b) training the set of training samples as input to an antibiotic production network model , an encoder performs message passing and reads out on the molecular graph of each training sample , resulting in a latent space representation , a generator performs a dimension conversion on the output latent space representation and decodes it, resulting in a generated ; (6c) using a loss function and by the generation of the actual likelihood estimate of the antibiotic production network model loss and then using the backpropagation method and by the parameter gradients of the generator and finally using the gradient descent algorithm to update the network parameters of the generator by the parameter gradients ; (6d) judging , if yes, obtaining the trained antibiotic production network model , otherwise, let and performing step (6b); (7) Optimize the search of the antibiotic molecule under the guidance of antibacterial activity: (7a) Randomly select the test sample set In antibiotic molecules As the optimization target, As an antibiotic generation network model encoder Input, obtain Latent space representation of each sample before optimization ,in ; (7b) sampling a Gaussian noise acquisition of the optimization starting point set , taking as input of the predictor , acquiring a corresponding prediction antibacterial activity set ; (7c) let the minimum threshold value for the minimum inhibitory concentration values be , and the maximum threshold value be , the set of optimized potential space representations be , , and the set of minimum inhibitory concentration values corresponding to the set of optimized potential space representations be , wherein , , the set of optimized potential space representations be , the set of minimum inhibitory concentration values corresponding to the set of optimized potential space representations be , and , , ; (7d) initializing the number of optimizations , the total number of optimizations wherein , let ; (7e) Using a search optimization function ,by Guided by antibacterial activity, for Perform search optimization to obtain a new set of optimization starting points. and predicted antibacterial activity set And obtain the optimized and updated set. and corresponding set The implementation steps are as follows: (7e1) generating a set of random numbers , wherein, , ; (7e2) from wherein, and from corresponding predicted minimum inhibitory concentration values wherein ; (7e3) initialization and , determine if yes, apply search update function to , input to update function is , , , output is updated , apply predictor to , input to predictor is , output is updated , else , ; (7e4) obtaining from step (7e3) , , , and obtaining , , , and obtaining a new set of optimization starting points and a set of predicted antibacterial activities wherein , ; (7e5) initialization , , let , , get element satisfying threshold interval of element index , add element corresponding to index to , add element corresponding to index to ; (7e6) obtaining, according to step (7e5) and and obtaining an updated set of optimized latent space representations and a corresponding set of predicted antibacterial activity wherein, , ; (7f) judging , if yes, , and performing step (7e), otherwise, obtaining the optimized latent space representation set and the corresponding set of minimum inhibitory concentration values ; (8) Generate optimization results: the set of optimized potential space representations obtained from step (7f) input the trained antibiotic generation network model the generator perform dimension conversion and decoding to obtain the set of optimized generated antibiotics , generate the prediction of the antibacterial activity of the antibiotic from the corresponding index in , where is the set of optimized generated antibiotic molecules , .
2. The method for generating antibiotics based on search optimization guided by antibacterial activity according to claim 1, characterized in that, The antibiotic molecular dataset described in step (2a) Each antibiotic molecule in the sample undergoes pretreatment, which is achieved through the following steps: Antibiotic molecular dataset In Each character Perform one-hot encoding to obtain the encoded result. ,right In Each atom and Each edge is feature-encoded to obtain the encoded molecular graph. Obtain preprocessed samples and obtain the sample set .
3. The method for generating antibiotics based on search optimization guided by antibacterial activity according to claim 1, characterized in that, the predictor described in step (3a) the specific configuration is: Predictor The number of included output fully connected layers is 1; The feature extraction block comprises a fully connected layer, an activation function output layer and a layer; Predictor comprises two feature extraction blocks connected in series and an output fully connected layer; The predictor The parameters for each layer are set as follows: the shape of the fully connected layer in the first feature extraction block is 1900x256, the shape of the fully connected layer in the second feature extraction block is 256x256, and each fully connected layer in all extraction blocks is... The probability is 0.3, and the shape of the output fully connected layer is 256x1.
4. The method for generating antibiotics based on search optimization guided by antibacterial activity according to claim 1, characterized in that, The generator described in step (5a) The specific structure is: The decoding block includes a self-attention layer, two normalization layers, Layer, two fully connected layers and one The activation function output layer has the following structure: First normalization layer → Self-attention layer → Second normalization layer → First fully connected layer → Activation function output layer → Second fully connected layer → layer; Generator comprises an input fully connected layer and a decoding block connected in sequence; The generator The parameters of each layer of the generator are set as follows: The shape of the input fully connected layer is 1900x256, the shape of the first fully connected layer in all decoding blocks is 256x1024, the shape of the second fully connected layer is 1024x256, and the first and second fully connected layers are activated by the ReLU function. The probability of the second fully connected layer is 0.
3.
5. The method for generating antibiotics based on search optimization guided by antibacterial activity according to claim 1, characterized in that, The sampling Gaussian noise acquisition in step (7b) The optimization starting point set , taking as the input of the predictor , acquiring The corresponding prediction antibacterial activity set The implementation steps are: (7c1) sampling Gaussian noise , adding Gaussian noise to , obtaining a set of optimization starting points of wherein , denotes a set of optimization starting points of latent space representation , , , , is an identity matrix; (7c2) will As an antibacterial activity prediction network model predictor Input to obtain predicted antibacterial activity ,in, , yes In the latent space optimization The predicted antibacterial activity corresponding to each optimized starting point.
6. The method for generating antibiotics based on search optimization guided by antibacterial activity according to claim 1, characterized in that, The search optimization function in step (7e) is as follows: ; ; ; where is the predictor , is the latent space representation before update, is the latent space representation after update, and is the intermediate output, is randomly initialized to: , is the dimension of the latent space representation, is a very small number to avoid division by zero, , , is a hyperparameter, , , , , , is a natural constant is the exponential function with base