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

Enhancing Chemical Reaction and Retrosynthesis Prediction with Large Language Model and Dual-task Learning

Xuan Lin, Qingrui Liu, Hongxin Xiang, Daojian Zeng, Xiangxiang Zeng

Introduction

In the field of drug discovery, predicting chemical reactions and performing retrosynthetic analysis are fundamental tasks. Reaction prediction involves determining the products of given reactants, while retrosynthesis identifies the starting materials required to synthesize a target molecule. Despite their importance, current AI-driven approaches are hindered by two primary challenges: the scarcity of high-quality experimental data and the isolation of these two tasks in model training. Most existing models treat forward and backward reactions as independent problems, failing to capture the inherent chemical symmetry between them.

Methodology: The ChemDual Framework

To address these limitations, the authors introduced ChemDual, a large language model (LLM) framework based on the LLaMA 3.1 architecture. ChemDual integrates three core innovations to enhance chemical intuition and predictive accuracy.

BRICS-based Data Construction

To overcome data scarcity, ChemDual utilizes the Breaking of Retrosynthetically Interesting Chemical Substructures (BRICS) algorithm. By fragmenting 2.2 million molecules from the ChEMBL-34 database, the researchers generated a massive dataset of 4.4 million high-quality instruction-tuning samples. These fragments serve as effective proxies for real-world reactants, as evidenced by a high average similarity score of 0.665 between algorithmic fragments and actual reactants.

Multi-scale Tokenizer

Unlike standard LLMs optimized for natural language, ChemDual employs a specialized multi-scale tokenizer. It incorporates 16 "dummy atom" tokens for fragmentation placeholders and 180 tokens representing common functional groups (e.g., benzene rings). This allows the model to process chemical structures at both atomic and functional levels, improving its understanding of complex molecular architectures.

Dual-task Learning

The defining feature of ChemDual is its dual-task learning strategy. By jointly optimizing for both forward reaction prediction (fragmentation) and backward retrosynthesis (recombination), the model learns the bidirectional logic of chemical transformations. This approach is analogous to dual-language training in machine translation, where learning both directions strengthens the underlying representation of the "language" of chemistry.

ChemDual Methodology: BRICS-based fragmentation and the dual-task learning architecture compared to general LLMs.

Experimental Results

ChemDual was evaluated against several state-of-the-art specialized models, including BioT5+ and Mol-Instruction, across multiple benchmarks.

Performance Benchmarks

On the Mol-Instruction benchmark, ChemDual achieved an exact match score of 0.869 for reaction prediction and 0.670 for retrosynthesis, outperforming previous leaders. In retrosynthesis tasks on the USPTO-50K dataset, the model demonstrated a 7.63% improvement in Top-10 accuracy when integrated with specialized modules.

Ablation Study

The impact of the dual-task learning strategy is clearly demonstrated in ablation studies. For reaction prediction, the inclusion of dual-task learning improved the exact match score of the base LLaMA model from 66.60% to 72.90%, and for ChemDual from 76.60% to 86.90%.

Ablation comparison showing the significant performance gains achieved by incorporating dual-task learning in both LLaMA and ChemDual models.

Discussion and Conclusion

ChemDual represents a significant advancement in applying LLMs to chemistry. By leveraging algorithmic fragmentation to generate vast amounts of synthetic data and employing a dual-task objective to capture chemical symmetry, the model achieves superior performance in both forward and backward reaction tasks.

While ChemDual maintains high chemical validity (99.6%), future work will focus on further reducing invalid SMILES generation and extending the framework to multi-step retrosynthesis. Additionally, incorporating reaction conditions such as temperature, pressure, and catalysts into the instruction-tuning process will be essential for enhancing the model's real-world laboratory utility.

Summary updated

BibTeX
@inproceedings{lin2025enhancing,
  author = {Xuan Lin and Qingrui Liu and Hongxin Xiang and Daojian Zeng and Xiangxiang Zeng},
  title = {{Enhancing Chemical Reaction and Retrosynthesis Prediction with Large Language Model and Dual-task Learning}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.24963/ijcai.2025/840},
}
Figure