AI Retrosynthesis: Computer-Aided Synthesis Planning Architecture (2026)
Give a computational chemist a target molecule and ask how to make it, and the honest answer is to work backward. AI retrosynthesis systems automate exactly that backward search: starting from a drawn structure, they recursively propose simpler precursors until every branch bottoms out at a chemical you can actually purchase. The idea itself is not new — Elias James Corey formalized retrosynthetic analysis in the 1960s, decomposing molecules into synthons and matching them against known literature transforms by hand, work that later earned him a Nobel Prize. What changed is throughput. A modern computer-aided synthesis planning (CASP) stack pairs a learned single-step reaction model with a tree search over thousands of candidate disconnections, returning ranked routes in seconds rather than days of library searching. That speed is reshaping how drug discovery, agrochemical, and materials teams triage which molecules are worth making at all. It is also easy to oversell, because a chemically plausible route on paper is not automatically one a bench chemist would trust with real reagents.
What this covers: the two-loop CASP architecture, the competing single-step model families, the tree-search algorithms that stitch single steps into full routes, a worked disconnection example, and where the honest limits of AI retrosynthesis sit today.
Context and Background
Corey’s retrosynthetic analysis reframed synthesis as a search problem decades before anyone had the compute to search at scale. His logic-centered approach broke a target into synthons — idealized fragments implied by a bond disconnection — then mapped each synthon back onto a real reagent and a named transform: a Grignard addition, a Diels-Alder cycloaddition, a Suzuki coupling. Chemists internalized a personal library of a few hundred to a few thousand such transforms and applied them by pattern-matching intuition and literature precedent. Software attempts to formalize this go back to the 1960s with Corey’s own LHASA (Logic and Heuristics Applied to Synthetic Analysis) program, which encoded transforms as hand-written rules. LHASA and its rule-based successors worked, but scaled only as fast as chemists could write and maintain rules, and they could not rank routes by anything more principled than heuristic scores.
Two things changed that ceiling. First, large reaction databases — Reaxys, SciFinder, and the public United States Patent and Trademark Office (USPTO) reaction corpus extracted from patent text — gave researchers millions of atom-mapped reaction examples instead of a few thousand hand-curated rules. Second, the same sequence models and graph neural networks that reshaped natural language processing turned out to transfer well to molecules, because a reaction is structurally similar to a translation problem: one string (or graph) of atoms in, a different one out. Modern AI retrosynthesis inherits both threads. It still uses Corey-style disconnection logic as the mental model, but the transform library and the search over it are learned from data rather than hand-coded, and the resulting field is generally called computer-aided synthesis planning. For adjacent territory on how machine learning now stands in for first-principles simulation in chemistry and materials science, see this site’s coverage of machine learning interatomic potentials for atomistic simulation, and IBM’s RXN for Chemistry platform documents one production-grade implementation of the ideas below.
The data itself needed work before any of this was trainable. Raw patent-extracted reactions come without a canonical mapping of which product atom came from which reactant atom, and without that atom-mapping, a model cannot learn “this bond formed here” as a clean supervised signal — early pipelines leaned on cheminformatics tools like RDKit combined with algorithms such as RXNMapper to infer atom correspondence automatically, and mapping errors upstream propagate directly into template-extraction errors or noisy training pairs downstream. This is a recurring theme in AI retrosynthesis that’s easy to miss from the outside: a large fraction of the field’s real engineering effort goes into data curation and representation choices — canonicalizing SMILES, deduplicating near-identical reactions, filtering out atom-mapping failures — rather than into the model architectures that get most of the attention in papers.
The Two-Loop CASP Architecture
A working computer-aided synthesis planning system is two coupled loops, not one model. An inner loop answers “what could make this molecule in one step” using a single-step retrosynthesis model; an outer loop decides which of those candidate precursors to expand next, checks each leaf against a stock of purchasable building blocks, and searches over the resulting tree until it finds routes that terminate cleanly. Everything else — scoring functions, condition prediction, feasibility filters — sits between those two loops.

Figure 1: The two-loop AI retrosynthesis architecture — a single-step model proposes precursor sets, a scoring function ranks them, and a multi-step tree search recursively expands unresolved nodes until they resolve against a stock set.
The diagram separates concerns that are easy to conflate. The single-step model is a local, one-shot function: given a product, propose a plausible set of reactants that could form it in a single reaction. It has no notion of a multi-step plan. The search loop is what turns a pile of single-step proposals into an actual route — it decides which node to expand next, when to stop, and how to rank the routes it finds. Coupling them naively (always expand the single-step model’s top prediction) produces brittle, greedy routes; production systems decouple scoring from expansion so the search can back out of a locally attractive but globally dead-end branch.
The single-step model as a local oracle
Call the single-step model repeatedly with a candidate molecule as input and it returns a ranked list of reactant sets, each with a confidence score. Nothing about that call knows whether the proposed reactants are themselves easy to make — that judgment belongs to the search loop, which recursively calls the same oracle on each new precursor. This recursive structure is why the field talks about single-step and multi-step retrosynthesis as genuinely separate subproblems: you can swap in a better single-step model without touching the search algorithm, and vice versa, and most published advances target one or the other in isolation.
The stock set as the termination condition
A route search has to stop somewhere, and the stopping condition is a stock or building-block set — a list of molecules considered “purchasable” or “in inventory,” typically sourced from catalogs like eMolecules or ZINC, or a lab’s actual reagent inventory. A node in the search tree counts as solved the moment its molecule matches (usually by exact structure or a fingerprint-similarity threshold) something in the stock set; the tree search’s job is to drive every leaf of a chosen route into that set. Stock set composition is an underrated lever: a narrow stock set forces longer, more convoluted routes because the search cannot terminate early, while an overly permissive one can suggest routes that look short on paper but rely on precursors nobody can actually source quickly.
The scoring function as the tiebreaker
With many valid partial routes competing for expansion budget, something has to rank them. Scoring functions typically combine the single-step model’s per-step confidence, an estimate of the remaining cost or difficulty to reach the stock set (a “cost-to-go” heuristic in search terms), and sometimes an explicit reaction-feasibility classifier trained to flag chemically implausible steps. This composite score is what the multi-step search actually optimizes, and it is also the component most prone to what practitioners call reward hacking — a search will happily exploit any blind spot in the scoring function, producing routes that score well but that a synthetic chemist would reject on sight. Condition prediction (which reagents, catalysts, solvents, and temperatures a proposed transform actually needs) and yield or selectivity prediction are adjacent tasks that plug into this same scoring layer, refining a route from “structurally plausible” toward “operationally executable.”
Yield and condition prediction deserve a second look because they’re where a lot of the field’s near-term commercial value sits. A route that is structurally valid but relies on a step with a chronically low or highly variable literature yield is not actually a good route to hand a process chemist, even if every disconnection in it is textbook-correct. Models trained to predict reagents and conditions given a reaction (rather than just whether the transform is plausible at all) let a scoring function penalize routes that depend on finicky, low-yielding, or hard-to-control steps, pushing the search toward routes that are not just chemically valid but operationally boring — which, in process chemistry, is usually exactly what you want.
Single-Step Models, Tree Search, and a Worked Disconnection
The single-step retrosynthesis model families trade off differently on precision, generalization, and interpretability, and picking one shapes everything downstream in the search.
Template-based models
Template-based retrosynthesis extracts reaction templates — generalized, atom-mapped patterns like “an aryl halide plus a boronic acid gives a biaryl” — automatically from reaction databases, typically by algorithmically stripping a real reaction down to its reacting core and a small radius of surrounding atoms. At inference time, the model doesn’t generate reactants from scratch; it retrieves candidate templates whose product-side pattern matches the target molecule, then a relevance or ranking classifier (often a neural network trained to predict which of thousands of templates is most likely applicable) orders them. Applying a template mechanically produces the reactant structures. This retrieval structure is the family’s core strength: every proposal is grounded in a real, previously observed reaction pattern, which tends to yield high chemical validity and strong precision on well-represented reaction classes. The corresponding weakness is generalization — a template library built from USPTO or Reaxys data can only propose disconnections it has seen before, so it systematically underperforms on genuinely novel bond formations, new catalyst chemistry, or reaction types published after the template extraction date.
Template-free models
Template-free approaches treat retrosynthesis as sequence-to-sequence translation over SMILES (Simplified Molecular Input Line Entry System) strings — the linear text notation used to represent molecular structure. A transformer encoder-decoder is trained on paired (product SMILES, reactant SMILES) examples and learns to generate reactant strings directly, token by token, with no explicit template library in between. This is a close cousin of the forward-direction Molecular Transformer, which predicts reaction products from reactants and reagents and is often used as a validation tool for retrosynthesis proposals: run a candidate disconnection forward through the Molecular Transformer, and if it reconstructs the original target, that’s a “round-trip” check. Tokenization matters more here than it looks: SMILES strings are typically split at the level of atoms, bonds, ring-closure digits, and bracketed groups rather than characters, because naive character-level tokenization blows up sequence length and loses chemical structure cues. Template-free models can, in principle, propose disconnections no template library contains, which is their main draw. The tradeoff is that a sequence decoder can generate syntactically invalid SMILES or chemically nonsensical structures (wrong valences, broken rings), and top-k accuracy — the fraction of test reactions where the correct reactants appear anywhere in the model’s top k beam-search outputs — has to be read alongside a separate validity check, because a high top-k number that includes invalid strings overstates real performance.
Training these decoders is a standard maximum-likelihood setup — cross-entropy loss against the ground-truth token sequence, teacher-forced during training — but inference uses beam search rather than greedy decoding, because greedily picking the single most likely next token at each position tends to collapse onto one bland, high-frequency disconnection pattern and miss viable alternatives. Wider beams surface more diverse candidate reactant sets at the cost of more downstream validity checking, which is exactly the precision-versus-coverage tradeoff the whole single-step layer keeps running into in different forms. Because the decoder has no built-in notion of chemical validity, a well-engineered template-free pipeline always wraps generation with a post-hoc filter — parsing each candidate SMILES string back into a molecular graph with a cheminformatics toolkit and discarding anything that fails to parse or violates basic valence rules — before the candidates ever reach the scoring function.
Semi-template models
Semi-template (also called graph-edit or two-stage) methods split the difference. A first model predicts the reaction center — which bonds in the product actually break — producing intermediate fragments called synthons, essentially Corey’s original concept implemented as a learned graph-editing step. A second model then completes each synthon into a full, valid reactant molecule, often by predicting which “leaving groups” or substituents need to be attached. Because the first stage operates on the product’s molecular graph directly rather than a linearized string, semi-template methods tend to produce higher validity rates than pure template-free decoding while retaining more generalization ability than template retrieval, at the cost of a more complex two-model pipeline that has to keep both stages calibrated against each other.

Figure 2: The three single-step model families for AI retrosynthesis — template-based retrieval, template-free sequence generation, and semi-template reaction-center prediction — each trading precision against generalization differently.
| Model family | How it works | Strength | Weakness | Typical use case |
|---|---|---|---|---|
| Template-based | Match target against extracted reaction templates, rank by relevance classifier | High precision on covered chemistry; interpretable, grounded in real precedent | Cannot propose disconnections outside the template library | Well-trodden chemical space (medicinal chemistry SAR series) |
| Template-free | Sequence-to-sequence transformer decodes reactant SMILES directly | Can generalize to novel disconnections; simple end-to-end training | Can emit invalid SMILES; harder to interpret why it proposed a step | Exploratory routes, novel scaffolds |
| Semi-template | Predict reaction center, then complete synthons into reactants | Better validity than pure template-free; more general than pure template-based | Two-stage pipeline adds calibration complexity | Middle ground; production systems blending precision and coverage |
Multi-step search over an AND/OR tree
Multi-step retrosynthesis is naturally an AND/OR tree, not a simple tree. Every molecule node is an OR node — the search must choose one disconnection strategy among several proposed by the single-step model. Every disconnection, in turn, is an AND node, because producing that product requires solving for all of its proposed precursors simultaneously, not just one. A route is only complete when every leaf across every branch of a chosen AND node resolves to the stock set.
Segler, Preuss, and Waller’s widely cited 2018 Nature paper, “Planning chemical syntheses with deep neural networks and symbolic AI,” popularized Monte Carlo Tree Search (MCTS) for this problem, using a variant sometimes described as 3N-MCTS because it combines three trained neural networks — one for expansion (the single-step model), one for rollout, and one for in-scope filtering — inside the standard MCTS selection-expansion-simulation-backpropagation loop. MCTS balances exploring under-visited branches against exploiting branches that have scored well so far, using an upper-confidence-bound-style selection rule, and it was validated in that paper partly through blinded evaluation by practicing chemists who could not reliably distinguish its proposed routes from literature routes.
Retro* is a different search strategy built specifically for AND/OR retrosynthesis trees, adapting ideas from AO* search with an admissible cost-to-go heuristic — a function that estimates, without overestimating, how much further “cost” remains to fully solve a partially expanded route. Because it can prove a node unsolvable and prune it, Retro* tends to be more sample-efficient than MCTS at finding at least one valid route, though MCTS’s exploration behavior can still surface a broader set of diverse alternative routes. Proof-number search is a related family, tracking, for every node, a “proof number” and “disproof number” that estimate how many additional expansions would be needed to prove the node solved or unsolved, and prioritizing expansion where that gap is smallest.

Figure 3: Multi-step AI retrosynthesis search over an AND/OR tree — OR nodes choose among competing disconnections, AND nodes require every branch to resolve, and a cost-to-go value function guides which node the search expands next.
Open tooling has made this architecture reproducible outside the labs that invented it. AstraZeneca’s AiZynthFinder implements Retro*-style MCTS-adjacent search over a template-based expansion policy and ships with pretrained USPTO models, making it a common academic baseline. MIT’s ASKCOS (originally released as ASKCOP internally before its public rebrand) packages single-step prediction, multi-step tree search, condition recommendation, and reaction outcome prediction into one platform. IBM’s RXN for Chemistry exposes a template-free Molecular Transformer-based retrosynthesis and forward-prediction service through a web interface and API. All three are worth trying side by side on the same target molecule, because their disagreement is often more informative than any single tool’s top-ranked route.
A worked disconnection example
Take ibuprofen as a target — simple enough to reason about by hand, which makes it a good sanity check for any CASP tool. A template-based or semi-template model presented with ibuprofen’s carboxylic acid will very plausibly propose disconnecting at the alpha carbon, recognizing the “carboxylic acid alpha to an aryl ring” pattern and suggesting a precursor pair consistent with a Friedel-Crafts acylation of isobutylbenzene followed by a Grignard carboxylation-type sequence, or alternatively a route through 1-(4-isobutylphenyl)ethanone — an aryl methyl ketone that is itself a purchasable stock molecule. The search loop takes each of those precursor candidates and asks the single-step model to solve them recursively: is the aryl ketone in stock, or does it need a further disconnection back to isobutylbenzene and acetyl chloride? A good scoring function will prefer the route that terminates at the aryl ketone, because it is shorter and its precursor is directly purchasable, over a longer route that reaches equally valid but more remote starting materials. This is precisely the tradeoff the AND/OR search is built to resolve automatically, at a scale no chemist manually re-derives per target — and it is also exactly the kind of well-precedented, template-covered chemistry where template-based and semi-template models perform best, which is worth remembering before extrapolating that same confidence to a genuinely novel scaffold.
Trade-offs, Gotchas, and What Goes Wrong
The gap between “the model output a valid SMILES string” and “a chemist would run this reaction” is the single most important thing to understand about AI retrosynthesis, and it is where most of the field’s honest limitations live.
Round-trip validation — running a proposed disconnection forward through a separate forward-reaction model and checking whether it reconstructs the target — is the standard automated proxy for correctness, and it is a proxy, not a ground truth. A forward model trained on the same underlying data distribution as the retrosynthesis model can share its blind spots, so a proposed route can round-trip cleanly while still describing a reaction that would not work on a real benchtop: wrong regiochemistry that the forward model doesn’t penalize, an incompatible functional group elsewhere in the molecule that the local reaction-center prediction never considered, or a transform that is only reported in the literature under specialized catalytic conditions the model has no way to represent. Benchmark leakage compounds this: USPTO-extracted benchmarks are drawn from patent text, which skews toward large-scale, well-optimized medicinal chemistry and process chemistry, systematically underrepresenting failed reactions, negative results, and the messier reaction classes common in exploratory academic synthesis. A model that looks strong on USPTO-derived test splits can quietly degrade on out-of-distribution real bench chemistry — a distribution-shift problem common to every deep learning system trained on convenience data.
Stereochemistry is a recurring failure mode specifically because most retrosynthesis datasets and many SMILES-based encodings under-specify or drop stereo descriptors, so a model can propose a structurally correct disconnection while being silent or wrong on which enantiomer or diastereomer actually forms — a serious problem for pharmaceutical targets where the wrong stereoisomer can be inactive or unsafe. Protecting-group logic is a related gap: real synthetic routes routinely need to temporarily mask a reactive functional group (an amine, an alcohol) so it survives an unrelated step elsewhere in the molecule, then deprotect it later. Reaction-level models trained on isolated single-step examples have limited visibility into that kind of multi-step bookkeeping unless the training data explicitly includes protection and deprotection steps as their own reaction class, and stitching those steps coherently across an entire route is still more search-and-heuristic than learned end-to-end.

Figure 4: Where AI retrosynthesis routes actually fail — from invalid molecular structures through round-trip disagreement, novel-chemistry blind spots, stereochemistry errors, protecting-group gaps, and reagents that are not really buyable.
Combinatorial explosion is the search-side counterpart to these modeling gaps. A single-step model that returns dozens of plausible candidates per node, expanded recursively across a route that might need six to ten steps, produces a search space that grows enormously; production systems bound this with beam width limits, expansion budgets, and pruning heuristics, all of which reintroduce the possibility of discarding a valid but low-scoring branch too early. Reward hacking of the scoring function shows up here too — a search will reliably find and exploit any gap between what the score measures and what a chemist actually cares about, for instance favoring routes through molecules that are technically present in a stock database but are, in practice, extremely slow or expensive to actually procure. Finally, negative-data scarcity limits everything upstream: reaction databases are built almost entirely from published successes, so models have comparatively little signal about which plausible-looking transforms reliably fail, which is exactly the kind of information a bench chemist accumulates through experience and that no current CASP system has systematically at scale.
Practical Recommendations
None of the limitations above are arguments against using AI retrosynthesis; they are arguments for using it as a route-generation and triage tool rather than an autonomous decision-maker. The strongest current workflows keep a chemist explicitly in the loop: generate a broad set of candidate routes quickly with a CASP system, use round-trip validation and stock-set filtering as a first-pass sieve, then have a synthetic chemist manually inspect the top handful for stereochemistry, protecting-group feasibility, and known incompatibilities before committing bench time. Treat single-step model family choice as a real design decision rather than a default: template-based or semi-template models for well-precedented chemical space where precision matters most, template-free models when you specifically need proposals outside the template library’s coverage, and ideally an ensemble that surfaces disagreement between families as a signal worth investigating rather than averaging away.
Curate the stock set deliberately rather than accepting a tool’s default. A default eMolecules or ZINC snapshot tells the search what’s theoretically purchasable somewhere in the world, not what’s on your lab’s shelf or available on the lead time your project actually has; swapping in an internal inventory file, even a rough one, tends to produce noticeably more actionable routes than the out-of-the-box catalog, because the search stops padding routes with technically-buyable-but-slow reagents. Similarly, don’t take a single search algorithm’s route count as a proxy for quality — a search that returns two hundred routes and one that returns eight are not necessarily reporting different underlying chemistry; they may just be running different expansion budgets or pruning thresholds, and the right comparison is always the top few routes each finds, not the raw count.
The next layer of maturity is closing the loop with execution. Self-driving labs and autonomous synthesis robots — automated platforms that can physically run a proposed reaction, analyze the product by mass spectrometry or NMR, and feed the pass/fail result back into the model — are the clearest path to fixing the negative-data scarcity problem described above, because they generate exactly the failed-reaction signal that patent-derived training data lacks. That feedback loop is still early and expensive relative to pure in-silico planning, but it is the direction the field is visibly moving, and it connects naturally to broader trends in AI-driven structure prediction and design covered elsewhere on this site, including AI protein design with RFdiffusion and cryo-EM structure prediction for drug discovery, both of which face a version of the same “computationally plausible versus experimentally validated” gap.
Checklist before trusting a proposed AI retrosynthesis route:
- [ ] Round-trip validated the top-ranked routes through an independent forward-reaction model, not just the retrosynthesis model’s own confidence score.
- [ ] Cross-checked routes across at least two model families (for example, a template-based tool alongside a template-free one) and treated disagreement as a flag, not noise.
- [ ] Manually reviewed stereochemistry at every stereocenter the route creates or preserves.
- [ ] Confirmed every “in stock” leaf node is actually purchasable at the needed scale and lead time, not just structurally matched.
- [ ] Checked for functional-group incompatibilities across the whole route, not just within individual proposed steps.
- [ ] Had a synthetic chemist sanity-check the shortest 2-3 routes before allocating bench time.
Frequently Asked Questions
What is AI retrosynthesis?
AI retrosynthesis is the use of machine learning models to plan how to synthesize a target molecule by working backward from the product to simpler precursors, recursively, until every branch reaches a purchasable starting material. It automates Corey-style retrosynthetic analysis with models trained on large reaction databases instead of hand-coded chemist rules, combining a single-step reaction-prediction model with a multi-step search algorithm.
How is AI retrosynthesis different from computer-aided synthesis planning?
They largely refer to the same field. Computer-aided synthesis planning (CASP) is the broader, longer-standing term covering both rule-based systems like the 1960s-era LHASA and modern learned systems. “AI retrosynthesis” typically emphasizes the machine-learning components specifically — the single-step prediction model and the learned or search-based route planner — within a CASP pipeline.
Are template-based or template-free models more accurate?
Neither wins outright; they trade off differently. Template-based models tend to have higher precision and validity on chemistry well-represented in their template library, because every proposal is grounded in an observed reaction pattern. Template-free models generalize better to novel disconnections outside that library but are more prone to generating invalid or chemically implausible structures, so top-k accuracy figures should always be read alongside a separate validity check.
Can AI retrosynthesis routes be trusted without a chemist reviewing them?
Not reliably yet. A route can pass automated round-trip validation and still fail on stereochemistry, protecting-group logic, functional-group incompatibilities, or real-world reagent availability, because these checks rely on the same kind of training data and modeling assumptions that create the underlying blind spots. Current best practice treats CASP output as a fast first-pass filter, with a synthetic chemist reviewing the shortlisted routes before any bench work begins.
What is the role of Monte Carlo Tree Search in retrosynthesis?
Monte Carlo Tree Search (MCTS) is one of the main algorithms used to search the AND/OR tree of possible multi-step routes, balancing exploration of new branches against exploiting branches that have scored well so far. Segler et al.’s 2018 Nature paper popularized a neural-network-guided MCTS variant for this problem; Retro* and proof-number search are alternative search strategies built more specifically around the structure of AND/OR retrosynthesis trees.
What open-source tools can I use to try AI retrosynthesis myself?
AiZynthFinder (AstraZeneca) is a widely used open-source Retro*-style MCTS tree search over a template-based single-step model, distributed with pretrained USPTO models. ASKCOS (MIT) packages single-step prediction, multi-step search, condition recommendation, and reaction-outcome prediction into one platform. IBM’s RXN for Chemistry offers a template-free, Molecular Transformer-based retrosynthesis service through a web interface and API.
Further Reading
- Machine learning interatomic potentials for atomistic simulation — how learned models replace first-principles calculation elsewhere in computational chemistry.
- AI protein design with RFdiffusion — the same generate-then-validate pattern applied to protein structure.
- Cryo-EM and AI structure prediction for drug discovery — where structural biology meets the same in-silico-versus-bench-validated gap.
- Segler, M. H. S., Preuss, M., & Waller, M. P. (2018). “Planning chemical syntheses with deep neural networks and symbolic AI.” Nature, 555, 604-610.
- Schwaller, P. et al. “Molecular Transformer: A Model for Uncertainty-Calibrated Chemical Reaction Prediction.” ACS Central Science, 2019 — the forward-prediction model widely used for round-trip validation of retrosynthesis routes.
- Genheden, S. et al. “AiZynthFinder: a fast, robust and flexible open-source software for retrosynthetic planning.” Journal of Cheminformatics, 2020 — open-source implementation referenced above.
By Riju — about
