lawhy commited on
Commit
5311e3b
1 Parent(s): f69d3c2

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +171 -0
README.md ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ name: SnomedCT Subsumption (TBox) Hierarchy.
3
+ description: >
4
+ This dataset is a collection of Multi-hop Inference and Mixed-hop Prediction
5
+ datasets created from SnomedCT's subsumption hierarchy (TBox) for training and evaluating hierarchy embedding models.
6
+ license: apache-2.0
7
+ language:
8
+ - en
9
+ multilinguality:
10
+ - monolingual
11
+ size_categories:
12
+ - 1M<n<10M
13
+ task_categories:
14
+ - feature-extraction
15
+ - sentence-similarity
16
+ pretty_name: SnomedCT
17
+ tags:
18
+ - hierarchy-transformers
19
+ - sentence-transformers
20
+ configs:
21
+ - config_name: MultiHop-RandomNegatives-Triplets
22
+ description: >
23
+ A dataset for Multi-hop Inference with random negatives; samples formatted
24
+ as triplets.
25
+ data_files:
26
+ - split: train
27
+ path: MultiHop-RandomNegatives-Triplets/train*
28
+ - split: val
29
+ path: MultiHop-RandomNegatives-Triplets/val*
30
+ - split: test
31
+ path: MultiHop-RandomNegatives-Triplets/test*
32
+ - config_name: MultiHop-HardNegatives-Triplets
33
+ description: >
34
+ A dataset for Multi-hop Inference with hard negatives; samples formatted as
35
+ triplets.
36
+ data_files:
37
+ - split: train
38
+ path: MultiHop-HardNegatives-Triplets/train*
39
+ - split: val
40
+ path: MultiHop-HardNegatives-Triplets/val*
41
+ - split: test
42
+ path: MultiHop-HardNegatives-Triplets/test*
43
+ - config_name: MixedHop-RandomNegatives-Triplets
44
+ description: >
45
+ A dataset for Mixed-hop Prediction with random negatives; samples formatted
46
+ as triplets.
47
+ data_files:
48
+ - split: train
49
+ path: MixedHop-RandomNegatives-Triplets/train*
50
+ - split: val
51
+ path: MixedHop-RandomNegatives-Triplets/val*
52
+ - split: test
53
+ path: MixedHop-RandomNegatives-Triplets/test*
54
+ - config_name: MixedHop-HardNegatives-Triplets
55
+ description: >
56
+ A dataset for Mixed-hop Prediction with hard negatives; samples formatted as
57
+ triplets.
58
+ data_files:
59
+ - split: train
60
+ path: MixedHop-HardNegatives-Triplets/train*
61
+ - split: val
62
+ path: MixedHop-HardNegatives-Triplets/val*
63
+ - split: test
64
+ path: MixedHop-HardNegatives-Triplets/test*
65
+ - config_name: MultiHop-RandomNegatives-Pairs
66
+ description: >
67
+ A dataset for Multi-hop Inference with random negatives; samples formatted
68
+ as pairs.
69
+ data_files:
70
+ - split: train
71
+ path: MultiHop-RandomNegatives-Pairs/train*
72
+ - split: val
73
+ path: MultiHop-RandomNegatives-Pairs/val*
74
+ - split: test
75
+ path: MultiHop-RandomNegatives-Pairs/test*
76
+ - config_name: MultiHop-HardNegatives-Pairs
77
+ description: >
78
+ A dataset for Multi-hop Inference with hard negatives; samples formatted as
79
+ pairs.
80
+ data_files:
81
+ - split: train
82
+ path: MultiHop-HardNegatives-Pairs/train*
83
+ - split: val
84
+ path: MultiHop-HardNegatives-Pairs/val*
85
+ - split: test
86
+ path: MultiHop-HardNegatives-Pairs/test*
87
+ - config_name: MixedHop-RandomNegatives-Pairs
88
+ description: >
89
+ A dataset for Mixed-hop Prediction with random negatives; samples formatted
90
+ as pairs.
91
+ data_files:
92
+ - split: train
93
+ path: MixedHop-RandomNegatives-Pairs/train*
94
+ - split: val
95
+ path: MixedHop-RandomNegatives-Pairs/val*
96
+ - split: test
97
+ path: MixedHop-RandomNegatives-Pairs/test*
98
+ - config_name: MixedHop-HardNegatives-Pairs
99
+ description: >
100
+ A dataset for Mixed-hop Prediction with hard negatives; samples formatted as
101
+ pairs.
102
+ data_files:
103
+ - split: train
104
+ path: MixedHop-HardNegatives-Pairs/train*
105
+ - split: val
106
+ path: MixedHop-HardNegatives-Pairs/val*
107
+ - split: test
108
+ path: MixedHop-HardNegatives-Pairs/test*
109
+ ---
110
+
111
+ # Dataset Card for SnomedCT
112
+
113
+ This dataset is a collection of **Multi-hop Inference** and **Mixed-hop Prediction** datasets created from SnomedCT's subsumption hierarchy (TBox) for training and evaluating hierarchy embedding models.
114
+
115
+ - **Multi-hop Inference**: This task aims to evaluate the model’s ability in deducing indirect, multi-hop subsumptions from direct, one-hop subsumptions, so as to simulate transitive inference.
116
+ - **Mixed-hop Prediction**: This task aims to evaluate the model’s capability in determining the existence of subsumption relationships between arbitrary entity pairs, where the entities are not necessarily seen during training. The transfer setting of this task involves training models on asserted training edges of one hierarchy testing on arbitrary entity pairs of another.
117
+
118
+ See our published [paper](https://arxiv.org/abs/2401.11374) for more detail.
119
+
120
+
121
+ ## Links
122
+
123
+ - **GitHub Repository:** https://github.com/KRR-Oxford/HierarchyTransformers
124
+ - **Huggingface Page**: https://huggingface.co/Hierarchy-Transformers
125
+ - **Zenodo Release**: https://doi.org/10.5281/zenodo.10511042
126
+ - **Paper:** [Language Models as Hierarchy Encoders](https://arxiv.org/abs/2401.11374) (NeurIPS 2024).
127
+
128
+ The information of original entity IDs is not available in the Huggingface release; To map entities back to their original hierarchies, refer to this [Zenodo release](https://doi.org/10.5281/zenodo.10511042).
129
+
130
+
131
+ ## Dataset Structure
132
+
133
+ Each subset in this dataset follows the naming convention `TaskType-NegativeType-SampleStructure`:
134
+
135
+ - `TaskType`: Either `MultiHop` or `MixedHop`, indicating the type of hierarchy evaluation task.
136
+
137
+ - `NegativeType`: Either `RandomNegatives` or `HardNegatives`, specifying the strategy used for negative sampling.
138
+
139
+ - `SampleStructure`: Either `Triplets` or `Pairs`, indicating the format of the samples.
140
+ - In `Triplets`, each sample is structured as `(child, parent, negative)`.
141
+ - In `Pairs`, each sample is a labelled pair `(child, parent, label)`, where `label=1` denotes a positive subsumption and `label=0` denotes a negative subsumption.
142
+
143
+ For example, to load a subset for the **Mixed-hop Prediction** task with **random negatives** and samples presented as **triplets**, we can use the following command:
144
+
145
+ ```python
146
+ from datasets import load_dataset
147
+ dataset = load_dataset("Hierarchy-Transformers/SnomedCT", "MixedHop-RandomNegatives-Triplets")
148
+ ```
149
+
150
+ ## Dataset Usage
151
+
152
+ - For **evaluation**, the `Pairs` sample structure should be adopted, as it allows for the computation of Precision, Recall, and F1 scores.
153
+
154
+ - For **training**, the choice between `Pairs`, `Triplets`, or more complex sample structures depends on the model's design and specific requirements.
155
+
156
+ ## Citation
157
+
158
+ The relevant paper has been accepted at NeurIPS 2024 (to appear).
159
+
160
+ ```
161
+ @article{he2024language,
162
+ title={Language models as hierarchy encoders},
163
+ author={He, Yuan and Yuan, Zhangdie and Chen, Jiaoyan and Horrocks, Ian},
164
+ journal={arXiv preprint arXiv:2401.11374},
165
+ year={2024}
166
+ }
167
+ ```
168
+
169
+ ## Contact
170
+
171
+ Yuan He (`yuan.he(at)cs.ox.ac.uk`)