TheoremQA: A Theorem-driven Question Answering Dataset

Wenhu Chen, Ming Yin, Max Ku, Pan Lu, Yixin Wan, Xueguang Ma, Jianyu Xu, Xinyi Wang, Tony Xia

Abstract

The recent LLMs like GPT-4 and PaLM-2 have made tremendous progress in solving fundamental math problems like GSM8K by achieving over 90% accuracy. However, their capabilities to solve more challenging math problems which require domain-specific knowledge (i.e. theorem) have yet to be investigated. In this paper, we introduce TheoremQA, the first theorem-driven question-answering dataset designed to evaluate AI models' capabilities to apply theorems to solve challenging science problems. TheoremQA is curated by domain experts containing 800 high-quality questions covering 350 theorems from Math, Physics, EE&CS, and Finance. We evaluate a wide spectrum of 16 large language and code models with different prompting strategies like Chain-of-Thoughts and Program-of-Thoughts. We found that GPT-4's capabilities to solve these problems are unparalleled, achieving an accuracy of 51% with Program-of-Thoughts Prompting. All the existing open-sourced models are below 15%, barely surpassing the random-guess baseline. Given the diversity and broad coverage of TheoremQA, we believe it can be used as a better benchmark to evaluate LLMs' capabilities to solve challenging science problems.

The Challenge of Expert-Level STEM

While Large Language Models (LLMs) have demonstrated near-perfect performance on elementary math benchmarks like GSM8K, these successes often reflect proficiency in basic logic and arithmetic rather than deep scientific understanding. Current benchmarks fail to distinguish between "common sense" reasoning and the application of formal, university-level theorems. To address this, we present TheoremQA, a dataset specifically designed to test whether models can bridge the gap between knowing a theorem and applying it to solve complex, domain-specific problems.

The TheoremQA Dataset

TheoremQA is a high-quality benchmark curated by domain experts. It consists of 800 questions requiring the application of over 350 distinct theorems. Unlike previous datasets that focus on a single field, TheoremQA spans four major STEM domains: Mathematics, Physics, Electrical Engineering & Computer Science (EE&CS), and Finance.

Breakdown of the 800 questions and 350 theorems across four major STEM domains.

The dataset is designed for objective evaluation, with answers formatted as evaluable types such as integers, floats, or lists. This ensures that scoring remains consistent and reproducible across different model architectures.

Evaluation Methodology

We evaluated 16 prominent LLMs using two primary prompting strategies:

  1. Chain-of-Thought (CoT): Encouraging the model to generate step-by-step natural language reasoning.
  2. Program-of-Thought (PoT): Prompting the model to generate a Python program that solves the problem, which is then executed by an external interpreter.
The TheoremQA reasoning pipeline, supporting both natural language (CoT) and programmatic (PoT) thought processes.

Additionally, we explored Theorem Augmentation, providing models with explicit theorem definitions to determine if performance gains could be achieved by simply "reminding" the model of the relevant rules.

Results and Analysis

The experimental results reveal a significant performance gap between state-of-the-art closed-source models and their open-source counterparts.

  • GPT-4 Dominance: GPT-4 is the clear leader, achieving 51.0% accuracy using PoT prompting. This suggests that for high-level math, generating code is superior to natural language reasoning, as it reduces calculation errors and enforces logical precision.
  • The Open-Source Gap: Most open-source models, including LLaMA and Alpaca, struggled significantly, with scores often falling below 15%. Error analysis indicates that these models fail primarily due to "non-rectifiable" errors—they simply do not possess the underlying knowledge of the required theorems.
  • Knowledge vs. Application: Interestingly, Theorem Augmentation did not provide a significant boost. This implies that the core challenge for LLMs is not just memorizing definitions, but understanding how to contextualize and apply those definitions to specific problem scenarios.

Conclusion and Future Work

TheoremQA highlights the current limitations of LLMs in mastering university-level science. While GPT-4 shows promise, it still lags behind human undergraduate performance (60-95%). Future work should focus on improving visual reasoning for scientific diagrams and developing pre-training strategies that better incorporate formal scientific knowledge into open-source models.

Summary updated

BibTeX
@inproceedings{chen2023theoremqa,
  author = {Wenhu Chen and Ming Yin and Max Ku and Pan Lu and Yixin Wan and Xueguang Ma and Jianyu Xu and Xinyi Wang and Tony Xia},
  title = {{TheoremQA: A Theorem-driven Question Answering Dataset}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=Wom397PB55},
}
Figure