Abstract
Generative models see increasing use in computer-aided drug design. However, while performing well at capturing distributions of molecular motifs, they often produce synthetically inaccessible molecules. To address this, we introduce SynFlowNet, a GFlowNet model whose action space uses chemical reactions and purchasable reactants to sequentially build new molecules. By incorporating forward synthesis as an explicit constraint of the generative mechanism, we aim at bridging the gap between in silico molecular generation and real world synthesis capabilities. We evaluate our approach using synthetic accessibility scores and an independent retrosynthesis tool to assess the synthesizability of our compounds, and motivate the choice of GFlowNets through considerable improvement in sample diversity compared to baselines. Additionally, we identify challenges with reaction encodings that can complicate traversal of the MDP in the backward direction. To address this, we introduce various strategies for learning the GFlowNet backward policy and thus demonstrate how additional constraints can be integrated into the GFlowNet MDP framework. This approach enables our model to successfully identify synthesis pathways for previously unseen molecules.
Introduction
In computer-aided drug design, generative AI models have become highly proficient at proposing molecules that theoretically bind to protein targets. However, a major hurdle remains: many of these "dream molecules" are synthetically inaccessible. They often violate chemical laws or require non-existent starting materials, rendering them useless for laboratory validation. Traditional solutions, such as post-hoc complexity scoring or retrosynthesis simulations, are often too slow or applied too late in the design cycle. SynFlowNet addresses this by moving the synthesis constraint directly into the generative process itself.
Methods
The researchers utilize Generative Flow Networks (GFlowNets), a framework designed to sample diverse, high-reward objects. Unlike standard Reinforcement Learning (RL), which often collapses onto a single optimal solution, GFlowNets aim to find many different pathways to achieve high rewards. This diversity is crucial for drug discovery, where multiple chemical "leads" are preferred to mitigate downstream failure risks.
Reaction-Based Action Space
Instead of building molecules atom-by-atom, SynFlowNet's action space consists of choosing documented chemical reaction templates (e.g., amide coupling) and selecting purchasable building blocks from a library of approximately 221,000 starting materials. This ensures that every generated molecule is synthesizable by construction.
Technical Innovations
- Learned Backward Policy ($P_B$): In a reaction-based environment, navigating "backward" (from a product to its reactants) is mathematically complex because not every reverse step leads back to a valid starting state. The authors introduced a strategy to learn this backward policy, ensuring the model stays within valid chemical space.
- Fingerprint-Based Scaling: To handle massive libraries, the model uses Morgan fingerprints as a fixed weight matrix. This allows the model to generalize: if it learns that one building block works well, it automatically understands that structurally similar blocks may also be effective.
Results
SynFlowNet was evaluated on its ability to design binders for several protein targets, including the SARS-CoV-2 main protease (Mpro).
Synthesizability and Novelty
Using the independent retrosynthesis tool AiZynthFinder, SynFlowNet achieved a 62% success rate for molecules built in three steps. In contrast, traditional fragment-based GFlowNets scored 0%, as they produced molecules the tool could not synthesize. Furthermore, SynFlowNet generated molecules with high predicted binding scores but low similarity to known molecules in the ChEMBL database, suggesting true de novo discovery capabilities.
Scaling and Efficiency
The model maintained high performance even when scaled to the full Enamine REAL set. The fingerprint embedding allowed the model to navigate an immense state space without a proportional increase in trainable parameters.
Discussion and Future Work
SynFlowNet demonstrates that embedding domain-specific knowledge—specifically chemical reactions—into the generative process significantly improves the practical utility of AI in drug design. While the current model focuses on linear pathways, future iterations could expand to support convergent synthesis, where multiple complex intermediates are joined. Additionally, incorporating 3D stereochemistry and specific reaction conditions (temperature, pressure) remains an important frontier for making AI molecule design truly lab-ready.
Summary updated