The dataset viewer should be available soon. Please retry later.
KG-to-KG Semantic Similarity
This dataset packages the benchmark introduced in Measuring Graph-to-Graph Semantic Similarity in Knowledge Graphs: An Empirical Evaluation of Knowledge Graph Embeddings. The source code and original research repository are available at https://github.com/SeungRyeolBaek/KG-to-KG-Semantic-Similarity.
The benchmark evaluates graph-to-graph semantic similarity for knowledge graphs (KGs). Each row contains one original KG and one meaning-preserving modified counterpart, with the correspondence inherited from an original text document and its modified version.
Supported Tasks and Intended Use
This dataset is intended for KG-to-KG retrieval, graph-level semantic similarity, and evaluation of embedding, text-based, or graph-kernel scoring methods. For each split, the ground-truth matching pair is the row-level pair identified by id; negatives can be formed from other rows in the same source dataset and modification setting.
It is not intended as a general-purpose news or Wikipedia text corpus. Original and modified source texts are intentionally not included in this Hugging Face package because redistribution terms for the CC-News source texts are unclear.
Dataset Configurations and Splits
There are two configurations:
cc_newswikitext
Each configuration has six splits:
| Split | Modification method | Setting | Rows |
|---|---|---|---|
synonym_30 |
synonym_replacement |
0.3 |
200 |
synonym_60 |
synonym_replacement |
0.6 |
200 |
context_30 |
context_replacement |
0.3 |
200 |
context_60 |
context_replacement |
0.6 |
200 |
dipper_60_0 |
dipper_paraphraser |
60_0 |
200 |
dipper_60_20 |
dipper_paraphraser |
60_20 |
200 |
Total packaged size is about 5.8 MB across 2,400 KG pairs.
Data Fields
All splits share the same schema:
id: Stable composite key, formatted as{source_dataset}:{modification_method}:{modification_setting}:{document_id}.document_id: Leading numeric document identifier from the source filenames.source_dataset: Eithercc_newsorwikitext.modification_method: One ofsynonym_replacement,context_replacement, ordipper_paraphraser.modification_setting: Source setting such as0.3,0.6,60_0, or60_20.split: Hugging Face split name.original_graph: Original KG JSON serialized as a lossless JSON string.modified_graph: Modified KG JSON serialized as a lossless JSON string.original_verbalized: Natural-language verbalization of the original KG.modified_verbalized: Natural-language verbalization of the modified KG.original_node_count,original_relationship_count: Basic graph size statistics for the original KG.modified_node_count,modified_relationship_count: Basic graph size statistics for the modified KG.source_files: JSON string containing source file paths in the GitHub repository layout.
original_graph and modified_graph are stored as strings to preserve the original graph JSON without normalizing away schema variation. Parse them with json.loads.
Dataset Construction
The source documents come from two text collections used in the paper:
- WikiText-2, loaded as
Salesforce/wikitext,wikitext-2-raw-v1. - CC-News, loaded as
cc_newswith length filtering in the public generation code.
Source texts were modified with three semantic-preserving transformation families: synonym replacement, context replacement, and DIPPER paraphrasing. KGs were extracted from original and modified documents, then each KG was verbalized. The paper reports using LLMGraphTransformer with GPT-3.5-turbo for KG extraction.
Original-Modified Correspondence
The benchmark ground truth is row-level correspondence. For example, in cc_news/synonym_30, row cc_news:synonym_replacement:0.3:1 pairs:
cc_news/graph/original_graph/1.jsoncc_news/graph/synonym_replacement/0.3/1.json
For WikiText, filenames include a leading numeric ID and a title. Some titles contain punctuation variants, so the packaging script validates pairing by numeric ID plus filename-stem matching where needed. Known duplicate original WikiText graph IDs are documented in MANIFEST.json; the final rows use the modified graph stem and available original text stem as tie-breakers.
Data Quality Checks
The conversion script validates that:
- every graph file parses as UTF-8 JSON;
- graph JSON has top-level
nodesandrelationshipskeys; - every packaged row has a required original graph, modified graph, original verbalization, and modified verbalization;
- row IDs are unique across the full output;
- Parquet files are written with identical schemas within each configuration;
- output files include SHA-256 checksums in
MANIFEST.json.
The inspected graph schema contains 3,599 JSON graph files. All have top-level nodes and relationships fields. Node objects mostly contain id, type, and properties, but some contain only id; this is why graph JSON is kept as a string.
Limitations and Biases
The KGs inherit limitations from the source corpora, text modification methods, and LLM-based KG extraction. KG extraction can introduce missing entities, hallucinated entities, relation normalization errors, or inconsistent node typing. The benchmark measures whether methods recover constructed original-modified correspondences; it should not be interpreted as a complete measure of factual KG equivalence.
The source corpora are English and may encode topical, geographic, temporal, and publisher-specific biases. CC-News contains news text from web publishers, and WikiText-2 derives from Wikipedia articles.
Licensing and Redistribution Notes
No license file was found in the inspected GitHub checkout. This Dataset Card therefore uses license: other and does not invent a new license.
WikiText is listed on Hugging Face with Creative Commons/GFDL licensing. CC-News redistribution of article text is less clear. To reduce redistribution risk, this Hugging Face package excludes original and modified text documents and publishes KG JSON strings, KG verbalizations, source-file traceability, and reproducible generation code references. Users who need the original texts should regenerate them from the upstream sources according to their applicable terms.
The licensing status of the derived KGs and verbalizations should be confirmed by the dataset owner before public upload.
Loading Examples
Load all splits for one configuration:
from datasets import load_dataset
dataset = load_dataset(
"seungryeol-22/KG-to-KG-Semantic-Similarity",
"cc_news",
)
print(dataset)
Load a single split:
from datasets import load_dataset
split = load_dataset(
"seungryeol-22/KG-to-KG-Semantic-Similarity",
"wikitext",
split="dipper_60_20",
)
Parse a graph:
import json
row = split[0]
original_graph = json.loads(row["original_graph"])
modified_graph = json.loads(row["modified_graph"])
print(original_graph["nodes"][0])
Local validation before upload:
from datasets import load_dataset
dataset = load_dataset("./hf_dataset", "cc_news")
Paper, Code, and Citation
Paper: https://arxiv.org/abs/2606.29180
Code: https://github.com/SeungRyeolBaek/KG-to-KG-Semantic-Similarity
@misc{baek2026measuring,
title = {Measuring Graph-to-Graph Semantic Similarity in Knowledge Graphs: An Empirical Evaluation of Knowledge Graph Embeddings},
author = {Baek, Seungryeol and Sim, Wooseok and Park, Hogun},
year = {2026},
eprint = {2606.29180},
archivePrefix = {arXiv},
primaryClass = {cs.AI},
doi = {10.48550/arXiv.2606.29180}
}
- Downloads last month
- 66