Time in a Knowledge Graph
Why a triple has nowhere to put a validity interval, the four places engineers put it anyway and what each costs, and how temporal link prediction splits into two different tasks with two different evaluation traps.
The triple :acme :ceo :alice was true from June 2019 until March 2023. The data model has nowhere to write that down. Subject, predicate, object: three slots, all taken. Every temporal knowledge graph in production is therefore a workaround, and the choice of workaround determines query shape, store size and whether the history can be audited at all.
Two clocks, not one
Before choosing a representation, separate the two things being timestamped.
Valid time is when the fact held in the world. Alice was CEO from 2019-06 to 2023-03. Transaction time is when the system came to believe it. The graph learned of Alice's appointment on 2019-06-14 and learned of her departure on 2023-04-02, three weeks late.
Questions about the world need valid time; questions about the system need transaction time. "Who did we think was CEO when we filed that report in January 2023" is answerable only with both, which is what bitemporal means. Conflating them is the classic defect in audit-facing graphs, and it shows up as an inability to reproduce a report that was correct when it was produced.
Where the timestamp goes
Four representations, in rough order of age.
Standard reification. An rdf:Statement node with rdf:subject, rdf:predicate and rdf:object, plus the temporal properties. One fact becomes four or more triples, the original triple is no longer asserted unless you also assert it, and every query about the fact gains three joins.
Named graphs. Put the triple in a graph whose IRI carries the interval, and timestamp the graph instead of the statement. This is the cheapest option and the standard trick in quad stores, because the fourth column already exists. It is also coarse: every triple in the graph shares one interval, so facts with different lifetimes need different graphs, and a graph per fact is reification with extra steps.
N-ary statement nodes. Wikidata's model: the statement is a first-class node carrying qualifiers (start time, end time, point in time) and references. More verbose than a triple and far more queryable than reification, because the qualifiers are ordinary properties of an ordinary node.
RDF 1.2 triple terms. The standards-track answer, allowing a triple to appear as the object of another triple, with rdf:reifies as the conventional predicate. As of 2026 it is still a Working Draft; the RDF and SPARQL Working Group that owns it is chartered from 1 May 2025 to 30 April 2027 (W3C, RDF 1.2 Concepts and Abstract Syntax, Working Draft). Writing production tooling against it today means writing against a moving target.
Property graphs avoid the problem rather than solving it: an edge carries properties natively, so validFrom and validTo are just two more fields on the relationship. That is a genuine modelling advantage and part of why the property-graph camp got its own ISO query language, GQL, published as ISO/IEC 39075 in April 2024 (ISO/IEC 39075:2024, Information technology, Database languages, GQL).
Prediction over a moving graph
Temporal knowledge graph completion generalises the triple to a quadruple \((s, r, o, t)\), and the task splits in two.
Interpolation fills gaps inside the observed time window: the graph covers 2010 to 2020 and the missing fact belongs to 2015. Extrapolation forecasts beyond the last observed timestamp, which is a different problem with different machinery, because nothing in the training window constrains the answer directly.
The standard benchmarks divide along the same line. ICEWS14 and ICEWS05-15 are political-event graphs with day-resolution timestamps; YAGO11k and Wikidata12k carry mostly interval annotations and are usually posed as interpolation (A Survey on Temporal Knowledge Graph Completion: Taxonomy, Progress, and Prospects, 2023, arXiv:2308.02457). The model families run from HyTE's time-specific hyperplanes and the sequence-encoder approach of García-Durán et al., 2018, Learning Sequence Encoders for Temporal Knowledge Graph Completion through to the order-4 tensor decompositions TComplEx and TNTComplEx, which add a timestamp mode to ComplEx along with a regulariser that pushes adjacent time embeddings to be similar (Lacroix et al., 2020, Tensor Decompositions for Temporal Knowledge Base Completion, ICLR).
The gap between generations is large. One comparison table puts HyTE at 29.7 MRR on ICEWS14 against 61.0 for TComplEx, and 31.6 against 66.0 on ICEWS05-15. Those figures come from a single paper's reproduction table rather than from the original publications, so treat the ordering as reliable and the exact values as indicative.
When it breaks
Interval endpoints are mostly missing. Real sources record when something started far more often than when it ended, so a large share of intervals are half-open and the model has to distinguish "still true" from "unknown end". Much of what makes YAGO11k hard is this, not the modelling.
The evaluation protocol assumes a closed world. Ranking the held-out quadruple against all unobserved quadruples scores every missing-but-true fact as a competitor, so MRR and Hits@k are pessimistic by an amount nobody measures (Yang et al., 2022, Rethinking Knowledge Graph Evaluation Under the Open-World Assumption, NeurIPS). For temporal graphs specifically the protocols have additional defects that change model rankings once corrected (Jain et al., 2020, Temporal Knowledge Base Completion: New Algorithms and Evaluation Protocols, EMNLP).
Reification multiplies the store. Four or more triples per fact, plus the joins on every read. On a graph where most facts are temporal, this is a three-to-fivefold increase in size before indexes.
Granularity mismatch across sources. One feed gives days, another gives years, a third gives "2019-ish" in free text. Normalising upward loses precision you needed; normalising downward invents precision you do not have.
Erasure versus append-only history. A bitemporal store is append-only by construction, which is exactly what a data-subject deletion request forbids. The resolution is physical deletion with a tombstone in the transaction-time log, and it has to be designed in, not retrofitted.
References and further reading
Every source this page cites, in the order it cites them. All of them open in a new tab.
- W3C, RDF 1.2 Concepts and Abstract Syntax, Working Draft w3.org
- ISO/IEC 39075:2024, Information technology, Database languages, GQL webstore.iec.ch
- A Survey on Temporal Knowledge Graph Completion: Taxonomy, Progress, and Prospects, 2023, arXiv:2308.02457 arxiv.org
- García-Durán et al., 2018, Learning Sequence Encoders for Temporal Knowledge Graph Completion arxiv.org
- Lacroix et al., 2020, Tensor Decompositions for Temporal Knowledge Base Completion, ICLR arxiv.org
- Yang et al., 2022, Rethinking Knowledge Graph Evaluation Under the Open-World Assumption, NeurIPS arxiv.org
- Jain et al., 2020, Temporal Knowledge Base Completion: New Algorithms and Evaluation Protocols, EMNLP arxiv.org
6 flashcards for this concept
Click a card to reveal the answer.