TOMG-Bench: Evaluating LLMs on Text-based Open Molecule Generation

Jiatong Li, Junxian Li, Yunqing Liu, Dongzhan Zhou, Qing LiarXiv 2024 · DOI · OpenReview

Abstract

In this paper, we propose the Text-based Open Molecule Generation Benchmark (TOMG-Bench), the first benchmark designed to evaluate the open-domain molecule generation capability of Large Language Models (LLMs). TOMG-Bench encompasses a dataset of three major tasks: molecule editing (MolEdit), molecule optimization (MolOpt), and customized molecule generation (MolCustom). Each major task contains three subtasks, with 5,000 test samples per subtask. Given the inherent complexity of open molecule generation evaluation, we also developed an automated evaluation system to measure both the quality and accuracy of generated molecules. Our comprehensive benchmarking of 25 LLMs reveals current limitations and potential areas for improvement in text-guided molecule discovery. Furthermore, we propose OpenMolIns, a specialized instruction-tuning dataset established for solving challenges raised by TOMG-Bench. Fine-tuned on OpenMolIns, Llama3.1-8B outperforms all open-source general LLMs, even surpassing GPT-3.5-turbo by 46.5% on TOMG-Bench.

Introduction

In drug discovery, the design process is rarely a "one-to-one" problem. A chemist might seek a molecule that is soluble, non-toxic, and contains a specific ring structure—a request that thousands of different molecular configurations could satisfy. However, existing AI benchmarks for chemistry, such as ChEBI-20, have historically relied on one-to-one mapping, asking models to "retrieve" a specific molecule from a text description. This effectively turns a creative design problem into a memory test, failing to measure an LLM's ability to reason about chemical structures or navigate the vast chemical space.

To address this gap, we introduce a framework that evaluates how well models can edit, optimize, and custom-build molecules based on natural language instructions, shifting the focus from molecular recall to realistic design.

The S²-Bench Framework

We propose a three-pronged task structure within the benchmark (referred to as S²-Bench in our task definitions) to test various facets of molecular generation:

  1. MolEdit (Molecule Editing): Tests the model's ability to make precise, localized changes—such as adding, deleting, or substituting functional groups—while preserving the rest of the molecular scaffold.
  2. MolOpt (Molecule Optimization): Challenges the model to modify a lead compound to improve specific properties like solubility (LogP), molecular refractivity (MR), or drug-likeness (QED).
  3. MolCustom (Customized Generation): Requires the model to synthesize a novel molecule from scratch based on quantitative constraints, such as specific atom counts or functional groups.
Overview of the S²-Bench tasks: MolEdit, MolOpt, and MolCustom.

To evaluate these tasks, we utilize a Weighted Success Rate (WSR). This metric goes beyond simple instruction following by factoring in Tanimoto Similarity (to ensure edits are rational) and Novelty (to ensure custom molecules are not merely copies of existing database entries).

Datasets and Instruction Tuning

Our research introduces two primary resources:

  • S²-Bench: An evaluation benchmark consisting of 45,000 test cases across nine subtasks, derived from the Zinc-250K database.
  • OpenMolIns: A massive, programmatically generated instruction-tuning dataset containing up to 1.2 million instruction-molecule pairs. This dataset leverages PubChem and the RDKit toolkit to ensure chemical validity across varying scales (light, small, medium, large, and xlarge).

Results and Discussion

Our benchmarking of 28 different LLMs reveals that while top-tier proprietary models like Claude-3.5 and GPT-4o show strong general reasoning, they often struggle with precise structural constraints. They tend to produce "chemically plausible" results that lack "structural precision."

Comparison of model performance (Average Weighted Success Rate) against model size across various LLM families.

The standout performer was Llama-3.1-8B fine-tuned on OpenMolIns-xlarge, which achieved a Weighted Success Rate of 39.33%, securing the top spot on the leaderboard and outperforming proprietary models like Claude-3.5 (35.92%) and GPT-4o (32.29%). This suggests that domain-specific instruction tuning is a more critical factor for scientific tasks than raw parameter count.

Conclusion and Future Work

By shifting the focus from recall to design, TOMG-Bench provides a rigorous roadmap for developing AI assistants for chemistry. While models are improving at following instructions, "true" chemical reasoning—understanding the underlying causal relationship between structural modifications and property changes—remains a frontier. Future work will aim to expand the breadth of biological properties evaluated and refine the reasoning depth of these models.

Summary updated

BibTeX
@misc{li2024tomg,
  author = {Jiatong Li and Junxian Li and Yunqing Liu and Dongzhan Zhou and Qing Li},
  title = {{TOMG-Bench: Evaluating LLMs on Text-based Open Molecule Generation}},
  year = {2024},
  eprint = {2412.14642},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2412.14642},
}
Figure