File size: 5,774 Bytes
f2fa26f d9f78d0 f2fa26f d9f78d0 | 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 | ---
dataset_info:
features:
- name: question
dtype: string
- name: answer
dtype: string
- name: category
dtype: string
- name: module
dtype: string
splits:
- name: ru
num_bytes: 2068198005
num_examples: 12699944
- name: en
num_bytes: 13818553700
num_examples: 112709888
download_size: 4606972272
dataset_size: 15886751705
configs:
- config_name: default
data_files:
- split: ru
path: data/ru-*
- split: en
path: data/en-*
license: apache-2.0
language:
- en
- ru
task_categories:
- text-generation
- question-answering
tags:
- mathematics
- synthetic
- reasoning
---
# Mathematical Reasoning Dataset (English & Russian)
## Dataset Description
- **Repository:** <https://github.com/google-deepmind/mathematics_dataset>
- **Paper:** [Analysing Mathematical Reasoning Abilities of Neural Models](https://identifiers.org/arxiv:1904.01557)
A bilingual collection of synthetic school-level mathematics questions and answers, based on the DeepMind [mathematics_dataset](https://github.com/google-deepmind/mathematics_dataset) generator.
This dataset contains two language splits:
- `en` — the **original English data**, taken as-is from the official `mathematics_dataset-v1.0` release published by Google DeepMind ([github.com/google-deepmind/mathematics_dataset](https://github.com/google-deepmind/mathematics_dataset)).
- `ru` — a **Russian version generated from scratch** with a translated fork of the generator. It is **not a translation** of the English rows: all question templates were rewritten in Russian (with corrected grammar and noun/adjective declension), and the problems were sampled independently by the generator. Row-level pairing with the English data is not guaranteed.
Each split is a single table with a `category` column (difficulty / evaluation split) and a `module` column (mathematical topic).
## Dataset structure
```python
from datasets import load_dataset
ds = load_dataset("your-username/math-dataset-bilingual")
# ds["en"] and ds["ru"] are Dataset objects with the same columns:
# question : str — the math problem
# answer : str — the expected answer
# category : str — train-easy | train-medium | train-hard | interpolate | extrapolate
# module : str — e.g. algebra__linear_1d, arithmetic__add_or_sub, measurement__conversion
# language : str — en | ru
```
### Row counts
| Split | Rows |
|-------|------|
| `en` | 112,709,888 |
| `ru` | 12,699,944 |
The English split is the full official release (~2M generated examples per train module); the Russian split was generated with `--per_train_module=1000000 --per_test_module=1000000 --seed=42`, hence roughly 10× smaller.
### Example row (English)
```json
{
"question": "Let 2*a**5 + 15648*a**4 - 5632498*a**3 + 172753368*a**2 + 189729080*a - 356865600 = 0. Calculate a.",
"answer": "-8170, -2, 1, 35, 312",
"category": "extrapolate",
"module": "algebra__polynomial_roots_big",
"language": "en"
}
```
### Example row (Russian)
```json
{
"question": "Пусть 2*a**5 + 15648*a**4 - 5632498*a**3 + 172753368*a**2 + 189729080*a - 356865600 = 0. Чему равно a?",
"answer": "-8170, -2, 1, 35, 312",
"category": "extrapolate",
"module": "algebra__polynomial_roots_big",
"language": "ru"
}
```
## Splits and categories
| Category | Content |
|----------|---------|
| `train-easy` | Easier training examples |
| `train-medium` | Medium-difficulty training examples |
| `train-hard` | Harder training examples |
| `interpolate` | In-distribution test examples |
| `extrapolate` | Out-of-distribution / extrapolation test examples |
The dataset covers 70 task modules: algebra, arithmetic, calculus, comparison, conversion, divisibility, gcd/lcm, geometry, measurement, numbers, polynomials, probability.
You can filter by category or module directly with the `datasets` library:
```python
# Russian training examples only
ru_train = ds["ru"].filter(lambda row: row["category"].startswith("train"))
# English algebra only
en_algebra = ds["en"].filter(lambda row: row["module"].startswith("algebra__"))
# A specific module across both languages
from datasets import concatenate_datasets
measurement = concatenate_datasets([
ds["ru"].filter(lambda row: row["module"] == "measurement__conversion"),
ds["en"].filter(lambda row: row["module"] == "measurement__conversion"),
])
```
## How the dataset was built
1. **English data** — extracted unmodified from the official release archive `mathematics_dataset-v1.0.tar.gz` distributed with the [google-deepmind/mathematics_dataset](https://github.com/google-deepmind/mathematics_dataset) repository.
2. **Russian data** — generated from scratch with a fork of the same repository in which every question template, unit name and textual fragment was rewritten in Russian (including grammatically correct declensions, e.g. in unit conversions). The generator was then run with `--per_train_module=1000000 --per_test_module=1000000 --seed=42` to sample an entirely new Russian dataset. No machine translation of the English rows was used.
3. **Conversion** — raw text files (alternating question/answer lines, one file per `{category}/{module}`) were parsed, paired, and annotated with `category`, `module` and `language` columns.
## Citation
If you use this dataset, please cite the original paper:
```bibtex
@inproceedings{saxton2019analysing,
title={Analysing Mathematical Reasoning Abilities of Neural Models},
author={Saxton, David and Grefenstette, Edward and Hill, Felix and Kohli, Pushmeet},
booktitle={International Conference on Learning Representations},
year={2019}
}
```
## License
Apache License 2.0 (same as the original DeepMind repository).
|