Unbiasing Retrosynthesis Language Models with Disconnection Prompts

Amol Thakkar, Alain C. Vaucher, Andrea Byekwaso, Philippe Schwaller, Alessandra Toniato, Teodoro Laino

TL;DR

This paper introduces "disconnection prompts" for chemical retrosynthesis models, allowing chemists to guide predictions and overcome biases inherent in training data. This approach significantly improves prediction accuracy and diversity, making AI-driven synthesis planning more interactive and creative.

What Problem Does This Paper Address?

Retrosynthesis, the process of planning chemical synthesis by working backward from a target molecule to simpler starting materials, is a cornerstone of organic chemistry. While deep learning models have shown promise in automating this task, they often suffer from limitations:

  • Bias from Training Data: Models tend to favor common reaction types found in their training data, leading to a lack of diversity in predicted precursors and potentially overlooking novel or unintuitive synthetic routes.
  • Limited User Interaction: Traditional models offer little control to chemists over where the molecule should be broken down (the disconnection site), hindering their ability to steer the synthesis plan.
  • Unintuitive Disconnections: Models might suggest disconnections that are synthetically challenging or less efficient, even if they are statistically common in the training data.

This paper aims to address these issues by enabling chemists to actively guide the retrosynthesis process, leading to more diverse, creative, and user-controlled predictions.

Methods

The core innovation is the introduction of prompt-based learning to chemical retrosynthesis. This concept, borrowed from natural language processing (NLP) models like GPT-3 and DALL-E, allows users to provide input that steers the model's output.

  • Disconnection Prompts: The authors developed a "disconnection aware" model that accepts an additional input prompt. This prompt specifies the disconnection site within the target molecule, often by tagging specific atoms. This allows chemists to explicitly tell the model where to focus its breakdown efforts.
  • Transformer Architecture: The models are built upon the Transformer architecture, a standard for sequence-to-sequence tasks in NLP, adapted for chemical reactions represented as SMILES strings.
  • Two-Stage Schema (AutoTag): For automated retrosynthesis, they propose a two-stage approach:
  • AutoTag: A model that automatically identifies and labels potential disconnection sites on a molecule.
  • Disconnection Aware Model: This model then uses the identified disconnection site (from AutoTag) to predict precursors.
  • Tag Permutation and Completion: To handle cases where users might provide incomplete or ambiguous prompts, they explored techniques like tag permutation (simulating incomplete tagging) and tag completion (using a model to infer missing tags).

Datasets

The study utilized several established datasets for training and evaluation:

  • USPTO: A large dataset of reactions extracted from US patents.
  • USPTO50k: A subset of the USPTO dataset.
  • Pistachio: Another patent-derived dataset.
  • ECReact: A dataset curated for enzymatic reactions, which includes enzyme-specific information.

The authors note that the performance of models often correlates with the availability of training data for specific types or sizes of disconnections.

Key Insights and Ideas

  • Empowering Chemists: The most significant insight is that by allowing chemists to specify disconnection sites, the AI model becomes a more collaborative tool, moving beyond a black box to a guided assistant.
  • Mitigating Bias: Prompting directly addresses the bias issue by forcing the model to consider disconnections that might be underrepresented in the training data.
  • Diversity is Key: The prompt-driven approach unlocks a much wider range of potential precursors and reaction classes, which is crucial for exploring novel synthetic routes.
  • Human-in-the-Loop is Effective: The "human-in-the-loop" paradigm, where human expertise guides AI, proves highly effective for complex tasks like retrosynthesis.
  • Automation Potential: The AutoTag system demonstrates that this prompt-based approach can be automated, making it applicable to large-scale synthesis planning without direct human intervention for every step.

Key Results

  • 39% Performance Improvement: The disconnection aware model achieved a 39% performance improvement in disconnection accuracy over baseline models.
  • 100% Increase in Class Diversity: The approach led to a doubling (100% increase) in predicted reaction class diversity compared to baseline models.
  • Improved Accuracy for Enzymatic Reactions: The model demonstrated strong performance on enzymatic reactions, achieving 79% prediction accuracy.
  • Robustness to Incomplete Prompts: The model showed robustness to incomplete or permuted disconnection tags, maintaining comparable performance.
  • High Prediction Validity: For a significant portion of reactions (96%), errors in predictions were within an acceptable range.

Limitations and Future Work

  • Reagent Variability: While the core disconnection and reactants are often predicted correctly, the prediction of variable species like solvents, bases, and catalysts (reagents) can still show variability. Removing these unmapped species improved prediction matching to ground truth.
  • Data Availability Bias: Performance can still be affected by the availability of training data for specific types of disconnections (e.g., a drop in accuracy when there are no training examples with a certain number of tagged atoms).
  • Future Work: The authors suggest that this prompt-based approach can open up new avenues for training data acquisition and further enhance the interactivity and diversity of future retrosynthesis models. They also highlight the potential for applying this to multistep retrosynthesis and exploring more complex chemical domains.

Summary updated

Abstract

Data-driven approaches to retrosynthesis are limited in user interaction, diversity of their predictions, and recommendation of unintuitive disconnection strategies. Herein, we extend the notions of prompt-based inference in natural language processing to the task of chemical language modeling. We show that by using a prompt describing the disconnection site in a molecule we can steer the model to propose a broader set of precursors, thereby overcoming training data biases in retrosynthetic recommendations and achieving a 39% performance improvement over the baseline. For the first time, the use of a disconnection prompt empowers chemists by giving them greater control over the disconnection predictions, which results in more diverse and creative recommendations. In addition, in place of a human-in-the-loop strategy, we propose a two-stage schema consisting of automatic identification of disconnection sites, followed by prediction of reactant sets, thereby achieving a considerable improvement in class diversity compared with the baseline. The approach is effective in mitigating prediction biases derived from training data. This provides a wider variety of usable building blocks and improves the end user's digital experience. We demonstrate its application to different chemistry domains, from traditional to enzymatic reactions, in which substrate specificity is critical.
BibTeX
@inproceedings{thakkar2023unbiasing,
  author = {Amol Thakkar and Alain C. Vaucher and Andrea Byekwaso and Philippe Schwaller and Alessandra Toniato and Teodoro Laino},
  title = {{Unbiasing Retrosynthesis Language Models with Disconnection Prompts}},
  booktitle = {ACS},
  year = {2023},
  doi = {10.1021/acscentsci.3c00372},
}
Figure