| --- |
| license: other |
| license_name: arxiv-nonexclusive |
| license_link: https://arxiv.org/help/license |
| task_categories: |
| - text-generation |
| - feature-extraction |
| language: |
| - en |
| tags: |
| - mathematics |
| - arxiv |
| - latex |
| - scientific |
| pretty_name: Math Papers 10M |
| size_categories: |
| - 1K<n<10K |
| --- |
| |
| # Math Papers 10M |
|
|
| A curated dataset of recent mathematics papers from arXiv, prepared for |
| language-model training and research. Target: ~10M cl100k_base tokens of |
| clean body text across a balanced set of math subcategories. |
| |
| ## Summary |
| |
| - **Total papers:** 901 |
| - **Total body tokens (cl100k_base):** 33,121,411 |
| - **Source:** arXiv (https://arxiv.org), via the public metadata API and |
| content endpoints (`/html/`, `/e-print/`, `/pdf/`) |
| - **Generated:** 2026-04-12 |
| - **License:** Papers are redistributed under arXiv's non-exclusive license |
| to distribute. See https://arxiv.org/help/license. Cite the original |
| authors when using this data. |
| |
| ## Contents |
| |
| Each batch is a Parquet file under `data/`: |
| |
| ``` |
| data/batch-0001.parquet |
| data/batch-0002.parquet |
| ... |
| ``` |
| |
| Per-row schema: |
| |
| | field | type | description | |
| | --- | --- | --- | |
| | `arxiv_id` | string | Canonical arXiv identifier (e.g. `2401.12345`) | |
| | `title` | string | Paper title | |
| | `authors` | list[string] | Author names | |
| | `abstract` | string | Paper abstract | |
| | `primary_category` | string | arXiv primary subject (e.g. `math.AG`) | |
| | `categories` | list[string] | All arXiv subject tags | |
| | `published` | string | ISO-8601 submission timestamp | |
| | `updated` | string | ISO-8601 last-updated timestamp | |
| | `abs_url` | string | arXiv abstract URL | |
| | `pdf_url` | string | arXiv PDF URL | |
| | `body` | string | Cleaned body text (math preserved where possible) | |
| | `body_chars` | int | Character length of `body` | |
| | `body_tokens` | int | Token count via tiktoken `cl100k_base` | |
| | `extraction_method` | string | `html`, `pylatexenc`, or `pymupdf` | |
| | `has_tex` | bool | Whether original .tex source was retrieved | |
| | `has_pdf` | bool | Whether original PDF was retrieved | |
|
|
| Original artifacts (when available) are stored alongside the data: |
|
|
| ``` |
| sources/tex/<arxiv_id>.tar.gz # original .tex tarball from arXiv |
| sources/pdf/<arxiv_id>.pdf # original rendered PDF |
| ``` |
|
|
| ## Category Breakdown |
|
|
| | Primary category | Papers | % | |
| | --- | ---: | ---: | |
| | math.AG | 61 | 6.8% | |
| | math.CO | 51 | 5.7% | |
| | math.LO | 47 | 5.2% | |
| | math.NT | 46 | 5.1% | |
| | math.RT | 45 | 5.0% | |
| | math.GT | 42 | 4.7% | |
| | math.PR | 41 | 4.6% | |
| | math.NA | 41 | 4.6% | |
| | math.DG | 37 | 4.1% | |
| | math.OC | 36 | 4.0% | |
| | math.FA | 32 | 3.6% | |
| | math.CA | 31 | 3.4% | |
| | math.DS | 30 | 3.3% | |
| | math.AT | 30 | 3.3% | |
| | math.RA | 30 | 3.3% | |
| | math.CT | 27 | 3.0% | |
| | math-ph | 27 | 3.0% | |
| | math.QA | 25 | 2.8% | |
| | math.ST | 24 | 2.7% | |
| | math.SG | 23 | 2.6% | |
| | math.AP | 19 | 2.1% | |
| | math.GR | 14 | 1.6% | |
| | cs.LG | 13 | 1.4% | |
| | hep-th | 12 | 1.3% | |
| | stat.ML | 10 | 1.1% | |
| | quant-ph | 9 | 1.0% | |
| | eess.SY | 8 | 0.9% | |
| | math.OA | 7 | 0.8% | |
| | cs.LO | 6 | 0.7% | |
| | cond-mat.stat-mech | 6 | 0.7% | |
| | cs.IT | 6 | 0.7% | |
| | math.AC | 5 | 0.6% | |
| | cs.DS | 5 | 0.6% | |
| | math.KT | 5 | 0.6% | |
| | stat.ME | 4 | 0.4% | |
| | math.SP | 4 | 0.4% | |
| | cs.CC | 4 | 0.4% | |
| | gr-qc | 3 | 0.3% | |
| | math.CV | 3 | 0.3% | |
| | physics.ao-ph | 3 | 0.3% | |
| | cond-mat.soft | 2 | 0.2% | |
| | cs.AI | 2 | 0.2% | |
| | math.MG | 2 | 0.2% | |
| | math.HO | 2 | 0.2% | |
| | cs.CV | 2 | 0.2% | |
| | cs.RO | 2 | 0.2% | |
| | nlin.AO | 1 | 0.1% | |
| | astro-ph.IM | 1 | 0.1% | |
| | cs.DB | 1 | 0.1% | |
| | physics.atom-ph | 1 | 0.1% | |
| | stat.CO | 1 | 0.1% | |
| | physics.plasm-ph | 1 | 0.1% | |
| | physics.data-an | 1 | 0.1% | |
| | nlin.PS | 1 | 0.1% | |
| | cs.GT | 1 | 0.1% | |
| | q-fin.PM | 1 | 0.1% | |
| | astro-ph.CO | 1 | 0.1% | |
| | nucl-th | 1 | 0.1% | |
| | astro-ph.EP | 1 | 0.1% | |
| | cs.CG | 1 | 0.1% | |
| | cs.ET | 1 | 0.1% | |
| | physics.flu-dyn | 1 | 0.1% | |
| | cond-mat.other | 1 | 0.1% | |
|
|
| No single subcategory exceeds 40% of the total. |
|
|
| ## Methodology |
|
|
| 1. **Metadata.** Queried `export.arxiv.org/api/query` for each of ~20 math |
| subcategories (including `math-ph`), sorted by submission date descending, |
| pulling up to 150 papers per category. Recent papers are preferred. |
| 2. **Balanced sampling.** Papers are round-robin sampled across categories |
| with a 40% cap on any single category. |
| 3. **Content fetch.** For each sampled paper we try, in order: |
| - `arxiv.org/html/<id>` — native HTML5 render with math preserved |
| - `arxiv.org/e-print/<id>` — .tex source tarball |
| - `arxiv.org/pdf/<id>.pdf` — rendered PDF |
| 4. **Extraction cascade.** |
| - HTML path: BeautifulSoup + lxml, stripping nav, bibliography, author |
| metadata, figures, and page headers/footers. |
| - TeX path: `pylatexenc` with `math_mode="with-delimiters"` after cutting |
| off `\bibliography` / `thebibliography` sections. |
| - PDF path: `pymupdf`, skipping the title page and the last two pages |
| (references / appendices). |
| 5. **Quality gate.** Bodies must have at least 1000 characters and 300 |
| cl100k_base tokens. Papers failing the cascade at every level are logged |
| and excluded. |
| 6. **Tokenization.** All token counts use `tiktoken` with the |
| `cl100k_base` encoding (the encoding used by GPT-4 / GPT-3.5-turbo). |
| 7. **Rate limiting.** All arXiv requests respect a 3-second minimum delay |
| with exponential backoff on `429` / `503` responses. |
| |
| ## Known Limitations |
|
|
| - `pymupdf`-based extractions lose math structure — equations become flat |
| text. The `extraction_method` field lets you filter these out if desired. |
| - Figures, tables, and captions are dropped from the body text in all |
| extraction paths. |
| - Some older papers do not have HTML or TeX sources; these rely on the PDF |
| fallback. |
| - The dataset is a snapshot — arXiv IDs and categories can be updated later |
| by authors. Re-run the pipeline to refresh. |
|
|
| ## Intended Use |
|
|
| Research, pretraining, and fine-tuning of models that handle mathematical |
| text. Not a substitute for reading the original papers. |
|
|
| ## Citation |
|
|
| Please cite the original arXiv papers when using individual rows. If you |
| need to cite this specific extraction, use: |
|
|
| ``` |
| @dataset{math_papers_10m_20260412, |
| title = {Math Papers 10M}, |
| year = 2026, |
| url = {https://huggingface.co/datasets/slabhead/math-papers-10m} |
| } |
| ``` |
|
|