Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -69,4 +69,68 @@ configs:
|
|
69 |
data_files:
|
70 |
- split: train
|
71 |
path: var-09/train.jsonl
|
72 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
data_files:
|
70 |
- split: train
|
71 |
path: var-09/train.jsonl
|
72 |
+
---
|
73 |
+
|
74 |
+
# Re-DocRED-CF
|
75 |
+
|
76 |
+
Many datasets have been developed to train and evaluate document-level relation extraction (RE) models. Most of these are constructed using real-world data. However, it has been shown that RE models trained on real-world data suffer from factual biases. To evaluate and address this issue, we present [**CovEReD** (Paper)](https://www.arxiv.org/abs/2407.06699), a counterfactual data generation approach for document-level relation extraction datasets through entity replacement.
|
77 |
+
|
78 |
+
Using our pipeline, we have generated **Re-DocRED-CF**, a dataset of counterfactual RE documents, to help evaluate and address inconsistencies in document-level RE.
|
79 |
+
This repo contains five counterfactual variations of the seed dataset, i.e., Re-DocRED. All five sets of train/dev/test dataset files are available here through the HuggingFace Datasets API 🤗.
|
80 |
+
|
81 |
+
To select a specific variation (e.g. `var-01`):
|
82 |
+
```python
|
83 |
+
dataset = load_dataset("amodaresi/Re-DocRED-CF", "var-01")
|
84 |
+
```
|
85 |
+
#### Output:
|
86 |
+
```python
|
87 |
+
DatasetDict({
|
88 |
+
train: Dataset({
|
89 |
+
features: ['title', 'labels', 'original_doc_id', 'vertexSet', 'sents'],
|
90 |
+
num_rows: 2870
|
91 |
+
})
|
92 |
+
dev: Dataset({
|
93 |
+
features: ['title', 'labels', 'original_doc_id', 'vertexSet', 'sents'],
|
94 |
+
num_rows: 466
|
95 |
+
})
|
96 |
+
test: Dataset({
|
97 |
+
features: ['title', 'labels', 'original_doc_id', 'vertexSet', 'sents'],
|
98 |
+
num_rows: 453
|
99 |
+
})
|
100 |
+
train_mix: Dataset({
|
101 |
+
features: ['title', 'labels', 'original_doc_id', 'vertexSet', 'sents'],
|
102 |
+
num_rows: 5923
|
103 |
+
})
|
104 |
+
})
|
105 |
+
```
|
106 |
+
The `train_mix` is the original training set combined with its counterfactual variation counterpart.
|
107 |
+
We have also included four additional training set variations (var-[06, 07, 08, 09]), though they were not used in the evaluations presented in our paper.
|
108 |
+
|
109 |
+
The properties `title`, `labels`, `vertexSet`, and `sents` are structured similarly to those in the original DocRED & Re-DocRED datasets:
|
110 |
+
|
111 |
+
- `title`: Document title.
|
112 |
+
- `labels`: List of relations. Each entry indicates the relation between a head and a tail entity, with some entries also specifying evidence sentences.
|
113 |
+
- `vertexSet`: List of entity vertex sets. Each entry represents a vertex specifying all mentions of an entity by their position in the document, along with their type.
|
114 |
+
- `sents`: Tokenized sentences.
|
115 |
+
|
116 |
+
In examples that are counterfactually generated, the title includes a variation number. For example: `AirAsia Zest ### 1`.
|
117 |
+
The `original_doc_id` denotes the index of the example in the original seed dataset, i.e., Re-DocRED.
|
118 |
+
|
119 |
+
## GitHub Repo & Paper
|
120 |
+
For more information about the **CovEReD** pipeline, refer to:
|
121 |
+
|
122 |
+
- 📄 Paper: "[Consistent Document-Level Relation Extraction via Counterfactuals](https://www.arxiv.org/abs/2407.06699)"
|
123 |
+
- 🔗 GitHub Repo: [https://github.com/amodaresi/CovEReD](https://github.com/amodaresi/CovEReD)
|
124 |
+
|
125 |
+
## Cite
|
126 |
+
If you use the dataset, **CovEReD** pipeline, or code from this repository, please cite the paper:
|
127 |
+
```bibtex
|
128 |
+
@inproceedings{modarressi-covered-2024,
|
129 |
+
title="Consistent Document-Level Relation Extraction via Counterfactuals",
|
130 |
+
author="Ali Modarressi and Abdullatif Köksal and Hinrich Schütze",
|
131 |
+
year="2024",
|
132 |
+
booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2024",
|
133 |
+
address = "Miami, United States",
|
134 |
+
publisher = "Association for Computational Linguistics",
|
135 |
+
}
|
136 |
+
```
|