Improving Time Sensitivity for Question Answering over Temporal Knowledge Graphs

Chao Shang, Guangtao Wang, Peng Qi, Jing Huang

Abstract

Temporal Knowledge Graphs (TKGs) enhance standard knowledge graphs by associating facts with specific time intervals. However, reasoning over these graphs remains challenging for AI, particularly when dealing with implicit temporal references and chronological sequences. This paper presents TSQA (Time-Sensitive Question Answering), a framework designed to improve temporal reasoning through a time-aware KG encoder, a latent timestamp estimation module, and temporal contrastive learning. Evaluated on the CRONQUESTIONS benchmark, TSQA significantly outperforms existing state-of-the-art models, achieving a Hits@1 of 0.831 and a 32% absolute error reduction on complex temporal queries.

Introduction

Knowledge Graphs (KGs) typically store facts as static triples. Temporal Knowledge Graphs (TKGs) add a fourth dimension—time—to capture the lifespan of facts, such as the tenure of a political leader. Despite this additional data, traditional Question Answering (QA) systems often fail to grasp chronological nuances. They struggle with implicit time references (e.g., "Who was president before the war?"), sensitivity to temporal prepositions ("before" vs. "after"), and the inherent linear order of time.

The TSQA Framework

The TSQA framework addresses these limitations by treating time as a primary constraint rather than a simple attribute.

The TSQA framework architecture, illustrating the integration of time-aware encoding, neighbor graph extraction, and contrastive learning.

Time-Aware KG Encoding

Standard KG embeddings often initialize timestamps randomly, failing to capture the sequential nature of time. TSQA introduces an auxiliary "time-order" loss during training, forcing the model to learn embeddings where the spatial relationship between timestamps reflects their chronological order.

Timestamp Estimation and Pruning

For questions lacking explicit dates, TSQA predicts a latent time representation ($t_q$) from the question text. This predicted interval acts as a filter for the KG. To maintain efficiency, the model employs "Entity Neighboring Graph Extraction," narrowing the search to subgraphs relevant to the entities mentioned in the query.

Temporal Contrastive Learning

To overcome the "bag-of-words" bias where models ignore prepositions, TSQA uses contrastive learning. By generating pairs of questions with opposing temporal directions (e.g., swapping "before" with "after"), the model is trained to distinguish between mutually exclusive answer sets, enforced by a contrastive loss ($\mathcal{L}_{Contrast}$).

Experimental Results

The researchers benchmarked TSQA using CRONQUESTIONS, the largest dataset for temporal KGQA, which includes over 410,000 questions categorized by complexity.

Main experimental results on the CRONQUESTIONS benchmark, comparing TSQA to previous state-of-the-art models.

TSQA demonstrated superior performance across all categories:

  • Overall Accuracy: Achieved a Hits@1 of 0.831, a significant leap from the previous state-of-the-art (CronKGQA) at 0.647.
  • Complex Temporal Reasoning: On questions involving "before/after" and "first/last" logic, TSQA saw relative improvements of 75% and 94%, respectively.
  • Error Reduction: The framework achieved a 32% absolute error reduction on complex questions, proving that explicit temporal modeling effectively mitigates common reasoning failures.

Discussion and Conclusion

The results indicate that time-aware encoding and explicit timestamp estimation are crucial for robust reasoning over TKGs. By treating time as an ordered constraint, TSQA avoids factually correct but chronologically impossible answers. Future work may involve extending the framework to handle finer temporal granularities (e.g., days or minutes) and adapting it for dynamic, streaming knowledge graphs that evolve in real-time.

*Reference: Chao Shang, Guangtao Wang, Peng Qi, Jing Huang.

  1. Improving Time Sensitivity for Question Answering over Temporal Knowledge Graphs. In Proceedings of ACL 2022.*

Summary updated

BibTeX
@inproceedings{shang2022improving,
  author = {Chao Shang and Guangtao Wang and Peng Qi and Jing Huang},
  title = {{Improving Time Sensitivity for Question Answering over Temporal Knowledge Graphs}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-long.552},
}
Figure