Improving Chemical Understanding of LLMs via SMILES Parsing
Preprint
Abstract
Large language models (LLMs) are increasingly recognized as powerful tools for scientific discovery, particularly in molecular science. A fundamental requirement for these models is the ability to accurately understand molecular structures, commonly encoded in the SMILES representation. However, current LLMs struggle to interpret SMILES, even failing to carry out basic tasks such as counting molecular rings. To address this limitation, we introduce CLEANMOL, a novel framework that formulates SMILES parsing into a suite of clean and deterministic tasks explicitly designed to promote graph-level molecular comprehension. These tasks span from subgraph matching to global graph matching, providing structured supervision aligned with molecular structural properties. We construct a molecular pretraining dataset with adaptive difficulty scoring and pre-train open-source LLMs on these tasks. Our results show that CLEANMOL not only enhances structural comprehension but also achieves the best or competes with the baseline on the Mol-Instructions benchmark.Keywords
All Related Versions
This publication has 17 references indexed in Scilit:
- A knowledge-guided pre-training framework for improving molecular representation learningNature Communications, 2023
- Do Large Language Models Understand Chemistry? A Conversation with ChatGPTJournal of Chemical Information and Modeling, 2023
- Assessment of chemistry knowledge in large language models that generate codeDigital Discovery, 2023
- Unified Deep Learning Model for Multitask Reaction Predictions with ExplanationJournal of Chemical Information and Modeling, 2022
- Fréchet ChemNet Distance: A Metric for Generative Models for Molecules in Drug DiscoveryJournal of Chemical Information and Modeling, 2018
- MoleculeNet: a benchmark for molecular machine learningChemical Science, 2017
- Get Your Atoms in Order—An Open-Source Implementation of a Novel and Robust Molecular Canonicalization AlgorithmJournal of Chemical Information and Modeling, 2015
- A novel measure for evaluating classifiersExpert Systems with Applications, 2010
- SMILES. 2. Algorithm for generation of unique SMILES notationJournal of Chemical Information and Computer Sciences, 1989
- SMILES, a chemical language and information system. 1. Introduction to methodology and encoding rulesJournal of Chemical Information and Computer Sciences, 1988