Skip to main content
QUICK REVIEW

[Paper Review] Temporal Knowledge Graph Reasoning with Historical Contrastive Learning

Yi Xu, Junjie Ou|arXiv (Cornell University)|Nov 20, 2022
Advanced Graph Neural NetworksComputer Science6 citations
TL;DR

This paper proposes CENET, a novel temporal knowledge graph reasoning model that leverages historical contrastive learning to improve event forecasting by jointly modeling historical and non-historical dependencies. By training query representations via supervised contrastive learning and employing a mask-based inference strategy, CENET achieves a minimum 8.3% relative improvement in Hits@1 over state-of-the-art methods on event-based datasets.

ABSTRACT

Temporal knowledge graph, serving as an effective way to store and model dynamic relations, shows promising prospects in event forecasting. However, most temporal knowledge graph reasoning methods are highly dependent on the recurrence or periodicity of events, which brings challenges to inferring future events related to entities that lack historical interaction. In fact, the current moment is often the combined effect of a small part of historical information and those unobserved underlying factors. To this end, we propose a new event forecasting model called Contrastive Event Network (CENET), based on a novel training framework of historical contrastive learning. CENET learns both the historical and non-historical dependency to distinguish the most potential entities that can best match the given query. Simultaneously, it trains representations of queries to investigate whether the current moment depends more on historical or non-historical events by launching contrastive learning. The representations further help train a binary classifier whose output is a boolean mask to indicate related entities in the search space. During the inference process, CENET employs a mask-based strategy to generate the final results. We evaluate our proposed model on five benchmark graphs. The results demonstrate that CENET significantly outperforms all existing methods in most metrics, achieving at least $8.3\%$ relative improvement of Hits@1 over previous state-of-the-art baselines on event-based datasets.

Motivation & Objective

  • To address the challenge of forecasting new or infrequent events in temporal knowledge graphs that lack sufficient historical interaction traces.
  • To reduce reliance on recurring or periodic patterns by modeling both historical and non-historical dependencies in event prediction.
  • To introduce a contrastive learning framework that distinguishes query types based on whether they depend more on historical or non-historical factors.
  • To improve inference accuracy by using a learned binary classifier to generate a dynamic mask that prioritizes relevant entities.
  • To overcome the imbalance in entity recurrence rates, especially for subject entities with low historical interaction frequency.

Proposed method

  • CENET employs a copy mechanism-based scoring strategy to model dependencies from both historical and non-historical events for a given query.
  • It uses supervised contrastive learning to train query representations, distinguishing between queries whose correct entities are historically frequent versus rare.
  • A binary classifier is trained using contrastive loss to output a boolean mask indicating whether the prediction should prioritize historical or non-historical entities.
  • During inference, CENET applies a mask-based strategy that filters candidate entities based on the classifier’s output, improving focus on relevant entities.
  • The model optimizes two loss functions: cross-entropy loss ($\mathcal{L}^{ce}$) for standard prediction and supervised contrastive loss ($\mathcal{L}^{sup}$) to enhance query representation learning.
  • Hyper-parameters $\alpha$ and $\lambda$ are tuned to balance the contributions of the two loss functions and the mask weighting, respectively.

Experimental results

Research questions

  • RQ1Can a contrastive learning framework effectively distinguish between queries dependent on historical versus non-historical events in temporal knowledge graphs?
  • RQ2How does joint modeling of historical and non-historical dependencies improve prediction performance for rare or novel events?
  • RQ3To what extent does the learned mask-based inference strategy enhance accuracy compared to uniform ranking over all candidates?
  • RQ4How do the components of the proposed framework—contrastive learning, binary classifier, and mask strategy—contribute individually to performance gains?
  • RQ5Does the model generalize across diverse TKGs with varying recurrence rates and structural characteristics?

Key findings

  • CENET achieves a minimum 8.3% relative improvement in Hits@1 over state-of-the-art baselines on event-based datasets, demonstrating strong generalization.
  • On ICEWS18 and YAGO, removing the contrastive learning component (CENET-w/o-CL) leads to the worst performance, confirming its critical role in representation learning.
  • The ablation study shows that both historical and non-historical dependencies are essential, as CENET-his (only historical) outperforms CENET-nhis (only non-historical), but both are necessary for optimal results.
  • The mask-based inference strategy significantly improves performance, with CENET-w/o-stage-2 (no classifier) dropping by 1.7% and 3.8% in Hits@1 on ICEWS18 and YAGO, respectively.
  • The hyper-parameter analysis confirms that $\alpha = 0.2$ and $\lambda = 2$ yield optimal performance, with $\mathcal{L}^{ce}$ contributing more on event-based TKGs and $\mathcal{L}^{sup}$ being more effective on public KGs.
  • The model effectively mitigates the impact of imbalanced recurrence rates, reducing the probability of selecting unrelated entities even when subject entities have low historical interaction frequency.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.