Skip to content

About

Surrogate models for compound ADME property prediction, including model training and evaluation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Surrogate Machine Learning Models for ADME Prediction: From Synthetic Labels to Experimental Data

In the following document, we provide steps and code snippets to reproduce the models and results for the surrogate models presented in "Surrogate Machine Learning Models for ADME Prediction: From Synthetic Labels to Experimental Data" by Peteani et al. (Parrondo-Pizarro, Gerebtzoff, and Rodríguez-Pérez)

Corresponding author: raquel.rodriguez_perez@novartis.com


Repository layout

open_source_data/
  data/                       # Raw and processed public ADMET datasets
  files/                      # Intermediate aggregated files produced by data_preparation
  finetune_data/              # Per-source train/test splits used for fine-tuning
    all/                      # Union of the three sources
    all_unfreeze/             # Same, padded with extra endpoint columns
  surrogate_dataset/          # 5-fold splits for surrogate pretraining
    5fold_split/fold{1..5}_data.csv

src/
  data_preparation/                    # Notebooks to aggregate/pivot/split public data
    public_ADME_data_aggregation.ipynb
    process_public_data.ipynb
    generate_5folds.ipynb
  surrogate_pretraining/
    architectures_benchmark/           # Benchmark of pretraining architectures
      ST_ML_models/                    # Single-task  XGBoost / MLP
      ST_GNN/                          # Single-task Chemprop GNN (5 endpoints)
      MT_GNN_5/                        # Multi-task Chemprop GNN (5 endpoints)
      MT_GNN_property/                 # Multi-task Chemprop GNN per property group
      MT_GNN_all/                      # Multi-task Chemprop GNN, all 25 endpoints
      overall_evaluation.py            # Aggregate per-endpoint metrics across architectures
    surrogate/                         # Final MT GNN property related surrogate models used downstream
  finetuning/                          # Fine-tuning the pretrained surrogates
    surrogate_feat_extraction/         # Frozen backbone + new initialized head
    surrogate_unfreeze/                # Full model unfrozen
  evaluation/                          # Predict on public benchmark test sets

envs/                                  # Conda environment files
  chemprop_env.yml                     # For GNN
  surrogate_env.yml                    # For XGBoost + MLP baselines

Environments

Two conda environments cover the full pipeline. Create them with:

conda env create -f envs/chemprop_env.yml     # for GNN
conda env create -f envs/surrogate_env.yml    # for XGBoost + MLP baselines
  • chemprop_env — Chemprop v2 + Ray Tune + hyperopt. Used for all GNN training, final surrogate training, zero-shot evaluation, fine-tuning, and the data-preparation notebooks.
  • surrogate_env — PyTorch + XGBoost + Optuna + scikit-learn. Used only for the ST_ML_models baselines.

Data

Public data referred to in the repo

Download the public dataset at the following link:

Path Content Source
open_source_data/surrogate_dataset/protacdb2.0_zinc_chembl_dataset.csv Surrogate dataset https://media.springernature.com/original/springer-static/esm/art%3A10.1038%2Fs41467-024-49979-3/MediaObjects/41467_2024_49979_MOESM4_ESM.zip
open_source_data/data/ADME_public_set_3521.csv Fang et al. ADME dataset https://pubs.acs.org/mpohbp/article/22/4/1892/3749317/Multitask-Deep-Learning-Models-of-Combined
open_source_data/data/ADMET.csv OpenADMET compounds https://openadmet.org/datasetsmodels/

Workflow

The end-to-end pipeline has five stages:

  1. 5-fold pretraining data preparation - generate the fold splits used by the surrogate benchmark.
  2. Surrogate architecture benchmark + 5-fold evaluation - compare ST/MT architectures on the fold splits and pick the best per property.
  3. Public data preparation - aggregate the three public ADME sources and produce per-source/union train/test splits used for evaluation and fine-tuning.
  4. Zero-shot evaluation of the pretrained surrogate on public data - use the final surrogate directly on the public test sets, no fine-tuning.
  5. Fine-tuning on public data + evaluation - fine-tune the surrogate on the public training sets (two strategies) and predict on the public test sets.

1. 5-fold data preparation

jupyter notebook src/data_preparation/generate_5folds.ipynb

Reads open_source_data/surrogate_dataset/protacdb2.0_zinc_chembl_dataset.csv and writes:

open_source_data/surrogate_dataset/5fold_split/fold{1..5}_data.csv

Each fold file contains a smiles column, a split column with values train/val/test, and one pred(<endpoint>) column per target endpoint.

2. Surrogate architecture benchmark + 5-fold evaluation

Each subfolder of src/surrogate_pretraining/architectures_benchmark/ follows the same three-step Chemprop v2 pipeline:

cd src/surrogate_pretraining/architectures_benchmark/<architecture>/

bash hyper_opt.sh          # Ray Tune HP search (or hyper_opt_<scope>.sh)
bash model_train.sh        # Train tuned model as a 10-model ensemble
bash predict.sh            # 5-fold ensemble prediction on the test splits

For the classical ML baselines under ST_ML_models/:

cd src/surrogate_pretraining/architectures_benchmark/ST_ML_models
bash train_xgboost.sh      # or train_mlp.sh
bash evaluate_xgboost.sh   # or evaluate_MLP.sh

3. Public data preparation

Run the two notebooks in order:

jupyter notebook src/data_preparation/public_ADME_data_aggregation.ipynb
jupyter notebook src/data_preparation/process_public_data.ipynb
  • public_ADME_data_aggregation.ipynb merges the three public sources (ASAP x OpenADMET, ExpansionRx x OpenADMET, Fang et al. 2023) into a single long-format table under open_source_data/files/.
  • process_public_data.ipynb produces the unions of the three sources train sets and test sets..

4. Zero-shot evaluation of the pretrained surrogate on public data

Apply the final surrogate directly to the public test sets without any fine-tuning:

bash src/evaluation/clint/chemprop_predict.sh
bash src/evaluation/permeability/chemprop_predict.sh
bash src/evaluation/ppb/chemprop_predict.sh

Each script points at the surrogate checkpoint produced at the end of stage 2 and predicts on the corresponding public test set from stage 3.

5. Fine-tune on public data + evaluate

Two transfer-learning strategies are provided under src/finetuning/:

  • surrogate_feat_extraction/ - frozen backbone, only a newly-initialized head is trained.
  • surrogate_unfreeze/ - the full model is fine-tuned.

For each property, first fine-tune, then predict on the public test set:

cd src/finetuning/surrogate_unfreeze/clint
bash finetune_surrogate_clint.sh
bash CLint_chemprop_predict.sh
# ... same pattern for permeability/ and ppb/, and for surrogate_feat_extraction/

Contacts

For any further question or inquiry about data and code availability/reproducibility, please get in touch with the paper corresponding author.

About

Surrogate models for compound ADME property prediction, including model training and evaluation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages