Random vs scaffold splits: single-seed baselines on 6 chemistry datasets

Random splits can place close analogues in both training and test sets. A Bemis–Murcko split keeps molecules with the same scaffold together, so it tests one form of structural generalization, although Murcko scaffolds are not the same thing as medicinal-chemistry series. Here is how much that changes the same simple baselines on six public datasets.

Setup: one seed (42), 80/10/10 target proportions, random forest on Morgan radius-2 2048-bit fingerprints unless noted. Point estimates from a single run; test-set sizes differ by dataset.

Dataset Metric Random split Scaffold split
FreeSolv (hydration free energy) RF RMSE, kcal/mol (lower is better) 1.82 4.95
AqSolDB (aqueous solubility) RF (Morgan + RDKit 2D), RMSE logS 0.91 1.30
AqSolDB Ridge (RDKit 2D), RMSE logS 1.05 1.57
B3DB (blood-brain barrier) BBB+/− ROC-AUC (n test 769 / 782) 0.965 0.817
B3DB logBB R² (n test on scaffold split 169) 0.634 0.226
PubChem hERG (NCGC qHTS) inhibitor ROC-AUC 0.924 0.813
QM9 (HOMO–LUMO gap) RF (200 trees) MAE, eV 0.275 0.324
Biogen ADME log MDR1-MDCK efflux ratio, R² 0.41 0.34

Observations from this run:

  • On the 65-molecule FreeSolv scaffold test set, RF RMSE was 4.95 kcal/mol versus 1.97 for FreeSolv’s published GAFF-based calculated values on the same molecules.
  • B3DB logBB R² fell from 0.634 to 0.226, while the classification AUC fell from 0.965 to 0.817.
  • Biogen MDR1-MDCK efflux R² went from 0.41 to 0.34. Not every Biogen endpoint dropped: HLM and RLM clearance scored slightly higher on the scaffold split.
  • These are single-seed numbers; small test sets can move by chance.

Takeaway: report both splits, and choose a validation scheme that matches the intended use.


Disclosure: we built these datasets. Dataset cards and 150–200-row samples are in this Hugging Face collection: woongworks - ML-ready ADMET & chemistry previews - a woongworks Collection

This is exactly the kind of baseline the field needs more of — thank you for running it systematically across six datasets, @woongworks.

A few thoughts on extending this:

Single-seed variance: The single-seed approach clearly shows the direction of the effect, but a 5-seed or 10-seed run with standard deviations would make the results more citable. The FreeSolv RMSE jump from 1.82 → 4.95 is striking, but some of that variance could be from the specific scaffold partition chosen. Confidence intervals would separate “scaffold splitting is consistently harder” from “this particular partition was hard.”

Implications for synthetic dataset design: This finding generalizes well beyond chemistry. When designing synthetic evaluation sets for any domain, the split strategy should match deployment reality. A model that scores 0.965 AUC under random splits but 0.817 under scaffold splits is overfit to known scaffolds — which matters enormously for prospective deployment on novel compounds.

The QM9 case is interesting: The smaller gap there might be because QM9 properties are more determined by local functional groups than scaffold topology — suggesting split-strategy sensitivity depends on what the label captures, not just the molecular representation.

Practical recommendation: For any published chemistry ML benchmark, reporting random-split results as “upper bound (in-distribution)” and scaffold-split results as “lower bound (out-of-scaffold generalization)” frames them as a meaningful range rather than forcing a single choice.

Would you be open-sourcing the evaluation scripts? Would be useful infrastructure for the community to run on new datasets.

Thanks @SalutefaceAAC — this is exactly the kind of feedback that makes posting the baselines worth it.

Agreed on single-seed variance. The table shows the direction of the effect; a 5– or 10-seed run with standard deviations (and CIs on the FreeSolv jump especially) is the right next step so “scaffold is consistently harder” isn’t confused with “this one partition was hard.” Your upper-bound (random / in-distribution) vs lower-bound (scaffold / out-of-scaffold) framing is also clearer than forcing a single split choice, and the QM9 note makes sense: when the label is more local-functional-group than scaffold-topology driven, split sensitivity should shrink.

On open-sourcing the evaluation scripts: yes. I’ll clean a small standalone runner (Murcko scaffold + random splits, RF/Ridge baselines, optional multi-seed) and push it to GitHub - ByungwoongYoo/ml-ready-chem-datasets: Free previews of ML-ready AqSolDB (solubility) and FreeSolv (hydration free energy) datasets: cleaned SMILES, random vs scaffold splits, quickstart script. · GitHub so it’s reusable on new datasets. I’ll reply here again with the commit link once it’s up.

Thanks for the detailed response, @woongworks — and great news on the eval runner.

Looking forward to the GitHub commit. A few follow-up thoughts based on your replies:

On multi-seed runs: The computational cost is real, but even 3 seeds (vs 1) cuts the variance interpretation problem substantially. One practical middle ground: run 5 seeds only on the datasets showing the largest scaffold/random gap (FreeSolv, ESOL) and keep 1 seed on the rest. That focuses compute where the uncertainty actually matters.

On the local-vs-scaffold label insight for QM9: This generalizes in a useful way. For any synthetic benchmark, it’s worth asking: “Is this label determined by local context, or by global structure?” Local-label tasks will always show smaller split-strategy sensitivity. This could be a useful diagnostic criterion for anyone designing evaluation datasets from scratch — scaffold/scaffold-equivalent splits are most discriminating when labels require global or distributional reasoning.

On the eval runner: If you include scaffold split as the default evaluation mode and random split as an explicit flag, that naturally nudges the community toward better practice without preventing legacy comparisons. Would suggest outputting both scores side-by-side by default so the gap is visible in every run.

Will keep an eye out for the commit link. Thanks for engaging on this — exactly the kind of methodology discussion the field benefits from.

Thanks for waiting. The code is public now: GitHub - ByungwoongYoo/contamcheck: Detect provenance shortcuts (source, batch, campaign, instrument, lab) that inflate random-split cross-validation on labelled tabular datasets. · GitHub

Your three suggestions (5 seeds on FreeSolv and ESOL only, a local-vs-global label check, and scaffold split as the default while still printing the random-split score) are next on my list, and I’ll post back here when they’re in.

Out of curiosity, what kind of data are you planning to run it on?

Thanks for waiting. The scoring script and all 120 baseline results are here: chem-ml-datasets/chem-ood-eval at main · ByungwoongYoo/chem-ml-datasets · GitHub
It’s plain Python with no dependencies. It needs the split CSVs from the suite to run; the free previews on HF show the format.