Home Knowledge Base MathQA

MathQA is the large-scale math word problem dataset annotated with executable operation programs — bridging the gap between end-to-end answer prediction and interpretable program synthesis by requiring models to produce a structured formula tree that explicitly encodes the mathematical operations needed to solve each problem.

What Is MathQA?

The Three-Part Annotation

Each MathQA example contains:

1. Problem Text: "A train travels from city A to city B at 60 mph. The return trip is at 40 mph. What is the average speed for the entire trip?"

2. Rationale (Natural Language): "Average speed = total distance / total time. Let d be the one-way distance. Time AB = d/60, time BA = d/40, total time = d/60 + d/40 = 5d/120. Average = 2d / (5d/120) = 48 mph."

3. Operation Program: divide(multiply(2, 60), add(divide(60, 40), divide(40, 60))) (simplified symbolic form)

Why Operation Programs Matter

Standard seq2seq math solvers (directly predicting the answer number) have three critical weaknesses:

Operation programs address all three:

Why MathQA Matters

Performance Benchmarks

ApproachAccuracy
Human expert~95%+
Seq2seq baseline~61%
BERT + program synthesis~73%
GPT-4 (direct answer)~85%
GPT-4 + code execution~92%

Connection to Downstream Work

MathQA directly influenced:

MathQA is showing your mathematical work in executable form — requiring the model to produce not just the answer but the precise sequence of operations that derives it, making math reasoning transparent, auditable, and composable.

mathqaevaluation

Explore 500+ Semiconductor & AI Topics

From EUV lithography to CUDA optimization — search the full knowledge base or chat with our AI assistant.