Heterogeneous Learning Model for Simultaneous Prediction of Chemical Half-lives and Biodegradability
收藏资源简介:
File Overview ad_results_exp_dense.zip Contains detailed characterization results for the applicability domain (AD). Vis_Result.zip Contains attention weights and SHAP heatmaps mapping directly to specific chemical endpoints and compounds. code_and_model.zip Contains the core machine learning models and source code. CPM.exe The standalone software executable. 1. Environment Setup To ensure proper execution of all deep learning architectures (DGL and PyTorch-based GNNs), please set up the environment with CUDA 11.3 using the following commands: # 1. Install base dependencies and RDKit pip install packaging setuptools rdkit pip install torchdata==0.7.1 # 2. Install core utilities via Conda conda install pyyaml -y conda install pydantic -y conda install shap scikit-learn pandas numpy matplotlib IPython seaborn -y # 3. Install PyTorch with CUDA 11.3 support conda install pytorch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1 cudatoolkit=11.3 -c pytorch pip install numpy==1.24.2 # 4. Install Deep Graph Library (DGL) for CUDA 11.3 pip install dgl-cu113 -f https://data.dgl.ai/wheels/repo.html 2. Data Processing & Dataset Building resplit/ Folder: Contains 10-fold cross-validation CSV files for different target endpoints and learning tasks. build_graph_dataset.py: Set data_folder = 'foldname' inside the script to specify the target dataset folder. Running this script processes all raw CSV files in the target folder and generates corresponding binary graph files (*.bin) and group.csv metadata files required for GNN modeling. 3. Model Training & Task Mapping The training scripts correspond to specific multi-task (MT), transfer learning (TL), and single-task (ST) Graph Neural Network configurations: Script / Task Key Model Architecture Endpoint Description resplit-MT-all.py MT-GNN1 Biodegradability (All endpoints) resplit-MT-fast.py MT-GNN2 Ready / Fast Biodegradability resplit-MT-reg.py MT-GNN3 Biodegradation Percentage (%) resplit-MT-4.py MT-GNN4 4-Task Multi-Task Learning resplit-MT-7.py MT-GNN5 7-Task Multi-Task Learning resplit-TL-MT-all-4.py TL-GNN1 Transfer Learning (All $\rightarrow$ 4 Tasks) resplit-TL-MT-fast-4.py TL-GNN2 Transfer Learning (Fast $\rightarrow$ 4 Tasks) resplit-TL-MT-reg-4.py TL-GNN3 Transfer Learning (Reg $\rightarrow$ 4 Tasks) resplit-TL-MT-all-7.py TL-GNN4 Transfer Learning (All $\rightarrow$ 7 Tasks) resplit-ST-Air.py ST-GNN Air Half-life ($\log t_{1/2}$) resplit-ST-Water.py ST-GNN Water Half-life ($\log t_{1/2}$) resplit-ST-Soil.py ST-GNN Soil Half-life ($\log t_{1/2}$) resplit-ST-Sed.py ST-GNN Sediment Half-life ($\log t_{1/2}$) resplit-ST-reg.py ST-GNN Single-task Biodegradation Percentage resplit-ST-fast.py ST-GNN Single-task Ready Biodegradability resplit-ST-all.py ST-GNN Single-task Biodegradability Output Directories result/: Stores aggregated overall performance summary tables across folds and models. resplit-jieguo/: Stores detailed comparison tables matching experimental values against predicted outputs for each sample. 4. Applicability Domain (AD) & Visualization (VIZ) Applicability Domain (AD/ Directory) Place target evaluation CSV files (e.g., train, validation, and test fold splits) inside the AD/ folder. Running applicability domain.py outputs full domain characterization results (corresponding to the provided ad_results_exp_dense.rar package). Model Explainability & Heatmaps (VIZ/ Directory) Running VIZ.py outputs target-wise and chemical-specific attention weights and SHAP heatmaps. Generates visualization assets corresponding to the Vis_Result.rar archive. Usage Instructions Note: It is strongly recommended to run CPM.exe on a computer equipped with a dedicated GPU for optimal performance. Please note that the initial launch/processing may take longer than usual to complete. ABSTRACT Data scarcity in the field of environmental chemistry is a bottleneck limiting the development of robust prediction models. For certain endpoints, both qualitative and quantitative data exist, and jointly predicting both types can effectively compensate for the shortcomings caused by data scarcity. However, models capable of simultaneously handling both classification and regression tasks remain scarce. This study develops an innovative multi-task learning framework that integrates heterogeneous categorical and continuous data training via shared molecular features, taking the assessment of chemical persistence as an example. The model simultaneously predicts degradation half-lives across four environmental media, biodegradation percentages, and ready/inherent biodegradability classifications. By leveraging the synergy between mixed-data types, the framework significantly outperforms single-task architectures and traditional models using fixed molecular descriptors, with the coefficient of determination on external validation sets increasing by up to 3 folds. When applied to screen a large database, the model identified more than 350,000 potential persistent chemicals. To facilitate practical application, a graphical user interface software was developed to enable simultaneous multi-endpoint prediction and visualization for researchers without specialized computational expertise. This research demonstrates that heterogeneous multi-task learning is a powerful and feasible strategy to address data scarcity challenges in environmental computational toxicology.



