Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,15 +19,24 @@ This repository hosts a single PyTorch Geometric dataset file used for the TAG-D
|
|
| 19 |
|
| 20 |
## Contents
|
| 21 |
|
| 22 |
-
-
|
| 23 |
-
A
|
| 24 |
-
- `data`
|
| 25 |
-
- `slices`
|
| 26 |
-
- `train_idx`
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
```python
|
| 33 |
import torch
|
|
|
|
| 19 |
|
| 20 |
## Contents
|
| 21 |
|
| 22 |
+
- **`data.pt`**
|
| 23 |
+
A preprocessed graph dataset containing:
|
| 24 |
+
- `data` — collated PyG `Data` object storing all node features, edges, and labels
|
| 25 |
+
- `slices` — indexing information for reconstructing individual graphs
|
| 26 |
+
- `train_idx`, `val_idx`, `test_idx` — fixed graph-level splits
|
| 27 |
+
|
| 28 |
+
## Dataset Description
|
| 29 |
+
|
| 30 |
+
- Contains the **first 10,000 proofs** from the ~45,000-theorem Metamath database
|
| 31 |
+
- Each example is a **directed acyclic graph** (DAG)
|
| 32 |
+
- **Node features:** 768-dimensional **CodeBERT embeddings** of Metamath statements
|
| 33 |
+
- **Labels:** the **theorem required to justify each node**
|
| 34 |
+
- **Conclusion masking:** the conclusion node’s embedding is zeroed out so the model must predict the final logical step directly from the graph structure and the other nodes
|
| 35 |
+
- **Rare labels** (<=5 occurrences) are collapsed into a single UNK class
|
| 36 |
+
- **All theorem statements** (not just proofs) are included in training, since the model must treat theorems themselves as prior knowledge
|
| 37 |
+
- Under the Metamath proof language, any theorem used to justify a step always has an index <= the theorem being proved. So a later theorem never appears in an earlier proof
|
| 38 |
+
|
| 39 |
+
## Basic Usage
|
| 40 |
|
| 41 |
```python
|
| 42 |
import torch
|