Temporal Knowledge Graph Reasoning Based on N-tuple Modeling (2023)

Abstract: Reasoning over Temporal Knowledge Graphs (TKGs) that predicts temporal facts (e.g., events) in the future is crucial for many applications. The temporal facts in existing TKGs only contain their core entities (i.e., the entities playing core roles therein) and formulate them as quadruples, i.e., (subject entity, predicate, object entity, timestamp). This formulation oversimplifies temporal facts and inevitably causes information loss. Therefore, we propose to describe a temporal fact more accurately as an n-tuple, containing not only its predicate and core entities, but also its auxiliary entities, as well as the roles of all entities. By so doing, TKGs are augmented to N-tuple Temporal Knowledge Graphs (N-TKGs). To conduct reasoning over N-TKGs, we further propose N-tuple Evolutional Network (NE-Net). It recurrently learns the evolutional representations of entities and predicates in temporal facts at different timestamps in the history via modeling the relations among those entities and predicates. Based on the learned representations, reasoning tasks at future timestamps can be realized via task-specific decoders. Experiment results on two newly built datasets demonstrate the superiority of N-TKG and the effectiveness of NE-Net.

## introduction knowledge graphs (kgs), which represent facts in the form of triples @xcite , i.e., (subject entity, predicate, object entity), have attracted increasing research attention in recent years. as the validity of facts can change over time, temporal knowledge graphs (tkgs) extend triples into quadruples @xcite , i.e., (subject entity, predicate, object entity, timestamp), to represent temporal facts, such as events. reasoning over tkgs aims to answer queries about future temporal facts, such as (america, sanction, ?, 2024-1-10), based on the * corresponding authors. motivated by these, we propose to describe temporal facts more accurately as n-tuples and correspondingly augment tkgs as n-tuple temporal knowledge graphs (n-tkgs), so as not to cause information loss. specifically, each ntuple in n-tkgs is denoted in form of (predicate, role 1 :entity 1 , ..., timestamp). for example, the event "consult" in figure 1 is described as (consult, client: germany, consultant: france, consult content: iran, t 2 ). similar to that of tkgs, reasoning over n-tkgs is an important task for their practical applications. however, existing methods for the reasoning task on either tkgs with quadruples or static kgs with n-tuples have limitations when facing n-tkgs. in more detail, the reasoning methods for quadruplebased tkgs @xcite @xcite @xcite cannot be directly applied to n-tuples and have to take adaptation measures. those reasoning methods for static n-tuple kgs @xcite @xcite cannot capture temporal information contained in those facts at different timestamps. to solve the above problems, we propose a model called n-tuple evolutional network (ne-net) to conduct reasoning tasks over n-tkgs. ne-net consists of an entity-predicate encoder and task-specific decoders. the entity-predicate encoder is used to learn the evolutional representations of entities and predicates in different temporal facts. specifically, at each timestamp, it employs an entity-predicate unit to capture the relations among entities and predicates formed upon concurrent facts. it also adopts a core-entity unit to emphasize and more directly model the relations between core entities (in terms of predicates) of individual temporal facts, as such relations contain the most primary information of the facts. next, an aggregation unit is utilized to integrate the outputs of these two units so as to obtain more accurate representations of entities and predicates. note that the encoder employs a recurrent mechanism to autoregressively learn the evolutional representations from the facts at temporally adjacent timestamps, and thus implicitly reflects temporal behavioral patterns of entities in their evolutional representations. ne-net finally leverages task-specific decoders to conduct different reasoning tasks, namely, predicate reasoning and entity reasoning, respectively, based on the learned representations of entities and predicates. in addition, as there is no n-tkg dataset publicly available, we construct two new datasets, named nwiki and nice, to facilitate the research on reasoning over n-tkgs. 2 related works static n-tuple kg reasoning. static n-tuple kg reasoning aims to infer the missing elements of a given n-tuple. existing methods can be divided into three categories, namely, hyperplane methods, multi-linear methods and neural methods. hyperplane methods @xcite project entities into relation hyperplanes to calculate the plausibility scores for ntuples. multi-linear methods @xcite apply the multi-linear product to measure the plausibility scores. neural methods @xcite leverage cnn or gcn to capture the relatedness scores of role-entity pairs in n-tuples. particularly, neuinfer @xcite and hinge @xcite notice that different elements in n-tuples are of different importance and propose to represent an n-tuple as a main triplet along with auxiliary role-entity pairs. however, the occurrence time of temporal facts is viewed as a common kind of information about the facts and is usually ignored by the above methods @xcite . therefore, these methods cannot model the temporal behavioral patterns across adjacent timestamps and are not effective enough to exploit historical data for future predictions. tkg reasoning. there are two different task settings for tkg reasoning, namely, interpolation and extrapolation @xcite @xcite . tkg reasoning under the former setting is to infer missing elements of facts at known timestamps (i.e., the history) @xcite @xcite . under the interpolation setting, hyte @xcite extends the idea of transh @xcite and associates each timestamp with a corresponding hyperplane. de-distmult @xcite and de-simple @xcite both utilize a diachronic embedding for entities and relations, dividing the representations of entities into a static segment and a time-varying seg- query type h t ent h t ent p(@xmath0. tkg reasoning under the latter setting, which this paper focuses on, is to infer missing elements of facts at future timestamps @xcite @xcite . re-net @xcite and regcn @xcite both adopt a relation-aware gcn and a recurrent component to capture temporal associations within the history. cygnet @xcite applies a timeaware copy-generation network to model the repetitive pattern of frequently occurring facts. focusing on the explainable tkg reasoning methods, titer @xcite and cluster @xcite employ reinforcement learning to adaptively search informational facts in the history. more recently, cen @xcite utilizes a length-aware cnn to mine complex temporal patterns of different lengths. cenet @xcite employs the contrastive learning strategy to identify potential entities from historical and non-historical dependency. in the above methods, the facts are all in the form of quadruples. therefore, they cannot directly model the temporal associations involving auxiliary entities. here, all ρ i and e i (1 ≤ @xmath1. ## the ne-net model as illustrated in figure 2 , ne-net consists of an entity-predicate encoder and task-specific decoders. the entity-predicate encoder recurrently models the relations among entities and predicates generated by concurrent facts in the history and outputs the evolutional representations of all entities and predicates. based on the learned representations, task-specific decoders are adopted to conduct different reasoning tasks. ## conclusions in this paper, we proposed to utilize n-tuples to represent temporal facts more precisely, and correspondingly enhanced tkgs as n-tkgs. we further introduced a model called ne-net, to conduct reasoning over n-tkgs. ne-net learns evolutional representations of entities and predicates, via modeling the relations among entities and predicates, and highlighting the relations among core entities. further, it adopts task-specific decoders to conduct different reasoning tasks. experimental results on two new datasets show the superiority of n-tkg and the effectiveness of ne-net.