[Paper Review] Pre-trained Language Model with Prompts for Temporal Knowledge Graph Completion
This paper proposes PPT, a pre-trained language model with prompts for temporal knowledge graph completion (TKGC), converting quadruples into coherent sentences using time-specific prompts to enable masked token prediction. It achieves state-of-the-art performance on three benchmark datasets by effectively leveraging temporal intervals and relational semantics, outperforming GNN-based methods in extrapolation settings.
Temporal Knowledge graph completion (TKGC) is a crucial task that involves reasoning at known timestamps to complete the missing part of facts and has attracted more and more attention in recent years. Most existing methods focus on learning representations based on graph neural networks while inaccurately extracting information from timestamps and insufficiently utilizing the implied information in relations. To address these problems, we propose a novel TKGC model, namely Pre-trained Language Model with Prompts for TKGC (PPT). We convert a series of sampled quadruples into pre-trained language model inputs and convert intervals between timestamps into different prompts to make coherent sentences with implicit semantic information. We train our model with a masking strategy to convert TKGC task into a masked token prediction task, which can leverage the semantic information in pre-trained language models. Experiments on three benchmark datasets and extensive analysis demonstrate that our model has great competitiveness compared to other models with four metrics. Our model can effectively incorporate information from temporal knowledge graphs into the language models.
Motivation & Objective
- To address the limitations of existing TKGC methods in extracting temporal information from timestamps and mining relational associations.
- To improve extrapolation performance in temporal knowledge graph completion by leveraging pre-trained language models.
- To explore the use of prompts to structure temporal knowledge graph data for better integration with PLMs.
- To demonstrate that implicit temporal semantics and relational dependencies can be effectively captured via prompt-based fine-tuning of PLMs.
Proposed method
- Convert sampled quadruples (subject, relation, object, timestamp) into natural language sequences using time-prompts that encode interval semantics between timestamps.
- Construct distinct prompts for different temporal intervals (e.g., 'one day before', 'a week after') to embed relative time information explicitly.
- Transform the TKGC task into a masked token prediction problem by masking the target entity and fine-tuning the pre-trained language model.
- Use a masking strategy during fine-tuning to enable the model to predict missing entities based on contextualized representations of historical events.
- Leverage the pre-trained model’s ability to capture long-range dependencies and implicit semantics from coherent input sequences.
- Apply prompt engineering to ensure syntactic coherence and semantic richness in input tokens, enabling effective utilization of PLM’s inductive bias.
Experimental results
Research questions
- RQ1Can pre-trained language models be effectively adapted to temporal knowledge graph completion by converting quadruples into natural language sequences?
- RQ2Can time-specific prompts that encode temporal intervals improve the model’s ability to reason about event order and duration?
- RQ3Does the proposed prompt-based masking strategy outperform traditional GNN-based or tensor decomposition methods in extrapolation settings?
- RQ4To what extent can the model capture time-sensitive relational patterns, such as sequential dependencies between relations?
Key findings
- PPT achieves state-of-the-art performance on three benchmark TKG datasets (ICEWS14, ICEWS05-15, and YAGO3-196K), with MRR of 38.85 on ICEWS05-15 and Hits@10 of 59.31 on the ICEWS05-filter subset.
- The ablation study shows that removing time-prompts (using random timestamps) degrades performance, confirming that the model learns meaningful temporal information from the prompts.
- Attention visualization confirms that the model attends to relevant historical events and temporal cues (e.g., 'day', 'next') when predicting missing entities.
- PPT outperforms baseline models on the ICEWS05-filter dataset, which contains 139 time-sensitive relation pairs with clear chronological order, demonstrating its strength in handling sequential relational patterns.
- The model’s performance remains robust even when timestamps are replaced with random values, indicating that the gains are due to the prompt design and not memorization of raw timestamps.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.