Philippe Schwaller, Teodoro Laino, Théophile Gaudin, Peter Bolgar, Costas Bekas, Alpha A Lee
5 min
Abstract
Organic synthesis is one of the key stumbling blocks in medicinal chemistry. A necessary yet unsolved step in planning synthesis is solving the forward problem: Given reactants and reagents, predict the products. Similar to other work, we treat reaction prediction as a machine translation problem between simplified molecular-input line-entry system (SMILES) strings (a text-based representation) of reactants, reagents, and the products. We show that a multihead attention Molecular Transformer model outperforms all algorithms in the literature, achieving a top-1 accuracy above 90% on a common benchmark data set. Molecular Transformer makes predictions by inferring the correlations between the presence and absence of chemical motifs in the reactant, reagent, and product present in the data set. Our model requires no handcrafted rules and accurately predicts subtle chemical transformations. Crucially, our model can accurately estimate its own uncertainty, with an uncertainty score that is 89% accurate in terms of classifying whether a prediction is correct. Furthermore, we show that the model is able to handle inputs without a reactant−reagent split and including stereochemistry, which makes our method universally applicable.
Alex: So it's capturing those long-range connections that simpler systems would miss.
Sam: Exactly. And the results are meaningful — the model achieves over ninety percent accuracy on standard tests. But what's arguably more significant is how it handles uncertainty.
Alex: What do you mean by that?
Sam: In a long, multi-step reaction, one failure can ruin the entire process and waste expensive materials. So the model doesn't just produce a prediction — it also produces a confidence score. That score tells the chemist whether the AI is fairly certain about a step or essentially guessing. If confidence is low, the chemist knows to double-check before committing resources.
Alex: So it's not just predicting the outcome — it's telling you how much to trust that prediction.
Sam: Right. And the paper takes care to ensure that confidence score is calibrated — meaning if the model says it's ninety percent sure, it should actually be right about ninety percent of the time. That kind of reliability is what makes a tool genuinely useful in a real lab, rather than just impressive on a benchmark.
Alex: I noticed the paper also stops distinguishing between reactants and reagents when feeding data into the model. Why make the task harder on purpose?
Sam: That's a sharp observation. In practice, the line between a reactant and a reagent is often blurry — chemists don't always have time to perfectly label every component. By forcing the model to figure out the reaction center from a mixed list, the researchers made it more robust to the messy reality of daily lab work. It's less picky about how you input the data, which makes it more versatile.
Alex: And there's also something about 3D structure — the shape of the molecule, not just its composition?
Sam: Yes. This is called stereochemistry. Imagine your left and right hands — they have the same parts arranged in the same way, but they're mirror images and they behave differently. In chemistry, two molecules can have identical ingredients but different 3D shapes, and that difference can completely change how they interact with the body or with other chemicals. Older models used graph-based representations, which often struggle to capture those spatial differences. Because this model reads the SMILES string as a sequence — the way you'd read a sentence — it picks up on the subtle patterns that encode 3D shape, without needing an explicit spatial map.
Alex: So it's learning the shape of the molecule just by reading the string.
Sam: Precisely. It's a more efficient way to capture information that older approaches found genuinely difficult. And taken together — the removal of atom mapping, the confidence scoring, the handling of 3D structure — it adds up to a system that learns the grammar of chemistry from data rather than from human-written shortcuts. That makes it a more flexible and reliable tool for chemical discovery.
Alex: That's a meaningful shift in how this kind of problem gets approached. Thanks for walking us through it, and thanks to everyone listening to ResearchPod.