retention-time-prediction
Summary
Train a heavily regularized deep neural network to predict chromatographic retention times (RTs) for small molecules using molecular fingerprints and descriptors. This skill enables high-accuracy RT estimation (MAE 39.2±1.2 s) on novel compounds, which can be integrated into metabolite annotation workflows to rank candidate identifications by RT likelihood.
When to use
You have a set of small-molecule structures (SMILES, InChI, or SDF format) and need to predict their chromatographic retention times for a specific method, either to support metabolite annotation, validate experimental assignments, or project RTs across different chromatographic platforms. Use this skill when you have access to the METLIN SMRT dataset or a similar large RT reference collection (≥10,000 molecules) for training.
When NOT to use
- Input molecules are from a very different chemical space or ionization mode than the METLIN SMRT training set (e.g., lipids, large polymers, or non-small-molecule analytes); transfer learning or retraining on domain-specific data is needed.
- Retention times are already available and validated for your analytes; skip directly to meta-learned projection or metabolite annotation.
- You lack access to alvaDesc software or a pre-computed descriptor/fingerprint matrix; the pipeline cannot generate feature inputs without this proprietary tool.
Inputs
- SMILES strings, InChI, SDF, mol, or mol2 chemical structure files
- Experimental retention time labels (in seconds)
- Molecular descriptor and fingerprint matrix (5,666 descriptors + 2,214 fingerprints per molecule, pre-generated by alvaDesc)
Outputs
- Trained DNN regressor (model weights and architecture)
- Predicted retention times (point estimates in seconds)
- Mean absolute error (MAE) and median absolute error (MdAE) metrics with uncertainty bounds
- Model uncertainty estimates for each prediction
How to apply
First, generate 5,666 molecular descriptors and 2,214 fingerprints (MACCS166, Extended Connectivity, Path Fingerprints) for all molecules using alvaDesc software. Construct a feature matrix concatenating descriptors and fingerprints as inputs and experimental retention times as regression targets. Train a deeply regularized DNN (L1/L2 penalties) with cosine annealing warm restarts as the learning rate scheduler and apply stochastic weight averaging to improve generalization. Evaluate performance on a held-out test set by computing mean absolute error (MAE) and median absolute error (MdAE). If MAE is near or below 39.2±1.2 s and MdAE near 17.2±0.9 s, the model has achieved competitive performance on SMRT-like datasets.
Related tools
- alvaDesc (Generates 5,666 molecular descriptors and 2,214 fingerprints (MACCS166, Extended Connectivity, Path Fingerprints) for input molecules) — https://www.alvascience.com/alvadesc/
- cmmrt (Reference implementation of DNN training, evaluation, and hyperparameter tuning for RT prediction; includes Makefile rules for train_predictor and test_predictor) — https://github.com/constantino-garcia/cmmrt
Examples
python cmmrt/rt/train_model.py --storage sqlite:///results/optuna/train.db --save_to saved_models --train_size 0.8 --param_search_folds 5 --trials 100
Evaluation signals
- Mean absolute error (MAE) on held-out test set is ≤39.2±1.2 s, indicating competitive performance relative to the reported baseline
- Median absolute error (MdAE) is ≤17.2±0.9 s, confirming accuracy across the distribution of predictions
- Fingerprints-only features achieve comparable or better performance than descriptors-only or combined features, consistent with the paper's finding
- Nested cross-validation results (using train_predictor and test_predictor from the Makefile) show stable error metrics across folds
- Uncertainty estimates (error bounds) on predictions reflect the observed residual distribution in validation data
Limitations
- The model is trained on METLIN SMRT (80,038 molecules) and may not generalize well to chemical spaces distant from this reference set without retraining or domain adaptation.
- Prediction uncertainty is estimated as ±1.2 s (MAE) or ±0.9 s (MdAE) on average; individual predictions may have larger errors, especially for outlier molecules.
- Feature generation requires the proprietary alvaDesc software; open-source alternatives (RDKit, mordred) were not evaluated in the paper and may produce different performance.
- The DNN architecture and hyperparameters were optimized for SMRT; full retraining via Bayesian hyperparameter search is recommended when switching to a different chromatographic method or dataset.
- Stochastic weight averaging and cosine annealing warm restarts impose additional computational cost during training compared to standard SGD.
Evidence
- [readme] 5,666 molecular descriptors and 2,214 fingerprints (MACCS166, Extended Connectivity, and Path Fingerprints fingerprints) were generated with the alvaDesc software: "5,666 molecular descriptors and 2,214 fingerprints (MACCS166, Extended Connectivity, and Path Fingerprints fingerprints) were generated with the alvaDesc software"
- [readme] The best results were obtained by a heavily regularized DNN trained with cosine annealing warm restarts and stochastic weight averaging, achieving a mean and median absolute errors of 39.2±1.2 s and 17.2 ± 0.9 s, respectively: "The best results were obtained by a heavily regularized DNN trained with cosine annealing warm restarts and stochastic weight averaging, achieving a mean and median absolute errors of 39.2±1.2 s and"
- [readme] We have trained state-of-the-art machine learning regressors using the 80,038 experimental RTs from the METLIN small molecule dataset (SMRT): "We have trained state-of-the-art machine learning regressors using the 80,038 experimental RTs from the METLIN small molecule dataset (SMRT)"
- [readme] Results suggest that fingerprints tend to perform better: "Results suggest that fingerprints tend to perform better"
- [readme] To train your own model or to predict the RT of your own set of compounds it is necessary to generate the fingerprints using alvaDesc software: "To train your own model or to predict the RT of your own set of compounds it is necessary to generate the fingerprints using alvaDesc software"
1---2name: retention-time-prediction-23description: Use when you have a set of small-molecule structures (SMILES, InChI, or SDF format) and need to predict their chromatographic retention times for a specific method, either to support metabolite annotation, validate experimental assignments, or project RTs across different chromatographic platforms.4license: CC-BY-4.05---67# retention-time-prediction89## Summary1011Train a heavily regularized deep neural network to predict chromatographic retention times (RTs) for small molecules using molecular fingerprints and descriptors. This skill enables high-accuracy RT estimation (MAE 39.2±1.2 s) on novel compounds, which can be integrated into metabolite annotation workflows to rank candidate identifications by RT likelihood.1213## When to use1415You have a set of small-molecule structures (SMILES, InChI, or SDF format) and need to predict their chromatographic retention times for a specific method, either to support metabolite annotation, validate experimental assignments, or project RTs across different chromatographic platforms. Use this skill when you have access to the METLIN SMRT dataset or a similar large RT reference collection (≥10,000 molecules) for training.1617## When NOT to use1819- Input molecules are from a very different chemical space or ionization mode than the METLIN SMRT training set (e.g., lipids, large polymers, or non-small-molecule analytes); transfer learning or retraining on domain-specific data is needed.20- Retention times are already available and validated for your analytes; skip directly to meta-learned projection or metabolite annotation.21- You lack access to alvaDesc software or a pre-computed descriptor/fingerprint matrix; the pipeline cannot generate feature inputs without this proprietary tool.2223## Inputs2425- SMILES strings, InChI, SDF, mol, or mol2 chemical structure files26- Experimental retention time labels (in seconds)27- Molecular descriptor and fingerprint matrix (5,666 descriptors + 2,214 fingerprints per molecule, pre-generated by alvaDesc)2829## Outputs3031- Trained DNN regressor (model weights and architecture)32- Predicted retention times (point estimates in seconds)33- Mean absolute error (MAE) and median absolute error (MdAE) metrics with uncertainty bounds34- Model uncertainty estimates for each prediction3536## How to apply3738First, generate 5,666 molecular descriptors and 2,214 fingerprints (MACCS166, Extended Connectivity, Path Fingerprints) for all molecules using alvaDesc software. Construct a feature matrix concatenating descriptors and fingerprints as inputs and experimental retention times as regression targets. Train a deeply regularized DNN (L1/L2 penalties) with cosine annealing warm restarts as the learning rate scheduler and apply stochastic weight averaging to improve generalization. Evaluate performance on a held-out test set by computing mean absolute error (MAE) and median absolute error (MdAE). If MAE is near or below 39.2±1.2 s and MdAE near 17.2±0.9 s, the model has achieved competitive performance on SMRT-like datasets.3940## Related tools4142- **alvaDesc** (Generates 5,666 molecular descriptors and 2,214 fingerprints (MACCS166, Extended Connectivity, Path Fingerprints) for input molecules) — https://www.alvascience.com/alvadesc/43- **cmmrt** (Reference implementation of DNN training, evaluation, and hyperparameter tuning for RT prediction; includes Makefile rules for train_predictor and test_predictor) — https://github.com/constantino-garcia/cmmrt4445## Examples4647```48python cmmrt/rt/train_model.py --storage sqlite:///results/optuna/train.db --save_to saved_models --train_size 0.8 --param_search_folds 5 --trials 10049```5051## Evaluation signals5253- Mean absolute error (MAE) on held-out test set is ≤39.2±1.2 s, indicating competitive performance relative to the reported baseline54- Median absolute error (MdAE) is ≤17.2±0.9 s, confirming accuracy across the distribution of predictions55- Fingerprints-only features achieve comparable or better performance than descriptors-only or combined features, consistent with the paper's finding56- Nested cross-validation results (using train_predictor and test_predictor from the Makefile) show stable error metrics across folds57- Uncertainty estimates (error bounds) on predictions reflect the observed residual distribution in validation data5859## Limitations6061- The model is trained on METLIN SMRT (80,038 molecules) and may not generalize well to chemical spaces distant from this reference set without retraining or domain adaptation.62- Prediction uncertainty is estimated as ±1.2 s (MAE) or ±0.9 s (MdAE) on average; individual predictions may have larger errors, especially for outlier molecules.63- Feature generation requires the proprietary alvaDesc software; open-source alternatives (RDKit, mordred) were not evaluated in the paper and may produce different performance.64- The DNN architecture and hyperparameters were optimized for SMRT; full retraining via Bayesian hyperparameter search is recommended when switching to a different chromatographic method or dataset.65- Stochastic weight averaging and cosine annealing warm restarts impose additional computational cost during training compared to standard SGD.6667## Evidence6869- [readme] 5,666 molecular descriptors and 2,214 fingerprints (MACCS166, Extended Connectivity, and Path Fingerprints fingerprints) were generated with the alvaDesc software: "5,666 molecular descriptors and 2,214 fingerprints (MACCS166, Extended Connectivity, and Path Fingerprints fingerprints) were generated with the alvaDesc software"70- [readme] The best results were obtained by a heavily regularized DNN trained with cosine annealing warm restarts and stochastic weight averaging, achieving a mean and median absolute errors of 39.2±1.2 s and 17.2 ± 0.9 s, respectively: "The best results were obtained by a heavily regularized DNN trained with cosine annealing warm restarts and stochastic weight averaging, achieving a mean and median absolute errors of 39.2±1.2 s and"71- [readme] We have trained state-of-the-art machine learning regressors using the 80,038 experimental RTs from the METLIN small molecule dataset (SMRT): "We have trained state-of-the-art machine learning regressors using the 80,038 experimental RTs from the METLIN small molecule dataset (SMRT)"72- [readme] Results suggest that fingerprints tend to perform better: "Results suggest that fingerprints tend to perform better"73- [readme] To train your own model or to predict the RT of your own set of compounds it is necessary to generate the fingerprints using alvaDesc software: "To train your own model or to predict the RT of your own set of compounds it is necessary to generate the fingerprints using alvaDesc software"