EvoRM / data /README.md
eduzrh's picture
Upload data/README.md with huggingface_hub
d586f21 verified
|
Raw History Blame Contribute Delete
2.6 kB
# Data Preparation Guide
## Supported Datasets
EvoRM is validated on the **ICEWS-WIKI** dataset for entity alignment (EA) tasks.
### ICEWS-WIKI (HHEA)
ICEWS-WIKI is a Highly Heterogeneous Knowledge Graph Alignment dataset where:
- KG1 uses ICEWS relation IDs (e.g., 001, 002)
- KG2 uses Wikidata relation IDs (e.g., P31, P17)
- The relation schemas are completely different, making direct rule matching challenging
#### Data Structure
```
data/icews_wiki/
β”œβ”€β”€ ent_ids_1 # KG1 entity ID β†’ name mapping
β”œβ”€β”€ ent_ids_2 # KG2 entity ID β†’ name mapping
β”œβ”€β”€ rel_ids_1 # KG1 relation ID β†’ name mapping
β”œβ”€β”€ rel_ids_2 # KG2 relation ID β†’ name mapping
β”œβ”€β”€ triples_1 # KG1 triples (h, r, t)
β”œβ”€β”€ triples_2 # KG2 triples (h, r, t)
β”œβ”€β”€ ref_pairs # Reference (ground truth) entity pairs
β”œβ”€β”€ ref_ent_ids # Reference entity IDs
β”œβ”€β”€ sup_pairs # Supervision pairs (training)
β”œβ”€β”€ message_pool/
β”‚ β”œβ”€β”€ retriever_outputs.txt # Candidate pairs (KG1β†’KG2, 5 candidates each)
β”‚ β”œβ”€β”€ important_entities.txt # Subset for LLM processing
β”‚ β”œβ”€β”€ aligned_entities.txt # Output aligned pairs
β”‚ └── alignment_rules.txt # Reference rules (optional)
└── evorm_state/ # EvoRM persistent state
β”œβ”€β”€ rules.json # Distilled FOL rules
└── hyperedges.json # Hypergraph structure
```
#### Statistics
| Metric | Value |
|--------|-------|
| Reference pairs | 3,540 |
| KG1 entities | 3,540 |
| KG2 entities | 15,831 |
| Candidate pairs | 17,700 (5 per KG1 entity) |
| KG1 relations | 256 |
| KG2 relations | 682 |
---
## Adding New Datasets
To run EvoRM on a new dataset, ensure the following files are available:
1. `ent_ids_1` / `ent_ids_2`: Tab-separated entity ID β†’ name mapping
2. `rel_ids_1` / `rel_ids_2`: Tab-separated relation ID β†’ name mapping
3. `triples_1` / `triples_2`: Tab-separated triples (head, relation, tail)
4. `ref_pairs`: Tab-separated ground truth pairs
5. `message_pool/important_entities.txt`: Candidate pairs for LLM processing
Then run:
```python
from LLM1_label_selector import align_entities
aligned_pairs = align_entities(data_dir="./data/your_dataset")
```
---
## DBP15K Datasets
The paper also evaluates on DBP15K variant datasets (EN-FR, EN-DE, ZH-EN, JA-EN, FR-EN). These datasets follow a similar structure and can be downloaded from:
- [DBP15K](https://github.com/nju-websoft/OpenEA)
- [JAPE](https://github.com/nju-websoft/JAPE)