Skip to main content
QUICK REVIEW

[Paper Review] Structured Chemistry Reasoning with Large Language Models

Siru Ouyang, Zhuosheng Zhang|arXiv (Cornell University)|Nov 16, 2023
Semantic Web and OntologiesComputer Science7 citations
TL;DR

This paper introduces StructChem, a structured prompting framework that enhances large language models (LLMs) for complex chemistry reasoning by decomposing reasoning into three phases: formulae generation, step-by-step derivation, and confidence-based refinement. It boosts GPT-4’s performance by up to 30% on complex chemistry benchmarks, significantly reducing reasoning and calculation errors through grounded, iterative reasoning.

ABSTRACT

Large Language Models (LLMs) excel in diverse areas, yet struggle with complex scientific reasoning, especially in the field of chemistry. Different from the simple chemistry tasks (e.g., molecule classification) addressed in previous studies, complex chemistry problems require not only vast knowledge and precise calculation, but also compositional reasoning about rich dynamic interactions of different concepts (e.g., temperature changes). Our study shows that even advanced LLMs, like GPT-4, can fail easily in different ways. Interestingly, the errors often stem not from a lack of domain knowledge within the LLMs, but rather from the absence of an effective reasoning structure that guides the LLMs to elicit the right knowledge, incorporate the knowledge in step-by-step reasoning, and iteratively refine results for further improved quality. On this basis, we introduce StructChem, a simple yet effective prompting strategy that offers the desired guidance and substantially boosts the LLMs' chemical reasoning capability. Testing across four chemistry areas -- quantum chemistry, mechanics, physical chemistry, and kinetics -- StructChem substantially enhances GPT-4's performance, with up to 30\% peak improvement. Our analysis also underscores the unique difficulties of precise grounded reasoning in science with LLMs, highlighting a need for more research in this area. Code is available at \url{https://github.com/ozyyshr/StructChem}.

Motivation & Objective

  • Address the persistent failure of advanced LLMs like GPT-4 in complex chemistry reasoning tasks despite possessing relevant knowledge.
  • Identify that the core issue lies not in knowledge scarcity but in the absence of effective reasoning structures to guide knowledge elicitation and step-by-step derivation.
  • Develop a systematic prompting strategy that structures LLM reasoning into three distinct phases to improve accuracy and robustness in scientific chemistry problems.
  • Demonstrate that structured reasoning significantly reduces reasoning and calculation errors, especially in problems involving dynamic interactions of multiple chemical concepts.
  • Enable effective fine-tuning of smaller LLMs using high-quality reasoning chains generated by StructChem, extending its utility beyond large models.

Proposed method

  • Introduce a three-phase reasoning framework: (1) formulae generation, (2) step-by-step reasoning using identified formulae, and (3) confidence-based review-and-refinement of intermediate results.
  • Use LLMs to generate essential chemical formulae first, establishing a grounded basis for subsequent reasoning to prevent hallucination and irrelevance.
  • Implement iterative refinement by estimating confidence scores for each revision, enabling progressive improvement toward a high-confidence final answer.
  • Distinguish from self-verification methods by incorporating confidence estimation and iterative revision, reducing reliance on purely prompt-based verification.
  • Apply the method across four diverse chemistry subfields—quantum chemistry, mechanics, physical chemistry, and kinetics—using benchmark datasets like SciBench.
  • Fine-tune smaller LLMs (e.g., Llama-2-13B, Vicuna-13B) using reasoning chains generated by GPT-4 via StructChem, demonstrating transferability of the method.

Experimental results

Research questions

  • RQ1Why do advanced LLMs like GPT-4 fail on complex chemistry reasoning tasks despite having access to relevant domain knowledge?
  • RQ2To what extent can structured prompting improve the accuracy and reliability of LLMs in solving multi-concept, dynamic chemistry problems?
  • RQ3How does the inclusion of formulae generation and confidence-based refinement enhance reasoning quality compared to standard chain-of-thought prompting?
  • RQ4Can the reasoning chains produced by StructChem be effectively transferred to fine-tune smaller LLMs for improved performance?
  • RQ5What are the dominant error types in LLM-based chemistry reasoning, and how does StructChem reduce them?

Key findings

  • StructChem reduces reasoning errors in GPT-4 by up to 30% across four chemistry subfields, with the most significant improvement observed in complex, multi-concept problems.
  • The method achieves a maximum absolute improvement of 30% on GPT-4 in the physical chemistry subfield, significantly outperforming standard chain-of-thought prompting.
  • Even in the absence of chain-of-thought prompting, calculation errors account for around 25% of errors, highlighting the importance of precision in reasoning steps.
  • The formulae generation phase is highly effective: while some formulae are irrelevant, incorrect formulae are rare, and relevance is more critical than correctness for downstream performance.
  • StructChem’s performance gain is cost-effective, as it achieves higher accuracy without proportionally increasing token consumption compared to CoT and PoT baselines.
  • Fine-tuning smaller LLMs (e.g., Vicuna-13B) using reasoning chains from StructChem leads to strong performance improvements, demonstrating the method’s transferability and scalability.

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.