新分子表示法让大模型更准地理解化学结构。
Molecular Representations for Large Language Models

- 提出MolJSON,用结构化数据格式替代传统字符串表示。
- 在生成和推理任务中,性能显著优于SMILES和IUPAC。
- 适合需要精确化学结构理解的研究者与开发者。
大型语言模型(LLMs)正越来越多地用于科学发现。在化学领域,反应预测和结构解析等任务需对分子结构进行推理,因此基于LLM的系统必须可靠地处理分子结构。以往研究多采用SMILES字符串或IUPAC名称作为分子表示,但其适用性未被系统评估。本文提出一种新型分子表示MolJSON,系统比较了其与五种常见化学格式的表现。使用GPT-5-nano、GPT-5-mini、GPT-5和Claude Haiku 4.5,在包含78,045个问题的集上测试了翻译、最短路径和受限生成推理任务。结果表明,不同表示在解释和生成分子图方面差异显著,MolJSON始终表现最优。在翻译任务中,GPT-5将IUPAC转为MolJSON准确率达71.0%,而转为SMILES仅43.7%;受限生成中,生成MolJSON准确率为95.3%,高于IUPAC的76.3%和SMILES的64.0%。最短路径推理中,使用MolJSON时正确率高达98.5%,优于SMILES的92.2%和IUPAC的82.7%,且所需推理令牌更少。SMILES和IUPAC在原子数和环复杂度上存在系统性错误,而MolJSON更具鲁棒性。结果表明,分子表示的选择显著影响LLM性能,显式分子图结构如MolJSON是化学领域大模型的可行方向。
原文摘要 · Abstract (English)
Large Language Models (LLMs) are increasingly being used to support scientific discovery. In chemistry, tasks such as reaction prediction and structure elucidation require reasoning about the structures of molecules. As such, LLM-based systems for chemistry must interact reliably with molecular structures. Most previous studies of LLMs in chemistry have used SMILES strings or IUPAC names as molecular representations; however, the suitability of these formats has not been systematically assessed. In this work, we introduce MolJSON, a novel molecular representation for LLMs, and systematically compare it with five common chemical formats. We evaluated each representation with GPT-5-nano, GPT-5-mini, GPT-5, and Claude Haiku 4.5 using a set of 78,045 questions spanning translation, shortest path, and constrained generation reasoning tasks. We observed substantial variation across representations in the ability of LLMs to interpret and generate molecular graphs, with MolJSON consistently outperforming existing formats. On translation tasks, GPT-5 achieved 71.0% accuracy when converting IUPAC names to MolJSON, compared with 43.7% when converting the same inputs to SMILES. For constrained generation, GPT-5 reached 95.3% accuracy generating MolJSON, compared with 76.3% for IUPAC and 64.0% for SMILES. As an input format for shortest-path reasoning, GPT-5 successfully answered 98.5% of questions with MolJSON, compared with 92.2% for SMILES and 82.7% for IUPAC, whilst also using fewer reasoning tokens. We observed systematic errors associated with atom count and ring complexity for SMILES strings and IUPAC names, whereas MolJSON was more robust to these failure modes. Our results show that the choice of molecular representation has a material impact on LLM performance, and that explicit molecular graph schemas, such as MolJSON, are a promising direction for LLM-based systems in chemistry.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。