Datasets:
Languages:
English
Size:
1K<n<10K
ArXiv:
Tags:
temporal-reasoning
knowledge-graph
question-answering
benchmark
retrieval-augmented-generation
DOI:
License:
File size: 14,230 Bytes
ad8ea76 d5194d7 b9bc266 ad8ea76 210b340 b9bc266 ad8ea76 7478a86 ad8ea76 b9bc266 ad8ea76 210b340 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 | ---
license: cc-by-4.0
language:
- en
tags:
- temporal-reasoning
- knowledge-graph
- question-answering
- benchmark
- retrieval-augmented-generation
pretty_name: TempBench — Temporal KGQA benchmark with per-question gold subgraphs
size_categories:
- 1K<n<10K
---
# TempBench
A multi-hop temporal knowledge-graph question-answering benchmark built so that
**retrieval quality is measurable independently of answer accuracy**.
8,710 questions over a Wikidata-derived temporal knowledge graph. Every question
ships a gold supporting subgraph and two typed negatives, across a 4×3
temporal-operator × hop-complexity matrix.
Accompanies:
> Guendalina Caldarini. 2026. *TempBench: A Temporal Knowledge-Graph QA Benchmark
> with Per-Question Gold Subgraphs and Retrieval-Quality Metrics.* In Proceedings
> of the 35th ACM International Conference on Information and Knowledge Management
> (CIKM '26), November 07–11, 2026, Rome, Italy.
> https://doi.org/10.1145/3799682.3840181
## What makes it different
Most temporal KGQA corpora ship answer strings only, so they can score whether a
system was *right* but not whether it retrieved evidence that was **valid at the
query time**. TempBench ships, per question:
- `S*` — the gold supporting subgraph
- `S_dist` — a **distractor**: same `(s,r)`, wrong object
- `S_stale` — a **stale fact**: same `(s,r,o)`, wrong time
so a system that reaches the right answer through a stale-but-coincidentally-correct
fact is visibly distinguishable from one that retrieved correctly.
Negatives are *functional* (genuinely differ from `S*`) for 71.5% / 81.3% of
questions; the interval × stale cell is structurally absent (8.1%), since interval
answers are years and a same-`(s,r,o)`-other-time variant is ill-defined.
**Per-question flags ship in `benchmark/functional_negatives.jsonl`** — restrict
negative-dependent evaluation to the functional subset.
## Composition
Counts by temporal operator and hop complexity, over the full 8,710 questions
(the 70/10/20 train/dev/test split is stratified by complexity):
| Operator | 1-hop | 2-hop | 3+-hop | Total |
| --- | ---: | ---: | ---: | ---: |
| Point-in-time | 1,349 | 1,259 | 274 | 2,882 |
| Before/after | 1,135 | 1,065 | 131 | 2,331 |
| Interval | 403 | 435 | 26 | 864 |
| Sequence | 1,113 | 1,241 | 279 | 2,633 |
| **Total** | **4,000** | **4,000** | **710** | **8,710** |
The 3+-hop column is structurally capped, not undersampled. `tkgl-smallpedia`
is point-in-time, so a *k*-hop chain needs every hop valid in the same year, and
Wikidata's year-density around an anchor entity is 0–3 facts/year — long chains
that also satisfy answer-uniqueness are simply rare. Validity-window TKGs
(YAGO3, ICEWS) would lift this.
## Quickstart
Three steps, standard library only, no install. Scoring your own retriever
against TempBench does **not** require the reference system.
**1. Load.** Each line of `benchmark/benchmark_labelled.jsonl` is one question
carrying its gold subgraph `S*` and its two typed negatives:
```python
import json
test = [json.loads(l) for l in open('benchmark/benchmark_labelled.jsonl',
encoding='utf-8')]
test = [q for q in test if q['split'] == 'test'] # 1,743 questions
q = test[0]
q['question'] # 'In 1994, what was ... ?'
q['t_query'] # 1994.0 -- the time the question is asked about
q['S_star'] # [{'s':..., 'r':..., 'o':..., 't_start':..., 't_end':...}, ...]
q['S_dist'] # same (s,r), wrong object
q['S_stale'] # same (s,r,o), wrong time
```
**2. Retrieve** with your own system. Return an iterable of triples per
question — dicts with `s`/`r`/`o`/`t_start`/`t_end`, or 5-tuples in that order.
Truncate to your own `k`; TRP is a precision quantity and is not truncated for
you.
**3. Score** with `code/tempbench_eval.py`:
```python
from tempbench_eval import score_question, aggregate
rows = [score_question(q, my_retriever(q['question'], q['t_query']))
for q in test]
print(aggregate(rows))
# {'n_questions': 1743, 'coverage': ..., 'TRP_macro': ..., 'CCR': ...,
# 'by_complexity': {...}, 'by_operator': {...}}
```
`python code/tempbench_eval.py` runs a self-check on synthetic data and needs
no files.
### What the two metrics mean
Both are **answer-independent** — they score retrieved evidence, not the
generated string, which is the whole point of the resource. A system can emit
the right answer from a stale fact, and exact-match cannot see it.
- **TRP** — of the triples you retrieved, the fraction that are in `S*` *and*
valid at `t_query`. Macro-averaged over questions that retrieved anything.
- **CCR** — 1 if you retrieved *every* triple of `S*`, all time-valid; else 0.
Averaged over all questions, empty retrievals included.
A triple is time-valid when `t_start <= t_query <= t_end`. TRP scores against
1–3-triple gold chains, so its absolute value is low by construction: read the
gap between systems and the per-complexity profile, not the raw number. The two
are not redundant — the reference retriever scores TRP 0.203 against CCR 0.014
at 3+-hop, meaning partial evidence arrives routinely and the full chain almost
never.
Always report `coverage` alongside them. A system that returns nothing on hard
questions inflates its own TRP, since undefined TRP is excluded rather than
scored zero.
### The one trap
**Restrict negative-dependent analysis to the functional subset.** Not every
question's negatives genuinely differ from its gold. Scoring the stale subgraph
directly on the 1-hop test slice returns TRP 0.141 — which looks like a
time-aware retriever leaking, and is not:
```python
flags = {json.loads(l)['id']: json.loads(l)
for l in open('benchmark/functional_negatives.jsonl', encoding='utf-8')}
sub = [q for q in test if flags[q['id']]['stale_functional']]
```
Restricted to functional negatives, the same measurement returns **TRP 0.000 /
CCR 0.000**, as the construction implies. The 0.141 was entirely
non-functional negatives.
Read `v1.0.1-addendum.md` before evaluating: interval questions leak their
answer under the original prompt protocol.
## Contents
| path | what |
| --- | --- |
| `benchmark/benchmark_labelled.jsonl` | the benchmark, human-readable labels |
| `benchmark/benchmark.jsonl` | same, pre-label-resolution (raw QIDs/PIDs) |
| `benchmark/functional_negatives.jsonl` | per-question functional-negative flags |
| `benchmark/labels.tsv`, `ids.txt` | Wikidata label dump and id list |
| `code/` | the **deterministic construction pipeline** — indexer, 6-stage benchmark builder, label resolver, and the design-decisions document. Stdlib only; `python build_benchmark.py --smoke_test` verifies it |
| `code/tempbench_eval.py` | **the TRP and CCR scorers** — score your own retriever without re-implementing the definitions. Stdlib only; `python tempbench_eval.py` self-checks |
| `annotation/` | the annotation protocol (EN governing, IT translation) and validation-sample provenance |
| `annotation/pilot_low_confidence.jsonl` | per-question **low-confidence flags** for the 500-question IAA pilot: 452 consensus, 48 flagged, with which judgment was disputed |
| `baselines/` | reference-baseline evaluation outputs (see below) |
| `paper-supplement/` | material cut from the 4-page camera-ready: the composability closed-form proof, construction details, and two tables |
| `v1.0.1-addendum.md` | **known issues and evaluation protocol — read this before evaluating** |
### Reference baselines
`baselines/` carries the evaluation outputs behind the paper's empirical claims,
so each is reproducible without re-running anything:
- `bm25-anchor*.json` — BM25 retrieval with and without the temporal filter
- `bm25-rag-qwen3*.json` — vanilla BM25-RAG end-task baseline, including at
matched decode budget
- `v2-grpo-10000.json` — a **no-retrieval** system; this is the file behind the
interval answer-leakage finding (overall EM 0.364, interval EM 1.000)
- `v3-sft-{baseline,3hop}*.extracted.json` — 2-hop vs 3-hop reference-generator
outputs and their seed replicas, behind the 3+-hop comparison
(3-seed mean +0.051 ± 0.083 EM, item-level 95% CI [−0.040, +0.138])
## Known issues
**Interval questions leak their answer under the submitted evaluation protocol.**
Every interval question sets `t_query` to the gold answer year (864/864 interval
items), and prompts that render `<t={t_query}>` therefore make the interval slice
answerable by copying the timestamp. Interval is 9.92% of the benchmark. The gold
subgraphs are unaffected — this is a protocol defect, not an annotation defect.
**Do not render the time tag on interval questions, and do not read interval
EM = 1.000 as a capability result.** Full detail, scope per split, and the
corrected protocol are in `v1.0.1-addendum.md`.
**Naturalness ratings are not reliable between annotators** and should not be used
as a quality signal; see the paper's Human Validation section.
**Only the test split is human-validated.** Validation covers the 500-question
pilot plus a 120-item blind round (116 scored) drawn from the test split. The
6,096-question training split carries automatically generated labels that no
human has checked. This is defensible for the benchmark's intended use — every
number in the paper is computed on test, and none of the reference baselines
trains on the released split — but if you fine-tune on `train`, you are training
on unaudited labels. Treat the pipeline's construction guarantees, not human
review, as what backs that split.
**Question surface forms come from nine templates** — three for point-in-time,
two each for before/after, interval and sequence — parameterised over anchor
entity, relation chain and reference year. Linguistic diversity is therefore
low by construction, and TempBench measures temporal *retrieval*, not robustness
to paraphrase. Do not read a score here as evidence about natural-language
variation. (Full template inventory and parameters in
`code/benchmark-design-decisions.md`.)
**The source KG is point-in-time, so `valid_at` reduces to exact-year
equality.** `tkgl-smallpedia` carries discrete-timestamp facts
(`t_start == t_end`), which means the composability operator ⊕ is exercised here
in its degenerate case: checking that each hop is valid at the query year. The
operator is defined for interval facts and admits chains that a plain interval
intersection rejects, but **the released benchmark does not test that generality**
— a validity-window TKG (YAGO3, ICEWS) would. Treat results here as evidence
about time-valid retrieval on point-in-time graphs, and not yet as evidence
about general temporal-chain reasoning.
## Open questions this release does not answer
Stated plainly, because they bound what a number on TempBench means.
**Whether the benchmark discriminates across retriever families is not yet
established.** Every system evaluated in the paper is a variant of one
BFS + BM25 retriever — the same graph-traversal family used to *construct* `S*`
by shortest-path retrieval under temporal constraints. High CCR may therefore
partly reflect that methodological alignment rather than retrieval quality, and
no heterogeneous system has been run: no dense retriever, no published
temporal-RAG system, no parametric-LLM baseline.
This is the most important open question about the resource, and it is
squarely future work. The metrics ship here (`code/tempbench_eval.py`)
specifically so that anyone can run a system from a different family and
report TRP/CCR without going through the reference implementation — which is
the cheapest path to settling it. Results from an unrelated architecture are
more informative about the benchmark than anything the reference retriever can
produce, and contributions are welcome.
**A validity-window edition (v2).** Extending construction to interval-fact TKGs
would exercise ⊕ in its general form and test whether the retrieval findings
survive outside exact-year matching. When porting, check the source data's
closed-interval convention against `valid_at`'s semantics first — the two do not
always agree.
## Provenance and licence
Built from `tkgl-smallpedia` in [TGB 2.0](https://arxiv.org/abs/2406.09639)
(Gastinger et al., NeurIPS 2024 Datasets and Benchmarks), which is derived from
Wikidata. Questions are generated algorithmically by an extended
[TimelineKGQA](https://arxiv.org/abs/2501.04343) generator; gold, distractor and
stale-fact subgraphs are built by deterministic graph procedures and then
human-validated.
**TempBench is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).**
Attribution is the only condition: cite the paper below.
What TempBench draws from upstream is Wikidata **structured data** — triples and
entity labels — which is CC0, so nothing upstream imposes share-alike here. (TGB
2.0's Appendix B lists `tkgl-smallpedia` under the "Wikidata License": CC0 for the
property and lexeme namespaces, CC BY-SA for other text; TempBench uses the former.
TGB's `tkgl-icews`, which carries a research/education-only licence, is **not** used
here.) The question generation, subgraph construction, functional-negative flags and
annotation protocol are this work's own contribution and are what CC BY 4.0 covers.
This matches the paper itself, which is published open access under CC BY.
## Citation
```bibtex
@inproceedings{caldarini2026tempbench,
title = {{TempBench}: A Temporal Knowledge-Graph QA Benchmark with
Per-Question Gold Subgraphs and Retrieval-Quality Metrics},
author = {Caldarini, Guendalina},
booktitle = {Proceedings of the 35th ACM International Conference on
Information and Knowledge Management (CIKM '26)},
year = {2026},
doi = {10.1145/3799682.3840181}
}
```
Dataset DOI: [`10.57967/hf/10071`](https://doi.org/10.57967/hf/10071)
(revision `ad8ea76`).
|