AvrovaDonz commited on
Commit
bb342ec
·
verified ·
1 Parent(s): 7944460

Record publication status, generator shortfall and measured limitations

Browse files
Files changed (1) hide show
  1. components/google-math/README.md +396 -0
components/google-math/README.md ADDED
@@ -0,0 +1,396 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Google math papers contribution to Cayley-Math
2
+
3
+ An independently versioned component holding source-derived text from eight Google and Google DeepMind
4
+ publications about mathematics, formal mathematics and mathematical reasoning. It follows Cayley-Math's
5
+ `components/` convention and reuses the record schema, Parquet encoding, split policy and packed-array
6
+ format of `components/openai-math/`. The frozen Phase 1 mirror is unchanged.
7
+
8
+ ## What this is, and what it is not
9
+
10
+ These are **artifacts of specific Google math papers** (Lean libraries, geometry problem files, generator
11
+ output, paper notebooks and proof PDFs), not a survey of Google's mathematics output and not a
12
+ paper-complete reproduction of any one of them. The corpus is a curated projection: a bounded, seeded
13
+ sample for the generator source, a verbatim text projection for the file sources.
14
+
15
+ Nothing here establishes mathematical truth. **No Lean project was compiled, no proof was checked, no
16
+ `lake build` or Comparator run was performed, and no mathematical verification of any kind took place.**
17
+ `record_type` labels the artifact kind, not the validity of its content. Records that contain `sorry`
18
+ placeholders remain placeholders.
19
+
20
+ The `mathematics-dataset` subset is output of the Saxton/Grefenstette/Hill/Kohli ICLR 2018 generator at
21
+ school-level difficulty. Those pairs are **not research mathematics**, and the subset is a sampled
22
+ projection of the paper's curriculum rather than the paper's dataset. Every record carries
23
+ `content_origin` so consumers can separate verbatim source text from `generator_output`.
24
+
25
+ ## Included sources
26
+
27
+ Each source is pinned to a commit or dataset revision, and each ships math text under Apache-2.0
28
+ software terms with CC-BY 4.0 for non-software materials where the upstream states so.
29
+
30
+ | Source | Upstream at pinned revision | Records | Groups | Text characters | Record types |
31
+ | --- | --- | ---: | ---: | ---: | --- |
32
+ | `alphaproof-nexus` | [alphaproof-nexus-results](https://github.com/google-deepmind/alphaproof-nexus-results) `0647711a7118` | 83 | 51 | 2,229,771 | formal_lean_proof, natural_language_proof |
33
+ | `formal-conjectures` | [formal-conjectures](https://github.com/google-deepmind/formal-conjectures) `6751c0f04398` | 2,135 | 2,135 | 8,133,507 | formal_lean_statement |
34
+ | `formal-imo` | [formal-imo](https://github.com/google-deepmind/formal-imo) `a85d84b97c8e` | 261 | 261 | 420,948 | formal_lean_statement |
35
+ | `formal-putnam-like` | [formal-putnam-like](https://github.com/google-deepmind/formal-putnam-like) `636c2d46b3a7` | 96 | 96 | 117,201 | formal_lean_statement |
36
+ | `cryptids` | [cryptids](https://github.com/google-deepmind/cryptids) `3647718b5df2` | 464 | 464 | 31,638,592 | formal_lean_proof |
37
+ | `mathematics-dataset` | [mathematics_dataset](https://github.com/google-deepmind/mathematics_dataset) `427f45075f84` | 477,276 | 127 | 35,710,731 | generated_qa_pair |
38
+ | `alphageometry` | [alphageometry](https://github.com/google-deepmind/alphageometry) `6777cb586cbb` | 267 | 267 | 70,907 | formal_geometry_problem, geometry_rule_table |
39
+ | `mathematics-conjectures` | [mathematics_conjectures](https://github.com/google-deepmind/mathematics_conjectures) `8302f2910101` | 2 | 2 | 43,231 | research_notebook |
40
+
41
+ `alphaproof-nexus` keeps all 83 records of the earlier standalone build unchanged in content: 71 Lean
42
+ proof files plus 12 pypdf-extracted prose proof PDFs over 51 problem groups. Only its split assignment
43
+ changed, because splits are recomputed over the merged group set of all eight sources rather than over
44
+ its own 51 groups. `formal-conjectures` is the 1,861-file `FormalConjectures/` statement library plus
45
+ its 274 helper-library files. `formal-imo` and `formal-putnam-like` are Lean 4 problem statements.
46
+ `cryptids` is the whole Lean library, including the Busy Beaver holdout proofs, whose individual files
47
+ reach 1.4 MB of mechanically generated state traces. `alphageometry` contributes 265 geometry problems
48
+ in the AlphaGeometry language: 231 JGEX problems, 30 olympiad problems and 4 library examples, plus the
49
+ `defs.txt` and `rules.txt` rule tables. The two `mathematics-conjectures` notebooks accompany the Nature
50
+ 2021 knot-theory and representation-theory paper.
51
+
52
+ ## Excluded candidates and why
53
+
54
+ The widened scan is recorded in full in `sources.json` (`excluded_candidates`) and `audit/source-scan.json`.
55
+ The short version:
56
+
57
+ - `google-deepmind/eval_hub` (putnam_like and live_math) is excluded because every problem carries a
58
+ `CANARY_ID` benchmark-contamination canary and live_math is an actively maintained benchmark whose
59
+ multimodal problems depend on images absent from this text corpus.
60
+ - `deepmind/aqua_rat` accompanies a program-synthesis paper, not a mathematics paper.
61
+ - `deepmind/math_dataset` is a 40 GB pre-generated mirror of the generator already used here.
62
+ - `google-research/math-opt-benchmark`, `google/mathsteps`, `google-deepmind/alphatensor` and every
63
+ math-named software library (`tree-math`, `mathfu`, `vector_math.dart`, `opengrm`) ship code and no
64
+ math text.
65
+ - `google-deepmind/cartesian-frames` formalises an alignment blog sequence in HOL4 SML, not a
66
+ mathematics paper.
67
+ - `google-deepmind/miniF2F` is a fork of a non-Google corpus.
68
+ - `google-deepmind/alphageometry2` embeds 26 problems in Python dict literals, and AG1 already ships
69
+ the same olympiad problems verbatim in the AlphaGeometry language.
70
+ - `google/feabench`, `google/phasecoder` and `google-research/pointdit` are physics, audio and vision
71
+ papers whose titles happen to contain mathematical words.
72
+
73
+ ## Files and schema
74
+
75
+ - `data/{train,dev,test}.jsonl.gz`: source records with required fields text, group, license; unique id,
76
+ paper_id, split, record_type, source_url, and `source_id` naming the upstream.
77
+ - `data/{train,dev,test}.parquet`: identical records. Core fields
78
+ (id,text,group,license,paper_id,split,record_type,source_url) are string columns; all remaining JSON
79
+ fields are serialised in `metadata_json`. Merge `json.loads(metadata_json)` with the core columns to
80
+ reconstruct each JSONL record.
81
+ - `sources.json`: every included source with its pinned revision, license and measured counts, plus every
82
+ excluded candidate with its reason.
83
+ - `licenses/<source_id>/LICENSE`: one upstream license per source; `LICENSE` at the component root is the
84
+ Apache-2.0 text shared by all eight.
85
+ - `audit/source-files.jsonl`: path, sha256, bytes, source_id, kind and pinned source_url for every blob and
86
+ for the generated corpus file.
87
+ - `audit/group-splits.json`: the group assignment, the policy, and per-source group counts.
88
+ - `audit/extraction.jsonl`: per-PDF and per-notebook extraction metrics and quality flags.
89
+ - `audit/mathematics-dataset-generation.json`: generator commit, seed, per-regime quotas, module list, and
90
+ measured yield.
91
+ - `audit/excluded-duplicates.jsonl`, `audit/packing.json`, `audit/source-scan.json`.
92
+ - `audit/validation-evidence.json`: the independent decode and round-trip evidence described below.
93
+ - `statistics.json`: measured records, groups, splits, characters and packed counts, per source.
94
+ - `manifest.json`: SHA256 and byte size for every delivered file except itself and validation.json.
95
+ - `packed/`: mmla-type2-packed-v1 arrays, manifest, row attribution and per-record token counts.
96
+ - `tools/`: the generator driver, the build script and the validation scripts actually run.
97
+
98
+ ## Loading
99
+
100
+ ~~~python
101
+ import gzip, json
102
+ from pathlib import Path
103
+ component = Path('components/google-math')
104
+ with gzip.open(component / 'data/train.jsonl.gz', 'rt', encoding='utf-8') as f:
105
+ first_record = json.loads(next(f))
106
+
107
+ import pyarrow.parquet as pq
108
+ row = pq.read_table(component / 'data/train.parquet').slice(0, 1).to_pylist()[0]
109
+ metadata = json.loads(row.pop('metadata_json'))
110
+ first_parquet_record = {**row, **metadata}
111
+ ~~~
112
+
113
+ ## Packed training arrays
114
+
115
+ `packed/manifest.json` uses `mmla-type2-packed-v1`: input_ids, labels and role_ids are int32 arrays of
116
+ shape [rows, 2048], pad=0, role=0, ignored labels=-100. Each record is encoded as
117
+ BOS + SentencePiece(text) + EOS with the included Cayley-Math tokenizer (32768 pieces); window stride is
118
+ 2048 with one-token lookahead, labels predict the following token, and targets that cross into a new
119
+ record's BOS or into padding are masked. Split-specific `rows.jsonl` maps every non-padding token back to
120
+ its record; `records.jsonl` stores token counts and hashes. This component does not reproduce Phase 1
121
+ quotas, packing or splits.
122
+
123
+ Measured packed counts: train 17691 rows /
124
+ 36230380 tokens /
125
+ 35751064 loss-bearing labels; dev
126
+ 51 / 102872 /
127
+ 101639; test
128
+ 91 / 185977 /
129
+ 185942.
130
+
131
+ ## Splits
132
+
133
+ Splits are assigned per group, never per record, so companions and families stay together: a Lean proof
134
+ and its prose proof, a conjecture file and its helper library, or one generated question family. Every
135
+ group key is namespaced by its `source_id`. Assignment sorts SHA256(group) as hex, reserves the first
136
+ ceil(1%) of groups for dev, the next ceil(1%) for test, and the rest for train.
137
+ `audit/group-splits.json` freezes every assignment: train
138
+ 479316 records over 3333 groups,
139
+ dev 1233 over 35,
140
+ test 35 over 35.
141
+
142
+ ## Text projection
143
+
144
+ Lean, geometry-problem and rule files are byte-identical to the pinned blob, license headers included.
145
+ Notebook records join the cell sources of each notebook with a newline; no cell text is altered.
146
+ `natural_language_proof` records come from pypdf page-text extraction and are **lossy**: math symbols
147
+ arrive as Unicode substitutions, ligature artifacts appear, and inline formulas lose their two-dimensional
148
+ layout. C0/C1 control characters were replaced and blank-line runs collapsed. Each PDF record carries
149
+ `extraction_quality = lossy_pdf_text_layer` with page and character counts, and `audit/extraction.jsonl`
150
+ holds the same per-file audit.
151
+
152
+ ## Verification evidence
153
+
154
+ `tools/validate_google_math.py` checks file hashes, source coverage, unique record IDs and unique text,
155
+ group split separation, lossless Parquet reconstruction, packed array shapes, causal shift, padding and
156
+ boundary masks, and re-encodes every record's token stream against `data/*.jsonl.gz`. It writes
157
+ `validation.json`; the last run passed all 13 checks
158
+ (`all_delivered_file_hashes_and_sizes`, `pinned_sources_metadata_and_excluded_candidates`,
159
+ `source_file_inventory_local_bytes`, `group_split_policy_recomputed_from_scratch`,
160
+ `lossless_jsonl_parquet_exact_text_uniqueness_and_record_provenance`, `group_split_separation`,
161
+ `verbatim_lean_source_equality_local_bytes`, `lean_and_generated_records_survive`,
162
+ `per_file_extraction_audit`, `dedup_audit_present`, `generator_audit_seed_and_quota`,
163
+ `all_packed_tokens_reencoded_source_shift_padding_masks_and_attribution`, `statistics_match_artifacts`).
164
+
165
+ `tools/verify_google_math.py` is the independent check against the delivered files, and its output is
166
+ [`audit/validation-evidence.json`](audit/validation-evidence.json). It decoded 96 packed rows spread over
167
+ every shard of all three splits, and for each row (a) confirmed every row slice equals the re-encoding of
168
+ the corresponding span of `[BOS] + SentencePiece(text) + [EOS]` for its attributed source record and
169
+ (b) confirmed the decoded text equals the decoded source text modulo whitespace. It recorded 8 literal
170
+ unified diffs of a decoded row against its source record; every diff had 0 lines, whitespace identical.
171
+ It round-tripped 3 Parquet rows (indices 0, 239,658 and 479,315) back to their JSONL records with exact
172
+ match, and confirmed a `formal_lean_proof`, a `formal_lean_statement`, a `generated_qa_pair`, a
173
+ `formal_geometry_problem`, a `natural_language_proof` and a `research_notebook` record all survive with
174
+ matching `text_sha256`. Split separation was recomputed from the data rather than trusted: 3,403 groups
175
+ in the audit and 3,403 in the data, no group spanning two splits, train/dev/test at 3,333/35/35 groups.
176
+
177
+ ## Publication
178
+
179
+ The component is published as Hugging Face dataset pull request
180
+ [MMLA-ORG/Cayley-Math discussion #3](https://huggingface.co/datasets/MMLA-ORG/Cayley-Math/discussions/3),
181
+ on ref `refs/pr/3`, commit `99f09edf1f380be5dd8074c621b551aea67ad5a0`. It has not been merged into `main`.
182
+
183
+ A token with `write` scope or org-admin rights is required to merge it. The token used for this build can
184
+ read the repository and create the pull request, but direct commits to `main` are rejected with
185
+ `403 Forbidden: You have read access but not the required permissions for this operation`. Merging, or re-running
186
+ `hf upload` without `--create-pr` once such a token is available, completes the submission.
187
+
188
+ ## Limitations
189
+
190
+ - No Lean compilation, proof checking, Comparator run or mathematical verification of any kind.
191
+ - The build ran in a sandbox-free subprocess only for the generator; `cryptids`, `formal-conjectures`,
192
+ `formal-imo`, `formal-putnam-like`, `alphageometry`, `alphaproof-nexus` and the notebooks were never
193
+ built or executed, only read as text.
194
+ - PDF prose proofs are noisy pypdf text; symbol and ligature fidelity is not guaranteed.
195
+ - The generator subset is a seeded sample of one curriculum, not the paper's full dataset, and its
196
+ questions are school-level rather than research mathematics. One module, `algebra__linear_1d`, stopped
197
+ at 3,055 of its 8,000 quota when upstream's own `assert entropy == 0` fired; nothing was repaired, and
198
+ the shortfall is recorded in `audit/mathematics-dataset-generation.json`.
199
+ - `formal-conjectures` upstream states that some content derives from third-party sources (Wikipedia,
200
+ MathOverflow and OEIS under CC-BY-SA 4.0). Per-file reference URLs are retained inside the Lean text; no
201
+ separate per-file license audit was performed.
202
+ - Near-duplicate detection, Phase 1 overlap analysis and editorial review were not performed. 1,629
203
+ exact duplicate texts were dropped and are listed in `audit/excluded-duplicates.jsonl`.
204
+ - The SentencePiece model normalises runs of spaces, so packed text decodes whitespace-normalised rather
205
+ than byte-identically to the sources.
206
+ - Only problems that upstream published are present, so several subsets are selection-biased. `cryptids`
207
+ contributes 31.6M of the 78.4M characters because a handful of Busy Beaver traces are enormous, so the
208
+ corpus is dominated by machine-generated proof script rather than mathematics prose.
209
+
210
+ ## Statistics
211
+
212
+ ~~~json
213
+ {
214
+ "component": "google-math",
215
+ "sources": 8,
216
+ "source_commits": {
217
+ "alphaproof-nexus": "0647711a71183c1ea492ad60860776617ce1ea88",
218
+ "formal-conjectures": "6751c0f043985ac6647db28a45a63afdf21acffe",
219
+ "formal-imo": "a85d84b97c8e88a352c136b1e29c355139609bea",
220
+ "formal-putnam-like": "636c2d46b3a7d7e77a9f58209b0c17816f8d172b",
221
+ "cryptids": "3647718b5df22e1a61462dec0376bd204526285a",
222
+ "mathematics-dataset": "427f45075f84b8b9774950196ad63867ca20ffb3",
223
+ "alphageometry": "6777cb586cbb46beed28db12dc72c69770b68337",
224
+ "mathematics-conjectures": "8302f29101019434e5a0a25807a4e42cd9d96414"
225
+ },
226
+ "records_before_deduplication": 482213,
227
+ "records": 480584,
228
+ "excluded_exact_duplicates": 1629,
229
+ "groups": 3403,
230
+ "record_types": {
231
+ "geometry_rule_table": 2,
232
+ "formal_geometry_problem": 265,
233
+ "formal_lean_proof": 535,
234
+ "natural_language_proof": 12,
235
+ "formal_lean_statement": 2492,
236
+ "research_notebook": 2,
237
+ "generated_qa_pair": 477276
238
+ },
239
+ "text_characters": 78364888,
240
+ "per_source": {
241
+ "alphaproof-nexus": {
242
+ "records": 83,
243
+ "groups": 51,
244
+ "record_types": {
245
+ "formal_lean_proof": 71,
246
+ "natural_language_proof": 12
247
+ },
248
+ "text_characters": 2229771,
249
+ "upstream_files": 83,
250
+ "split_records": {
251
+ "train": 83,
252
+ "dev": 0,
253
+ "test": 0
254
+ }
255
+ },
256
+ "formal-conjectures": {
257
+ "records": 2135,
258
+ "groups": 2135,
259
+ "record_types": {
260
+ "formal_lean_statement": 2135
261
+ },
262
+ "text_characters": 8133507,
263
+ "upstream_files": 2135,
264
+ "split_records": {
265
+ "train": 2088,
266
+ "dev": 23,
267
+ "test": 24
268
+ }
269
+ },
270
+ "formal-imo": {
271
+ "records": 261,
272
+ "groups": 261,
273
+ "record_types": {
274
+ "formal_lean_statement": 261
275
+ },
276
+ "text_characters": 420948,
277
+ "upstream_files": 261,
278
+ "split_records": {
279
+ "train": 252,
280
+ "dev": 6,
281
+ "test": 3
282
+ }
283
+ },
284
+ "formal-putnam-like": {
285
+ "records": 96,
286
+ "groups": 96,
287
+ "record_types": {
288
+ "formal_lean_statement": 96
289
+ },
290
+ "text_characters": 117201,
291
+ "upstream_files": 96,
292
+ "split_records": {
293
+ "train": 93,
294
+ "dev": 1,
295
+ "test": 2
296
+ }
297
+ },
298
+ "cryptids": {
299
+ "records": 464,
300
+ "groups": 464,
301
+ "record_types": {
302
+ "formal_lean_proof": 464
303
+ },
304
+ "text_characters": 31638592,
305
+ "upstream_files": 464,
306
+ "split_records": {
307
+ "train": 457,
308
+ "dev": 2,
309
+ "test": 5
310
+ }
311
+ },
312
+ "mathematics-dataset": {
313
+ "records": 477276,
314
+ "groups": 127,
315
+ "record_types": {
316
+ "generated_qa_pair": 477276
317
+ },
318
+ "text_characters": 35710731,
319
+ "upstream_files": 1,
320
+ "split_records": {
321
+ "train": 476076,
322
+ "dev": 1200,
323
+ "test": 0
324
+ }
325
+ },
326
+ "alphageometry": {
327
+ "records": 267,
328
+ "groups": 267,
329
+ "record_types": {
330
+ "geometry_rule_table": 2,
331
+ "formal_geometry_problem": 265
332
+ },
333
+ "text_characters": 70907,
334
+ "upstream_files": 5,
335
+ "split_records": {
336
+ "train": 265,
337
+ "dev": 1,
338
+ "test": 1
339
+ }
340
+ },
341
+ "mathematics-conjectures": {
342
+ "records": 2,
343
+ "groups": 2,
344
+ "record_types": {
345
+ "research_notebook": 2
346
+ },
347
+ "text_characters": 43231,
348
+ "upstream_files": 2,
349
+ "split_records": {
350
+ "train": 2,
351
+ "dev": 0,
352
+ "test": 0
353
+ }
354
+ }
355
+ },
356
+ "splits": {
357
+ "train": {
358
+ "records": 479316,
359
+ "groups": 3333,
360
+ "sources": 8,
361
+ "text_characters": 77705566
362
+ },
363
+ "dev": {
364
+ "records": 1233,
365
+ "groups": 35,
366
+ "sources": 6,
367
+ "text_characters": 233131
368
+ },
369
+ "test": {
370
+ "records": 35,
371
+ "groups": 35,
372
+ "sources": 5,
373
+ "text_characters": 426191
374
+ }
375
+ },
376
+ "packed": {
377
+ "train": {
378
+ "rows": 17691,
379
+ "tokens": 36230380,
380
+ "loss_bearing_labels": 35751064
381
+ },
382
+ "dev": {
383
+ "rows": 51,
384
+ "tokens": 102872,
385
+ "loss_bearing_labels": 101639
386
+ },
387
+ "test": {
388
+ "rows": 91,
389
+ "tokens": 185977,
390
+ "loss_bearing_labels": 185942
391
+ }
392
+ },
393
+ "mathematical_verification": "not_performed",
394
+ "lean_compilation": "not_performed"
395
+ }
396
+ ~~~