Skip to main content
QUICK REVIEW

[Paper Review] What can Large Language Models do in chemistry? A comprehensive benchmark on eight tasks

Taicheng Guo, Kehan Guo|arXiv (Cornell University)|May 27, 2023
Machine Learning in Materials ScienceMaterials Science91 citations
TL;DR

The paper benchmarks five LLMs (GPT-4, GPT-3.5, Davinci-003, Llama, Galactica) on eight chemistry tasks to assess understanding, reasoning, and explaining capabilities, revealing GPT-4 generally leads but struggles on SMILES-heavy generative tasks.

ABSTRACT

Large Language Models (LLMs) with strong abilities in natural language processing tasks have emerged and have been applied in various kinds of areas such as science, finance and software engineering. However, the capability of LLMs to advance the field of chemistry remains unclear. In this paper, rather than pursuing state-of-the-art performance, we aim to evaluate capabilities of LLMs in a wide range of tasks across the chemistry domain. We identify three key chemistry-related capabilities including understanding, reasoning and explaining to explore in LLMs and establish a benchmark containing eight chemistry tasks. Our analysis draws on widely recognized datasets facilitating a broad exploration of the capacities of LLMs within the context of practical chemistry. Five LLMs (GPT-4, GPT-3.5, Davinci-003, Llama and Galactica) are evaluated for each chemistry task in zero-shot and few-shot in-context learning settings with carefully selected demonstration examples and specially crafted prompts. Our investigation found that GPT-4 outperformed other models and LLMs exhibit different competitive levels in eight chemistry tasks. In addition to the key findings from the comprehensive benchmark analysis, our work provides insights into the limitation of current LLMs and the impact of in-context learning settings on LLMs' performance across various chemistry tasks. The code and datasets used in this study are available at https://github.com/ChemFoundationModels/ChemLLMBench.

Motivation & Objective

  • Assess the capabilities of large language models in chemistry across eight practical tasks (understanding, reasoning, and explaining).
  • Evaluate zero-shot and few-shot in-context learning using five prominent LLMs.
  • Identify strengths, weaknesses, and task-dependent performance relative to domain-specific baselines.
  • Provide actionable guidance for researchers and chemists on leveraging LLMs in chemistry and prompting strategies.

Proposed method

  • Benchmark eight chemistry tasks using datasets such as PubChem, BBBP, Tox21, HIV, BACE, USPTO, and ChEBI.
  • Evaluate five LLMs (GPT-4, GPT-3.5, Davinci-003, Llama, Galactica) under zero-shot and few-shot prompting.
  • Design task-specific in-context learning prompts with demonstrations and four-part templates to reduce hallucinations.
  • Investigate ICL retrieval strategies (Random vs. Scaffold) and varying k demonstration examples.
  • Repeat evaluations five times to account for model randomness and report mean and variance.

Experimental results

Research questions

  • RQ1What is the comparative performance of different LLMs on eight chemistry tasks under zero-shot and few-shot prompting?
  • RQ2How do prompt design, demonstration quality, and ICL retrieval strategies influence LLM performance in chemistry?
  • RQ3Which chemistry tasks are most amenable to LLMs versus requiring task-specific baselines?
  • RQ4What are the main limitations and hallucination modes of LLMs when handling chemical representations (e.g., SMILES)?

Key findings

  • GPT-4 generally outperforms other evaluated models across tasks.
  • GPT models struggle with SMILES-heavy tasks like name prediction, reaction prediction, and retrosynthesis.
  • Property and yield prediction show competitive or selective competitiveness under LLMs, sometimes outperforming certain baselines.
  • Text-based generation tasks (molecule design and captioning) see strong qualitative and quantitative performance, though exact matches are limited.
  • SELFIES representations underperform SMILES for these LLMs, likely due to training data skew toward SMILES.
  • In-context learning improves performance over zero-shot, and scaffold-based retrieval often outperforms random sampling.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.