Method for establishing root concentration factor prediction model, training device and root concentration factor prediction method
By using a root concentration factor prediction model based on message passing neural networks, and leveraging SMILES encoding of compounds and small-data sample transfer learning, the problems of poor generalization and large data requirements in traditional methods for predicting root concentration factors are solved, thus achieving more efficient prediction of pollutant diffusion in plant roots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RES CENT FOR ECO ENVIRONMENTAL SCI THE CHINESE ACAD OF SCI
- Filing Date
- 2024-04-23
- Publication Date
- 2026-07-03
AI Technical Summary
In existing root concentration factor prediction methods, the simplification of plant-soil-pollutant interactions in traditional empirical and mechanistic models leads to poor generalization, while traditional machine learning methods require a large amount of data, resulting in a small scope of application and low accuracy of the prediction models.
A root concentration factor prediction model based on message passing neural network is adopted. The primary model is trained using the SMILES encoding of compounds. Transfer learning is combined with small data samples, and the model parameters are optimized by simulating the pollutant diffusion process with large data samples to generate a root concentration factor prediction model.
It improves the accuracy of root concentration factor prediction, reduces computational resource requirements, expands the prediction range, and adapts to pollutant absorption prediction under different soil environments.
Smart Images

Figure CN118447962B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of environmental health risk assessment technology, specifically to a method for establishing a root concentration factor prediction model, a training device, and a root concentration factor prediction method. Background Technology
[0002] The widespread use of organic chemicals has led to the release of harmful chemicals into the environment, which then accumulate in the soil through atmospheric deposition and irrigation with contaminated water. These organic pollutants, particularly in agricultural soils, can be absorbed by plants and migrate into the food chain, posing potential hazards to agricultural ecosystems and the consumption of agricultural products. The process by which plant roots absorb organic pollutants from contaminated soil is crucial in promoting their translocation and accumulation within plants. The root concentration factor is defined as the equilibrium distribution of pollutants in soil solids, pore water, and plant roots; it is the ratio of the pollutant concentration in the roots to the pollutant concentration in the soil at a steady-state or equilibrium state. The root concentration factor is commonly used as an indicator of soil or ecological environment health. By predicting the root concentration factor, it is possible to control or prevent the spread of organic pollutants in the soil or the entire ecological environment.
[0003] The inventors have discovered at least the following problems in related technologies: During the absorption of pollutants from the soil by root plants, a complex system consisting of plant-soil-pollutant is formed. Predicting root concentration requires considering plant characteristics, soil characteristics, pollutant characteristics, and their interactions. Furthermore, traditional root concentration factor prediction methods rely on the limited physicochemical properties of pollutants for empirical models, while mechanistic models are developed based on assumptions about the pollutant uptake process by root plants. These methods oversimplify the plant-soil-pollutant interactions and over-rely on human experience, resulting in poor generalization and limited applicability of the prediction models. Alternatively, traditional machine learning methods for predicting root concentration factors depend on the degree of description of the interaction between pollutants and plants. Only by inputting more detailed feature data can relatively accurate prediction results be obtained. Given the limited amount of existing root concentration factor data, the need for large amounts of data restricts the generalization of the prediction models. Summary of the Invention
[0004] In view of the above problems, this disclosure provides a method for establishing a root concentration factor prediction model, a training device, and a root concentration factor prediction method.
[0005] According to the first aspect of this disclosure, a method for establishing a root concentration factor prediction model is provided, comprising:
[0006] Obtain the first dataset and first label for a variety of compounds. The first dataset is SMILES encoding used to describe the molecular structure of each compound, and the first label is used to characterize the retention time data of each compound in chromatography.
[0007] Using the first dataset and the first label, the parameters of the first model of the first trained model are optimized to obtain a primary model containing the primary model parameters;
[0008] A second dataset and second label for multiple pollutants were obtained. The second dataset is SMILES encoding used to describe the molecular structure of each pollutant, and the second label is used to characterize the root concentration factor data of each pollutant absorbed by the roots of multiple plants in different soil environments.
[0009] Using the second dataset and the second label, the parameters of the second model of the primary model are optimized to obtain the root concentration factor prediction model.
[0010] According to embodiments of this disclosure, the first training model, the primary model, and the root concentration factor prediction model include: an initialization layer, a bond feature embedding layer, an atom feature embedding layer, a molecular feature embedding layer, and a prediction layer;
[0011] The primary model parameters include: primary initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters;
[0012] The parameters of the root concentration factor prediction model include: target initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, target molecule feature embedding layer model parameters, and target prediction layer model parameters.
[0013] According to embodiments of this disclosure, a second model parameter of the primary model is optimized using a second dataset and a second label to obtain a root concentration factor prediction model, including:
[0014] Fix the model parameters of the primary bond feature embedding layer and the primary atom feature embedding layer in the primary model;
[0015] Using the second dataset and the second label, the second model parameters of the primary model are optimized to obtain the root concentration factor prediction model. The second model parameters include: primary initialization layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters.
[0016] According to embodiments of this disclosure, a second model parameter of the primary model is optimized using a second dataset and a second label to obtain a root concentration factor prediction model, including:
[0017] The SMILES codes of multiple pollutants are input into the primary initialization layer of the primary model to generate molecular diagrams, interatomic relation matrices and feature vectors composed of molecular descriptors for each pollutant.
[0018] The molecular diagram, the interatomic relation matrix, and the feature vector composed of molecular descriptors are sequentially input into the primary bond feature embedding layer, the primary atom feature embedding layer, and the primary molecular feature embedding layer of the primary model to obtain the molecular feature vector of the pollutant.
[0019] The molecular feature vectors of pollutants are input into the primary prediction layer of the primary model to generate secondary prediction data for each pollutant. The secondary prediction data is used to characterize the root concentration factor prediction data of different root systems absorbing various pollutants in different soil environments.
[0020] Based on the second prediction data and the second label, the second model parameters of the primary model are optimized to obtain the root concentration factor prediction model.
[0021] According to embodiments of this disclosure, generating molecular diagrams, interatomic relation matrices, and feature vectors composed of molecular descriptors for each of various pollutants includes:
[0022] Based on the SMILES encoding of the pollutants, node features for characterizing atomic features and edge features for characterizing bond features are added to the undirected graph to obtain the molecular graph of the pollutants.
[0023] Based on the SMILES encoding of pollutants, an adjacency matrix representing the adjacency characteristics between atoms, a distance matrix representing the distance characteristics between atoms, and a Coulomb matrix representing the Coulomb characteristics between atoms are established respectively, thus obtaining the inter-atomic relationship matrix of pollutants.
[0024] Based on the SMILES encoding of pollutants, molecular feature vectors are generated according to the molecular properties represented by the molecular descriptors, thus obtaining the molecular descriptor feature vectors of pollutants.
[0025] According to embodiments of this disclosure, atomic characteristic information includes atom type, atom valence, atom form charge, atom chirality, number of hydrogen atoms bonded to the atom, atom hybridization mode, atom aromaticity, and atom mass;
[0026] Key feature information includes the type of bond, whether the bond is conjugated, whether the bond is on a ring, and the three-dimensional configuration information of the bond;
[0027] Interatomic relationship characteristics include whether corresponding atomic pairs are bonded, the topological distance between corresponding atomic pairs, and the electrostatic interaction information between corresponding atomic pairs.
[0028] According to embodiments of this disclosure, the molecular descriptor feature vector of pollutants includes a feature vector of plant root lipid content and a feature vector of soil organic matter content.
[0029] According to embodiments of this disclosure, the molecular diagram, the interatomic relation matrix, and the feature vector composed of molecular descriptors are sequentially input into the primary bond feature embedding layer, the primary atom feature embedding layer, and the primary molecular feature embedding layer of the primary model to obtain the molecular feature vector of the pollutant, including:
[0030] Based on the molecular diagram and the interatomic relationship matrix, generate an initialization bond feature tensor;
[0031] The initialization bond feature tensor is input into the bond feature embedding layer to extract the atomic-level bond feature tensor of the pollutants;
[0032] The atomic-level bond feature tensor is input into the primary atomic feature embedding layer of the primary model, and the atomic-level bond feature tensor is connected with the atomic features of the pollutants to obtain the atomic feature tensor of the pollutants.
[0033] The atomic feature tensor is input into the primary molecular feature embedding layer of the primary model, and the atomic feature tensor is concatenated with the molecular descriptor feature vector to obtain the molecular feature vector of the pollutant.
[0034] A second aspect of this disclosure provides a training apparatus for a root concentration factor prediction model, comprising:
[0035] The first acquisition module is used to acquire a first dataset and a first label for a variety of compounds. The first dataset is a SMILES code used to describe the molecular structure of each compound, and the first label is used to characterize the retention time data of each compound in chromatography.
[0036] The first optimization module is used to optimize the first model parameters of the first trained model using the first dataset and the first label, so as to obtain a primary model containing the primary model parameters.
[0037] The second acquisition module is used to acquire a second dataset and a second label for multiple pollutants. The second dataset is SMILES encoding used to describe the molecular structure of each pollutant, and the second label is used to characterize the root concentration factor data of each pollutant absorbed by the roots of multiple plants in different soil environments.
[0038] The second optimization module is used to optimize the second model parameters of the primary model using the second dataset and the second label, so as to obtain the root concentration factor prediction model.
[0039] A third aspect of this disclosure provides a method for predicting root concentration factors, comprising:
[0040] Obtain the SMILES codes of the pollutants to be predicted;
[0041] The SMILES codes of the pollutants to be predicted are input into the root concentration factor prediction model to obtain the root concentration factor data of the pollutants to be predicted.
[0042] According to embodiments of this disclosure, to address the problem of insufficient training sample data, this disclosure pre-trains a primary model (message-passing neural network model) using existing large-scale data samples (retention time data of compounds in chromatography) to obtain primary model parameters. Furthermore, since the diffusion process of pollutants from soil (aquatic environment) to plant roots has similar lipophilicity to the separation process of compounds in the chromatographic column, the retention time of compounds in chromatography is used to simulate the diffusion time of pollutants in plant roots. Using some of the trained primary model parameters (second model parameters), a small-scale data sample (root concentration factor of a certain pollutant absorbed by different plant roots under different soil conditions) is used to further train the primary model to obtain a root concentration factor prediction model. According to the above method, by using a message-passing neural network model and transfer learning, and leveraging the correlation between datasets (shared lipophilicity), parameter transfer from large-scale data samples to small-scale data samples is achieved, breaking the strict requirements of previous deep learning models on the amount of training data. Therefore, the accuracy of root concentration factor prediction results can be further improved, avoiding the problems of low model training accuracy and inaccurate prediction results caused by insufficient training samples (root concentration factor of a certain pollutant absorbed by different plant roots under different soil conditions).
[0043] On the other hand, by using the SMILES encoding of compound molecules as input to the model, molecular characterization of compounds can be directly trained without using molecular weight parameters calculated using quantum chemical calculation methods in traditional machine learning as molecular descriptors. This saves computation time and resources for molecular descriptors, reduces the requirements for computational chemistry foundations in applications, and improves overall computer prediction performance and expands the prediction range. Attached Figure Description
[0044] The foregoing contents, as well as other objects, features, and advantages of this disclosure, will become clearer from the following description of embodiments with reference to the accompanying drawings, in which:
[0045] Figure 1 The schematic diagram illustrates the principle of a method for establishing a root concentration factor prediction model according to an embodiment of the present disclosure;
[0046] Figure 2 A flowchart illustrating a method for establishing a root concentration factor prediction model according to an embodiment of the present disclosure is shown schematically.
[0047] Figure 3 A schematic diagram of the structure of a primary model according to an embodiment of the present disclosure is shown.
[0048] Figure 4 The schematic diagram illustrates the principle of a method for establishing a root concentration factor prediction model according to another embodiment of the present disclosure;
[0049] Figure 5 A flowchart illustrating a method for establishing a root concentration factor prediction model according to another embodiment of the present disclosure is shown schematically.
[0050] Figure 6 A flowchart illustrating a method for obtaining a primary model according to an embodiment of the present disclosure is shown schematically.
[0051] Figure 7 A schematic block diagram of a training apparatus for a root concentration factor prediction model according to an embodiment of the present disclosure is shown. Detailed Implementation
[0052] The embodiments of the present disclosure will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the disclosure. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the present disclosure for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concepts of the present disclosure.
[0053] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. The terms “comprising,” “including,” etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0054] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0055] When using expressions such as "at least one of A, B, and C", they should generally be interpreted in accordance with the meaning that is commonly understood by a person skilled in the art (e.g., "a system having at least one of A, B, and C" should include, but is not limited to, a system having A alone, a system having B alone, a system having C alone, a system having A and B, a system having A and C, a system having B and C, and / or a system having A, B, and C, etc.).
[0056] In traditional root concentration factor prediction methods, the prediction models built using conventional machine learning algorithms require manual calculation of molecular quantification parameters as molecular descriptors using quantum chemical computation methods. This process is time-consuming and computationally resource-intensive, data processing is cumbersome, and it demands high-quality input data. Furthermore, it requires users to have a certain level of data computational knowledge and the ability to use relevant applications. On the other hand, model training requires substantial data, such as plant characteristics, soil characteristics, pollutant characteristics, and their interactions. Plant characteristics include plant species and growth stages; soil characteristics include soil pH, soil texture, and soil organic matter content; and pollutant characteristics include pollutant types, heavy metal forms, and pollutant concentrations. Therefore, additional environmental conditions and plant characteristics measured in experiments or fields are needed as feature descriptions. The application scope is narrow and it is not suitable for large-scale prediction. Its predictive performance also needs to be improved. Under the limited conditions of laboratory simulation systems or specific farmland areas, it is impossible to correlate the interactions between all chemical characteristics, soil characteristics and plant characteristics with root concentration factors, making it difficult to achieve a systematic and comprehensive evaluation of the soil environment. Secondly, when a large number of newly developed chemicals are released into the environment, it is impossible to measure the plants' ability to absorb these newly added chemicals in a timely manner.
[0057] Deep learning, as an advanced machine learning algorithm, uses hierarchical recombination of features to extract relevant information and learn the pattern properties of data representations. Graph convolutional neural networks can apply convolution operations to unstructured data and aggregate global information from local features. Since small molecules can be considered graph data in a computational environment, embodiments of this disclosure construct graph data based on each atom in the molecule and apply graph convolutional neural networks to a method for predicting root concentration factors. In a spatial-based variant of graph convolutional neural networks, message-passing neural networks outline the general framework for utilizing spatial graph convolution. Furthermore, message-passing neural networks combined with attention mechanisms can focus more on substructures that are crucial to the desired chemical properties during the learning process, thereby aggregating more information-rich molecular features to obtain the root concentration factor of the input molecule.
[0058] The embodiments of this disclosure provide a method for establishing a root concentration factor prediction model.
[0059] Obtain the first dataset and first label for a variety of compounds. The first dataset is SMILES encoding used to describe the molecular structure of each compound, and the first label is used to characterize the retention time data of each compound in chromatography.
[0060] Using the first dataset and the first label, the parameters of the first model of the first trained model are optimized to obtain a primary model containing the primary model parameters;
[0061] A second dataset and second label for multiple pollutants were obtained. The second dataset is SMILES encoding used to describe the molecular structure of each pollutant, and the second label is used to characterize the root concentration factor data of each pollutant absorbed by the roots of multiple plants in different soil environments.
[0062] Using the second dataset and the second label, the parameters of the second model of the primary model are optimized to obtain the root concentration factor prediction model.
[0063] The following is passed Figures 1-6 The method for establishing the root concentration factor prediction model of the disclosed embodiments is described in detail.
[0064] Figure 1 The illustration shows a schematic diagram of the principle of a method for establishing a root concentration factor prediction model according to an embodiment of the present disclosure. Figure 2 A flowchart illustrating a method for establishing a root concentration factor prediction model according to an embodiment of this disclosure is shown schematically. The following is in conjunction with... Figure 1 and Figure 2 Detailed explanation.
[0065] like Figure 1 As shown, in the embodiments of this disclosure, the model parameters in the first training model are adjusted using the first dataset and first label of the compounds to generate a primary model. Further, based on the primary model, the second model parameters in the primary model are adjusted using the second dataset and second label of the pollutants to obtain the root concentration factor prediction model.
[0066] Specifically, such as Figure 2 As shown, the method for establishing the root concentration factor prediction model in this embodiment includes operations S210 to S240.
[0067] In operation S210, a first dataset and a first label for a variety of compounds are obtained. The first dataset is SMILES encoding used to describe the molecular structure of each compound, and the first label is used to characterize the retention time data of each compound in chromatography.
[0068] According to embodiments of this disclosure, SMILES codes of compounds are used as information encodings describing the molecular structure of each compound. SMILES codes use simple symbols of chemical structures, such as element symbols, plus and minus signs, parentheses, etc., to represent molecules, enabling rapid and direct representation of the molecular topology and connectivity relationships, and can be recognized and processed by a computer system. A first dataset contains the SMILES codes of each compound. Specifically, one SMILES code uniquely corresponds to one compound, and that compound corresponds to a first tag, namely, the retention time data of that compound in chromatography. There is a one-to-one correspondence between the SMILES code, the compound, and the first tag. The first tag can be obtained by direct download; for example, 79,957 retention time data of compounds in chromatography can be obtained.
[0069] In operation S220, using the first dataset and the first label, the first model parameters of the first trained model are optimized to obtain a primary model containing the primary model parameters.
[0070] According to embodiments of this disclosure, the first model parameters of a first training model are optimized using SMILES codes of multiple compounds and corresponding labels (retention time data in chromatography). Specifically, the SMILES code of each compound is input into the first training model, and the predicted retention time data in chromatography for each compound is output. The first model parameters of the first training model are optimized based on the predicted retention time data in chromatography and the corresponding first labels of the compounds. Trial calculations can be performed in groups based on different model parameters. Different model parameters are set in each group. Further, using the same SMILES codes and corresponding labels for multiple compounds, the group of model parameters whose predicted retention time data in chromatography is closest to the first label is selected as the optimal model parameters, i.e., the primary model parameters, thus obtaining the primary model.
[0071] In operation S230, a second dataset and a second label for multiple pollutants are obtained. The second dataset is SMILES encoding used to describe the molecular structure of each pollutant, and the second label is used to characterize the root concentration factor data of each pollutant absorbed by the roots of multiple plants in different soil environments.
[0072] According to embodiments of this disclosure, the pollutant may be one of the aforementioned compounds. The second dataset contains SMILES codes for each pollutant. The second tag contains root concentration factor data for at least one plant absorbing one pollutant in a soil environment. The second tag can be obtained through direct download; for example, 630 root concentration factor data points can be obtained. Since existing data on root concentration factors for different plant roots absorbing various pollutants in different soil environments is limited, the amount of data in the second tag is far less than the amount of data in the first tag.
[0073] In operation S240, the second dataset and second label are used to optimize the second model parameters of the primary model to obtain the root concentration factor prediction model.
[0074] According to embodiments of this disclosure, the second model parameters of the primary model are optimized using SMILES codes for multiple pollutants and corresponding labels (root concentration factor data) for multiple pollutants. The second model parameters can be some parameters from the primary model or some parameters from the second training model.
[0075] As part of the parameters in the second training model, one implementation method is to initialize the model parameters of the second training model using the model parameters of the primary model, so that the initialized model parameters of the second training model are consistent with the model parameters of the primary model, thereby realizing the transfer of model parameters from the primary model to the second training model. Furthermore, the second model parameters in the second training model are trained using second labels corresponding to multiple pollutants.
[0076] Specifically, such as Figure 1 As shown, the SMILES code for each pollutant is input into the primary model (since the second training model is the same as the primary model, it can also be considered as directly inputting into the second training model). This outputs the root concentration factor prediction data for each pollutant. Based on the root concentration factor prediction data for multiple pollutants and their corresponding second labels, some model parameters (second model parameters) in the primary model (or the second training model) are optimized. The specific method for optimizing the model parameters is the same as the method for optimizing the first model parameters in the first training model, until the training termination condition is met, thus obtaining the root concentration factor prediction model.
[0077] According to embodiments of this disclosure, to address the problem of insufficient training sample data, this disclosure pre-trains a primary model (message-passing neural network model) using existing large-scale data samples (retention time data of compounds in chromatography) to obtain primary model parameters. Furthermore, since the diffusion process of pollutants from soil (aquatic environment) to plant roots has similar lipophilicity to the separation process of compounds in the chromatographic column, the retention time of compounds in chromatography is used to simulate the diffusion time of pollutants in plant roots. Using some of the trained primary model parameters (second model parameters), a small-scale data sample (root concentration factor of a certain pollutant absorbed by different plant roots under different soil conditions) is used to further train the primary model to obtain a root concentration factor prediction model. According to the above method, by using a message-passing neural network model and transfer learning, and leveraging the correlation between datasets (shared lipophilicity), parameter transfer from large-scale data samples to small-scale data samples is achieved, breaking the strict requirements of previous deep learning models on the amount of training data. Therefore, the accuracy of root concentration factor prediction results can be further improved, avoiding the problems of low model training accuracy and inaccurate prediction results caused by insufficient training samples (root concentration factor of a certain pollutant absorbed by different plant roots under different soil conditions).
[0078] On the other hand, by using the SMILES encoding of compound molecules as input to the model, molecular characterization of compounds can be directly trained without using molecular weight parameters calculated using quantum chemical calculation methods in traditional machine learning as molecular descriptors. This saves computation time and resources for molecular descriptors, reduces the requirements for computational chemistry foundations in applications, and improves overall computer prediction performance and expands the prediction range.
[0079] Figure 3 A schematic diagram of the structure of a primary model according to an embodiment of the present disclosure is shown.
[0080] According to embodiments of this disclosure, the models involved are all message-passing neural network models, which have the same model structure. Furthermore, based on different input sample data and different model parameters obtained after training with different sample data, message-passing neural network models are named with different names.
[0081] Specifically, the model parameters in the first training model can be initialized model parameters, and its input sample data are the first dataset and the first label; the model parameters in the primary model are primary model parameters trained based on the first dataset and the first label, and its input sample data are the first dataset and the first label; the root concentration factor prediction model is trained based on some primary model parameters (second model parameters) using the second dataset and the second label, and its input sample data are the second dataset and the second label.
[0082] Taking the primary model as an example, such as Figure 3 As shown, the primary model includes: an initialization layer, a bond feature embedding layer, an atom feature embedding layer, a molecular feature embedding layer, and a prediction layer.
[0083] The primary model parameters include: primary initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters.
[0084] Figure 4 The schematic diagram illustrates the principle of a method for establishing a root concentration factor prediction model according to another embodiment of the present disclosure. Figure 5 A flowchart illustrating a method for establishing a root concentration factor prediction model according to another embodiment of this disclosure is shown schematically. The following is in conjunction with... Figure 4 and Figure 5 Detailed explanation.
[0085] like Figure 4 As shown, in the embodiments of this disclosure, the model parameters in the first training model are adjusted using the first dataset and first label of the compound to generate a primary model. Further, the primary bond feature embedding layer model parameters and the primary atom feature embedding layer model parameters in the primary model are kept unchanged, and the other model parameters in the primary model are adjusted using the second dataset and second label of the pollutants to obtain the root concentration factor prediction model.
[0086] Specifically, such as Figure 5 As shown, the second model parameters of the primary model are optimized using the second dataset and the second label to obtain the root concentration factor prediction model, including operation S510 and operation S520.
[0087] In operation S510, the parameters of the primary bond feature embedding layer model and the primary atom feature embedding layer model are fixed in the primary model.
[0088] According to embodiments of this disclosure, such as Figure 4 As shown, the model parameters of the primary bond feature embedding layer and the primary atom feature embedding layer are fixed by locking. When training the primary model using the second dataset and the second label, the model parameters of the primary bond feature embedding layer and the primary atom feature embedding layer remain unchanged.
[0089] In operating S520, the second model parameters of the primary model are optimized using the second dataset and the second label to obtain the root concentration factor prediction model. The second model parameters include: primary initialization layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters.
[0090] According to embodiments of this disclosure, a root concentration factor prediction model is obtained by using small sample data (a second dataset and a second label) to train the model parameters of other layers besides the primary bond feature embedding layer model parameters and the primary atom feature embedding layer model parameters.
[0091] According to embodiments of this disclosure, in the process of optimizing the second model parameters of the primary model using the second dataset and the second label to obtain the root concentration factor prediction model, one implementation method may be to initialize the model parameters of the second training model using the model parameters of the primary model, so that the initialized model parameters of the second training model are consistent with the model parameters of the primary model, fix the primary bond feature embedding layer model parameters and the primary atom feature embedding layer model parameters in the second training model, and further, input the second dataset and the second label into the second training model to optimize the second model parameters in the second training model.
[0092] According to embodiments of this disclosure, since the diffusion of pollutants from soil (aquatic environment) to plant roots has similar lipophilicity to the separation of compounds in a chromatographic column, the retention time of compounds in chromatography is used to simulate the diffusion time of pollutants in plant roots. The bond feature embedding layer and the atomic feature embedding layer contain a wider range of molecular structure features learned from large sample datasets, which can supplement the missing molecular structure features in the second dataset. Therefore, the primary parameters of this part are retained, while the remaining parameters are adjusted to adapt to the prediction task of the second model. The model trained based on the retention time data of compounds in chromatography can be directly transferred to the plant root concentration factor training model for direct application, avoiding the problem of low training accuracy caused by insufficient root concentration factor sample data.
[0093] According to embodiments of this disclosure, after the above training, the root concentration factor prediction model parameters obtained include: target initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, target molecule feature embedding layer model parameters, and target prediction layer model parameters.
[0094] Since the models used in this disclosure, as mentioned in the above embodiments, are all message-passing neural network models, the training process of one model will be explained in detail. The training and application processes of other models can be referred to this method. The following explanation will focus on optimizing the second model parameters of the primary model using the second dataset and second labels to obtain a root concentration factor prediction model.
[0095] Figure 6 A flowchart illustrating the process of obtaining a primary model according to an embodiment of the present disclosure is shown schematically.
[0096] like Figure 6As shown, the second model parameters of the primary model are optimized using the second dataset and the second label to obtain the root concentration factor prediction model, including operations S610 to S640.
[0097] In operation S610, the SMILES codes of various pollutants are input into the primary initialization layer of the primary model to generate molecular diagrams, interatomic relation matrices, and feature vectors composed of molecular descriptors for each pollutant.
[0098] According to embodiments of this disclosure, the first training model is equipped with a predetermined toolkit that can directly parse the SMILES encoding of a compound to obtain its corresponding molecular graph, interatomic relation matrix, and feature vector composed of molecular descriptors. The predetermined toolkit can be any existing toolkit capable of parsing the SMILES encoding of a compound, and will not be elaborated further here. By converting the SMILES encoding into a molecular graph, interatomic relation matrix, and feature vector composed of molecular descriptors in the message passing network model, the molecular structure and properties can be better characterized, thereby extracting key information more efficiently and reducing unnecessary repetitive steps in the calculation.
[0099] Specifically, the SMILES codes of various pollutants are input into the primary initialization layer of the primary model to generate molecular diagrams, interatomic relation matrices, and feature vectors composed of molecular descriptors for each pollutant, including steps 11 and 13.
[0100] According to embodiments of this disclosure, atomic characteristic information includes atom type, atom valence, atom formal charge, atom chirality, number of hydrogen atoms bonded to the atom, atom hybridization mode, atom aromaticity, and atom mass; bond characteristic information includes bond type, whether the bond is conjugated, whether the bond is on a ring, and bond stereoconfiguration information; interatomic relationship characteristic information includes whether corresponding atom pairs are bonded, the topological distance between corresponding atom pairs, and electrostatic interaction information between corresponding atom pairs; molecular descriptors include graph descriptors, chemical descriptors, Lipinski rule descriptors, electrotopological state molecular surface region descriptors, electrotopological state descriptors, Crippen descriptors, molecular surface descriptors, molecular fragment descriptors, and quantitative prediction drug sample property descriptors.
[0101] In step 11, based on the SMILES encoding of the pollutants, node features for characterizing atomic feature information and edge features for characterizing bond feature information are added to the undirected graph to obtain the molecular graph of the pollutants.
[0102] According to embodiments of this disclosure, an undirected graph G is a data structure defined by a pair of sets (V, E), where V and E represent the set of atoms and the set of bonds, respectively. A molecule of a compound consists of atoms and chemical bonds connecting the atoms. Atoms are considered as nodes in a graph network, and chemical bonds are considered as edges in the graph network, thus constructing a molecular graph. Nodes correspond to atoms in the molecule, and edges correspond to chemical bonds in the molecule. The node attribute of each node corresponds to the node characteristics of the atoms, and the edge attribute of each edge corresponds to the bond characteristics, thereby obtaining a molecular graph of at least one compound.
[0103] Specifically, the number of non-hydrogen atoms N in the SMILES code of the compound is obtained using a pre-defined toolkit. N nodes are added to the undirected graph. For each non-hydrogen atom corresponding to a node, atomic feature information is obtained using the pre-defined toolkit and encoded using one-hot encoding to generate a matrix of size 1×L. Next, the node feature matrices corresponding to all nodes are connected to generate an N×L matrix, which is stored as an atomic feature matrix. Here, N is the number of non-hydrogen atoms, which is greater than or equal to 1, and L is set as needed. For example, if L is 127, an N×127 matrix is generated. Next, all combinations between non-hydrogen atoms in the SMILES code of the compound are traversed, and edges are added to the non-hydrogen atoms corresponding to all nodes. For the chemical bond represented by each edge, bond feature information is obtained using the pre-defined toolkit and encoded using one-hot encoding to generate a matrix of size 1×L'. Finally, the edge feature matrices corresponding to all edges are connected to generate a 2S×L' matrix, which is stored as a chemical bond feature matrix. Here, S is the number of chemical bonds, which is greater than or equal to 1, and L' can be set as needed. For example, if L' is 14, an S×14 matrix is generated.
[0104] In step 12, based on the SMILES encoding of the pollutants, an adjacency matrix representing the adjacency characteristics between atoms, a distance matrix representing the distance characteristics between atoms, and a Coulomb matrix representing the Coulomb characteristics between atoms are established respectively, thus obtaining the inter-atomic relationship matrix of the pollutants.
[0105] According to embodiments of this disclosure, after constructing the molecular graph as described above, inter-atomic relation matrices are established. These matrices include an adjacency matrix characterizing inter-atomic adjacency features, a distance matrix characterizing inter-atomic distance features, and a Coulomb matrix characterizing inter-atomic Coulomb features. The adjacency matrix and distance matrix are two graphical representations of the molecule, containing connectivity and distance information for each pair of atoms, respectively. The Coulomb matrix is a molecular characterization method describing inter-atomic electrostatic interactions; it consists of a set of atomic nucleus charges {Z}. i} and the corresponding Cartesian coordinates {R} i} is used to represent this.
[0106] Specifically, the number of non-hydrogen atoms N in the SMILES code of the compound is obtained using a pre-defined toolkit, and three N×N matrices are initialized. Next, hydrogen atoms are added to the molecule using the pre-defined toolkit, and the conformational information of the molecule is obtained. Then, for each pair of atoms (a1, a2), it is determined whether there is a chemical bond. Bonded atom pairs are represented by 1, and unbonded atom pairs are represented by 0, resulting in an N×N adjacency matrix. Based on the molecular conformation, the topological distance between each pair of atoms (a1, a2) is calculated according to the three-dimensional coordinates of the atoms, resulting in an N×N distance matrix. For each pair of atoms (a1, a2), the electrostatic interaction between atoms is calculated by the atomic energy and the internuclear Coulomb repulsion operator. The interaction F between the atom and itself is obtained by calculating the Coulomb repulsion operator, specifically referring to formula (1):
[0107]
[0108] Here, i represents the atom itself.
[0109] The interaction between atoms is obtained by calculating the Coulomb repulsion operator, as shown in formula (2):
[0110]
[0111] Here, i represents the atom itself, and j represents other atoms. This results in an N×N Coulomb matrix.
[0112] In step 13, based on the SMILES encoding of the pollutant, a molecular feature vector is generated according to the molecular properties represented by the molecular descriptor, thus obtaining the molecular descriptor feature vector of the pollutant.
[0113] According to embodiments of this disclosure, molecular feature vectors are generated based on the molecular properties characterized by molecular descriptors to obtain molecular descriptor feature vectors for pollutants. Specifically, a predetermined toolkit is used to generate 200 molecular features from the pollutant's SMILES encoding based on the molecular descriptors.
[0114] According to embodiments of this disclosure, the molecular descriptor feature vector of pollutants includes a feature vector of plant root lipid content and a feature vector of soil organic matter content.
[0115] Furthermore, a predefined toolkit can be used to generate 200 molecular features from the pollutant's SMILES encoding based on the molecular descriptor, and two additional environmental feature descriptors, "plant root lipid content" and "soil organic matter content", can be added as molecules, thus forming a 1×202 molecular descriptor feature matrix, and obtaining the pollutant's molecular descriptor feature vector.
[0116] According to embodiments of this disclosure, when training the first training model using the first dataset and the first label, the input is the SMILES encoding of the compound, and other processes are the same as in the above embodiments, and will not be repeated here. However, the process of generating molecular feature vectors according to the molecular properties represented by the molecular descriptors differs from the above embodiments. Specifically, a predetermined toolkit is used to generate 200 molecular features from the SMILES encoding of the pollutant based on the molecular descriptor, and two additional zero vectors are added to correspond to the shape of the molecular descriptor feature vector of the pollutant, forming a 1×202 molecular descriptor feature matrix to obtain the molecular descriptor feature vector of the compound.
[0117] According to embodiments of this disclosure, the molecular graph based on SMILES encoding conversion contains atomic feature information and bond feature information. The inter-atomic relationship matrix contains inter-atomic adjacency features, inter-atomic distance features, and inter-atomic Coulomb features. The molecular descriptor feature vector contains molecular properties, which can better characterize the molecular structure of compounds and pollutants. This is beneficial for the subsequent message passing neural network to learn the molecular features of the chromatographic retention time of compounds and the molecular features of the root concentration factor of pollutants, respectively.
[0118] Furthermore, by incorporating "plant root lipid content" (describing plant root characteristics) and "soil organic matter content" (describing soil characteristics) into the molecular characteristics of pollutants, the primary model learns better the molecular characteristics of pollutant interactions in the plant-soil-water system during training. This results in a predictive model applicable to various environmental conditions and chemicals, with broader and more convenient applications and predictive performance. At the same time, it reduces the requirements for data feature integrity and computational chemistry fundamentals and environmental condition descriptions during application.
[0119] In operation S620, the molecular diagram, the interatomic relation matrix, and the feature vector composed of molecular descriptors are sequentially input into the primary bond feature embedding layer, the primary atom feature embedding layer, and the primary molecular feature embedding layer of the primary model to obtain the molecular feature vector of the pollutant, specifically including steps 21 to 24.
[0120] In step 21, an initialization bond feature tensor is generated based on the molecular diagram and the interatomic relation matrix.
[0121] According to embodiments of this disclosure, an atomic feature matrix is generated for atomic feature information, a bond feature matrix is generated for bond feature information, an adjacency matrix is generated for whether corresponding atomic pairs are bonded, a distance matrix is generated for the topological distance between corresponding atomic pairs, and a Coulomb matrix is generated for the electrostatic interaction between corresponding atomic pairs; and each bond is initialized with two feature vectors representing two bond messages in opposite directions, and the hidden state of the bond is further initialized according to a weight matrix to obtain an initialized bond feature tensor.
[0122] Specifically, the molecular graph G(V,E) has node features x v and bond features e vw The initial hidden state of the key is Based on formula (3) for x v and e vw After concatenation, the initial key feature tensor is obtained by sequentially performing initial weight transformation and activation function nonlinear transformation, where formula (3) is as follows:
[0123]
[0124] In step 22, the initial bond feature tensor is input into the bond feature embedding layer to extract the atomic-level bond feature tensor of the compound.
[0125] According to embodiments of this disclosure, for each key in the initialized key feature tensor, the hidden state of neighboring keys is updated according to the direction of the directional key to obtain the updated aggregated feature corresponding to each key; and the updated aggregated feature corresponding to each key is input to the key attention module, and after attention weight transformation, it is added to the initialized key feature tensor to obtain the atomic-level key feature tensor.
[0126] Specifically, for each node in the molecular graph, the weight contribution of its neighboring nodes is calculated, where the hidden state of the bond is... In each message passing iteration, the message for each key is updated according to formula (4):
[0127]
[0128] in, This represents adjacent hidden states, while This represents the reverse hidden state. Because the hidden state is transmitted in a directed manner during message passing, each chemical bond is initialized with two feature vectors, representing two bond messages in opposite directions; the updated... It is input into the key attention module to generate key attention. Will and Add them together to get the key attention message. Using the hidden weight matrix W h right Perform projection, then compare it with the initial hidden state of the key. The connection is used to input the activation function to generate the hidden state for subsequent message passing iterations. After T iterations, the global representation of the entire graph is aggregated from all hidden states of the bonds using the readout function, thus obtaining the atomic-level bond feature tensor of the compound.
[0129] The bond attention module contains six attention heads. First, it takes a message matrix of a compound containing S bonds as input. The hidden dimension is represented by [the first element]; secondly, [the dimension] is generated by projection and [the dimension] is related to H. b Equal query matrix Key matrix Sum matrix The additive attention weights of each key vector are calculated using formula (5).
[0130]
[0131] Among them, w q This indicates the query weight.
[0132] The global query q for the key is calculated according to formula (6). b .
[0133]
[0134] The interaction between the bond and the bond vector is calculated according to formula (7).
[0135]
[0136] Among them, the global key of the key Calculate using formulas (8) and (9):
[0137]
[0138]
[0139] Among them, w k Indicates key weight.
[0140] The value vector is transformed using the global key of the key according to formula (10).
[0141]
[0142] Finally, for key-value vectors Perform weight transformation, then use a query vector that skips joins and keys. By adding them together, we can obtain the global attention weight for each key. After layer normalization, it is compared with the input message matrix H b Add them together to get the final key attention output.
[0143] According to embodiments of this disclosure, since the physicochemical properties exhibited by each atom in a compound when passing through a chromatographic column are related to its neighboring atoms and / or bonds, and since a message propagation neural network is a general framework for supervised learning of graph structure data, by extracting the molecular features of the compound through a message propagation neural network, the correlation between each atom and its neighboring atoms and / or bonds can be learned better, thereby improving the accuracy of chromatographic retention time prediction.
[0144] In step 23, the atomic-level bond feature tensor is input into the atomic feature embedding layer, and the atomic-level bond feature tensor is connected with the atomic features of the compound to obtain the atomic feature tensor of the compound.
[0145] According to embodiments of this disclosure, the atomic-level bond feature tensor is concatenated with the atomic feature matrix and input to the atomic attention module. The inter-atomic relationship features are added to different attention heads as bias terms, and the atomic feature tensor is obtained after weight transformation.
[0146] Specifically, the aggregated key-hidden state obtained through step 22 With atomic feature x v After connection, it passes through the weight matrix W O Projection and ReLU function activation yield the message m for each atom. v ; will m v Input is fed into the atomic attention module to generate atomic attention AtomAttention(m v M Adjacency M Distance M Coulomb ), where M Adhacency M Distance M Coulomb Let AtomAttention(m) represent the adjacency matrix, distance matrix, and Coulomb matrix, respectively. These are added to different attention heads as bias terms for weight calculation. Then, AtomAttention(m)... v M Adjacency M Distance M Coulomb ) and the input m v Adding them together, we get the atomic hidden state h with atomic attention added. v , which is the atomic characteristic tensor of the compound.
[0147] The atomic attention module contains six attention heads and uses scaled dot product attention as the building block of atomic attention. First, the atomic message matrix... Input a 6-head atom attention layer, where N is the number of atoms and d is the hidden dimension; then, generate a layer with H through projection. a Equal query matrix Q a Key matrix Ka Sum matrix V a For each attention head, an additional inter-atomic relation feature matrix of a certain type is added as a bias term to the query-key interaction matrix; wherein, head1 and head2 are input adjacency matrices to incorporate atomic connectivity information into the model, head3 and head4 are input distance matrices to incorporate atomic topological distance information, and head5 and head6 are input Coulomb matrices to incorporate atomic electrostatic interaction information. The query-key interaction matrix is referenced from formula (11):
[0148]
[0149] Among them, W Q W represents the query weight. K M represents the key weight. graph This represents the scaled feature matrix of inter-atomic relationships.
[0150] Then, calculate the query-key interaction matrix A. a The attention score is then multiplied by the value matrix and projected through the value weights. After layer normalization, it is then multiplied by the input atomic message matrix H. a Add them together to get the final atomic attention output.
[0151] In step 24, the atomic feature tensor is input into the molecular feature embedding layer, and the atomic feature tensor is concatenated with the molecular descriptor feature vector to obtain the molecular feature vector of the compound.
[0152] According to embodiments of this disclosure, the hidden atomic states contained in the atomic feature tensor are updated to obtain the aggregated molecular feature vector, which is a single feature representation. The atomic feature tensor is concatenated with the molecular descriptor feature vector to obtain the molecular feature vector of the compound.
[0153] According to the embodiments of this disclosure, after step 23 above, in the molecular feature embedding layer, all the hidden states of the atoms are summarized into a single feature representation, namely a one-dimensional molecular feature vector, such as a 1×1000 atomic feature vector. This is concatenated with a molecular descriptor feature vector of size 1×202 to obtain the overall feature vector of the molecule, which is a molecular feature vector of shape 1×1202.
[0154] In operation S630, the molecular feature vectors of pollutants are input into the primary prediction layer of the primary model to generate secondary prediction data corresponding to various pollutants. The secondary prediction data is used to characterize the root concentration factor prediction data of different root systems absorbing various pollutants in different soil environments.
[0155] According to embodiments of this disclosure, the prediction layer comprises two feedforward layers, such as... Figure 3As shown. Each feedforward layer contains a dropout layer and a fully connected layer. The dropout layer is a regularization technique used to prevent overfitting. Furthermore, to accurately predict the root concentration factor, operation S630 specifically includes:
[0156] The molecular feature vectors are input one by one into the prediction layer, passing through the first and second feedforward layers in sequence. In the fully connected layers, each node in the current layer is connected to all nodes in the previous layer. The input layer has 1202 nodes, the first fully connected layer (hidden layer) has 1000 nodes, and the second fully connected layer (output layer) has 1 node. The output of each layer uses the ReLU activation function to convert the linear features in the neural network into non-linear features. The last layer is the output layer, which outputs the predicted value of the corresponding pollutant root concentration factor.
[0157] In operation S640, based on the second prediction data and the second label, the second model parameters of the primary model are optimized to obtain the root concentration factor prediction model.
[0158] According to embodiments of this disclosure, the network parameters of the message-passing neural network model include model parameters and model hyperparameters. Specifically, the model hyperparameter combination is {hidden_size, depth, dropout, f_scale}, where hidden_size is the number of neurons in the hidden layer of the neural network model, used to control the complexity of the model; depth is the number of iterations in message passing, used to control the convergence of the algorithm; dropout is the random deactivation rate of neurons, used to prevent overfitting of the model; and f_scale is the scaling factor of the inter-atomic relation matrix.
[0159] Furthermore, to determine the optimal root concentration factor prediction model, the second dataset is divided into training, validation, and test sets proportionally. For example, it can be randomly divided into training, validation, and test sets in an 8:1:1 ratio. The training set is used to train the message-passing neural network model; the validation set is used for model hyperparameter search; and the test set is used to evaluate the model's prediction performance. The specific training process includes steps 31 to 34.
[0160] In step 31, based on preset values of a set of model hyperparameter combinations, the primary model is iteratively trained using root concentration factor data and root concentration factor prediction data from the training set. The parameters of the primary initialization layer, the primary molecular feature embedding layer, and the primary prediction layer in the primary model are optimized to obtain the process model. The model parameters in the process model can be considered as the optimal model parameters. Further optimization of the model hyperparameters is also required.
[0161] Further, in step 32, based on the process model, the process model is validated using validation set data, and the statistical parameters of the validation set output are calculated. These statistical parameters include Mean Squared Error (MSE), Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and Coefficient of Determination (R²). 2 At least one of the following.
[0162] In step 33, based on the automatic hyperparameter tuning algorithm, the preset values of the aforementioned model hyperparameter combinations are adjusted. Steps 31 and 32 are iterated repeatedly until the optimal statistical parameters are determined. The set of model hyperparameter combinations corresponding to the optimal statistical parameters is then determined as the optimal model hyperparameters. The automatic hyperparameter tuning algorithm is preferably a Bayesian optimization algorithm. One implementation method for determining the optimal statistical parameters is to select the statistical parameter with the smallest root mean square error (RMSE) in the validation set output as the optimal statistical parameter.
[0163] In step 34, the process model obtained based on the optimal model hyperparameters is determined as the root concentration factor prediction model.
[0164] According to the embodiments of this disclosure, since the model parameters of the root concentration factor prediction model have been trained in the above embodiments, namely the target initialization layer model parameters, the primary bond feature embedding layer model parameters, the primary atom feature embedding layer model parameters, the target molecule feature embedding layer model parameters, and the target prediction layer model parameters; further, in order to optimize the prediction results of the model, the hyperparameters of the model are optimized through steps 31 to 34 to further improve the accuracy of the model prediction.
[0165] For example, during training, the Adaptive Moment Estimation (Adam) method is used to update network parameters based on gradients. Each training iteration performs a maximum of 30 iterations, and the model from each iteration is used for predictions on the validation set. The root mean square error (RMSE) and coefficient of determination (R²) are calculated. 2 The parameter stores the model with the lowest RMSE value on the validation set.
[0166] To improve the model's generalization ability, Bayesian optimization was performed on the hyperparameters used. A preset set of model hyperparameters was set as {hidden_size, depth, dropout, f_scale}, where hidden_size ranges from 300 to 2000 with a step size of 100; depth ranges from 2 to 6 with a step size of 1; dropout ranges from 0.0 to 0.4 with a step size of 0.05; and f_scale ranges from 0.0 to 0.5 with a step size of 0.05. Using Bayesian search, the optimal hyperparameter combination was selected as {hidden_size: 900, depth: 4, dropout: 0.3, f_scale: 0.15}. For example, the optimal hyperparameter combination for the root concentration factor prediction model is {hidden_size: 1000, depth: 4, dropout: 0.3, f_scale: 0.15}.
[0167] According to the embodiments of this disclosure, when training the first training model using the first dataset and the first label, the method for obtaining the optimal hyperparameter combination is the same as in the above embodiments, and will not be repeated here.
[0168] According to embodiments of this disclosure, in order to better demonstrate the superiority of the root concentration factor prediction model established by this disclosure, the method of this disclosure is compared with the commonly used existing random forest (Decision Tree, DT) model. The results are shown in Table 1 below. Compared with traditional methods, the method of this disclosure can predict root concentration factor data of various chemicals on a large scale. Moreover, the optimal model trained on the same dataset has high RMSE and R-value on the test set. 2 The evaluation indicators are all superior to those of traditional methods.
[0169] Table 1
[0170]
[0171] According to embodiments of this disclosure, the process of applying the root concentration factor prediction method includes:
[0172] Obtain the SMILES codes of the pollutants to be predicted; and
[0173] The SMILES codes of the pollutant to be predicted are input into the root concentration factor prediction model to obtain the root concentration factor data of the pollutant to be predicted.
[0174] Specifically, root concentration factor data for multiple pollutants are downloaded, and the SMILES codes of these pollutants are directly input into the root concentration factor prediction model, outputting the root concentration factor prediction results. The specific execution process after inputting the SMILES codes of the pollutants into the root concentration factor prediction model is similar to the model construction process and will not be elaborated further here.
[0175] Based on the above-described method for establishing a root concentration factor prediction model, this disclosure also provides a training device for the root concentration factor prediction model. The following will combine... Figure 7 The device is described in detail.
[0176] Figure 7 A schematic block diagram of a training apparatus for a root concentration factor prediction model according to an embodiment of the present disclosure is shown.
[0177] like Figure 7 As shown, the training device 700 for the root concentration factor prediction model in this embodiment includes a first acquisition module 710, a first optimization module 720, a second acquisition module 730, and a second optimization module 740.
[0178] The first acquisition module 710 is used to acquire a first dataset and a first label for multiple compounds. The first dataset is a SMILES encoding used to describe the molecular structure of each compound, and the first label is used to characterize the retention time data of each compound in chromatography. In one embodiment, the first acquisition module 710 can be used to perform the operation S210 described above, which will not be repeated here.
[0179] The first optimization module 720 is used to optimize the first model parameters of the first trained model using the first dataset and the first label, to obtain a primary model containing the primary model parameters. In one embodiment, the first optimization module 720 can be used to perform the operation S220 described above, which will not be repeated here.
[0180] The second acquisition module 730 is used to acquire a second dataset and a second label for multiple pollutants. The second dataset consists of SMILES codes describing the molecular structure of each pollutant, and the second label represents root concentration factor data of each pollutant absorbed by plant roots in different soil environments. In one embodiment, the second acquisition module 730 can be used to perform the operation S230 described above, which will not be repeated here.
[0181] The second optimization module 740 is used to optimize the second model parameters of the primary model using the second dataset and the second label to obtain the root concentration factor prediction model. In one embodiment, the second optimization module 740 can be used to perform the operation S240 described above, which will not be repeated here.
[0182] According to embodiments of this disclosure, to address the lack of existing training sample data, a first acquisition module acquires existing large-scale samples (retention time data of compounds in chromatography), and a first optimization module pre-trains a primary model (message-passing neural network model) to obtain primary model parameters. Furthermore, since the diffusion process of pollutants from soil (aquatic environment) to plant roots has similar lipophilicity to the separation process of compounds in the chromatographic column, the retention time of compounds in chromatography is used to simulate the diffusion time of pollutants in plant roots. A second optimization module uses some of the trained primary model parameters (second model parameters) and employs small-scale samples (root concentration factors of different plant roots absorbing a certain pollutant under different soil conditions) to further train the primary model to obtain a root concentration factor prediction model. Based on the above method, by utilizing the correlation between datasets (shared lipophilicity) using a message-passing neural network model and transfer learning, parameter transfer from large-scale samples to small-scale samples is achieved, breaking the strict requirements of previous deep learning models regarding the amount of training data. This can further improve the accuracy of root concentration factor prediction results and avoid the problems of low model training accuracy and inaccurate prediction results caused by insufficient training samples (root concentration factors of different plant roots absorbing a certain pollutant under different soil conditions).
[0183] On the other hand, by using the SMILES encoding of the molecular structure of the compound as input to the model, the molecular characterization of the compound can be directly trained without using the molecular weight parameters calculated by quantum chemical calculation methods in traditional machine learning as molecular descriptors. This saves computation time and resources for molecular descriptors, reduces the requirements for computational chemistry in applications, and improves the overall performance of computer prediction and expands the prediction range.
[0184] According to embodiments of this disclosure, the first training model, the primary model, and the root concentration factor prediction model include: an initialization layer, a bond feature embedding layer, an atom feature embedding layer, a molecular feature embedding layer, and a prediction layer;
[0185] The primary model parameters include: primary initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters;
[0186] The parameters of the root concentration factor prediction model include: target initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, target molecule feature embedding layer model parameters, and target prediction layer model parameters.
[0187] According to embodiments of this disclosure, the second optimization module 740 includes a fixed submodule and a first optimization submodule.
[0188] The fixed submodule is used to fix the model parameters of the primary bond feature embedding layer and the primary atom feature embedding layer in the primary model.
[0189] The first optimization submodule is used to optimize the second model parameters of the primary model using the second dataset and the second label to obtain the root concentration factor prediction model. The second model parameters include: primary initialization layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters.
[0190] According to embodiments of this disclosure, the second optimization module 740 includes: a first generation submodule, an acquisition submodule, a second generation submodule, and a second optimization submodule.
[0191] The first generation submodule is used to input the SMILES codes of multiple pollutants into the primary initialization layer of the primary model to generate molecular diagrams, inter-atomic relation matrices and feature vectors composed of molecular descriptors for each pollutant.
[0192] The submodule is used to sequentially input the molecular diagram, the interatomic relation matrix, and the feature vector composed of molecular descriptors into the primary bond feature embedding layer, the primary atom feature embedding layer, and the primary molecular feature embedding layer of the primary model to obtain the molecular feature vector of the pollutant.
[0193] The second generation submodule is used to input the molecular feature vector of pollutants into the primary prediction layer of the primary model to generate the second prediction data corresponding to each of the various pollutants. The second prediction data is used to characterize the root concentration factor prediction data of different root systems absorbing various pollutants in different soil environments.
[0194] The second optimization submodule is used to optimize the second model parameters of the primary model based on the second prediction data and the second label, so as to obtain the root concentration factor prediction model.
[0195] According to embodiments of this disclosure, the first generation submodule includes: a first obtaining unit, a second obtaining unit, and a third obtaining unit.
[0196] The first obtaining unit is used to add node features for characterizing atomic feature information, edge features for characterizing bond feature information, and edge features for characterizing inter-atomic relationship feature information to the undirected graph according to the SMILES encoding of the pollutant, to obtain the molecular graph of the pollutant.
[0197] The second obtaining unit is used to establish an adjacency matrix representing the adjacency characteristics between atoms, a distance matrix representing the distance characteristics between atoms, and a Coulomb matrix representing the Coulomb characteristics between atoms, based on the SMILES encoding of the pollutants, to obtain the inter-atomic relationship matrix of the pollutants.
[0198] The third obtaining unit is used to generate a molecular feature vector based on the SMILES encoding of the pollutant and the molecular properties represented by the molecular descriptor, thereby obtaining the molecular descriptor feature vector of the pollutant.
[0199] According to embodiments of this disclosure, atomic characteristic information includes atom type, atom valence, atom formal charge, atom chirality, number of hydrogen atoms bonded to the atom, atom hybridization mode, atom aromaticity, and atom mass; bond characteristic information includes bond type, whether the bond is conjugated, whether the bond is on a ring, and bond stereoconfiguration information; interatomic relationship characteristic information includes whether corresponding atom pairs are bonded, the topological distance between corresponding atom pairs, and electrostatic interaction information between corresponding atom pairs.
[0200] According to embodiments of this disclosure, the molecular descriptor feature vector of pollutants includes a feature vector of plant root lipid content and a feature vector of soil organic matter content.
[0201] According to embodiments of this disclosure, the obtaining submodule includes: a generation unit, an extraction unit, a first connection unit, and a second connection unit.
[0202] The generation unit is used to generate an initial bond feature tensor based on the molecular diagram and the interatomic relationship matrix;
[0203] The extraction unit is used to input the initialization bond feature tensor into the bond feature embedding layer to extract the atomic-level bond feature tensor of pollutants;
[0204] The first connection unit is used to input the atomic-level bond feature tensor into the primary atomic feature embedding layer of the primary model, and connect the atomic-level bond feature tensor with the atomic features of the pollutants to obtain the atomic feature tensor of the pollutants.
[0205] The second connection unit is used to input the atomic feature tensor into the primary molecular feature embedding layer of the primary model, and connect the atomic feature tensor with the molecular descriptor feature vector to obtain the molecular feature vector of the pollutant.
[0206] According to embodiments of this disclosure, any plurality of modules among the first acquisition module 710, the first optimization module 720, the second acquisition module 730, and the second optimization module 740 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the first acquisition module 710, the first optimization module 720, the second acquisition module 730, and the second optimization module 740 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the first acquisition module 710, the first optimization module 720, the second acquisition module 730, and the second optimization module 740 may be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is run.
[0207] The embodiments of this disclosure have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of this disclosure. Although various embodiments have been described above, this does not mean that the measures in the various embodiments cannot be used advantageously in combination. The scope of this disclosure is defined by the appended claims and their equivalents. Various substitutions and modifications can be made by those skilled in the art without departing from the scope of this disclosure, and all such substitutions and modifications should fall within the scope of this disclosure.
Claims
1. A method for establishing a root concentration factor prediction model, comprising: A first dataset and a first label for a variety of compounds are obtained, wherein the first dataset is SMILES encoding used to describe the molecular structure of each compound, and the first label is used to characterize the retention time data of each compound in chromatography; Using the first dataset and the first label, the first model parameters of the first training model are optimized to obtain a primary model containing primary model parameters; A second dataset and a second label for multiple pollutants are obtained, wherein the second dataset is SMILES encoding used to describe the molecular structure of each pollutant, and the second label is used to characterize the root concentration factor data of each pollutant absorbed by the roots of multiple plants in different soil environments. Using the second dataset and the second label, the second model parameters of the primary model are optimized to obtain the root concentration factor prediction model; The first training model, the primary model, and the root concentration factor prediction model include: an initialization layer, a bond feature embedding layer, an atom feature embedding layer, a molecular feature embedding layer, and a prediction layer. The primary model parameters include: primary initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters; The root concentration factor prediction model parameters include: target initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, target molecule feature embedding layer model parameters, and target prediction layer model parameters; Using the second dataset and the second label, the second model parameters of the primary model are optimized to obtain a root concentration factor prediction model, including: The SMILES codes of the various pollutants are input into the primary initialization layer of the primary model to generate molecular diagrams, interatomic relation matrices, and feature vectors composed of molecular descriptors for each pollutant. The molecular diagram, the interatomic relation matrix, and the feature vector composed of molecular descriptors are sequentially input into the primary bond feature embedding layer, the primary atom feature embedding layer, and the primary molecular feature embedding layer of the primary model to obtain the molecular feature vector of the pollutant. The molecular feature vectors of the pollutants are input into the primary prediction layer of the primary model to generate second prediction data corresponding to each of the multiple pollutants. The second prediction data is used to characterize the root concentration factor prediction data of different plant roots absorbing various pollutants in different soil environments. Based on the second prediction data and the second label, the second model parameters of the primary model are optimized to obtain the root concentration factor prediction model.
2. The method for establishing according to claim 1, wherein, Using the second dataset and the second label, the second model parameters of the primary model are optimized to obtain a root concentration factor prediction model, including: Fix the primary bond feature embedding layer model parameters and the primary atom feature embedding layer model parameters in the primary model; Using the second dataset and the second label, the second model parameters of the primary model are optimized to obtain the root concentration factor prediction model, wherein the second model parameters include: primary initialization layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters.
3. The method for establishing according to claim 1, wherein, The SMILES codes of the various pollutants are input into the primary initialization layer of the primary model to generate molecular diagrams, interatomic relation matrices, and feature vectors composed of molecular descriptors for each pollutant, including: Based on the SMILES encoding of the pollutant, node features for characterizing atomic features and edge features for characterizing bond features are added to the undirected graph to obtain the molecular graph of the pollutant. Based on the SMILES encoding of the pollutant, an adjacency matrix representing the adjacency characteristics between atoms, a distance matrix representing the distance characteristics between atoms, and a Coulomb matrix representing the Coulomb characteristics between atoms are established respectively, thereby obtaining the inter-atomic relationship matrix of the pollutant. Based on the SMILES encoding of the pollutant, a molecular feature vector is generated according to the molecular properties characterized by the molecular descriptor, thus obtaining the molecular descriptor feature vector of the pollutant.
4. The method for establishing according to claim 3, wherein, The atomic characteristic information includes atomic type, atomic valence, atomic form charge, atomic chirality, number of hydrogen atoms bonded to the atom, atomic hybridization mode, atomic aromaticity, and atomic mass; The key feature information includes the type of key, whether the key is conjugated, whether the key is on a ring, and the three-dimensional configuration information of the key; The interatomic relationship feature information includes whether corresponding atomic pairs are bonded, the topological distance between corresponding atomic pairs, and the electrostatic interaction information between corresponding atomic pairs.
5. The method for establishing according to claim 3 or 4, wherein, The molecular descriptor feature vector of the pollutant includes the feature vector of plant root lipid content and the feature vector of soil organic matter content.
6. The method of establishing according to any one of claims 5, wherein, The molecular diagram, the interatomic relation matrix, and the feature vector composed of molecular descriptors are sequentially input into the primary bond feature embedding layer, the primary atom feature embedding layer, and the primary molecular feature embedding layer of the primary model to obtain the molecular feature vector of the pollutant, including: Based on the molecular diagram and the interatomic relation matrix, an initialization bond feature tensor is generated; The initialization bond feature tensor is input into the bond feature embedding layer to extract the atomic-level bond feature tensor of the pollutant; The atomic-level bond feature tensor is input into the primary atomic feature embedding layer of the primary model, and the atomic-level bond feature tensor is connected with the atomic features of the pollutant to obtain the atomic feature tensor of the pollutant. The atomic feature tensor is input into the primary molecular feature embedding layer of the primary model, and the atomic feature tensor is concatenated with the molecular descriptor feature vector to obtain the molecular feature vector of the pollutant.
7. A training device for a root concentration factor prediction model, comprising: The first acquisition module is used to acquire a first dataset and a first label for a variety of compounds, wherein the first dataset is a SMILES code used to describe the molecular structure of each compound, and the first label is used to characterize the retention time data of each compound in chromatography. The first optimization module is used to optimize the first model parameters of the first training model using the first dataset and the first label to obtain a primary model containing primary model parameters. The second acquisition module is used to acquire a second dataset and a second label for multiple pollutants. The second dataset is SMILES encoding used to describe the molecular structure of each pollutant, and the second label is used to characterize the root concentration factor data of each pollutant absorbed by the roots of multiple plants in different soil environments. The second optimization module is used to optimize the second model parameters of the primary model using the second dataset and the second label to obtain the root concentration factor prediction model. The first training model, the primary model, and the root concentration factor prediction model include: an initialization layer, a bond feature embedding layer, an atom feature embedding layer, a molecular feature embedding layer, and a prediction layer. The primary model parameters include: primary initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, primary molecular feature embedding layer model parameters, and primary prediction layer model parameters; The root concentration factor prediction model parameters include: target initialization layer model parameters, primary bond feature embedding layer model parameters, primary atom feature embedding layer model parameters, target molecule feature embedding layer model parameters, and target prediction layer model parameters; Using the second dataset and the second label, the second model parameters of the primary model are optimized to obtain a root concentration factor prediction model, including: The SMILES codes of the various pollutants are input into the primary initialization layer of the primary model to generate molecular diagrams, interatomic relation matrices, and feature vectors composed of molecular descriptors for each pollutant. The molecular diagram, the interatomic relation matrix, and the feature vector composed of molecular descriptors are sequentially input into the primary bond feature embedding layer, the primary atom feature embedding layer, and the primary molecular feature embedding layer of the primary model to obtain the molecular feature vector of the pollutant. The molecular feature vectors of the pollutants are input into the primary prediction layer of the primary model to generate second prediction data corresponding to each of the multiple pollutants. The second prediction data is used to characterize the root concentration factor prediction data of different plant roots absorbing various pollutants in different soil environments. Based on the second prediction data and the second label, the second model parameters of the primary model are optimized to obtain the root concentration factor prediction model.
8. A method for predicting root concentration factors, comprising: Obtain the SMILES codes of the pollutants to be predicted; The SMILES code of the pollutant to be predicted is input into the root concentration factor prediction model to obtain the root concentration factor data of the pollutant to be predicted, wherein the root concentration factor prediction model is obtained by the establishment method according to any one of claims 1 to 6.