Copy-Augmented Representation for Structure Invariant Template-Free Retrosynthesis

Jiaxi Zhuang, Yu Zhang, Aimin Zhou, Ying QianarXiv 2025 · OpenReview

Abstract

Retrosynthesis prediction is fundamental to drug discovery and chemical synthesis, requiring the identification of reactants that can produce a target molecule. Current template-free methods struggle to capture the structural invariance inherent in chemical reactions, where substantial molecular scaffolds remain unchanged, leading to unnecessarily large search spaces and reduced prediction accuracy. We introduce C-SMILES, a novel molecular representation that decomposes traditional SMILES into element-token pairs with five special tokens, effectively minimizing editing distance between reactants and products. Building upon this representation, we incorporate a copy-augmented mechanism that dynamically determines whether to generate new tokens or preserve unchanged molecular fragments from the product. Our approach integrates SMILES alignment guidance to enhance attention consistency with ground-truth atom mappings, enabling more chemically coherent predictions. Comprehensive evaluation on USPTO-50K and large-scale USPTO-FULL datasets demonstrates significant improvements: 67.2% top-1 accuracy on USPTO-50K and 50.8% on USPTO-FULL, with 99.9% validity in generated molecules. This work establishes a new paradigm for structure-aware molecular generation with direct applications in computational drug discovery.

Introduction

In organic chemistry, the majority of reactions involve modifications to a specific "reactive site" while the rest of the molecular scaffold—the structural invariance—remains untouched. Traditional AI approaches to retrosynthesis typically fall into two categories: template-based and template-free. While template-based methods are chemically accurate, they are rigid and limited by predefined rules. Conversely, template-free methods treat retrosynthesis as a language translation task (Product $\rightarrow$ Reactants). Although more flexible, these methods often fail to recognize invariant structures, leading to "hallucinated" changes in stable parts of the molecule and producing syntactically correct but chemically impossible reactants.

Methodology

To address these challenges, we propose a framework that explicitly enforces structural invariance through three primary innovations:

  1. C-SMILES Representation: Traditional SMILES strings can be complex and inconsistent. C-SMILES decomposes bracketed atomic representations into element-token pairs using five special tokens (e.g., & for lowercase, + for charges, H for hydrogens). This reduces the vocabulary size from 80 to 55 and significantly shrinks the editing distance between the product and its corresponding reactants.
  2. Copy-Augmented Generation: Inspired by pointer-generator networks, the model’s decoder does not merely predict the next atom from a fixed vocabulary. Instead, at each step, it calculates a probability ($P_{gen}$) to decide whether to generate a new token or copy a fragment directly from the input product molecule.
  3. SMILES Alignment Guidance (SAM): To ensure the model focuses on the correct molecular fragments during the copy process, we utilize chemical atom-mapping data to supervise the Transformer's attention mechanism. This alignment map forces internal attention to correspond with actual chemical atom-to-atom mappings.
The proposed framework: (a) C-SMILES conversion for reduced editing distance, (b) copy-augmented decoder for structural preservation, and (c) SMILES alignment for attention grounding.

Key Insights and Results

By treating retrosynthesis as an editing task rather than a pure translation task, the model effectively constrains its search space. This focus on reactive sites allows for higher accuracy and near-perfect chemical validity. A critical component of this success is the SMILES Alignment Map (SAM), which grounds the Transformer's attention in chemical intuition.

Visualization of the cross-attention head compared to ground-truth atom mapping, demonstrating the effectiveness of SMILES Alignment Guidance (SAM).

Our method, C-SMILES, outperformed existing template-free baselines across several metrics:

  • Accuracy: The model achieved 67.2% top-1 accuracy on USPTO-50K (known class) and 50.8% on the massive USPTO-FULL dataset.
  • Validity: The model produced chemically valid SMILES strings 99.9% of the time for its top prediction, a significant improvement over previous graph-based and sequence-based models.
  • Round-Trip Accuracy: C-SMILES reached 90.0% round-trip accuracy, confirming that the predicted reactants are chemically plausible precursors for the target product.

Conclusion

This research demonstrates that incorporating structural invariance through C-SMILES and copy-augmented mechanisms significantly enhances retrosynthesis prediction. While the model currently relies on atom-mapped data during training, it provides a robust foundation for future work in multi-step retrosynthesis planning and explicit stereochemical handling. By reducing the search space and grounding attention in chemical reality, C-SMILES offers a powerful tool for computational drug discovery and synthetic chemistry.

Summary updated

BibTeX
@misc{zhuang2025copy,
  author = {Jiaxi Zhuang and Yu Zhang and Aimin Zhou and Ying Qian},
  title = {{Copy-Augmented Representation for Structure Invariant Template-Free Retrosynthesis}},
  year = {2025},
  eprint = {2510.16588},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.16588},
}
Figure