Abstract
Understanding molecules is key to understanding organisms and driving advances in drug discovery, requiring interdisciplinary knowledge across chemistry and biology. Although large molecular language models have achieved notable success in interpreting molecular structures, their instruction datasets are limited to the specific knowledge from task-oriented datasets and do not fully cover the fundamental characteristics of molecules, hindering their abilities as general-purpose molecular assistants. To address this issue, we propose Mol-LLaMA, a large molecular language model that grasps the general knowledge centered on molecules via multi-modal instruction tuning. To this end, we design key data types that encompass the fundamental features of molecules, incorporating essential knowledge from molecular structures. In addition, to improve understanding of molecular features, we introduce a module that integrates complementary information from different molecular encoders, leveraging the distinct advantages of different molecular representations. Our experimental results demonstrate that Mol-LLaMA is capable of comprehending the general features of molecules and generating relevant responses to users' queries with detailed explanations, implying its potential as a general-purpose assistant for molecular analysis.
Introduction
While Large Language Models (LLMs) like GPT-4 have demonstrated remarkable capabilities in natural language processing, their proficiency in the specialized domain of chemistry remains limited. Most current models treat molecules as SMILES (Simplified Molecular Input Line Entry System) strings—linear text representations of chemical structures. However, SMILES strings are inherently limited; they struggle to convey complex 3D geometry and spatial relationships. Consequently, LLMs often "hallucinate" structural features or fail to connect a molecule's physical shape to its biological function.
Existing molecular LLMs typically suffer from two primary bottlenecks. First, they often rely on a single modality—either 2D graphs (connectivity) or 3D point clouds (spatial arrangement)—missing the complementary information provided by the other. Second, most training datasets consist of simple "structure-to-label" pairs, resulting in "black box" models that cannot explain their reasoning. Mol-LLaMA addresses these gaps by combining multi-modal structural encoding with a reasoning-focused instruction dataset.
Methodology
Mol-LLaMA utilizes a multi-modal architecture designed to provide a more holistic view of molecular structures. The framework consists of three core components:
2D-3D Blending Module
Rather than selecting a single representation, Mol-LLaMA integrates two specialized encoders: MoleculeSTM for 2D bonds and connectivity, and UniMol for 3D spatial arrangements. A novel blending module utilizes cross-attention mechanisms to integrate these views. This ensures the model understands both how atoms are linked (topology) and how they are positioned in three-dimensional space (geometry).
Q-Former Projector
To bridge the gap between molecular features and linguistic tokens, the model employs a Q-Former projector. This module translates the blended molecular features into a format that a standard LLM, such as Llama-3.1-8B, can process alongside natural language instructions.
Instruction Tuning
The model is fine-tuned using Low-Rank Adaptation (LoRA) on a curated dataset that emphasizes hierarchical reasoning. This training process encourages the model to move beyond simple identification, instead progressing from structural analysis to chemical property prediction and, ultimately, to biological effect interpretation.
The Mol-LLaMA-Instruct Dataset
A significant contribution of this work is the release of Mol-LLaMA-Instruct, a comprehensive dataset comprising 284,000 instruction-following samples. The dataset is built around three novel data types:
- Detailed Structural Descriptions: In-depth analyses of functional groups and molecular connectivity.
- Structure-to-Feature Explanations: Explicit mappings that link structural motifs (e.g., specific halogen atoms) to physical properties (e.g., lipophilicity).
- Comprehensive Conversations: Multi-turn dialogues designed to simulate scientific inquiry, gradually deepening the complexity of the molecular analysis.
Experimental Results
Mol-LLaMA was evaluated against standard benchmarks, including PAMPA (permeability), BBBP (blood-brain barrier penetration), and the MoleculeQA dataset.
Performance Benchmarks
On the PAMPA permeability task, Mol-LLaMA (based on Llama-3.1) achieved an accuracy of 63.55%, significantly outperforming GPT-4o (~48.6%) and specialized molecular models like 3D-MoLM (~46.9%). Furthermore, Mol-LLaMA established new state-of-the-art records across all MoleculeQA categories, including structural understanding and biological application.
Qualitative Reasoning and Explainability
Qualitative case studies highlight Mol-LLaMA's ability to identify complex molecular cores, such as the benzodiazepine class, and explain their specific roles in receptor binding (e.g., GABA-A). While other models often misidentify core structures, Mol-LLaMA provides accurate rationales, demonstrating that training for "Chain-of-Thought" reasoning improves actual predictive accuracy and generalizability.
Discussion and Future Work
The success of Mol-LLaMA suggests that for scientific discovery, specialized structural "vision" and domain-specific knowledge are more critical than raw parameter count. The integration of 2D and 3D information significantly reduces structural hallucinations, while explainability as a training objective helps the model move beyond simple pattern matching to understand chemical causality.
Despite these advances, limitations remain. Mol-LLaMA is currently optimized for the analysis of existing molecules rather than de novo molecular generation. Future work will explore the use of Mol-LLaMA as a reward model to guide the generation of molecules with specific biological properties. Additionally, the authors emphasize the need for robust safety guardrails to prevent the potential misuse of high-fidelity molecular modeling in the discovery of harmful substances.
Summary updated