Abstract: Large Language Models (LLMs) stand at the forefront of a number of Natural Language Processing (NLP) tasks. Despite the widespread adoption of LLMs in NLP, much of their potential in broader fields remains largely unexplored, and significant limitations persist in their design and implementation. Notably, LLMs struggle with structured data, such as graphs, and often falter when tasked with answering domain-specific questions requiring deep expertise, such as those in biology and chemistry. In this paper, we explore a fundamental question: Can LLMs effectively handle molecule prediction tasks? Rather than pursuing top-tier performance, our goal is to assess how LLMs can contribute to diverse molecule tasks. We identify several classification and regression prediction tasks across six standard molecule datasets. Subsequently, we carefully design a set of prompts to query LLMs on these tasks and compare their performance with existing Machine Learning (ML) models, which include text-based models and those specifically designed for analysing the geometric structure of molecules. Our investigation reveals several key insights: Firstly, LLMs generally lag behind ML models in achieving competitive performance on molecule tasks, particularly when compared to models adept at capturing the geometric structure of molecules, highlighting the constrained ability of LLMs to comprehend graph data. Secondly, LLMs show promise in enhancing the performance of ML models when used collaboratively. Lastly, we engage in a discourse regarding the challenges and promising avenues to harness LLMs for molecule prediction tasks.
Introduction
The rapid advancement of Large Language Models (LLMs) has revolutionized natural language processing, yet their application to specialized scientific domains like chemistry remains an open challenge. Molecules are inherently structured as graphs, where atoms serve as nodes and chemical bonds as edges. LLMs, however, are primarily optimized for sequential text. While molecules can be serialized into text strings such as SMILES (Simplified Molecular Input Line Entry System), it is unclear whether LLMs can truly "understand" the underlying chemical properties or if they merely replicate patterns from their training corpora. This study benchmarks general-purpose LLMs against specialized, geometry-aware Graph Neural Networks (GNNs) to determine their efficacy in predicting molecular properties such as toxicity, solubility, and binding affinity.
Methodology
The researchers established a comprehensive benchmarking framework utilizing six standard datasets from the Open Graph Benchmark (OGB) and MoleculeNet. These included binary classification tasks (e.g., ogbg-molhiv for HIV inhibition) and numerical regression tasks (e.g., ogbg-molesol for water solubility).
To bridge the gap between graph structures and text-based models, several prompt engineering strategies were developed:
- Input-Prediction (IP): A direct query for a molecular property.
- Input-Explanation (IE): A request for both a prediction and the underlying chemical reasoning.
- Few-shot (FS): Providing the model with labeled examples to facilitate in-context learning.
- Description-based: Translating the 2D/3D graph structure into a literal textual description of atoms and their connections.
The experimental design evaluated three primary model pipelines:
- Solo: Individual models (e.g., GPT-4, Llama-2, or GNNs) performing tasks in isolation.
- Duo: A collaborative setup where LLM-generated textual insights serve as auxiliary features for a secondary machine learning model.
- Trio: A hybrid architecture where a GNN processes the graph structure while simultaneously incorporating SMILES strings and LLM-derived domain knowledge.
Results and Insights
The benchmarking results revealed a significant performance gap between solo LLMs and specialized models. On the ogbg-molhiv dataset, the best GNN (GIN) achieved an ROC-AUC of 0.7601, whereas the top-performing LLM prompt (GPT-3.5) reached only 0.5892. This disparity underscores the inherent difficulty LLMs face in interpreting graph data without explicit geometric inductive biases.
However, LLMs demonstrated significant potential as "knowledge augmenters." When LLM reasoning was integrated into GNNs via the Duo pipeline, performance often exceeded that of the GNN alone. For example, on the ogbg-molbace dataset, a standard GIN model's score of 0.7673 improved to 0.8062 when augmented with LLM insights.
Furthermore, the study highlighted the "Graph-to-Text" paradox: providing detailed textual descriptions of molecular graphs often degraded LLM performance. This is likely due to the increased token count overwhelming the models' attention mechanisms. In terms of model comparison, proprietary models (GPT-3.5 and GPT-4) consistently outperformed open-source alternatives like Llama-2, likely due to more extensive pre-training on scientific literature.
Conclusion
While LLMs are not yet ready to replace specialized chemical AI, they offer a powerful mechanism for augmenting traditional machine learning models with broad domain knowledge. Future research should focus on developing specialized "Molecule LLMs" and exploring novel tokenization methods for 3D molecular geometry. Additionally, the integration of Retrieval-Augmented Generation (RAG) could provide LLMs with access to verified chemical databases, mitigating the risk of hallucinations and improving predictive accuracy in high-stakes biomedical applications.
Summary updated