Skip to content
StackTox
Model card

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

SMILES input batch RDKit descriptors 61 features Random Forest 150 trees · depth 12 LightGBM lr 0.05 · 31 leaves SVM (RBF) C 1.0 · probability Logistic meta-learner calibrated Verdict p ≥ 0.404
Cross-validation
5
stratified folds
Training set
13,492
ToxBits, 50% toxic
Hold-out test
2,700
balanced
Validation set
5,192
ToxBits validation
Random seed
42
reproducible

Hold-out test set performance

Random Forest AUC 0.841 · acc 75.0% · F1 0.762
LightGBM AUC 0.844 · acc 74.3% · F1 0.760
SVM (RBF) AUC 0.821 · acc 72.5% · F1 0.756
Stacking ensemble — deployed AUC 0.846 · acc 75.5% · F1 0.765
ModelAUC-ROCAccuracy PrecisionRecall F1Threshold
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

ModelAUC-ROCAccuracy PrecisionRecallF1
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.

ROC AUC
0.827
Accuracy
0.761
Precision
0.753
Recall
0.688

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.

ModelAUCAcc.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.

BCUT2D eigenvalues (7)
BCUT2D_MRLOW BCUT2D_MWHI BCUT2D_CHGHI BCUT2D_MRHI BCUT2D_LOGPLOW BCUT2D_MWLOW BCUT2D_CHGLO
Bulk physicochemical (9)
NumRotatableBonds MolLogP MolMR qed LabuteASA MolWt ExactMolWt HeavyAtomMolWt TPSA
Electrotopological state (1)
MaxAbsEStateIndex
Fingerprint density (1)
FpDensityMorgan3
Functional group counts (7)
fr_ester fr_Al_OH_noTert fr_allylic_oxid fr_ether fr_Al_OH fr_unbrch_alkane fr_NH0
Partial charges (4)
MaxAbsPartialCharge MinPartialCharge MaxPartialCharge MinAbsPartialCharge
Surface area (VSA) bins (19)
SMR_VSA5 SlogP_VSA5 PEOE_VSA6 VSA_EState7 PEOE_VSA10 VSA_EState3 EState_VSA5 SlogP_VSA2 SMR_VSA1 EState_VSA1 EState_VSA2 SMR_VSA10 PEOE_VSA1 EState_VSA4 PEOE_VSA8 SlogP_VSA3 PEOE_VSA7 EState_VSA8 EState_VSA3
Topological indices (13)
Chi2n Chi1n Chi3n Chi4n BalabanJ Kappa2 Chi0n Kappa1 Chi1 Chi0 Kappa3 Chi1v Chi0v

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).