File size: 9,351 Bytes
cc86c39
 
566d308
 
 
cc86c39
 
 
566d308
 
 
 
 
 
 
 
cc86c39
 
566d308
 
 
cc86c39
566d308
cc86c39
566d308
 
 
 
 
 
 
cc86c39
79b53bf
566d308
 
 
 
 
cc86c39
 
 
 
 
 
 
 
 
 
 
 
 
566d308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cc86c39
 
566d308
 
79b53bf
566d308
79b53bf
cc86c39
566d308
 
 
 
 
 
cc86c39
566d308
cc86c39
566d308
 
 
 
cc86c39
 
 
566d308
cc86c39
79b53bf
 
 
566d308
79b53bf
566d308
cc86c39
566d308
 
cc86c39
566d308
cc86c39
566d308
 
 
 
 
 
 
 
 
 
 
 
 
 
6619dfa
566d308
 
 
 
 
 
 
79b53bf
 
 
 
 
 
 
6619dfa
 
566d308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cc86c39
 
 
 
566d308
 
 
cc86c39
 
566d308
cc86c39
566d308
 
 
 
 
 
cc86c39
566d308
 
 
 
 
 
cc86c39
566d308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
---
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,557 question-answer pairs** - 1,989 of them with an engine-verified answer and
therefore usable as a scored benchmark. 3,620 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,557 | every problem, every column, including the unverified ones |
| `qa` | 12,557 | the minimal MATH-style columns: problem, answer, metadata |
| `verified` | 1,989 | **the scored split** - only rows whose answer the engine confirmed |
| `core` | 3,620 | 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,781 | 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` | 66 | the engine found a concrete counterexample: the printed answer does not hold |
| `suspected` | 102 | the recomputed answer differs from the printed one, but no counterexample was found - **not** counted as a book error |
| `disputed` | 122 | a third read of the scanned page disagreed with the bulk transcription |
| `unverifiable` | 4,100 | outside the reach of automatic checking |
| `no-gold` | 5,849 | 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.