Sefika's picture
Update README.md
8169393 verified
|
raw
history blame
3.73 kB
---
license: mit
task_categories:
- text-classification
- text-generation
language:
- en
pretty_name: Relation Extraction for Inverse Relations FewRel
size_categories:
- 1K<n<10K
tags:
- relation-extraction
- nlp
- dataset-robustness
- inverse-relations
---
<script type="application/ld+json">
{
"@context": {
"@language": "en",
"@vocab": "https://schema.org/",
"cr": "http://mlcommons.org/croissant/",
"sc": "https://schema.org/"
},
"@type": "sc:Dataset",
"name": "InverseRelationsBenchmark",
"description": "Benchmark based on FewRel with original entity mentions and synthetic substitutions for robustness testing.",
"conformsTo": "http://mlcommons.org/croissant/1.0"
}
</script>
# Reversing Arrows: A Benchmark Dataset for Inverse Relation Directionality in LLMs
This dataset is designed to evaluate the robustness of Relation Extraction (RE) models, with a specific focus on **Inverse Relations** and entity substitution. It is derived from **FewRel**.
The croissant metadata is available on [croissant](https://huggingface.co/datasets/Sefika/FewRel_Inverse_Relations/blob/main/metadata.txt)
## Dataset Summary
The primary goal of this dataset is to test whether models can recognize a relationship regardless of the direction or the surface form of the entities. It includes:
1. **Inverse Mapping**: Every sample includes both the forward relation (e.g., *Mother*) and its logical inverse (e.g., *Child*).
-- *Original data* : original_fewrel_inverse.json
3. **Synthetics Substitutions**: A version of the dataset where real-world entities are replaced with synthetic names (e.g., replacing "Denmark" with "Emilyfort") to test if models rely on memorized entity knowledge rather than linguistic context.
-- *synthetic_fewrel_inverse.json*
### Relation Examples
| Forward Relation | Inverse Relation |
| :--- | :--- |
| **Child** (P40) | **Mother** (P25) |
| **Child** (P40) | **Father** (P22) |
| **Follows** (P155) | **Followed by** (P156) |
| **Has Part** (P527) | **Part of** (P361) |
## Dataset Structure
The dataset is provided in JSON format and split into four main distributions:
* **Original FewRel**: The ground-truth sentences and relations. (*original_fewrel_inverse.json*)
* **Synthetic FewRel**: Sentences where entities have been substituted with synthetic placeholders. (*synthetic_fewrel_inverse.json*)
* **Relation Metadata**: Supplemental files providing human-readable definitions for Wikidata P-IDs (*fewrel_inverse_relations.json*)
### Key Fields
* `tokens`: The input text (tokenized or raw string) in FewRel.
* `head` / `tail`: The subject and object entities.
* `head_to_tail`: The ID/Name of the forward relation.
* `tail_to_head`: The ID/Name of the inverse relation.
* `artificial_data`: A mapping showing which `Original` entities were changed to which `Synthetic` placeholders.
## Usage
You can load this dataset for tasks such as:
* **Text Classification**: Predicting the relation ID between two entities.
* **Text Generation**: Generating a sentence that expresses a specific inverse relation.
### Repository
For scripts and more technical details on how the artificial data was generated, visit the official repository:
[sefeoglu/inverserelations](https://github.com/sefeoglu/inverserelations)
## Citation
If you use this dataset in your research, please cite the original FewRel and this repository.
```bibtex
@misc{fewrel_inverse_2025,
author = {Sefika Efeoglu, and Adrian Paschke},
title = { Reversing Arrows: A Benchmark Dataset for Inverse Relation Directionality in LLMs},
year = {2025},
publisher = {GitHub/HuggingFace},
doi = { 10.57967/hf/8462 },
howpublished = {https://github.com/sefeoglu/inverserelations}
}