Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,33 +12,64 @@ tags:
|
|
| 12 |
size_categories:
|
| 13 |
- 10K<n<100K
|
| 14 |
dataset_summary: >
|
| 15 |
-
A graph-based dataset of
|
| 16 |
-
|
| 17 |
-
|
| 18 |
---
|
| 19 |
|
| 20 |
-
|
| 21 |
# Metamath Proof Graphs (10k)
|
| 22 |
|
| 23 |
-
This repository
|
|
|
|
| 24 |
|
| 25 |
## Contents
|
| 26 |
|
| 27 |
- **`data.pt`**
|
| 28 |
-
A preprocessed
|
| 29 |
-
- `data` — collated
|
| 30 |
-
- `slices` —
|
| 31 |
- `train_idx`, `val_idx`, `test_idx` — fixed graph-level splits
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
-
|
| 36 |
-
-
|
| 37 |
-
-
|
| 38 |
-
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
## Basic Usage
|
| 44 |
|
|
|
|
| 12 |
size_categories:
|
| 13 |
- 10K<n<100K
|
| 14 |
dataset_summary: >
|
| 15 |
+
A graph-based dataset of 10,000 Metamath theorems and their 10,000
|
| 16 |
+
corresponding proof DAGs, including CodeBERT node embeddings,
|
| 17 |
+
conclusion masking, rare-label collapsing, and fixed train/val/test splits.
|
| 18 |
---
|
| 19 |
|
|
|
|
| 20 |
# Metamath Proof Graphs (10k)
|
| 21 |
|
| 22 |
+
This repository provides a PyTorch Geometric dataset designed for the TAG-DS TopoBench challenge.
|
| 23 |
+
It contains **20,000 graphs total:** 10,000 theorem-only DAGs and 10,000 full proof DAGs drawn from the first 10k theorems in the Metamath database.
|
| 24 |
|
| 25 |
## Contents
|
| 26 |
|
| 27 |
- **`data.pt`**
|
| 28 |
+
A preprocessed PyG dataset containing:
|
| 29 |
+
- `data` — global collated storage of all nodes, edges, and labels
|
| 30 |
+
- `slices` — pointers for reconstructing individual graphs
|
| 31 |
- `train_idx`, `val_idx`, `test_idx` — fixed graph-level splits
|
| 32 |
|
| 33 |
+
---
|
| 34 |
+
|
| 35 |
+
## Dataset Structure
|
| 36 |
+
|
| 37 |
+
### **1. Theorem Graphs (indices 0–9,999)**
|
| 38 |
+
Each theorem is represented as a small DAG consisting only of:
|
| 39 |
+
- its hypothesis nodes
|
| 40 |
+
- its conclusion node
|
| 41 |
+
- **no proof steps**
|
| 42 |
+
|
| 43 |
+
These encode the *statement only*, not the derivation.
|
| 44 |
+
|
| 45 |
+
### **2. Proof Graphs (indices 10,000–19,999)**
|
| 46 |
+
For each of the same theorems, the full proof DAG is included, containing:
|
| 47 |
+
- hypothesis nodes
|
| 48 |
+
- intermediate proof steps
|
| 49 |
+
- the same conclusion node
|
| 50 |
+
|
| 51 |
+
Thus each theorem appears **twice**:
|
| 52 |
+
1. once as a theorem-only graph
|
| 53 |
+
2. once as the complete proof of that theorem
|
| 54 |
|
| 55 |
+
This pairing enables:
|
| 56 |
+
- learning from theorem statements
|
| 57 |
+
- evaluating on masked proof conclusions
|
| 58 |
+
- consistent label space across both halves
|
| 59 |
+
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## Additional Details
|
| 63 |
+
|
| 64 |
+
- Total graphs: **20,000**
|
| 65 |
+
- Node embeddings: **768-dimensional CodeBERT** vectors
|
| 66 |
+
- Graph type: **directed acyclic graphs (DAGs)**
|
| 67 |
+
- Label space: **3,557 justification labels**, where all labels with <5 training occurrences are collapsed into `UNK`
|
| 68 |
+
- **Conclusion masking:** the conclusion node’s embedding is zeroed out; the model must infer its label from the structure and other nodes
|
| 69 |
+
- **Monotonicity constraint:** in Metamath, proofs only use theorems with index ≤ the current theorem, so later theorems never appear in earlier graphs
|
| 70 |
+
- Theorem-only graphs are included in training as prior knowledge for downstream proof prediction.
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
|
| 74 |
## Basic Usage
|
| 75 |
|