File size: 4,146 Bytes
009c53a f3f5d20 009c53a 6a7839b 009c53a 6a7839b 487b3ca fc8e2fc f3f5d20 8bb7b16 6a7839b 487b3ca 6246de1 f6fdb1e 3dae347 487b3ca 6a7839b 8bb7b16 3dae347 6a7839b 487b3ca 6a7839b 487b3ca 6a7839b 487b3ca 6a7839b 487b3ca 6a7839b 1c639a2 8bb7b16 487b3ca 1c639a2 6a7839b 8bb7b16 6a7839b 8bb7b16 6a7839b b2a9950 487b3ca 6a7839b 487b3ca 6a7839b 487b3ca 6a7839b 8bb7b16 487b3ca 6a7839b 487b3ca 8bb7b16 487b3ca 6a7839b b2a9950 6a7839b 8bb7b16 b2a9950 6a7839b 8bb7b16 6a7839b b2a9950 6a7839b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | ---
configs:
- config_name: default
data_files:
- split: test
path: fewrel_tekgen_inverse.json
license: mit
task_categories:
- text-classification
- text-generation
language:
- en
pretty_name: Reversing Arrows Inverse Relations Benchmark
size_categories:
- "1K<n<10K"
tags:
- relation-extraction
- nlp
- dataset-robustness
- inverse-relations
- fewrel
- tekgen
---
# Reversing Arrows: A Benchmark Dataset for Inverse Relation Directionality in LLMs
This dataset evaluates the robustness of **relation extraction (RE)** models with a focus on **inverse relations** and **entity substitution**. It combines examples from **FewRel** and **TekGen** to measure whether models correctly capture relation semantics independent of relation direction and entity identity.
The dataset includes **MLCommons Croissant metadata** for improved interoperability with machine learning tools and data catalogs.
---
## Dataset Summary
The benchmark investigates whether language models can recognize the same semantic relationship when:
- the relation direction is reversed (e.g., **Mother ↔ Child**),
- entity mentions are replaced with synthetic placeholders,
- memorized world knowledge is unavailable.
The current benchmark release includes a single combined file for evaluation:
### Combined FewRel + TekGen
- **File:** `data/ablation-tekgen/combined_fewrel_tekgen_inverse.json`
- **Records:** 5131 (3401 FewRel + 1730 TekGen)
- Concatenated benchmark file covering both sources.
The repository also provides source files used to build the combined file:
### Source Files
- **FewRel source:** `data/ablation-tekgen/original_fewrel_inverse.json`
- **TekGen source:** `data/ablation-tekgen/original_tekgen_inverse.json`
Additionally, the dataset includes:
### Relation Metadata
- **File:** `data/ablation-tekgen/tekgen_relations.json`
- Human-readable relation and inverse-relation definitions for TekGen relations.
### Croissant Metadata
- **File:** `data/ablation-tekgen/inverse_relations_croissant.json`
- MLCommons Croissant description of available resources and fields.
--
## Dataset Structure
Core evaluation file:
| File | Description |
|------|-------------|
|fewrel_tekgen_inverse.json` | Combined benchmark examples from FewRel and TekGen. |
---
## Features
Because the dataset combines two sources, fields vary slightly by source. Common fields are:
| Field | Description |
|------|-------------|
| `head_to_tail` | Forward relation label (PID for FewRel or relation string for TekGen). |
| `tail_to_head` | Inverse relation label. |
| `head` | Head entity. |
| `tail` | Tail entity. |
FewRel-specific fields:
| Field | Description |
|------|-------------|
| `tokens` | Tokenized sentence. |
| `relation_prop_wiki` | Wikidata relation URIs connected to the entity pair. |
TekGen-specific fields:
| Field | Description |
|------|-------------|
| `id` | Unique example identifier. |
| `sent` | Full sentence string. |
| `artificial_data` | Mapping from original to substituted entities (only in artificial TekGen file). |
---
## Usage
Load the combined benchmark file with Python:
```python
import json
with open("data/ablation-tekgen/combined_fewrel_tekgen_inverse.json", "r", encoding="utf-8") as f:
dataset = json.load(f)
```
Potential applications include:
- Relation Extraction
- Text Classification
- Robustness Evaluation
- Knowledge Graph Completion
- Directionality Analysis
- Entity Generalization Studies
---
## Repository
Scripts used to generate the inverse relations and synthetic entity substitutions are available at:
**GitHub:** https://github.com/sefeoglu/inverserelations
---
## Citation
If you use this dataset, please cite both the original **FewRel** paper and this dataset.
```bibtex
@misc{efeoglu2025inversefewrel,
author = {Sefika Efeoglu and Adrian Paschke},
title = {Reversing Arrows: A Benchmark Dataset for Inverse Relation Directionality in LLMs},
year = {2025},
doi = {10.57967/hf/8462},
publisher = {Hugging Face},
howpublished = {\url{https://github.com/sefeoglu/inverserelations}}
}
``` |