Method for establishing a prediction model for subchronic toxicity of chemicals and prediction method

By constructing a chemical subchronic toxicity prediction model based on a random forest model, and utilizing SMILES encoding and PubChem molecular fingerprinting, the problems of inaccurate toxicity prediction and high cost in traditional methods are solved, and a rapid and reliable subchronic toxicity assessment is achieved.

CN116153432BActive Publication Date: 2026-07-07RES CENT FOR ECO ENVIRONMENTAL SCI THE CHINESE ACAD OF SCI

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
2023-01-18
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing technologies are insufficient for rapidly and accurately assessing the subchronic toxicity of chemicals. Traditional QSAR models rely on expert experience and are ineffective in predicting complex toxicities with multiple mechanisms. Animal experiments are time-consuming and costly.

Method used

A chemical subchronic toxicity prediction model was constructed by combining a random forest model with SMILES encoding and PubChem molecular fingerprinting. Hyperparameters were optimized through cross-validation to achieve rapid and reliable toxicity prediction.

Benefits of technology

It can quickly and accurately predict the subchronic toxicity of chemicals without requiring expert experience, reducing time and labor costs and improving the reliability and coverage of predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116153432B_ABST
    Figure CN116153432B_ABST
Patent Text Reader

Abstract

The application provides a method for establishing a chemical subchronic toxicity prediction model, a prediction method and an electronic device. The method comprises the following steps: obtaining a chemical sample data set corresponding to subchronic toxicity with a known unobserved harmful effect level value, wherein the chemical sample data set comprises SMILES encoding of the chemical; converting the SMILES encoding to obtain a chemical sample data set with an NxF digital matrix; constructing a random forest model according to the chemical sample data set with the NxF digital matrix, and performing cross-validation on the random forest model to obtain an optimal chemical subchronic toxicity prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of chemical environmental health risk assessment and food safety evaluation technology, specifically to a method for establishing a chemical subchronic toxicity prediction model, a prediction method, and an electronic device. Background Technology

[0002] Food additives, plastic packaging materials, various daily necessities, cosmetics, pesticides, and other consumer and industrial products are indispensable parts of our daily lives and industrial and agricultural production, and their use often lasts a lifetime. During the production, transportation, and use of these products, large amounts of chemicals are intentionally or unintentionally introduced, and the resulting environmental safety and health problems are now no longer to be ignored.

[0003] It is widely accepted that chemical pollution poses health risks, and most highly toxic chemicals that can cause fatal harm within a short period have been widely banned. However, a large number of chemicals with unknown toxicity remain in the long-term exposure range for humans. Assessing the health risks posed by prolonged exposure to chemicals is one of the core issues currently facing chemical risk assessment. Chronic and subchronic toxicity are important toxicological bases for assessing the risks of long-term chemical exposure.

[0004] Chronic toxicity assessments have a longer timeframe (over one year), while subchronic toxicity studies have a relatively shorter timeframe (typically 80-100 days). Although chronic toxicity exposure lasts longer, the excessively long experimental period not only imposes significant financial burdens but also raises many scientific questions, such as confounding factors introduced by accidental ingestion, aging, or illness in laboratory animals. Therefore, chronic toxicity carries considerable uncertainty. In contrast, subchronic toxicity studies, within their experimental period, are sufficient to demonstrate the toxic effects and trends resulting from long-term chemical exposure, while also having fewer confounding factors, leading to more reliable experimental results.

[0005] Currently, there are two main ways to test the subchronic toxicity of chemicals: one is based on animal experiments. However, since animal experiments usually take 80-100 days, the number of chemicals is increasing at an extremely rapid pace, with thousands added every day. The total amount of subchronic toxicity data is even less than the number of new chemicals added every day, which undoubtedly puts great pressure on chemical risk assessment and control.

[0006] Another approach employs the Quantitative Structure-Activity Relationship (QSAR) method. This computational method establishes the correlation between chemical structure and activity, and can be used for rapid prediction and initial screening of chemicals lacking toxicity data. However, traditional QSAR models rely on pre-calculated or custom molecular descriptors. A large input of descriptors can lead to model overfitting, necessitating the selection of descriptors with strong correlations based on experience and expertise. Furthermore, traditional QSAR algorithms, such as multiple linear regression, typically perform well in datasets of compounds with similar structures. However, when dealing with dissimilar chemicals and toxicity endpoints with complex mechanisms of action, the lack of a linear correspondence between chemical structure and the toxicity endpoint makes such QSAR methods difficult to achieve satisfactory prediction results. Therefore, traditional QSAR methods fall short in addressing the problem of predicting subchronic toxicity. Summary of the Invention

[0007] In view of this, the present invention provides a method for establishing a chemical subchronic toxicity prediction model, a prediction method, and an electronic backing, in order to at least partially solve one of the above-mentioned technical problems.

[0008] To achieve the above objectives, the present invention provides a method for establishing a chemical subchronic toxicity prediction model, comprising: obtaining a chemical sample dataset corresponding to known subchronic toxicity with a level of no observed harmful effects, wherein the chemical sample dataset includes the SMILES codes of the chemicals; converting the SMILES codes to obtain a chemical sample dataset with an N×F numerical matrix; constructing a random forest model based on the chemical sample dataset with the N×F numerical matrix, and performing cross-validation on the random forest model to obtain the optimal chemical subchronic toxicity prediction model.

[0009] According to an embodiment of the present invention, obtaining a chemical sample dataset corresponding to known subchronic toxicity with no observed harmful effects includes: obtaining an original dataset of chemicals corresponding to known subchronic toxicity with no observed harmful effects, the original dataset including chemical CAS numbers and SMILES codes; preprocessing the original chemical dataset to obtain a preprocessed original dataset; comparing and analyzing the preprocessed original dataset based on the chemical CAS numbers and SMILES codes included in the original dataset to obtain analysis results; and determining the chemical sample dataset corresponding to known subchronic toxicity with no observed harmful effects based on the analysis results.

[0010] According to an embodiment of the present invention, converting SMILES codes to obtain a chemical sample dataset with an N×F numerical matrix includes: determining the PubChem molecular fingerprint of the chemical corresponding to the SMILES code based on the SMILES code; and obtaining the chemical with an N×F numerical matrix based on the PubChem molecular fingerprint.

[0011] According to an embodiment of the present invention, constructing a random forest model based on a chemical sample dataset with an N×F numerical matrix and performing cross-validation on the random forest model to obtain an optimal chemical subchronic toxicity prediction model includes: dividing the chemical sample dataset with an N×F numerical matrix into a training set and a test set according to a preset ratio, and using the chemical sample dataset with an N×F numerical matrix as input to construct a random forest model; training the random forest model using the training set, optimizing the hyperparameters of the random forest model, and determining the optimal hyperparameters; and testing the random forest model under the optimal hyperparameters using the test set to obtain the optimal chemical subchronic toxicity prediction model.

[0012] According to an embodiment of the present invention, the hyperparameters include: the number of trees (n_estimators), the maximum number of features considered during partitioning (max_features), the maximum depth of the tree (max_depth), the minimum number of samples required for further partitioning of internal nodes (min_samples_split), and the minimum number of samples required for leaf nodes (min_samples_leaf).

[0013] According to an embodiment of the present invention, training a random forest model using a training set, optimizing the hyperparameters of the random forest model, and determining the optimal combination of hyperparameters include:

[0014] The parameter range of hyperparameters is preset; the random forest model is trained cyclically based on the hyperparameters within the parameter range and the training set to determine the optimal combination of hyperparameters.

[0015] According to an embodiment of the present invention, the process of cyclically training a random forest model based on hyperparameters within a parameter range and a training set to determine the optimal hyperparameters includes: for hyperparameters within a parameter range, training a random forest model based on the training set through an inner loop in cross-validation to obtain the performance evaluation index to be verified corresponding to each hyperparameter in the parameter range; and analyzing the performance evaluation index to be verified using the area under the receiver operating characteristic curve to determine the optimal hyperparameters.

[0016] Another aspect of the present invention provides a method for predicting the subchronic toxicity of chemicals, comprising: acquiring a dataset of a target chemical to be predicted, the dataset including the SMILES code of the target chemical; converting the SMILES code to obtain a dataset of the target chemical to be predicted having an N×F numerical matrix; inputting the dataset of the target chemical to be predicted having an N×F numerical matrix into a chemical subchronic toxicity prediction model to obtain a predicted value of the chemical subchronic toxicity; wherein, the chemical subchronic toxicity prediction model is obtained by the above-described method.

[0017] According to an embodiment of the present invention, before obtaining the dataset of the target chemical to be predicted, the method further includes: determining the Euclidean distance between the centroid of each chemical in the dataset of the target chemical and the chemical data in the training set; and determining the target chemical as the chemical to be predicted if the Euclidean distance meets a preset threshold condition.

[0018] In another aspect, the present invention provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform any of the methods described above.

[0019] According to embodiments of the present invention, a chemical sample dataset containing SMILES codes corresponding to known subchronic toxicity levels with no observed harmful effects is obtained. The SMILES coding is then used to obtain a chemical sample dataset with an N×F numerical matrix. A random forest model is constructed based on this chemical sample dataset with the N×F numerical matrix, and the random forest model is cross-validated to obtain the optimal chemical subchronic toxicity prediction model. This solves the technical problems of requiring specialized background knowledge, interference from human factors, and long animal experiment cycles. It achieves rapid prediction of chemical subchronic toxicity without the need for manual definition and selection of descriptors based on expert experience and domain knowledge, saving time and labor costs, and overcoming the shortcomings of traditional prediction methods in accurately predicting subchronic toxicity effects. Attached Figure Description

[0020] Figure 1 A flowchart illustrating a method for establishing a chemical subchronic toxicity prediction model according to an embodiment of the present invention is shown.

[0021] Figure 2 A flowchart illustrating a method for predicting the subchronic toxicity of chemicals according to an embodiment of the present invention is shown schematically.

[0022] Figure 3 The diagram illustrates the conversion of N-butylbenzenesulfonamide chemicals into PubChem molecular fingerprints according to Example 2 of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0024] Currently, various chemicals have been detected in different environmental media and in animals in different regions. Long-term, direct or indirect exposure to these chemicals through inhalation or repeated skin contact may cause damage to the functions of cells, organs, and tissues. Related studies indicate that subchronic toxicity, as one of the most important toxicological endpoints in assessing the long-term toxic effects of chemical exposure, is a key toxicological reference for the control and setting of limits for chemicals in food, consumer products, and industrial products.

[0025] Currently, the contradiction between the rapidly increasing number of chemicals and the limited subchronic toxicity doses caused by the long assessment cycle and high testing costs of subchronic toxicity is a key scientific problem that plagues chemical risk assessment. Traditional QSAR methods require manual screening or custom molecular descriptors based on expert experience and chemical background. The algorithms are simple but not suitable for predicting complex toxic effects with multiple mechanisms such as subchronic toxicity.

[0026] Based on this, the present invention provides a method for establishing a chemical subchronic toxicity prediction model and a prediction method, which can achieve rapid, efficient and reliable prediction of the subchronic toxicity of chemicals within the application domain of the prediction model, without consuming too much time, resources and manpower, and at the same time reducing the requirements for professional knowledge in related fields during the application process.

[0027] Figure 1 A flowchart illustrating a method for establishing a chemical subchronic toxicity prediction model according to an embodiment of the present invention is shown.

[0028] like Figure 1 As shown, the method includes operations S110 to S130.

[0029] In operation S110, a chemical sample dataset corresponding to known subchronic toxicity with no observed harmful effects is obtained. The chemical sample dataset includes the SMILES codes of the chemicals.

[0030] According to embodiments of the present invention, the No Observed Adverse Effect Level (NOAEL) value can be understood as a value indicating that no adverse effect level of the chemical's subchronic toxicity has been observed, or it can be understood as a value indicating that the chemical's subchronic toxicity has no significant damaging effect.

[0031] According to embodiments of the present invention, the acquired chemical sample dataset corresponding to known subchronic toxicity with no observed harmful effects may include sample data of a variety of chemicals, and the acquired chemical sample dataset may, for example, come from literature or publicly available databases.

[0032] According to an embodiment of the present invention, the SMILES encoding of a chemical can be a specification that explicitly describes the molecular structure of the chemical using ASCII strings.

[0033] In operation S120, the SMILES encoding is converted to obtain a chemical sample dataset with an N×F numerical matrix.

[0034] According to an embodiment of the present invention, converting SMILES codes to obtain a chemical sample dataset with an N×F numerical matrix may include: determining the PubChem molecular fingerprint of the chemical corresponding to the SMILES code based on the SMILES code; and obtaining the chemical with an N×F numerical matrix based on the PubChem molecular fingerprint.

[0035] According to an embodiment of the present invention, the molecules represented by the SMILES codes of chemicals are converted into files of the corresponding format (e.g., .mol ​​files). The molecules of each chemical in the converted files are calculated to obtain the PubChem molecular fingerprint corresponding to each chemical. The PubChem molecular fingerprint corresponding to each chemical can be represented as a binary vector of a certain length (e.g., the length can be F), where 1 can indicate that the chemical contains the corresponding fingerprint information, and 0 can indicate that the chemical does not contain the corresponding fingerprint information.

[0036] According to an embodiment of the present invention, the chemical substances in the chemical sample data cover a total of N characters. Based on a binary vector of a certain length of the PubChem molecular fingerprint corresponding to each chemical substance, an N×F digital matrix can be obtained.

[0037] According to embodiments of the present invention, high-risk warning substructures can be identified through PubChem molecular fingerprinting, which helps to quickly identify highly toxic chemicals with subchronic toxicity and provides guidance on their possible toxicity mechanisms.

[0038] In operation S130, a random forest model is constructed based on a chemical sample dataset with an N×F numerical matrix, and the random forest model is cross-validated to obtain the optimal chemical subchronic toxicity prediction model.

[0039] According to an embodiment of the present invention, operation S130 may include: dividing a chemical sample dataset with an N×F numerical matrix into a training set and a test set according to a preset ratio, and using the chemical sample dataset with an N×F numerical matrix as input to construct a random forest model; training the random forest model using the training set, optimizing the hyperparameters of the random forest model, and determining the optimal hyperparameters; and testing the random forest model with the optimal hyperparameters using the test set to obtain the optimal chemical subchronic toxicity prediction model.

[0040] According to embodiments of the present invention, the chemical sample dataset can be divided into a training set and a test set, with a preset ratio such as 7:3, 3:2, or 4:1. A certain proportion of the training set can be selected for training the prediction model to optimize its hyperparameters and determine the optimal hyperparameters. The optimal hyperparameters are then used to determine the best prediction model.

[0041] According to an embodiment of the present invention, a certain proportion of the test set can be selected to evaluate the external predictive ability of the optimal prediction model, and the optimal chemical subchronic toxicity prediction model can be determined by combining various evaluation indicators of the training set and the test set.

[0042] According to embodiments of the present invention, a chemical sample dataset containing SMILES codes corresponding to known subchronic toxicity levels with no observed harmful effects is obtained. The SMILES coding is then used to obtain a chemical sample dataset with an N×F numerical matrix. A random forest model is constructed based on this chemical sample dataset with the N×F numerical matrix, and the random forest model is cross-validated to obtain the optimal chemical subchronic toxicity prediction model. This solves the technical problems of requiring specialized background knowledge, interference from human factors, and long animal experiment cycles. It achieves rapid prediction of chemical subchronic toxicity without the need for manual definition and selection of descriptors based on expert experience and domain knowledge, saving time and labor costs, and overcoming the shortcomings of traditional prediction methods in accurately predicting subchronic toxicity effects.

[0043] According to an embodiment of the present invention, obtaining a chemical sample dataset corresponding to known subchronic toxicity with no observed harmful effects may include: obtaining a raw dataset of chemicals corresponding to known subchronic toxicity with no observed harmful effects, the raw dataset including the chemical CAS number and SMILES code; preprocessing the raw chemical dataset to obtain a preprocessed raw dataset; comparing and analyzing the preprocessed raw dataset based on the chemical CAS number and SMILES code included in the raw dataset to obtain analysis results; and determining the chemical sample dataset corresponding to known subchronic toxicity with no observed harmful effects based on the analysis results.

[0044] According to an embodiment of the present invention, the chemical data can be preprocessed based on the original chemical data with NOAEL values ​​collected from the eChemPortal chemical database. This preprocessing may include removing inorganic substances, organometallic substances, mixtures, salts, polymer data, and compounds with a relative molecular mass greater than 800 from the chemical data.

[0045] According to an embodiment of the present invention, the obtained chemical data with NOAEL values ​​includes a CAS number and SMILES code corresponding to each chemical. Since each chemical corresponds to a unique CAS number and SMILES code, duplicate chemicals can be removed by analyzing the unique CAS number and SMILES code corresponding to each chemical, thereby obtaining the original chemical data with NOAEL values ​​that are required.

[0046] According to an embodiment of the present invention, subchronic toxicity animal experimental data are obtained from the ECHA REACH database by acquiring the required raw data of chemicals with NOAEL values.

[0047] According to embodiments of the present invention, the experimental conditions for animal experimental data can meet the following requirements: animal experiments (e.g., rat experiments) with an exposure time of 80-100 days are selected; the exposure route is uniformly oral inhalation; the experimental procedure follows certain standards, such as EPA OPP 82-1, EPA OPPTS 870.3100, EPA OPPTS 870.8700, EPA OTS 795.2600, EPA OTS 798.2650, EU Method B.26, or OECD Guideline 408; and the subchronic toxicity endpoint is the NOAEL value. For chemicals whose NOAEL values ​​are not explicitly given in the removal experiments, and for chemicals not exposed orally in rats, for those with reported NOAEL values, it is necessary to ensure that the experiment has three or more concentration gradients and parallel experiments. When a compound has multiple NOAEL values, the minimum value is conservatively selected as the final NOAEL value.

[0048] According to embodiments of the present invention, the original data of chemicals with NOAEL values ​​that ultimately meet the above-mentioned animal experimental data are used as chemical sample data. According to relevant regulations on the classification, labeling, and packaging of substances and mixtures, chemicals with NOAEL values ​​greater than 100 mg / kg bw / day are classified as low-toxicity (subchronic toxicity), and chemicals with NOAEL values ​​less than or equal to 100 mg / kg bw / day are classified as high-toxicity (subchronic toxicity).

[0049] According to an embodiment of the present invention, a random forest model is trained using a training set, the hyperparameters of the random forest model are optimized, and the optimal combination of hyperparameters is determined, including: presetting the parameter range of the hyperparameters; and iteratively training the random forest model based on the hyperparameters in the parameter range and the training set to determine the optimal combination of hyperparameters.

[0050] According to an embodiment of the present invention, the hyperparameters may include: the number of trees (n_estimators), the maximum number of features considered during partitioning (max features), the maximum depth of the tree (max_depth), the minimum number of samples required for further partitioning of internal nodes (min_samples_split), and the minimum number of samples required for leaf nodes (min_samples_leaf).

[0051] According to an embodiment of the present invention, a range [A] can be preset for the hyperparameter to be adjusted. min B max The step size is X. The random forest model is trained using a grid search within the inner loop of cross-validation based on the training set data.

[0052] According to an embodiment of the present invention, the optimal hyperparameters are determined by iteratively training a random forest model based on hyperparameters within a parameter range and a training set. This includes: for hyperparameters within a parameter range, training a random forest model through an inner loop in cross-validation based on the training set to obtain the performance evaluation index to be verified corresponding to each hyperparameter in the parameter range; and analyzing the performance evaluation index to be verified using the area under the receiver operating characteristic curve to determine the optimal hyperparameters.

[0053] According to an embodiment of the present invention, the performance evaluation metric to be verified can reflect the model performance of the random forest model. Each hyperparameter in each parameter range corresponds to a performance evaluation metric to be verified.

[0054] According to an embodiment of the present invention, the model performance evaluation method is set as the area under the receiver operating curve (ROC curve) (AUC value). For each parameter range, the parameter corresponding to the highest AUC value is selected as the optimal hyperparameter.

[0055] According to embodiments of the present invention, the model with optimal hyperparameters can also be evaluated through the outer loop of cross-validation. The model evaluation metrics may include: classification accuracy (CA), sensitivity (SE), specificity (SP), precision (PE), and F1-score. The calculation formulas are as follows:

[0056] CA=(TP+TN) / (TP+TN+FP+FN) (1)

[0057] SE=TP / (TP+FN) (2)

[0058] SP=TN / (TN+FP) (3)

[0059] PE = TP / (TP + FP) (4)

[0060] F1-Score=2*(PE*SE) / (PE+SE) (5)

[0061] Among them, True Positive (TP) represents the number of correctly predicted positive samples, True Negative (TN) represents the number of correctly predicted negative samples, False Positive (FP) represents the number of incorrectly predicted negative samples, and False Negative (FN) represents the number of incorrectly predicted positive samples.

[0062] According to an embodiment of the present invention, the optimal hyperparameters of the random forest model are determined by using the various performance evaluation metrics obtained after the above cross-validation.

[0063] Based on the above-mentioned method for establishing a chemical subchronic toxicity prediction model, the present invention also provides a method for predicting the subchronic toxicity of chemicals, the prediction model of which can be obtained by the above-mentioned method for establishing a chemical subchronic toxicity prediction model.

[0064] Figure 2 A flowchart illustrating a method for predicting the subchronic toxicity of chemicals according to an embodiment of the present invention is shown.

[0065] like Figure 2 As shown, the method includes operations S210 to S230.

[0066] In operation S210, a dataset of the target chemical to be predicted is obtained, which includes the SMILES codes of the target chemical.

[0067] In operation S220, the SMILES encoding is converted to obtain a dataset of the target chemicals to be predicted, which has an N×F numerical matrix.

[0068] In operation S230, the target chemical dataset with an N×F numerical matrix is ​​input into the chemical subchronic toxicity prediction model to obtain the predicted value of the chemical subchronic toxicity.

[0069] According to embodiments of the present invention, chemical subchronic toxicity prediction models typically have a certain application domain. For compounds outside the application domain of such models, the prediction results may contain significant errors and be unreliable. For chemicals with unknown toxicity data, before predicting their potential health risks, it is necessary to determine whether the chemical falls within the application domain of the aforementioned chemical subchronic toxicity prediction model based on structural similarity. Only chemicals within the application domain can yield reliable subchronic toxicity prediction results.

[0070] According to an embodiment of the present invention, before obtaining the dataset of the target chemical to be predicted, the method further includes: determining the Euclidean distance between the centroid of each chemical in the dataset of the target chemical and the chemical data in the training set; and determining the chemical to be predicted as the target chemical if the Euclidean distance meets a preset threshold condition.

[0071] According to an embodiment of the present invention, the arithmetic mean of the training set can be calculated by determining a chemical in the training set as the centroid, calculating the Euclidean distance d from each chemical in the training set to the centroid, and then calculating the arithmetic mean of the training set using the Euclidean distance. Then, by setting thresholds for five different strategies related to Euclidean distance, specifically: the first threshold is set to the maximum distance d. max The second threshold is set as the arithmetic mean. 2 times, that is The third threshold is set as the arithmetic mean. 3 times, that is The fourth threshold is set at the 95th percentile (p95); the fifth threshold is set at the arithmetic mean. And standard deviation σ, combined with the formula The calculated value is given by z, where z is the adjustment coefficient.

[0072] For a dataset of chemicals to be predicted, the Euclidean distance d′ from each chemical in the dataset to its centroid can be calculated. If the Euclidean distance d′ is less than or equal to the smallest of the five defined thresholds mentioned above, then the chemical to be predicted corresponding to the Euclidean distance d′ is within the application domain of the prediction model, and the chemical to be predicted that meets the condition is the target chemical to be predicted. Conversely, if the preset threshold condition that the Euclidean distance d′ is less than or equal to the smallest of the five defined thresholds is not met, then the chemical to be predicted is not within the application domain of the prediction model.

[0073] According to an embodiment of the present invention, the data of the digital matrix corresponding to the target chemical to be predicted that meets the preset threshold conditions is input into the chemical subchronic toxicity prediction model to obtain the subchronic toxicity prediction category label. If the prediction label is 1, it indicates that the subchronic toxicity of the chemical is high; if the prediction label is 0, it indicates that the subchronic toxicity of the chemical is low.

[0074] To provide a clearer understanding of the technical content of this invention, the technical solution of this invention will be further described below with reference to embodiments and accompanying drawings. It should be noted that the following embodiments are merely illustrative and not intended to limit the scope of this invention.

[0075] Example 1

[0076] This embodiment uses multiple machine learning methods to verify the superiority of the RF-PubChem model over other machine learning models. The specific method includes the following steps:

[0077] (1) Data collection and preprocessing:

[0078] The data collection and preprocessing process is as follows: Figure 1 As shown, inorganic substances, organometallic compounds, mixtures, salts, polymers, and compounds with a relative molecular mass greater than 800 were removed from the chemical list downloaded from the eChemPortal database. Duplicate chemicals were removed by analyzing the CAS and SMILES of all compounds. Then, subchronic toxicity experimental data for the remaining compounds were obtained from the ECHAREACH database. To ensure a high-quality dataset, studies with rat exposure periods of 80-100 days were selected, with oral exposure as the sole route of exposure. The experimental procedures followed specified standards (such as EPA OPP 82-1, EPA OPPTS 870.3100, EPA OPPTS 870.8700, EPA OTS 795.2600, EPA OTS 798.2650, EU Method B.26, or OECD Guideline 408). The subchronic toxicity endpoint was the NOAEL value.

[0079] Chemicals without clearly defined NOAEL values ​​and those not exposed orally in rats were removed. For chemicals with reported NOAEL values, it was ensured that the experimental setup included three or more concentration gradients and that parallel experiments existed. When a compound had multiple NOAEL values, the lowest value was conservatively selected as the final NOAEL value. According to European Parliament and Council Regulation 1272 / 2008 concerning the classification, labeling and packaging of substances and mixtures, chemicals with NOAEL values ​​greater than 100 mg / kg bw / day were classified as low toxicity, and those less than or equal to 100 mg / kg bw / day were classified as high toxicity. After the above processing, the final dataset contained 506 chemicals, of which 258 were high toxicity and 248 were low toxicity.

[0080] (2) Chemical structure converted into a digital matrix:

[0081] The SMILES algorithm reads molecules based on chemicals and converts them into .mol ​​files. Then, it calculates the corresponding molecular fingerprints (PubChemFP, MACCSFP, ExtFP, SubFP, and ECFP6) to obtain a corresponding digital matrix. Each chemical's fingerprint is represented as a binary vector of a certain length, where 1 indicates that the chemical contains this fingerprint information, and 0 indicates that it does not.

[0082] (3) Model building and hyperparameter search:

[0083] From 506 chemicals, 96 were randomly selected as the test set to evaluate the model's generalization ability, while the remaining 410 chemicals were used as the training set for model construction. To demonstrate the model's superiority, we compared the PubChem fingerprint with MACCS fingerprint, CDKExtended fingerprint (ExtFP), Substructure fingerprint (SubFP), and Extended Connection fingerprint with a maximum diameter of 6 (ECFP6). The inputs to PubChem, MACCS, ExtFP, SubFP, and ECFP6 in the training set were numerical matrices of sizes 410×881, 410×166, 410×1024, 410×307, and 410×2048, respectively. To further demonstrate the superiority of the Random Forest machine learning method, we also compared it with four other machine learning methods: Support Vector Machine (SVM), Logistic Regression (LR), k-Nearest Neighbors (kNN), and Naive Bayes. Bayes, NB).

[0084] By combining the five fingerprints with five different machine learning methods, 25 subchronic toxicity classification and prediction models were constructed. Optimal hyperparameters were searched for each model. A grid search within the nested cross-validation inner loop was used to obtain the area under the receiver operating curve (ROC) for different parameters. The parameter with the highest AUC value was selected as the optimal hyperparameter. Simultaneously, the model performance under the optimal hyperparameters was evaluated based on the outer loop.

[0085] When training a random forest model, the hyperparameters (number of trees n_estimators, maximum number of features considered during partitioning max_features, maximum tree depth max_depth, minimum number of samples required for internal node partitioning min_samples_split, and minimum number of samples required for leaf nodes min_samples_leaf) are assigned specific ranges and step sizes as needed. When training an SVM model, a grid search is performed on its hyperparameters penalty coefficient C and radial basis function (RBF) coefficient Y, followed by model evaluation. When training an LR model, a grid search is performed on its hyperparameters regularization penalty, regularization coefficient C, and optimizer type solver, followed by model evaluation. When training a kNN model, a grid search is performed on its hyperparameters neighbor number n_neighbors, weight function used in prediction, and Minkowski distance parameter p, followed by model evaluation. When training an NB model, the default parameters from the scikit-learn package are used.

[0086] (4) Model performance evaluation:

[0087] The AUC values ​​obtained from nested cross-validation of 25 models in the training set were ranked, and the top 10 models were selected to predict chemicals in the test set. The AUC, classification accuracy (CA), sensitivity (SE), specificity (SP), precision (PE), and F1-score of these 10 models were comprehensively analyzed in both the training and test sets. The best model was selected for qualitative prediction of subchronic toxicity. Ultimately, the random forest model was chosen as the optimal model in this implementation. The evaluation metrics of the random forest model in the training and test sets are shown in Table 1 below.

[0088] As shown in Table 1, the AUC of the training set and test set of the random forest model are as high as 0.814 and 0.734, respectively, and the accuracy reaches 0.737 and 0.688, respectively. The model has good robustness and external prediction ability, indicating that the random forest model in this embodiment is better than other machine learning methods and can achieve rapid prediction and identification of subchronic toxicity based solely on chemical structure.

[0089] Table 1

[0090]

[0091] (5) Application domain of the optimal model

[0092] In this embodiment, where the optimal model is the random forest model, the Euclidean distance d from each chemical in the training set to the modeling chemical core is calculated. Five different strategies are used to define thresholds, with the first threshold set as the maximum distance d. max The second threshold is set as the arithmetic mean. 2 times, that is The third threshold is set as the arithmetic mean. 3 times, that is The fourth threshold is set at the 95th percentile (p95); the fifth threshold is set at the arithmetic mean. And standard deviation σ, combined with the formula The result is obtained from the calculation, where z is the adjustment coefficient, and z is set to 0.5 by default.

[0093] The test set can be used to evaluate the model's generalization ability, but the prediction results are only reliable if the chemicals in the test set are within the model's application domain. Therefore, we test whether the 96 chemicals in the test set are within the application domain of the random forest model in this embodiment. We calculate the Euclidean distance d from each chemical in the test set to the modeled chemical's centroid. If d ≤ a set threshold, the chemical is within the model's application domain; otherwise, it is not. The application domain of the random forest model in this embodiment is shown in Table 2.

[0094] Table 2

[0095]

[0096] As can be seen from Table 2, using the maximum distance d max and twice the average and 3 times the average As a threshold, all chemicals in the test set are within the model's application domain. At the most stringent threshold... In the test set, 10 chemicals were outside the application domain, but nearly 89.6% of the chemicals still conformed to the model's application domain, indicating that the best model in this embodiment can cover a wide range of chemical structures and is suitable for predicting the subchronic toxicity of chemicals on a large scale.

[0097] Example 2

[0098] Prediction of subchronic toxicity of N-butylbenzenesulfonamide

[0099] N-Butylbenzenesulfonamide (CAS RN: 3622-84-2) is widely used as a plasticizer in nylon plastics, polyamides, and cellulose resins. Studies have reported that long-term exposure to N-Butylbenzenesulfonamide can cause weight loss, motor dysfunction, changes in hematological parameters, and hepatotoxicity. Its safety should be taken seriously.

[0100] The PubChem molecular fingerprint information of the N-butylbenzenesulfonamide chemical was input into the optimal prediction model. Calculations based on the application domain showed a Euclidean distance of 6.17, falling within the model's application domain, thus allowing for subchronic toxicity prediction. The model predicted a subchronic toxicity category of 1, classifying it as highly toxic. The subchronic toxicity value of the N-butylbenzenesulfonamide chemical was found to be 51.9 mg / kg bw / day, which is less than 100 mg / kg bw / day, thus indicating high toxicity. Therefore, the predicted result for this compound is consistent with experimental test results, demonstrating the accuracy of the random forest prediction model established in this invention.

[0101] Furthermore, some warning substructures were identified based on PubChem molecular fingerprinting combined with information gain (IG) and substructure frequency analysis (SFA). For example, Figure 3 The diagram illustrates the conversion of N-butylbenzenesulfonamide chemicals into PubChem molecular fingerprints according to Example 2 of the present invention.

[0102] Depend on Figure 3 It can be seen that the molecular structure of N-butylbenzenesulfonamide contains NS, S(=O)(=O) and NSC:C. These structural fragments usually appear more frequently in highly toxic chemicals than in low-toxic chemicals, which means that the toxicity level of unknown chemicals can be quickly assessed by observing and analyzing whether these high-risk warning substructures appear in them.

[0103] Therefore, the method of this invention can achieve rapid prediction and screening of the subchronic toxicity of chemicals based solely on their structural characteristics, thereby providing technical support and guidance for the health risk assessment of unknown chemicals.

[0104] The present invention also provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform any of the methods described above.

[0105] The above specific embodiments further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are merely specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for establishing a predictive model for the subchronic toxicity of chemicals, comprising: Obtain a chemical sample dataset corresponding to known subchronic toxicity with no observed adverse effects, the chemical sample dataset including the SMILES codes of the chemicals; The SMILES codes are converted to obtain a chemical sample dataset with an N×F numerical matrix; A random forest model is constructed based on the chemical sample dataset with an N×F numerical matrix, and the random forest model is cross-validated to obtain the optimal chemical subchronic toxicity prediction model. The acquisition of a dataset of chemical samples corresponding to known subchronic toxicities with no observed adverse effects includes: The original chemical dataset is obtained from a chemical database, which includes the chemical CAS number, SMILES code, and subchronic toxicity level values ​​with no observed adverse effects obtained from animal experiments. The original chemical dataset is preprocessed to obtain a preprocessed original chemical dataset. The preprocessing includes removing inorganic substances, organometallic substances, mixtures, salts, polymer data, and compounds with a relative molecular mass greater than 800. Based on the chemical CAS number and SMILES code included in the original chemical dataset, the preprocessed original chemical dataset is deduplicated. Then, based on the preset level of no observed adverse effects and the level of no observed adverse effects based on subchronic toxicity obtained from animal experiments, the deduplicated original chemical dataset is classified to obtain the chemical sample dataset with classification labels.

2. The method according to claim 1, wherein, The SMILES encoding is converted to obtain a chemical sample dataset with an N×F numerical matrix, including: Based on the SMILES code, determine the PubChem molecular fingerprint of the chemical corresponding to the SMILES code; Based on the PubChem molecular fingerprint, an N×F numerical matrix of the chemical is obtained.

3. The method according to claim 1, wherein, A random forest model is constructed based on the chemical sample dataset with an N×F numerical matrix, and the random forest model is cross-validated to obtain the optimal chemical subchronic toxicity prediction model, including: The chemical sample dataset with an N×F numerical matrix is ​​divided into a training set and a test set according to a preset ratio, and the chemical sample dataset with an N×F numerical matrix is ​​used as input to construct a random forest model. The random forest model is trained using the training set, the hyperparameters of the random forest model are optimized, and the optimal hyperparameters are determined. The random forest model under the optimal hyperparameters was tested using the test set to obtain the optimal chemical subchronic toxicity prediction model.

4. The method according to claim 3, wherein, The hyperparameters include: the number of trees (n_estimators), the maximum number of features considered during partitioning (max_features), the maximum depth of the tree (max_depth), the minimum number of samples required for further partitioning of internal nodes (min_samples_split), and the minimum number of samples required for leaf nodes (min_samples_leaf).

5. The method according to claim 3, wherein, The process of training the random forest model using the training set, optimizing the hyperparameters of the random forest model, and determining the optimal hyperparameter combination includes: The parameter range of the hyperparameters is preset; Based on the hyperparameters within the parameter range and the training set, the random forest model is trained cyclically to determine the optimal combination of hyperparameters.

6. The method according to claim 5, wherein, The process of cyclically training a random forest model based on the hyperparameters within the parameter range and the training set to determine the optimal hyperparameters includes: For the hyperparameters in the parameter range, the random forest model is trained on the training set through the inner loop of cross-validation to obtain the performance evaluation index to be verified for each hyperparameter in the parameter range. The area under the receiver operating characteristic curve is used to analyze the performance evaluation index to be verified, and the optimal hyperparameter is determined.

7. A method for predicting the subchronic toxicity of a chemical, comprising: Obtain a dataset of target chemicals to be predicted, wherein the dataset of target chemicals to be predicted includes SMILES codes of the target chemicals; The SMILES encoding is converted to obtain a dataset of target chemicals to be predicted with an N×F numerical matrix; The target chemical dataset with an N×F numerical matrix is ​​input into the chemical subchronic toxicity prediction model to obtain the predicted value of the chemical subchronic toxicity. The chemical subchronic toxicity prediction model is obtained by the establishment method described in any one of claims 1 to 6.

8. The method according to claim 7, wherein, Before obtaining the dataset of the target chemical to be predicted, the following steps are also included: Determine the Euclidean distance between the centroids of each chemical in the dataset to be predicted and the chemical data in the training set; If the Euclidean distance meets a preset threshold condition, the chemical to be predicted is determined to be the target chemical to be predicted.

9. An electronic device, comprising: One or more processors; Memory, used to store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 7 to 8.