Predicting the Unpredictable: Uncertainty-Aware Reasoning over Temporal Knowledge Graphs via Diffusion Process (2024)

Abstract: Temporal Knowledge Graph (TKG) reasoning seeks to predict future incomplete facts leveraging historical data. While existing approaches have shown effectiveness in addressing the task through various perspectives, such as graph learning and logic rules, they are limited in capturing the indeterminacy in future events, particularly in the case of rare/unseen facts. To tackle the highlighted issues, we introduce a novel approach by conceptualizing TKG reasoning as a sequence denoising process for future facts, namely DiffuTKG. Concretely, we first encodes the historical events as the conditional sequence. Then we gradually introduce Gaussian noise to corrupt target facts during the forward process and then employ a transformerbased conditional denoiser to restore them in the reverse phase. Moreover, we introduce an uncertainty regularization loss to mitigate the risk of prediction biases by favoring frequent scenarios over rare/unseen facts. Empirical results on four real-world datasets show that DiffuTKG outperforms state-of-the-art methods across multiple evaluation metrics 1.

heading: 1 Introduction
text: Temporal Knowledge Graphs (TKGs) are dynamic, multi-relational structures that encapsulate the progression of events and knowledge in the real world, represented as quadruples (s, r, o, t), such as (Biden, meet, Zelensky, 2022-12-21). The reasoning tasks over TKGs are classified based on the temporal scope: interpolation involves inferring missing information within the observed timeframe, while extrapolation aims at predicting future events. Our research specifically focuses on extrapolation in TKGs, a domain that has more practical implications due to its forward-looking nature.
Existing studies (Trivedi et al., 2017; Jin et al., 2020; Li et al., 2021b) in TKG reasoning typically
∗corresponding author 1The source code is available at: https://github.
com/AONE-NLP/DiffuTKG
aggregate adjacent structure information and temporal information to derive the deterministic representations of entities and relations (Li et al., 2021a; Liu et al., 2023). These representations are subsequently applied within a scoring function, such as ConvTransE (Dettmers et al., 2018), to assess the likelihood of potential future facts (events).
Despite the significant progress in TKG reasoning techniques, these deterministic methods exhibit inherent deficiencies when it comes to grappling with the uncertainties that arise from the unpredictable nature of future interactions (Jin et al., 2020; Sun et al., 2021) and the evolving understanding of temporal and structural relationships over time (Trivedi et al., 2017; Li et al., 2021b; Park et al., 2022a). This challenge is particularly evident in scenarios characterized by a scarcity of discriminative information, especially for facts with sparse or even no historical interactions (Chekol et al., 2017; Chen et al., 2019; Ji et al., 2021). These conventional approaches, which minimize the plausibility scores of unseen relation facts via the maximum likelihood objective, operate under the presumption that all unseen relation facts are false beliefs. As a result, they fail to capture the subtle uncertainty associated with these unseen facts.
To illustrate, consider the scenario depicted in Figure 1, Biden associated with only three historical facts and is anticipated to engage with the relatively rare or previously unseen facts Iraq and
5766
Zelensky in future scenarios. If we utilize deterministic embeddings derived from historical events to represent Biden, Biden’s position in the embedding space (mapped into a 2D map) may fall somewhere in the middle of Donald Trump, G20, and Iran. In such a setting, if predictions are based on the proximity within this embedding space, Biden is more likely to be forecasted to interact with Donald Trump, G20, and Iran, due to the closer embeddings. Furthermore, The widespread use of the maximum likelihood objective, such as crossentropy loss, exacerbates prediction biases by favoring historically frequent scenarios over rare or unseen interactions (Zadeh and Schmid, 2021), thus hindering the model’s adaptability to the unpredictable dynamics and emerging relationships inherent in real-world TKG scenarios.
To address these challenges, we propose DiffuTKG, a novel approach that reformulates TKG reasoning into a sequence prediction task by managing the inherent uncertainties through a sequence denoising method. In the training phase, DiffuTKG systematically transforms sequences of objects, relationships, and temporal intervals relevant to subject entities into a unified continuous representation. This process is then augmented by the strategic introduction of Gaussian noise, simulating the uncertain nature of future events (distribution ranges depicted in Figure 1). Subsequently, DiffuTKG harnesses a transformer-based framework for the denoising and accurate reconstruction of target entities, with the process intricately conditioned on both relational and temporal insights to mirror the intricate dynamics of TKGs structure.
Furthermore, DiffuTKG integrates an uncertainty regularization loss, which aids in distinguishing between seen and rare/unseen events, thereby enhancing the model’s predictive clarity and reducing overfitting tendencies. During inference, DiffuTKG employs a reverse diffusion step initialized with sampled Gaussian noise to predict missing entities, subsequently refining these predictions based on calculated confidence scores. Empirical studies conducted on four benchmark datasets demonstrate the effectiveness of DiffuTKG. In summary, our main contributions are as follows:
• To the best of our knowledge, DiffuTKG is the first effort that introduces the diffusion process into TKG reasoning to explicitly manage dynamic and uncertain nature of future events via stochastic sequence denoising process.
• We introduce an uncertainty regularization loss to mitigate the risk of prediction biases, ensuring the model does not disproportionately favor frequently occurring historical scenarios over rare or unseen facts.
• Extensive experiments conducted on four realworld datasets demonstrate that DiffuTKG yields new state-of-the-art performance.

heading: 2 Diffusion Models for Discrete Data
text: The continuous diffusion model (DM) is a probabilistic model containing two Markov chains, mainly consisting of forward and reverse processes, which diffuse the data with pre-defined noise and reconstruct the desired sample from the noise (Ho et al., 2020). In this article, we center on DMs tailored for discrete data (Li et al., 2022a; Gong et al., 2022).
In the forward diffusion process for discrete dataw, an embedding step first transforms w into a continuous embedding x0 ∈ Rd, parametrized by q(x0|w) = N (x0,Emb(w), β0I). In addition, Emb(w) ∈ Rd is an embedding function that maps each word to a vector in Rd. Then the diffusion process corrupts x0 to obtain the latent variables x1:T by gradually adding noise in T steps, where xT is a standard Gaussian noise. The forward transition xt−1 → xt can be attained by
q(xt|xt−1) = N (xt; √ ᾱtxt−1, √ 1− ᾱtI)
= √ ᾱtxt−1 + √ 1− ᾱtϵ,
(1)
where N denotes the Gaussian distribution and ϵ ∼ N (0, 1) is a random Gaussian noise. ᾱt =∏t
t′=1 αt′ ∈ (0, 1) controls the noise level at step t ∈ {0, 1, . . . , T}.
The reverse denoising process takes the initial state xT to reconstruct the original data x0 by learning from a neural network fθ. The process can be formulated as
pθ(xt−1|xt) = N (xt−1;µθ(xt, t); Σθ(xt, t)) (2)
where µθ(xt, t) and Σθ(xt, t) represent the predicted parameterization of the mean and standard deviation, respectively, for pθ(xt−1|xt), calculated by the function fθ(xt, t). Finally, the rounding method, parametrized by pθ(w|x0) = Softmax(x0), is employed to approximate or round the values to discrete representations. The corresponding training objective is
Le2esimple (w) = E qϕ(x0:T |w)
[ T∑
t=2
[ ∥x0 − fθ (xt, t)∥2 ] ] +
E qϕ(x0:1|w)
[ ∥Emb(w)− fθ (x1, 1)∥2 − log pθ (w | x0) ] .
(3)
The first expectation is to train the predicted model fθ(xt, t) to approximate x0 from time step 2 to T. Empirically, it can effectively reduce rounding errors. The second expectation consists of two components: the first component aims to bring the predicted x0, closer to the embedding Emb(w), while the second component focuses on accurately rounding x0 to the text w.

heading: 3 Our Approach
text: In this section, we introduce the details of our framework as shown in Figure 2. We first formulate the task definition of TKG reasoning as follow. Definition 1 (Temporal Knowledge Graph) A temporal knowledge graph (TKG), denoted as G, serves as a dynamic, multi-relational network of entities interconnected through time-stamped relations. This structure is conceptualized as a series of chronological KG snapshots, represented as G = {G1,G2, . . . ,Gt−1}. Each snapshot Gti ∈ G, encapsulates the facts at a specific time ti, expressed as time-stamped quadruple (s, r, o, ti), where s, o ∈ E are the subject and object entities, respectively, and r ∈ R signifies the relational fact connecting s and o. To facilitate a bi-directional comprehension of relationships within the TKG (Kazemi and Poole, 2018), the inverse quadruple (o, r−1, s, ti) is systematically appended to G. Definition 2 (Temporal Knowledge Graph Reasoning) The primary aim of TKG reasoning is to enable extrapolative entity prediction. Specifically, this entails predicting either the missing object entity in a future relation (s, r, ?, t) or the absent subject entity (?, r, o, t) utilizing historical TKG snapshots Gt−L−1:t−1 = {Gt−L,Gt−L+1, . . . ,Gt−1} spanning the preceding L timesteps.

heading: 3.1 TKG Reasoning as Sequence Prediction
text: Let G0:t−1 be historical TKG snapshots and qt = (s, r, o, t) be the query quadruple. To adopt the diffusion process in TKG reasoning, we reshape the task as that of sequence prediction, which involves predicting the missing entities in qt by utilizing the historical events associated with the query subject s from G0:t−1. The historical event
sequence related to s, sorted chronologically according to the timestamps is formally denoted as Q0:n−1 = {(s, r0, o0, t0), . . . , (s, ri, oi, ti), . . . , (s, rn−1, on−1, tn−1)}2, where t0 ≤ ti ≤ tn−1 < t and n − 1 is the length of historical event sequence. Additionally, let Q0:n−1 = {S,R0:n−1, O0:n−1, T0:n−1}. Here, R0:n−1 = {r0, . . . , rn−1} represents the sequence of relations in historical events, O0:n−1 = {o0, . . . , on−1} denotes the sequence of objects in historical events, and T0:n−1 = {t0, . . . , tn−1} is the sequence of timestamps associated with historical events.

heading: 3.2 Denoising Training
text: The denoising training stage of DiffuTKG comprises three steps, focusing on reconstructing the missing object o while utilizing the historical event sequence Q0:n−1 as conditioning factors. Sequential Representation Learning In this phase, DiffuTKG is initially tasked with acquiring representations for objects and relations within Q0:n = {Q0:n−1, qt}. Each object oi ∈ O0:n = {O0:n−1, o} is initially translated into its corresponding embedding vector e0i by the entity embedding matrix Ee ∈ Rd×h. d is the number of entity types. Similarly, each relation ri ∈ R0:n = {R0:n, r} is projected into a continuous space using the relation embedding matrix Er. Additionally, we compute the time interval between every event and the queried event in Q0:n, embedding them through E∆t ∈ Rn×h for encoding temporal information. The projection process is denoted as:
e0 = [e00:n−1; e 0 n]
= [Ee(o0);Ee(o1); . . . ,Ee(o)],
r = [Er(r0);Er(r1); . . . ;Er(r)], t = [E∆t(t);E∆t(t− 1); . . . ;E∆t(0)],
(4)
where e0, r, t ∈ Rn×h. e00:n−1 ∈ R(n−1)×h and e0n ∈ R1×h represent the representations of objects in historical events and the representation of the target object, respectively, where h denotes the size of the hidden dimension. [; ] denotes the concatenation operation along the first dimension. Forward Diffusion Process After obtaining the embedding of the object sequence e0, DiffuTKG specifically concentrates on introducing stochasticity incrementally to the target object e0n. Consequently, the forward process is conceptualized as a
2For brevity, we omit the superscript s in Qs0:n−1 for subject s.
Markov chain of Gaussian transitions:
q(emi | e0i ) = { e0i if i < n√ ᾱme 0 i + √ 1− ᾱmϵ if i = n (5)
The diffusion process extends over a specified range m ∈ {1, 2, . . . ,M} and M marks the maximum number of forward steps. To regulate the added noises introduced by 1− ᾱm, we use a linear noise schedule:
1− ᾱm = δ · [ αmin + m−1 M−1 (αmax − αmin) ] (6)
where the hyper-parameter δ ∈ [0, 1] controls the noise scales, and two hyper-parameters αmin < αmax ∈ (0, 1) indicating the upper and lower bounds of the added noises. Reverse Denoising Process In this phase, DiffuTKG undertakes the task of reconstructing the sequence of object entities from noise, with guidance from the temporal and relational characteristics of facts. More precisely, we introduce the encoded sequences of relations (r) and time intervals (t) to condition the denoising process as follows:
pθ ( êm−1 | ∗ ) = N ( êm−1;µθ (∗) ,Σθ (∗) ) ,
êm−1 = [em0:n−1; ê m−1 n ],
(7)
For brevity, we use the symbol "∗" to represent {êm, r, t,m}. êm is set to em at the first step of reverse process. Here, DiffuTKG adopts the architecture of a transformer encoder as fθ to computing µθ (∗) and Σθ (∗),which can be denoted as:
fθ(∗) = Transformer(ēm) = ê0, ēm = êm + r+ t+ Embstep(m).
(8)
We incorporate step embeddings Embstep(·) to manage the hidden representations at different noise levels (Gong et al., 2022).

heading: 3.3 Training Strategy
text: Reconstruction Loss Typically, diffusion models is trained using the Mean Square Error (MSE) loss (Shen et al., 2023), quantifying the difference between the original representation and the reconstructed one. However, MSE loss is recognized to be unstable in discrete space (Mahabadi et al., 2023; Dieleman et al., 2022). Hence, we opt for the dot product operation, which can stably quantify the distance between vectors:
y = Softmax(fθ(ē m,m)n · (Ee)T ) (9)
where fθ(ēm,m)n ∈ R1×h denotes the representation of the target object from fθ(ēm,m) outputs. (·)T is the matrix transposition operation and "·" indicates the inner product operation. Consequently, to ensure conditional generation, we utilize a reconstruction loss function as follows:
Lrecon = − ∑
i∈{1,2,...,d} gi log(yi), (10)
where gi represents the one-hot encoding of the i-th ground-truth object entity, and yi is the predicted probability. Uncertainty Loss The sole reliance on the generative objective may lead DiffuTKG to overfit historical frequent events, particularly in scenarios characterized by sparse and noisy data (Liu et al., 2020). This overfitting issue can result in inaccurate assessments of both unseen and observed facts. To address this prediction bias, we introduce an uncertainty-aware regularization loss, which aims to establish a distinct boundary between unseen and observed facts. Specifically, we employ MultiLayer Perceptrons (MLPs) to derive a confidence score from y, serving as supervisory signals for both unseen and observed facts:
C(y, F01) = MLP(Relu(MLP(y ⊗ F01))), (11) where C(y, F01) ∈ R1×2 denotes the confidence score, effectively distinguishing between the likelihood of a fact being previously observed or not. The binary vector F01 ∈ R1×d records the historical occurrence of the event (s, r, o) before time t, with further details provided in Appendix C.
Let Pseen be the set of confidence scores corresponding to observed facts and Pnon be the set pertaining to unseen facts. Subsequently, based on Pseen and Pnon, we minimize the following loss function:
Luncertainty =Eu∽Pseen
[ − log exp −C(u,F01)/τ
1 + exp−C(u,F01)/τ
] +
Ev∽Pnon [ − log 1
1 + exp−C(v,F01)/τ
] ,
(12)
where τ acts as a temperature coefficient, judiciously modulating the smoothness of the output probability distribution. The objective of this minimization process is to incentivize the DiffuTKG model to allocate higher confidence scores to features indicative of observed facts, while assigning lower scores to those characteristic of unseen facts.
Consequently, the overall training objective incorporates the reconstruction loss together with the uncertainty regularization loss, denoted as:
L = Lrecon + Luncertainty . (13)

heading: 3.4 Sampling Inference
text: During inference, DiffuTKG samples Gaussian noise ϵn and applies the learned denoising model fθ for M reverse processes to denoise ϵn. The time complexity increases by M compared to training. To mitigate this computational overhead, we observe that fθ is trained to directly predict ê0 based on any ēm (1 ≤ m ≤ M ), so it can directly predict ê0 from ēM without the need of the intermediate diffusion steps. Therefore, we design an efficient inference procedure by directly predicting ê0 from ēM :
ēM = eM + r+t = [êM0:n; ϵn] + r+ t,
ê0 = fθ(ē M ,M).
(14)
In line with the principles of ranking problems in graph reasoning (Jin et al., 2020), DIGM first computes the rank for each candidate entity using y from Equation (9). Then we calculate the confidence score c for the event features using Equation (11) and refine the ranking by dynamically incorporating prior frequency knowledge, similar to Liu et al. (2022a):
y = y + λ× (σ(F )− F01)× σ(c), (15) where F ∈ R1×d records the frequency of occurrences of the current event (s, r, o) before t, as detailed in Appendix C. σ denotes the softmax function. σ(F ) is employed to encourage an increase in the score of popular events, while "-σ(F01)" is used to suppress the occurrence of unseen events. The hyperparameter λ controls the effect of prior frequency knowledge.

heading: 4 Experiments

heading: 4.1 Datasets
text: We conduct the experimental evaluation on four TKG datasets to validate the effectiveness of our proposed model, which includes the ICEWS14, ICEWS05-15, ICEWS18 and GDELT datasets. The ICEWS series are from the Integrated Crisis Early Warning System (Boschee et al., 2015). GDELT is from the Global Database of Events, Language, and Tone (Leetaru and Schrodt, 2013). The data split strategy and data statistics are summarized in Appendix A.

heading: 4.2 Baseline Models
text: Fifteen typical exploration TKGR models are selected as the compared baselines, including RENET (Jin et al., 2020), RE-GCN (Li et al., 2021b), TANGO (Han et al., 2021b), xERTE (Han et al., 2021a), TiRGN (Li et al., 2022b), CEN (Li et al., 2022c), CENET (Xu et al., 2023), RETIA (Liu et al., 2023), HGLS (Zhang et al., 2023b), DaeMon (Dong et al., 2023), RPC (Liang et al., 2023a) , L2TKG (Zhang et al., 2023a), CluSTer (Li et al., 2021a), TITer (Sun et al., 2021), Tlogic (Liu et al., 2022b) and TECHS (Lin et al., 2023). We provide implementation details of baselines and DiffuTKG in Appendix B and C, respectively.

heading: 4.3 Evaluation Protocol
text: We assess our model’s performance using standard metrics in the field: Mean Reciprocal Rank (MRR), Hits@1, and Hits@10. To ensure a fair comparison, we follow the experimental setup outlined by Li et al. (2021b), which includes the integration of ground truth historical data during multi-step inference. The results of our experiments are reported under a time-filtered setting, as detailed in (Dong et al., 2023; Zhang et al., 2023a).

heading: 4.4 Main Results
text: The comparative performance of various baseline models on the entity prediction task is detailed in Table 1, where the efficacy of denoising train-
ing in TKG reasoning is underscored by the results. Specifically, DiffuTKG exhibits significant improvements over the next best model, enhancing the Mean Reciprocal Rank (MRR) by absolute margins of 1.40%, 1.81%, and 2.67% in the ICEWS14, ICEWS18, and GDELT datasets, respectively. Notably, DiffuTKG demonstrates more pronounced performance gains on the GDELT dataset compared to the ICEWS datasets. This difference is attributed to the GDELT dataset’s higher incidence of noisy data (Zhang et al., 2023a), which tends to obscure valuable discriminative information and leads to biased representations of entities. By incorporating uncertainty into entity representations, DiffuTKG effectively counters those scenarios, outperforming current state-of-the-art baselines. In the case of the ICEWS05-15 dataset, it includes a higher number of high-quality facts at each time, diminishing the necessity for uncertainty modeling. As a result, our model demonstrates limited improvement compared to state-of-the-art models in the ICEWS05-15 dataset.

heading: 4.5 Performance on Unseen Events
text: To further validate the capacity of DiffuTKG in capturing uncertainty information, we evaluate its performance on ICEWS datasets with unseen events that do not appear in the historical TKGs. The proportions of unseen events in the ICEWS datasets are presented in Table 4. We select four significant methods as comparative models, namely RE-GCN,
CEN, RETIA, and L2TKG. The results presented in Table 2 indicate that DiffuTKG outperforms the baseline models. In comparison with other models, such as the SOTA model RETIA, our metrics have seen substantial relative improvements of 13.90% and 18.50% in ICEWS18. It’s worth noting that the ICEW18 dataset contains a high proportion of unseen events (49.57%), indicating a high degree of sparsity in the occurrences of future events. It is evident that our network adeptly captures the uncertainty of event trends, especially in situations where uncertainty is pervasive within sparse datasets.

heading: 4.6 Ablation Studies
text: To verify the effectiveness of each module in DiffuTKG, ablation studies are carried out in Table 3. The first variant version "w/o Er" remove the relation embedding in fθ. "w/o E∆t" means we remove the the embedding of time intervals in fθ. "w/o Luncertainty" removes the uncertainty loss. And "Lrecon as MSE" replaces the cross-entropy loss with the form of Mean Squared Error (MSE) for the reconstruction loss. We have the following observations: (1) the MRR values of "w/o Er" and "w/o E∆t" are much lower than that of DiffuTKG, which verifies the necessity of injecting temporal evolution and relation dependence into the denoising process; (2) "w/o Luncertainty" fails to leverage the complete generalized knowledge from the reconstruction representation, resulting in an overfitting issue. This leads to a relatively significant drop in reasoning performance, particularly on smaller datasets such as ICEWS14; (3) As anticipated, the model’s reconstruction ability, trained through "Lrecon as MSE", is unstable and adversely affects performance across the four datasets.

heading: 4.7 Sensitivity Analysis
text: We run our model with different important hyperparameters to explore weight impacts.
Figure 3 shows the changes in the performance of models with different lengths of the event sequence n, where small values would lead to great performance decline. This is because fewer historical events lead to providing insufficient supervision signals for prediction, respectively. Nevertheless, an excessively long sequence of historical events can also result in information redundancy, thus limiting performance gains. So n is set to 64 for achieving optimal performance.
Different noise scales for the diffusion forward process are compared in Figure 4. As the noise scale increases, the performance first rises compared to training without noise (s = 0), verifying the effectiveness of denoising training. Furthermore, enlarging noise scales does not degrade performance, as the forward process only corrupts the target object and effectively retains event patterns in historical event sequences. Therefore, we can set δ ≥ 20, such as 50, to achieve satisfactory performance for all datasets.
Figure 5 demonstrates the impact of different temperature coefficients τ in Luncertainty. Setting the coefficient to a moderate value, generally 0.5, tends to yield the best result. It is worth noting that a smaller τ results in DiffuTKG placing more emphasis on events that are challenging to distinguish. Thus, carefully mining hard unseen events considerately prove functional for extrapolation reasoning on TKGs.
Figure 6 demonstrates that the model achieves optimal performance when λ is set to 2. Exces-
sive or insufficient values for the hyperparameter can result in an imbalance of posterior and prior knowledge, leading to suboptimal results.

heading: 4.8 Inference Efficiency
text: To investigate the efficiency of our proposed model, we compare DiffuTKG with RETIA, xERTE, TiRCN and L2TKG in terms of inference time on the test set. Figure 7 illustrates that DiffuTKG is faster than other models. We attribute this to the fact that the model mainly consists of two linear attention layers, resulting in lower computational complexity. However, other models tend to be more time-consuming due to the inability to parallelize many computations, especially in RETIA. In summary, DiffuTKG ensures a significant improvement in time efficiency while delivering excellent extrapolation performance.

heading: 5 Related Work

heading: 5.1 TKG reasoning
text: TKG reasoning aims to predict facts in future events based on a sequence of observed historical facts. This task typically operates under two main scenarios: interpolation and extrapolation. In this work, our focus is primarily on the extrapolation aspect. Recently, The embedding-based approaches leverage temporal patterns (Jin et al., 2020; Li et al.,
2021b) or structural information (Han et al., 2021b; Li et al., 2022d) to enhance prediction results. CEN (Li et al., 2022c) captures structure-variability evolutional patterns by a length-aware CNN. L2TKG (Zhang et al., 2023a) exploits the intra-time relations between co-occurring entities and inter-time relations between entities that appear at different times. PRC (Liang et al., 2023b) further models the relational correlations in the intra-time information and periodic patterns in the inter-time interactions via two novel correspondence units. Considering the long-term dependencies among entities and relations, some works model the event time (Park et al., 2022b) and the long- and short-term entity and relation representations (Zhang et al., 2023b). DaeMon (Dong et al., 2023) and RETIA (Liu et al., 2023) focus on modeling the relation feature to adaptively capture the structure and temporal information. Some TKG reasoning methods leverage reward functions to enhance prediction results, such as the time-shaped reward (Sun et al., 2021) and beam-level reward (Li et al., 2021a). Ruledbase methods also are choices for TKG reasoning (Omran et al., 2019; Lin et al., 2023). Tlogic
(Liu et al., 2022b) proposes a symbolic framework based on temporal logical rules extracted via temporal random walks. However, all of the aforementioned architectures overlook the uncertainty of future events, which is particularly common in events that occur rarely or never occur.
To tackle the above issues, DiffuTKG centers on a novel modeling paradigm from the perspective of sequence denoising generation. DiffuTKG is the first one to explore the utilization of the diffusion model on TKG reasoning, which infers future events from uncertainty in Gaussian noise.

heading: 5.2 Diffusion models on Discrete Data
text: Diffusion models (DMs) Sohl-Dickstein et al. (2015); Ho et al. (2020) have recently demonstrated the ability for high-quality generation across various domains, including image generation (Rombach et al., 2022; Ruiz et al., 2023) and audio generation (Borsos et al., 2023). Some efforts have sought to extend the applicability of continuous diffusion models into discrete spaces. Notably, Diffusion-LM (Li et al., 2022a) pioneers the adaptation of continuous diffusion models for text, incorporating an embedding step, a rounding step, and a dedicated training objective for embedding learning. Building upon this, DiffuSeq (Gong et al., 2022) introduces partial noise during the forward process, tailored for sequence-to-sequence tasks. Additionally, DiffusionNER (Shen et al., 2023) frames named entity recognition as a boundarydenoising diffusion process, effectively generating named entities from noisy spans. Despite the notable success of DMs in various domains, their application to TKG reasoning remains unexplored.

heading: 6 Conclusion
text: In this study, We introduce DiffuTKG, a novel paradigm that reconceptualizes TKG reasoning as a denoising diffusion process, tailored to address the inherent uncertainties within future facts. During the denoising training phase, we initiate the process by generating embeddings from historical data as conditional inputs. Following this, we methodically introduce Gaussian noise to the target entities, reflecting the uncertainty of future facts, and utilize a conditional denoising decoder for their accurate reconstruction. In addition to reconstruction loss, we incorporate an auxiliary loss aimed at reducing prediction biases, particularly those arising from an overemphasis on historically frequent scenarios at
the expense of rare or previously unseen facts. Our empirical evaluations across various benchmark datasets confirm DiffuTKG’s superior performance and efficiency in inference.

heading: Acknowledgement
text: We would like to thank the anonymous reviewers for their valuable disucssion and constructive feedback. This work was supported by the National Natural Science Foundation of China (U22B2061, U2336204), the National Key R&D Program of China (2022YFB4300603) and Sichuan Science and Technology Program (2023YFG0151).
Limitations
In this section, we discuss the limitations of DiffuTKG. First, to maintain a simplified model, we opted not to increase complexity and directly input all historical events into the model without applying correlation-based filtering. However, this approach inevitably results in the inclusion of redundant information. Second, while the effectiveness of uncertainty loss has been demonstrated, the method of calculating the score has not been explored in depth, except for using simple nonlinear MLPs.
Ethics Statement
To ensure ethical considerations, we will provide a detailed description as follows:
1. All of the datasets used are collected and annotated in previous studies. The use of these datasets in our work does not involve any interaction or collection of individual privacy data.
2. Our work focuses on methodology studies and experiments. The results and models in our paper will not be used to harm or deceive any individuals or groups.
3. There are no potential conflicts of interest or ethical issues regarding financial support in the sponsors and funds of our research work.

heading: A Datasets
text: Followed by Li et al. (2021b)’s work, the data is split into training, validation, and test sets by 8:1:1 over the timeline. The detailed statistics of the datasets are presented in Table 4.

heading: B Baselines
text: The comparison of TKG reasoning models with our work is presented as follows:
RE-NET (Jin et al., 2020) adopts RNN and RGCNs to capture the temporal and structural dependencies from entity sequences.
RE-GCN (Li et al., 2021b) proposes a novel Recurrent Evolution network based on Graph Convolution Network (GCN) to learns the evolutional representations of entities and relations at each timestamp by modeling the KG sequence recurrently
TANGO (Han et al., 2021b) proposes a multirelational GCN to capture structural dependencies on TKGs and learns continuous dynamic representations using graph neural ordinary differential equations.
xERTE (Han et al., 2021a) reasons over queryrelevant subgraphs of temporal KGs and jointly models the structural dependencies and the temporal dynamics.
TiRGN (Li et al., 2022b) employs a local recurrent graph encoder network to model the historical dependency of events at adjacent timestamps and utilizes a global history encoder network to gather repeated historical facts.
CEN (Li et al., 2022c) adopts a length-aware CNN to learn evolutional patterns of different lengths and explore online training strategy to deal with the problem of time-variability.
CENET (Xu et al., 2023) adopts contrastive learning to better guide the fusion of local and global historical information and enhance the ability to resist interference.
RETIA (Liu et al., 2023) evolutionally aggregates adjacent entity and relation features to produce relation embeddings on a twin hyperrelation subgraph sequence, thus spanning the messagepassing gap.
HGLS (Zhang et al., 2023b) transforms the TKG sequence into a global graph to explicitly associate historical entities at different times.
DaeMon (Dong et al., 2023) adaptively captures the temporal path information between query subject and object candidates across time by utilizing
historical structural and temporal characteristics while considering the query feature.
RPC (Liang et al., 2023a) sufficiently mines the information underlying the Relational correlations and Periodic patterns via two novel Correspondence units.
L2TKG (Zhang et al., 2023a) exploits the intratime and inter-time latent relations to alleviate the problem of missing associations in TKG reasoning.
CluSTer (Li et al., 2021a) learns a beam search policy via reinforcement learning (RL) to induce multiple clues from historical facts and adopts a GCN-based sequence method to deduce answers from clues.
TITer (Sun et al., 2021) navigates through TKG historical snapshots and searches for the temporal evidence chain to locate the target object.
Tlogic (Liu et al., 2022b) generates answers by applying rules to observed events before the query timestamp and scores the answer candidates relying on the rules’ confidences and time differences.
TECHS (Lin et al., 2023) integrates propositional and first-order reasoning in a logical decoder to achieve explainability.
C Implementation Details
Hyperparameter settings We utilize the Adam optimizer with a learning rate set to 0.001 and l2 regularization set to 1e-5. The number of training epochs is set to 100. Besides, the noise scale δ, the noise lower bound αmin, the noise upper bound αmax are 50,1e-2, respectively, with a total diffusion step T of 200. The length of historical TKGs denoted as L, is set to 64 for all datasets. The hidden size for entities and relations, denoted as h, is fixed at 200 for all datasets. The layer numbers of the transformer encoder are 2 for all datasets. The dropout rate is 0.2 for all datasets. The temperature coefficient τ is set to 0.5 across all datasets, and the scale parameter are searched in 2,3,4 for all
datasets. We report a statistically significant improvement (p < 0.05) based on the bootstrap paired t-test in our experimental results. The computational experiments in Section 4.8 are conducted on NVIDIA Tesla V100 (32G). Other experiments are conducted on NVIDIA Tesla A100 (80G). Calculation Method for Frequency Information For the query (s, r, o, t), we store the event frequency using a sparse matrix MF ∈ Rd·w×d, where w is the number of relations. Each row is represented as the vector F = MF (s,r) ∈ Rd, counting the number of occurrences. The multiheat vector F01 is derived by converting F , where occurrences are recorded as 1, and the rest are set to 0.

heading: Future Work
text: In this study, We introduce DiffuTKG, a novel paradigm that reconceptualizes TKG reasoning as a denoising diffusion process, tailored to address the inherent uncertainties within future facts. During the denoising training phase, we initiate the process by generating embeddings from historical data as conditional inputs. Following this, we methodically introduce Gaussian noise to the target entities, reflecting the uncertainty of future facts, and utilize a conditional denoising decoder for their accurate reconstruction. In addition to reconstruction loss, we incorporate an auxiliary loss aimed at reducing prediction biases, particularly those arising from an overemphasis on historically frequent scenarios at
the expense of rare or previously unseen facts. Our empirical evaluations across various benchmark datasets confirm DiffuTKG’s superior performance and efficiency in inference