formalanon commited on
Commit
16a6590
·
verified ·
1 Parent(s): b6a1ce8

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +9 -192
README.md CHANGED
@@ -1,194 +1,11 @@
1
- # semantic_lean_errors
 
 
 
 
 
 
2
 
3
- `semantic_lean_errors` is a release bundle for semantic error auditing of NL → Lean 4 formalizations.
4
- It packages a 92-problem human-labeled benchmark together with the prompt, schema, and taxonomy used for the paper's 6-category semantic-audit experiments.
5
 
6
- ## Directory Overview
7
-
8
- This directory is meant to be self-contained for release.
9
- It includes:
10
-
11
- - `semantic_lean_errors.jsonl`
12
- - Canonical machine-facing dataset.
13
- - One record per line.
14
- - Recommended file for Hugging Face and downstream use.
15
- - `semantic_lean_errors.json`
16
- - Readable companion file.
17
- - Stores the same records as `semantic_lean_errors.jsonl`, but as a pretty-printed JSON array.
18
- - `ground_truth_schema.md`
19
- - Schema for the exported records in this release bundle.
20
- - `error_tags.md`
21
- - Taxonomy definitions, boundary rules, and detail-tag guidance.
22
- - `eval_prompts_v4_fewshot.md`
23
- - Few-shot prompt set used for the category-specific semantic-audit evaluation.
24
- - `README.md`
25
- - Dataset card and release notes.
26
-
27
- ## Dataset Composition
28
-
29
- The benchmark combines four source datasets:
30
-
31
- - FormalMath: `22`
32
- - ProofNet: `13`
33
- - ProverBench: `23`
34
- - CombiBench: `34`
35
-
36
- Total:
37
-
38
- - `92` labeled problems
39
- - `87` error examples
40
- - `5` clean examples
41
-
42
- Primary-category counts:
43
-
44
- - `problem_statement_error`: `5`
45
- - `specification_error`: `24`
46
- - `formalization_error`: `8`
47
- - `domain_mismatch`: `14`
48
- - `definition_mismatch`: `26`
49
- - `quantifier_indexing_mismatch`: `10`
50
- - clean examples (`error_primary = null`): `5`
51
-
52
- Additional label structure:
53
-
54
- - rows with non-empty `error_secondary`: `33`
55
- - rows with non-empty `error_tags`: `87`
56
-
57
- ## Record Schema
58
-
59
- Each row is a single NL/Lean pair with human labels.
60
- The exported per-record fields are:
61
-
62
- - `id`
63
- - `source`
64
- - `problem_nl`
65
- - `lean_code`
66
- - `expected_verdict`
67
- - `error_primary`
68
- - `error_secondary`
69
- - `error_tags`
70
- - `meta_tags`
71
- - `gold_explanation`
72
-
73
- Field meanings are documented in `ground_truth_schema.md`.
74
-
75
- Two label views are represented:
76
-
77
- 1. Binary semantic-error detection
78
- - Use `expected_verdict`.
79
- - `YES` means the row contains some semantic error.
80
- - `NO` means the row is a clean example.
81
-
82
- 2. Six-category semantic audit
83
- - Use `error_primary`.
84
- - In the current evaluation setup, a queried category expects `YES` iff `error_primary` equals that category, and `NO` otherwise.
85
-
86
- ## Prompt Overview
87
-
88
- The included prompt file `eval_prompts_v4_fewshot.md` defines a 6-category evaluation setup.
89
- For each NL/Lean pair, the model is queried once per category:
90
-
91
- - `problem_statement_error`
92
- - `specification_error`
93
- - `formalization_error`
94
- - `domain_mismatch`
95
- - `definition_mismatch`
96
- - `quantifier_indexing_mismatch`
97
-
98
- Each prompt asks the model to judge one specific category and return structured JSON with:
99
-
100
- - `Verdict`
101
- - `Explanation`
102
- - `DetailTags`
103
- - `NeedsReview`
104
-
105
- Because the prompt is category-specific, the 92 labeled problems expand to `552 = 92 × 6` category-level classifications in the paper's evaluation setup.
106
-
107
- ## Experimental Reproducibility
108
-
109
- This release includes the exact benchmark and prompt family used for the paper's semantic-audit experiments.
110
-
111
- Evaluation setup:
112
-
113
- - benchmark: `92` labeled problems
114
- - categories: `6`
115
- - total category-level judgments: `552`
116
- - prompt file: `eval_prompts_v4_fewshot.md`
117
-
118
- The paper reports results for at least these model configurations on this benchmark:
119
-
120
- - Sonnet 4.5 + Thinking
121
- - GPT-5.2 + Thinking
122
-
123
- ### Paper-Reported Aggregate Results
124
-
125
- These are the paper-reported numbers for the 92-problem semantic audit and should be treated as the canonical release numbers for this version of the benchmark.
126
-
127
- | Model | Prec. | Rec. | F1 | Acc. | Cost |
128
- |-------|------:|-----:|---:|-----:|-----:|
129
- | Sonnet 4.5 + Thinking | 0.30 | 0.82 | 0.42 | 68.1% | $13.71 |
130
- | GPT-5.2 + Thinking | 0.24 | 0.91 | 0.37 | 54.6% | $6.86 |
131
-
132
- ### Paper-Reported Per-Type F1
133
-
134
- | Error Type | Sonnet 4.5 | GPT-5.2 |
135
- |-----------|-----------:|--------:|
136
- | Problem Statement Error | 0.29 | 0.10 |
137
- | Specification Error | 0.51 | 0.48 |
138
- | Formalization Error | 0.18 | 0.15 |
139
- | Domain Mismatch | 0.33 | 0.27 |
140
- | Definition Mismatch | 0.57 | 0.54 |
141
- | Quantifier/Indexing | 0.39 | 0.33 |
142
-
143
- Interpretation:
144
-
145
- - both models have relatively high recall and lower precision
146
- - both models perform best on `specification_error` and `definition_mismatch`
147
- - both models struggle most on `formalization_error`
148
-
149
- Note on reproducibility:
150
-
151
- - this directory contains the benchmark, prompt, schema, and taxonomy
152
- - if the exact evaluation pipeline is rerun later, small differences can arise from model/provider/version changes
153
- - the table above reflects the paper-reported results for this release
154
-
155
- ## Normalization Policy
156
-
157
- This release intentionally uses a single canonical code field:
158
-
159
- - `lean_code` is the only exported statement field
160
- - ProofNet rows are normalized from `original_lean_code` to `lean_code`
161
- - `fixed_lean_code` and `lean_code_fixed` are omitted from this canonical release
162
- - list-valued annotation fields are normalized to lists
163
-
164
- This avoids ambiguous rows that contain two different Lean statements under one set of labels.
165
- If repaired variants are needed for comparison studies, they should live in a separate paired comparison artifact.
166
-
167
- ## Taxonomy
168
-
169
- The category taxonomy and detail-tag definitions are included in `error_tags.md`.
170
- That file defines:
171
-
172
- - the six primary semantic-error categories
173
- - boundary rules between overlapping categories
174
- - the allowed detail-tag families
175
- - optional meta-tag conventions
176
-
177
- ## Release Cleanup Applied
178
-
179
- Before export, four internally inconsistent rows were corrected from `expected_verdict = YES` to `expected_verdict = NO` because they were clean examples with `error_primary = null` and explanations indicating no semantic error:
180
-
181
- - `formalmath_olymid-ref-base_5274`
182
- - `proofnet_rudin_exercise_2_28`
183
- - `proofnet_rudin_exercise_3_21`
184
- - `proofnet_axler_exercise_6_16`
185
-
186
- After this cleanup, the release contains `87` error rows and `5` clean rows.
187
-
188
- ## Recommended Use
189
-
190
- For release and archival use:
191
-
192
- - treat `semantic_lean_errors.jsonl` as the canonical dataset file
193
- - keep `README.md`, `ground_truth_schema.md`, `error_tags.md`, and `eval_prompts_v4_fewshot.md` alongside it
194
- - treat `semantic_lean_errors.json` as a readable companion artifact rather than the canonical training/eval file
 
1
+ ---
2
+ configs:
3
+ - config_name: default
4
+ data_files:
5
+ - split: train
6
+ path: semantic_lean_errors.jsonl
7
+ ---
8
 
9
+ # Semantic Lean Errors
 
10
 
11
+ 92 expert-annotated examples of semantic errors in autoformalized Lean 4 mathematics.