Introduction
Machine learning has become a fundamental tool for molecule synthesis and drug discovery. However, current data-driven strategies often rely on one-step retrosynthesis models that predict synthetic routes in a top-down manner. This paper introduces CREBM (Conditional Residual Energy-based Models), a "plug-and-play" framework designed to improve multi-step molecule synthesis by evaluating the quality of an entire synthetic route rather than just individual steps. By treating retrosynthesis as a preference optimization problem—similar to how Large Language Models (LLMs) are aligned with human feedback—the authors achieve a 2.5% boost in top-1 accuracy over existing state-of-the-art models.
The Challenge of Greedy Myopia
Predicting how to synthesize a complex molecule (retrosynthesis) is traditionally done in a greedy fashion. A model predicts the immediate precursors for a target, then the precursors for those precursors, and so on, until it reaches commercially available starting materials.
The authors identify two major flaws in this standard approach:
- Greedy Myopia: Current models are "locally normalized," meaning they pick the best next step without looking ahead to see if that path leads to a dead end, an expensive material, or a low-yield reaction.
- Lack of Global Constraints: It is difficult for standard models to optimize for global criteria like total cost, number of steps, or "greenness" because they only evaluate one reaction at a time.
Essentially, current AI chemists are good at picking the next move but struggle to plan the entire "game" of synthesis.
Methodology: Conditional Residual Energy-Based Models
To overcome these limitations, the authors propose the Conditional Residual Energy-based Model (CREBM).
- The Residual Approach: Instead of building a new retrosynthesis model from scratch, they take an existing base model and add a "correction" term—an energy function. The final probability of a route is determined by both the base model's logic and the EBM's global evaluation.
- Preference Optimization: Training EBMs is notoriously difficult because calculating the "normalizing constant" (the sum of all possible routes) is computationally impossible. To bypass this, the authors use a Bradley-Terry model to train the EBM on preferences.
Given two possible synthetic routes (as illustrated above), the model learns to assign lower "energy" (higher preference) to the more feasible one.
- Heuristic Reward Function: Because absolute "ground truth" for a perfect route is subjective, the authors designed a reward function based on feasibility. They use a forward-synthesis model to verify if the predicted starting materials actually produce the target molecule, utilizing Tanimoto similarity to compare predicted materials to known successful ones.
Key Insights
- Retrosynthesis as Sequence Generation: The authors bridge chemistry and NLP, noting that retrosynthesis planning suffers from "exposure bias" similar to LLMs—where small errors early in a sequence compound into total failure at the end.
- Plug-and-Play Compatibility: Because CREBM is a residual model, it acts as an adapter. Researchers can keep their preferred retrosynthesis engine (like Neuralsym or FusionRetro) and simply layer CREBM on top to filter and re-rank the results.
- Global Feasibility over Local Probability: A route might have high-probability individual steps but be chemically impossible as a whole. CREBM’s ability to look at the starting materials and the target simultaneously helps it catch these chemical "hallucinations."
Key Results
The framework was tested on the RetroBench dataset across three categories of models: template-based, semi-template, and template-free.
- Accuracy Boost: CREBM consistently improved performance across the board. Notably, it boosted the Neuralsym model's top-1 accuracy from 41.7% to 44.2%, achieving a new state-of-the-art on the RetroBench leaderboard.
- Long-Route Performance: The advantage of CREBM became even more pronounced as the synthetic routes grew longer and more complex, proving that global lookahead is critical for multi-step chemistry.
Limitations and Future Work
While highly effective, the current model relies heavily on a forward-synthesis model and similarity metrics to define "good" routes. If the forward model is inaccurate, the EBM might learn incorrect preferences. Furthermore, while the framework can optimize for cost, yield, and environmental impact, current open-source datasets lack the detailed material pricing and exact reaction yields needed to train these specific criteria fully. Future work will likely focus on developing "compositional" CREBMs capable of simultaneously optimizing for multiple, sometimes conflicting, real-world criteria.
Summary updated