Venkatdatta commited on
Commit
189d059
·
verified ·
1 Parent(s): 6d5d0ca

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +107 -0
README.md ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ task_categories:
6
+ - text2text-generation
7
+ - question-answering
8
+ tags:
9
+ - logical-reasoning
10
+ - first-order-logic
11
+ - proofwriter
12
+ - symbolic-reasoning
13
+ - natural-language-inference
14
+ pretty_name: FOL Reasoning Dataset (Vocabulary-Augmented ProofWriter)
15
+ size_categories:
16
+ - 100K<n<1M
17
+ ---
18
+
19
+ # FOL Reasoning Dataset
20
+
21
+ A vocabulary-augmented version of the [ProofWriter](https://allenai.org/data/proofwriter) dataset (OWA splits), preprocessed for training a Natural Language → First-Order Logic translation model.
22
+
23
+ ## What's different from ProofWriter
24
+
25
+ The original ProofWriter uses a small fixed vocabulary (~75 entity names, ~80 properties). This dataset replaces every entity and predicate name per-question with a random draw from:
26
+
27
+ - **7,372 entity names** — NLTK `names` corpus (first names, filtered to 3–9 chars, alpha only)
28
+ - **13,006 property words** — WordNet adjective synset lemmas (4–10 chars, alpha only)
29
+ - **7,463 relation words** — WordNet verb synset lemmas (4–10 chars, alpha only)
30
+
31
+ All original ProofWriter vocabulary is excluded from the replacement pools. The substitution is consistent within each question (same entity always maps to the same replacement). This forces the model to learn structural FOL mapping rather than memorising surface vocabulary.
32
+
33
+ ## Dataset Structure
34
+
35
+ Each split is a JSONL file. One example per line:
36
+
37
+ ```json
38
+ {
39
+ "premises": "Venkat is perseverant. If someone is perseverant they discover.",
40
+ "logic": "<extra_id_1>\nPerseverant(venkat)\nforall x (Perseverant(x) -> Discover(x))\n<extra_id_2>\nDiscover(venkat)\n<extra_id_3>\nPerseverant(venkat) and forall x (Perseverant(x) -> Discover(x)) -> therefore Discover(venkat)\n<extra_id_4>\nTrue",
41
+ "qdep": 1,
42
+ "answer": "True",
43
+ "source": "depth-2/meta-train-1234"
44
+ }
45
+ ```
46
+
47
+ ### Fields
48
+
49
+ | Field | Type | Description |
50
+ |-------|------|-------------|
51
+ | `premises` | string | Natural-language premises (facts + rules), vocabulary-substituted |
52
+ | `logic` | string | Full decoder target: FOL premises → FOL question → proof chain → answer |
53
+ | `qdep` | int | Question depth (0–5): minimum reasoning steps to answer |
54
+ | `answer` | string | Ground truth: `"True"`, `"False"`, or `"Unknown"` |
55
+ | `source` | string | Original ProofWriter example ID |
56
+
57
+ ### `logic` field sentinel structure
58
+
59
+ ```
60
+ <extra_id_1> ← start of FOL premises block
61
+ Kind(anne)
62
+ forall x (Kind(x) -> Furry(x))
63
+ <extra_id_2> ← start of FOL question
64
+ Furry(anne)
65
+ <extra_id_3> ← start of proof chain
66
+ Kind(anne) and forall x (Kind(x) -> Furry(x)) -> therefore Furry(anne)
67
+ <extra_id_4> ← answer token
68
+ True
69
+ ```
70
+
71
+ For `Unknown` examples, the proof is a failure chain:
72
+ ```
73
+ <extra_id_3>
74
+ forall x (Big(x) and Round(x) -> White(x)) <- Rough(fiona) -> Big(fiona) <- [no base fact]
75
+ Cannot be determined from given premises.
76
+ <extra_id_4>
77
+ Unknown
78
+ ```
79
+
80
+ ## Splits
81
+
82
+ | Split | Examples | File size |
83
+ |-------|----------|-----------|
84
+ | train | 229,832 | ~302 MB |
85
+ | dev | 33,042 | ~45 MB |
86
+ | test | 66,084 | ~88 MB |
87
+
88
+ ### Class distribution (train)
89
+
90
+ | Class | Count | % |
91
+ |-------|-------|---|
92
+ | pos_True (non-negated → True) | 58,034 | 25.3% |
93
+ | neg_False (negated → False) | 57,984 | 25.2% |
94
+ | pos_Unknown | 51,808 | 22.5% |
95
+ | neg_Unknown | 51,808 | 22.5% |
96
+ | pos_False (non-negated → False) | 5,124 | 2.2% |
97
+ | neg_True (negated → True) | 5,074 | 2.2% |
98
+
99
+ `pos_False` and `neg_True` are rare (underrepresented ~11×) — training uses a weighted sampler to compensate.
100
+
101
+ ## Source
102
+
103
+ Built from ProofWriter OWA depth-2, depth-3, and depth-3ext splits. Preprocessing script: `scripts/preprocess_proofwriter.py` in the [FOL SLM repository](https://huggingface.co/Venkatdatta/fol-slm).
104
+
105
+ ## License
106
+
107
+ Apache 2.0. Original ProofWriter data © Allen Institute for AI (AI2), released under Apache 2.0.