A Dataset for Learning University STEM Courses at Scale and Generating Questions at a Human Level

Iddo Drori, Sarah J. Zhang, Zad Chin, Reece Shuttleworth, Albert Lu, Linda Chen, Bereket Birbo, Michele He, Pedro Lantigua, Sunny Tran, Gregory Hunter, Bo Feng, Newman Cheng, Roman Wang, Yann Hicke, Saisamrit Surbehera, Arvind Raghavan, Alexander E. Siemenn, Nikhil Singh, Jayson Lynch, Avi Shporer, Nakul Verma, Tonio Buonassisi, Armando Solar-LezamaAAAI 2023

Introduction

While artificial intelligence has achieved remarkable success in natural language processing, university-level STEM (Science, Technology, Engineering, and Mathematics) subjects remain a significant challenge. These disciplines require multi-step quantitative reasoning, the application of physical constants, and complex mathematical operations such as integration and differential equations. Previous AI attempts in this domain often suffered from narrow specialization or relied on text generation that frequently "hallucinates" mathematical logic. This research addresses the dual challenges of scalability—handling diverse subjects from Mechanical Engineering to Statistics—and quality, ensuring machine-generated content is pedagogically useful.

Methodology: Program Synthesis

The core innovation of this work is the shift from text-based problem solving to Program Synthesis. Rather than prompting a Large Language Model (LLM) like OpenAI’s Codex to provide a direct numerical answer, the researchers instructed it to generate a Python script. By utilizing specialized libraries such as SymPy or Astropy, the model offloads computation to a deterministic engine, significantly reducing errors.

The Program Synthesis pipeline for a Signal Processing question, showing the transition from question to executable code and final explanation.

The pipeline incorporates several key techniques:

  • Generalized Few-Shot Learning: The system uses embeddings to retrieve similar questions from the dataset to serve as contextual prompts.
  • Chain-of-Thought (CoT) Prompting: Encouraging the model to "think step by step" to improve logical consistency.
  • Specialized Architectures: Graph Neural Networks (GNNs) were employed for specific courses to maintain relationships between numerical values and physical descriptions.

The STEM Dataset

The researchers introduced a new, open-source benchmark consisting of 667 STEM questions and solutions. This dataset spans 27 courses across 12 departments at seven elite institutions: MIT, Harvard, Princeton, Cornell, Brown, UPenn, and Yale. Unlike existing elementary-level datasets, this collection covers advanced topics including Hydrodynamics, Quantum Physics, and Theory of Numbers, providing a rigorous testbed for machine reasoning.

Results and Insights

The study yielded several critical findings regarding the capabilities of LLMs in technical domains.

Semantic Clustering

Using OpenAI’s embeddings, the authors visualized the dataset in 2D space. They discovered that questions naturally clustered by topic rather than by institution. For instance, probability questions from different universities grouped together, suggesting the feasibility of a universal "foundation model" for STEM education.

2D visualization of question embeddings showing natural semantic clustering by course topic across different universities.

Performance Benchmarks

  • Accuracy: A specialized model achieved 92% accuracy in Introduction to Astronomy. A generalized approach using Codex reached 67% accuracy across all subjects without course-specific tuning. In contrast, standard GPT-3 (text-davinci-003) with CoT prompting only managed 37.5%, underscoring the superiority of the program synthesis approach.
  • The Turing Test for Homework: In a survey, machine-generated questions were rated as "appropriate" for a course 89.2% of the time, slightly exceeding the 86.1% rating for human-written questions. Students correctly identified machine-generated questions only 37% of the time, indicating they are virtually indistinguishable from professor-written content.

Limitations and Future Work

Despite these advances, three primary frontiers remain:

  1. Visual Reasoning: Current models struggle with problems requiring the interpretation of diagrams, plots, or images.
  2. Formal Proofs: Rigorous mathematical proofs remain more difficult than numerical problem-solving.
  3. Computational Intractability: Tasks involving extreme computational complexity, such as factoring large primes, are still out of reach.

Future research will focus on expanding the dataset to cover entire degree curricula and integrating multi-modal capabilities to process visual data.

Summary updated

BibTeX
@inproceedings{drori2023dataset,
  author = {Iddo Drori and Sarah J. Zhang and Zad Chin and Reece Shuttleworth and Albert Lu and Linda Chen and Bereket Birbo and Michele He and Pedro Lantigua and Sunny Tran and Gregory Hunter and Bo Feng and Newman Cheng and Roman Wang and Yann Hicke and Saisamrit Surbehera and Arvind Raghavan and Alexander E. Siemenn and Nikhil Singh and Jayson Lynch and Avi Shporer and Nakul Verma and Tonio Buonassisi and Armando Solar-Lezama},
  title = {{A Dataset for Learning University STEM Courses at Scale and Generating Questions at a Human Level}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  doi = {10.1609/aaai.v37i13.27091},
}
Figure