MolReFlect: Towards Fine-grained In-Context Alignment between Molecules and Texts

Molecule discovery is a pivotal research field, impacting everything from the medicines we take to the materials we use. Recently, Large Language Models (LLMs) have been widely adopted in molecule understanding and generation, yet the alignments between molecules and their corresponding captions remain a significant challenge. Previous endeavours often treat the molecule as a general SMILES string or molecular graph, neglecting the fine-grained alignments between the molecular sub-structures and the descriptive textual phrases, which are crucial for accurate and explainable predictions. In this case, we introduce MolReFlect, a novel teacher-student framework designed to contextually perform the molecule-caption alignments in a fine-grained way. Our approach initially leverages a larger teacher LLM to label the detailed alignments by directly extracting critical phrases from molecule captions or SMILES strings and implying them to corresponding sub-structures or characteristics. To refine these alignments, we propose In-Context Selective Reflection, which retrieves previous extraction results as context examples for teacher LLM to reflect and lets a smaller student LLM select from in-context reflection and previous extraction results. Finally, we enhance the learning process of the student LLM through Chain-of-Thought In-Context Molecule Tuning, integrating the fine-grained alignments and the reasoning processes within the Chain-of-Thought format. Our experimental results demonstrate that MolReFlect enables LLMs like Mistral-7B to significantly outperform the previous baselines, achieving SOTA performance on the ChEBI-20 dataset. This advancement not only enhances the generative capabilities of LLMs in the molecule-caption translation task, but also contributes to a more explainable framework.

PDF Abstract

Datasets


Results from the Paper


Task Dataset Model Metric Name Metric Value Global Rank Benchmark
Text-based de novo Molecule Generation ChEBI-20 MolReFlect BLEU 90.3 # 2
Exact Match 51.0 # 3
Levenshtein 11.84 # 2
MACCS FTS 92.9 # 2
RDK FTS 86.0 # 2
Morgan FTS 81.3 # 2
Validity 97.7 # 5
Molecule Captioning ChEBI-20 MolReFlect BLEU-2 67.6 # 1
BLEU-4 60.8 # 1
ROUGE-1 70.3 # 2
ROUGE-2 57.1 # 2
ROUGE-L 64.4 # 2
METEOR 68.0 # 2

Methods


No methods listed for this paper. Add relevant methods here