SYSTEM1
Technical articles

Designing multilayer decision architectures

A synthesis plan needs chemical ideas, exact molecular operations and judgments about the whole route. Where should one model's task end and another begin?

A chemist needs a process that produces L-menthol, the form of menthol familiar from mint products. The plan must deliver a particular three-dimensional arrangement of atoms. A molecule with the same connections but the opposite arrangement is a different product.

That requirement reaches through the whole plan. A proposed reaction might establish the required arrangement early. Another route might produce a mixture and require a later separation. A short route can conceal a difficult selectivity problem. A longer route can use an intermediate whose structure already contains part of the answer.

The chemist needs to explore those possibilities, inspect doubtful steps and revise the route. Several kinds of judgment must work together. A model that proposes a plausible reaction does not answer all of them.

Chemical synthesis planning offers a mature setting for a broader design question: how should we divide a continuing activity among learned decisions, domain tools and human choices?

Begin with the result the plan must deliver

L-menthol and its mirror image have the same atom connections. Their spatial arrangements differ, like left and right hands. A molecular record therefore needs more than a list of bonds. PubChem’s L-menthol record specifies its stereochemistry, the arrangement of atoms in space. The two representations below preserve different amounts of that information. PubChem, compound 16666

The target includes spatial information. These original molecular drawings use the PubChem structure. An unspecified representation does not establish which form a process produces.

This distinction affects real process design. BASF’s historical account of its citral-based process describes an asymmetric hydrogenation step that favors one mirror-image form. Two subsequent synthesis steps produce L-menthol. The same account contrasts this strategy with processes that require separation of a mixture. These are established chemical approaches, not routes discovered for this article. BASF, The cool freshness of menthol, 2012 account

For the worked design, imagine a planner that helps the chemist compare those two broad strategies. One branch asks where the route establishes the required spatial arrangement. Another asks whether a proposed mixture can lead to the required isolated product. The interface keeps those questions attached to the relevant steps.

This is an architectural proposal, not a new menthol synthesis or an executed model study. We will use the chemical requirement to examine what each model must know and what its output allows the next stage to do.

Give different questions different tasks

Retrosynthesis starts with a desired product and proposes compounds from which a reaction could produce it. The planner repeats this process for compounds that still need a route. A proposed reaction can require several precursors, so the plan branches in two distinct ways:

  • Alternative reactions: any one suitable reaction can supply a route to the product.
  • Required precursors: the chosen reaction needs every precursor that its representation specifies.

The distinction matters. An attractive branch that reaches one available precursor is incomplete if another required precursor has no route. A model score on the final reaction does not remove that obligation.

Two forms of branching. A reaction alternative is a choice. Its required precursors are a joint obligation. The schematic separates a connected route from an assessed reaction.

Segler, Preuss and Waller’s synthesis-planning work combines a policy that prioritizes reaction templates, symbolic template application, a learned filter and search. A reaction template encodes a pattern of molecular changes. The policy helps choose promising patterns. The symbolic operation constructs the corresponding precursor structures. The filter and search answer further questions about which possibilities to pursue. Learning to Plan Chemical Syntheses, 2017 preprint, Figures 1–2 and methods

This division gives each stage an inspectable responsibility. It also exposes different failure modes. The policy can overlook a useful transformation. A template can represent a narrower class of reactions than the chemist needs. A filter can reject a feasible step. Search can spend its budget on an unproductive branch.

Calling all four stages “reasoning” would conceal the differences that matter when we improve the system.

Separate structural operations from chemical predictions

A domain tool can apply a template, preserve atom identities and check the resulting representation. It can distinguish a specified spatial arrangement from an unspecified one. It cannot establish experimental success merely because it produces a valid molecular graph.

RDChiral illustrates this boundary. Its implementation wraps reaction application with explicit rules for tetrahedral centers and double-bond geometry. It checks matches and adjusts the stereochemical information in generated outcomes. Those operations preserve meaning that an ordinary string transformation could lose. They do not replace a model of how a reaction behaves in a laboratory. RDChiral implementation and expected behavior

Return to the menthol planner. Suppose a candidate step produces the required atom connections but leaves a relevant spatial arrangement unspecified. The tool can identify the missing specification. The next chemical question is whether that step, under particular conditions, would favor the required form.

A learned model needs the evidence that bears on that question. Reactant structures alone may be insufficient. Catalyst identity, reagents, solvent and other conditions can affect the outcome. If the model never receives a decisive condition, a more elaborate output schema cannot recover it.

The input contract should state what the model can assess. The output should distinguish a predicted form, a predicted distribution when the model supports one, and an unresolved result. A planner must not silently convert an unspecified product into the requested pure form.

This boundary changes the chemist’s next action. The planner can seek conditions, inspect relevant precedents or pursue a route that establishes the arrangement at another step. It has a useful response even when it cannot complete the branch.

Connect the tasks through meaningful objects

A one-step model can return a set of precursor structures. A condition model can propose contexts for that reaction. An outcome model can assess the reaction under those contexts. The next task should receive those actual objects, including the distinctions it needs to preserve.

Model boundaries follow different chemical questions. Domain tools carry structures between them. A result at one stage supplies the inputs for the next stage.

For this planner, the contracts could look like this:

Task Required input Useful output
Propose a step Target structure, including required stereochemistry Alternative transformations and precursor sets
Construct a candidate Target, selected template and exact atom mapping Precursor structures, or a representation failure
Propose conditions Candidate reaction and the evidence available to that model Candidate conditions with their provenance
Assess an outcome Reactants and the conditions the model actually uses Predicted products and unresolved aspects of the prediction
Develop the route Candidate steps, all required precursors and available starting materials Competing route ideas and the next useful expansions
Compare routes The chemist’s objectives, route structure and assessed step information Explicit tradeoffs and questions that could change the choice

The table does not require six models. A single model may answer several related questions well. Some operations need ordinary code. The purpose is to keep each consequential distinction visible across the boundary.

ASKCOS provides a concrete precedent for this interaction. Its planner lets chemists inspect reaction precedents, evaluate proposed steps, exclude molecules or reactions, and add precursor ideas. It also offers condition and outcome prediction as distinct functions. Its 2025 account describes multiple one-step strategies that run sequentially and then combine their suggestions. The parallel execution proposed here is a design choice, not a reported ASKCOS timing result. ASKCOS: Open-Source, Data-Driven Synthesis Planning, Sections 3–4

Decide what can proceed in parallel

Once the planner has several candidate reactions, it can assess candidates whose inputs are complete without waiting for unrelated branches. It can also explore different unresolved precursors. The chemist can inspect a promising step while other work continues.

Some judgments must wait. A condition-dependent outcome prediction needs the relevant condition proposal. A comparison of complete routes needs the steps that define those routes. Parallel execution cannot remove a dependency in the task itself.

The interface should reveal useful partial work. A route can have a promising final transformation, one available precursor and an unresolved earlier step. That state gives the chemist somewhere precise to intervene. A single “working” indicator hides the developing chemical ideas.

For the menthol example, the chemist could inspect the step intended to establish handedness while another branch explores alternative starting materials. If the first branch cannot support its selectivity claim, the second branch remains a live option. The system need not discard every candidate and generate a new complete narrative.

A useful response-time measure is time to a meaningful choice, such as a new route alternative or an inspectable selectivity question. Time to a full route is another measure. Neither establishes laboratory success.

Suppose the chemist rejects a proposed step after inspecting its precedent. The precedent concerns a materially different substrate, the molecule on which the reaction acts. A transformation that looks similar on a diagram may behave differently on the current structure.

The correction has several consequences. That reaction loses its role in the current route. Other reactions from the same precursor can remain candidates. A different route to the same intermediate can remain useful. The planner can also seek a more suitable precedent instead of treating the exclusion as a ban on an entire reaction class.

This requires a correction with a specific scope. “Do not use this reaction here” differs from “exclude this intermediate” and “avoid this class of chemistry.” A model must interpret the chemist’s intention. The domain tool must apply the chosen scope to the route graph.

The system also needs to distinguish an expert rejection from an experimental failure. The first records a reason to change the plan. The second records an observed outcome under actual conditions. Both can help future learning, but they support different labels.

This is where a layered architecture can change the work itself. The chemist can develop several ideas, correct one relationship, retain other useful work and ask a more precise question next. The model tasks and domain objects make those interventions addressable.

Every additional model must earn its place

More layers can increase cost, delay and opportunities for error. A fast filter is valuable if it avoids enough poor expansions. It is harmful if it removes the only practical route early.

AiZynthFinder’s 2020 implementation offers a useful comparison. It omits the earlier approach’s separate filter and rollout policy. Its authors also distinguish a search that reaches the defined stock from a route of high practical quality. This shows that a successful architecture can simplify the model division. It does not isolate the effect of that choice across different datasets, stocks and execution environments. AiZynthFinder: a fast, robust and flexible open-source software for retrosynthetic planning, methods and discussion

Test a proposed filter in two roles. It could remove candidates, or it could change their priority while leaving them available. The second approach can preserve a promising exception at the cost of more search. The right choice depends on the cost of missed routes and unnecessary expansions in the intended activity.

Also compare a capable general model with access to the same domain tools. It may provide useful initial routes, interpret corrections or coordinate specialist predictions. The layered design earns its complexity when its division improves the complete work, not merely because its diagram contains more boxes.

Train the boundaries on the work they will receive

A model downstream of another model sees that model’s mistakes. Training it only on clean, published reactions omits a major part of its eventual input.

An outcome assessor should encounter the candidate reactions that the proposal stage actually produces. These include implausible transformations, missing conditions and structurally valid proposals with uncertain selectivity. The assessor must learn when its evidence supports a prediction and when another kind of investigation is needed.

The data should also distinguish different objectives. A dominant-product label does not directly train yield prediction. A successful published reaction does not describe every unsuccessful alternative. A recorded pure product does not establish that the reaction itself was fully selective if a later separation supplied that purity.

For the menthol example, the training record should preserve where the route establishes or resolves the required spatial arrangement. Otherwise, the model may learn a shortcut: treat every route that names the desired final product as if every upstream selectivity question were settled.

Evaluate related stages separately, then evaluate their composition:

  • Does the proposal stage retain useful alternatives for unfamiliar targets?
  • Do molecular operations preserve the required structural distinctions?
  • Do outcome predictions answer the question supported by their actual inputs?
  • Can the search recover when an attractive step becomes unavailable or doubtful?
  • Can a chemist understand and correct the resulting plan without losing useful alternatives?

Keep related reactions and near-duplicate records from crossing evaluation partitions. Include targets and reaction settings outside the most common training patterns. A reference route is one known solution, so exact agreement with it is insufficient as the only measure of route quality.

Scores from connected models also need careful interpretation. If the proposal and outcome models learned from overlapping reaction records, their agreement is not independent confirmation. A route score built from several local scores needs its own evaluation against the intended route outcome.

Design the activity before the deployment graph

The chemistry example gives us a practical sequence for architecture work. Specify the result, identify the judgments that can change the plan, and define the domain objects those judgments need. Then decide which operations need models, which need code and which remain expert choices.

Deployment follows those decisions. Several model tasks can share a service. Independent branches can use separate workers. A domain tool can expose a stable API while its implementation combines learned predictions and exact operations. Those choices should preserve the task boundaries rather than dictate them.

The resulting instrument offers more than a finished suggestion. It gives the person access to a developing set of possibilities: inspect a step, pursue an alternative, revise a requirement and continue. The architecture succeeds when those actions become useful parts of the work.

← All articlesExplore your business ↗