Question Answering Over Temporal Knowledge Graphs

Apoorv Saxena, Soumen Chakrabarti, Partha Talukdar

TL;DR

Researchers have introduced CRONQUESTIONS, the largest dataset to date for Question Answering over Temporal Knowledge Graphs (TKGQA), featuring 410,000 questions. Alongside it, they propose CRONKGQA, a novel transformer-based model that leverages temporal knowledge graph embeddings to achieve a staggering 120% improvement in accuracy over previous state-of-the-art methods.

What Problem Does This Paper Address?

Traditional Knowledge Graphs (KGs) are static collections of facts, like (Barack Obama, held position, President of USA). However, the real world is dynamic. A more accurate representation is a Temporal Knowledge Graph (TKG), which adds time intervals to facts: (Barack Obama, held position, President of USA, 2008, 2016).

While Question Answering over KGs (KGQA) is a well-studied field, doing so over temporal graphs is much harder. It requires reasoning about "when" things happened, "who" held a role during a specific event, or the "first/last" occurrence of an entity. Progress in TKGQA has been stalled by two major hurdles:

  1. Data Scarcity: Existing temporal datasets are tiny (around 1,200 questions), making it impossible to train modern, data-hungry deep learning models.
  2. Algorithmic Gaps: Standard KGQA models aren't designed to handle the four-dimensional nature (subject, relation, object, time) of TKG facts.

Methods

The authors propose CRONKGQA, a model designed to bridge the gap between natural language questions and temporal graph structures.

The architecture, illustrated in Figure 1, follows a multi-step process:

  • Temporal Embeddings: The model first learns low-dimensional vector representations for entities, relations, and timestamps using a TKG embedding algorithm like TComplEx. This allows the model to "understand" the temporal relationships inherent in the graph.
  • Question Encoding: It uses a pre-trained language model (BERT) to process the natural language question. The [CLS] token is projected into two distinct question embeddings: one for predicting entities ($qe_{ent}$) and one for predicting timestamps ($qe_{time}$).
  • Scoring Functions: CRONKGQA uses specific scoring functions (derived from the TComplEx KG completion model) to rank potential answers. It extracts mentions of entities and times from the question and combines them with the learned embeddings to calculate the probability of every entity or year in the KG being the correct answer.
Figure 1: The CRONKGQA method. (i) A temporal KG embedding model (Section 4) is used to generate em- beddings for each timestamp and entity in the temporal knowledge graph (ii) BERT is used to get two question embeddings: qeent and qetime. (iii) Embeddings of entity/time mentions in the question are combined with ques- tion embeddings using equations 4 and 5 to get score vectors for entity and time prediction. (iv) Score vectors are concatenated and softmax is used get answer probabilities. Please refer to Section 5 for details.

Datasets

The core contribution of this work is CRONQUESTIONS, a massive benchmark for TKGQA.

  • Scale: It contains 410k unique question-answer pairs, expanding previous benchmarks by a factor of 340x.
  • Complexity: Questions are stratified into buckets of structural complexity, including "Simple" (single fact), "Before/After," "First/Last," and "Time Join" (reasoning across multiple events).
  • Source: The underlying TKG is derived from Wikidata, containing 125k entities and 328k facts.

As shown in Figure 3, CRONQUESTIONS is the first large-scale dataset to utilize a true temporal KG with 100% temporal questions.

Comparison of KGQA datasets

Key Insights and Ideas

  • Temporal Embeddings are Non-Negotiable: The authors found that models using non-temporal embeddings (like standard ComplEx) performed miserably on time-based answers. Injecting time-aware embeddings is essential for the model to "reason" about the timeline.
  • Inductive Bias Matters: CRONKGQA outperforms general-purpose models (like T5 or BERT) because its scoring function is modeled after the TKG embedding logic itself. This creates a powerful inductive bias that makes simple temporal questions almost trivial for the model to solve.
  • Generalization vs. Memorization: To ensure models actually learn to reason rather than just memorize, the authors ensured there was zero entity overlap between the training and test sets. If the model sees questions about "Obama" in training, it must answer questions about "Brad Pitt" in testing.

Key Results

CRONKGQA sets a new high bar for the field:

  • Overall Performance: It achieved an Overall Hits@1 of 0.647, compared to just 0.288 for the next best baseline (a 120% improvement).
  • Simple Reasoning: On simple questions, CRONKGQA is nearly perfect, reaching 0.987 Hits@1.
  • Complex Reasoning: While complex questions (like "Who was the President before Obama?") remain difficult, CRONKGQA still significantly outperformed all baselines, particularly on "Time Join" questions.
  • Data Scaling: As shown in Figure 2, increasing the training data size consistently improves performance for complex reasoning, justifying the need for large-scale datasets like CRONQUESTIONS.
Model performance vs training dataset size

Limitations and Future Work

Despite the massive leap forward, the authors acknowledge that complex temporal reasoning is far from solved. While simple questions are handled with near-perfect accuracy, "Before/After" reasoning remains a challenge, with the best method only reaching 0.288 Hits@1.

Furthermore, the dataset is synthetically generated via templates. While the authors used human and machine paraphrasing to add linguistic variety (see Table 3), the distribution is still somewhat artificial compared to natural human queries. Future work could focus on more diverse, naturally occurring temporal questions and developing architectures that can better handle multi-hop temporal logic.

Summary updated

Abstract

Temporal Knowledge Graphs (Temporal KGs) extend regular Knowledge Graphs by providing temporal scopes (start and end times) on each edge in the KG. While Question Answering over KG (KGQA) has received some attention from the research community, QA over Temporal KGs (Temporal KGQA) is a relatively unexplored area. Lack of broad coverage datasets has been another factor limiting progress in this area. We address this challenge by presenting CRONQUESTIONS, the largest known Temporal KGQA dataset, clearly stratified into buckets of structural complexity. CRONQUESTIONS expands the only known previous dataset by a factor of 340x. We find that various state-of-the-art KGQA methods fall far short of the desired performance on this new dataset. In response, we also propose CRONKGQA, a transformer-based solution that exploits recent advances in Temporal KG embeddings, and achieves performance superior to all baselines, with an increase of 120% in accuracy over the next best performing method. Through extensive experiments, we give detailed insights into the workings of CRONKGQA, as well as situations where significant further improvements appear possible. In addition to the dataset, we have released our code as well.
BibTeX
@inproceedings{saxena2021question,
  author = {Apoorv Saxena and Soumen Chakrabarti and Partha Talukdar},
  title = {{Question Answering Over Temporal Knowledge Graphs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2021},
  doi = {10.18653/v1/2021.acl-long.520},
}
Figure