checkpoint_KKG / README.md
PhaaNe's picture
Dataset card: fix the ablation step
0224d62 verified
|
Raw History Blame Contribute Delete
4.5 kB
---
license: other
license_name: original-source-licences
pretty_name: KGGuard+W checkpoints and reproduction artifacts
tags:
- knowledge-graph
- error-detection
- fact-checking
- reproducibility
language:
- en
size_categories:
- 1K<n<10K
---
# KGGuard+W: checkpoints and reproduction artifacts
This repository holds every artifact needed to reproduce the results of **KGGuard+W**, a method that detects erroneous facts in knowledge graphs. It covers DBpedia Accuracy and FactBench. Code: GitHub `coderkhongodo/KGG` (see its README).
KGGuard+W does **not** train a neural network of its own. Seven label-free evidence sources are calibrated into log-likelihood ratios around a hierarchical predicate prior, then combined by a cross-fitted, monotone boosted GAM:
- **C:** SHACL constraints
- **S:** structural anomaly (Isolation Forest)
- **S_sup:** relation-conditional structural support
- **M:** sentence similarity
- **T:** text mention
- **N:** NLI on entity descriptions
- **W:** NLI on retrieved web passages
The learned state, i.e. the "checkpoint", is the fitted fusion model. Missing evidence contributes exactly 0, and per-source contributions are exact.
## Contents
| Path | What |
|---|---|
| `checkpoints/<dataset>/<run>/kgguard_plus_w_seed<s>.joblib` | final fusion model (KGGuard+W) per dataset × run × seed; `.json` = readable description |
| `checkpoints/<dataset>/<run>/kgguard_plus_kg_only_seed<s>.joblib` | the same model without web evidence (KGGuard+) |
| `checkpoints/verified_metrics.csv` | test metrics of every checkpoint; they equal the reported ones (refit check ≤ 1e-9) |
| `outputs/<dataset>/<run>/scores/` | every cached evidence and baseline score, including LLM zero-shot, FactCheck (DKA, GIV-F, RAG, consensus), TransE, ComplEx, CAGED, PaTyBRED, SDValidate |
| `data/raw`, `data/interim`, `data/interim_ms` | raw and processed facts, frozen splits, context graphs; `interim_ms` = the 5 fresh splits |
| `data/cache` | SPARQL / HTTP responses, encoder embeddings, NLI and LLM / FactCheck answers, retrieved web passages |
| `reference/<dataset>/<run>/` | reported results (E1–E7) used for comparison; `reference/summaries/`: multi-split, robustness, label efficiency, paper tables |
| `explanations/<dataset>/<run>/` | alert lists with per-source explanations, test predictions |
| `MANIFEST.json` | sha256 of every file, library versions, code commit |
Runs:
- `v7` is the design split, with seeds 13, 42 and 2027.
- `ms7_s101` … `ms7_s505` are five fresh grouped splits, each with seed 13.
## Reproduce
```bash
git clone https://github.com/coderkhongodo/KGG.git && cd KGG
pip install -e ".[dev,hf]"
PYTHONPATH=src python scripts/reproduce_from_hf.py --local-dir hf_checkpoint --full-e1 --ablation
```
The script:
1. downloads this repository and verifies every file against `MANIFEST.json`;
2. reloads every checkpoint, scores the test facts and compares AP, AUROC, F1 and BAcc with the reported values;
3. refits every model from the downloaded scores and compares again;
4. with `--full-e1`, re-runs the full main comparison (all baselines, 3 seeds, bootstrap);
5. with `--ablation`, re-runs the ablation of the proposed method (15 variants, design split and 5 fresh splits).
No network access, LLM or GPU is needed.
**Verified** on a fresh clone with an anonymous download, on CPU (32 threads):
| Check | Result |
|---|---|
| sha256 of all 3,860 files | 0 mismatches |
| 32 checkpoints, inference | AP / AUROC / F1 / BAcc identical (0 difference) |
| 32 checkpoints, retrained from the downloaded scores | identical |
| full E1 (29 methods x 3 seeds x 2 datasets) | identical |
| ablation (240 rows) | identical |
Checkpoints are pickles (joblib). Load them only if you trust the source, preferably with the same scikit-learn version:
- Python 3.12
- scikit-learn 1.9.1
- numpy 2.5.4
- pandas 3.1.1
## Main results (test AP, mean of 3 seeds)
| | DBpedia Accuracy | FactBench |
|---|---|---|
| best published baseline | 0.257 (LLM zero-shot) | 0.834 (FactCheck-RAG) |
| CAGED (CIKM'22) | 0.142 | 0.533 |
| **KGGuard+W** | **0.470** | **0.928** |
## Data sources and licences
Redistributed for reproducibility, under the licences of the original sources:
- **DBpedia Accuracy** (Marchesin, Silvello, Alonso, HCOMP 2024) and DBpedia context data: CC BY-SA.
- **FactBench** (DeFacto, AKSW).
- **Web passages** retrieved from the FactCheck corpus (SIGIR'25 / EDBT'26).
Please cite the original datasets when you use them.