TRACER: reaction-based molecular optimization using conditional transformer and Monte-Carlo tree search
Nobuaki YASUO *1, Shogo NAKAMURA3, Masakazu SEKIJIMA2
1School of Materials and Chemical Technology, Science Tokyo
2School of Computing, Science Tokyo
3School of Life Science and Technology, Science Tokyo
Introduction
Molecular generative models are considered as potential techniques in computer-aided drug discovery. However, traditional molecular generative models often overlook the feasibility of organic synthesis, focusing solely on “what to make” rather than “how to make”. Here we introduce TRACER [1], a novel framework designed to address critical challenges in drug discovery by integrating molecular property optimization with synthetic pathway generation.
Methods
TRACER combines a conditional transformer model with a Monte Carlo Tree Search (MCTS) algorithm. The conditional transformer predicts products from given reactants under specific reaction type constraints, learning real chemical conversions from a dataset of 1000 reaction types. This model utilizes an attention mechanism to recognize substructures affecting reactions. A Graph Convolutional Network (GCN) is used to predict applicable reaction templates, which serve as conditional tokens for the transformer, enabling the generation of compounds through diverse chemical reactions. The MCTS then acts as a structural optimization algorithm, guiding the exploration of chemical space and generating multi-step synthetic pathways based on virtual reactions performed by the transformer.
Results and discussion
The results show that TRACER captures the complexity of organic synthesis and navigates chemical space considering real-world reactivity constraints, correctly predicting selectivity in chemical reactions. The conditional transformer significantly improved product prediction accuracy compared to an unconditional model.
TRACER also effectively generates compounds with high Quantitative Structure-Activity Relationship (QSAR) scores for targets like DRD2, AKT1, and CXCR4, and proposes rational products and synthetic pathways. Generated compounds are distinct from those in the USPTO database and exhibits high Fréchet ChemNet Distance (FCD) values, indicating its ability to explore regions far from the training data. Unlike previous methods that focus on latent space exploration or are limited to single-step reactions, TRACER performs direct optimization based on virtual chemical reactions, providing a more realistic approach to molecular design.
These results highlight TRACER's potential to accelerate the discovery and optimization of novel drug candidates by simultaneously considering molecular properties and synthetic feasibility.
Reference
[1]: Nakamura, S., Yasuo, N. & Sekijima, M. Molecular optimization using a conditional transformer for reaction-aware compound exploration with reinforcement learning. Commun Chem 8, 40 (2025). https://doi.org/10.1038/s42004-025-01437-x (open access)