NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

UAlign: Pushing the Limit of Template-free Retrosynthesis Prediction with Unsupervised SMILES Alignment

Kaipeng Zeng, Bo yang, Xin Zhao, Yu Zhang, Fan Nie, Xiaokang Yang, Yaohui Jin, Yanyan Xu · DOI

Abstract

Retrosynthesis planning poses a formidable challenge in the organic chemical industry. Single-step retrosynthesis prediction, a crucial step in the planning process, has witnessed a surge in interest in recent years due to advancements in AI for science. This paper introduces UAlign, a template-free graph-to-sequence pipeline for retrosynthesis prediction. By combining graph neural networks and Transformers, our method can more effectively leverage the inherent graph structure of molecules. Based on the fact that the majority of molecule structures remain unchanged during a chemical reaction, we propose a simple yet effective SMILES alignment technique to facilitate the reuse of unchanged structures for reactant generation. Extensive experiments show that our method substantially outperforms state-of-the-art template-free and semi-template-based approaches, achieving effectiveness comparable to, or even surpassing, established powerful template-based methods.

Introduction

In organic chemistry, retrosynthesis is the process of identifying the starting materials (reactants) needed to create a target molecule (the product). Traditionally, AI approaches fall into two camps: template-based methods, which rely on rigid databases of known reaction rules, and template-free methods, which treat the problem as a language translation task (SMILES-to-SMILES). While flexible, template-free models often ignore the underlying graph structure of molecules and fail to realize that most of a molecule remains unchanged during a reaction. They essentially "generate from scratch" rather than efficiently "copying" the parts of the molecule that don't change. UAlign addresses this gap by combining structural awareness with a novel unsupervised alignment technique.

Methods

The UAlign framework utilizes a "graph-to-sequence" architecture to bridge the gap between molecular topology and generative sequence modeling.

EGAT+ Encoder

At the heart of the encoder is the EGAT+ (Enhanced Graph Attention Network), a modified GNN that explicitly incorporates chemical bond information (edge features) into the message-passing process. This creates a richer, chemically aware embedding of the product molecule compared to standard sequence-based encoders.

The UAlign architecture combining an EGAT+ graph encoder with a Transformer decoder.

Unsupervised SMILES Alignment

The core innovation of UAlign is its unsupervised SMILES alignment. The model establishes a correspondence between product atoms and reactant tokens without manual labels. It achieves this by forcing the reactant SMILES to follow a Depth-First Search (DFS) order that is consistent with the product's traversal order. This alignment makes it significantly easier for the Transformer decoder to "reuse" substructures from the product graph.

Illustration of the Order-Preserving SMILES generation process using DFS traversal to align product and reactant structures.

Training Strategy

The model undergoes a two-stage training process. First, a Modality Alignment phase trains the model to translate a molecular graph into its own SMILES string, helping it learn the relationship between graphs and sequences. Second, the model is fine-tuned for Retrosynthesis to predict reactants from the product graph. To prevent over-reliance on a single traversal path, the team employs on-the-fly DFS order randomization during training.

Results and Discussion

UAlign was evaluated on three standard benchmarks: USPTO-50K, USPTO-MIT, and USPTO-FULL. The results demonstrate that UAlign sets new benchmarks for template-free retrosynthesis:

  • Top-k Accuracy: On USPTO-50K (reaction class unknown), UAlign achieved a Top-1 accuracy of 53.6% and a Top-10 accuracy of 90.3%, significantly outperforming previous state-of-the-art models like Retroformer.
  • Template Rivalry: For the first time, a template-free method consistently rivals or surpasses established template-based methods (e.g., LocalRetro and GLN), which were long considered the gold standard for accuracy.
  • Reliability: The model maintains a high SMILES validity rate of 99.8% for its top prediction.
  • Practical Utility: The authors demonstrated UAlign's effectiveness by successfully predicting multi-step synthetic pathways for complex FDA-approved drugs such as Mitapivat and Pacritinib.

Conclusion

UAlign demonstrates that structural conservation is key to efficient retrosynthesis. By exploiting the fact that most of a molecular graph remains static during a reaction, UAlign turns a difficult generation problem into a selective modification task. The success of the unsupervised alignment suggests that allowing the model's attention mechanism to remain flexible is often superior to restrictive supervised mapping. Future work will focus on integrating UAlign into more complex, multi-step planning tools and improving the chemical diversity of generated pathways.

Summary updated

BibTeX
@article{zeng2024ualign,
  author = {Kaipeng Zeng and Bo yang and Xin Zhao and Yu Zhang and Fan Nie and Xiaokang Yang and Yaohui Jin and Yanyan Xu},
  title = {{UAlign: Pushing the Limit of Template-free Retrosynthesis Prediction with Unsupervised SMILES Alignment}},
  journal = {J. Cheminformatics},
  year = {2024},
  doi = {10.1186/s13321-024-00877-2},
}
Figure