Forward reaction prediction asks: given these reactants and reagents, what comes out? It is the better-posed direction — usually one major product rather than many valid routes — and the models that do it well are the same sequence and graph machinery pointed the other way from retrosynthesis.
Reaction SMILES: the input format
A reaction is written as three dot-separated groups joined by two greater-than signs: reactants, then agents, then products. Agents — catalysts, solvents, bases — are species that do not contribute atoms to the product. The middle field may be empty, giving the doubled arrow ">>" that most datasets use, and each field is a dot-separated list of ordinary SMILES, so every trap in the underlying notation is inherited: unmatched ring digits, salts that should have been split, stereo tags that the source never recorded.
The reactant/agent boundary is not always drawn consistently in the source data, and it changes the task. If everything is thrown into the reactant slot, the model must learn which species contribute atoms; if agents are separated, that is given. Published accuracies on the USPTO-derived benchmarks are reported for both settings and they are not comparable, so check which one a number refers to before quoting it.
Worked: one esterification, mapped
Fischer esterification of acetic acid with ethanol under acid catalysis gives ethyl acetate and water.
reaction SMILES
CC(=O)O.CCO >> CC(=O)OCC
with the acid catalyst as an agent
CC(=O)O.CCO>OS(=O)(=O)O>CC(=O)OCC
what the model has to get right:
1. which bond forms — the acid's carbonyl carbon to the alcohol's oxygen
2. which bond breaks — the acid's C-OH
3. where the atoms go — the lost OH plus the alcohol's H leave as water
4. what does not react — the sulfuric acid is a catalyst, not a reactant
atom-mapped form makes 3 explicit:
[CH3:1][C:2](=[O:3])[OH:4].[CH3:5][CH2:6][OH:7]
>> [CH3:1][C:2](=[O:3])[O:7][CH2:6][CH3:5]
map number 7 moves from the ethanol to the ester: the alcohol
oxygen is retained and the acid's oxygen 4 leaves in the water
That last detail is the one a chemist checks and a naive model gets wrong. Both candidate oxygens produce the same product SMILES, so a model scored only on product strings never learns the distinction. It matters as soon as anyone runs an isotope-labelling experiment, and it matters generally because a model that has not learned where atoms go has learned a string transformation rather than a reaction.
Two ways to build the model
Sequence to sequence. Treat the reaction SMILES as a translation problem: reactant tokens in, product tokens out. Philippe Schwaller and colleagues established this shape with the Molecular Transformer in ACS Central Science (2019), which also derives a calibrated confidence from the product of the token probabilities — a genuinely useful output, because it lets you triage which predictions need a chemist. The paper reports top-1 accuracies on the USPTO-derived sets in the high range for the era; read the exact figures from the paper for the specific split you intend to compare against, since the reactant/agent treatment moves them.
Tokenisation is load-bearing here. The regular expression that splits a reaction SMILES has to keep Cl, Br, bracket atoms such as [nH], two-digit ring closures such as %10 and the @@ stereo marker intact. A generic byte-pair tokeniser fitted on this text will happily split chlorine in half.
Graph-based reaction-centre prediction. Instead of generating the product, predict which bonds change. Wengong Jin and colleagues’ Weisfeiler-Lehman difference network scores atom pairs for likelihood of bond change, enumerates candidate products from the top-scoring changes, and then ranks the candidates. The output is valid by construction and the intermediate — the predicted reaction centre — is directly inspectable, which a sequence model does not give you.
Atom mapping, and why it is not free
An atom map assigns each product atom to the reactant atom it came from. Template extraction for retrosynthesis needs it, reaction-centre models need it for supervision, and the patent corpus does not reliably have it — the mappings in most extracted datasets were produced by software, and they contain errors.
Schwaller and colleagues showed that a transformer trained on unmapped reactions learns an alignment in its attention weights that can be read out as an atom mapping, which is the basis of RXNMapper. That is a neat result and it is not a licence to trust mappings blindly: an incorrect mapping produces a template that encodes chemistry nobody intended, and that template then fires on molecules for the rest of the pipeline’s life.
Yield and conditions are a different problem
Predicting the product is one task. Predicting how much of it you get, under which conditions, is much harder and much less solved.
The reason is the data. Patents and publications record reactions that worked; they do not record the temperature sweep that failed. Yields reported in patents are unreliable and often absent. So the label is both censored and noisy, and a model trained on it learns the distribution of reported yields rather than the response surface.
High-throughput experimentation datasets fix this by design, measuring full combinatorial grids including the failures. The Buchwald-Hartwig amination dataset from Derek Ahneman and colleagues, published in Science in 2018, is the reference example. It also carries the field’s most instructive caution: Jonathan Chuang and Michael Keiser demonstrated in a 2018 comment in Science that models built on random or one-hot features performed comparably to the chemically motivated descriptors on that dataset. The lesson generalises: on a small, highly structured design matrix, a strong score can come from the design rather than from any chemistry the model learned. Run the random-feature control.
Where the predictions break
- Selectivity. Regio- and chemoselectivity in molecules with several similar reactive sites is exactly what these datasets are thin on, and exactly what a medicinal chemist wants predicted.
- Stereochemistry. Sequence models can emit a product with wrong or missing
@tags, and if the training reactions themselves lacked stereo annotation the model has never seen the information. - Multi-component and cascade reactions. Under- represented in the patent corpus, and the model’s confidence does not fall the way you would want on them.
- Out-of-distribution reagents. A novel organometallic catalyst has no examples. The model still returns a product with a confidence score, which is the dangerous shape of failure.
- Scale and safety. Nothing in the model represents exotherm, gas evolution or hazard. Predicted feasibility is not a safety assessment, and route selection needs process-chemistry review.
The useful way to deploy one of these models is therefore as a filter rather than an oracle, and the calibrated confidence is what makes that possible. Set a threshold, accept predictions above it without review, and route everything below it to a chemist. That converts a model with an imperfect accuracy into a system with a known review load, and the threshold is a dial you can move as the queue changes rather than a property of the model you are stuck with.
Top comments (0)