Time-Aware Graph Embedding: A Temporal Smoothness and Task-Oriented Approach

Yonghui Xu, Shengjie Sun, Huiguo Zhang, Chang'an Yi, Yuan Miao, Dong Yang, Xiaonan Meng, Yi Hu, Ke Wang, Huaqing Min, Hengjie Song, Chuanyan MiaoACM TKDD 2022

Abstract

Knowledge Graphs (KGs) are inherently dynamic, yet traditional embedding methods often treat them as static collections of facts. This paper introduces RTGE (Robustly Time-aware Graph Embedding), a novel framework designed to capture the temporal evolution of KGs. By enforcing "temporal smoothness" between adjacent time steps and employing a balanced, task-oriented negative sampling strategy, RTGE significantly outperforms existing methods in predicting missing entities and relations across standard benchmarks.

Introduction

Real-world Knowledge Graphs like Wikidata or YAGO are not static; facts change over time (e.g., a person's residence or employment). Traditional models like TransE map entities into a fixed space, leading to logical contradictions when temporal dynamics are ignored. Existing "time-aware" models often treat time as isolated snapshots, failing to capture evolutionary patterns and suffering from biased negative sampling during training. RTGE addresses these issues by modeling the continuous evolution of the semantic space.

Methodology

RTGE extends the TransH architecture by projecting entities and relations onto time-specific hyperplanes. For a fact valid at time $t$, its components are projected onto a plane $w_t$ where the translation logic $head + relation \approx tail$ is maintained.

Figure 1: Illustration of the RTGE framework showing temporal graph evolution and corresponding entity/relationship embeddings over time-specific hyperplanes.

The framework introduces two primary innovations:

  1. Temporal Smoothness: A dedicated loss term minimizes the Euclidean distance between hyperplanes of adjacent time steps ($w_t$ and $w_{t+1}$). This ensures the semantic space evolves logically rather than jumping erratically, effectively regularizing the model against sparse data in specific time bins.
  2. Task-Oriented Negative Sampling: Unlike traditional models that only swap entities, RTGE also swaps relations to create negative samples. This balanced approach ensures the model learns to distinguish both the participants and the nature of the events.

PCA visualizations of the learned embeddings reveal a "Chronological Cluster" effect, where adjacent years naturally group together along a sequential path, a property absent in previous models like HyTE.

Experimental Evaluation

The performance of RTGE was evaluated on two temporally rich benchmarks: Wikidata12k (12,554 entities, 24 relations, 1320-2019) and YAGO11k (10,623 entities, 10 relations, 1900-2017).

Table 1: Link prediction results on the Wikidata12k dataset, comparing RTGE against various static and temporal baselines.

As shown in Table 1, RTGE demonstrates superior performance across head, tail, and relation prediction tasks. On Wikidata12k, RTGE achieved a Mean Rank of 153 for head entity prediction, a substantial improvement over the previous state-of-the-art, HyTE (237). Similarly, on YAGO11k, RTGE reached a Hits@10 of 41.5% for tail prediction. The "smoothness" constraint (Equation 12 in the paper) was found to significantly reduce variance in hyperplane weights, enhancing model stability and interpretability.

Conclusion

RTGE provides a robust framework for time-aware graph embeddings by prioritizing temporal continuity and balanced training. While currently based on TransH-style hyperplanes, future work involves integrating more advanced architectures like ConvE and moving toward continuous time representations to further refine the granularity of temporal modeling.

Summary updated

BibTeX
@article{xu2022time,
  author = {Yonghui Xu and Shengjie Sun and Huiguo Zhang and Chang'an Yi and Yuan Miao and Dong Yang and Xiaonan Meng and Yi Hu and Ke Wang and Huaqing Min and Hengjie Song and Chuanyan Miao},
  title = {{Time-Aware Graph Embedding: A Temporal Smoothness and Task-Oriented Approach}},
  journal = {ACM Trans. Knowl. Discov. Data},
  year = {2022},
  doi = {10.1145/3480243},
}
Figure