Holistic chemical evaluation reveals pitfalls in reaction prediction models

Victor Sabanza Gil, Andres M Bran, Malte Franke, Rémi Schlama, Jeremy S. Luterbacher, Philippe Schwaller

TL;DR

Evaluating chemical reaction prediction models solely on standard top-$k$ accuracy hides severe chemistry-blind failure modes. By introducing CHORISO—a curated dataset of ~2.2 million reactions from academic literature—along with chemistry-specific selectivity metrics, out-of-distribution (OOD) molecular weight splits, and sustainability benchmarks, this work reveals stark trade-offs between sequence-to-sequence transformers and graph-based models.

What Problem Does This Paper Address?

State-of-the-art machine learning models for chemical reaction prediction often report stellar numbers, exceeding 91% top-1 accuracy on standard patent-derived benchmarks like USPTO. However, bench chemists consistently find that these models struggle in practical applications.

This disconnect arises because typical benchmarks rely on random train/test splits and simple top-$k$ string-matching accuracy. These metrics obscure critical chemical details: Can the model predict the correct three-dimensional arrangement of atoms (stereoselectivity)? Can it predict which site on a molecule reacts when multiple options exist (regioselectivity)? Does it generalize when predicting reactions on larger, more complex molecules?

Inspired by holistic evaluation efforts in natural language processing (such as HELM), the authors propose an evaluation protocol that interrogates reaction prediction models across chemical selectivity, OOD generalization, and computational efficiency.

Methods

The authors build a multi-faceted benchmarking pipeline around three core pillars:

  1. Chemistry-Specific Metrics:
  2. Stereo-accuracy: Evaluates accuracy exclusively on reactions where a chiral center is created or inverted (detected using radius-0 reaction templates that contain chiral SMILES tags @/@@).
  3. Regio-accuracy: Isolates reactions that could yield multiple regioisomers by applying radius-1 reaction templates to reactants using RDKit; if multiple products are possible, the reaction is flagged for evaluation.
  4. Chemically Grounded OOD Scenarios:
  5. Evaluates performance across marginal distribution shifts, particularly Product Molecular Weight (PMW). Reaction reactivity is fundamentally governed by local functional groups, making PMW an ideal non-causal property to test whether models generalize to small molecules (low PMW, $<150\text{ g/mol}$) or complex targets (high PMW, $>700\text{ g/mol}$).
  6. Employs a product split (where train and test sets share no product molecules) as a more rigorous baseline than naive random splits.
  7. Sustainability Tracking:
  8. Measures training and inference runtimes as well as total $\text{CO}_2$ emissions using the eco2AI tracker.

Datasets

The authors introduce CHORISO (CHemical Organic ReactIon SMILES Omnibus), comprising 2,224,239 unique curated reactions.

  • Origin: Formed by merging and thoroughly cleaning the academic journal dataset CJHIF (mined from high-impact literature) with the patent-based USPTO dataset.
  • Key differences: Compared to USPTO, CHORISO includes significantly more protective group and functional group interconversions typical of academic synthesis, a higher density of chiral centers, and a heavier-tailed molecular weight distribution that makes it suited for OOD stress-testing.

Key Insights and Ideas

  • Architectural inductive biases dictate trade-offs:
  • Molecular Transformer (MT)—a text-to-text sequence model—excels at stereochemistry, outperforming Graph2SMILES by over 14% on stereoselective reactions. SMILES strings preserve spatial annotations efficiently across attention heads.
  • Graph2SMILES (G2S)—a hybrid graph-encoder/text-decoder model—dramatically outperforms MT on high-molecular-weight OOD generalization. Because graph encoders operate on local molecular topologies, they are far more robust to changes in molecular size than sequence models, which suffer when input string lengths exceed training distributions.
  • Selectivity is much harder than standard prediction: Across all models, accuracy drops sharply when isolating regio- and stereoselective reactions (stereo-accuracy hovers between 20% and 38%, compared to >70% overall top-1 accuracy).
  • Random splits create false confidence: Random train/test splits show consistently inflated metrics compared to product-disjoint splits, underestimating the challenge of predicting novel products.

Key Results

The authors benchmarked Molecular Transformer (MT) against Graph2SMILES (G2S) on CHORISO:

Dataset Split Model Top-1 Acc (%) Top-2 Acc (%) Stereo Acc (%) Regio Acc (%)
Product MT <br> G2S 71.9 <br> 62.8 79.4 <br> 69.4 35.0 <br> 20.6 64.4 <br> 55.3
Random MT <br> G2S 72.6 <br> 62.9 80.2 <br> 69.6 37.7 <br> 22.2 64.9 <br> 54.5
Low PMW ($<150\text{ g/mol}$) MT <br> G2S 48.2 <br> 48.9 57.0 <br> 56.6 23.5 <br> 20.3 34.8 <br> 31.7
High PMW ($>700\text{ g/mol}$) MT <br> G2S 26.7 <br> 33.6 29.8 <br> 37.4 12.8 <br> 17.0 24.7 <br> 32.8
  • Stereo vs. Extrapolation Divergence: In the product split, MT led G2S in stereo-accuracy by 35.0% vs. 20.6%. However, on the High-PMW OOD split, G2S outperformed MT in top-1 accuracy by 33.6% vs. 26.7%.
  • Sustainability: MT required half the training time and generated significantly lower carbon emissions than G2S (19.8 h and 0.32 kg $\text{CO}_2$ for MT vs. 40.8 h and 0.57 kg $\text{CO}_2$ for G2S for 200k steps on an RTX 3090), while inference speeds were similar (~3.1–3.7 h).

Limitations and Future Work

  • OOD Scope: Generalization was only tested against product molecular weight shifts; distribution shifts involving reaction conditions (catalysts, solvents, temperature, concentrations) remain unexplored.
  • Model Tuning: Benchmark models were evaluated using literature-default hyperparameters without task-specific optimization.
  • Representation Limits: SMILES representations cannot encode axial chirality (e.g., in chiral biaryl catalysts), requiring those stereocenters to be stripped during data curation.
  • Future Directions: Developing richer domain-specific metrics and exploring hybrid architectures that combine the stereochemical strengths of sequence models with the size-invariant robustness of graph neural networks.

Summary updated

BibTeX
@inproceedings{gil2023holistic,
  author = {Victor Sabanza Gil and Andres M Bran and Malte Franke and Rémi Schlama and Jeremy S. Luterbacher and Philippe Schwaller},
  title = {{Holistic chemical evaluation reveals pitfalls in reaction prediction models}},
  booktitle = {AI4Science @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=yLydB04RxR},
}
Figure