Chemical knowledge-informed framework for privacy-aware retrosynthesis learning

Guikun Chen, Xu Zhang, Xiaolin Hu, Yong Liu, Yi Yang, Wenguan Wang

Abstract

Retrosynthesis—the process of identifying precursor molecules for a target compound—is a cornerstone of organic chemistry and drug discovery. However, the development of robust AI models for retrosynthesis is frequently hindered by "data islands," where proprietary reaction datasets are kept isolated due to commercial sensitivity. While Federated Learning (FL) offers a potential solution for collaborative training without data sharing, standard FL algorithms often struggle with the non-IID (non-identically and independently distributed) nature of chemical data. This paper introduces the Chemical Knowledge-Informed Framework (CKIF), which utilizes molecular fingerprints and Tanimoto similarity to intelligently weight and personalize model updates. Our results demonstrate that CKIF significantly outperforms local training and standard FL baselines, effectively bridging the gap between data privacy and collaborative chemical intelligence.

Introduction

In the pharmaceutical and materials science industries, chemical reaction data is a pivotal asset. Because these datasets often contain trade secrets, organizations are reluctant to share them, leading to fragmented "data islands." Centralized training, which requires pooling all data into a single server, is often a non-starter due to privacy and legal constraints.

Federated Learning (FL) has emerged as a promising alternative, allowing multiple participants to train a shared model by exchanging only model parameters rather than raw data. However, standard FL approaches like FedAvg assume that data is distributed uniformly across participants. In chemistry, this is rarely the case; one organization might specialize in oncology-related acylation, while another focuses on polymer ring formation. A "one-size-fits-all" global model often fails to capture these specialized nuances, leading to suboptimal performance for all participants.

Methodology

The CKIF Architecture

The Chemical Knowledge-Informed Framework (CKIF) treats retrosynthesis as a sequence-to-sequence (seq2seq) translation problem. It utilizes a standard Transformer architecture to translate product SMILES (Simplified Molecular Input Line Entry System) strings into reactant SMILES strings.

Chemical Knowledge-Informed Weighting (CKIW)

The core innovation of CKIF is the Chemical Knowledge-Informed Weighting (CKIW) strategy, which moves beyond simple parameter averaging. The process follows five key steps:

  1. Local Training: Each client (organization) trains a local model on its private, proprietary data.
  2. Parameter Exchange: Clients share their model weights with a central server or directly with each other, maintaining the privacy of the underlying data.
  3. Intelligent Aggregation: Rather than treating all incoming models equally, each client evaluates the models received from others.
  4. Chemical Validation: A client uses a small local "proxy" dataset to test the performance of the other clients' models. It compares the predicted reactants to the ground truth using molecular fingerprints (such as ECFP and MACCS keys) and Tanimoto similarity.
  5. Personalized Weighting: Models that demonstrate high chemical similarity to the client’s specific domain are assigned higher weights. This creates a personalized model for every participant that benefits from collective knowledge while remaining specialized to their specific chemical niche.

Experimental Setup

The framework was evaluated using three major benchmarks, split to simulate the "data island" scenario:

  • USPTO-50K: 50,000 high-quality reactions, split among clients based on reaction classes (e.g., C-C bond formation).
  • USPTO-MIT: Approximately 480,000 reactions, split by characteristics like ring opening or formation.
  • USPTO 1k TPL: A dataset of the 1,000 most common reaction templates, used to test scalability with up to eight clients.

Results and Discussion

Performance Gains

CKIF demonstrated substantial improvements over local training, particularly for clients with limited data. In one instance, a client (C2) saw its Top-1 accuracy jump from a meager 4.1% when trained locally to 23.6% using the CKIF framework. Across all datasets, CKIF consistently outperformed the FedAvg baseline in metrics such as Top-K, MaxFrag, and RoundTrip accuracy.

The Specialization Paradox

An intriguing finding was that CKIF occasionally outperformed Centralized Training—the theoretical gold standard. This suggests a "specialization paradox": a single global model can suffer from "distribution mismatch" when forced to learn too many disparate types of chemistry simultaneously. CKIF’s personalized approach allows clients to filter out irrelevant or "noisy" chemical knowledge, maintaining higher precision in their specific domain.

Robustness and Scalability

Because CKIW weights models based on performance, the framework is inherently robust against low-quality or "noisy" data updates. Furthermore, as the number of clients increased from four to eight, the performance of all participants improved, proving that the framework effectively extracts beneficial guidance as the collaborative pool grows.

Conclusion

CKIF represents a significant step forward in privacy-aware chemical research. By using symbolic chemical knowledge (fingerprints) as a filtering mechanism for model aggregation, it allows organizations to overcome the limitations of data islands without compromising proprietary secrets. Future work will explore the use of customized fingerprints for specific chemical niches and investigate the framework's resilience against sophisticated gradient leakage attacks.

Summary updated

BibTeX
@inproceedings{chen2025chemical,
  author = {Guikun Chen and Xu Zhang and Xiaolin Hu and Yong Liu and Yi Yang and Wenguan Wang},
  title = {{Chemical knowledge-informed framework for privacy-aware retrosynthesis learning}},
  booktitle = {Nature Communications},
  year = {2025},
  doi = {10.1038/s41467-025-63036-7},
}
Figure