QuangTranVA commited on
Commit
51d5d61
·
verified ·
1 Parent(s): 903b207

Shorten dataset card

Browse files
Files changed (2) hide show
  1. DATASHEET.md +1 -1
  2. README.md +33 -135
DATASHEET.md CHANGED
@@ -74,7 +74,7 @@ Structured after Gebru et al., *Datasheets for Datasets* (2021). Counts refer to
74
 
75
  ## Distribution
76
 
77
- * **Hosting.** Hugging Face dataset repository with gated access (requests approved by the authors); code on GitHub.
78
  * **Licence.** Apache-2.0 (`LICENSE`). Figures are cited per work.
79
  * **Source media.** All figure images and page text are included; the project owner states that permission to
80
  redistribute the corpus has been granted. Each work's rights basis and source are recorded in `works`.
 
74
 
75
  ## Distribution
76
 
77
+ * **Hosting.** Hugging Face; access on request until the paper is published, then open. Code on GitHub.
78
  * **Licence.** Apache-2.0 (`LICENSE`). Figures are cited per work.
79
  * **Source media.** All figure images and page text are included; the project owner states that permission to
80
  redistribute the corpus has been granted. Each work's rights basis and source are recorded in `works`.
README.md CHANGED
@@ -121,163 +121,61 @@ configs:
121
 
122
  # HistGramBench
123
 
124
- HistGramBench measures how well a vision-language model can redraw a printed historical mathematical diagram as a
125
- TikZ program. Each figure has an answer key of typed facts (points, lines, circles, which points lie on which lines,
126
- which lines are parallel, which printed label names which object, and so on). A model's TikZ answer is compiled in a
127
- sandbox, its drawing is read back as vector geometry, and each key fact is checked on that geometry or, when the
128
- geometry cannot bind the fact's objects, by a panel of judge models. The score of a figure is the share of its
129
- checkable key facts that the drawing recovers.
130
 
131
- This repository holds the data of the release described in *HistGramBench: Measuring Structural Recovery When
132
- Multimodal Models Redraw Historical Mathematical Diagrams as TikZ* (manuscript). The evaluation code, the frozen
133
- protocol, the item-level scores and the analysis scripts for every table and figure are in the companion GitHub
134
- repository (see [Related repository](#related-repository)).
135
 
136
- > **Release status.** HistGramBench v2 (benchmark data version `histmathbench-1.0.0`,
137
- > release hash `sha256:a1bfbd4f1938236aa657dc10fc4e3f51f168b4324197d59d128087021e20283e`). Gated access:
138
- > request access on this page; the authors approve requests. Every figure is included with its image and page text and is cited to its source work (see
139
- > [Rights](#rights-and-licensing)).
140
 
141
  ## At a glance
142
 
143
  | | |
144
  |---|---|
145
- | Scored test figures | 2,507 from 95 works in 87 source groups, printed 1551–1933 |
146
- | Development figures | 150 from 5 works (used to fix every threshold before the test run) |
147
- | Unscored pools | 493 carded test figures and 19 carded development figures that failed an answer-key gate |
148
- | Answer-key facts on scored figures | 114,403 (mean 45.6 per figure) |
149
- | Contestant answers | 30,084 = 2,507 figures × 2 tracks × 6 models, every outcome kept |
150
- | Tracks | A: image only; B: image plus up to 1,200 characters of page text |
151
- | Contestant models | Gemma 4 26B A4B, Llama 4 Maverick 17B, Ministral 3 14B, Gemma 4 E2B, Claude Haiku 4.5, Nemotron Nano 12B v2 VL |
152
- | Answer-key writers | GPT-6.1 Sol (OpenAI) and Kimi K2.5 (Moonshot); development keys by GPT-6 Sol and Kimi K2.5 |
153
- | Judges | Qwen3 VL 235B, Gemma 4 31B, Mistral Large 3 |
154
-
155
- ## What is scored and what is auxiliary
156
-
157
- * **Scored set:** the `test` split of `items` (2,507 figures). Every number in the paper is computed on it.
158
- * **Development set:** the `development` split (150 figures, 5 works, all in their own source groups). It fixed the
159
- scoring levels, tolerances and planning values before the test run. Its 396 run records come from pre-freeze
160
- probes (12 figures per track for every model except Claude Haiku 4.5, and all 150 figures on Track A for Llama 4
161
- Maverick and Ministral 3 14B); they are not test results.
162
- * **Unscored pools:** `test_unscored` (493 figures) and `development_unscored` (19 figures) were carded but failed an
163
- answer-key gate (too few facts, ambiguous entities, writer contradictions). They are evidence for the exclusions,
164
- not test or development items.
165
- * **Exclusion evidence:** every candidate region and page of the source works with its gate outcomes
166
- (`exclusion_evidence_*`), from which the paper's exclusion table (Table S1) is computed.
167
 
168
  ## Loading
169
 
170
  ```python
171
  from datasets import load_dataset
172
 
173
- items = load_dataset("VietAlphaLabs/HistGramBench", "items", split="test") # after your access request is approved: `hf auth login`
174
  keys = load_dataset("VietAlphaLabs/HistGramBench", "answer_key_facts", split="test")
175
- scores = load_dataset("VietAlphaLabs/HistGramBench", "scores", split="test")
176
 
177
  row = items[0]
178
- row["image"] # PIL image of the model input
179
- key = keys.filter(lambda f: f["item_id"] == row["item_id"] and f["in_key"])
180
  ```
181
 
182
- Gated access uses your normal Hub
183
- login (`hf auth login`); no token belongs in code. A local copy works the same way:
184
- `load_dataset("/path/to/HistGramBench", "items")`. To run the evaluation code on the released records, rebuild the
185
- run's directory layout with `scripts/materialize_root.py` from the GitHub repository.
186
-
187
- ## Configurations and joins
188
-
189
- All tables are Parquet. `item_id` joins every table; `(model_dir, track, item_id)` identifies a contestant cell;
190
- `(item_id, fact_id)` identifies a key fact; `book_id` of items joins `works`; `split_group` joins `split_groups`.
191
- `works` lists the 104 works with carded figures; the exclusion evidence covers every candidate work, so its
192
- `book_id` joins `metadata/rights_manifest.yaml` (411 records, including works never carded and later works that
193
- contribute no item to this release). Native
194
- records are kept verbatim as JSON text columns (`*_json`) with the sha256 of the original file, so nothing is lost by
195
- the flat columns. Full column definitions: [SCHEMA.md](SCHEMA.md).
196
-
197
- | Config | Rows | Content |
198
- |---|---|---|
199
- | `items` | 2,507 / 150 / 493 / 19 | figure metadata, model-input image (`image`), original crop, page text, rights basis, native item record |
200
- | `answer_key_facts` | 169,105 test | every fact of the combined writer lists; `in_key` marks the 114,403 retained facts; writer votes |
201
- | `answer_key_entities` | 54,387 test | key objects with type, label, anchor box and the writers' own entity ids |
202
- | `answer_key_records` | 2,507 / 150 / 493 / 19 | native answer key, its construction manifest (writers, prompts, calls) and gate record |
203
- | `answers` | 30,084 test | raw model output, normalised TikZ, outcome code, harness version, submission/compile records |
204
- | `verdicts` | 18,960 test | per-fact verdict file (PRESENT / ABSENT / CONTRADICTED / EXEMPT, source, judge votes) and alignment |
205
- | `cgx` | 18,960 test | vector geometry read from each valid compiled drawing |
206
- | `compiled_pdfs` | 18,960 test | compiled PDF of each valid drawing |
207
- | `scores` | 30,084 test | item score S, outcome, per-class counts (mirror of the GitHub canonical copy) |
208
- | `works` | 104 | source catalogue: repository, URL, file checksum, year, recorded rights determination and evidence |
209
- | `split_groups` | 188 | source groups, their side of the split and their works |
210
- | `exclusion_evidence_*` | 19,481 / 14,540 / 5,442 | candidate regions, pages and pre-card item records with gate outcomes |
211
-
212
- Page references: `scan_page_index` is the 0-based index of the page in the digitised file, not a printed page
213
- number; `printed_page_label` is empty throughout (printed page numbers were not recorded). `crop_bbox` is in the
214
- frame named by `crop_frame` (for page-scan crops the layout model's pre-processed page, `crop_frame_wh` pixels; see
215
- the modifications in `crop_modifications`). `image` is the canonical crop sent to every model and writer;
216
- `original_crop` is the crop as extracted.
217
 
218
- ## Construction
219
 
220
- 1. **Sources.** Works from Wikimedia Commons, the Internet Archive, the Göttingen Digitization Center (GDZ), Numdam
221
- and Project Gutenberg, plus two cleaned scans held by the authors. Each work has a rights record (`works`).
222
- 2. **Figure extraction.** PaddleOCR-VL 1.6 proposed figure regions on page scans; repository plate images were taken
223
- as they are. Image gates removed regions that are too small, photographic or mostly text and split multi-panel
224
- regions; a model screener (GPT-6 Luna) admitted only legible figures that TikZ can express. Every removal has a
225
- reason code (`exclusion_evidence_*`).
226
- 3. **Deduplication and split.** Near-identical crops (64-bit perceptual hash within Hamming distance 6) were
227
- clustered. Works are linked into source groups when they are the same work, share author and title, or share a
228
- near-duplicate crop (`metadata/split_groups.yaml`, `hard_edges`); a whole group lies on one side of the
229
- development/test split (seed 0, recorded in the file). Same-author and same-publisher links that are not work
230
- identity are recorded as soft edges and may cross the split.
231
- 4. **Answer keys (no human annotation).** Two writer models from different providers each listed entities and facts;
232
- the lists were matched, and each writer voted true, false or abstain on every fact of the combined list. A fact
233
- enters the key only when both writers support it, it is consistent, its objects were identified without doubt
234
- and, where required, it binds uniquely (`in_key`). A key is scored only with ≥3 entity facts, ≥3 relation facts,
235
- ≤10% contradictory facts and ≤20% ambiguous objects.
236
- 5. **Contestant runs.** Each model answered every figure once per track at temperature 0 with an 8,192-token limit.
237
- Answers were extracted, normalised, policy-checked and compiled once with LuaLaTeX in a network-less sandbox;
238
- only outcome `OK` yields a drawing. Every other outcome (truncation, no TikZ, policy rejection, compile error,
239
- timeout, resource or output faults) is kept and scores 0.
240
- 6. **Verification.** The compiled PDF is read back as geometry (`cgx`), the key is aligned to the drawing, and each
241
- fact is decided on the geometry when its objects bind, otherwise by the judge panel from families other than the
242
- writers' and the contestant's (`verdicts`).
243
-
244
- ## Rights and licensing
245
-
246
- The dataset is released under the Apache License, Version 2.0 ([LICENSE](LICENSE)); the code in the GitHub
247
- repository is under the same licence. The figure images and page text reproduce the source works, redistributed with
248
- the permission the project owner states has been granted for the corpus. The contestant answers and judge verdicts
249
- were generated through Amazon Bedrock; each answer records the provider terms in force (`provider_terms_version`).
250
-
251
- Every item and work records its rights basis (`rights_basis`, `rights_basis_note`): `us_public_domain_by_date` for
252
- 90 of the 95 scored works (and the 5 development works), published in or before 1930 and taken from public repositories, `owner_determination` for the three works published 1931–1933 (the
253
- *Shuxue cidian* 1933, Klein's *Vorlesungen über die hypergeometrische Funktion* 1933, Schoenflies and Dehn's
254
- *Einführung in die analytische Geometrie der Ebene und des Raumes* 1931), and `author_held_scan` for Halsted's
255
- *The Elements of Geometry* (1885) and Smith's *Introductory Modern Geometry of Point, Ray, and Circle* (1902), whose
256
- cleaned scans are held by the authors.
257
-
258
- **Citing a figure.** Each figure's source is given by `works.title`, `works.author`, `works.publication_year`,
259
- `works.repository` and `works.source_url` (joined on `book_id`), with `scan_page_index` and `crop_bbox` locating it.
260
- When you reproduce a figure, credit the original work and the repository that holds the scan (Wikimedia Commons,
261
- the Internet Archive, the Göttingen Digitization Center (GDZ), Numdam, Project Gutenberg, or the authors for the two
262
- archival scans).
263
-
264
- ## Limitations
265
 
266
- * Keys and verdicts are model-generated and were not audited by humans (see above).
267
- * The six contestants are low-cost models; one answer per figure and condition, so run-to-run variation is not
268
- measured.
269
- * Figure type (`figure_type`) is a screener model's prediction; language and genre (`*_title_heuristic`) are
270
- inferred from the work title by the paper's analysis script (the rights record mostly says `und`).
271
- * Source groups are unequal (the largest has 669 scored figures; 53 Numdam groups hold 119 figures but most of the
272
- group-weighted headline weight).
273
- * Crops of page scans come from a layout model run with dewarping, so crop boxes are in its pre-processed frame.
274
- * Full page scans are not included; source URLs and file checksums identify them.
275
 
276
- ## Intended use
277
 
278
- Evaluating how models turn historical mathematical figures into structured, checkable drawings; studying compilation
279
- validity, relation recovery and label attachment; reproducing the paper. Not intended for training models that are
280
- then evaluated on this benchmark, and not a source of human-verified ground truth.
281
 
282
  ## Citation
283
 
@@ -286,6 +184,6 @@ then evaluated on this benchmark, and not a source of human-verified ground trut
286
  title = {{HistGramBench}: Measuring Structural Recovery When Multimodal Models Redraw Historical Mathematical Diagrams as {TikZ}},
287
  author = {Tran, Minh Quang and He, Carter and Bloch, Cameron and Huang, Zitai and Vo, Thien Truong and Tran, Trong Nguyen and Chen, Isaac},
288
  year = {2026},
289
- note = {Manuscript. Code and data: HistGramBench v2 (benchmark data histmathbench-1.0.0)}
290
  }
291
  ```
 
121
 
122
  # HistGramBench
123
 
124
+ HistGramBench measures how well vision-language models redraw printed historical mathematical diagrams as TikZ.
125
+ Each figure comes with an answer key of typed facts: points, lines, circles, incidences, parallels, labels. A model's
126
+ TikZ is compiled in a sandbox, its drawing is read back as vector geometry, and each key fact is checked on that
127
+ geometry or, where geometry cannot decide, by judge models. A figure's score is the share of its key facts the
128
+ drawing recovers.
 
129
 
130
+ Code, protocol and reproduction instructions: [github.com/VietAlpha/histgrambench](https://github.com/VietAlpha/histgrambench).
 
 
 
131
 
132
+ **Access.** Access is granted on request until the accompanying paper is published; the dataset will then be open.
 
 
 
133
 
134
  ## At a glance
135
 
136
  | | |
137
  |---|---|
138
+ | Scored figures | 2,507 from 95 works, printed 1551–1933 |
139
+ | Development figures | 150 from 5 works |
140
+ | Answer-key facts | 114,403 on the scored figures |
141
+ | Contestant answers | 30,084 (6 models × 2 tracks × 2,507 figures) |
142
+ | Tracks | A: image only; B: image plus page text |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
144
  ## Loading
145
 
146
  ```python
147
  from datasets import load_dataset
148
 
149
+ items = load_dataset("VietAlphaLabs/HistGramBench", "items", split="test")
150
  keys = load_dataset("VietAlphaLabs/HistGramBench", "answer_key_facts", split="test")
 
151
 
152
  row = items[0]
153
+ row["image"] # the figure given to the model
154
+ facts = keys.filter(lambda f: f["item_id"] == row["item_id"] and f["in_key"])
155
  ```
156
 
157
+ Log in with `hf auth login` once your access request is approved.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
+ ## Contents
160
 
161
+ | Config | Content |
162
+ |---|---|
163
+ | `items` | figures with image, page text and metadata |
164
+ | `answer_key_facts`, `answer_key_entities`, `answer_key_records` | answer keys and how they were built |
165
+ | `answers` | contestant outputs with outcome codes |
166
+ | `compiled_pdfs`, `cgx` | compiled drawings and the geometry read from them |
167
+ | `verdicts`, `scores` | per-fact verdicts and per-figure scores |
168
+ | `works`, `split_groups` | source works and the source groups behind the split |
169
+ | `exclusion_evidence_*` | candidate regions and pages with the reason each was excluded |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
 
171
+ Splits: `test` is the scored set; `development` was used to fix thresholds before the test run. `item_id` joins all
172
+ tables. Column definitions are in [SCHEMA.md](SCHEMA.md).
 
 
 
 
 
 
 
173
 
174
+ ## Licence and citing figures
175
 
176
+ Apache-2.0 ([LICENSE](LICENSE)). Most figures come from works held by Wikimedia Commons, the Internet Archive, the
177
+ Göttingen Digitization Center, Numdam and Project Gutenberg. When you reproduce a figure, credit its source work
178
+ and repository as listed in `works`.
179
 
180
  ## Citation
181
 
 
184
  title = {{HistGramBench}: Measuring Structural Recovery When Multimodal Models Redraw Historical Mathematical Diagrams as {TikZ}},
185
  author = {Tran, Minh Quang and He, Carter and Bloch, Cameron and Huang, Zitai and Vo, Thien Truong and Tran, Trong Nguyen and Chen, Isaac},
186
  year = {2026},
187
+ note = {Manuscript}
188
  }
189
  ```