Update README.md
Browse files
README.md
CHANGED
|
@@ -4,13 +4,13 @@ configs:
|
|
| 4 |
- config_name: benchmark
|
| 5 |
data_files:
|
| 6 |
- split: test
|
| 7 |
-
path:
|
| 8 |
task_categories:
|
| 9 |
- text-classification
|
| 10 |
- text-generation
|
| 11 |
language:
|
| 12 |
- en
|
| 13 |
-
pretty_name:
|
| 14 |
size_categories:
|
| 15 |
- 1K<n<10K
|
| 16 |
tags:
|
|
@@ -18,11 +18,13 @@ tags:
|
|
| 18 |
- nlp
|
| 19 |
- dataset-robustness
|
| 20 |
- inverse-relations
|
|
|
|
|
|
|
| 21 |
---
|
| 22 |
|
| 23 |
# Reversing Arrows: A Benchmark Dataset for Inverse Relation Directionality in LLMs
|
| 24 |
|
| 25 |
-
This dataset evaluates the robustness of **relation extraction (RE)** models with a focus on **inverse relations** and **entity substitution**. It
|
| 26 |
|
| 27 |
The dataset includes **MLCommons Croissant metadata** for improved interoperability with machine learning tools and data catalogs.
|
| 28 |
|
|
@@ -36,21 +38,28 @@ The benchmark investigates whether language models can recognize the same semant
|
|
| 36 |
- entity mentions are replaced with synthetic placeholders,
|
| 37 |
- memorized world knowledge is unavailable.
|
| 38 |
|
| 39 |
-
The
|
| 40 |
|
| 41 |
-
###
|
| 42 |
-
- **File:** `
|
| 43 |
-
-
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
| 48 |
|
| 49 |
Additionally, the dataset includes:
|
| 50 |
|
| 51 |
### Relation Metadata
|
| 52 |
-
- **File:** `
|
| 53 |
-
- Human-readable
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
---
|
| 56 |
|
|
@@ -67,39 +76,61 @@ Additionally, the dataset includes:
|
|
| 67 |
|
| 68 |
## Dataset Structure
|
| 69 |
|
| 70 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
| File | Description |
|
| 73 |
|------|-------------|
|
| 74 |
-
| `original_fewrel_inverse.json` |
|
| 75 |
-
| `
|
| 76 |
-
| `
|
|
|
|
|
|
|
| 77 |
|
| 78 |
---
|
| 79 |
|
| 80 |
## Features
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
| Field | Description |
|
| 85 |
|------|-------------|
|
| 86 |
-
| `
|
|
|
|
| 87 |
| `head` | Head entity. |
|
| 88 |
| `tail` | Tail entity. |
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
---
|
| 94 |
|
| 95 |
## Usage
|
| 96 |
|
| 97 |
-
Load the
|
| 98 |
|
| 99 |
```python
|
| 100 |
-
|
| 101 |
|
| 102 |
-
|
|
|
|
| 103 |
```
|
| 104 |
|
| 105 |
Potential applications include:
|
|
|
|
| 4 |
- config_name: benchmark
|
| 5 |
data_files:
|
| 6 |
- split: test
|
| 7 |
+
path: data/ablation-tekgen/combined_fewrel_tekgen_inverse.json
|
| 8 |
task_categories:
|
| 9 |
- text-classification
|
| 10 |
- text-generation
|
| 11 |
language:
|
| 12 |
- en
|
| 13 |
+
pretty_name: Reversing Arrows Inverse Relations Benchmark
|
| 14 |
size_categories:
|
| 15 |
- 1K<n<10K
|
| 16 |
tags:
|
|
|
|
| 18 |
- nlp
|
| 19 |
- dataset-robustness
|
| 20 |
- inverse-relations
|
| 21 |
+
- fewrel
|
| 22 |
+
- tekgen
|
| 23 |
---
|
| 24 |
|
| 25 |
# Reversing Arrows: A Benchmark Dataset for Inverse Relation Directionality in LLMs
|
| 26 |
|
| 27 |
+
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.
|
| 28 |
|
| 29 |
The dataset includes **MLCommons Croissant metadata** for improved interoperability with machine learning tools and data catalogs.
|
| 30 |
|
|
|
|
| 38 |
- entity mentions are replaced with synthetic placeholders,
|
| 39 |
- memorized world knowledge is unavailable.
|
| 40 |
|
| 41 |
+
The current benchmark release includes a single combined file for evaluation:
|
| 42 |
|
| 43 |
+
### Combined FewRel + TekGen
|
| 44 |
+
- **File:** `data/ablation-tekgen/combined_fewrel_tekgen_inverse.json`
|
| 45 |
+
- **Records:** 5131 (3401 FewRel + 1730 TekGen)
|
| 46 |
+
- Concatenated benchmark file covering both sources.
|
| 47 |
|
| 48 |
+
The repository also provides source files used to build the combined file:
|
| 49 |
+
|
| 50 |
+
### Source Files
|
| 51 |
+
- **FewRel source:** `data/ablation-tekgen/original_fewrel_inverse.json`
|
| 52 |
+
- **TekGen source:** `data/ablation-tekgen/original_tekgen_inverse.json`
|
| 53 |
|
| 54 |
Additionally, the dataset includes:
|
| 55 |
|
| 56 |
### Relation Metadata
|
| 57 |
+
- **File:** `data/ablation-tekgen/tekgen_relations.json`
|
| 58 |
+
- Human-readable relation and inverse-relation definitions for TekGen relations.
|
| 59 |
+
|
| 60 |
+
### Croissant Metadata
|
| 61 |
+
- **File:** `data/ablation-tekgen/inverse_relations_croissant.json`
|
| 62 |
+
- MLCommons Croissant description of available resources and fields.
|
| 63 |
|
| 64 |
---
|
| 65 |
|
|
|
|
| 76 |
|
| 77 |
## Dataset Structure
|
| 78 |
|
| 79 |
+
Core evaluation file:
|
| 80 |
+
|
| 81 |
+
| File | Description |
|
| 82 |
+
|------|-------------|
|
| 83 |
+
| `data/ablation-tekgen/combined_fewrel_tekgen_inverse.json` | Combined benchmark examples from FewRel and TekGen. |
|
| 84 |
+
|
| 85 |
+
Supporting files:
|
| 86 |
|
| 87 |
| File | Description |
|
| 88 |
|------|-------------|
|
| 89 |
+
| `data/ablation-tekgen/original_fewrel_inverse.json` | FewRel examples with forward and inverse relation annotations. |
|
| 90 |
+
| `data/ablation-tekgen/original_tekgen_inverse.json` | TekGen examples with forward and inverse relation annotations. |
|
| 91 |
+
| `data/ablation-tekgen/artificial_tekgen_inverse.json` | TekGen entity-substituted examples for robustness analysis. |
|
| 92 |
+
| `data/ablation-tekgen/tekgen_relations.json` | TekGen relation metadata and inverse mapping. |
|
| 93 |
+
| `data/ablation-tekgen/inverse_relations_croissant.json` | Croissant dataset metadata. |
|
| 94 |
|
| 95 |
---
|
| 96 |
|
| 97 |
## Features
|
| 98 |
|
| 99 |
+
Because the dataset combines two sources, fields vary slightly by source. Common fields are:
|
| 100 |
|
| 101 |
| Field | Description |
|
| 102 |
|------|-------------|
|
| 103 |
+
| `head_to_tail` | Forward relation label (PID for FewRel or relation string for TekGen). |
|
| 104 |
+
| `tail_to_head` | Inverse relation label. |
|
| 105 |
| `head` | Head entity. |
|
| 106 |
| `tail` | Tail entity. |
|
| 107 |
+
|
| 108 |
+
FewRel-specific fields:
|
| 109 |
+
|
| 110 |
+
| Field | Description |
|
| 111 |
+
|------|-------------|
|
| 112 |
+
| `tokens` | Tokenized sentence. |
|
| 113 |
+
| `relation_prop_wiki` | Wikidata relation URIs connected to the entity pair. |
|
| 114 |
+
|
| 115 |
+
TekGen-specific fields:
|
| 116 |
+
|
| 117 |
+
| Field | Description |
|
| 118 |
+
|------|-------------|
|
| 119 |
+
| `id` | Unique example identifier. |
|
| 120 |
+
| `sent` | Full sentence string. |
|
| 121 |
+
| `artificial_data` | Mapping from original to substituted entities (only in artificial TekGen file). |
|
| 122 |
|
| 123 |
---
|
| 124 |
|
| 125 |
## Usage
|
| 126 |
|
| 127 |
+
Load the combined benchmark file with Python:
|
| 128 |
|
| 129 |
```python
|
| 130 |
+
import json
|
| 131 |
|
| 132 |
+
with open("data/ablation-tekgen/combined_fewrel_tekgen_inverse.json", "r", encoding="utf-8") as f:
|
| 133 |
+
dataset = json.load(f)
|
| 134 |
```
|
| 135 |
|
| 136 |
Potential applications include:
|