alphaFeedback

WorksPhysics and Astronomy

Steerable Single-step Retrosynthesis with Electron-pushing Discrete Flow Matching and Feynman-Kac Steering

AI contributions
Not recorded for this paper
View details

Abstract

Expert chemists perform retrosynthetic analysis in a strategic manner, where each reaction in a route is employed with a specific purpose, combined with mechanistic reasoning represented as electron-pushing arrows to visualize how bonds are formed or broken via electron redistribution. Yet contemporary single-step retrosynthesis models exhibit neither of these properties: their learned reaction distribution is fixed to that of the training data, and reactions are predicted via de-novo generation of the precursors or molecular graph edits, omitting the electron redistribution that governs the chemical transformations. We introduce Verso MAELLE, the first electron-pushing-based single-step retrosynthetic model, representing disconnections as continuous-time Markov chains (CTMC) comprised of edits in the electron space, and is trainable using a discrete flow matching formulation. Being a generative model, Verso MAELLE is optionally steerable at inference time through the Feynman-Kac (FK) framework, using rewards that promote certain types of disconnections. We show that besides in-distribution learning, Verso MAELLE can be steered toward cyclization reactions which are scaffold-constructive but underrepresented in the training corpus, via a ring-breaking reward. As a proof of concept, we show how the electron-pushing reasoning, learned from patented data, combined with a domino incentivizing reward, could steer Verso MAELLE toward creative and strategic disconnections, demonstrated on the key domino sequence that was used to synthesize Punctaporonin U, a complex natural product of the sesquiterpene family.

Introduction

One of the challenges in experimental validation of in-silico generated materials and drugs is their synthesizability [1, 2]. Decomposing a complex organic molecule into readily available precursors is one of the most challenging and intellectually demanding tasks in chemistry [3], being simultaneously a science as well as an art. Corey formalized this endeavour into what is now known as retrosynthesis [4, 5]. Efforts in automating retrosynthesis into Computer-Aided Synthesis Planning (CASP) began more than 50 years ago [6, 7], when Corey and Wipke started with hard-coded reaction rules. Modern, data-driven CASP approaches [8, 9] involve combining a search algorithm [10, 11, 12] with a single-step policy trained on a reaction corpus [13, 14, 15].

While this approach works well on simple and small molecules, recent work by Armstrong et al. [16] has shown that complex targets such as natural products require a paradigm that goes beyond exhaustive tree search, incorporating strategic planning, where each reaction has a different purpose

Preprint. at different stages of the synthesis: strategic disconnections often involve breaking the central scaffold of the molecules, while supporting reactions focus on manipulating functional groups [17]. However, single-step policy models are fixed to the reaction distribution they are trained on. Moreover, the training data is often derived from patents [18], which are biased toward routine reactions while scaffold-constructive ones such as cyclizations are underrepresented [19]. Therefore, a mechanism to steer the single-step policy models at inference time is needed to adapt to diverse strategic requirements of synthesis planning.

The second facet of strategic retrosynthesis among synthetic chemists is the practice of reaction reasoning by drawing arrow-pushing diagrams (also known as electron-pushing or curved-arrow diagrams) [5, 20]. The arrows describe a symbolic, directional transfer of electrons from a source to a sink. The direction of the arrow cannot be drawn arbitrarily: electrons have to flow from an electron-rich donor, called a nucleophile, to an electron-deficient acceptor, called an electrophile. The pattern of nucleophile and electrophile serves as the basis of organic synthesis and generalizes across diverse reaction types. Reasoning about reactions through electron flow also tightly connects to another facet of strategic retrosynthesis that is employed by expert chemists: planning a reaction at the synthon level before completing the functional groups [5, 21]. Synthons are an abstract representation of the precursors, formed by a broad disconnection strategy, where hypothetical charges are placed on atoms to be later completed with compatible functional groups.

Previously, we developed MAELLE [22], an electron-pushing-based discrete flow matching reaction outcome prediction model. MAELLE can be trained from large-scale end-to-end reactions, inferring the outcome of a reaction by simulating a continuous-time Markov chain (CTMC) acting on electrons using a vocabulary of arrow-pushing-inspired electron moves. It was shown that the direction of the arrow-pushing moves produced by MAELLE is highly aligned with that of expert-annotated mechanistic steps, suggesting MAELLE can capture the pattern of nucleophile-electrophile in a reaction. This makes MAELLE attractive to be used as our proposed strategically steerable single-step policy: its generative matching framing enables steering at inference using frameworks such as Feynman-Kac [23], and its rollout trajectory resembles the arrow-pushing notation by design.

In this work, we introduce Verso MAELLE (verso as in the back of a page), adapting MAELLE to the task of single-step retrosynthesis. Similar to MAELLE, Verso MAELLE employs a vocabulary of electron moves inspired by the arrow-pushing notations (Figure 1b). Since the moves only act on electrons, Verso MAELLE conserves heavy atoms by design and thus can plan retrosynthesis at the synthon level, focusing on the disconnection strategy, and the completion of synthons to precursors is outsourced to a simpler Transformer-based model. We train Verso MAELLE on a single training corpus based on USPTO-480K [18, 24], and at inference time, the behavior of the model can be altered with Feynman-Kac steering and a reward that encodes synthesis strategy, promoting the construction of the main scaffold (Figure 1a).

Overview of FK-steered Verso MAELLE for single-step retrosynthesis

Figure 1. Overview of FK-steered Verso MAELLE for single-step retrosynthesis, demonstrated on a key intermediate in the total synthesis of Punctaporonin U. a. At test time, a reward steers a generative single-step retrosynthesis model - Verso MAELLE in our case - toward constructive disconnections, here by rewarding the number of rings broken between product and synthons. b. Verso MAELLE as the retrosynthesis policy: the discrete states of the CTMC are traversed by a set of operations acting on electrons - FLOW, DEL, and ADD - yielding a pseudo-mechanistic, arrow-pushing-like disconnection. c. The domino oxa-Michael/aldol sequence performed in the forward direction in the literature [25] to synthesize the key precursor. FK-steered Verso MAELLE captures this disconnection within its CTMC trajectories.

We summarize our contributions as follows: (i) we introduce Verso MAELLE, the first single-step policy model that uses arrow-pushing on electrons to perform retrosynthetic disconnections, mimicking expert chemists’ reasoning; (ii) given a fixed trained model, we demonstrate how the suggested precursors can be steered with a ring-breaking reward, which prompts the model to perform cyclization reactions that are underrepresented in the training data, without compromising reaction plausibility; (iii) As a proof of concept, we show how this setup can generalize to mechanism-grounded novel reactions, demonstrated on a key and novel synthetic step that involves a domino sequence in the synthesis of Punctaporonin U [25], forming two rings in one pot.

Related work

Symbolic single-step retrosynthesis

Most template-free retrosynthetic models cast the problem as a direct mapping from a product to its precursors, learned end-to-end over string or graph representations. Translation-based models treat the reaction as sequence-to-sequence transduction: the Molecular Transformer [13] generates precursor SMILES autoregressively from the product SMILES, and Graph2SMILES [14] encodes the product as a 2D graph — recovering permutation invariance over the input — while still decoding the precursors as a SMILES string. Graph-edit models instead express the transformation as edits to the product graph: MEGAN [15] predicts an autoregressive sequence of atom- and bond-level edit operations that convert the product into its precursors.

Effective as they are on routine, patent-scale chemistry, these models operate over tokens or graph topology, not the electrons that mediate a disconnection, so a chemically sound disconnection is indistinguishable from a hallucinated one at the level of the representation. Additionally, they expose no distribution that could be tilted toward a desired outcome at inference time, redirectable only by retraining or re-weighting the data [19].

Generative approaches for single-step retrosynthesis

Generative approaches to retrosynthesis aim to model the coupled distribution between products and reactants, learning to sample precursors conditioned on a target rather than scoring a fixed template library. Most of these methods reason at the level of molecular topology: a disconnection is cast as a transformation of the product graph over its nodes and edges — adding, deleting, or relabeling atoms and bonds — that converts the target into its precursors.

RetroBridge [26] frames retrosynthesis as a stochastic mapping between the two dependent distributions of products and reactants, learning a Markov bridge between the coupled endpoints. Generation proceeds by iteratively resampling categorical node and edge types along the bridge, so the transformation is expressed entirely as substitutions of atom and bond labels. Because the model operates on graph types rather than on the electrons that mediate the reaction, the disconnection it produces is a topological rewrite: it can insert or remove nodes and edges, but an arrow-pushing pathway is not guaranteed to be found between the two endpoints.

RetroProdFlow [27] instead adopts discrete flow matching for end-to-end retrosynthesis, mapping products to reactants, and applies Feynman–Kac steering to the full generative process. However, it steers exclusively toward a roundtrip-accuracy reward. Such a reward only rewards recovering precursors that reconstruct the target, and does not incentivize any particular type of disconnection; in particular, it gives no preference to constructive reactions such as ring-forming steps, which are central to how chemists organize a synthetic strategy but underrepresented in patent reaction data. The steering therefore improves reconstructive validity without expressing the strategic choices that make a disconnection useful on complex targets.

Verso MAELLE addresses both of these gaps. Building on MAELLE [22], we model the retrosynthetic disconnection as a sequence of actions on electrons — FLOW, ADD, and DEL over the electron-occupation vector — rather than as node-and-edge edits on the molecular graph, so that each proposed disconnection carries an explicit electron-pushing mechanism. With this pseudo-mechanism, we are able to steer this generative process with rewards that encode genuine chemical strategy — such as the ring-breaking reward of § 3.4 — rather than mere reconstructive validity, biasing the model toward the strategically meaningful but underrepresented disconnections that characterize complex targets.

Verso MAELLE - Electron-pushing-based and steerable single-step retrosynthesis

MAELLE overview

MAELLE [22] is a discrete flow matching (DFM) model that performs pseudo-mechanistic forward reaction prediction by parametrizing a CTMC over the electron space of a molecular graph. This section provides a high-level overview of the method. For a formal background on DFM and MAELLE, see Appendix A.

MAELLE represents a molecule as a graph of electron sites - the bonds between heavy atoms, the lone pairs on each atom, and a pooled site for the hydrogens attached to each heavy atom - and tracks how many electron pairs occupy each site. A reaction is then a redistribution of these electron pairs across the sites, and MAELLE carries it out through three chemically interpretable edits: FLOW moves an electron pair from one site to another, forming or breaking a bond in the direction it is drawn (a source and a sink, as in an arrow-pushing step); ADD introduces a new pair at a site; and DEL removes one. Because the edits act on electrons rather than on atoms, and hydrogens are supplied freely from their pooled site, the transformation conserves every heavy atom by construction—the property Verso MAELLE relies on in § 3.2. Sequentially applying these edits turns the reactant into the product along a pseudo-mechanistic trajectory, where the bond connectivity at any point is read off directly from which sites currently hold electron pairs.

Given an end-to-end reaction, at training time, an offline process recovers the set of electron edits connecting them by solving a balanced integer optimal transport (OT) problem between the electron sites of the reactant and those of the product, with a cost given by the shortest-path distance between sites so that electrons are moved between nearby atoms. These edits define an edit-based conditional mixture path between reactant and product, along which the model - a graph neural network uθtu_\theta^t - is trained to predict, at any point on the trajectory, the rate at which each remaining edit should fire (Appendix A.2).

At inference only the reactant is known. MAELLE starts from the reactant graph and evolves the trajectory in a fixed number of steps, at each step firing every admissible electron edit independently and at random according to its predicted rate. Because firing is stochastic, running multiple trajectories from the same reactant yields a distribution over products; the frequency of each distinct product defines the confidence used for top-kk ranking. This stochastic and multi-trajectory sampling is what Verso MAELLE later steers (§ 3.4).

Retrosynthesis over synthon space

Retrosynthesis reasoning is not always atom-conservative: given only the target product, a model predicts only the reactants, while the byproducts are typically omitted or predicted post-hoc. Since MAELLE [22] operates only on electrons, it cannot take the byproducts into account and thus is unable to do end-to-end retrosynthesis prediction from products to reactants.

In order to leverage MAELLE’s mechanistic reasoning for retrosynthesis prediction, we move our attention toward synthons. Synthons represent an abstraction of the reactants, in which the core-molecular skeleton that will be part of the target product is left untouched, but the leaving groups are replaced by charges attributed to the core atoms to which these were attached [4]. Such charges should be representative of the nucleophilic/electrophilic character of the reactive atoms [5]. As charges denote the presence or absence of electron pairs, retrosynthetic prediction from target products toward synthons is a heavy atom-conservative process, allowing therefore MAELLE to be used for the task without modification.

Similarly to previous works [21], we define the charges added to the synthons based on the difference in Pauling electronegativity, χ\chi, between the synthon atom and leaving group atom that are bonded in the reactant. Therefore, when building a synthon from a reactant, if χi>χj\chi_i > \chi_j, the bond between atoms ii and jj is removed, atom ii receives the charge −BO-BO and atom jj receives the charge +BO+BO, where both ii and jj represent heavy-atoms which were bonded in the reactants, but out of which one is no longer present in the target product and BOBO represents the order of the bond that was broken (bonds between identical atoms are resolved as described in Appendix § 8). Thanks to MAELLE’s capability of adding and removing hydrogen atoms at will, it is not necessary to break such bonds with hydrogen during synthon formation. Constructing the synthons as described allows MAELLE to interpolate a pseudo-mechanism from the products to the synthons through its optimal transport algorithm.

We refer to this product-to-synthon adaptation of MAELLE as Verso MAELLE. Formally, we denote the molecular graph of the target product by G0\mathcal{G}_0 and that of the resulting synthons by G1\mathcal{G}_1. Verso MAELLE models the retrosynthetic transformation as a CTMC trajectory (Gt)t∈[0,1](\mathcal{G}_t)_{t\in[0,1]}, interpolating between the target product at t=0t=0 and the synthons at t=1t=1.

Completing the synthons to reactants

Previously, synthons have been completed using a constructed vocabulary of leaving groups, casting the problem into a multi-class classification problem [28]. In Appendix § 10.§ 1, we show that to each leaving group, an enhanced SMILES string can be associated, such that the SMILES of the synthon and the enhanced SMILES of the leaving group can be combined into the SMILES of the reactant. Therefore, the synthon completion problem can be treated as a neural machine translation task, where a model learns to predict the enhanced SMILES representation of the corresponding leaving group, given the SMILES of a synthon, followed by completion to the reactant during post-processing. Therefore, we train a Synthon Transformer model, an implementation of the Transformer architecture [13, 29] on the task of synthon completion.

Inference-time steering with Feynman-Kac

We aim to steer the learned conditional distribution pθ(G1∣G0)p_\theta(\mathcal{G}_1|\mathcal{G}_0) toward strategically desirable disconnections by defining a reward-tilted target distribution. More generally, the reward can depend on the entire trajectory τ=(G0,Gh,…,G1)\tau=(\mathcal{G}_0,\mathcal{G}_h,\ldots,\mathcal{G}_1), rather than only on its endpoints. We therefore define the reward-tilted distribution over trajectories as:

ptarget(τ∣G0)=1Zpθ(τ∣G0)exp⁡(λr(τ))(1)p_{\mathrm{target}}(\tau|\mathcal{G}_0)=\frac{1}{Z}p_\theta(\tau|\mathcal{G}_0)\exp\left(\lambda r(\tau)\right) \tag*{(1)}

where λ\lambda controls the strength of the distribution tilting, r(τ)r(\tau) is a reward function that evaluates the retrosynthetic transformation along the trajectory τ\tau, and ZZ is the normalization constant. The corresponding distribution over the final synthons is obtained by marginalizing over all trajectories that lead to G1\mathcal{G}_1:

ptarget(G1∣G0)=∑τ:τ1=G1ptarget(τ∣G0)(2)p_{\mathrm{target}}(\mathcal{G}_1|\mathcal{G}_0)=\sum_{\tau:\tau_1=\mathcal{G}_1}p_{\mathrm{target}}(\tau|\mathcal{G}_0) \tag*{(2)}

where τ1\tau_1 denotes the final molecular graph of trajectory τ\tau. Endpoint-based rewards, such as the ring-breaking reward, are recovered as a special case when r(τ)=r(G1,G0)r(\tau)=r(\mathcal{G}_1,\mathcal{G}_0).

To achieve sampling from the distribution in Equation (1), we use Feynman-Kac (FK) steering [23], an inference-time steering method that has seen application in discrete flow-matching retrosynthesis models [27]. FK steering guides the trajectory toward high-reward outcomes by iteratively tilting the transition kernels pθ(Gt+h∣Gt,G0)p_\theta(\mathcal{G}_{t+h}|\mathcal{G}_t,\mathcal{G}_0) with a function, Gt(τ0:t)G_t(\tau_{0:t}), known as potential, where hh is the Euler timestep and τ0:t=(G0,Gh,…,Gt)\tau_{0:t}=(\mathcal{G}_0,\mathcal{G}_h,\ldots,\mathcal{G}_t) denotes the partial trajectory up to time tt. Thus, starting from an initial FK distribution pFK,0∝psourcep_{\mathrm{FK},0}\propto p_{\mathrm{source}}, subsequent FK distributions are defined as:

pFK,t+h(τ0:t+h∣G0)=1Zt+hpθ(Gt+h∣Gt,G0)Gt+h(τ0:t+h)pθ(τ0:t∣G0)∏s=htGs(τ0:s)(3)p_{\mathrm{FK},t+h}(\tau_{0:t+h}|\mathcal{G}_0)=\frac{1}{Z_{t+h}}p_\theta(\mathcal{G}_{t+h}|\mathcal{G}_t,\mathcal{G}_0)G_{t+h}(\tau_{0:t+h})p_\theta(\tau_{0:t}|\mathcal{G}_0)\prod_{s=h}^{t}G_s(\tau_{0:s}) \tag*{(3)}

where the normalization constant is Zt=Epθ(⋅∣G0)[∏s=htGs]Z_t=\mathbb{E}_{p_\theta(\cdot|\mathcal{G}_0)}\left[\prod_{s=h}^{t}G_s\right] and the condition ∏s=h1Gs(τ0:s)=exp⁡(λr(τ))\prod_{s=h}^{1}G_s(\tau_{0:s})=\exp(\lambda r(\tau)) is imposed. We note that, unlike the FK formulation in [23], we do not tilt psourcep_{\mathrm{source}} with the potential function because our trajectories start with the molecular graph G0\mathcal{G}_0 of the target, rather than a sample from a simple prior.

As direct sampling from pFK,1p_{FK,1} is intractable, we apply sequential Monte Carlo (SMC) methods. SMC generates kk interacting flow processes, called particles. The particles are resampled at each step of the trajectory or, alternatively, at a certain resampling interval. By choosing the SMC’s proposal generator qq to be equal to the model’s transition kernel pθ(Gt+h∣Gt,G0)p_{\theta}(G_{t+h}|G_t,G_0) [23], the importance weights of the particles during resampling become wti=Gt(τ0:ti)w_t^i = G_t(\tau_{0:t}^i), with i=1,…,ki=1,\ldots,k.

The potential GtG_t scores a trajectory by accumulating a reward rϕr_{\phi} of the particles. A popular accumulation scheme is using SUM potential [23]:

Gt(τ0:t)=exp⁡(λ∑s=htrϕ(τ0:s)),G1(τ)=exp⁡(λr(τ))∏s=h1−hGs(τ0:s)(4)G_t(\tau_{0:t})=\exp\left(\lambda\sum_{s=h}^{t}r_{\phi}(\tau_{0:s})\right),\quad G_1(\tau)=\frac{\exp\left(\lambda r(\tau)\right)}{\prod_{s=h}^{1-h}G_s(\tau_{0:s})} \tag*{(4)}

Intermediate rewards can be defined by estimating the final reward from the partial trajectory. For a trajectory-dependent reward, a natural choice is the expected final reward conditioned on the partial trajectory, rϕ(τ0:t)=Epθ[r(τ)∣τ0:t]r_{\phi}(\tau_{0:t})=\mathbb{E}_{p_{\theta}}[r(\tau)\mid\tau_{0:t}]. In our case, we can take advantage of the fact that the intermediate states along Verso MAELLE’s trajectories are chemically interpretable molecular graphs and that the electron edits performed along the trajectory can be tracked explicitly. We therefore define the intermediate rewards by directly evaluating the same reward function on the partial trajectory: rϕ(τ0:t)=r(τ0:t)r_{\phi}(\tau_{0:t})=r(\tau_{0:t}).

Chemically and strategically interpretable reward functions

As the electron-pushing trajectories of Verso MAELLE result in chemically interpretable intermediate molecular graphs, it is possible to design rewards that encapsulate the strategic thinking of synthetic chemists. Cyclic structures are common motifs in organic molecules, and expert organic chemists may choose to organize their synthetic strategy around disconnecting such cyclic structures. However, cyclization reactions are fairly rare in USPTO 480K (Table 2). Therefore, we define a ring-breaking reward (rringr_{\mathrm{ring}}), which counts the number of rings that have been broken in the current molecular graph, prioritizing sampling particles with more rings broken:

PartitionEntriesRing breaking entries [%]
Train3842803.20
Validation296783.23
Test394613.12

Table 2. Characteristics of the USPTO 480K Synthon dataset

rring(Gt,G0)=RG0−RGt,(5)r_{\mathrm{ring}}(G_t,G_0)=R_{G_0}-R_{G_t}, \tag*{(5)}

where RGR_G counts the number of rings present in the molecular graph GG. This reward is used for all USPTO 480K-related results.

Additionally, we also implement a domino reward (rdominor_{\mathrm{domino}}). In organic synthesis, domino (sometimes called cascade) reactions are processes where multiple bond-forming transformations occur under the same reaction condition, where subsequent steps are triggered by the previous ones [30, 31, 25]. Domino reactions are of significant interest in synthetic chemistry due to their conciseness and the rapid construction of scaffold complexity. Reasoning about domino retrosynthetic disconnections involves visualization of multiple electron-pushing moves. To promote scaffold-constructive domino disconnections, we define the reward as follows:

rdomino(Gt,Gt−h,…,G0)=cringrring(Gt,G0)+cflowrflow(Gt,Gt−h,…,G0)+cchargercharge(Gt),(6)r_{\mathrm{domino}}(G_t,G_{t-h},\ldots,G_0)=c_{\mathrm{ring}}r_{\mathrm{ring}}(G_t,G_0)+c_{\mathrm{flow}}r^{\mathrm{flow}}(G_t,G_{t-h},\ldots,G_0)+c_{\mathrm{charge}}r^{\mathrm{charge}}(G_t), \tag*{(6)}

where rflowr^{\mathrm{flow}} rewards the model for performing multiple electron-pushing moves, measured as the number of FLOW moves performed across the whole trajectory up to particle GtG_t; rcharger^{\mathrm{charge}} penalizes the molecular graphs with many charges: rcharge(G)=−∑i=1NatomsG∣Ci∣r_{\mathrm{charge}}(G)=-\sum_{i=1}^{N_{\mathrm{atoms}}^{G}|C_i|}, and thus prevent the model from exploiting rflowr_{\mathrm{flow}} by breaking unrelated bonds; cringc_{\mathrm{ring}}, cflowc_{\mathrm{flow}}, and cchargec_{\mathrm{charge}} are corresponding coefficients of the reward terms. Due to the lack of a large-scale domino reaction dataset, in the scope of this work, we only demonstrate this reward qualitatively on a key domino reaction in the total synthesis of Punctaporonin U [25] (Figure 1). We also emphasize that the definitions of rflowr_{\mathrm{flow}} and rcharger_{\mathrm{charge}} are only feasible thanks to the chemically interpretable CTMC trajectories of Verso MAELLE, in contrast to other categorical graph-based generative methods.

Results

Experiments

We pre-process the USPTO 480K dataset [18] to extract the synthons and leaving groups, as described in Appendix § 8, obtaining the Synthon USPTO 480K dataset. Using this dataset, we train Verso MAELLE on the product to synthon prediction task, obtaining the base Verso MAELLE model. Apart from vanilla inference, we also experiment with FK steering, the results of which are referred to as FK Verso MAELLE. We perform particle resampling at a set of timesteps R\mathcal{R} that includes the final timestep t=1t = 1. At timesteps t∉Rt \notin\mathcal{R}, we set Gt=1G_t = 1. At resampling steps t∈Rt \in\mathcal{R}, we use the SUM potential defined in Equation (4). As for the reward, we choose the ring-breaking reward defined in Equation (5). As baselines, we train a Molecular Transformer (MT) [13] and Graph2SMILES (G2S) [14] to predict the synthons. Details on the training and inference configurations used are found in Appendix § 9.

Synthons predicted by all models are converted to canonical SMILES, and then completed to reactant molecules using Synthon Transformer, trained to translate the SMILES string of the synthons to that of the functional groups, enhanced with their attachment points. For all metrics that require completed reactant molecules, we take the top-1 completion of Synthon Transformer for each synthon prediction as its corresponding reactants. Further details on synthon completion data format and Synthon Transformer’s performance can be found in Appendix § 10.

To quantify in-distribution learning, we use top-k synthon exact match accuracy, measuring how frequently the ground-truth synthons are found among the top-k predictions. Since USPTO-480K is split randomly among training, validation, and test subsets, top-k synthon accuracy quantifies in-distribution learning of models. In terms of reaction plausibility, we measure top-k roundtrip coverage and accuracy, using Molecular Transformer [13] acting on reactants completed from synthons as described above. We use the Molecular Transformer model trained on the mixed version of USPTO 480K, whose weights are downloaded from https://github.com/pschwllr/MolecularTransformer.

To further quantify the effect of FK steering towards ring-breaking disconnections, we measure top-k ring-breaking coverage, which checks if a disconnection involving a ring-breaking is found within the first kk predictions of the model. At the candidate level, we report average cumulative number of rings broken, which computes the sum of the number of rings broken in the top-kk predictions and then averages over the entire prediction population up to rank kk.

Verso MAELLE is capable of in-distribution learning

In this section, we address how well Verso MAELLE learns from its training data, using the popular Molecular Transformers (MT) and Graph2SMILES (G2S) as baselines. The top-kk synthon and roundtrip accuracies of the models over USPTO 480K Synthon are presented in Table 1. Although at lower ranks, the top-kk synthon accuracy of Verso MAELLE is behind that of MT and G2S (0.5221 top-1 for Verso MAELLE whereas G2S achieves 0.6840), the difference becomes less significant for later ranks and at top-20, Verso MAELLE achieves a slightly better performance than G2S by 1.02 pp, while trailing behind MT by 5.86 pp. The top-kk synthon accuracy of Verso MAELLE increases quickly with more samples: the difference between Verso MAELLE and G2S changes from -16.19 pp to +1.02 pp, implying the reaction space that Verso MAELLE produces is more diverse.

ModelTop-kk Synthon Accuracy, k=1k=1k=3k=3k=5k=5k=10k=10k=20k=20Top-kk Roundtrip Coverage, k=1k=1k=3k=3k=5k=5k=10k=10k=20k=20Top-kk Roundtrip Accuracy, k=1k=1k=3k=3k=5k=5k=10k=10k=20k=20
MT0.64650.81830.86420.90160.92150.85150.95860.97530.98710.99140.85150.65320.54360.40330.3062
G2S0.68400.80520.82860.84510.85270.86310.93810.95120.96140.96510.86310.59000.46600.33540.2652
Verso MAELLE0.52210.73080.79150.83650.86290.83380.94880.97210.98500.99020.83380.65980.54980.40400.3363
FK Verso MAELLE0.49360.68860.73980.79090.81970.80080.92230.94760.96900.97840.80080.60330.48990.38720.3596

Table 1. Top-kk synthon accuracy, followed by top-kk coverage and top-kk roundtrip accuracy of the completed synthons, all on USPTO 480K Synthon. The FK steered model uses the ring-breaking reward, with 4 particles and λ=1\lambda= 1.

Top-kk exact match only measures how well a model captures its training data. However, in the context of retrosynthesis, multiple reactions could be used to synthesize the same target, and thus the quality of the reactions proposed is more important. We show that Verso MAELLE can propose chemically valid disconnections through the top-kk roundtrip coverage and accuracy. These metrics show a smaller performance gap between models. While at top-1 Verso MAELLE’s roundtrip coverage is slightly behind that of MT and G2S by a maximum of 2.93 pp, Verso MAELLE consistently becomes the second best performing model for this metric, being ahead of G2S by 2.48 pp at top-20 and achieving a similar performance to MT, with a difference of 0.12 pp.

As opposed to roundtrip coverage, which measures whether at least one prediction at top-kk yields the correct product in the forward direction, the roundtrip accuracy measures, across all suggestions, how many of them yield the desired product. A good single-step retrosynthesis model needs to predict not just one but several chemically valid reactions. In this regard, Verso MAELLE is comparable with MT, while substantially outperforming G2S from k=3k = 3 onward. We note that roundtrip accuracy serves as a proxy for chemical plausibility rather than an absolute metric, since the forward prediction model lacks the context of reaction conditions, which have a heavy influence on the outcome of a reaction but are not output by retrosynthesis models.

Verso MAELLE is steerable towards rare disconnections

From the base Verso MAELLE, we run another round of inference on the test set of USPTO 480 Synthon data, but the model’s trajectories are steered with the ring-breaking reward Eq. (5). It is expected that since the model’s prediction is biased toward an objective, its top-kk exact-match would decrease. Indeed, its synthon accuracy is trailing behind that of vanilla Verso MAELLE and other models, but still in the reasonable range: the accuracy is at 49.36% and 81.97% at k=1k = 1 and k=20k = 20, respectively. Furthermore, FK steering does not prevent the model from recovering good reactions, characterized by the roundtrip coverage. While it is still lower than vanilla Verso MAELLE and MT, the roundtrip coverage is comparable to that of G2S, outperforming the latter from top-10 onward. The same trend is observed for roundtrip accuracy at k=3k = 3, 5, and 10, and at k=20k = 20, the FK-steered model has the highest accuracy among the four, at 35.96%. This is explained by the fact that the FK-steered Verso MAELLE proposes 12 predictions on average, compared with 17 for the other models. The lower number of predictions under FK steering could be attributed to the particle resampling process (Eq (3)) that collapses diverse particles into a few that have high reward.

The effectiveness of the steering is measured through the metrics top-kk ring breaking and average cumulative number of rings broken, presented in Figure 2a. We observe from the top-kk ring breaking that the FK steered model prioritizes, compared to the other models, at each rank disconnections that break a ring. The low frequency of ring-breaking disconnections in the training data (Table 2) is reflected by the low top-1 ring-breaking of the non-steered models at roughly 3%. Under the influence of the ring-breaking reward, the FK-steered Verso MAELLE is more likely to perform retro cyclizations at k=1k = 1, 3, 5, and 10. At top-20, however, both vanilla and FK-steered Verso MAELLE are equally probable to have at least one ring-breaking reaction in their predictions, at around 48% of the time, suggesting that with enough samples, a ring-breaking disconnection would eventually be recovered, but FK-steering could help surface these disconnections with fewer examples. Besides being able to perform cyclization at lower sampling, FK-steered Verso MAELLE also breaks rings in different ways, as proved by the cumulative number of rings broken: at 20 different samples, the steered Verso MAELLE breaks 2.63 rings on average, compared with 1.81 of the vanilla inference. Furthermore, we illustrate the higher affinity for ring-breaking reactions of the FK-steered Verso MAELLE model with a qualitative example in Figure 2b, where all top-3 disconnections of the steered model are ring-breaking, whereas the non-steered models recover no chemically plausible ring-breaking disconnections. Notably, the top-3 prediction of G2S resembles a hallucinated disconnection of the benzene ring, while the transformation suggested by Verso MAELLE is grounded in the electron-pushing notation, as shown in Figure 2c.

Ring breaking comparison between the models over USPTO 480K Synthon

Figure 2. Ring breaking comparison between the models over USPTO 480K Synthon. a. Ring breaking metrics over the USPTO 480K Synthon dataset. The FK-steered Verso MAELLE model recovers more ring-breaking disconnections and cumulatively breaks on average more rings than both non-steered baseline models for equal kk. b. An imide, whose ground truth disconnection is a double amide bond cleavage. FK steered Verso MAELLE recovers only ring-breaking disconnections up to top-3, including the ground truth synthon (highlighted), while no other model recovers chemically plausible ring-breaking disconnections for the given product. c. Mechanistic trajectory generated by FK Verso MAELLE between product and ground truth predicted synthon.

Together, these results highlight the strength of Verso MAELLE combined with the FK framework. The model does not have to be retrained to adapt to a new objective and thus maintains the chemistry learned during training, as reflected by exact-match and roundtrip metrics. On the other hand, guided by an objective function, it can recover more ring-breaking disconnections, overcoming the shortage of this transformation type in the training data.

Domino reactions: A case study of Punctaporonin U

To assess whether steering through mechanistically grounded rewards grants Verso MAELLE the potential to recover out-of-distribution disconnections, we test its performance on a key step in the total synthesis of Punctaporonin U, a complex natural product of the sesquiterpene family, featuring a pentacyclic, cage-like structure, that was synthesized successfully by Gri et al. [25] (Figure 1c). The key step involves a one-pot construction of the tetracyclic core via a domino sequence oxa-Michael/aldol/bromination (Figure 1c). Such a domino sequence is highly unlikely to be available in the training corpus, but we envision that from the electron-pushing moves learned from the training data combined with a reward that incentivizes domino reactions (Eq (6)), Verso MAELLE could recover this disconnection, as the proof of concept for the flexibility of the method. Hyperparameters for the rewards and FK can be found in Appendix § 9.

First, it is noteworthy to mention that, by analyzing the mechanism of the transformation in the original publication [25], we observe that only the oxa-Michael/aldol part of the sequence complies with our definition of domino reaction: a reaction where each step is causally linked to the previous one (see § 3.4). The bromination is achieved through the use of a base that forms the enolate; this enolate formation does not have a causal relationship with the previous steps of the sequence. Therefore, we consider that a model succeeds if it manages to recover the retro-aldol/retro-oxa-Michael (retro equivalent of the forward sequence oxa-Michael/aldol) part of the disconnection.

We present the top-5 synthon predictions of Verso MAELLE and of FK Verso MAELLE steered with the domino reward in Figure 3. While all the disconnections are plausible from a synthetic point of view, the non-steered Verso MAELLE performs neither ring-opening nor domino disconnections. The top-1 and top-3 correspond to a ketone alpha-bromination, the top-2 represents a retro-protection of an alcohol and the top-4 represents a retro SN2_\mathrm{N}^2 disconnection, which actually recovers Punctaporonin U. The only exception is the last prediction, which manages to break a 7-membered ring through a retro-aldol disconnection, one of the disconnections involved in the ground truth one. The model, however, is not incentivized in any way to continue the disconnection in order to recover the ground truth.

Top-5 synthon predictions of Verso MAELLE and FK Verso MAELLE

Figure 3. Top-5 synthon predictions of Verso MAELLE and FK Verso MAELLE steered with the domino reward (see Equation (6)) for the key intermediate in Punctaporonin U’s synthesis by Gri et al. [25]. The results presented are for a given seed, and are accompanied by the number of ring broken and maximum number of flow moves across the different samples by which the synthons are reached. We consider a prediction successful if it recovers the causally related steps of the ground truth disconnection. a. Input to the models. b. In the absence of steering, Verso MAELLE is not incentivized to promote either ring-breaking disconnections or domino reactions. c. Steered FK Verso MAELLE manages to recover the ground truth retro-aldol/retro-oxa-Michael, a domino ring breaking disconnection. Moreover, all of the top-5 steered model’s disconnections break rings, with the first, third, and fifth predictions being domino disconnections, while the fourth one involves two, non-causally related disconnections.

On the other hand, the FK-steered Verso MAELLE model manages to recover as its top-1 prediction the ground-truth domino retro-aldol/retro-oxa-Michael disconnection (Figure 3c). We note that by averaging over 6 different seeds, the ground truth synthon is found at rank 6 on average. In Figure 1b we depict one of the CTMC trajectories by which the model reaches the desired synthon. We observe that this pseudo-mechanism closely mirrors, in the opposite direction, the mechanism proposed by Gri et al. [25], depicted in Figure 1c: the first two steps represent a retro-aldol reaction, while the next two denote a retro-oxa-Michael addition, thus highlighting the interpretability of the trajectories produced by the model. It is thanks to this interpretability that we are able to employ rewards that encode chemical strategies, such as the one that we used for this case study. This domino reward allows us to recover also other disconnections that can be classified as ring-breaking domino disconnections, with their steps causally linked to one another. The prediction at top-3 reaches the product in the forward direction by attacking the carbocation with the enol-ether functional group of the dihydrofuran moiety, followed by subsequent trapping of the resulting oxonium cation by the alpha-position of the ketone. The prediction at top-5 can be interpreted as a Michael addition, achieved by converting the synthon into a Gilman reagent, followed by trapping of the resulting enolate with a bromine cation. Even though its steps are not causally related, the prediction at top-4 is composed of a [2+2] photocycloaddition and an aldol condensation. Thus, while we do not assess the experimental feasibility of these discussed other proposals, we emphasize that steering through rewards aligned with the strategies developed by expert synthetic chemists grants FK-steered Verso MAELLE the potential to recover diverse, creative, out-of-distribution disconnections, including the ground-truth one for Punctaporonin U.

Conclusion

We introduced Verso MAELLE, the first electron-pushing-based single-step retrosynthesis model, which combines discrete flow matching with Feynman-Kac inference-time steering to promote strategically meaningful disconnections. Verso MAELLE models retrosynthetic transformations as continuous-time Markov chain trajectories of electron edits, converting target products into synthons through interpretable, pseudo-mechanistic pathways. The resulting synthons are subsequently completed into precursors using a separate Synthon Transformer.

We demonstrated that Verso MAELLE learns the reaction distribution of the training dataset while allowing its predictions to be steered toward underrepresented reaction types without retraining. In particular, FK steering with a ring-breaking reward promotes scaffold-constructive disconnections while retaining competitive roundtrip performance. As a proof of concept beyond the training distribution, we further showed that a more complex reward can guide Verso MAELLE toward domino ring-breaking disconnections, including the key retro-aldol/retro-oxa-Michael sequence in the total synthesis of Punctaporonin U. The recovery of this literature-reported disconnection illustrates the potential of mechanism-level steering to uncover strategically relevant transformations that are rare or absent in patent-derived reaction data.

Limitations and future work While the Punctaporonin U case study demonstrates the potential of Verso MAELLE for out-of-distribution retrosynthesis, a systematic evaluation on a broader set of complex targets outside the USPTO dataset is needed to establish the reliability and generality of mechanism-level steering. Developing a benchmark of such strategic disconnections is therefore an important direction for future work.

Another direction is to expand the range of chemically meaningful rewards. The ring-breaking and electron-flow rewards considered here capture specific aspects of synthetic strategy, but many principles underlying effective synthesis planning remain difficult to quantify. Encoding these principles as FK rewards could enable more flexible, chemist-aligned retrosynthetic predictions.

Verso MAELLE also has several methodological limitations. Its trajectories are pseudo-mechanistic: they represent electron-redistribution pathways derived from an optimal-transport formulation rather than physically validated sequences of elementary reaction steps. Although these trajectories provide an interpretable representation for steering disconnections, they should not be interpreted as experimentally established reaction mechanisms. Furthermore, the current model does not account for stereochemistry. Extending the edit vocabulary to represent stereocenters and bond geometry would broaden its applicability to stereochemically complex targets.

Finally, integrating Verso MAELLE and the Synthon Transformer into multistep retrosynthesis search algorithms [10, 12] would provide a natural next step toward strategy-guided synthesis planning for complex molecules.

Acknowledgement

X.V.N acknowledges the support from the Marie Skłodowska-Curie Actions Doctoral Networks grant agreement “Explainable AI for Molecules - AiChemist” no. 101120466. P.S. acknowledges the support from the NCCR Catalysis (grant number 225147).

Background

Discrete Flow Matching

Discrete flow matching (DFM) [32, 33] is a paradigm in which a generative model parametrizes a Continuous Time Markov Chain (CTMC) that transports a source distribution p0p_0 at t=0t = 0 to a target distribution p1p_1 at t=1t = 1. The interpolation between the two is done through a marginal probability path ptp_t. As sampling directly from the marginal is intractable, a conditional path, pt(x∣x0,x1)p_t(x \mid x_0, x_1), known as the conditional mixture path is employed, where x0x_0 and x1x_1 are drawn from the coupling π(x0,x1)\pi(x_0, x_1) between the source and target distributions. The conditional path must satisfy boundary conditions p0(x∣x0,x1)=δx0(x)p_0(x \mid x_0, x_1) = \delta_{x_0}(x) and p1(x∣x0,x1)=δx1(x)p_1(x \mid x_0, x_1) = \delta_{x_1}(x).

DFM can be applied in the context of modifying a sequence of tokens to another sequence of equal length. Let us therefore consider T\mathcal{T} a vocabulary and X=T∗=⋃n=0NTn\mathcal{X} = \mathcal{T}^{*} = \bigcup_{n=0}^{N} \mathcal{T}^{n} the space of token sequences of length at most NN. For two sequences of equal length nn, the conditional mixture path chosen is the factorized, token-wise mixture path [33]:

pt(xi∣x0,x1)=(1−κ(t))δx0i(xi)+κ(t)δx1i(xi),pt(x∣x0,x1)=∏i=1npt(xi∣x0,x1),(7)p_t(x^i \mid x_0, x_1) = (1 - \kappa(t))\delta_{x_0^i}(x^i) + \kappa(t)\delta_{x_1^i}(x^i), \qquad p_t(x \mid x_0, x_1) = \prod_{i=1}^{n} p_t(x^i \mid x_0, x_1), \tag*{(7)}

where the schedule κ:[0,1]→[0,1]\kappa: [0, 1] \to[0, 1] is monotone with κ(0)=0\kappa(0) = 0, κ(1)=1\kappa(1) = 1. The CTMC which generates the probability path described in Equation (7) is characterized by the following token-wise, marginal rate matrix:

ut(xi∣xt)=κ′(t)1−κ(t)[p1∣t(xi∣xt)−δxti(xi)],(8)u_t(x^i \mid x_t) = \frac{\kappa'(t)}{1-\kappa(t)}\left[p_{1\mid t}(x^i \mid x_t) - \delta_{x_t^i}(x^i)\right], \tag*{(8)}

where p1∣t(xi∣xt)p_{1\mid t}(x^i \mid x_t) is the posterior over the target token at position ii. Therefore, training reduces to learning the posterior per token position using a cross-entropy objective.

The limitation of interpolating only between sequences of the same length has been overcome by Havasi et al. [34], which introduces a set of edit operations, namely deletion, insertion and substitution that allow interconversion between strings of different length. In this setting, the problem is lifted to an auxiliary space of aligned, padded sequences Z=(T∪{ϵ})N\mathcal{Z} = (\mathcal{T} \cup\{\epsilon\})^N, where ϵ\epsilon is a padding symbol, together with the map frm−blank:Z→Xf_{\mathrm{rm-blank}} : \mathcal{Z} \to\mathcal{X} that deletes all padding. Given endpoints x0,x1x_0, x_1 and a chosen alignment z0,z1∈Zz_0, z_1 \in\mathcal{Z} with frm−blank(zj)=xjf_{\mathrm{rm-blank}}(z_j) = x_j, the mixture path is defined on the augmented space X×Z\mathcal{X} \times\mathcal{Z} as

pt(x,z∣z0,z1)=pt(z∣z0,z1)δfrm−ϵ(z)(x),(9)p_t(x, z \mid z_0, z_1) = p_t(z \mid z_0, z_1)\delta_{f_{\mathrm{rm-}\epsilon}(z)}(x), \tag*{(9)}

where pt(z∣z0,z1)p_t(z \mid z_0, z_1) is the token-wise path applied on the aligned sequences. The marginal rate of the CTMC that induces this mixture path can be parametrized by a neural network that uses a Bregman divergence objective [35, 34] during training.

MAELLE

We take this section to detail the framework of MAELLE [22] a discrete flow matching (DFM) model that performs pseudo-mechanism - based forward reaction prediction. Discrete flow matching models parametrize a Continuous Time Markov Chain (CTMC) that transports a source distribution to a target distribution.

MAELLE treats molecules as augmented graphs G=(V,A,E,o)\mathcal{G} = (\mathcal{V}, \mathcal{A}, \mathcal{E}, o), where V\mathcal{V} is the set of heavy atoms, A\mathcal{A} is the heavy-atom adjacency, and E\mathcal{E} is a fixed set of electron sites comprising bonding sites eije_{ij} (i≠ji \ne j), lone-pair sites eiie_{ii}, and per-atom hydrogen sites eiHe_i^H (as hydrogens on the same heavy-atom are topologically equivalent, they are pooled into a single site). The occupation vector o∈Z∣E∣o \in\mathbb{Z}^{|\mathcal{E}|} counts electron pairs at each site, including ones with zero occupation. In MAELLE’s framework, a forward reaction can be viewed as a heavy-atom conservative process (heavy-atom conservative, since electron pairs can be added at will on the per-atom hydrogen sites eiHe_i^H) during which the occupation vector oo is changed from the reactants to in the products. The adjacency A\mathcal{A} can be recovered deterministically from the current occupation vector.

The model performs modifications on the occupation vector by applying FLOW (electron pair transferred from one electron site of the graph to another) ADD (electron pair added to the molecular graph from a virtual electron source) and DEL (electron pair removed from the molecular graph to a virtual electron sink) electron edit operations to it. These operations are defined as:

FLOW⁡(esource→esink)(o)=o−1esource+1esink, requiring oesource>0,ADD⁡(e)(o)=o+1e,DEL⁡(e)(o)=o−1e, requiring oe>0,(10)\begin{aligned} \operatorname{FLOW}(e_{\mathrm{source}} \to e_{\mathrm{sink}})(o) &= o - \mathbf{1}_{e_{\mathrm{source}}} + \mathbf{1}_{e_{\mathrm{sink}}}, \text{ requiring } o^{e_{\mathrm{source}}} > 0, \\ \operatorname{ADD}(e)(o) &= o + \mathbf{1}_{e}, \\ \operatorname{DEL}(e)(o) &= o - \mathbf{1}_{e}, \text{ requiring } o^{e} > 0, \tag*{(10)} \end{aligned}

where 1e∈{0,1}∣E∣\mathbf{1}_{e} \in\{0,1\}^{|E|} denotes the one-hot vector with a single nonzero entry at the position corresponding to site e∈Ee \in E. Sequentially applying the electron edits to the reactant molecular graph yields a pseudo-mechanistic trajectory.

The central object of a DFM model such as MAELLE is the conditional mixture path that interpolates between the source distribution (in MAELLE’s case, reactants) and target distribution (in MAELLE’s case, products). Given the set of moves M\mathcal{M} that converts reactant electron occupation o0o_0 to product occupation o1o_1, denoted as o1=ApplyEdit⁡(o0,M)o_1 = \operatorname{ApplyEdit}(o_0,\mathcal{M}), and the subset S\mathcal{S} of moves are applied in order to obtain the interpolated electron occupation oo, MAELLE adopts the edit-based mixture path:

pt(o∣o0,o1)=∑S⊆Mκ(t)∣S∣(1−κ(t))∣M∣−∣S∣1[ApplyEdit⁡(o0,S)=o],(11)p_t(o \mid o_0,o_1) = \sum_{\mathcal{S}\subseteq\mathcal{M}} \kappa(t)^{|\mathcal{S}|}(1-\kappa(t))^{|\mathcal{M}|-|\mathcal{S}|} \mathbf{1}\left[\operatorname{ApplyEdit}(o_0,\mathcal{S})=o\right], \tag*{(11)}

where κ:[0,1]→[0,1]\kappa: [0,1] \to[0,1] is a monotone schedule with κ(0)=0\kappa(0)=0 and κ(1)=1\kappa(1)=1, each move being applied with probability κ(t)\kappa(t). Thus, MAELLE’s training target becomes the marginal transition rate ut(m∣ot,Gx)u_t(m \mid o_t,\mathcal{G}_x) (where mm is an electron edit operation) which characterizes the CTMC that induces the edit-based mixture path described in (11). This target is approximated by a graph neural network, utθu_t^\theta, which employs for training a Bregman divergence objective [35, 34]. As for how the electron edits needed during training are obtained, MAELLE solves a balanced integer Optimal Transport problem between o0o_0 and o1o_1, using a simplex algorithm. The cost function between two electron sites is taken as the minimum shortest-path distance between their constituent atoms on either the reactant or product graph, while in the case of virtual sites used for DEL and ADD edits, a large, constant penalty is used.

During inference, only the reactant is known. Thus, MAELLE initializes Gt=G0\mathcal{G}_t=\mathcal{G}_0 at t=0t=0 and evolves a CTMC trajectory in [0,1][0,1] for NN Euler steps, with a timestep of Δt=1N\Delta t = \frac{1}{N}. At each step of the trajectory, every possible move mm fires independently as a thinned Poisson process, having the following probability of being applied:

pfire(m)=1−exp⁡(−utθ(m∣G0,Gt,t)Δt).(12)p_{\mathrm{fire}}(m) = 1 - \exp\left(-u_t^\theta(m \mid\mathcal{G}_0,\mathcal{G}_t,t)\Delta t\right). \tag*{(12)}

The electron occupation over the graph at the end of the trajectory represents the reaction product. As firing in (12) is stochastic, running multiple independent CTMC trajectories over the same reactant will give a distribution of products. The frequency of each product in the distribution gives the ranking for the top-k accuracy.

Data pre-processing: USPTO 480K Synthon

The pipeline described in what follows is applied to all the entries of the training, validation and test partitions of the USPTO-480K dataset [18, 24], giving what we call the USPTO 480K Synthon dataset.

Thus, a reaction is re-mapped using the RxnMapper tool [36]. Based on the atom mapping, reagents are then eliminated, leaving only the reactants and products. Again based on the mapping, the heavy atoms that will form the synthons and the heavy atoms that will form the leaving groups are identified: heavy atoms that are present both in the product and the reactants form the synthons, while heavy atoms that are present in the reactants but not in the products form the leaving groups. The reactant SMILES are converted into an RDKit molecule object and the bonds are iterated upon in the order given by the atom indices. If one of the atoms within the bond is a synthon atom, while the other is a leaving group atom, the following rules are applied in order to form synthons and leaving groups:

  • χi>χj\chi_i > \chi_j: bond between atom ii and jj is broken, atom ii receives the charge −BO-BO and atom jj receives the charge +BO+BO;

  • χi≤χj\chi_i \le\chi_j: bond between atom ii and jj is broken, atom ii receives the charge +BO+BO and atom jj receives the charge −BO-BO;

where ii and jj are atom indices with i<ji < j and BOBO is the bond order of the bond being broken. It is to note that the second condition is a design choice; putting the equality case to the first condition would have worked equally well. Apart from the given products and reactants, the extracted synthons and leaving groups, the atom maps of the indices between which bonds are broken are also saved in the dataset. Moreover, using the products as source distribution and the synthons as target distribution, a pseudo-mechanistic trajectory is interpolated between products and synthons using MAELLE’s optimal transport pipeline [22].

Finally, after deduplication based on the canonical SMILES string of the synthons, the USPTO 480K Synthon dataset is obtained, its characteristics being presented in Table 2

For a ring-breaking entry, at least one ring is broken between the products and synthons

Training and inference details

We train Verso MAELLE on the USPTO 480K Synthon dataset for product-to-synthon prediction using the standard MAELLE architecture [22], comprising of approximately 16M trainable parameters. The AdamW optimizer is employed, with β1=0.9\beta_1 = 0.9, β2=0.999\beta_2 = 0.999, initial learning rate of 3⋅10−43 \cdot10^{-4}, weight decay of 0.01 and ReduceLROnPlateau scheduler from PyTorch. We use an effective batch size of 64 and train for 64 epochs (approximately 55 hours on a single NVIDIA H100 GPU).

For inference with the base Verso MAELLE, we use 64 samples, 16 Euler steps, a Poisson temperature of 0.6, with sampling for target electron site selection and an effective batch size of 4. For the FK steered Verso MAELLE with Ring Breaking Reward, we use 16 samples, 16 Euler steps, a Poisson temperature of 0.6, 4 particles, λ\lambda of 1, a sampling frequency of 4, with sampling for target electron site selection and an effective batch size of 4.

For the case study of Punctaporonin U, we use for the FK-steered Verso MAELLE model the Domino Reward, with coefficients cring=1c_{\mathrm{ring}} = 1, cflow=0.2c_{\mathrm{flow}} = 0.2 and ccharge=1c_{\mathrm{charge}} = 1. Furthermore, we use 32 samples, 16 Euler steps, a Poisson temperature of 0.6, with sampling for target electron site selection, 16 particles, λ=5\lambda= 5 and a sampling frequency of 4. As for the predictions on USPTO 480K Synthon, we employ the SUM potential. For the non-steered Verso MAELLE, we use 32 samples, 16 Euler steps, a Poisson temperature of 0.6, with sampling for target electron site selection.

For training and inference of the G2S, the configurations presented in the original publication for forward-reaction prediction with D-GAT on the mixed USPTO 480K dataset are used [14]. For the Molecular Transformer trained on synthon prediction and for the Synthon Transformer, we employ the configurations presented in the original publication of the Molecular Transformer for forward-reaction prediction on the mixed USPTO 480K dataset [13]. For the forward-reaction prediction Molecular Transformer, we use the available weights of the model trained on USPTO 480K mixed [13].

For all the metrics that we report, we use the conventions established by Maziarz et al. [37], filtering out predicted invalid synthons and deduplicating predictions based on the canonical SMILES string (which has an influence over the metrics of models that output SMILES autoregressively, such as G2S and MT).

Synthon Transformer

Synthon completion data format

After the extraction of synthons from reactions, the SMILES of the leaving groups may be enhanced through the addition of dummy atoms, marked as [*], to the atoms that were previously bonded to synthon atoms. Furthermore, the bond order to the dummy atoms is equal to the order of the bonds that were broken. Finally, atom map numbers are added to the dummy atoms, equal to the current indices (in the synthon SMILES string) of the synthon atoms to which the leaving groups were previously bonded. We thus obtain a SMILES string representation of the leaving groups which can be unambiguously reattached to the synthons in order to obtain the initial reactants. We call this representation of the leaving groups enhanced SMILES. We note that for synthons that do not need leaving group completions, such as the reduced or oxidized forms of the target products, the corresponding enhanced SMILES of the leaving groups is given by the symbol $.

Moreover, as the enhanced SMILES of the leaving groups are dependent on the ordering within the SMILES string of the synthon, with each different ordering producing different indices used for attachment, the data can be augmented with random permutations of the synthon SMILES string. Such augmentations have been shown to improve the performance of the Molecular Transformer [13] and should therefore also improve the performance of the Synthon Transformer.

Thus, after synthons and leaving groups are extracted from USPTO 480K, we perform one round of augmentation to the synthon SMILES and then convert the SMILES of the leaving groups to the corresponding enhanced SMILES string.

Leaving group prediction by Synthon Transformer

For the Synthon Transformer, we report here the top-kk leaving group prediction that was obtained on the test set of USPTO 480K Synthon. We note that the input for the model for this metric was the ground truth synthons of Synthon USPTO 480K, and not the synthons predicted by the models. Thus, this metric measures strictly the capacity of the Synthon Transformer to accurately predict leaving groups.

Modelsk=1k = 1k=2k = 2k=3k = 3k=4k = 4k=5k = 5
Synthon Transformer0.76550.86780.89660.90870.9131

Table 3. Leaving group prediction on USPTO 480K Synthon dataset

The Synthon Transformer was trained on USPTO 480K Synthon with one round of augmentation

References

  1. [1]David F Nippa, Alexander J Boddy, Kenneth Atz, Uwe Grether, Hayley Binch, and Rainer E Martin. Accelerating compound synthesis in drug discovery: the role of digitalisation and automation. RSC Medicinal Chemistry, 16(12):5753–5764, 2025.
  2. [2]Jeff Guo, Víctor Sabanza-Gil, Olha Semenenko, Oleksii Hrabovskyi, Mykola Protopopov, Anna Kapeliukha, Oleksandr Mosia, Sofia Hatych, Diana Aleksiieieva, Tom Nelis, et al. Generative molecular design with steerable and granular synthesizability control. arXiv preprint arXiv:2505.08774, 2025.
  3. [3]Elias James Corey. The logic of chemical synthesis: multistep synthesis of complex carbogenic molecules (nobel lecture). Angewandte Chemie International Edition in English, 30(5):455–465, 1991.
  4. [4]Elias James Corey. General methods for the construction of complex molecules. Pure and Applied chemistry, 14(1):19–38, 1967.
  5. [5]Elias James Corey and Xue-Min Cheng. The Logic of Chemical Synthesis. John Wiley & Sons, Weinheim, 1995.
  6. [6]Elias James Corey and W Todd Wipke. Computer-assisted design of complex organic syntheses: Pathways for molecular synthesis can be devised with a computer and equipment for graphical communication. Science, 166(3902):178–192, 1969.
  7. [7]EJ Corey, W Todd Wipke, Richard D Cramer III, and W Jeffrey Howe. Computer-assisted synthetic analysis. facile man-machine communication of chemical structure by interactive computer graphics. J. Am. Chem. Soc., 94:421–430, 1972.
  8. [8]Samuel Genheden, Amol Thakkar, Veronika Chadimová, Jean-Louis Reymond, Ola Engkvist, and Esben Bjerrum. Aizynthfinder: a fast, robust and flexible open-source software for retrosynthetic planning. Journal of cheminformatics, 12(1):70, 2020.
  9. [9]Krzysztof Maziarz, Guoqing Liu, Hubert Misztela, Austin Tripp, Junren Li, Aleksei Kornev, Piotr Gaiński, Holger Hoefling, Mike Fortunato, Rishi Gupta, et al. Chemist-aligned retrosynthesis by ensembling diverse inductive bias models. arXiv preprint arXiv:2412.05269, 2024.arxiv.org/abs/2412.05269
  10. [10]Marwin HS Segler, Mike Preuss, and Mark P Waller. Planning chemical syntheses with deep neural networks and symbolic ai. Nature, 555(7698):604–610, 2018.DOI
  11. [11]Philippe Schwaller, Riccardo Petraglia, Valerio Zullo, Vishnu H Nair, Rico Andreas Haeuselmann, Riccardo Pisoni, Costas Bekas, Anna Iuliano, and Teodoro Laino. Predicting retrosynthetic pathways using transformer-based models and a hyper-graph exploration strategy. Chemical science, 11(12):3316–3325, 2020.DOI
  12. [12]Binghong Chen, Chengtao Li, Hanjun Dai, and Le Song. Retro*: learning retrosynthetic planning with neural guided a* search. In International conference on machine learning, pages 1608–1616. PMLR, 2020.arxiv.org/abs/2006.15820
  13. [13]Philippe Schwaller, Teodoro Laino, Théophile Gaudin, Peter Bolgar, Christopher A Hunter, Costas Bekas, et al. Molecular Transformer: A Model for Uncertainty-Calibrated Chemical Reaction Prediction. ACS Central Science, 5(9):1572–1583, 2019.DOI
  14. [14]Zhengkai Tu and Connor W Coley. Permutation Invariant Graph-to-Sequence Model for Template-Free Retrosynthesis and Reaction Prediction. Journal of Chemical Information and Modeling, 62(15):3503–3513, 2022.DOI
  15. [15]Mikolaj Sacha, Mikolaj Blaz, Piotr Byrski, Pawel Dabrowski-Tumanski, Mikolaj Chrominski, Rafal Loska, Pawel Wlodarczyk-Pruzynski, and Stanislaw Jastrzebski. Molecule Edit Graph Attention Network: Modeling Chemical Reactions as Sequences of Graph Edits. Journal of Chemical Information and Modeling, 61(7):3273–3284, 2021.DOI
  16. [16]Daniel Armstrong, Xuan-Vu Nguyen, Octavian Susanu, Gabriel Gibberd, Théo A Neukomm, Taddäus Strunden, Dan Forster, Morgane Delattre, Shawn Teh, Clément Rols, et al. Strategy-first synthesis planning for complex natural products. arXiv preprint arXiv:2608.07454, 2026.arxiv.org/abs/2608.07454
  17. [17]Barbara Mikulak-Klucznik, Patrycja Gołębiowska, Alison A Bayly, Oskar Popik, Tomasz Klucznik, Sara Szmykuć, Ewa P Gajewska, Piotr Dittwald, Olga Staszewska-Krajewska, Wiktor Beker, et al. Computational planning of the synthesis of complex natural products. Nature, 588 (7836):83–88, 2020.
  18. [18]Daniel Lowe. Chemical reactions from US patents (1976-Sep2016) http://doi.org/10.6084/m9.figshare.5104873.v1, 6 2017.
  19. [19]Amol Thakkar, Nidhal Selmi, Jean-Louis Reymond, Ola Engkvist, and Esben Jannik Bjerrum. “Ring breaker”: neural network driven synthesis prediction of the ring system chemical space. Journal of medicinal chemistry, 63(16):8791–8808, 2020.
  20. [20]Jonathan Clayden, Nick Greeves, and Stuart Warren. Organic chemistry. Oxford university press, 2012.
  21. [21]Jihye Roh, Joonyoung E Joung, Kevin Yu, Zhengkai Tu, G Logan Bartholomew, Omar A Santiago-Reyes, Mun Hong Fong, Richmond Sarpong, Sarah E Reisman, and Connor W Coley. Higher-level strategies for computer-aided retrosynthesis. ACS Central Science, 12(3):345, 2026.DOI
  22. [22]Nguyen Xuan-Vu, Octavian Susanu, Daniel Armstrong, and Philippe Schwaller. Mechanistic reaction prediction via discrete flow matching on graph-structured electron occupation. arXiv preprint arXiv:2608.027429, 2026.
  23. [23]Raghav Singhal, Zachary Horvitz, Ryan Teehan, Mengye Ren, Zhou Yu, Kathleen McKeown, and Rajesh Ranganath. A general framework for inference-time scaling and steering of diffusion models. arXiv preprint arXiv:2501.06848, 2025.arxiv.org/abs/2501.06848
  24. [24]Wengong Jin, Connor Coley, Regina Barzilay, and Tommi Jaakkola. Predicting organic reaction outcomes with weisfeiler-lehman network. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1709.04555
  25. [25]Paul Gri, Qian Wang, and Jieping Zhu. Concise Enantioselective Total Synthesis of (+)-Punctaporonin U. Journal of the American Chemical Society, 147(44):40106–40112, 2025.DOI
  26. [26]Ilia Igashov, Arne Schneuing, Marwin Segler, Michael Bronstein, and Bruno Correia. Retro-bridge: Modeling retrosynthesis with markov bridges. In International Conference on Learning Representations, volume 2024, pages 39622–39640, 2024.DOI
  27. [27]Robin Yadav, Qi Yan, Guy Wolf, Joey Bose, and Renjie Liao. Retro synflow: Discrete flow-matching for accurate and diverse single-step retrosynthesis. Advances in Neural Information Processing Systems, 38:55229–55258, 2026.arxiv.org/abs/2506.04439
  28. [28]Vignesh Ram Somnath, Charlotte Bunne, Connor Coley, Andreas Krause, and Regina Barzilay. Learning graph models for retrosynthesis prediction. Advances in Neural Information Processing Systems, 34:9405–9415, 2021.arxiv.org/abs/2006.07038
  29. [29]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1706.03762
  30. [30]Lutz F Tietze. Domino reactions in organic synthesis. Chemical reviews, 96(1):115–136, 1996.
  31. [31]KC Nicolaou and Jason S Chen. The art of total synthesis through cascade reactions. Chemical Society Reviews, 38(11):2993–3009, 2009.DOI
  32. [32]Andrew Campbell, Jason Yim, Regina Barzilay, Tom Rainforth, and Tommi Jaakkola. Generative flows on discrete state-spaces: Enabling multimodal flows with applications to protein co-design. arXiv preprint arXiv:2402.04997, 2024.arxiv.org/abs/2402.04997
  33. [33]Itai Gat, Tal Remez, Neta Shaul, Felix Kreuk, Ricky TQ Chen, Gabriel Synnaeve, Yossi Adi, and Yaron Lipman. Discrete flow matching. Advances in Neural Information Processing Systems, 37:133345–133385, 2024.arxiv.org/abs/2407.15595
  34. [34]Marton Havasi, Brian Karrer, Itai Gat, and Ricky TQ Chen. Edit flows: Flow matching with edit operations. arXiv preprint arXiv:2506.09018, 2025.arxiv.org/abs/2506.09018
  35. [35]Peter Holderrieth, Marton Havasi, Jason Yim, Neta Shaul, Itai Gat, Tommi Jaakkola, Brian Karrer, Ricky TQ Chen, and Yaron Lipman. Generator matching: Generative modeling with arbitrary markov processes. In International Conference on Learning Representations, volume 2025, pages 52153–52219, 2025.arxiv.org/abs/2410.20587
  36. [36]Philippe Schwaller, Benjamin Hoover, Jean-Louis Reymond, Hendrik Strobelt, and Teodoro Laino. Extraction of organic chemistry grammar from unsupervised learning of chemical reactions. Science Advances, 7(15):eabe4166, 2021.DOI
  37. [37]Krzysztof Maziarz, Austin Tripp, Guoqing Liu, Megan Stanley, Shufang Xie, Piotr Gaiński, Philipp Seidl, and Marwin HS Segler. Re-evaluating retrosynthesis algorithms with syntheseus. Faraday Discussions, 256:568–586, 2025.DOI

Paper details

vlnc:W_59p4nfks
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 9

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Physics and Astronomy

Not recorded for this paper · View statement →

Looking for related papers…
Contents