Skip to main content
Back

Virginia Tech Reveals Why Chemical AI Models Keep Contradicting Each Other

Hundreds of controlled experiments reveal why BERT-style chemistry models give contradictory results, and why mixing molecular databases silently poisons pretraining.

Pro

  • Virginia Tech and MolSSI ran hundreds of controlled BERT pretraining runs to explain contradictory results in chemical language model literature.
  • Mixing SMILES from PubChem, ChEMBL and ZINC introduces standardization noise that can double pseudo-perplexity and cause divergence.
  • Larger models are more sample efficient and more resilient to standardization noise across training and validation splits.
  • Validation loss plateaus around 10% of PubChem (about 12 million SMILES); returns bend beyond that scale.
  • Base-BERT beats or matches LASSO, RF, SVM, XGBoost and LightGBM on all six Biogen ADME endpoints.
  • Code, pretrained models and dataset released at github.com/molssi-ai/bertology and Hugging Face.

For years, papers on chemical language models have been telling contradictory stories. One team pretrains a BERT variant on 775 million molecules from ChEMBL, PubChem and ZINC and finds it loses to a version trained on just 2 million. Another team scales up and sees improvements. Reviews of the field keep flagging the same mess. A new study from the Molecular Sciences Software Institute and Virginia Tech spent hundreds of controlled runs figuring out why, and the answer is more mundane and more consequential than most people assumed.

The paper, BERTology of Molecular Property Prediction, does something the field had mostly skipped: it treats a chemical BERT the way NLP researchers treated the original BERT, systematically varying dataset size, model size, tokenizer, random seeds, and, crucially, the data standardization pipeline.

Why the field kept contradicting itself

Molecular property prediction (MPP) is the task of guessing physicochemical or biological properties like solubility or metabolic stability from a molecule's structure, usually written as a SMILES string. It sits at the core of drug discovery, and getting it right can shave enormous cost off preclinical pipelines.

Chemical language models (CLMs) treat SMILES as a language and pretrain with masked language modeling, the same self-supervised trick that gave us BERT. But an increasing number of studies have reported inconsistent and contradictory results for the performance of chemical language models across various MPP benchmark tasks. Some found bigger pretraining sets hurt downstream accuracy. The authors point out there is no established scaling law for encoder-only masked language models to fall back on, so most CLM papers have effectively been guessing which knobs matter.

The hidden villain: standardization noise

The most striking finding is about something almost nobody discusses in CLM papers. Chemical databases like PubChem, ChEMBL and ZINC each apply their own standardization pipeline, which normalizes tautomers, charge states, stereochemistry and salt handling in slightly different ways. Combining them to get a bigger corpus, a common trick, silently mixes incompatible protocols.

The authors simulated this by gradually replacing PubChem SMILES with their ChEMBL-standardized equivalents in the training split (controlled by a parameter tau) and in the validation split (controlled by nu). The effect is dramatic. For Tiny-BERT, pseudo-perplexity on the validation set jumps from about 1.77 with clean PubChem data to 3.62 when the training data is fully ChEMBL-standardized but validation is pure PubChem. In the worst case the model diverges outright and triggers early stopping across all seeds.

Heatmap of Tiny-BERT pseudo-perplexity across standardization noise levels

Two lessons fall out of the heatmaps. Larger models are more resilient to standardization noise, and if you must mix protocols, the least destructive path is to add the same noise to training and validation splits at the same rate, so their distributions stay aligned.

What actually matters for pretraining

Once standardization is under control, the authors sweep dataset size (six bins from 2.5% to 80% of PubChem's roughly 119 million canonical stereoisomeric SMILES) across three BERT sizes (Tiny, Small, Base). The trends line up with what the auto-regressive scaling laws predict, even though the theoretical justification for encoder-only masked LMs is not settled:

  • Validation loss and pseudo-perplexity fall monotonically with both dataset size and model size.
  • A slope change appears around 10% of the data (roughly 12 million samples), suggesting a plateau threshold for masked-language-model pretraining on SMILES.
  • Larger models are more sample efficient, closing the gap with less data.
  • Random seed variance across five runs sits near 1%, far smaller than the gap between model sizes.
  • WordPiece and Byte Pair Encoding perform within noise of each other, so the tokenizer choice is not the culprit behind field-wide inconsistencies.

Does it actually help downstream?

For fine-tuning, the team deliberately avoided MoleculeNet, the go-to benchmark, because it is riddled with invalid structures, duplicate entries with conflicting labels, and ambiguous stereochemistry. They used Biogen's curated ADME dataset covering six regression endpoints: human and rat liver microsomal stability, human and rat plasma protein binding, MDR1-MDCK efflux ratio, and solubility.

With a 3-fold cross-validation Bayesian hyperparameter search over 50 architectures per fold, Base-BERT pretrained on 80% of PubChem beat or matched classical baselines (LASSO, random forest, SVM, XGBoost, LightGBM) on all six endpoints. The gains are largest where the fine-tuning set is bigger and the experimental noise is lower. On plasma protein binding endpoints, where labels are noisy and datasets are tiny (as few as 885 compounds), BERT is competitive but not clearly better, which the authors frame honestly as an economic decision rather than a technical one.

What is useful, what is not

The practical takeaways for anyone building or using CLMs:

  1. Do not mix SMILES from databases with different standardization pipelines unless you re-standardize everything through one protocol. This alone likely explains many of the counterintuitive results in prior work.
  2. Bigger pretraining data still helps, but returns bend around 10% of PubChem-scale corpora, so throwing 700 million molecules at a Tiny model is wasteful.
  3. Random seed sensitivity is small enough that most reported differences of a few percent between CLM variants are not meaningful without multiple seeds.
  4. Base-BERT-sized models are enough to beat classical baselines on well-curated ADME tasks. Going larger without cleaner data is unlikely to pay off.
  5. MoleculeNet should probably be retired for serious CLM benchmarking.

Code, models and data

Everything needed to reproduce the study is open. The pipeline lives at github.com/molssi-ai/bertology, the ML-ready PubChem snapshot used for pretraining is on Hugging Face, and pretrained checkpoints, fine-tuned models, optimizer states and monitoring logs are archived on MolSSI's Zenodo community. The ChEMBL standardization module used for the noise experiments is available separately at github.com/chembl/ChEMBL_Structure_Pipeline.

The broader contribution is not a new architecture. It is the first careful, seed-averaged, ablation-driven look at what actually moves the needle for encoder-only chemical language models, and a clear warning that dataset provenance has been quietly wrecking benchmarks for years.