Solving Machine Learning Problems

Sunny Tran, Pranav Krishna, Ishan Pakuwal, Prabhakar Kafle, Nikhil Singh, Jayson Lynch, Iddo Drori

Abstract

Can a machine learn Machine Learning? This work trains a machine learning model to solve machine learning problems from a University undergraduate level course. We generate a new training set of questions and answers consisting of course exercises, homework, and quiz questions from MIT's 6.036 Introduction to Machine Learning course and train a machine learning model to answer these questions. Our system demonstrates an overall accuracy of 96% for open-response questions and 97% for multiple-choice questions, compared with MIT students' average of 93%, achieving grade A performance in the course, all in real-time. Questions cover all 12 topics taught in the course, excluding coding questions or questions with images. Our system uses Transformer models within an encoder-decoder architecture with graph and tree representations. An important aspect of our approach is a data-augmentation scheme for generating new example problems. We also train a machine learning model to generate problem hints. Thus, our system automatically generates new questions across topics, answers both open-response questions and multiple-choice questions, classifies problems, and generates problem hints, pushing the envelope of AI for STEM education.

Introduction

While Large Language Models (LLMs) have become remarkably good at writing essays and passing Turing tests, they historically struggle with STEM subjects. Standard "next-token" predictors often fail at basic mathematical reasoning, such as calculating the magnitude of a vector or performing multi-step calculus—prerequisites for understanding Machine Learning.

The authors tackle the challenge of creating a model that can comprehend a technical word problem, identify the underlying mathematical structure, and execute the necessary calculations to provide a precise numerical answer. This is a significant step toward automated STEM education and AI-driven tutoring systems.

Methods

The authors move beyond pure text generation by using a specialized encoder-decoder architecture that treats math as a structural problem rather than a linguistic one.

System architecture combining Transformer and Graph Neural Network encoders with an expression tree decoder.

The system employs a hybrid encoding strategy. It uses a Transformer (specifically T5) to encode the text of the question while simultaneously building a graph representation that parses the question into words and numerical components. A Graph Neural Network (GNN) captures the relationships between these components. Instead of outputting a text string, the decoder generates an expression tree representing mathematical operations (e.g., +, *, log, exp) and operands. The final answer is obtained by evaluating this tree, ensuring mathematical consistency.

To overcome the small size of the original dataset (140 questions), the team used a data augmentation pipeline involving paraphrasing and "value plugging" (substituting different numbers into templates) to expand the training set to 14,000 augmented questions.

Datasets

The study uses a newly curated dataset derived from MIT’s 6.036 Introduction to Machine Learning. The content includes exercises, homework, and quiz questions covering 12 topics such as Perceptrons, CNNs, RNNs, MDPs, and Reinforcement Learning. Questions requiring image processing or writing code were excluded.

Results and Insights

The system demonstrates high performance across all course topics. The most striking insight is the failure of pure LLMs; GPT-3 achieved only 7% accuracy on this dataset, highlighting that structural understanding via expression trees is far more effective for STEM than next-token prediction.

Accuracy across 12 machine learning topics for open-response (ORQ) and multiple-choice (MCQ) questions.

Key results include:

  • Open-Response Accuracy: 96% (outperforming the MIT student average of 93%).
  • Multiple-Choice Accuracy: 97%.
  • Speed: The model provides answers in milliseconds, significantly faster than human students.
  • Ablation Success: Including the GNN improved accuracy from 83% to 94% on open-response questions, proving the necessity of grounding numerical values in textual context.

Furthermore, because the model generates a tree, it can provide "hints" by traversing the tree and showing sub-expressions, allowing it to act as an automated tutor.

Conclusion and Future Work

Despite its success, the model has limitations. It cannot solve problems involving diagrams or plots, nor can it write the Python code required for programming assignments. Future work aims to expand the system to handle MIT’s 6.042 (Mathematics for Computer Science) and develop multi-modal versions capable of processing visual inputs and generating code.

Summary updated

BibTeX
@inproceedings{tran2021solving,
  author = {Sunny Tran and Pranav Krishna and Ishan Pakuwal and Prabhakar Kafle and Nikhil Singh and Jayson Lynch and Iddo Drori},
  title = {{Solving Machine Learning Problems}},
  booktitle = {ACML},
  year = {2021},
  url = {https://openreview.net/forum?id=tOw69XyY6n},
}
Figure