entity-canonicalization-eval
Open Knowledge Graphs Canonicalization using Variational Autoencoders — Dash et al. (2020) (arXiv:2012.04780, 2020)
What this evaluates
Evaluates a model's ability to cluster entity mentions (noun phrases) into canonical forms within open knowledge graphs. It probes unsupervised representation learning and clustering capabilities without relying on manually annotated ground truth for training.
Datasets
Metrics
Macro F1 (primary) — range: [0, 1]
- Averages the F1 score computed independently for each cluster, giving equal weight to clusters regardless of their size.
Micro F1 — range: [0, 1]
- Aggregates true positives, false positives, and false negatives across all clusters to compute a global F1 score.
Pair F1 — range: [0, 1]
- Evaluates clustering by considering all pairs of items. Counts true positives if pairs are in the same cluster in both predictions and gold, and false positives/negatives otherwise.
Input / output format
Input: Noun phrases (entity mentions) from KG triples, optionally augmented with side information (e.g., IDF token overlap, pretrained embeddings, structural graph features).
Output: A cluster identifier (canonical label) assigned to each noun phrase.
Scoring recipe
def compute_f1_metrics(predictions, gold):
# predictions, gold: lists of cluster IDs per noun phrase
macro_f1 = mean(f1_per_cluster(p, g) for p, g in zip(predictions, gold))
micro_f1 = global_precision_recall_f1(predictions, gold)
pair_f1 = pair_f1_score(predictions, gold)
mean_f1 = (macro_f1 + micro_f1 + pair_f1) / 3
return {'macro_f1': macro_f1, 'micro_f1': micro_f1, 'pair_f1': pair_f1, 'mean_f1': mean_f1}
Common pitfalls
- The task is strictly unsupervised; no training data is used, so hyperparameters are tuned solely on the validation set.
- Initial evaluations only considered head entity mentions; tail mentions were added later, causing score discrepancies across benchmarks.
- Pair F1 is highly sensitive to cluster size imbalance and often reports significantly lower values than Macro/Micro F1 on the same dataset.
Evidence (verbatim from paper)
Following Galárraga et al. (2014a), we use the macro, micro, and pair F1 scores for evaluations. The task is unsupervised in nature, hence we do not possess any training data. For CanonicNell, we did a random 80:20 split of the triples into validation and test folds.
Citation
@misc{dash2020openkgcanonicalization,
title={Open Knowledge Graphs Canonicalization using Variational Autoencoders},
author={Dash et al. (2020)},
year={2020},
note={arXiv:2012.04780}
}
1---2name: entity-canonicalization-eval3description: Evaluates a model's ability to cluster entity mentions (noun phrases) into canonical forms within open knowledge graphs. It probes unsupervised representation learning and clustering capabilities without relying on manually annotated ground truth for training. Use when the user wants to benchmark on Base, Ambiguous, ReVerb45K, CanonicNell, or asks about evaluating this task. Reports Macro F1.4---56# entity-canonicalization-eval78> Open Knowledge Graphs Canonicalization using Variational Autoencoders — Dash et al. (2020) (arXiv:2012.04780, 2020)910## What this evaluates1112Evaluates a model's ability to cluster entity mentions (noun phrases) into canonical forms within open knowledge graphs. It probes unsupervised representation learning and clustering capabilities without relying on manually annotated ground truth for training.1314## Datasets1516- **Base** — total 290; splits: test (-1), val (-1); repo https://github.com/mallabiisc/cesi/17- **Ambiguous** — total 717; splits: test (-1), val (-1); repo https://github.com/mallabiisc/cesi/18- **ReVerb45K** — total 15500; splits: test (-1), val (-1); repo https://github.com/mallabiisc/cesi/19- **CanonicNell** — total 8700; splits: test (-1), val (-1); repo https://github.com/IBM/Open-KG-canonicalization2021## Metrics2223- `Macro F1` **(primary)** — range: [0, 1]24 - Averages the F1 score computed independently for each cluster, giving equal weight to clusters regardless of their size.25- `Micro F1` — range: [0, 1]26 - Aggregates true positives, false positives, and false negatives across all clusters to compute a global F1 score.27- `Pair F1` — range: [0, 1]28 - Evaluates clustering by considering all pairs of items. Counts true positives if pairs are in the same cluster in both predictions and gold, and false positives/negatives otherwise.2930## Input / output format3132**Input**: Noun phrases (entity mentions) from KG triples, optionally augmented with side information (e.g., IDF token overlap, pretrained embeddings, structural graph features).3334**Output**: A cluster identifier (canonical label) assigned to each noun phrase.3536## Scoring recipe3738```python39def compute_f1_metrics(predictions, gold):40 # predictions, gold: lists of cluster IDs per noun phrase41 macro_f1 = mean(f1_per_cluster(p, g) for p, g in zip(predictions, gold))42 micro_f1 = global_precision_recall_f1(predictions, gold)43 pair_f1 = pair_f1_score(predictions, gold)44 mean_f1 = (macro_f1 + micro_f1 + pair_f1) / 345 return {'macro_f1': macro_f1, 'micro_f1': micro_f1, 'pair_f1': pair_f1, 'mean_f1': mean_f1}46```4748## Common pitfalls4950- The task is strictly unsupervised; no training data is used, so hyperparameters are tuned solely on the validation set.51- Initial evaluations only considered head entity mentions; tail mentions were added later, causing score discrepancies across benchmarks.52- Pair F1 is highly sensitive to cluster size imbalance and often reports significantly lower values than Macro/Micro F1 on the same dataset.5354## Evidence (verbatim from paper)5556> Following Galárraga et al. (2014a), we use the macro, micro, and pair F1 scores for evaluations. The task is unsupervised in nature, hence we do not possess any training data. For CanonicNell, we did a random 80:20 split of the triples into validation and test folds.5758## Citation5960```bibtex61@misc{dash2020openkgcanonicalization,62 title={Open Knowledge Graphs Canonicalization using Variational Autoencoders},63 author={Dash et al. (2020)},64 year={2020},65 note={arXiv:2012.04780}66}67```6869- arXiv: 2012.04780