What is under the hood
StackTox stacks three independent classifiers over 61 RDKit descriptors and learns how to combine them with a calibrated logistic meta-learner. Every number on this page comes from the files shipped with the model, so the web tool and the repository can never drift apart.
Architecture
Hold-out test set performance
| Model | AUC-ROC | Accuracy | Precision | Recall | F1 | Threshold |
|---|---|---|---|---|---|---|
| Random Forest | 0.841 | 0.750 | 0.726 | 0.801 | 0.762 | 0.454 |
| LightGBM | 0.844 | 0.743 | 0.714 | 0.812 | 0.760 | 0.408 |
| SVM (RBF) | 0.821 | 0.725 | 0.680 | 0.850 | 0.756 | 0.366 |
| Stacking ensemble | 0.846 | 0.755 | 0.735 | 0.799 | 0.765 | 0.404 |
Thresholds are optimised per model during cross-validation rather than fixed at 0.5, which is why recall sits above precision: the ensemble is tuned to miss fewer toxic compounds at the cost of some false alarms.
5-fold cross-validation
| Model | AUC-ROC | Accuracy | Precision | Recall | F1 |
|---|---|---|---|---|---|
| Random Forest | 0.832 ± 0.009 | 0.742 ± 0.019 | 0.713 ± 0.032 | 0.816 ± 0.030 | 0.760 ± 0.010 |
| LightGBM | 0.837 ± 0.008 | 0.745 ± 0.010 | 0.708 ± 0.015 | 0.834 ± 0.020 | 0.766 ± 0.008 |
| SVM (RBF) | 0.810 ± 0.006 | 0.725 ± 0.010 | 0.682 ± 0.014 | 0.842 ± 0.011 | 0.754 ± 0.005 |
| Stacking ensemble | 0.839 ± 0.008 | 0.751 ± 0.010 | 0.722 ± 0.016 | 0.820 ± 0.020 | 0.767 ± 0.008 |
Independent validation
External set — 180 molecules
A held-aside set that played no part in training or threshold selection. This is the closest estimate of what you should expect on new chemistry.
Baseline validation set — 5,192 molecules
A larger, more chemically diverse set. Performance drops here, which is the honest picture of distribution shift between data sources.
| Model | AUC | Acc. | F1 |
|---|---|---|---|
| Random Forest | 0.728 | 0.679 | 0.655 |
| LightGBM | 0.715 | 0.668 | 0.651 |
| SVM (RBF) | 0.713 | 0.661 | 0.677 |
| Stacking ensemble | 0.721 | 0.677 | 0.650 |
Applicability domain. The model was trained on drug-like organic small molecules. Inorganics, organometallics, very large natural products, mixtures and salts fall outside what it has seen, and a confident-looking probability there still means little. Treat every output as a triage signal for prioritising experiments, not as a toxicological conclusion.
Descriptor set
All 61 descriptors are computed with RDKit in the exact
training order. FpDensityMorgan3 is derived from a radius-3, 2048-bit Morgan
fingerprint; everything else comes straight from the RDKit descriptor calculator.
Reproducing this
The model file, thresholds, descriptor list and every metric on this page live in the repository and are copied verbatim onto the cluster during deployment. To score a batch outside the web tool:
python stacktox_predict.py --input my_molecules.smi \
--outdir results/ \
--model-dir /scf-data/<account>/STACK-TOX/model
StackTox: a stacking ensemble for small molecule toxicity prediction, SCFBio, IIT Delhi (2026).