Mol-LLaMA: Towards General Understanding of Molecules in Large Molecular Language Model

Dongki Kim, Wonbin Lee, Sung Ju Hwang

Introduction

Mol-LLaMA is a large molecular language model designed to move beyond simple property prediction toward a "general understanding" of chemistry. By fusing 2D and 3D molecular encoders with a massive new instruction-tuning dataset, it outperforms general-purpose models like GPT-4o in explaining the complex relationships between a molecule's structure and its biological behavior.

The Challenge of Molecular Reasoning

While Large Language Models (LLMs) are surprisingly adept at many tasks, they often hit a wall when it comes to deep molecular reasoning. Most existing molecular LLMs treat molecules as simple text strings (like SMILES) or basic 2D graphs. This leads to two major issues:

  1. Structural Blindness: Models often misinterpret connectivity or ignore 3D spatial arrangements (like volume and surface area) that are critical for understanding drug-target interactions.
  2. Lack of "Why": Current models might accurately predict that a molecule is toxic, but they struggle to explain which functional group causes that toxicity or the underlying chemical mechanism.

A true "molecular assistant" needs to understand the hierarchical nature of chemistry: Structure determines Chemical Features, which in turn determine Biological Behavior.

Methods: Fusing Modalities

To address these limitations, the authors introduce Mol-LLaMA, which utilizes a multi-modal architecture and a sophisticated training pipeline.

2D and 3D representations of an input molecule
  • 2D-3D Blending Module: Instead of picking one representation, Mol-LLaMA uses both. It employs MoleculeSTM for 2D connectivity (bonds) and UniMol for 3D point clouds (spatial arrangement). A novel cross-attention "blending" module integrates these complementary views before feeding them into the LLM.
  • Backbone: The model is built on top of Llama-2-7B and Llama-3.1-8B, using LoRA (Low-Rank Adaptation) for efficient fine-tuning.
  • Two-Stage Training:
    1. Representation Learning: Aligning the fused 2D-3D embeddings with IUPAC names to ensure the model "sees" the structure correctly.
  • Instruction Tuning: Training the model on a specialized dataset to handle complex, multi-turn reasoning.

The Mol-LLaMA-Instruct Dataset

The core of the model's reasoning success is the Mol-LLaMA-Instruct dataset. The authors generated 284k high-quality instruction-following samples based on PubChem data, which were then filtered for factual accuracy.

Identifying core structural components from a complex input molecule

The dataset covers three novel categories designed to teach the model how to break down and analyze molecules:

  1. Detailed Structural Descriptions: Explaining functional groups, ring structures, and their connectivity.
  2. Structure-to-Feature Relationships: Explaining how a specific part of a molecule leads to a specific property (e.g., "This thiol group increases hydrophobicity").
  3. Comprehensive Conversations: Multi-turn dialogues that gradually deepen from basic structure to complex biological interactions.

Key Insights and Results

Mol-LLaMA demonstrates significant improvements over existing models across several benchmarks:

  • The Power of "Blended" Modalities: Ablation studies show that combining 2D and 3D representations is significantly better than using either alone. The 2D view prevents the model from "hallucinating" bonds, while the 3D view provides the physical context needed for biological activity.
  • Reasoning over Retrieval: Unlike previous models that simply memorize public databases, Mol-LLaMA’s training on "Structure-to-Feature" explanations allows it to provide rationales. It doesn't just state that a molecule is permeable; it explains that the presence of an indole core facilitates interaction with lipid membranes.
  • Outperforming the Giants: Mol-LLaMA consistently beats GPT-4o in qualitative metrics (accuracy, helpfulness, and level of detail) when describing molecular features. In human-expert-validated evaluations, Mol-LLaMA achieved relative scores of over 1.1x to 1.7x compared to GPT-4o across structural, chemical, and biological queries.
  • Property Prediction: On the PAMPA permeability task, Mol-LLaMA achieved ~75% accuracy, vastly outperforming GPT-4o’s 48.65%. It also set new state-of-the-art benchmarks on the MoleculeQA dataset, outperforming specialized models like MolCA and 3D-MoLM.

Limitations and Future Work

While Mol-LLaMA represents a significant step forward, it is currently optimized as an analyst rather than a generator. It excels at explaining existing molecules but is not yet designed for de novo molecular generation (designing new drugs from scratch). Furthermore, as with any powerful chemical tool, there is a risk of misuse, highlighting the need for robust safety safeguards.

Future versions aim to incorporate other scientific modalities, such as protein structures or RNA sequences, to create an even more holistic biological assistant.

For more information, the project page is available at https://mol-llama.github.io/.

Summary updated

BibTeX
@inproceedings{kim2025mol,
  author = {Dongki Kim and Wonbin Lee and Sung Ju Hwang},
  title = {{Mol-LLaMA: Towards General Understanding of Molecules in Large Molecular Language Model}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=NOUF43YrIL},
}
Figure