Efficient Retrosynthesis Prediction with Integral Flow Matching and Latent Inversion

Tao Yin, Xiaohong Zhang, Yinjie Zhu, Jiacheng Zhang, Haotian Zou, Li Huang, Jiajun Cai, Zhibin Zhang, Meng YanNeurIPS 2026

TL;DR

Designing a new drug requires working backward from a target molecule to figure out what simpler ingredients can build it—a chemical puzzle called retrosynthesis. State-of-the-art generative AI models solve this well, but they rely on dozens or hundreds of slow, iterative calculation steps per molecule. FlashRetro rewrites the mathematical playbook to make that leap from random noise to exact chemical ingredients in a single step, boosting top-1 accuracy while running up to 38× faster.

What Problem Does This Paper Address?

Imagine looking at a finished cake and trying to deduce the exact flour, eggs, and sugar that went into the bowl. In chemistry, retrosynthesis is the art of predicting which reactant molecules will combine to synthesize a desired target product. It is the bedrock of automated drug discovery and material design.

Recently, generative models like diffusion and Flow Matching—cousins to the AI models that generate images from noise—have achieved impressive accuracy in predicting these reactants without relying on rigid, pre-written chemical rules ("templates"). However, they face a severe bottleneck: speed. Standard flow and diffusion models learn instantaneous velocity—how to nudge noise toward a molecule one tiny fraction of a second at a time. At test time, they must run a neural network dozens or hundreds of times using numerical solvers to trace out the path.

Why not just take one giant step? Because molecules are discrete graphs. Atoms are either carbon or nitrogen; bonds are single or double. If a giant, approximate jump in continuous math lands even slightly off-target, it crosses a decoding boundary—turning a valid precursor into chemical nonsense. In high-throughput virtual screening involving millions of compounds, waiting for 100-step solvers simply doesn't scale.

Methods

Instead of training a model to take tiny steps and hoping it can leap at test time, the authors align training directly with one-step inference.

Figure 1: Overview of the FlashRetro pipeline, illustrating the stages of latent encoding, Integral Flow Matching, Latent Inversion, and discrete molecule decoding. IFM learns finite-interval latent transport for 1-NFE retrosynthesis prediction conditioned on the product latent.

Here is how the FlashRetro pipeline works:

  • Continuous Latent Space (Standard): Two separate Graph Transformer encoders project discrete product and reactant molecular graphs into continuous vector representations ("latents").
  • Integral Flow Matching / IFM (New): Rather than learning local, instantaneous velocity at a single point in time, FlashRetro learns interval-normalized integral velocity—essentially the average transport needed across a finite time span $[r, t]$. Because integrating across every possible interval during training is impractical, the authors differentiate the integral definition and use automatic differentiation (with a stabilizing stop-gradient) to train the network efficiently.
  • 1-NFE Latent Inversion (New): At test time, there are no differential equation solvers. Using 1-NFE (1 Number of Function Evaluations—meaning just one forward pass through the transport network), FlashRetro takes random Gaussian noise conditioned on the target product and subtracts the learned full-interval transport vector in one shot. A 12-layer decoder then translates that landing spot directly into atom types, bonds, formal charges, and aromatic rings.

Datasets

The authors train and evaluate FlashRetro on USPTO-50K, the standard retrosynthesis benchmark containing roughly 50,000 atom-mapped chemical reactions extracted from US patents, using standard community data splits for fair comparison across both known and unknown reaction classes. No new datasets are introduced.

Key Insights and Ideas

  • Exact alignment beats fast approximation: FlashRetro isn't a compressed or distilled version of a multi-step model. When the authors tested FlashRetro with 2, 10, or 100 solver steps instead of 1, accuracy barely budged (69.30% at 1 step vs. 69.44% at 100 steps). Meanwhile, prior multi-step models completely collapsed at 1–2 steps. FlashRetro's single step already captures the exact endpoint transport.
  • End-to-end co-adaptation builds "safe" landing zones: Freezing the encoders and training the flow model separately caused Top-1 accuracy to drop by nearly 17 percentage points (from 69.3% to 52.4%). Training encoders, transport, and decoder jointly forces the latent space to organize wide, forgiving "decoding basins" around valid molecules so small errors don't flip discrete chemical attributes.
  • The Goldilocks rule of interval sampling: During training, FlashRetro mixes standard zero-span points (instantaneous velocity) with finite time spans. Sampling finite spans 25% of the time jumped Top-1 accuracy from 60.51% to 69.30%. Surprisingly, overdoing it—sampling finite spans 75% or 100% of the time—destabilized training and crashed accuracy down to ~20%.

Key Results

On USPTO-50K (unknown reaction class), FlashRetro sets a new high-water mark for low-latency prediction:

  • Superior Accuracy: Achieves 69.3% Top-1 and 78.4% Top-3 exact-match accuracy, outperforming all prior template-free, semi-template, and template-based baselines on Top-1 (surpassing strong recent flow/diffusion baselines like RetroSynFlow at 60.0% and GDiffRetro at 58.9%).
  • Massive Speedups: Averages just 5.1 ms per reactant (0.51 seconds per 100 reactants on an NVIDIA A800 GPU). That is ~22.6× faster than RetroSynFlow and ~38.2× faster than GDiffRetro.
Figure 3: Accuracy–latency Pareto comparison for retrosynthesis prediction.
  • Data & Training Efficiency: FlashRetro surpasses the 100-epoch Top-1 accuracy of RetroSynFlow and GDiffRetro after just 40 epochs, and beats RetroSynFlow's final Top-1 score using less than 20% of the training data.

Limitations and Future Work

While the paper does not include a dedicated limitations section, the authors note two concrete trade-offs in their problem setup and experiments:

  • Diminishing leads on broad candidate sets (Higher-$k$): FlashRetro shines brightest when you need the best answer immediately (Top-1 and Top-3). At Top-5 (79.8%) and Top-10 (81.1%), multi-step baselines like RetroSynFlow (81.2% Top-5, 85.8% Top-10) edge ahead, and the authors note that stochastic multi-step (SDE) sampling better preserves structural validity across larger, diverse candidate sets.
  • Single-product scope: Following standard benchmark conventions, the setup assumes reactions have only a single target product molecule ($|P| = 1$). Future extensions to multi-step synthesis planning or multi-product reactions are not explicitly detailed in the text.

Summary updated

Abstract

Fast and accurate retrosynthesis prediction is desired for downstream drug discovery and synthetic planning tasks. Currently, training and sampling state-of-the-art discrete diffusion or flow-based models for retrosynthesis requires significant computational resources. In this work, we propose FlashRetro, an Integral Flow Matching (IFM) framework with Latent Inversion for efficient retrosynthesis prediction. FlashRetro learns finite-interval latent transport rather than local instantaneous velocity, directly matching the transport quantity required for one-step latent inversion and avoiding test-time numerical integration. For inference, FlashRetro uses a principled 1-NFE Latent Inversion rule that maps a noise latent conditioned on the product latent to the reactant latent with a single learned integral-transport update. Experimental results on standard benchmarks (USPTO-50K) show that FlashRetro achieves superior top@1 accuracy, outperforming prior discrete flow-matching methods by 13.5\% and diffusion-based baselines by 14.2\%, while its average inference time is only 5.1 ms per reactant---38$\times$ faster than multi-step diffusion-based models and nearly 22$\times$ faster than recent discrete flow models. These results show that FlashRetro provides an effective path toward highly efficient 1-NFE retrosynthesis prediction with flow-based models.
BibTeX
@inproceedings{yin2026efficient,
  author = {Tao Yin and Xiaohong Zhang and Yinjie Zhu and Jiacheng Zhang and Haotian Zou and Li Huang and Jiajun Cai and Zhibin Zhang and Meng Yan},
  title = {{Efficient Retrosynthesis Prediction with Integral Flow Matching and Latent Inversion}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=trT9R6Kr0G},
}
Figure