Reaction rebalancing: a novel approach to curating reaction databases

Tieu-Long Phan, Klaus Weinbauer, Thomas Gärtner, Daniel Merkle, Jakob L. Andersen, Rolf Fagerberg, Peter F. Stadler

Abstract

Reaction databases are a key resource for a wide variety of applications in computational chemistry and biochemistry, including Computer-aided Synthesis Planning (CASP) and the large-scale analysis of metabolic networks. The full potential of these resources can only be realized if datasets are accurate and complete. Missing co-reactants and co-products, i.e., unbalanced reactions, however, are the rule rather than the exception. The curation and correction of such incomplete entries is thus an urgent need. The SynRBL framework addresses this issue with a dual-strategy: a rule-based method for non-carbon compounds, using atomic symbols and counts for prediction, alongside a Maximum Common Subgraph (MCS)-based technique for carbon compounds, aimed at aligning reactants and products to infer missing entities. The rule-based method exceeded 99% accuracy, while MCS-based accuracy varied from 81.19% to 99.33%, depending on reaction properties. This sets the stage for future improvement in particular of atom-atom mapping techniques as well as of downstream tasks such as automated synthesis planning.

Introduction: The Challenge of Unbalanced Reaction Data

In computational chemistry, high-quality data is the foundation for training predictive models. Large-scale databases such as the USPTO and Reaxys serve as the primary training sets for artificial intelligence (AI) models in retrosynthesis and reaction prediction. However, these datasets are frequently plagued by "unbalanced" reactions—entries where essential co-reactants or co-products (such as water, hydrochloric acid, or carbon fragments) are omitted. Research indicates that fewer than 12% of single-step reactions in Reaxys are stoichiometrically balanced. For machine learning models, this missing information acts as noise, hindering the ability to learn the underlying "grammar" of chemical transformations.

The SynRBL Framework

To address this data quality gap, the SynRBL (Synthetic Reaction BaLancing) framework was developed to automatically identify and restore missing chemical entities. SynRBL utilizes a dual-strategy approach tailored to the nature of the imbalance:

1. Rule-Based Balancing (Non-Carbon Imbalances)

When the carbon count is balanced but other elements (e.g., $H, O, N, Cl$) are missing, SynRBL employs a specialized library of common ions and small molecules. Using a Depth-First Search (DFS) algorithm, the system identifies the simplest combination of these rules to restore stoichiometric equilibrium.

2. MCS-Based Balancing (Carbon Imbalances)

For more complex cases where carbon atoms are missing, the framework treats the reaction as a structural alignment puzzle. It utilizes Maximum Common Subgraph (MCS) algorithms to align reactant and product structures. By identifying non-matching fragments, SynRBL can infer the missing chemical structures through "merge" and "expand" operations.

To ensure the reliability of these predictions, an XGBoost machine learning model provides a confidence score. This model evaluates reaction complexity—specifically the number of bonds broken or formed—to determine the likelihood of a correct prediction.

Experimental Validation and Results

The SynRBL framework was rigorously tested across five diverse datasets, including the manually curated Golden and Jaworski sets, and three subsets derived from the USPTO database representing varying levels of complexity.

  • High Accuracy: The rule-based method achieved over 99% accuracy. The MCS-based method demonstrated high performance ranging from 81.19% to 99.33%, depending on the dataset's structural complexity.
  • Efficiency: The system is highly optimized for large-scale curation, processing approximately 1,000 reactions in 46 seconds on standard hardware.
  • Data Auditing: Interestingly, the framework also functions as an error-detection tool. For instance, if the rule-based method suggests adding a lone oxygen atom, it often signals a fundamental error in the original database entry rather than a simple omission.

Discussion and Limitations

SynRBL represents a significant advancement over existing tools like ChemMLM, particularly in handling complex organic molecules. However, certain limitations remain. The current iteration is optimized for "one-sided" imbalances (missing pieces from either the reactant or product side) and may struggle with "both-sides" imbalances or highly complex structural rearrangements where the structural conservation required for MCS is absent.

Conclusion

By providing a robust method for rebalancing chemical reactions, SynRBL enhances the completeness and accuracy of reaction databases. This improvement is critical for the development of more reliable atom-atom mapping tools and the advancement of automated synthesis planning in drug discovery.

Summary updated

BibTeX
@article{phan2024reaction,
  author = {Tieu-Long Phan and Klaus Weinbauer and Thomas Gärtner and Daniel Merkle and Jakob L. Andersen and Rolf Fagerberg and Peter F. Stadler},
  title = {{Reaction rebalancing: a novel approach to curating reaction databases}},
  journal = {J. Cheminformatics},
  year = {2024},
  doi = {10.1186/s13321-024-00875-4},
}
Figure