Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TIMPANI

Target-Informed Pretraining for Retention-Time Prediction across Chromatographic Conditions

TIMPANI is a target-informed pre-training method for liquid-chromatography (LC) retention-time (RT) prediction in the common low-data regime, where each chromatographic condition provides only ~100–300 labeled compounds. It meta-learns a target-specific initialization over a pool of upstream conditions, using the target's own limited training data to anchor pre-training and re-weight source tasks by gradient alignment, then fine-tunes the prediction head with the encoder frozen. The method is backbone-agnostic and requires no chromatographic metadata.

On ten TL-difficult RepoRT datasets, TIMPANI raises mean R² from 0.60 to 0.68 over conventional transfer learning (paired Wilcoxon p = 0.02) and, using no chromatographic metadata, matches the metadata-aware Graphormer-RT (0.68 vs. 0.70, p = 0.77) while fine-tuning ~34× faster (4 vs. 138 s per fold).

Repository structure

timp/                 Core package: model backbones (GIN, Graphormer-RT, chromatographic encoder),
                      trainers, and training protocols.
scripts/              Run drivers and shell pipelines (run_timp.py, run_screen.sh, ...).
notebook/             Figure and analysis scripts (plot_*.py, analyze_*.py, significance_tests.py).
baselines/            Four external RT baselines (ju2021, wang2023, li2025, stienstra2025).
data/                 RepoRT + METLIN-SMRT (populated by scripts/get_data.sh).
results_*/            Experiment outputs; see doc/RESULTS.md for what each directory produces.
tests/                Unit tests.
doc/                  RUNBOOK.md (reproducible commands).

Installation

TIMPANI requires Python ≥ 3.9, PyTorch, RDKit, and DGL. RDKit and DGL have platform-specific installs, so we recommend conda:

conda create -n timpani python=3.10
conda activate timpani

# RDKit (conda-forge is the most reliable channel)
conda install -c conda-forge rdkit

# PyTorch and DGL: install the builds matching your CUDA/CPU setup
#   PyTorch: https://pytorch.org/get-started/locally/
#   DGL:     https://www.dgl.ai/pages/start.html

# Remaining Python dependencies + the timp package (editable)
pip install -r requirements.txt
pip install -e .

Verify the install with python -c "import timp".

Usage

Prepare the data once:

bash scripts/get_data.sh            # download RepoRT + METLIN-SMRT into data/
python scripts/preprocess_graph.py  # build molecular graphs

All experiment commands — screening, the TIMPANI benchmark, ablations, and the external baselines — are documented step by step in doc/RUNBOOK.md. The mapping from each results_*/ directory to the figure or table it produces is in doc/RESULTS.md, and the plotting and analysis scripts live in notebook/.

Citation

TBD

License

Released under the Apache License 2.0.

About

Target-Informed Pretraining for Retention-Time Prediction across Chromatographic Conditions

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages