Modeling non-uniform uncertainty in Reaction Prediction via Boosting and Dropout

Taicheng Guo, Changsheng Ma, Xiuying Chen, Bozhao Nan, Kehan Guo, Shichao Pei, Nitesh V. Chawla, Olaf Wiest, Xiangliang Zhang · OpenReview

Abstract

Reaction prediction, a critical task in synthetic chemistry, is to predict the outcome of a reaction based on given reactants. Generative models like Transformer and VAE have typically been employed to predict the reaction product. However, these likelihood-maximization models overlooked the inherent stochastic nature of chemical reactions, such as the multiple ways electrons can be redistributed among atoms during the reaction process. In scenarios where similar reactants could follow different electron redistribution patterns, these models typically predict the most common outcomes, neglecting less frequent but potentially crucial reaction patterns. These overlooked patterns, though rare, can lead to innovative methods for designing synthetic routes and significantly advance synthesis techniques. To break the limits of previous approaches, we propose organizing the mapping space between reactants and electron redistribution patterns in a divide-and-conquer manner. We address the reaction problem by training multiple expert models, each specializing in capturing a type of electron redistribution pattern in reaction. These experts enhance the prediction process by considering both typical and other less common electron redistribution manners. In the inference stage, a dropout strategy is applied to each expert to improve the electron redistribution diversity. The most plausible products are finally predicted through a ranking stage designed to integrate the predictions from multiple experts. Experimental results on the largest reaction prediction benchmark USPTO-MIT show the superior performance of our proposed method compared to baselines.

Introduction: The Challenge of Atypical Reactions

In synthetic chemistry, predicting reaction outcomes is rarely a straightforward one-to-one mapping. A single set of reactants can often lead to multiple products depending on subtle electron redistribution pathways, catalysts, or reaction conditions. Current state-of-the-art models, such as Transformers, are typically trained to maximize the likelihood of the most common outcomes. While effective for standard reactions, this "mode-seeking" behavior causes models to treat rare, atypical reactions as noise, over-relying on typical patterns.

The model struggles to learn atypical reaction patterns, as evidenced by the plateauing number of training samples with non-zero loss for these specific cases.

For chemists, these "long-tail" examples are often the most valuable, representing innovative synthetic routes. The core challenge lies in forcing a model to explore chemically valid but statistically infrequent outcomes that are often overlooked during standard training.

Methods: The ReactionTeam Framework

We introduce ReactionTeam, a framework designed to capture non-uniform uncertainty through a "team of experts" approach. The methodology consists of three primary components:

1. Sequential Mixture-of-LoRA Experts (Seq. MOLE)

Unlike traditional Mixture-of-Experts (MoE) models that route inputs based on molecular type, ReactionTeam trains experts sequentially based on difficulty. A Chief Expert is first trained on the entire dataset to capture dominant patterns. Samples that the Chief Expert fails to predict correctly are then used to train a Specialized Expert using Low-Rank Adaptation (LoRA). This process can be repeated, creating a team where each member specializes in specific "hard-to-learn" electron redistribution patterns while leveraging the foundational knowledge of the Chief.

2. Inference-time Dropout

To explore the local probability space of possible products, ReactionTeam employs Monte Carlo Dropout during inference. By randomly deactivating neurons, the model generates diverse variations of a product, effectively capturing minor mechanistic alternatives that might otherwise be suppressed by the model's bias toward the most likely token.

3. Ranking Expert

Because the team of experts generates a wide variety of candidate products, a robust filtering mechanism is required. We reuse the Chief Expert as a Ranking Expert. While the Chief may be too biased to generate rare products, its broad exposure to the training data makes it an excellent evaluator for scoring the chemical plausibility of candidates proposed by the specialists.

The ReactionTeam framework: (Top) Sequential training of a Chief Expert followed by specialized LoRA experts on unlearned samples. (Bottom) Inference-time dropout and candidate ranking.

Results and Discussion

The ReactionTeam model was evaluated on major benchmarks, including USPTO-MIT and USPTO-STEREO. A key finding was the significant improvement in Atypical Accuracy. On a subset of USPTO-MIT containing reactions with electron flow patterns appearing in less than 1% of the data, ReactionTeam improved Top-50 accuracy from 94.4% to 97.3%.

Furthermore, the model consistently outperformed previous state-of-the-art methods across all Top-K metrics. Diversity analysis using Tanimoto similarity confirmed that ReactionTeam produces a broader range of chemically distinct candidates than standard beam search, without sacrificing chemical validity. In comparative evaluations using large language models as judges, ReactionTeam’s predictions were preferred in over 70% of cases due to their increased novelty and correctness.

Conclusion

ReactionTeam addresses the inherent stochasticity of chemical reactions by organizing the mapping space in a divide-and-conquer manner. By training specialized experts on the "long tail" of reaction data and employing inference-time dropout, the framework successfully captures atypical but chemically valid outcomes. This approach provides a powerful tool for discovering innovative synthetic pathways that traditional likelihood-maximization models typically ignore.

Summary updated

BibTeX
@misc{guo2023modeling,
  author = {Taicheng Guo and Changsheng Ma and Xiuying Chen and Bozhao Nan and Kehan Guo and Shichao Pei and Nitesh V. Chawla and Olaf Wiest and Xiangliang Zhang},
  title = {{Modeling non-uniform uncertainty in Reaction Prediction via Boosting and Dropout}},
  year = {2023},
  eprint = {2310.04674},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.04674},
}
Figure