TL;DR
This paper introduces a novel "self-feedback knowledge elicitation" approach to improve chemical reaction prediction (CRP) using large language models (LLMs). By iteratively refining reaction type (RT) annotations and using adaptive prompts, the method significantly boosts prediction accuracy and enables LLMs to better leverage domain-specific knowledge for complex scientific tasks.
What Problem Does This Paper Address?
Predicting chemical reactions is crucial for drug discovery and materials science, but it's a complex task due to the vast and uncertain chemical reaction space and the difficulty in capturing reaction selectivity. Existing methods often struggle to effectively utilize the inherent knowledge within reaction data. While LLMs show promise, they can still make incorrect predictions and require extensive training data, especially for specialized scientific domains. A key challenge is how to efficiently extract and inject relevant domain knowledge (like reaction types) into LLMs to improve their accuracy and interpretability without overwhelming them.
Methods
The core of this work is a three-stage "prompt-based knowledge elicitation" scheme:
- Knowledge Extraction: This stage focuses on identifying reaction types (RTs). It involves:
- Self-Feedback Knowledge Elicitation: An LLM (LLM-RT) is used to generate initial RT annotations. These annotations are then refined through an iterative process of clustering embeddings of reaction inputs/outputs and evaluating annotation accuracy. This self-feedback loop helps find the optimal encoding method and number of clusters for accurate RT identification.
- Data Curation: The trained LLM-RT is used to annotate RTs for validation and test datasets.
- Data Curation: This stage involves preparing the data for the next step, using the curated RT annotations.
- Adaptive Knowledge Injection: This stage injects the extracted knowledge into a larger LLM (LLM-CRP) for the final prediction tasks.
- Dynamic Prompting: Instead of static prompts, the system uses "adaptive prompts." This involves creating an instruction template library and dynamically selecting the most suitable instruction for a given input based on its embedding.
- Prompt-Enhanced Learning: The selected adaptive instruction is fused with the corresponding RT to create an "enhanced prompt." This enhanced prompt, along with the original input, is fed to the LLM-CRP for fine-tuning. This approach aims to provide precise guidance and leverage prior knowledge effectively.
Datasets
The study utilizes the 'Molecule-oriented instructions' dataset from Mol-Instructions [15], which covers three chemical reaction tasks: forward reaction prediction, retrosynthesis prediction, and reagent prediction. The data is preprocessed into SMILES format.
Key Insights and Ideas
- Self-Feedback for RT Annotation: Iteratively refining RT annotations using LLM embeddings and clustering is crucial for balancing annotation accuracy and the number of distinct reaction types. This prevents over-segmentation and improves the quality of knowledge extracted.
- Adaptive Prompts Outperform Static Ones: Dynamically selecting prompts based on input embeddings significantly improves LLM performance compared to using fixed, static prompts. This allows for more tailored guidance.
- RTs as Knowledge Priors are Powerful: Injecting reaction type information as a knowledge prior into LLMs leads to substantial improvements in prediction accuracy, especially for complex tasks like retrosynthesis and reagent prediction.
- Multi-task Synergy: Combining knowledge injection with multi-task learning can lead to synergistic improvements, counteracting negative transfer effects and boosting overall performance by up to 14.9%.
Key Results
The proposed self-feedback knowledge elicitation approach, combined with adaptive prompt learning, achieved significant performance gains:
- Retrosynthesis Prediction: A 14.2% increase in accuracy.
- Reagent Prediction: A 74.2% increase in accuracy.
- Overall Multi-Task Performance: A 14.9% improvement over a strong baseline (Text+Chem T5 with average task performance).
The study also found that the concat(input, output)vec encoding method, when combined with a cluster number N between 3 and 12, consistently yielded the best RT annotation accuracy.
Limitations and Future Work
- Interpretability of RTs: While the method improves prediction accuracy, further work is needed to ensure that the automatically annotated RTs truly correspond to human-understandable chemical RTs and to visualize how these RTs guide LLM predictions.
- Generalization: The paper suggests that while adaptive algorithms can find optimal knowledge partners, exploring the potential of dynamic prompts that derive from a broader pool could further enhance generalization.
- Chemical Space Exploration: The current approach improves prediction but doesn't fully reveal how RTs guide the model's exploration within the chemical space. Future work could involve developing tools for knowledge visualization and tracking to better understand this process.
Summary updated