log-RRIM: Yield Prediction via Local-to-global Reaction Representation Learning and Interaction Modeling

Xiao Hu, Ziqi Chen, Bo Peng, Daniel Adu-Ampratwum, Xia Ning · DOI

Abstract

Accurate prediction of chemical reaction yields is crucial for optimizing organic synthesis, potentially reducing time and resources spent on experimentation. We present log-RRIM, an innovative graph transformer-based framework designed for predicting chemical reaction yields. A key feature of log-RRIM is its integration of a cross-attention mechanism that focuses on the interplay between reagents and reaction centers. This design reflects a fundamental principle in chemical reactions: the crucial role of reagents in influencing bond-breaking and formation processes. log-RRIM implements a local-to-global reaction representation learning strategy, capturing detailed molecule-level information before modeling and aggregating intermolecular interactions. Our experiments demonstrate superior performance, especially for medium to high-yielding reactions, making log-RRIM a valuable tool for reaction planning and optimization.

Introduction

In the field of organic chemistry, the "yield"—the ratio of the actual amount of product obtained to the theoretical maximum—is a primary metric of success. Predicting this value accurately is essential for drug discovery and chemical manufacturing, yet it remains a "Grand Challenge" for artificial intelligence. Traditional computational methods often struggle with the complexity of chemical space, while many modern AI models treat chemical reactions as simple sequences of characters or collections of atoms, frequently overlooking the nuanced mechanistic interactions that drive chemical outcomes.

We introduce log-RRIM (Local-to-global Reaction Representation Learning and Interaction Modeling), a framework that shifts the focus from "black box" sequence modeling to a chemically-aware architecture. By explicitly modeling the interactions between reagents and specific reaction centers, log-RRIM achieves state-of-the-art accuracy in yield prediction.

Methodology: The Local-to-Global Approach

The log-RRIM architecture is built on the principle that chemical reactions are hierarchical processes. It operates through three distinct stages:

1. Molecule Representation Learning (MRL)

The process begins at the molecular level. Using a Molecule Attention Transformer (MAT), the framework learns the structural features of each component in the reaction: reactants, reagents, and products. This ensures that the unique identity and structural nuances of every molecule are preserved before they are integrated into the broader reaction context.

2. Molecule Interaction (MIT)

The core innovation of log-RRIM lies in the Molecule Interaction module. Unlike models that treat all atoms equally, log-RRIM identifies the reaction center—the specific atoms where bonds are broken or formed. It then employs a cross-attention mechanism to simulate how reagents (such as catalysts or solvents) interact with these centers. This design mirrors the chemical reality that a catalyst's primary function is to lower the activation energy at the site of chemical change.

3. Reaction Information Aggregation (RIA)

Finally, the model hierarchically aggregates these local interactions into a global "reaction fingerprint." This fingerprint captures how various molecular fragments contribute to the overall yield, allowing the model to predict the final percentage with high precision.

The researchers evaluated two variants: log-RRIM<sub>b</sub>, which utilizes basic atom features, and log-RRIM<sub>l</sub>, which incorporates features from a pre-trained model.

Experimental Results

The framework was benchmarked against three diverse datasets to test its robustness and generalizability:

  • USPTO500MT: A large-scale dataset of over 140,000 reactions from US patents, representing diverse and often "noisy" real-world data.
  • Buchwald–Hartwig: A specialized dataset of ~4,000 palladium-catalyzed reactions, serving as a high-quality benchmark for specific reaction types.
  • CJHIF: An external validation set of 1,000 reactions from high-impact journals, used to assess the model's ability to generalize to unseen data.

Performance Highlights

  • State-of-the-Art Accuracy: On the USPTO500MT dataset, log-RRIM achieved a Mean Absolute Error (MAE) of 0.179, outperforming established models like YieldBERT and T5Chem.
  • High-Yield Reliability: The model demonstrated exceptional reliability in predicting reactions with yields between 40% and 100%. This is particularly valuable for synthetic chemists who prioritize identifying high-performing reaction conditions.
  • Generalization and Robustness: In tests on the external CJHIF dataset, log-RRIM showed a 16.8% improvement over T5Chem. Furthermore, ablation studies revealed that removing the Molecule Interaction (MIT) module led to a 45% increase in error, validating the importance of modeling reagent-center interactions.

Discussion: Chemical Inductive Bias vs. Brute Force

One of the most significant findings of this research is that log-RRIM<sub>b</sub> (without massive pre-training) performed comparably to, and often better than, foundation models pre-trained on nearly 100 million molecules. This suggests that incorporating "chemical inductive bias"—building the fundamental rules of chemistry into the model architecture—is more effective for specialized tasks like yield prediction than relying solely on large-scale data volume.

Additionally, log-RRIM's sensitivity to small molecular fragments addresses a common failure point in sequence-based models. By analyzing molecules individually before aggregation, the model can detect how a minor change, such as the addition of a single fluorine atom, can drastically alter the reaction yield.

Conclusion and Future Work

log-RRIM represents a significant step forward in making AI a practical tool for the chemistry lab. By focusing on the interplay between reagents and reaction centers, it provides a more mechanistically grounded approach to yield prediction.

Future developments may include the integration of transition state information and the relative reactivity of functional groups. The authors also envision expanding the framework into a multi-task learning system capable of simultaneously predicting yields, optimizing conditions, and planning retrosynthetic pathways, further accelerating the pace of chemical discovery.

The data and codes for log-RRIM are accessible at: https://github.com/ninglab/Yield_log_RRIM.

Summary updated

BibTeX
@article{hu2024log,
  author = {Xiao Hu and Ziqi Chen and Bo Peng and Daniel Adu-Ampratwum and Xia Ning},
  title = {{log-RRIM: Yield Prediction via Local-to-global Reaction Representation Learning and Interaction Modeling}},
  journal = {Journal of Chemical Information and Modeling},
  year = {2024},
  doi = {10.1021/acs.jcim.5c01208},
}
Figure