TL;DR
GRATE (Gated Rotary Attention for Temporal Encoding) introduces temporal reasoning to inductive knowledge graph foundation models without adding a single learnable parameter. By leveraging relative-time rotary embeddings and query-conditioned gating, GRATE enables static foundation models to generalize seamlessly to temporal knowledge graphs with entirely unseen entities, relations, and timestamps.
What Problem Does This Paper Address?
Knowledge Graph (KG) foundation models like ULTRA and TRIX have recently revolutionized graph learning by achieving strong inductive transfer. They can predict missing links in entirely unseen graphs because they learn vocabulary-agnostic structural patterns rather than entity-specific embeddings.
However, these foundation models are inherently static. Real-world facts are often bound to time (e.g., "Who did the US president meet in 2024?"). Existing Temporal Knowledge Graph (TKG) models handle this by learning specific embeddings for absolute timestamps. Unfortunately, this design choice completely breaks down in inductive scenarios: if a model encounters a new dataset with disjoint entities, relations, and a completely different time range, its learned absolute timestamp embeddings become useless.
The challenge is adding temporal awareness to KG foundation models without sacrificing their defining feature: parameter-free transferability.
Methods
The authors propose GRATE, a parameter-free temporal message function designed to seamlessly plug into NBFNet-style KG foundation models.
Instead of learning absolute time embeddings, GRATE models time through two main mechanisms:
- Rotary Relative-Time Encoding: Inspired by RoPE (Rotary Position Embedding) used in Transformers, GRATE rotates the structural message of an edge based on its relative time gap to the query ($\Delta t = \tau - t_{uv}$). This allows the model to treat temporally shifted versions of the same structural pattern naturally, making it completely agnostic to absolute dates.
- Query-Conditioned Gating: Not all historical facts are equally relevant to a query. GRATE applies an independent, sigmoid-activated gate that scores the rotated edge message against the query vector. Because it uses independent sigmoid gating rather than softmax, it respects the additive, accumulation-based nature of NBFNet message passing and remains stable across varying neighborhood sizes.
Datasets
To rigorously evaluate fully inductive temporal transfer, the authors found that existing TKG benchmarks were insufficient because they share train/test vocabularies. Consequently, they introduced two new benchmark suites:
- GDELTINDT: Built from the high-density daily event dataset GDELT, spanning April 2015 to March 2016.
- WIKIINDT: Built from WIKI, containing 232 years of yearly encyclopedic facts.
Both benchmarks are explicitly constructed to have completely disjoint entities, relations, and timestamps between the training and inference graphs, covering both temporal interpolation and extrapolation.
For pretraining, the model uses ICEWS14 and ICEWS05-15. For zero-shot forecasting evaluation, they used held-out datasets ICEWS18 and YAGO.
Key Insights and Ideas
- Time as a Rotation, Not an Embedding: By encoding time as a relative rotation in a fixed-frequency basis, the model bypasses the need for dataset-specific timestamp vocabularies. Low-frequency components handle large gaps, while high-frequency components capture fine-grained differences.
- The Power of Independent Gating: Traditional softmax attention couples weights within a neighborhood, which fails during inductive transfer when graph densities change drastically. GRATE’s independent sigmoid gating evaluates each edge on its own merits, ensuring robust transferability.
- Density and Recurrence Matter: GRATE provides the highest performance lift in dense event graphs (like GDELT) where the model must choose from a large pool of co-occurring events, or when the dataset exhibits high literal recurrence (DRec)—meaning facts repeat predictably over specific intervals (like YAGO and WIKI).
Key Results
- Transductive Performance: When evaluated in-distribution on ICEWS14 and ICEWS05-15, adding GRATE to ULTRA and TRIX yielded massive relative gains of +25% to +38% in MRR and up to +58% in Hits@1, proving that temporal alignment drastically sharpens top-rank precision.
- Inductive Transfer: On the newly proposed GDELTINDT benchmark, TRIX + GRATE outperformed the static base model by +0.12 to +0.21 MRR across all variants.
- Zero-Shot vs. LLMs: Despite being a purely structure-driven model with zero text access, the jointly pretrained GRATE checkpoint outperformed vocabulary-agnostic, LLM-based temporal forecasters (like ICL and GenTKG) on Hits@10 for ICEWS18 and on Hits@1/MRR for YAGO.
Limitations and Future Work
While powerful, GRATE treats time purely through relative integer index differences. This means it does not explicitly account for irregular intervals or mixed temporal granularities (e.g., mixing a dataset measured in days with one measured in years during pretraining). Additionally, it inherits the high computational complexity of NBFNet-style message passing on large graphs.
The authors point to more scalable propagation strategies and mixed-granularity pretraining as exciting frontiers for future work.
Summary updated