AI Retrosynthesis: Routes You Can Actually Run
AI retrosynthesis planning explained with a real ChemReason run on celecoxib: what the model returned, which disconnections a chemist can run, and what it.
Oliver Kraft
CovaSyn

Every retrosynthesis tool will hand you a tree. The question is whether any branch of it survives contact with a fume hood. A route that scores 1.00 and a route a chemist will run are different objects, and the gap between them is where most CASP evaluations go wrong.
This article walks one real run of chemreason_retrosynthesis on celecoxib, shows the raw output, and separates the proposals a process chemist could take to the bench from the ones that need a human edit first.
What an AI retrosynthesis engine actually does
There are two distinct jobs inside any planner, and they fail differently.
Single-step prediction.
Given a target, propose plausible precursors for one disconnection. Two families dominate:
- Template-based. Reaction rules extracted from a corpus such as USPTO or Reaxys are matched against the target and applied in reverse. Predictable, chemically literate, auditable - and structurally incapable of proposing a disconnection nobody has recorded.
- Template-free / ML. A neural model learns the atom-and-bond rearrangement directly. ChemReason uses a Graph Transformer over Bond-Electron Matrices, so a reaction is a change in the electron bookkeeping rather than a string edit. It generalises past the template library, and it will occasionally produce something with an impossible valence.
Multi-step search.
Chaining single steps into a route that terminates in things you can buy. ChemReason runs Monte Carlo Tree Search against a catalogue of 11.4M commercial building blocks. The building-block set matters more than most people expect - it defines what "done" means.
The important consequence: a high route score is a statement about *search termination*, not about yield, selectivity or scalability.
A real run: celecoxib
Target SMILES Cc1ccc(-c2cc(C(F)(F)F)nn2-c2ccc(S(N)(=O)=O)cc2)cc1, 26 heavy atoms, max_steps=4, n_proposals=5.
First, the multi-step result, verbatim:
n_routes: 1
routes[0]: {depth: 0, score: 1, is_complete: true, steps: [],
building_blocks: ["Cc1ccc(-c2cc(C(F)(F)F)nn2-c2ccc(S(N)(=O)=O)cc2)cc1"]}The planner returned depth 0 with a perfect score and no steps. That is not a failure. Celecoxib is in the 11.4M building-block catalogue, so the correct retrosynthetic answer is "buy it". A planner that instead invented a four-step route to a purchasable compound would be worse, not better.
The same thing happened on paracetamol (CC(=O)Nc1ccc(O)cc1, 11 atoms): n_routes: 1, depth 0, score 1.0. Both are catalogue items.
This is the first practical lesson. Run the catalogue check before you read any tree. If you want disconnections for a purchasable target anyway - for cost, IP or process reasons - chemreason_retrosynthesis takes force_decompose=true, and the single-step proposals are returned regardless.
The single-step proposals
For celecoxib, the model returned n_valid: 5, n_unique: 5. All five, unedited:
| # | Proposed precursors | Implied transform | Runnable as written? |
|---|---|---|---|
| 1 | Cc1ccc(-c2cc(C(F)(F)F)nn2-c2ccc(Br)cc2)cc1 + N[SH](=O)=O | Aryl bromide to sulfonamide | Concept plausible (Pd-catalysed sulfonamidation / sulfur dioxide surrogate), partner SMILES is written in a non-standard form |
| 2 | Same aryl iodide + N[SH](=O)=O | Aryl iodide variant | Same caveat |
| 3 | Same aryl bromide + NS(=O)O | Sulfinamide partner | Oxidation state does not match the product |
| 4 | Cc1ccc(-c2cc(C(F)(F)F)nn2-c2ccc(S(=O)(=O)Cl)cc2)cc1 + N | Sulfonyl chloride + ammonia | Yes. Textbook, high-yielding, scalable |
| 5 | Cc1ccc(-c2cc(C(F)(F)F)nn2-c2ccc(S(=O)(=O)NC(C)(C)C)cc2)cc1 | t-Bu sulfonamide deprotection | Yes. Known protecting-group strategy for this class |
Two of five are directly executable. Three need a chemist to fix the reagent or the oxidation state before they mean anything.
Note what is *absent*. All five proposals disconnect the sulfonamide at the periphery. None of them disconnects the pyrazole ring, which is where the actual manufacturing route goes: a 1,3-diketone condensed with 4-hydrazinylbenzenesulfonamide. The model found the easy bond, not the strategic one. That is a very common failure mode across CASP tools, and it is why a single-step list is a prompt for a chemist rather than a plan.

Fast triage: is this thing makeable at all?
Full MCTS takes minutes of GPU time. For filtering a library, chemreason_analyze runs five one-step proposals, checks each precursor against the catalogue, and returns a hit rate at roughly a seventh of the cost.
| Molecule | Heavy atoms | bb_hit_rate | Accessibility | Top proposal |
|---|---|---|---|---|
| Ibuprofen | 15 | 0.57 | high | CC(C)Cc1ccccc1 + CC(O)(Br)C(=O)O |
| Celecoxib | 26 | 0.50 | medium | aryl bromide + sulfonamide partner |
bb_hit_rate is the fraction of proposed precursors already in the 11.4M catalogue. It is a fast synthesizability prior for ranking a generated library. It is not a route, and the ibuprofen top proposal proves the point: the fragments are catalogue-adjacent, but the implied Friedel-Crafts with an alpha-bromo-alpha-hydroxy acid is not how anyone makes ibuprofen. Hit rate high, chemistry wrong.
Route score vs route runnability
A model score and a chemist's verdict answer different questions.
| The score tells you | The score does not tell you |
|---|---|
| The search terminated in purchasable material | Whether the step order tolerates the other functional groups |
| The precursors exist in a catalogue | Price, lead time, or whether the vendor sells kilos |
| The transform resembles the training corpus | Regio- and stereoselectivity on *your* substrate |
| The tree depth | Yield, throughput, cryogenic or hazardous conditions |
| - | Whether the reagent SMILES is chemically well-formed |
The last row is not theoretical. Our paracetamol run with default settings returned a single-step proposal of C.CC12CC(Cl)(NC=O)C1(C)C2.C[SH](=O)=O.O - a bicyclic chloro-formamide with no sensible relationship to the target. n_valid: 1 counts RDKit-parseable, not chemically sane. On a 26-atom drug-like target the model behaved well (5/5 unique and mostly interpretable); on an 11-atom catalogue item it produced noise. Small, densely functionalised targets are the weak spot, and the tool does not warn you about it.
How to use a planner without fooling yourself
1. Check the catalogue first. If depth 0 comes back, stop. Buying is the route. 2. Read the single-step list before the tree. The disconnection set tells you what strategy the model has, and whether it found the strategic bond or the convenient one. 3. Treat every precursor SMILES as a draft. Standardise it, check the valences and the oxidation state, then decide. 4. Use `chemreason_analyze` for libraries, `chemreason_retrosynthesis` for shortlists. Triage runs at roughly a seventh of the cost of a full route search per molecule, which is the difference between screening a thousand and screening ten. 5. Score the route on your constraints, not the model's. Building-block availability at scale, ICH Q3C solvent class, genotoxic intermediates, and whether your kit does the chemistry at all.
What this does not tell you
- No conditions were returned in these runs. The output schema carries
reaction_type,reagents,solvent,temperatureandyield_estimateper step, but both targets terminated at depth 0, so there were no steps to populate. Do not quote a predicted yield you did not see. - `n_valid` means parseable, not plausible. Chemical sanity is your check.
- The catalogue is a snapshot, not your supply chain. A building-block hit says a vendor listed it, not that it ships in the quantity, purity or timeframe you need.
- The model does not know your process constraints. Nothing here accounts for GMP, hazard classification, PMI or a route's regulatory story.
- Retrosynthesis is not a green-chemistry assessment. Run solvent selection and impurity thinking separately.
- This is triage. It ranks where a chemist should spend their attention. It does not replace route scouting, and it is not a filing position.
Frequently asked questions
What is AI retrosynthesis planning?
AI retrosynthesis planning works backwards from a target molecule to purchasable starting materials. A single-step model proposes precursors for one disconnection, and a search algorithm chains those steps into complete routes. ChemReason uses a Graph Transformer over Bond-Electron Matrices for the single-step prediction and Monte Carlo Tree Search over 11.4M commercial building blocks for the multi-step search, returning routes with a completeness flag and a score.
What is the difference between template-based and machine-learning retrosynthesis?
Template-based systems extract reaction rules from reaction databases and apply them in reverse. They are auditable and chemically conservative, but cannot propose a disconnection outside the rule set. Machine-learning systems learn the bond and electron rearrangement directly, so they generalise to unseen chemistry, at the cost of occasionally producing chemically impossible precursors. In practice the ML output needs a chemist's sanity check on every reagent structure.
Why did the retrosynthesis tool return no steps for my molecule?
Because the target is already a purchasable building block. In our run, celecoxib (26 heavy atoms) and paracetamol (11 heavy atoms) both returned n_routes: 1 at depth: 0 with score: 1 and an empty step list from chemreason_retrosynthesis. The planner stops when the target is in the 11.4M building-block catalogue. If you need disconnections anyway, set force_decompose=true.
Does a high retrosynthesis score mean the route is good?
No. The score reflects that the search terminated in catalogue-available material at a shallow depth. It carries no information about yield, selectivity, functional-group compatibility, cost at scale, hazard class or throughput. In our celecoxib run only two of five single-step proposals were directly executable as written; the other three had a non-standard reagent form or a mismatched oxidation state. Chemist review is not optional.
How can I quickly check if a generated molecule is synthesizable?
Use a fast accessibility check before full route search. chemreason_analyze returns a building-block hit rate over five one-step proposals: ibuprofen scored bb_hit_rate 0.57 and accessibility "high", celecoxib 0.50 and "medium". It runs at roughly a seventh of the cost of full planning, which makes it usable across a generated library. Treat it as a prior for ranking, not as evidence that a route exists.
Will an AI planner find the industrial route to a known drug?
Not reliably. For celecoxib, all five proposals from chemreason_retrosynthesis disconnected the peripheral sulfonamide; none proposed the pyrazole ring construction from a 1,3-diketone and an arylhydrazine that the manufacturing route uses. Planners are biased toward frequent, late-stage, easy disconnections. Use them to broaden your option set, not to replace strategic route design.
Related reading
- Generative molecule design that survives ADMET
- Applicability domain: why a model must be able to say "I don't know"
- Solvent selection under ICH Q3C, as a data question
- What a -10 kcal/mol docking score does and doesn't mean
Run chemreason_analyze on your own scaffolds first - it is on the CovaSyn free tier, and it will tell you within a minute whether the full planner is worth running.
Tools for this topic
Use these in your AI agent right away.
- ChemreasonReaction analysis, retrosynthesis, mechanism suggestions.
