--- pretty_name: FACTPROP — Connected Factual Knowledge Graph language: - en license: cc-by-4.0 size_categories: - 100K {row["object_node_label"]}') print("Question:", row["question"]) print("Statement:", row["surface"]) print("Object connectivity:", row["object_forward_in_degree"]) ``` Pin the data revision for a reproducible experiment: ```python edges = load_dataset( "factprop/FACTPROP", "knowledge_graph", split="knowledge_edges", revision="", ) ``` ## Common recipes ### Find all facts involving an entity ```python entity = "Apple Inc." connected = edges.filter( lambda row: ( row["subject"] == entity or row["object_node_label"] == entity ) ) print( connected.select_columns( ["subject", "relation", "object_node_label"] )[:20] ) ``` For incoming facts only: ```python incoming = edges.filter(lambda row: row["object_node_label"] == entity) print("Incoming forward facts:", incoming.num_rows) ``` ### Filter by relation or knowledge category ```python birth_facts = edges.filter(lambda row: row["relation"] == "BirthDate") work_facts = edges.filter(lambda row: row["group"] == "Work") ``` ### Use questions and statements for retrieval or QA research ```python qa_edges = edges.filter( lambda row: row["question"] is not None and row["surface"] is not None ) qa_view = qa_edges.select_columns( ["subject", "relation", "object", "question", "surface"] ) ``` Do not assume these rows are independent examples. Split by connected entities or graph components when entity leakage would invalidate an evaluation. ### Reconstruct the forward graph with NetworkX ```bash python -m pip install datasets networkx ``` ```python import networkx as nx from datasets import load_dataset edges = load_dataset( "factprop/FACTPROP", "knowledge_graph", split="knowledge_edges", ) graph = nx.DiGraph() for row in edges: graph.add_edge( row["subject"], row["object_node_label"], relation=row["relation"], question=row["question"], surface=row["surface"], confidence=row["confidence"], group=row["group"], ) print(graph.number_of_nodes()) # 100015 print(graph.number_of_edges()) # 357205 print(graph.in_degree("Apple Inc.")) # 467 ``` Using `object_node_label` reconstructs all 100,015 nodes and all 357,205 canonical forward edges. It does not restore the excluded inverse traversal edges, stored evidence, or checkpoint construction state. Use `factprop_graph_v1.pkl` when those are required. ### Explore a local multi-hop neighborhood ```python entity = "Apple Inc." undirected_view = graph.to_undirected(as_view=True) distance = nx.single_source_shortest_path_length( undirected_view, entity, cutoff=2, ) one_hop = [node for node, hops in distance.items() if hops == 1] two_hop = [node for node, hops in distance.items() if hops == 2] ``` Directed and undirected distances answer different research questions. Record the chosen convention; do not assume this generic example reproduces a specific FACTPROP paper protocol. ### Analyze relation and connectivity distributions ```python from collections import Counter relation_counts = Counter(edges["relation"]) group_counts = Counter(value for value in edges["group"] if value is not None) ``` For the complete node-level degree distribution, load the unchanged entity index directly: ```python from datasets import load_dataset from huggingface_hub import hf_hub_download path = hf_hub_download( "factprop/FACTPROP", "data/entities.jsonl", repo_type="dataset", ) all_nodes = load_dataset("json", data_files=path, split="train") ``` ## Curated entity index The optional `curated` split is intended for readable entity-level browsing: ```python from datasets import load_dataset entities = load_dataset( "factprop/FACTPROP", "entity_index", split="curated", ) matches = entities.filter(lambda row: row["qid"] == "Q312") print(matches[:]) ``` Its fields are: | Field | Meaning | | --- | --- | | `label` | Original graph-node label | | `qid` | Wikidata QID | | `forward_object_in_degree` | Forward facts pointing to this node | | `qid_node_count` | Number of graph-node records sharing this QID | The curated view requires a standard QID and a readable label. It excludes unresolved and numeric-only labels. It is therefore useful for browsing but must not be treated as the complete node set or as a quality-certified subset. ## Download the canonical connected graph ### Download everything with the Hugging Face CLI ```bash python -m pip install huggingface_hub hf download factprop/FACTPROP \ --repo-type dataset \ --local-dir FACTPROP-data ``` This downloads the complete release, including: ```text FACTPROP-data/ ├── factprop_graph_v1.pkl ├── LICENSE_DATA ├── THIRD_PARTY_NOTICES.md ├── data/ │ ├── knowledge_edges.parquet │ ├── entities_curated.parquet │ ├── entities_curated.jsonl │ └── entities.jsonl ├── metadata/ ├── GRAPH.md ├── load_graph.py └── SHA256SUMS ``` ### Download everything with Python ```python from huggingface_hub import snapshot_download snapshot_download( repo_id="factprop/FACTPROP", repo_type="dataset", local_dir="FACTPROP-data", ) ``` ### Download and verify only the graph checkpoint ```bash python -m pip install networkx huggingface_hub python load_graph.py ``` The included loader downloads `factprop_graph_v1.pkl`, verifies SHA-256, and returns `payload["graph"]`. Python pickle loading can execute code. Load only the checkpoint from this trusted repository and verify: ```text 437a434260edbb019c85575d65b4775cb2461f145e17966ee3acc8e4625ce7c8 ``` See [GRAPH.md](GRAPH.md) for the complete checkpoint schema. ## Canonical checkpoint contents `factprop_graph_v1.pkl` contains a dictionary: ```text payload ├── graph # NetworkX DiGraph ├── state ├── seed_entities ├── validator_state └── scheduler_stats ``` The graph has 100,015 nodes and 432,562 stored directed edges. Edge attributes include: ```text relation, question, surface, evidence, confidence, group, is_inverse ``` Use `is_inverse is not True` when selecting original forward facts or reproducing FACTPROP popularity. Counting total NetworkX in-degree without this filter mixes forward facts with auxiliary traversal edges. ## BCE dates and numeric labels The canonical graph stores BCE year literals as negative internal labels: ```text Ancient Egypt --FoundingDate--> -3100 ``` The edge `surface` expresses the readable meaning: approximately 3100 BCE. These values are date literals, not negative row IDs, negative connectivity, or corrupted entity indices. To avoid two nearly identical target columns, `knowledge_edges` retains only the canonical `object_node_label`, such as `-3100`, and marks it as `object_type="date_literal"`. Use the `surface` field when a human-readable BCE expression is needed. ## Recommended uses FACTPROP is suitable for: - Knowledge updating and collateral-error propagation studies. - Knowledge-graph topology and degree-distribution analysis. - Entity connectivity and structural popularity research. - Graph-aware retrieval and RAG experiments. - Relation-conditioned factual QA dataset construction. - Knowledge-editing neighborhood and multi-hop evaluation design. - Robustness, forgetting, and rehearsal-strategy research. The graph can serve as an empirical, real-world-derived factual network. It should not be described as a complete or statistically unbiased distribution of world knowledge. ## Evaluation and split guidance This release intentionally does not impose train, validation, or test splits. Appropriate splitting depends on the task. For predictive experiments: - Avoid random edge splits when the same entities on both sides would create leakage. - Consider entity-disjoint, relation-aware, temporal, or connected-component splits. - Keep knowledge-update targets separate from ripple evaluation facts. - Record whether auxiliary inverse edges are included. - Record how literals, missing QIDs, and duplicate QIDs are handled. - Pin the dataset revision and publish generated split IDs. ## Coverage, quality, and limitations - The graph uses LLM-generated, Wikipedia-oriented factual candidates and Wikidata validation; it is not an exhaustive model of world knowledge. - Construction choices—including seed entities, relation inventory, expansion policy, and validation coverage—shape the observed distribution. - A stored edge should not be treated as permanently or universally correct. Facts can be time-sensitive, approximate, disputed, or affected by source limitations. - `confidence` is a construction-time field, not a calibrated probability or human annotation score. - 33,901 graph-node records have no QID mapping. - 5,037 QIDs occur in more than one graph-node record. - Missing QIDs do not imply missing nodes, low connectivity, or degree zero. - Duplicate-QID nodes must be reviewed separately. Do not automatically sum their degrees or choose the maximum. - Some expected mappings, including the Java and Python programming languages, are absent from the current mapping. - The curated entity split is a display filter, not a gold quality label. - Experiment inputs, model checkpoints, and complete paper outputs are not included. These limitations are part of the released graph version. Mapping corrections should be maintained as separately reviewed records rather than silently replacing original nodes. ## Reproducibility checklist For a reproducible use of FACTPROP, record: - Hub revision or commit ID. - Checksum of each downloaded artifact. - Whether `knowledge_edges` or the canonical checkpoint was used. - Whether inverse edges were included. - Directed or undirected traversal convention. - QID deduplication policy. - Literal/date normalization policy. - Entity, relation, and graph-component split policy. - Any filtering or mapping corrections. Run checksum verification from the downloaded repository: ```bash shasum -a 256 -c SHA256SUMS ``` On Linux, use: ```bash sha256sum -c SHA256SUMS ``` ## File inventory | File | Purpose | | --- | --- | | `factprop_graph_v1.pkl` | Canonical connected NetworkX graph | | `LICENSE_DATA` | Dataset license notice and attribution requirements | | `THIRD_PARTY_NOTICES.md` | Upstream provenance and source-specific terms | | `data/knowledge_edges.parquet` | All forward knowledge connections for safe, efficient analysis | | `data/entities_curated.parquet` | Viewer-ready mapped entity summary | | `data/entities_curated.jsonl` | Equivalent JSONL curated summary | | `data/entities.jsonl` | Complete original-order entity index | | `browser-index.json` | Index used by the FACTPROP website | | `GRAPH.md` | Canonical checkpoint schema | | `load_graph.py` | Checksum-verifying checkpoint loader | | `metadata/graph.json` | Graph counts, thresholds, export date, and source checksum | | `metadata/release.json` | Release and mapping statistics | | `SHA256SUMS` | Artifact integrity checksums | ## Provenance and versioning The released construction code uses `gpt-4o-mini` to generate candidate triplets and natural-language fields, then validates supported relations through Wikidata API and SPARQL queries. Project materials describe these candidates as Wikipedia-derived; the released builder does not directly ingest Wikipedia article text. The entity popularity index was exported from the unchanged paper graph, and its source checksum is retained in `metadata/graph.json`. `knowledge_edges` contains every forward edge from the checkpoint and uses the canonical target label in `object_node_label`. Topology and connectivity metrics are derived directly from the canonical graph. No graph nodes, mappings, edge topology, or checkpoint metadata were changed for this release. Use a Hub revision to freeze data. Proposed mapping corrections or enhanced versions should use a new versioned artifact rather than overwrite `factprop_graph_v1.pkl`. ## License FACTPROP is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/), subject to third-party rights and source-specific terms. The license covers the FACTPROP authors' original graph compilation, generated natural-language metadata, derived tables, documentation, and applicable database rights. It does not relicense Wikidata content, third-party materials, names, trademarks, personality rights, or facts that are not protected by copyright. When redistributing or adapting the dataset: 1. Credit the FACTPROP authors. 2. Cite the work below and link to this dataset repository. 3. Link to CC BY 4.0. 4. Indicate whether changes were made. See [LICENSE_DATA](LICENSE_DATA) for the license notice and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for Wikidata, Wikipedia, and model-output provenance. ## Citation Until a public paper identifier is available, cite the dataset as: ```bibtex @dataset{zhang2026factprop, title = {FACTPROP: A Connected Factual Knowledge Graph}, author = {Yuji Zhang and Weibing Wang and Cheng Qian and Duo Zhou and Dilek Hakkani-Tür and Kathleen McKeown and Chengxiang Zhai and Heng Ji}, year = {2026}, publisher = {Hugging Face}, url = {https://huggingface.co/datasets/factprop/FACTPROP}, note = {Dataset for ``Popular Knowledge Propagates More Errors in LLM Knowledge Updating''} } ```