File size: 11,222 Bytes
cc86c39
 
566d308
 
 
cc86c39
 
 
566d308
 
 
 
 
 
 
 
cc86c39
 
566d308
 
 
cc86c39
566d308
cc86c39
566d308
 
 
 
 
 
cc86c39
79b53bf
566d308
 
 
 
 
cc86c39
 
 
 
 
 
 
 
 
 
 
 
 
566d308
 
 
 
 
 
 
 
 
 
 
 
9ecd008
566d308
 
9ecd008
566d308
9ecd008
 
566d308
 
9ecd008
566d308
9ecd008
cc86c39
 
566d308
 
2cb99f0
9ecd008
cc86c39
9ecd008
566d308
 
9ecd008
 
 
cc86c39
566d308
cc86c39
566d308
2cb99f0
 
566d308
cc86c39
 
 
566d308
cc86c39
2cb99f0
 
 
9ecd008
2cb99f0
9ecd008
cc86c39
566d308
2cb99f0
 
 
cc86c39
566d308
cc86c39
566d308
 
9ecd008
 
 
 
 
566d308
 
2cb99f0
 
566d308
2cb99f0
566d308
 
9ecd008
566d308
9ecd008
566d308
 
 
 
 
2cb99f0
 
 
 
 
 
 
566d308
 
9ecd008
566d308
9ecd008
 
 
 
 
 
 
 
 
 
 
566d308
 
 
 
 
 
 
 
 
2cb99f0
 
566d308
 
 
cc86c39
 
 
 
566d308
 
 
cc86c39
 
566d308
cc86c39
566d308
 
 
 
 
 
cc86c39
566d308
 
 
 
 
 
cc86c39
566d308
 
9ecd008
 
566d308
 
 
 
9ecd008
 
 
2cb99f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566d308
9ecd008
566d308
9ecd008
 
 
 
 
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
---
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
- 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: extended
  data_files:
  - split: train
    path: data/extended/train-*.parquet
  - split: test
    path: data/extended/test-*.parquet
- config_name: exercises
  data_files:
  - split: train
    path: data/exercises/train-*.parquet
  - split: test
    path: data/exercises/test-*.parquet
---

# DGN Math Benchmark

**12,592 mathematics problems, built and machine-verified by us.** 2,755 of them carry an
answer that a symbolic engine confirmed, and those form the scored split.

> Every answer in this dataset was put through a real computational 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 original answer and flagged (`refuted`). Where the check was inconclusive the row is
> flagged `suspected` and is **not** counted as an error in the source. 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, 5,105 of the 12,592 items
carry 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,592 | every problem, every column, including the unverified ones |
| `qa` | 12,592 | the minimal MATH-style columns: problem, answer, metadata |
| `verified` | 2,755 | **the scored split** - only rows whose answer the engine confirmed |
| `core` | 3,617 | the main collection: algebra, trigonometry, progressions, logarithms, inequalities |
| `extended` | 8,455 | the extended collections: entrance algebra, the full syllabus, parameters, trigonometry, plane geometry |
| `exercises` | 520 | machine-made exercises whose answers are computed and re-checked |

Each config has a deterministic 85/15 train/test split (seed 42), stratified by
collection and chapter. A problem that is printed more than once - in two chapters
of one collection or in two collections - keeps all of its copies in the same half,
so no problem of the test half was in the train half.

## Columns (`full`)

| column | type | meaning |
|---|---|---|
| `id` | string | stable identifier, e.g. `dgn.core.1.122` |
| `problem_id` | string | the number of the problem in its collection |
| `collection` | string | which collection the problem comes from (`core`, `algebra`, `syllabus`, ...) |
| `source` | string | the benchmark this problem belongs to (`dgn_math`) |
| `source_title` | string | the title of the benchmark |
| `chapter` | int | chapter / topic number |
| `chapter_title` | string | chapter / topic name |
| `group` | string | group of the problem inside its chapter, as printed in the source (`A`, `B`, `C`); empty when the source names no group |
| `difficulty` | string | difficulty mark of the problem (`□` easy, `■` hard); empty when the source prints no difficulty mark |
| `problem` | string | the statement, LaTeX, inline `$...$` and display `$$...$$` |
| `solution` | string | the worked solution; where the row carries an answer it ends 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` |
| `verification_note` | string | what the engine checked and what it found |
| `page` | int | the page of the source material the problem comes from |

### Answer status

| status | count | meaning |
|---|---|---|
| `verified` | 2,705 | the engine substituted the answer back into the problem and it held |
| `corrected` | 50 | the original answer was refuted and replaced by a re-verified recomputation |
| `refuted` | 68 | the engine found a concrete counterexample: the answer does not hold |
| `suspected` | 271 | the engine found a difference, but it is not settled whether the source or the transcription is at fault - **not** counted as an error in the source |
| `disputed` | 85 | a third read of the source disagreed with the bulk transcription |
| `unverifiable` | 4,228 | outside the reach of automatic checking |
| `no-gold` | 5,185 | the source carries no answer for this problem |

`verified` means the engine substituted the answer back into the problem and it held.
`corrected` means the original answer was refuted and replaced by a recomputed answer
that the engine then re-verified. `refuted` means the engine produced a **concrete
counterexample** - the root fails the equation, the tuple satisfies no equation of the
system, or the interval misses a point that satisfies the inequality. `suspected` means
the engine found a difference but it is not settled whether the source or the
transcription is at fault - a difference in a radical's scope can look the same, and a
page that has not been read again cannot decide it; these are **not** counted as errors
in the source. `disputed` means a third independent read of the source disagreed with the
bulk transcription. `unverifiable` means an answer exists but is outside the reach of
automatic checking - word problems, open-ended proofs, and answers that are neither a
number nor a set. `no-gold` means the source carries no answer for that problem.

Only `verified` and `corrected` 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 of every row that carries an answer 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. **Collection.** The problems were collected, translated into English and written
   out as structured JSON with LaTeX, twice, with the two passes arbitrated by SymPy.
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 source, and only corrections that the engine could confirm were written back.
4. **Exercises.** The machine-made exercises are produced by templates that compute
   the answer with SymPy and then re-check it; an item that fails the re-check is
   dropped. A second, independent verifier per topic re-derives every answer from
   the published statement without using the generator, and a negative test makes
   sure that a perturbed answer is rejected.

## What was left out, and what is still missing

An item is only published when it is an exercise with a statement that can be read
off the page. 358 printed items were left out because they are not
exercises at all - a figure and its caption, a section heading, a table of contents,
a page of exposition, or the answer key of a chapter, whose answers are published
with the exercise they belong to. 3 further items were left out
because their statement could not be recovered with certainty.

Four limitations are worth knowing about:

* a statement that runs over the foot of a page was recovered by reading the page
  again; where the missing words could not be read with certainty, the item was
  left out rather than published with a guessed question;
* a page of the source can print two exam variants side by side, and the two
  blocks use the same numbers. Where that happened, one of the two blocks was
  kept and the other left out, so around sixty printed exercises are not in this
  release;
* a printed exam variant carries the statements of all of its tasks in one place
  and their answers in one numbered key. Every such variant was split into its
  own tasks, so that each task carries its own answer. Where the key could not
  be read off the page with certainty, the tasks are published without an answer
  rather than with the answer of a neighbouring task;
* two collections contain a handful of items whose statement stands in two
  collections. They are kept in the same half of the split, so no problem of the
  test half was in the train half.

## Origin and rights

The English statements, the structured extraction, the answer verification and this
curation are ours. The statements themselves are third-party Russian-language
university entrance mathematics material published on postypashki.ru; rights in those
texts remain with their authors and publishers, so `license` is `other` and this
release is for research and evaluation use.

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.