Molecular String Representation Preferences in Pretrained LLMs: A Comparative Study in Zero- & Few-Shot Molecular Property Prediction

George Arthur Baker, Mario Sanz-Guerrero, Katharina von der WenseEMNLP 2025

TL;DR

This study reveals that Large Language Models (LLMs) surprisingly prefer InChI and IUPAC names over the long-standing standard, SMILES, for molecular property prediction tasks. This preference, especially in zero-shot scenarios, challenges conventional wisdom and opens new avenues for leveraging LLMs in drug discovery and chemical research.

What Problem Does This Paper Address?

Predicting molecular properties is crucial for fields like drug discovery, but traditional machine learning methods often struggle with limited data and interpretability. Recently, Large Language Models (LLMs) have shown promise in this area by treating molecules as strings. However, the dominant approach has been to represent molecules using SMILES strings, with little investigation into whether other chemical notations might be more effective. This paper addresses the question of how LLM performance varies across different molecular string representations, aiming to uncover preferences and explain their origins.

Methods

The researchers evaluated four state-of-the-art LLMs: GPT-4o, Gemini 1.5 Pro, Llama 3.1 405b, and Mistral Large 2. They tested these models on five molecular property prediction tasks from the MoleculeNet benchmark. The key innovation was comparing performance across five different molecular string representations: SMILES, DeepSMILES, SELFIES, InChI, and IUPAC names. The evaluation was conducted in both zero-shot (no examples) and few-shot (a few examples) settings, using chain-of-thought prompting to elicit explainable reasoning from the LLMs. Statistical significance testing was employed to validate the observed preferences.

Datasets

The study utilized five established molecular property prediction datasets from the MoleculeNet benchmark:

  • BBBP: Blood-brain barrier penetration (Binary Classification)
  • BACE: Beta-secretase binding (Binary Classification)
  • ClinTox: Clinical toxicity (Binary Classification)
  • ESOL: Water solubility (Regression)
  • FreeSolv: Hydration free energy (Regression)

These datasets were originally provided with SMILES representations. For the other representations (DeepSMILES, SELFIES, InChI, IUPAC), the researchers translated the SMILES strings using various libraries and tools.

Key Insights and Ideas

  • SMILES is Not Always King: The most striking finding is that LLMs, particularly in zero-shot settings, significantly prefer InChI and IUPAC names over SMILES for molecular property prediction. This directly contradicts the long-held assumption that SMILES is the optimal representation for LLMs.
  • InChI and IUPAC Shine: These structured, canonical representations seem to offer advantages, potentially due to their inherent granularity, how they are tokenized by LLMs, and their prevalence in the vast pretraining corpora used for LLMs.
  • SMILES Variants Lag in Zero-Shot: DeepSMILES and SELFIES, designed to improve SMILES' robustness, showed poor performance in zero-shot scenarios, likely due to their scarcity in LLM pretraining data. However, their performance improved significantly with few-shot examples.
  • Atom Counting Matters (But Not Solely): While InChI and IUPAC names make it easier for LLMs to extract atom counts (a task SMILES struggles with), this "atom count explicitness" doesn't fully explain the preference, suggesting a complex interplay of factors.
  • Explainability Advantage: LLMs, through chain-of-thought reasoning, offer interpretable predictions, a significant advantage over traditional task-specific models.

Key Results

In the zero-shot setting:

  • InChI and IUPAC names consistently outperformed SMILES across most models and tasks, with statistical significance confirmed.
  • For example, on the BBBP task, GPT-4o achieved 71.1/77.5 with InChI and 68.9/84.2 with IUPAC, compared to 63.8/79.8 with SMILES.
  • DeepSMILES and SELFIES performed poorly, often worse than random guessing.

In the few-shot setting:

  • IUPAC names remained strongly preferred over SMILES.
  • InChI showed a slight preference, though not always statistically significant.
  • DeepSMILES and SELFIES performance improved dramatically, matching or surpassing SMILES in some cases.
  • When leveraging these preferred representations, few-shot performance rivaled or surpassed conventional methods.

Limitations and Future Work

  • Task Selection: The study was limited to five datasets due to LLM API rate limits and model sizes. While these tasks cover diverse categories, future work could explore a broader range of tasks and larger datasets.
  • Model Selection: Only four state-of-the-art LLMs were evaluated. The authors believe representation preferences might not vary by model size, but this could be explored further. They also excluded chemistry-specific LLMs, focusing on general-purpose models.
  • Representation Selection: The study focused on five popular string representations. Other representations (e.g., graph-based, 2D/3D images) were not included but could be interesting for future research.
  • Future Directions: The authors suggest exploring other representations, investigating the impact of tokenization more deeply, and extending this analysis to other LLM tasks like molecule generation and question-answering. Understanding the precise mechanisms behind these representation preferences (e.g., tokenization, pretraining data distribution) remains an active area.

Summary updated

BibTeX
@inproceedings{baker2025molecular,
  author = {George Arthur Baker and Mario Sanz-Guerrero and Katharina von der Wense},
  title = {{Molecular String Representation Preferences in Pretrained LLMs: A Comparative Study in Zero- \& Few-Shot Molecular Property Prediction}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=D953S2xwWq},
}
Figure