A method for predicting conversion products of organic compounds in activated sludge

CN122474170BActive Publication Date: 2026-09-18NANJING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610904285.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-09-18
Estimated Expiration
2046-06-23

AI Technical Summary

Technical Problem

该类方法能够预测未收录候选,但在工程应用中通常存在头部精度与尾部覆盖难以兼顾的问题:若采用较保守的候选策略,可提高第一位至第三位候选的前排可靠性,但可能漏掉排序靠后的真实转化产物;若扩大候选输出范围,则前十位或前二十位候选覆盖可能提高,但低质量候选和人工复核成本也随之增加

Benefits of technology

[0029] 1. This invention uses candidate conversion products as new parent structures for multi-generation iterative prediction and screens each generation of candidate conversion products to obtain a multi-generation derived sequence set. This reduces the influence of duplicate candidates, loop paths, unchanged candidates and low-quality paths in multi-step prediction, thereby achieving reliable prediction of multi-generation conversion products of organic compounds in activated sludge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122474170B_ABST
    Figure CN122474170B_ABST
Patent Text Reader

Abstract

The application discloses a kind of active sludge organic compound conversion product prediction method, comprising: constructing parent compound and initial reaction pair data set of conversion product, training single-step conversion product prediction model, based on the single-step candidate conversion product list and real conversion product list generated by the prediction model, gradient boosting tree reordering model is trained, to reorder single-step candidate conversion product list, utilize single-step candidate conversion product list and reordered list to construct the candidate conversion product list of the parent compound to be measured, single candidate conversion product in candidate conversion product list is used as new parent, further generate candidate conversion product list, in this way, carry out multi-generation derivation, generate several generations of candidate conversion product, to obtain the conversion product multi-generation derivation sequence set of the parent compound to be measured.The application can realize the reliable prediction of organic compound multi-generation conversion product in active sludge reaction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of environmental chemical analysis technology, and in particular to a method for predicting the transformation products of organic compounds in activated sludge. Background Technology

[0002] In activated sludge reactions, organic compounds such as pharmaceuticals, pesticides, personal care products, industrial additives, flame retardants, and other novel pollutants can undergo continuous biotransformation under the combined action of microorganisms and extracellular enzymes, forming one or more transformation products. Some transformation products may have different migration properties, persistence, bioactivity, or toxicity compared to the parent compound. Therefore, establishing predictive methods for transformation product derivation based on parent compounds in activated sludge systems is of great significance for non-targeted mass spectrometry screening, transformation pathway analysis, and risk identification.

[0003] Existing methods for predicting transformation products mainly include reaction rule-based methods, external knowledge base retrieval methods, and data-driven generation prediction methods.

[0004] The reaction rule method typically first matches the local structure of the parent compound with predefined reaction rules or templates, and then substitutes, breaks, or transforms the local structure according to the matched rules to obtain candidate transformation products. This method has a certain degree of interpretability, but its output is limited by the coverage of substrate substructures, reaction types, and product transformation modes in the rule library. When the activated sludge system contains substrate structures, combined reactions, or low-frequency transformation modes not included in the rule library, it is prone to problems such as failure to generate candidates or a narrow candidate range.

[0005] External knowledge base retrieval methods typically rely on reported parent-product relationships, reaction databases, spectral libraries, or literature records. They match the target parent compound or candidate product with known entries based on structure, molecular formula, or spectrum, and output the included transformation product candidates. This method offers good traceability for known reactions, but its effectiveness depends on the scope and update speed of the reference library. For unreported substrates, unlisted products, or activated sludge-specific reactions, this method struggles to provide new structural candidates.

[0006] Data-driven, single-step generative models typically take a normalized parent structure representation as input and the corresponding transformation product structure as a supervision label. They output the first few candidate transformation products through sequence generation, molecular diagram generation, or template editing. While these methods can predict unrecorded candidates, they often suffer from a trade-off between head-end accuracy and tail-end coverage in engineering applications: a conservative candidate strategy can improve the reliability of the first to third candidates, but may miss lower-ranked true transformation products; expanding the candidate output range may improve coverage of the first ten or twenty candidates, but also increases the cost of low-quality candidates and manual verification.

[0007] Compared to single-step prediction, multi-step path prediction uses the primary conversion products obtained from single-step prediction as input for the next round, recursively generating secondary, tertiary, or even downstream conversion products. Therefore, it more closely resembles the continuous transformation process of parent compounds in activated sludge systems. However, this recursive expansion mechanism also amplifies the error of single-step prediction and causes each generation of candidate branches to grow in a combinatorial manner, making it more prone to problems such as error accumulation, path explosion, node duplication, loop paths, and the expansion of low-quality paths.

[0008] Therefore, there is still a need for a method to predict conversion products in activated sludge scenarios. This method should be able to generate new candidates under the conditions of limited rule coverage and knowledge base reliance on known records. It should also balance front-end accuracy and overall coverage in data-driven single-step prediction, while performing deduplication, loop removal, pruning, and scoring on the multi-step recursive expansion process to obtain a stable and reliable multi-generation conversion path. Summary of the Invention

[0009] Purpose of the invention: The purpose of this invention is to provide a method for predicting the transformation products of organic compounds in activated sludge, so as to achieve reliable prediction of the transformation products of organic compounds across multiple generations.

[0010] Technical solution: To achieve the above objectives, the present invention provides a method for predicting the transformation products of organic compounds in activated sludge, comprising the following steps:

[0011] S1. Construct an initial reaction pair dataset that includes reaction records of the parent compound and the transformation products;

[0012] S2. Construct a single-step conversion product prediction model based on a pre-trained backbone network with an encoder / decoder structure, and train the dataset using the initial reaction;

[0013] S3. Based on the same parent compound, a sample is constructed for training the gradient boosting tree reordering model by using the single-step candidate conversion product list and the real conversion product list generated by the trained single-step conversion product prediction model; each unit in the single-step candidate conversion product list includes a predicted conversion product.

[0014] S4. Based on the same parent compound to be tested, first use the single-step conversion product prediction model to obtain a list of single-step candidate conversion products, then use the gradient boosting tree reordering model to obtain a reordered list of single-step candidate conversion products, and based on the two lists, construct a list of candidate conversion products of the parent compound to be tested with a set length.

[0015] S5. Take each candidate transformation product in the candidate transformation product list of the parent compound to be tested as the starting parent structure, and execute S4 to further generate candidate transformation product lists for each parent structure. Continue in this way to generate several generations of candidate transformation products, and screen the candidate transformation products generated in each generation until the termination condition is met, so as to obtain a multi-generation derivation sequence set of the transformation products of the parent compound to be tested.

[0016] Preferably, the initial reaction pair dataset construction method is as follows: first, each reaction record is represented by structured fields, including the parent compound SMILES string, the transformation product SMILES string, the parent number, the reaction group number, the product number, the source label, the quality label, and the direction label; then, each reaction record represented by the structured fields is standardized, including: desalting, uniform charge, aromaticity standardization, normalized SMILES, duplicate sample removal, and reaction direction verification.

[0017] Preferably, the single-step conversion product prediction model includes an encoder and a decoder, wherein the encoder includes an embedding layer, a self-attention layer, and a feedforward layer, and the decoder includes an embedding layer, a self-attention layer, a cross-attention layer, and a feedforward layer; the encoder receives a parent token sequence formed based on the normalized SMILES string of the parent compound and outputs the parent final hidden representation; the decoder, based on the parent final hidden representation, autoregressively generates a candidate product token sequence incorporating parent structural information starting from the start symbol, and after converting each candidate product token sequence into a normalized SMILES, obtains a single-step candidate conversion product list and the confidence score of each candidate conversion product in the list; during the training phase, the token sequence of the actual conversion product of the parent compound is used as the target output of the decoder.

[0018] Preferably, the gradient boosting tree reordering model takes the candidate feature vector of each candidate transformation product in the sample as input, and the positive and negative labels of the sample as supervision signals. It iteratively adds regression trees to fit the residual between the current model prediction and the true label, and minimizes the binary cross-entropy loss function. Each newly added regression tree is split based on the sample region with the largest prediction error in the previous stage. The outputs of all regression trees are weighted and summed and transformed by sigmoid to obtain the predicted probability of the model output, which is used as the reordering score of the candidate transformation product.

[0019] Preferably, if the SMILES string of the candidate conversion product is consistent with the actual conversion product, the candidate conversion product is marked as a positive sample; otherwise, it is marked as a negative sample. The candidate feature vector of the candidate conversion product includes: ranking, structural similarity, reaction center overlap, molecular formula change constraint, unchanged identifier, and source marker.

[0020] Preferably, the sorting order is obtained by sorting all candidate transformation products in the single-step candidate transformation product list from high to low confidence score; structural similarity is the Tanimoto similarity value of the molecular fingerprint between the parent compound and the candidate transformation product; reaction center overlap is the degree of consistency between the structural change position of the candidate transformation product relative to the parent compound and the prior representation of the reaction center; molecular formula change constraints include the difference in elemental composition, mass difference, and mass difference matching tag between the parent compound and the candidate transformation product, wherein if the mass difference falls within the preset range of common biotransformation mass differences, the matching tag is 1, otherwise it is 0; the unchanged identifier is 1 if the SMILES string of the candidate transformation product is equal to the normalized SMILES string of the parent compound, otherwise it is 0; the source tag is a category code, indicating that it comes from the output of the single-step transformation product prediction model or the gradient boosting tree reordering model.

[0021] Preferably, the candidate conversion product list of the parent compound to be tested uses the first n non-repeating candidate conversion products in the single-step candidate conversion product list as the head candidates, and the first Ln non-repeating candidate conversion products in the reordered single-step candidate conversion product list as the remaining candidates, where L is the list length and L > n; the candidate conversion products in the single-step candidate conversion product list are arranged in descending order of confidence score, and the candidate conversion products in the reordered single-step candidate conversion product list are arranged in descending order of reordering score.

[0022] Preferably, for each generation of candidate transformation product list of the parent structure, the list includes the normalized SMILES string of each candidate transformation product, single-step confidence score, iteration depth, path number, and cumulative path score. The path is a multi-generational derivation sequence consisting of different candidate transformation products from different generations, starting from the original parent compound and using a single candidate transformation product from the current candidate transformation product list as the parent of the next generation. Each path corresponds to one multi-generational derivation sequence. The cumulative path score represents the cumulative confidence score of each path from the starting parent compound to the current iteration depth, expressed as:

[0023] ,

[0024] in, This indicates that at an iteration depth of Next, the The cumulative score of each path. This indicates that at an iteration depth of Next, the The cumulative score of each path. This indicates that at an iteration depth of Next, the The reordering score of the last candidate transformation product of the path, where λ represents the depth penalty coefficient.

[0025] Preferably, after each iteration, the paths are sorted in descending order of cumulative scores, and the top-ranked paths are retained for subsequent iterations. Among the retained paths, multiple candidate transformation products generated at the current iteration depth are subjected to deduplication, loop removal, unchanged suppression, and low-score truncation screening. If a path does not have any candidate transformation products for further iteration after screening at the current depth, the iteration of that path ends.

[0026] All paths will stop iterating when any of the following conditions are met: the preset maximum iteration depth is reached; the number of retained paths reaches the preset maximum number of paths; the cumulative score of all retained paths is lower than the preset threshold; or the iteration of all retained paths ends.

[0027] Preferably, the multi-generational derivation sequence set includes: a sequence of candidate transformation products for each iteration depth, the total cumulative path score for each path after the last iteration, a list of candidate transformation products generated in each generation, and the normalized SMILES string and single-step confidence score of each candidate transformation product in the list, iteration depth, path number, and cumulative path score; based on the multi-generational derivation sequence set, a directed network for the generational derivation of transformation products of the parent compound to be tested is constructed. The directed network for the generational derivation of transformation products is a directed tree with the parent compound to be tested as the root node. The directed tree starts from the root node, and the directed edges point to the first-generation candidate transformation product nodes generated by the root node; then each candidate transformation product node is used as the parent to continue pointing to the next generation product nodes generated, and so on, until the leaf node is reached; the features of each non-root node include: the normalized SMILES string and single-step confidence score of the candidate transformation product corresponding to the node, iteration depth, path number, and cumulative path score.

[0028] Beneficial effects: The present invention has the following advantages:

[0029] 1. This invention uses candidate conversion products as new parent structures for multi-generation iterative prediction and screens each generation of candidate conversion products to obtain a multi-generation derived sequence set. This reduces the influence of duplicate candidates, loop paths, unchanged candidates and low-quality paths in multi-step prediction, thereby achieving reliable prediction of multi-generation conversion products of organic compounds in activated sludge.

[0030] 2. This invention utilizes a single-step candidate conversion product list and a reordered single-step candidate conversion product list to construct a candidate conversion product list for the parent compound to be tested. This can improve the reliability of the candidate conversion product ranking and alleviate the problem of difficulty in balancing the accuracy of the first-row prediction and the candidate coverage in single-step prediction. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the overall process of the method of the present invention;

[0032] Figure 2 This is a schematic diagram comparing the complete matching rate when different methods are used to predict the parent transformant in Example 2.

[0033] Figure 3 This is a schematic diagram comparing the single-step recall rates of different methods for predicting parent transformants in Example 2;

[0034] Figure 4 This is a schematic diagram comparing the single-step F1 values ​​when predicting the parent transformant using different methods in Example 2. Detailed Implementation

[0035] The technical solution of the present invention will be described in detail below with reference to the embodiments and accompanying drawings.

[0036] Example 1

[0037] This embodiment provides a method for predicting the transformation products of organic compounds in activated sludge, such as... Figure 1 As shown, it includes the following:

[0038] 1. Obtain the reaction records of the parent compounds and transformation products involved in the activated sludge reaction unit of the wastewater biological treatment system. Perform structured field representation and standardization on these reaction records to construct an initial reaction pair dataset. Each sample in the initial reaction pair dataset corresponds to one reaction record.

[0039] When the same parent compound corresponds to one or more transformation products, each "parent compound - transformation product" relationship is organized into a reaction record, and a one-to-many relationship is retained through the parent compound number or reaction group number.

[0040] In this embodiment, the parent compound-transformation product reaction records involved in the activated sludge reaction unit mainly come from the following aspects: various literature and databases such as Biotransformer, enviFormer, Rhea, MicrobeRX, and KEGG, the BBD dataset of EAWAG, which contains parent compound-transformation product reaction pairs related to environmental biotransformation, relevant literature retrieved on Web of Science using keywords such as activated sludge reaction, wastewater treatment biotransformation, and pollutant transformation, and parent compound-transformation product reaction pairs manually extracted from the literature, and high-quality activated sludge parent compound-transformation product reaction pairs that have been manually verified or quality screened.

[0041] Each reaction record is represented by structured fields, including the parent compound SMILES string, the transformation product SMILES string, the parent number, the reaction group number, the product number, the source label, the quality label, and the direction label.

[0042] Among them, the parent compound SMILES string refers to the parent compound structure string represented by the Simplified Molecular Linear Input System (SMILES), which is used to describe the molecular structure information of the parent compound in the form of linear characters. The molecular structure information includes atom type, atomic connection relationship, bond type, ring system closure relationship, branching structure and functional group composition, and may further include information such as formal charge, isotope labeling and stereochemical labeling.

[0043] The transformation product SMILES string refers to the structural string of the transformation product represented using the Simplified Molecular Linear Input System (SMILES), used to describe the molecular structural information of the transformation product in linear character form. This molecular structural information includes atom types, atomic connections, bond types, ring closure relationships, branching structures, and functional group composition, and may further include information such as formal charge, isotopic labeling, and stereochemical labeling.

[0044] The parent compound number is used to uniquely identify a parent compound.

[0045] The product number is used to uniquely identify a conversion product.

[0046] The reaction group number is used to identify a reaction group that is "parent material → multiple products".

[0047] Source labels, using category numbers, mark the route through which the reaction record was generated, providing traceability.

[0048] Quality labels, through grade coding or numerical weighting, mark the credibility of response records.

[0049] Orientation labels are represented by category numbers and are used to mark the input-output orientation of reaction records in the dataset. Forward orientation indicates that the parent compound is used as input and the transformation product as output; reverse orientation indicates that the record has the opposite orientation and is used for orientation verification or auxiliary data construction; bidirectional orientation indicates that the structure pair has a clearly bidirectional record or is set as a bidirectional auxiliary sample. Reaction records without clear evidence of bidirectional orientation are not labeled as bidirectional.

[0050] The reaction records represented by each structured field are standardized, including: desalting, uniform charge, aromaticity standardization, normalization of SMILES, duplicate sample removal, and reaction direction verification.

[0051] Desalting treatment involves removing inorganic salts (such as NaCl) and metal ions (such as K) from the parent compound SMILES string or the transformation product SMILES string that do not participate in the organic transformation. + Mg 2+ ) or counterions (such as Cl) - SO4 2- );

[0052] Unified Charge: Converts the normalizable charge states in the parent compound SMILES string or the transformation product SMILES string into a consistent representation according to preset rules, avoiding the identification of the same compound as different structures due to different charge notation.

[0053] Aromaticity standardization: unifying the representation of aromatic bonds and aromatic atoms in the parent compound SMILES string or the transformation product SMILES string.

[0054] Normalized SMILES: refers to converting different string representations of the same molecule in the parent compound SMILES string or the transformation product SMILES string into a unique or stable normalized representation.

[0055] Duplicate sample removal: Merge the parent normalized SMILES string, the transformation product normalized SMILES string, and reaction records with identical direction labels.

[0056] Reaction direction verification: Confirm that each reaction record indicates the direction from the parent compound to the transformation product.

[0057] II. Based on the initial reaction pair dataset, a single-step conversion product prediction model is constructed. The prediction model takes as input a sequence consisting of normalized SMILES strings of the parent compound and optional prior representations of the reaction center, and normalized SMILES strings of the conversion products as supervised output. After the model is trained, a list of single-step candidate conversion products is output during the inference phase. The list includes the SMILES strings of the top K candidate conversion products and the confidence score of each candidate conversion product.

[0058] The prior representation of the reaction center includes a set of reaction center atom indices, a center mask, or a center probability vector; for reaction records whose prior representation of the reaction center cannot be reliably determined, no prior representation of the reaction center may be generated, and they may be marked as samples without a prior representation of the reaction center.

[0059] The set of atomic numbers at the reaction center refers to the set formed by extracting the atomic numbers of atoms that undergo structural changes during the transformation of the parent compound into the transformation product after sequentially numbering all atoms within a single parent compound. These structural changes include bond breaking, bond formation, bond order changes, changes in adjacent atoms, changes in functional groups, changes in formal charge, or other local structural changes that reflect the transformation site.

[0060] The center mask is a 0 / 1 vector with a length equal to the total number of atoms inside the parent compound, where an element of 1 indicates that the corresponding numbered atom belongs to the reaction center, and an element of 0 indicates that the corresponding numbered atom does not belong to the reaction center.

[0061] The center probability vector is a numerical vector of length equal to the total number of atoms in the parent compound. Each element takes a value in the range [0,1] or is a normalized real value, used to represent the probability, confidence level or weight of the corresponding numbered atom belonging to the reaction center.

[0062] When constructing a priori reaction centers, cheminformatics tools such as RDKit can be used to normalize the structure of the parent compound and the transformation product, perform atomic matching or the comparison of the greatest common substructure, and determine the set of atoms of the reaction center based on the differences in bond connections, local atomic environments and functional group changes between the parent structure and the product structure.

[0063] The single-step conversion product prediction model is a pre-trained backbone network with an encoder-decoder structure. The encoder includes an embedding layer, a self-attention layer, and a feedforward layer, and the decoder includes an embedding layer, a self-attention layer, a cross-attention layer, and a feedforward layer.

[0064] Before training the model, for each sample, the atomic symbols, bond symbols, ring numbers, branch brackets, and stereochemical symbols in the normalized SMILES strings of the parent compound and the normalized SMILES strings of the transformation products are first segmented into basic semantic units (tokens). Two-character atomic symbols such as chlorine and bromine, as well as atomic expressions within square brackets, are segmented as a single basic semantic unit. Then, the tokens are converted into integer numbers, forming the parent token sequence and the product token sequence, respectively. For samples with prior information about the reaction center, this embodiment uses a text prefix injection method, writing the set of reaction center atom indices into the prefix portion of the parent token sequence. For samples without prior information about the center, the parent token sequence composed of the normalized SMILES strings of the parent compound is used directly.

[0065] Encoder embedding layer: The parent token sequence is uniformly encoded, and each token is mapped to a continuous embedding vector to form the input embedding sequence.

[0066] Encoder Self-Attention Layer: Performs multi-head self-attention computation on the input embedding sequence output by the encoder embedding layer to capture the dependencies between tokens within the sequence and obtain a self-attention weighted context vector sequence.

[0067] Encoder feedforward layer: The context vector sequence output by the encoder self-attention layer is processed by position-by-position nonlinear transformation to obtain the parent hidden representation, that is, the parent deep context representation that integrates the parent structure information and the prior representation of the optional response center.

[0068] Decoder Embedding Layer: This layer performs vector mapping on the token sequence output from the input decoder to obtain the embedded sequence. During training, the input decoder is the right-shifted sequence of the actual transformed tokens; during inference, the input decoder is the start symbol and the token sequence already generated by the model.

[0069] Decoder Self-Attention Layer: Causal self-attention processing is applied to the product embedding sequence output by the decoder embedding layer. By shielding future position information, the model can only use the start symbol and the previously generated or input tokens when generating the current token, thus ensuring the autoregressive generation property.

[0070] Decoder Cross-Attention Layer: The product sequence representation output by the decoder self-attention layer is used as the query, and the parent hidden representation output by the encoder feedforward layer is used as the key and value. Cross-attention fusion processing is performed to obtain the product target representation sequence that fuses the parent structure information and the prior representation of the optional reaction center.

[0071] Decoder Feedforward Layer: This layer performs a position-by-position nonlinear transformation on the product target representation sequence output by the decoder's cross-attention layer to obtain the product target representation. The product target representation sequence is an intermediate vector representation formed by the decoder at the current position, integrating generated candidate product tokens, parent structure information, and optional response center hints. This product target representation is linearly transformed to the vocabulary dimension, and a Softmax layer is used to obtain the probability distribution of the next product token across all candidate tokens in the vocabulary.

[0072] Training Phase: Using the real conversion product token sequence as supervised output, the model parameters are updated by maximizing the target sequence likelihood. Maximizing the target sequence likelihood is equivalent to minimizing the cross-entropy loss between the predicted product token distribution and the real token labels. The decoder employs a teacher forcing strategy, that is, at each step, the prefix of the real conversion product token sequence is input, and the loss between the predicted product token and the corresponding real token is calculated.

[0073] Inference Phase: After obtaining the token input sequence of the parent compound to be tested, the encoder first encodes the input sequence to generate the final hidden representation of the parent compound. Subsequently, the decoder autoregressively generates candidate product token sequences starting from the start symbol. In each generation step, the decoder first forms a product sequence representation based on the generated product token sequences through the decoder's self-attention layer; then, it reads the final hidden representation of the parent compound output by the encoder through the cross-attention layer to obtain a product target representation sequence that integrates parent compound structural information and optional reaction center hints; this product target representation sequence is then processed by the decoder's feedforward layer, linear transformation, and Softmax layer to output the conditional generation probability distribution of the next product token in the vocabulary. The model simultaneously retains multiple candidate generation paths with high sequence generation scores through beam search. After beam search is completed, the top K candidate product token sequences are selected according to the sequence generation scores; K is the final output candidate number, which can be set according to actual deployment requirements and does not need to be exactly the same as the beam width. For each candidate product token sequence, it is restored to the candidate transformed product SMILES string. After validity verification and conversion to normalized SMILES, the candidate transformed product SMILES string and the original generation confidence score are obtained. The original generation confidence score is calculated by accumulating, averaging, or normalizing the conditional generation probabilities of each token in the candidate product token sequence.

[0074] The initial reaction pair dataset is divided into four parts based on different data sources: a general reaction pre-training dataset, a first domain adaptation dataset, a second weak domain adaptation dataset, and a fine-tuning dataset. These datasets are used to train the single-step conversion product prediction model. The model parameters obtained from the previous training stage are used as the initialization parameters for the next training stage, thereby achieving a gradual adaptation from general reaction pair data to environmental conversion data, activated sludge literature data, and high-quality validation data.

[0075] III. Based on the same parent compound, single-step candidate conversion products generated by the single-step conversion product prediction model and their corresponding real conversion products are used to construct training samples for a gradient boosting tree re-ranking model. The gradient boosting tree re-ranking model is used to re-rank the list of single-step candidate conversion products, outputting a re-ranked list of single-step candidate conversion products. This list includes the re-ranked candidate conversion product string "SMILES" and the re-ranking score of each candidate conversion product. The confidence score output by the single-step conversion product prediction model reflects the generation confidence of the single-step candidate conversion products during the decoding process; the re-ranking score output by the gradient boosting tree re-ranking model is a ranking score calculated based on the candidate feature vectors of the single-step candidate conversion products, used to re-evaluate the probability of a match between the candidate conversion products and the real conversion products. The re-ranking score is not equivalent to the original confidence score, but can be used together with the original confidence score as the basis for single-step candidate conversion product re-ranking and fusion inference.

[0076] If the predicted candidate conversion product string SMILES matches the actual conversion product, the candidate conversion product is marked as a positive sample; otherwise, it is marked as a negative sample.

[0077] For each candidate transformation product and its confidence score, the ranking, structural similarity, reaction center overlap, molecular formula change constraint, unchanged identifier, and source label are calculated to form a candidate feature vector, which is then input into the gradient boosting tree re-ranking model. The gradient boosting tree re-ranking model uses the positive and negative sample labels of the candidate transformation products as supervision signals to learn the correspondence between candidate features and the hit relationship of the actual transformation products.

[0078] The ranking is determined by first sorting all candidate transformation products corresponding to the same parent compound from high to low according to their original confidence scores, and then using the sorted position as the original ranking position of the corresponding candidate transformation product.

[0079] Structural similarity is defined as the Tanimoto similarity value of the molecular fingerprints of the parent compound and the candidate transformation product. In this embodiment, the parent compound and the candidate transformation product are first converted into Morgan circular fingerprints (i.e., ECFP4 fingerprints) with a radius of 2 and a length of 2048 bits, respectively. Then, the Tanimoto similarity between the two is calculated, and the resulting value is used as the structural similarity feature.

[0080] Reaction center overlap is used to represent the degree of consistency between the structural change position of the candidate transformation product relative to the parent compound and the prior representation of the reaction center. Specifically, the candidate transformation product is structurally compared with the parent compound to determine the set of atom numbers in the parent compound that have undergone bond breaking, bonding, bond order changes, adjacent atom changes, or functional group changes. This set of atom numbers is then compared with the set of reaction center atom numbers, a center mask, or a center probability vector, and the overlap ratio or weighted overlap score is calculated as the reaction center overlap feature. For samples without prior representation of reaction centers, the reaction center overlap can be set to null, default value, or missing label, and the gradient boosting tree re-ranking model can participate in training and inference through missing value handling mechanism or missing label.

[0081] Molecular formula variation constraints are represented by the elemental composition difference, mass difference, and common transformation mass difference matching markers between the parent compound and the candidate transformation product. The elemental composition difference represents the change in the quantity of elements such as C, H, O, N, S, P, Cl, and Br; the precise mass difference represents the theoretical mass change of the candidate transformation product relative to the parent compound; and the common transformation mass difference matching marker indicates whether the mass difference falls within a preset range of common biotransformation mass differences, marked as 1 for a match and 0 for a mismatch.

[0082] The unchanged identifier is obtained by checking whether the candidate transformation product's SMILES string is equal to the normalized SMILES string of the parent compound; if they are the same, the unchanged identifier is 1, indicating that the candidate has not undergone structural change; if they are different, the unchanged identifier is 0.

[0083] Source tags are represented by category codes to distinguish whether candidate transformation products come from the original output of a single-step transformation product prediction model or from the reordered output of a gradient boosting tree reordering model.

[0084] During the training phase, the gradient boosting tree reordering model takes the candidate feature vector as input and the corresponding positive and negative sample labels as supervision signals for each candidate transformation product in the sample. It iteratively adds regression trees to fit the residual between the current model prediction and the true label and minimizes the binary cross-entropy loss function. Each new tree is split based on the sample region with the largest prediction error in the previous stage. Finally, the outputs of all trees are weighted and summed and transformed by sigmoid to obtain the prediction probability of the model output. This prediction probability is used as the reordering score of the candidate transformation product.

[0085] During the inference phase, for each candidate conversion product output by the single-step conversion product prediction model, a candidate feature vector is calculated as described above, and this candidate feature vector is input into the trained gradient boosting tree reordering model. The gradient boosting tree reordering model outputs a reordering score for each candidate conversion product, and then sorts the candidate conversion products from high to low according to the reordering scores, forming a reordered single-step candidate conversion product list. The reordered single-step candidate conversion product list includes the reordered first K candidate conversion product SMILES strings.

[0086] IV. Based on the same parent compound to be tested, firstly, the single-step candidate conversion product list output by the single-step conversion product prediction model is used, and then the reordered single-step candidate conversion product list is output by the gradient boosting tree reordering model. Based on the single-step candidate conversion product list and the reordered single-step candidate conversion product list, a candidate conversion product list of length L for the parent compound to be tested is constructed. Each cell in the list includes at least the normalized SMILES string of the candidate conversion product, the source tag, the sorting position, and the confidence score. For candidate conversion products that have entered the gradient boosting tree reordering model, candidate features such as structural similarity, reaction center overlap, molecular formula change constraints, unchanged identifiers, and reordering scores can be further recorded. Specifically, the first n candidate conversion products are selected from the single-step candidate conversion product list output by the single-step conversion product prediction model as the head candidates of the candidate conversion product list of the parent compound to be tested; non-repeating candidate conversion products are selected sequentially from the reordered single-step candidate conversion product list output by the gradient boosting tree reordering model as the remaining candidates of the candidate conversion product list of the parent compound to be tested, until the final candidate conversion product list of the parent compound to be tested reaches a length of L. Here, n ≤ K, L > n; if the number of reordered candidates is insufficient to fill L, the number of candidate conversions in the candidate conversion product list of the parent compound to be tested includes the sum of the first n candidate conversion products in the single-step candidate conversion product list and the number of non-repeating candidate conversion products in the reordered single-step candidate conversion product list.

[0087] 5. Using a single candidate transformation product from the candidate transformation product list of the parent compound to be tested as the starting parent structure, the method described in S4 is executed to further generate candidate transformation product lists for each parent structure. This process is repeated to generate several generations of candidate transformation products, and each generation of candidate transformation products is screened until the termination condition is met, thereby obtaining a multi-generation derivation sequence set of candidate transformation products of the parent compound to be tested.

[0088] For each generation of candidate transformation products, the parameters include the normalized SMILES string of the candidate transformation product, single-step confidence score, iteration depth, path number, and cumulative path score. Among them, the single-step confidence score is used to represent the relative reliability of the single-step transformation relationship in which the current candidate transformation product is generated from the previous generation parent structure.

[0089] A path refers to a multi-generational derivation sequence that starts from the original parent compound and uses a single candidate transformation product from the current candidate transformation product list as the parent compound for the next generation, recursively forming a sequence of different candidate transformation products from different generations. Each path corresponds to one multi-generational derivation sequence. The path number can be understood as an identifier that uniquely identifies a transformation path, and is used to distinguish the complete transformation trajectory corresponding to different generations and different candidate transformation products in the same generation. The path number is updated as the iteration depth changes.

[0090] The cumulative path score represents the cumulative confidence score of each path from the initial parent compound to the current iteration depth, expressed as:

[0091]

[0092] in, This indicates that at an iteration depth of Next, the The cumulative score of each path. This indicates that at an iteration depth of Next, the The cumulative score of each path. This indicates that at an iteration depth of Next, the The reordering score of the last candidate transformation product of the path, where λ represents the depth penalty coefficient, used to reduce the tendency for excessively long paths to be retained.

[0093] After each iteration, the paths are sorted according to their cumulative scores, and the top-ranked paths are retained for subsequent iterations. Simultaneously, for the retained paths, multiple candidate transformation products generated at the current iteration depth are subjected to deduplication, loop removal, unchanged suppression, and low-score truncation.

[0094] Among them, deduplication: when multiple candidate transformation products generated at the current iteration depth have the same normalized structure characters, only the candidate transformation products with high reordering scores or the highest single-step confidence scores are retained.

[0095] Delooping: If the generated candidate conversion product already appears in the upstream structure of the current generation path, it means that the candidate conversion product forms a loop path, so the candidate conversion product is deleted.

[0096] Unchanged suppression: If the unchanged flag of the generated candidate transformation product is 1, it means that the structure of the candidate transformation product is the same as the previous generation parent structure. Delete the candidate transformation product or reduce the retention priority of its path.

[0097] Low-score cutoff: If the re-ranking score of the generated candidate transformation product or the cumulative score of its path is lower than the set minimum score threshold, the transformation product or the path is deleted. If a path has no candidate transformation products for further iteration after screening at the current depth, the iteration for that path ends.

[0098] All paths will stop iterating when any of the following conditions are met: the preset maximum iteration depth is reached; the number of retained paths reaches the preset maximum number of paths; the cumulative score of all retained paths is lower than the preset cutoff threshold; or the iteration ends after all retained paths have been filtered.

[0099] VI. Output the prediction results of the transformation products of the parent compound to be tested, i.e., the set of multi-generation derivation sequences, including: the candidate transformation product composition sequence of the retained path at each iteration depth, the total path cumulative score of each path after the last iteration, the candidate transformation product list generated in each generation and the normalized SMILES string of each candidate transformation product in the list and the single-step confidence score, iteration depth, path number, and path cumulative score.

[0100] The above information is used to construct a directed network for the generational derivation of transformation products of the parent compound under test. This network is a directed tree with the parent compound under test as the root node. The directed tree starts from the root node, with directed edges pointing to the first-generation candidate transformation product nodes generated by the root node. Subsequently, each candidate transformation product node continues to point to the next generation of generated product nodes, and so on, until no more product nodes are retained, which are the leaf nodes. The root node represents the parent compound under test, intermediate nodes represent candidate transformation products retained after multiple generations of transformation, and leaf nodes represent terminal transformation products that cannot be further expanded or screened. Each non-root node includes the following information: a normalized SMILES string of the candidate transformation product and a single-step confidence score, iteration depth, path number, and cumulative path score. A unique path from the root node to any leaf node corresponds to a multi-generational derivation sequence, and each sequence has a unique path number and cumulative path score.

[0101] The directed tree is used to display the candidate transformation products and their parent-child relationships obtained by prediction starting from the parent compound to be tested. By using information such as single-step confidence, cumulative path score, and iteration depth, candidate transformation products and multi-step transformation paths can be prioritized, thereby providing a basis for LC-HRMS / MS suspicious screening, transformation path analysis, and subsequent manual verification.

[0102] Example 2

[0103] This embodiment provides a comparison of the performance of predicting parent transformation products using the method described in Embodiment 1 and methods calculated using Model 1 (BioTransformer), Model 2 (EnviFormer), and Model 3 (EnviRule). Evaluation metrics include perfect match rate, recall rate, and F1 score. Prediction performance is statistically analyzed under conditions of first candidate, top three candidates, top five candidates, and top ten candidates. The corresponding results are as follows: Figures 2 to 4 As shown.

[0104] from Figure 2 The complete match rate results show that the method of this invention has the most significant advantage in predicting the first candidate. Specifically, the complete match rates of this invention under the conditions of the first candidate, the top three candidates, the top five candidates, and the top ten candidates are 19.09%, 22.73%, 29.09%, and 40.00%, respectively. In comparison, Model 1 has rates of 7.27%, 25.45%, 30.00%, and 35.45%, Model 3 has rates of 4.55%, 12.73%, 12.73%, and 13.64%, and Model 2 has rates of 0.91%, 6.36%, 7.27%, and 9.09%. These results indicate that this invention significantly outperforms external comparison methods in predicting the first candidate, and maintains good candidate coverage even when the candidate range is expanded to the top ten.

[0105] from Figure 3 The recall results show that the recall ability of each model improves with the increase of the number of candidates. The present invention achieved a recall rate of 40.00% under the condition of the top ten candidates, higher than Model 1's 35.45%, Model 3's 13.64%, and Model 2's 9.09%, indicating that the present invention still has good coverage of real conversion products within a larger candidate range. Meanwhile, Model 1 achieved recall rates of 25.45% and 30.00% under the conditions of the top three and top five candidates, respectively, showing that it has certain supplementary value within the middle and upper candidate range and can be used as an external high-coverage candidate source to participate in subsequent candidate supplementation; however, its first candidate recall rate was only 7.27%, significantly lower than the present invention's 19.09%, indicating that its ranking ability is insufficient to directly replace the present invention.

[0106] from Figure 4The F1 scores shown demonstrate that the method of this invention exhibits good overall performance under the conditions of the first candidate and the top ten candidates. The F1 scores of this invention's model under the conditions of the first candidate, top three candidates, top five candidates, and top ten candidates are 19.09%, 11.37%, 9.70%, and 7.27%, respectively; Model 1's are 7.27%, 12.73%, 10.00%, and 6.45%; Model 3's are 4.55%, 6.37%, 4.24%, and 2.48%; and Model 2's are 0.91%, 3.18%, 2.42%, and 1.65%. Among these, the invention achieves the highest F1 score under the condition of the first candidate, indicating strong reliability of its first candidate. Under the condition of the top ten candidates, the invention also maintains the highest F1 score, demonstrating a good balance between candidate coverage and candidate quality.

[0107] The combined results of perfect match rate, recall rate and F1 score demonstrate that this invention can simultaneously provide a relatively reliable first candidate and a relatively stable set of the top ten candidates.

Claims

1. A method for predicting a conversion product of an organic compound in activated sludge, characterized by, Includes the following steps: S1. Construct an initial reaction pair dataset that includes reaction records of the parent compound and the transformation products; S2. Construct a single-step conversion product prediction model based on a pre-trained backbone network with an encoder / decoder structure, and train the dataset using the initial reaction; S3. Based on the same parent compound, a sample is constructed for training the gradient boosting tree reordering model by using the single-step candidate conversion product list and the real conversion product list generated by the trained single-step conversion product prediction model; each unit in the single-step candidate conversion product list includes a predicted conversion product. S4. Based on the same parent compound to be tested, first use the single-step conversion product prediction model to obtain a list of single-step candidate conversion products, then use the gradient boosting tree reordering model to obtain a reordered list of single-step candidate conversion products, and based on the two lists, construct a list of candidate conversion products of the parent compound to be tested with a set length. S5. Take each candidate transformation product in the candidate transformation product list of the parent compound to be tested as the starting parent structure, and execute S4 to further generate candidate transformation product lists for each parent structure. Continue in this way to generate several generations of candidate transformation products, and screen the candidate transformation products generated in each generation until the termination condition is met, so as to obtain a multi-generation derivation sequence set of the transformation products of the parent compound to be tested.

2. The conversion product prediction method according to claim 1, characterized by, The initial reaction pair dataset is constructed as follows: each reaction record is first represented by structured fields, including the parent compound SMILES string, the transformation product SMILES string, the parent number, the reaction group number, the product number, the source label, the quality label, and the direction label; Then, the reaction records represented by each structured field are standardized, including: desalting, uniform charge, aromaticity standardization, normalization of SMILES, duplicate sample removal, and reaction direction verification.

3. The conversion product prediction method according to claim 1, characterized by, The single-step conversion product prediction model includes an encoder and a decoder, wherein the encoder includes an embedding layer, a self-attention layer and a feedforward layer, and the decoder includes an embedding layer, a self-attention layer, a cross-attention layer and a feedforward layer; The encoder receives a sequence of parent tokens formed from the normalized SMILES string of the parent compound and outputs the final hidden representation of the parent compound. The decoder, based on the final hidden representation of the parent compound, regressively generates a sequence of candidate product tokens that incorporates the parent compound structure information, starting from the start symbol. After converting each candidate product token sequence into a normalized SMILES, a list of single-step candidate transformation products and the confidence score of each candidate transformation product in the list are obtained. During the training phase, the token sequence of the actual transformation product of the parent compound is used as the target output of the decoder.

4. The conversion product prediction method according to claim 1, characterized by, The gradient boosting tree reordering model takes the candidate feature vector of each candidate transformation product in the sample as input and the positive and negative labels of the sample as supervision signals. It iteratively adds regression trees to fit the residual between the current model prediction and the true label and minimizes the binary cross-entropy loss function. Each newly added regression tree is split based on the sample region with the largest prediction error in the previous stage. The outputs of all regression trees are weighted and summed and transformed by sigmoid to obtain the predicted probability of the model output, which is used as the reordering score of the candidate transformation product.

5. The conversion product prediction method according to claim 4, characterized in that, If the SMILES string of the candidate transformation product is consistent with the actual transformation product, the candidate transformation product is marked as a positive sample; otherwise, it is marked as a negative sample. The candidate feature vector of the candidate transformation product includes: ranking, structural similarity, reaction center overlap, molecular formula change constraint, unchanged identifier, and source marker.

6. The conversion product prediction method according to claim 5, characterized in that, The ranking is obtained by sorting all candidate transformation products in the single-step candidate transformation product list from high to low confidence score; structural similarity is the Tanimoto similarity value of the molecular fingerprint between the parent compound and the candidate transformation product; reaction center overlap is the degree of consistency between the structural change position of the candidate transformation product relative to the parent compound and the prior representation of the reaction center; molecular formula change constraints include the difference in elemental composition, mass difference, and mass difference matching tag between the parent compound and the candidate transformation product, wherein the matching tag is 1 if the mass difference falls within the preset range of biotransformation mass difference, otherwise it is 0; the no-change tag is 1 if the SMILES string of the candidate transformation product is equal to the normalized SMILES string of the parent compound, otherwise it is 0; the source tag is a category code, indicating that it comes from the output of the single-step transformation product prediction model or the gradient boosting tree reordering model.

7. The conversion product prediction method according to claim 5, characterized by, The candidate transformation product list of the parent compound to be tested uses the first n non-repeating candidate transformation products in the single-step candidate transformation product list as the head candidates, and the first Ln non-repeating candidate transformation products in the reordered single-step candidate transformation product list as the remaining candidates, where L is the list length and L>n; the candidate transformation products in the single-step candidate transformation product list are arranged in descending order of confidence score, and the candidate transformation products in the reordered single-step candidate transformation product list are arranged in descending order of reordering score.

8. The conversion product prediction method of claim 1, wherein, For each generation of the generated candidate transformation product list of the parent structure, the list includes the normalized SMILES string of each candidate transformation product, its single-step confidence score, iteration depth, path number, and cumulative path score. The path is a multi-generational derivation sequence formed by recursively using a single candidate transformation product from the current candidate transformation product list as the parent of the next generation, starting from the original parent compound. Each path corresponds to one multi-generational derivation sequence. The cumulative path score represents the cumulative confidence score of each path from the initial parent compound to the current iteration depth, expressed as: , wherein, represents the path cumulative score of the path of the first represents the path cumulative score of the path of the first represents the path cumulative score of the path of the first represents the reordering score of the last candidate conversion product of the path of the firstλ represents a depth penalty coefficient.​​​​ 9. The conversion product prediction method according to claim 8, characterized by, After each iteration, the paths are sorted from highest to lowest cumulative score. The top-ranked paths are retained for subsequent iterations. Among the retained paths, multiple candidate transformation products generated at the current iteration depth are subjected to deduplication, loop removal, unchanged suppression, and low-score truncation screening. If a path does not have any candidate transformation products for further iteration after screening at the current depth, then the iteration for that path ends. All paths will stop iterating when any of the following conditions are met: the preset maximum iteration depth is reached; or the number of paths to be retained reaches the preset maximum number of paths. The cumulative score of all retained paths is lower than the preset threshold; All iterations of the reserved paths have ended.

10. The conversion product prediction method of claim 1, wherein, The multi-generational derivation sequence set includes the candidate transformation product composition sequence of the retained path at each iteration depth, the total cumulative path score of each path after the last iteration, the candidate transformation product list generated in each generation, and the normalized SMILES string and single-step confidence score of each candidate transformation product in the list, iteration depth, path number, and cumulative path score; based on the multi-generational derivation sequence set, a generational derivation directed network of the transformation products of the parent compound to be tested is constructed. The generational derivation directed network of the transformation products is a directed tree with the parent compound to be tested as the root node. The directed tree starts from the root node, and the directed edges point to the first generation candidate transformation product nodes generated by the root node; Each candidate transformation product node is then used as the parent node to point to the next generation product node, and so on, until the leaf node is reached. The features of each non-root node include: the normalized SMILES string of the candidate transformation product corresponding to the node and the single-step confidence score, iteration depth, path number, and path cumulative score.

Citation Information

Patent Citations

  • Method for synthesizing and analyzing intermediate product of nitrogen-containing heterocyclic organic compound

    CN114235976A

  • Bioretrosynthetic method and system based on and-or tree and single-step reaction template prediction

    US20230197205A1