Modelling Chemical Reasoning to Predict Reactions

Marwin H. S. Segler, Mark P. WallerarXiv 2016 · DOI

TL;DR

This paper introduces a novel approach to predict chemical reactions by modeling chemical reasoning as finding "missing links" within a vast knowledge graph of molecules and reactions. This data-driven method outperforms traditional rule-based systems and demonstrates the ability to discover novel transformations, paving the way for high-throughput reaction hypothesis generation.

What Problem Does This Paper Address?

Predicting chemical reactions is a cornerstone of organic chemistry, enabling chemists to design syntheses and invent new transformations. While expert systems and machine learning have made strides, they often struggle with generalizability, interpretability, and the discovery of truly novel reaction types, especially those involving complex catalysis. Existing methods can be limited by manually encoded rules or the inability to extrapolate beyond their training data. The challenge is to create a system that can "reason" about chemical reactivity in a way that mimics human intuition, allowing for the prediction of both known and entirely new reactions.

Methods

The core of this work is a knowledge graph representation of chemical information. Molecules are nodes, and reactions are edges. Crucially, this is a directed bipartite graph where edges have types indicating the role of a molecule (reactant, reagent, catalyst, solvent, product). The key innovation is framing reaction prediction as a link prediction problem.

The algorithm works by:

  1. Path Finding: It searches for paths between two reactant molecules within the knowledge graph. These paths represent a sequence of known reactions that connect the initial reactants.
  2. Filters: Two filters are applied to ensure chemical plausibility:
  3. Filter 1 (Common Atoms): Ensures that subsequent reactions in a path occur at the same atoms within a molecule, preventing nonsensical connections.
  4. Filter 2 (Reaction Fingerprints & Tanimoto Similarity): Uses reaction fingerprints (ECFP4/FCFP4) to capture the "reaction center" and compares them using the Tanimoto score. Paths with low similarity between consecutive reaction fingerprints are discarded, ensuring chemical consistency.
  5. Product Prediction: If a valid path is found, the product is predicted by combining "half reactions" derived from the molecules and reactions along the path.
  6. Condition Prediction: Reagents, catalysts, and solvents are inferred from the conditions of the reactions found in the retrieved paths.

This approach is described as a bi-directional breadth-first search and is designed to be interpretable, as the paths themselves offer a form of logical explanation.

Datasets

The primary dataset used is a knowledge graph constructed from 14.4 million molecules and 8.2 million binary reactions sourced from Reaxys, covering essentially all binary chemical reactions published up to 2013. This dataset was used without explicit reaction balancing or cleaning to reflect real-world data.

For validation, a hold-out set of reactions published in 2014 or later was used. A subset of 180,000 randomly selected binary reactions from this hold-out set was used for quantitative validation. For predicting novel reactions, a subset of 13,000 reactions was selected after removing those explainable by existing transformation rules. For negative validation, 36,000 known reactions were used to generate "wrong" products.

Key Insights and Ideas

  • Chemical Reasoning as Link Prediction: The paper reframes chemical reasoning not as rule application, but as finding missing connections in a vast network of known chemical transformations. This allows for a more holistic understanding of reactivity.
  • Generalization Beyond Known Rules: The model's ability to generalize beyond explicitly encoded rules or known reaction types is a significant breakthrough. It can infer novel transformations by piecing together existing chemical knowledge in new ways.
  • Interpretable "White-Box" AI: The path-finding mechanism provides a transparent explanation for predictions, making the model interpretable, unlike many "black-box" machine learning approaches. The paths themselves act as a form of logical justification.
  • Analogous vs. Complementary Reactivity: The concept of path length in the graph is used to infer whether molecules exhibit analogous (react with similar partners) or complementary (react with each other) reactivity, a key aspect of chemical intuition.
  • Implicit Encoding of Selectivity: By considering entire molecules and their reaction contexts, the model implicitly captures information about functional group tolerance and chemo-/regioselectivity, which is often difficult to encode manually in rule-based systems.

Key Results

  • High Accuracy on Known Reactions: The model achieves 67.5% accuracy in predicting products for 180,000 randomly selected binary reactions from a hold-out validation set. This is significantly better than a rule-based expert system (52.7%) and a random baseline (<1%).
  • Efficient Prediction: The model significantly reduces combinatorial explosion, proposing a median of 3 products per reaction, compared to a baseline method that generates a median of 62. Predictions are also fast, typically achieved in under a second.
  • Discovery of Novel Reactions: The model successfully predicts products for 35% of challenging novel reactions that could not be explained by existing transformation rules. This includes state-of-the-art transition metal-catalyzed reactions.
  • Reasonable Condition Prediction: The algorithm proposes functionally similar reagents and catalysts for reactions, demonstrating an ability to capture the chemical role of these components without explicit encoding.
  • Negative Validation Success: The model correctly identifies "wrong" products as not occurring in 94% of cases, indicating good chemo- and regioselectivity prediction.

Limitations and Future Work

  • Focus on Binary Reactions: The current model is limited to binary reactions and molecules with known reactions. Future work aims to extend this to more complex scenarios.
  • Need for More Quantitative Condition Prediction: While promising, the quantitative analysis of condition prediction is difficult and requires further research.
  • Heuristic Nature: The authors acknowledge that the found paths are heuristic and not transitive laws, meaning predictions are plausible but not foolproof, similar to human-generated hypotheses.
  • Future Directions:
    • Augmenting the graph with abstract, hierarchical knowledge.
  • Combining the approach with machine learning and low-cost quantum mechanics.
  • Serving as an inspiration tool for computer-assisted reaction discovery, building on the work of Ugi and Herges.

Summary updated

Abstract

The ability to reason beyond established knowledge allows Organic Chemists to solve synthetic problems and to invent novel transformations. Here, we propose a model which mimics chemical reasoning and formalises reaction prediction as finding missing links in a knowledge graph. We have constructed a knowledge graph containing 14.4 million molecules and 8.2 million binary reactions, which represents the bulk of all chemical reactions ever published in the scientific literature. Our model outperforms a rule-based expert system in the reaction prediction task for 180,000 randomly selected binary reactions. We show that our data-driven model generalises even beyond known reaction types, and is thus capable of effectively (re-) discovering novel transformations (even including transition-metal catalysed reactions). Our model enables computers to infer hypotheses about reactivity and reactions by only considering the intrinsic local structure of the graph, and because each single reaction prediction is typically achieved in a sub-second time frame, our model can be used as a high-throughput generator of reaction hypotheses for reaction discovery.
BibTeX
@misc{segler2016modelling,
  author = {Marwin H. S. Segler and Mark P. Waller},
  title = {{Modelling Chemical Reasoning to Predict Reactions}},
  year = {2016},
  eprint = {1608.07117},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1608.07117},
}
Figure