dgn-math-problems / README.md
ORCHORDS's picture
Publish the verified benchmark: corrected answers, extra books, synthetic problems
66a3aff verified
|
Raw History Blame Contribute Delete
9.35 kB
---
license: other
license_name: dgn-math-benchmark-research-use
license_link: https://huggingface.co/datasets/ORCHORDS/dgn-math-problems
pretty_name: DGN Math Benchmark
tags:
- mathematics
- math
- math-benchmark
- benchmark
- evaluation
- eval
- reasoning
- text-to-math
- math-reasoning
- latex
- algebra
- trigonometry
- geometry
- inequalities
- word-problems
- worked-solutions
- english
- english-translation
- textbook-derived
- mixed
task_categories:
- text-generation
- question-answering
language:
- en
size_categories:
- 10K<n<100K
library_name: datasets
library:
- datasets
- pandas
- pyarrow
configs:
- config_name: full
data_files:
- split: train
path: data/full/train-*.parquet
- split: test
path: data/full/test-*.parquet
- config_name: qa
data_files:
- split: train
path: data/qa/train-*.parquet
- split: test
path: data/qa/test-*.parquet
- config_name: verified
data_files:
- split: train
path: data/verified/train-*.parquet
- split: test
path: data/verified/test-*.parquet
- config_name: core
data_files:
- split: train
path: data/core/train-*.parquet
- split: test
path: data/core/test-*.parquet
- config_name: books
data_files:
- split: train
path: data/books/train-*.parquet
- split: test
path: data/books/test-*.parquet
- config_name: synthetic
data_files:
- split: train
path: data/synthetic/train-*.parquet
- split: test
path: data/synthetic/test-*.parquet
---
# DGN Math Benchmark
**12,554 question-answer pairs** - 2,132 of them with an engine-verified answer and
therefore usable as a scored benchmark. 3,617 problems come from scanned books,
8,417 from additional problem books, 520 are generated and machine-checked.
> Every printed answer in this dataset was checked with a real symbolic engine (SymPy).
> Where the engine produced a concrete counterexample, the answer was either replaced by a
> recomputed value that the engine then re-verified (`corrected`), or the row was kept with
> the printed answer and flagged (`refuted`). Where the check was inconclusive the row is
> flagged `suspected` and is **not** counted as a book error. Nothing was silently corrected,
> and every row says in `answer_status` exactly how much its answer was checked.
## What this is
An English-language mathematics benchmark for evaluating language models on
problem solving. Problems are given in LaTeX, every item carries a worked
solution, and the final answer is stored in the standard MATH convention
(`\boxed{...}`), so the dataset drops straight into the usual math harnesses.
## Configs
| config | rows | what it is |
|---|---|---|
| `full` | 12,554 | every problem, every column, including the unverified ones |
| `qa` | 12,554 | the minimal MATH-style columns: problem, answer, metadata |
| `verified` | 2,132 | **the scored split** - only rows whose answer the engine confirmed |
| `core` | 3,617 | the scanned algebra book (11 chapters) |
| `books` | 8,417 | the additional problem books |
| `synthetic` | 520 | generated problems with computed, re-checked answers |
Each config has a deterministic 85/15 train/test split (seed 42), stratified by
source and chapter.
## Columns (`full`)
| column | type | meaning |
|---|---|---|
| `id` | string | stable identifier, e.g. `algebra_core.1.122` |
| `problem_id` | string | the problem number as printed in the book |
| `source` | string | which collection the problem comes from |
| `source_title` | string | human-readable name of that collection |
| `chapter` | int | chapter / topic number |
| `chapter_title` | string | chapter / topic name |
| `group` | string | difficulty group printed in the book (A / B / C) |
| `difficulty` | string | the difficulty glyph printed in the book (`□` easy, `■` hard) |
| `problem` | string | the statement, LaTeX, inline `$...$` and display `$$...$$` |
| `solution` | string | the worked solution, ending in the boxed answer |
| `final_answer` | string | the gold answer as bare LaTeX (no `$`, no `\boxed`) |
| `final_answer_boxed` | string | the same answer as `\boxed{...}` |
| `answer_status` | string | `verified` / `corrected` / `refuted` / `suspected` / `disputed` / `unverifiable` / `no-gold` / `synthetic-verified` / `synthetic-unverified` |
| `verification_note` | string | what the engine checked and what it found |
| `page` | int | the printed page the problem is on |
### Answer status
| status | count | meaning |
|---|---|---|
| `verified` | 1,924 | the engine substituted the answer back into the problem and it held |
| `corrected` | 17 | the printed answer was refuted and replaced by a re-verified recomputation |
| `refuted` | 60 | the engine found a concrete counterexample: the printed answer does not hold |
| `suspected` | 114 | the recomputed answer differs from the printed one, but no counterexample was found - **not** counted as a book error |
| `disputed` | 102 | a third read of the scanned page disagreed with the bulk transcription |
| `unverifiable` | 3,969 | outside the reach of automatic checking |
| `no-gold` | 5,848 | the source page carries no printed answer for this problem |
| `synthetic-verified` | 191 | generated template; the printed statement was parsed, solved and compared with the printed answer |
| `synthetic-unverified` | 329 | generated template; the answer is a derived quantity no engine could re-check - not scored |
`verified` means the engine substituted the answer back into the problem and it held.
`corrected` means the printed answer was refuted and replaced by a recomputed answer
that the engine then re-verified. `refuted` means the engine produced a **concrete
counterexample** - the printed root fails the equation, the printed tuple satisfies no
equation of the system, or the printed interval misses a point that satisfies the
inequality. `suspected` means the recomputed answer differs from the printed one but
no counterexample was found; a difference in a radical's scope can look the same, so
these are **not** counted as book errors. `disputed` means a third independent read of
the scanned page disagreed with the bulk transcription. `unverifiable` means the
printed answer exists but is outside the reach of automatic checking - word problems,
open-ended proofs, and answers that are not a number or a set. `no-gold` means the
source page carries no printed answer for that problem.
Only `verified`, `corrected` and `synthetic-verified` rows are scored.
## Answer format
The convention is the one used by the MATH dataset and by the standard evaluation
harnesses:
* inline mathematics is written `$...$`, display mathematics `$$...$$`
* the gold answer is stored twice: `final_answer` holds the bare LaTeX
(`\frac{3}{4}`), `final_answer_boxed` holds `\boxed{\frac{3}{4}}`
* the `solution` column ends with the boxed answer, so a harness that extracts the
last `\boxed{...}` from the solution gets the same string
* decimals use a point, never a comma
* there is no mixing of `\(...\)` and `$...$` delimiters
```python
from datasets import load_dataset
ds = load_dataset("ORCHORDS/dgn-math-problems", "verified", split="test")
print(ds[0]["problem"])
print(ds[0]["final_answer_boxed"])
```
## Scoring
The scoring model, the comparison tiers and a reporting template are documented in
`BENCHMARKING.md` at the root of this repository, and implemented in
`evaluate_benchmark.py`. In short, a prediction is compared with the gold answer at
four strengths - exact string, numeric, symbolic and set equivalence - and the
strictest tier that decides the item is the one that is reported, so a model cannot
be rewarded for a merely numerically close answer.
```bash
python evaluate_benchmark.py \
--dataset hf_dataset/data/verified/test-00000-of-00001.parquet \
--predictions predictions.jsonl \
--out report.json
```
## How the data was produced
1. **Transcription.** The scanned books were transcribed page by page with a vision
model into structured JSON, twice, with the two passes arbitrated by SymPy. The
additional books were transcribed from their page images with the same pipeline.
2. **Verification.** Every answer was checked with SymPy: back-substitution into
equations and systems, exact endpoint evaluation for inequalities, symbolic
evaluation for limits and integrals, numeric identity testing for proofs.
3. **Adjudication.** Every flagged answer was re-read a third time, directly from
the page image, and only corrections that the engine could confirm were written
back.
4. **Generation.** The synthetic slice is produced by templates that compute the
answer with SymPy and then re-check it; an item that fails the re-check is
dropped.
## Provenance and rights
The problems are drawn from Russian-language university entrance-exam mathematics
problem books and problem collections that are publicly available on the
postypashki.ru site. All rights in the underlying texts remain with their authors
and publishers; this repository redistributes transformed, machine-checked English
transcriptions for research and evaluation purposes and makes no claim of
original authorship of the problem statements. `license` is therefore `other`.
The `answer_status` and `verification_note` columns exist so that any user of this
benchmark can see exactly how much trust each item's answer has earned.