Poisson-Gamma Modeling of Inter-Relational Dependencies in Dynamic Knowledge Graphs

arXiv cs.LG Papers

Summary

This paper introduces PGRE, a probabilistic model for dynamic knowledge graphs that captures inter-relational dependencies using Poisson-Gamma and Markov processes, achieving competitive link prediction performance especially in sparse settings.

arXiv:2607.02872v1 Announce Type: new Abstract: Dynamic knowledge graphs are ubiquitous in today's AI applications, as we represent molecular structures, social relationships, and language information using these graph models. As knowledge graphs evolve over time and are often noisy and incomplete, modeling their temporal and relational dependencies becomes crucial for downstream tasks. To address these challenges, this paper proposes PGRE (Poisson-Gamma Relational Evolution), a probabilistic model for modeling inter-relational dependencies in dynamic knowledge graphs. PGRE represents multi-relational temporal links via a Poisson-Bernoulli formulation. It introduces Gamma-distributed latent variables to capture entity-factor associations and cross-relation dependencies mediated by shared latent communities. A Gamma Markov process further models the temporal evolution of these latent variables, enabling principled characterization of relational dynamics. Experiments on benchmark datasets show that PGRE achieves competitive performance in link prediction, particularly in sparse settings, while revealing meaningful relational evolution patterns in dynamic knowledge graphs.
Original Article
View Cached Full Text

Cached at: 07/07/26, 04:39 AM

# Poisson–Gamma Modeling of Inter-Relational Dependencies in Dynamic Knowledge Graphs
Source: [https://arxiv.org/html/2607.02872](https://arxiv.org/html/2607.02872)
Nan FangSchool of Computing and Information Technology Great Bay University Dongguan, Guangdong, ChinaCollege of Computer Science and Software Engineering Shenzhen University Shenzhen, Guangdong, ChinaYijun WangSchool of Computing and Information Technology Great Bay University Dongguan, Guangdong, ChinaTsinghua University Shenzhen, Guangdong, ChinaHao LiaoSikun YangCorresponding author: sikunyang@gbu\.edu\.cnSchool of Computing and Information Technology Great Bay University Dongguan, Guangdong, ChinaGuangdong Provincial Key Laboratory of Mathematical and Neural Dynamical Systems

###### Abstract

Dynamic knowledge graphs are ubiquitous in today’s AI applications, as we represent molecular structures, social relationships, and language information using these graph models\. As knowledge graphs evolve over time and are often noisy and incomplete, modeling their temporal and relational dependencies becomes crucial for downstream tasks\. To address these challenges, this paper proposes PGRE \(Poisson–Gamma Relational Evolution\), a probabilistic model for modeling inter\-relational dependencies in dynamic knowledge graphs\. PGRE represents multi\-relational temporal links via a Poisson–Bernoulli formulation\. It introduces Gamma\-distributed latent variables to capture entity–factor associations and cross\-relation dependencies mediated by shared latent communities\. A Gamma Markov process further models the temporal evolution of these latent variables, enabling principled characterization of relational dynamics\. Experiments on benchmark datasets show that PGRE achieves competitive performance in link prediction, particularly in sparse settings, while revealing meaningful relational evolution patterns in dynamic knowledge graphs\.

## 1Introduction

Knowledge graphs \(KGs\)\[ji2021survey\]provide a fundamental representation of structured knowledge about entities and relations, and support a wide range of applications including question answering\[yasunaga2021qa,chakraborty2021introduction,jia2021complex\], recommender systems\[wang2019explainable,wang2021learning,wang2019kgat\], and semantic search\[thingbaijam2024incorporating,xiong2017explicit,ehrlinger2016towards\]\. In practical settings, however, knowledge is inherently dynamic: relations may emerge, evolve, or disappear over time\. This motivates the study of dynamic knowledge graphs \(DKGs\)\[liang2024survey\]\. DKGs model multi\-relational interactions as temporal event sequences to predict future or missing relations from historical observations\.

Knowledge graph completion has been extensively studied over the past decade, with significant progress driven by representation learning methods based on neural architectures\[schlichtkrull2018modeling,trivedi2017know,rossi2020temporal,jin2019recurrent\]\. Despite their strong empirical performance, these approaches often rely on large amounts of training data and exhibit limited interpretability due to their black\-box nature\[chen2023tempme,seo2024self\]\. Such limitations become more pronounced in sparse or small\-sample settings, which are common in real\-world dynamic knowledge graphs\[huang2023temporal,zhou2022tgl\]\.

At the same time, relations in knowledge graphs are rarely independent\. Different relation types may exhibit structured dependencies, and relational facts observed in the past can directly influence future interactions\[schlichtkrull2018modeling,trivedi2017know\]\. As illustrated in Fig\.[1](https://arxiv.org/html/2607.02872#S1.F1), such dependencies often manifest as structured relation transitions over time, where the relation of an entity pair at timettdepends on its state at the previous time stept−1t\\\!\-\\\!1\. Ignoring these inter\-relational and temporal dependencies may result in an incomplete characterization of relational evolution\. Bayesian approaches provide a principled alternative by explicitly modeling uncertainty and structured dependencies\[acharya2015nonparametric,yang2018poisson,pmlr\-v80\-yang18b,schein2019poisson,pmlr\-v124\-yang20a,DBLP:conf/sdm/YangZ23,DBLP:conf/aaai/YangZ24\], offering a natural framework for capturing relational dynamics while maintaining interpretability\.

![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/figure1.png)Figure 1:Illustration of a relation transition prior and its manifestation in dynamic knowledge graphs\. The top panel shows an illustrative prior over relation transitions, where directed edges encode assumed transition probabilities between relation types\. The bottom panel provides an example of how the relation between an entity pair may change from timet−1t\\\!\-\\\!1tott, depending on its previous relation \(e\.g\.,Pr⁡\(yu​v,t=r2∣yu​v,t−1=r3\)\\Pr\(y\_\{uv,t\}=r\_\{2\}\\mid y\_\{uv,t\-1\}=r\_\{3\}\)\)\.In this paper, we propose PGRE \(Poisson–Gamma Relational Evolution\), a probabilistic model for dynamic knowledge graph completion\. PGRE represents multi\-relational temporal links through a Poisson–Gamma latent\-variable formulation and introduces a relation transition matrix within Gamma\-Markov dynamics to explicitly capture inter\-relational temporal dependencies\. By jointly modeling entity–factor associations and relation\-to\-relation evolution in a unified generative framework, PGRE provides interpretable latent representations and supports tractable posterior inference for dynamic link prediction\.

The main contributions of this paper are summarized as follows:

1. 1\.PGRE, a probabilistic model for dynamic knowledge graph completion, is proposed to jointly model entity–factor associations and inter\-relational temporal dynamics\.
2. 2\.Single\-relation probabilistic modeling is extended to a multi\-relational setting, enabling structured characterization of relational evolution in dynamic knowledge graphs\.
3. 3\.An efficient Gibbs sampling algorithm based on negative\-binomial–logarithmic data augmentation is developed for tractable posterior inference\.
4. 4\.Extensive experiments on benchmark datasets are conducted, demonstrating that PGRE achieves competitive or superior link prediction performance, particularly in sparse and small\-sample regimes, while revealing meaningful relational evolution patterns\.

## 2Related Work

Dynamic knowledge graph completion has been extensively studied using neural representation learning methods\. Early approaches extend static embedding models by incorporating temporal information, including TTransE\[garcia2018learning\], TA\-TransE and TA\-DistMult\[leblay2018deriving\], HyTE\[dasgupta2018hyte\], DacKGR\[lv2020dynamic\], and DKGE\[wu2022efficiently\], which introduce time\-aware embeddings or temporal constraints to model relation evolution\. Subsequent work combines graph neural networks with sequence modeling to capture both structural context and temporal dynamics\. Representative models include DyRep\[trivedi2019dyrep\], RE\-NET\[jin2019recurrent\], and RE\-GCN\[li2021temporal\], which leverage attention mechanisms, recurrent units, or evolutionary aggregation to predict future relations\. More recently, large language models have been leveraged for temporal knowledge graph forecasting to improve cross\-scenario generalization\[bai2025g2s,tang2025anre\]\. While these neural approaches achieve strong empirical performance on large datasets, they typically rely on extensive training data, offer limited interpretability and face challenges in sparse or small\-sample regimes\.

Probabilistic modeling provides a principled alternative for dynamic network analysis by explicitly characterizing uncertainty and temporal evolution\.Early work builds on the stochastic block model \(SBM\)\[holland1983stochastic,nowicki2001estimation\]and its nonparametric extensions such as IRM\[kemp2006learning\]and GP\-EPM\[zhou2015infinite\]\. Dynamic extensions include the dynamic stochastic block model ofmatias2017statistical, D\-NGPPF\[acharya2015nonparametric\], which models smoothly evolving communities via gamma\-Markov chains, and DPGM\[yang2018poisson\], which allows time\-varying community memberships\. A recent extension, G\-HSEPM\[yu2025tracking\], introduces hierarchical transition structures to characterize latent community evolution in dynamic networks\. However, these models typically focus on single undirected networks and do not explicitly address multi\-relational dynamics\. Another line of research studies temporal interaction data by reshaping dynamic knowledge graphs into event–time count matrices, leading to models such as PGDS\[schein2016poisson\], PRGDS\[schein2019poisson\], and NBRGDS\[huang2024negative\]\. Although effective for modeling temporal intensities, these approaches capture multi\-relational structure indirectly through data transformation rather than directly modeling relation interactions\. As a result, Bayesian modeling of dynamic multi\-relational knowledge graphs remains relatively underexplored\.

## 3The Proposed Dynamic Knowledge Graph Model

This section begins by defining the problem setting, followed by a detailed description of the proposed Poisson–Gamma model for modeling and tracking relational evolution in dynamic knowledge graphs\.

### 3\.1Notation and Problem Definition

A temporal knowledge graph \(TKG\) represents time\-evolving relational facts as a set of time\-stamped quadruples\(s,r,o,t\)\(s,r,o,t\), wheressandoodenote entities,rrdenotes a relation type, andttis a discrete timestamp\. The collection of events at timettforms a snapshotGtG\_\{t\}, and a TKG overTTtime steps is represented as a sequence𝒢=\{G1,…,GT\}\\mathcal\{G\}=\\\{G\_\{1\},\\dots,G\_\{T\}\\\}\.

For modeling convenience, we represent the TKG as a binary tensorℳ∈\{0,1\}T×R×N×N\\mathcal\{M\}\\in\\\{0,1\\\}^\{T\\times R\\times N\\times N\}, whereℳ​\[t\]​\[r\]​\[s\]​\[o\]=1\\mathcal\{M\}\[t\]\[r\]\[s\]\[o\]=1indicates the presence of relationrrfromsstoooat timett\. Temporal knowledge graph completion then amounts to predicting missing entries ofℳ\\mathcal\{M\}\. In this work, we focus on the forecasting setting, where the objective is to infer future relations based on historical observations\. Given historical snapshots up to timetq−1t\_\{q\}\-1, the goal is to infer whether a relation\(s,r,o\)\(s,r,o\)holds at a query timetqt\_\{q\}\.

### 3\.2Poisson–Gamma Relational Evolution

We first describe how to represent the structure of latent communities at a single time step, and then explain how the influence of these latent communities on relation types evolves over time\. Throughout the paper, we useGam\\mathrm\{Gam\},Pois\\mathrm\{Pois\},Dir\\mathrm\{Dir\},Bern\\mathrm\{Bern\}, andNB\\mathrm\{NB\}to denote the Gamma, Poisson, Dirichlet, Bernoulli, and negative binomial distributions, respectively\.

To characterize the community structure of knowledge graphs, we associate each entity with two nonnegativeentity–community factorvectors, corresponding to its roles as a subject and as an object\. These vectors capture role\-specific soft affiliations with multiple latent communities, while their absolute scales are not interpreted in isolation\. Instead, their relative patterns, together with the relation\- and time\-specific community weights, determine the strength of multi\-relational interactions\. Intuitively, entities may participate in multiple types of interactions simultaneously\. For example, a researcher may collaborate with some peers while advising others\. Such overlapping and role\-dependent patterns can be represented through different subject\- and object\-side affiliations with multiple latent communities\. Specifically, we assume that the dynamic knowledge graph containsKKlatent communities\. The subject\-side factor loading of entityiion communitykkand the object\-side factor loading of entityjjon communitykkare assigned Gamma priors asϕi​k∼Gam​\(a0,1/ci\)\\phi\_\{ik\}\\sim\\mathrm\{Gam\}\(a\_\{0\},1/c\_\{i\}\)andψj​k∼Gam​\(a1,1/cj\)\\psi\_\{jk\}\\sim\\mathrm\{Gam\}\(a\_\{1\},1/c\_\{j\}\), respectively, whereGam​\(α,θ\)\\mathrm\{Gam\}\(\\alpha,\\theta\)denotes a Gamma distribution with shapeα\\alphaand scaleθ\\theta\. The hyperparametersa0a\_\{0\}anda1a\_\{1\}control the prior shapes, whilecic\_\{i\}andcjc\_\{j\}regulate the magnitudes of the subject\- and object\-side community factor loadings, respectively\.

We assume that latent communities evolve over time and are influenced by relation types\. Therefore, we introduce a time\- and relation\-dependent variableδk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}to represent the state of communitykkunder relationrrat timett\. Intuitively, different relation types in a knowledge graph are not independent, and their dynamics can influence each other through shared latent community structures\. Entities sharing similar semantic contexts often exhibit correlated relational behaviors over time\. For example, the emergence of a “collaborates with” relation between two researchers may increase the likelihood of a subsequent “publishes with” relation within the same community\. To capture such dependencies, we model the state of communitykkunder relationrrat timettasδk\(t,r\)∼Gam​\(∑r′=1Rπr​r′​δk\(t−1,r′\),1/τ\)\\delta\_\{k\}^\{\(t,r\)\}\\sim\\mathrm\{Gam\}\\left\(\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\,\\delta\_\{k\}^\{\(t\-1,r^\{\\prime\}\)\},1/\\tau\\right\), which indicates that the weight of communitykkunder relationrrat timettmay be influenced by the weights of the same community across all relations at the previous time stept−1t\-1\. The strength of this influence is determined by the coefficient vectorΠr=\[πr​1,πr​2,…,πr​R\]T\\Pi\_\{r\}=\[\\pi\_\{r1\},\\pi\_\{r2\},\\dots,\\pi\_\{rR\}\]^\{T\}\. In particular, we draw the initial community weight under relationrrfrom a Gamma prior asδk\(1,r\)∼Gam​\(νr/K,1/τ\)\\delta\_\{k\}^\{\(1,r\)\}\\sim\\mathrm\{Gam\}\(\\nu\_\{r\}/K,1/\\tau\)\. We impose a Dirichlet prior on the transition kernel asπr∼Dir​\(ν1​νr,⋯,ξ​νr,⋯,νR​νr\)\\pi\_\{r\}\\sim\\mathrm\{Dir\}\(\\nu\_\{1\}\\nu\_\{r\},\\cdots,\\xi\\nu\_\{r\},\\cdots,\\nu\_\{R\}\\nu\_\{r\}\), and draw the hyperparameterνr\\nu\_\{r\}from a Gamma prior asνr∼Gam​\(γ0/R,1/β\)\\nu\_\{r\}\\sim\\mathrm\{Gam\}\(\\gamma\_\{0\}/R,1/\\beta\), whereγ0\\gamma\_\{0\}is the concentration parameter andβ\\betais the hyperparameter\.

It is worth noting that as the number of latent communitiesKKapproaches infinity, the hierarchical Gamma prior exhibits an inherent shrinkage property that drives the weights of redundant communities toward zero\. This property enables the model to automatically infer an appropriate number of active communities from data, rather than relying on a manually fixedKK, thereby improving flexibility and interpretability in modeling real\-world dynamic knowledge graphs\.

Given the subject\- and object\-side community factor loadingsϕi\\bm\{\\phi\}\_\{i\}and𝝍j\\bm\{\\psi\}\_\{j\}, together with the relation\- and time\-dependent community weightsδk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}, we model the probability of a link of typerrfrom subject entityiito object entityjjat timettusing the Bernoulli–Poisson link function as

ℳ​\[t\]​\[r\]​\[i\]​\[j\]∼Bern​\(1−exp⁡\(−∑k=1Kδk\(t,r\)​ϕi​k​ψj​k\)\)\.\\mathcal\{M\}\[t\]\[r\]\[i\]\[j\]\\sim\\mathrm\{Bern\}\\left\(1\-\\exp\\left\(\-\\sum\_\{k=1\}^\{K\}\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\psi\_\{jk\}\\right\)\\right\)\.\(1\)Equivalently, this formulation can be expressed as

ℳi​j\(t,r\)\\displaystyle\\mathcal\{M\}\_\{ij\}^\{\(t,r\)\}=\\displaystyle\\;=\\;𝟙​\(xi​j\(t,r\)≥1\),\\displaystyle\\mathds\{1\}\\big\(x\_\{ij\}^\{\(t,r\)\}\\geq 1\\big\),\(2\)xi​j\(t,r\)\\displaystyle x\_\{ij\}^\{\(t,r\)\}∼\\displaystyle\\;\\sim\\;Pois​\(∑k=1Kδk\(t,r\)​ϕi​k​ψj​k\),\\displaystyle\\mathrm\{Pois\}\\Big\(\\sum\_\{k=1\}^\{K\}\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\psi\_\{jk\}\\Big\),\(3\)whereℳi​j\(t,r\)\\mathcal\{M\}\_\{ij\}^\{\(t,r\)\}, equivalent toℳ​\[t\]​\[r\]​\[i\]​\[j\]\\mathcal\{M\}\[t\]\[r\]\[i\]\[j\]in the tensor representation, indicates whether the event\(i,r,j\)\(i,r,j\)occurs at timett\. This Bernoulli–Poisson formulation effectively captures the discrete and sparse nature of temporal multi\-relational data and enables tractable posterior inference\.

![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/model.png)Figure 2:The overall structure of the proposed PGRE model\. The upper part illustrates the hierarchical Gamma–Dirichlet process governing the temporal and relational evolution of community weightsδk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}, while the lower part shows the Poisson–Bernoulli generative process for multi\-relational links over time\.The full generative Poisson\-Gamma relational model is specified as follows\.

ℳi​j\(t,r\)\\displaystyle\\mathcal\{M\}\_\{ij\}^\{\(t,r\)\}=\\displaystyle\\;=\\;𝟙​\(xi​j\(t,r\)≥1\),\\displaystyle\\mathbbm\{1\}\\big\(x\_\{ij\}^\{\(t,r\)\}\\geq 1\\big\),\(4\)xi​j\(t,r\)\\displaystyle x\_\{ij\}^\{\(t,r\)\}∼\\displaystyle\\;\\sim\\;Pois​\(∑k=1Kδk\(t,r\)​ϕi​k​ψj​k\),\\displaystyle\\mathrm\{Pois\}\\Big\(\\sum\_\{k=1\}^\{K\}\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\psi\_\{jk\}\\Big\),\(5\)ϕi​k\\displaystyle\\phi\_\{ik\}∼\\displaystyle\\;\\sim\\;Gam​\(a0,1/ci\),ψj​k∼Gam​\(a1,1/cj\),\\displaystyle\\mathrm\{Gam\}\(a\_\{0\},1/c\_\{i\}\),\\quad\\psi\_\{jk\}\\;\\sim\\;\\mathrm\{Gam\}\(a\_\{1\},1/c\_\{j\}\),\(6\)δk\(t,r\)\\displaystyle\\delta\_\{k\}^\{\(t,r\)\}∼\\displaystyle\\;\\sim\\;Gam​\(∑r′=1Rπr​r′​δk\(t−1,r′\),1/τ\),t=2,…,T,\\displaystyle\\mathrm\{Gam\}\\Big\(\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\,\\delta\_\{k\}^\{\(t\-1,r^\{\\prime\}\)\},1/\\tau\\Big\),\\quad t=2,\\dots,T,\(7\)δk\(1,r\)\\displaystyle\\delta\_\{k\}^\{\(1,r\)\}∼\\displaystyle\\;\\sim\\;Gam​\(νr/K,1/τ\),\\displaystyle\\mathrm\{Gam\}\(\\nu\_\{r\}/K,1/\\tau\),\(8\)πr\\displaystyle\\pi\_\{r\}∼\\displaystyle\\;\\sim\\;Dir​\(ν1​νr,…,ξ​νr,…,νR​νr\),\\displaystyle\\mathrm\{Dir\}\(\\nu\_\{1\}\\nu\_\{r\},\\dots,\\xi\\nu\_\{r\},\\dots,\\nu\_\{R\}\\nu\_\{r\}\),\(9\)νr\\displaystyle\\nu\_\{r\}∼\\displaystyle\\;\\sim\\;Gam​\(γ0/R,1/β\)\.\\displaystyle\\mathrm\{Gam\}\(\\gamma\_\{0\}/R,1/\\beta\)\.\(10\)
Here,cic\_\{i\},cjc\_\{j\},ξ\\xi, andβ\\betaare assigned Gamma priors, while hyperparameters such asa0a\_\{0\},a1a\_\{1\}, andγ0\\gamma\_\{0\}are themselves drawn from Gamma distributions\. The overall structure of the proposed PGRE model is illustrated in Fig\.[2](https://arxiv.org/html/2607.02872#S3.F2)\.

## 4Inference

This section outlines the Gibbs sampling procedure for PGRE by presenting the posterior updates of key model parameters, with full derivations deferred to the supplementary material\. The following standard results are recalled for completeness and are not claimed as new theoretical contributions\[zhou2015infinite\]\.

###### Theorem 1

Letλ∼Gam​\(r,p1−p\)\\lambda\\sim\\mathrm\{Gam\}\\\!\\left\(r,\\frac\{p\}\{1\-p\}\\right\)andy∣λ∼Pois​\(λ\)y\\mid\\lambda\\sim\\mathrm\{Pois\}\(\\lambda\)\. Then the marginal distribution ofyyisNB​\(r,p\)\\mathrm\{NB\}\(r,p\)\. Equivalently, a negative binomial random variable admits a gamma–Poisson mixture representation\.

###### Theorem 2

The Poisson–logarithmic bivariate representation links the negative binomial distribution to the Poisson–CRT construction\. Ify∼NB​\(r,p\)y\\sim\\mathrm\{NB\}\(r,p\)andl∼CRT​\(y,r\)l\\sim\\mathrm\{CRT\}\(y,r\), theny=∑s=1lusy=\\sum\_\{s=1\}^\{l\}u\_\{s\}withus∼Logarithmic​\(p\)u\_\{s\}\\sim\\mathrm\{Logarithmic\}\(p\)andl∼Pois​\(−r​log⁡\(1−p\)\)l\\sim\\mathrm\{Pois\}\\\!\\left\(\-r\\log\(1\-p\)\\right\)\.

###### Theorem 3

Lety=∑n=1Nyny=\\sum\_\{n=1\}^\{N\}y\_\{n\}, whereyn∼Pois​\(λn\)y\_\{n\}\\sim\\mathrm\{Pois\}\(\\lambda\_\{n\}\)are independent Poisson random variables with ratesλn\\lambda\_\{n\}\. Then, according to the Poisson–multinomial equivalence,\(y1,…,yN\)∣y∼Mult​\(y;λ1∑nλn,…,λN∑nλn\)\(y\_\{1\},\\dots,y\_\{N\}\)\\mid y\\sim\\mathrm\{Mult\}\\left\(y;\\frac\{\\lambda\_\{1\}\}\{\\sum\_\{n\}\\lambda\_\{n\}\},\\dots,\\frac\{\\lambda\_\{N\}\}\{\\sum\_\{n\}\\lambda\_\{n\}\}\\right\)andy∼Pois​\(∑n=1Nλn\)y\\sim\\mathrm\{Pois\}\\left\(\\sum\_\{n=1\}^\{N\}\\lambda\_\{n\}\\right\)\.

Sampling latent countsxi​j​k\(t,r\)x\_\{ijk\}^\{\(t,r\)\}\.By Theorem[3](https://arxiv.org/html/2607.02872#Thmtheorem3), the latent counts are allocated across communities as

\(xi​j​k\(t,r\)∣−\)∼Mult​\(xi​j\(t,r\),δk\(t,r\)​ϕi​k​ψj​k∑k′=1Kδk′\(t,r\)​ϕi​k′​ψj​k′\)\.\(x\_\{ijk\}^\{\(t,r\)\}\\mid\-\)\\sim\\mathrm\{Mult\}\\\!\\left\(x\_\{ij\}^\{\(t,r\)\},\\frac\{\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\psi\_\{jk\}\}\{\\sum\_\{k^\{\\prime\}=1\}^\{K\}\\delta\_\{k^\{\\prime\}\}^\{\(t,r\)\}\\phi\_\{ik^\{\\prime\}\}\\psi\_\{jk^\{\\prime\}\}\}\\right\)\.\(11\)
Sampling community factor loadingsϕi​k\\phi\_\{ik\}andψj​k\\psi\_\{jk\}\.By Gamma–Poisson conjugacy, both subject\- and object\-side factor loadings admit closed\-form Gamma updates:

\(ϕi​k∣−\)∼Gam​\(a0\+∑t,r,jxi​j​k\(t,r\),\(ci\+∑t,r,jδk\(t,r\)​ψj​k\)−1\),\(\\phi\_\{ik\}\\mid\-\)\\sim\\mathrm\{Gam\}\\\!\\left\(a\_\{0\}\+\\sum\_\{t,r,j\}x\_\{ijk\}^\{\(t,r\)\},\\left\(c\_\{i\}\+\\sum\_\{t,r,j\}\\delta\_\{k\}^\{\(t,r\)\}\\psi\_\{jk\}\\right\)^\{\-1\}\\right\),\(12\)
\(ψj​k∣−\)∼Gam​\(a1\+∑t,r,ixi​j​k\(t,r\),\(cj\+∑t,r,iδk\(t,r\)​ϕi​k\)−1\)\.\(\\psi\_\{jk\}\\mid\-\)\\sim\\mathrm\{Gam\}\\\!\\left\(a\_\{1\}\+\\sum\_\{t,r,i\}x\_\{ijk\}^\{\(t,r\)\},\\left\(c\_\{j\}\+\\sum\_\{t,r,i\}\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\right\)^\{\-1\}\\right\)\.\(13\)
Sampling community weightsδk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}\.For the final time stept=Tt=T, applying the Gamma–Poisson conjugacy yields the following posterior update forδk\(T,r\)\\delta\_\{k\}^\{\(T,r\)\}\.

\(δk\(T,r\)∣−\)∼Gam​\(x⋅⁣⋅k\(T,r\)\+∑r′=1Rπr​r′​δk\(T−1,r′\),\(τ\+sk\)−1\)\.\(\\delta\_\{k\}^\{\(T,r\)\}\\mid\-\)\\sim\\mathrm\{Gam\}\\\!\\left\(x\_\{\\cdot\\cdot k\}^\{\(T,r\)\}\+\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(T\-1,r^\{\\prime\}\)\},\(\\tau\+s\_\{k\}\)^\{\-1\}\\right\)\.\(14\)
To incorporate forward information, we marginalizeδk\(t\+1,r\)\\delta\_\{k\}^\{\(t\+1,r\)\}via Theorem[1](https://arxiv.org/html/2607.02872#Thmtheorem1)and introduce auxiliary variables

lk\(t,⋅r\)∼CRT​\(x⋅⁣⋅k\(t,r\)\+lk\(t\+1,⋅r\),∑r′=1Rπr​r′​δk\(t−1,r′\)\),l\_\{k\}^\{\(t,\\cdot r\)\}\\sim\\text\{CRT\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(t,r\)\}\+l\_\{k\}^\{\(t\+1,\\cdot r\)\},\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(t\-1,r^\{\\prime\}\)\}\\right\),\(15\)which propagate forward information across time\.

Combining backward counts and forward augmentation, the conditional posterior ofδk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}is

\(δk\(t,r\)\|−\)\\displaystyle\(\\delta\_\{k\}^\{\(t,r\)\}\|\-\)∼Gam\(x⋅⁣⋅k\(t,r\)\+lk\(t\+1,⋅r\)\+∑r′Rπr​r′δk\(t−1,r′\),\\displaystyle\\sim\\text\{Gam\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(t,r\)\}\+l\_\{k\}^\{\(t\+1,\\cdot r\)\}\+\\sum\_\{r^\{\\prime\}\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(t\-1,r^\{\\prime\}\)\},\\right\.\(16\)1/\(τ\+sk−ln\(1−ρk\(t\+1\)\)\)\),\\displaystyle\\quad\\left\.1/\(\\tau\+s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(t\+1\)\}\)\)\\right\),
The auxiliary parameterρk\(t\)\\rho\_\{k\}^\{\(t\)\}follows the recursion

ρk\(t\)=sk−ln⁡\(1−ρk\(t\+1\)\)τ\+sk−ln⁡\(1−ρk\(t\+1\)\)\.\\rho\_\{k\}^\{\(t\)\}=\\frac\{s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(t\+1\)\}\)\}\{\\tau\+s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(t\+1\)\}\)\}\.\(17\)
Sampling the transition matrixπr\\pi\_\{r\}\.After marginalizing outδ\\delta, the auxiliary counts follow a multinomial distribution\(lk\(t,1​r\),…,lk\(t,R​r\)\)∼Mult​\(lk\(t,⋅r\),\(π1​r,…,πR​r\)\)\(l\_\{k\}^\{\(t,1r\)\},\\dots,l\_\{k\}^\{\(t,Rr\)\}\)\\sim\\text\{Mult\}\\left\(l\_\{k\}^\{\(t,\\cdot r\)\},\(\\pi\_\{1r\},\\dots,\\pi\_\{Rr\}\)\\right\)\. By the Dirichlet–multinomial conjugacy, the posterior distribution ofπr\\pi\_\{r\}is given by

\(πr\|−\)∼Dir\(\\displaystyle\(\\pi\_\{r\}\|\-\)\\sim\\text\{Dir\}\\Bigl\(ν1​νr\+∑t=2T∑k=1Klk\(t,1​r\),…,\\displaystyle\\nu\_\{1\}\\nu\_\{r\}\+\\sum\_\{t=2\}^\{T\}\\sum\_\{k=1\}^\{K\}l\_\{k\}^\{\(t,1r\)\},\\ \\dots,\(18\)ξ​νr\+∑t=2T∑k=1Klk\(t,r​r\),…,\\displaystyle\\xi\\nu\_\{r\}\+\\sum\_\{t=2\}^\{T\}\\sum\_\{k=1\}^\{K\}l\_\{k\}^\{\(t,rr\)\},\\ \\dots,νRνr\+∑t=2T∑k=1Klk\(t,R​r\)\)\.\\displaystyle\\nu\_\{R\}\\nu\_\{r\}\+\\sum\_\{t=2\}^\{T\}\\sum\_\{k=1\}^\{K\}l\_\{k\}^\{\(t,Rr\)\}\\Bigr\)\.
Samplingνr\\nu\_\{r\}andξ\\xi\.We marginalize overΠ\\Pito obtain a Dirichlet–multinomial distribution

\(l⋅\(⋅,1​r\),…,l⋅\(⋅,R​r\)\)\\displaystyle\(l\_\{\\cdot\}^\{\(\\cdot,1r\)\},\\dots,l\_\{\\cdot\}^\{\(\\cdot,Rr\)\}\)\(19\)∼DirMult​\(l⋅\(⋅,⋅r\),\(ν1​νr,…,ξ​νr,…,νR​νr\)\),\\displaystyle\\quad\\sim\\text\{DirMult\}\\Bigl\(l\_\{\\cdot\}^\{\(\\cdot,\\cdot r\)\},\\ \(\\nu\_\{1\}\\nu\_\{r\},\\dots,\\xi\\nu\_\{r\},\\dots,\\nu\_\{R\}\\nu\_\{r\}\)\\Bigr\),wherel⋅\(⋅,⋅r\)=∑t=1T∑k=1K∑r1=1Klk\(t,r1​r\)l\_\{\\cdot\}^\{\(\\cdot,\\cdot r\)\}=\\sum\_\{t=1\}^\{T\}\\sum\_\{k=1\}^\{K\}\\sum\_\{r\_\{1\}=1\}^\{K\}l\_\{k\}^\{\(t,r\_\{1\}r\)\}\.

By introducing a beta\-distributed auxiliary variableqrq\_\{r\}, the Dirichlet–multinomial distribution can be rewritten as a negative binomial distribution:

qr∼Beta​\(l⋅\(⋅,⋅r\),νr​\(ξ\+∑r′≠rνr′\)\)\.q\_\{r\}\\sim\\text\{Beta\}\\left\(l\_\{\\cdot\}^\{\(\\cdot,\\cdot r\)\},\\,\\nu\_\{r\}\\left\(\\xi\+\\sum\_\{r^\{\\prime\}\\neq r\}\\nu\_\{r^\{\\prime\}\}\\right\)\\right\)\.\(20\)
Then,l⋅\(⋅,r​r\)l\_\{\\cdot\}^\{\(\\cdot,rr\)\}andl⋅\(⋅,r​r′\)l\_\{\\cdot\}^\{\(\\cdot,rr^\{\\prime\}\)\}follow negative binomial distributions asl⋅\(⋅,r​r\)∼NB​\(ξ​νr,qr\)l\_\{\\cdot\}^\{\(\\cdot,rr\)\}\\sim\\mathrm\{NB\}\(\\xi\\nu\_\{r\},q\_\{r\}\)andl⋅\(⋅,r​r′\)∼NB​\(νr​νr′,qr\)l\_\{\\cdot\}^\{\(\\cdot,rr^\{\\prime\}\)\}\\sim\\mathrm\{NB\}\(\\nu\_\{r\}\\nu\_\{r^\{\\prime\}\},q\_\{r\}\)\. To further facilitate posterior inference, we introduce auxiliary count variableshr​rh\_\{rr\}andhr​r′h\_\{rr^\{\\prime\}\}via the Chinese Restaurant Table \(CRT\) distribution:

hr​r\\displaystyle h\_\{rr\}∼CRT​\(l⋅\(⋅,r​r\),ξ​νr\),\\displaystyle\\sim\\text\{CRT\}\\left\(l\_\{\\cdot\}^\{\(\\cdot,rr\)\},\\,\\xi\\nu\_\{r\}\\right\),\(21\)hr​r′\\displaystyle h\_\{rr^\{\\prime\}\}∼CRT​\(l⋅\(⋅,r​r′\),νr​νr′\)\.\\displaystyle\\sim\\text\{CRT\}\\left\(l\_\{\\cdot\}^\{\(\\cdot,rr^\{\\prime\}\)\},\\,\\nu\_\{r\}\\nu\_\{r^\{\\prime\}\}\\right\)\.
Using the gamma–Poisson conjugacy,ξ\\xiis then sampled as

\(ξ\|−\)∼Gam​\(b0\+∑r=1Rhr​r,1e0−∑r=1Rνr​ln⁡\(1−qr\)\)\.\(\\xi\|\-\)\\sim\\mathrm\{Gam\}\\left\(b\_\{0\}\+\\sum\_\{r=1\}^\{R\}h\_\{rr\},\\,\\frac\{1\}\{e\_\{0\}\-\\sum\_\{r=1\}^\{R\}\\nu\_\{r\}\\ln\(1\-q\_\{r\}\)\}\\right\)\.\(22\)
Table 1:Performance comparison on three dynamic knowledge graph datasets, evaluated using AUC\-PR and AUC\-ROC\. Best results for each metric are shown inbold\.Next, we define

nr=hr​r\+∑r1≠rhr1​r\+∑r2≠rhr​r2\+∑k=1Klk\(1,r⋅\),n\_\{r\}=h\_\{rr\}\+\\sum\_\{r\_\{1\}\\neq r\}h\_\{r\_\{1\}r\}\+\\sum\_\{r\_\{2\}\\neq r\}h\_\{rr\_\{2\}\}\+\\sum\_\{k=1\}^\{K\}l\_\{k\}^\{\(1,r\\cdot\)\},wherelk\(1,r\)∼Pois​\(−τ​νr​ln⁡\(1−ρk\(1\)\)\)l\_\{k\}^\{\(1,r\)\}\\sim\\text\{Pois\}\(\-\\tau\\nu\_\{r\}\\ln\{\(1\-\\rho\_\{k\}^\{\(1\)\}\)\}\)\. Using the Poisson additive property and gamma–Poisson conjugacy, we have

\(νr\|−\)∼Gam​\(γ0R\+nr,1/\(β\+tr\)\),\(\\nu\_\{r\}\|\-\)\\sim\\text\{Gam\}\(\\frac\{\\gamma\_\{0\}\}\{R\}\+n\_\{r\},1/\(\\beta\+t\_\{r\}\)\),\(23\)wheretr=−ln⁡\(1−qr\)​\(ξ\+∑r1≠rνr1\)−∑r2≠rln⁡\(1−qr2\)​νr2−∑k=1K1K​ln⁡\(1−ρk\(1\)\)t\_\{r\}=\-\\ln\(1\-q\_\{r\}\)\\left\(\\xi\+\\sum\_\{r\_\{1\}\\neq r\}\\nu\_\{r\_\{1\}\}\\right\)\-\\sum\_\{r\_\{2\}\\neq r\}\\ln\(1\-q\_\{r\_\{2\}\}\)\\nu\_\{r\_\{2\}\}\-\\sum\_\{k=1\}^\{K\}\\frac\{1\}\{K\}\\ln\(1\-\\rho\_\{k\}^\{\(1\)\}\)\.

## 5Experiments

This section evaluates PGRE through comparative performance analysis, ablation studies, and parameter visualizations to assess both effectiveness and interpretability\.

### 5\.1Relation Prediction

#### Datasets\.

We evaluated PGRE on three widely used temporal knowledge graph datasets: ICEWS18\[boschee2015icews\], GDELT\[leetaru2013gdelt\], and WIKI\[leblay2018deriving\]\. To construct moderate\-scale subgraphs with sufficient relational–temporal support, we first ranked relation types according to their total numbers of observed events and retained the most frequent relations, resulting in 10 relations for ICEWS18, 8 for GDELT, and 15 for WIKI\. Within each relation\-filtered subgraph, entity activity was measured by the total number of events in which an entity appeared as either a subject or an object\. We then retained the 500 most active entities and removed events whose subject or object was not included in the selected entity set\. This preprocessing strategy keeps Gibbs inference computationally manageable while ensuring sufficient observations for estimating inter\-relational temporal dependencies\.

#### Baselines\.

We compared PGRE with representative methods from three categories: probabilistic models for dynamic networks \(DPGM\[yang2018poisson\], D\-NGPPF\[acharya2015nonparametric\], G\-HSEPM\[yu2025tracking\]\), probabilistic models for dynamic count data \(PGDS\[schein2016poisson\], PRGDS\[schein2019poisson\], NBRGDS\[huang2024negative\]\), and neural models for temporal knowledge graphs \(Know\-Evolve\[trivedi2017know\], DyRep\[trivedi2019dyrep\], RENet\[jin2019recurrent\]\)\.

#### Experimental Settings\.

Each dataset was divided into three temporal segments:train​\(t=1,…,T−2\)\\text\{train\}\\ \(t=1,\\dots,T\-2\),valid​\(t=T−1\)\\text\{valid\}\\ \(t=T\-1\), andtest​\(t=T\)\\text\{test\}\\ \(t=T\), where the prediction query time istq=Tt\_\{q\}=T\. Given historical events up to timetq−1t\_\{q\}\-1, models predict the probabilities of events occurring at timetqt\_\{q\}\. Performance is evaluated using AUC\-ROC and AUC\-PR\. More experimental details are provided in the supplementary material\.

![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/roc_PGRE_vs_PGE.png)\(a\)AUC\-ROC: PGRE vs\. PGE
![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/pr_PGRE_vs_PGE.png)\(b\)AUC\-PR: PGRE vs\. PGE
![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/roc_PGRE_vs_DNGPPF_RENet.png)\(c\)AUC\-ROC: PGRE vs\. D\-NGPPF and RENet
![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/pr_PGRE_vs_DNGPPF_RENet.png)\(d\)AUC\-PR: PGRE vs\. D\-NGPPF and RENet

Figure 3:Comparison of AUC\-ROC and AUC\-PR under different relation countsR∈\{10,25,50,75,100\}R\\in\\\{10,25,50,75,100\\\}\. The first row compares PGRE with its variant PGE \(without the relation transition matrix\), while the second row compares PGRE with two strong baselines, D\-NGPPF and RENet\.
#### Results on Relation Prediction\.

Table[1](https://arxiv.org/html/2607.02872#S4.T1)summarizes the relation prediction performance on ICEWS18, GDELT, and WIKI\. PGRE consistently achieves competitive results across all datasets, with particularly large improvements in AUC\-PR on ICEWS18 and GDELT, both of which exhibit sparse and highly multi\-relational structures\. Even on WIKI, where relational dependencies are weaker, PGRE attains the second\-best AUC\-PR, indicating robust generalization across varying relational densities\.

The superior AUC\-PR performance of PGRE primarily stems from two modeling choices\. First, PGRE captures latent transition dependencies among relations through the transition matrixΠr​r′\\Pi\_\{rr^\{\\prime\}\}, enabling the model to represent how different relations evolve and interact over time\. Second, the explicit modeling of directed head–tail entity roles allows PGRE to capture asymmetric temporal dynamics that are ignored by conventional single\-relation models\.

Compared with both count\-based probabilistic methods and neural temporal models, PGRE is more robust under sparse multi\-relational settings\. While neural models often achieve higher AUC\-ROC by focusing on frequent patterns, PGRE maintains substantially better AUC\-PR by leveraging structured Bayesian priors that couple relations and entities, resulting in improved recall and interpretability\.

Table 2:Average time per iteration \(seconds\) on different datasets\.Table[2](https://arxiv.org/html/2607.02872#S5.T2)reports the average time per iteration on three benchmarks\. PGRE achieves the lowest runtime on the sparsest dataset \(WIKI\) and remains competitive on denser datasets such as ICEWS18 and GDELT\. Overall, PGRE provides a favorable trade\-off between computational efficiency and modeling expressiveness in multi\-relational temporal settings\.

### 5\.2Ablation and Interpretability Analysis

![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/rk.png)Figure 4:Temporal evolution of latent factors for six representative relations:Demand,Praise or endorse,Express intent to engage in diplomatic cooperation,Sign formal agreement,Express intent to cooperate, andMake optimistic comment,δkt,r/\(∑k=1Kδkt,r\)\\delta\_\{k\}^\{t,r\}/\(\\sum\_\{k=1\}^\{K\}\\delta\_\{k\}^\{t,r\}\)\. Theyy\-axis represents latent factor indices \(150–199\) and thexx\-axis represents time stepstt\. Redder colors indicate higher activity levels\.![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/img.png)Figure 5:Transition probabilities among the 25 most active relations in theR=25R=25relation\-cardinality setting of ICEWS18\.We conduct a mechanism\-oriented relation\-cardinality ablation on ICEWS18 to examine how relation coupling behaves as the number of retained relation types increases\. D\-NGPPF and RENet are selected as the strongest probabilistic and neural baselines, respectively, in the main comparison\. Fig\.[3](https://arxiv.org/html/2607.02872#S5.F3)reports the performance under varying numbers of relationsRR\. The AUC\-PR of PGRE initially increases, reaches its maximum atR=25R=25, and then gradually decreases, while remaining consistently higher than those of the competing methods\. Its AUC\-ROC exhibits an overall upward trend, with a slight fluctuation atR=75R=75\. In contrast, the AUC\-PR values of the competing methods generally decline asRRincreases, suggesting that they benefit less from the additional cross\-relation structure\.

The ablation variant PGE, which removes the relation transition matrix, exhibits a substantial reduction in AUC\-PR across all settings, demonstrating the contribution of explicit relation coupling\. Similarly, the AUC\-PR values of D\-NGPPF and RENet decrease asRRgrows, whereas their AUC\-ROC improvements are less pronounced than those of PGRE\. These results indicate that the proposed relation\-transition mechanism helps PGRE maintain more robust predictive performance as relation diversity increases\.

To further examine the learned structure, we visualize the temporal evolution of latent factors and the relation transition matrixΠr,r′\\Pi\_\{r,r^\{\\prime\}\}\. Fig\.[4](https://arxiv.org/html/2607.02872#S5.F4)illustrates the temporal evolution of latent factors for representative positive interaction types\. Certain latent factors remain consistently active across multiple relations, suggesting the presence of shared latent communities that drive their temporal dynamics\. Fig\.[5](https://arxiv.org/html/2607.02872#S5.F5)shows the transition probabilities in theR=25R=25setting\. The matrix displays a dominant diagonal pattern, reflecting strong temporal self\-dependence of relations across adjacent time steps\. In addition, several off\-diagonal bands reveal structured transitions between semantically related relations, indicating dynamic coupling beyond self\-persistence\. These observations demonstrate that PGRE captures both interpretable latent evolution and structured inter\-relational interactions, which jointly contribute to its robustness in sparse multi\-relational settings\.

## 6Conclusion

We have proposed a probabilistic network model for capturing temporal evolution and relational interactions in dynamic knowledge graphs\. In contrast to existing Bayesian network models, the proposed framework is directly applicable to dynamic knowledge graph completion\. The model has introduced a structured relation transition kernel to characterize inter\-relational dynamics within latent communities and has supported efficient closed\-form posterior inference via Gibbs sampling\. Experimental results on multiple temporal knowledge graph benchmarks have demonstrated competitive relation prediction performance, with substantial AUC\-PR improvements on ICEWS18 and GDELT, together with interpretable relational and temporal structures revealed through ablation and visualization analyses\.

Future work includes extending the model to settings with rapidly evolving event streams and learning time\-varying relation transition dynamics\. Another promising direction is adapting the framework to heterogeneous temporal networks with irregular or partially overlapping node sets\.

###### Acknowledgements\.

This work was partially supported by the National Natural Science Foundation of China \(NSFC\) \(Grant Nos\. 62476047 and 62276171\), the Peking University Mathematics Challenge Funding Program \(Grant No\. 2024SRMC10\), the Shenzhen Science and Technology Program \(Grant Nos\. ZDCY20250901110940006 and JCYJ20240813141503005\), the Dongguan Key Laboratory for AI and Dynamical Systems, the Dongguan Key Laboratory for Intelligence and Information Technology, the Dongguan Key Laboratory for Data Science and Intelligent Medicine, the Guangdong Research Team for Communication and Sensing Integrated with Intelligent Computing \(Project No\. 2024KCXTD047\), and the Guangdong Multidisciplinary Innovation Research Group for New\-Generation Intelligent Systems and Diagnostic\-Therapeutic Applications \(Grant No\. 2025KCXTD031\)\.

## References

Poisson–Gamma Modeling of Inter\-Relational Dependencies in Dynamic Knowledge Graphs \(Supplementary Material\)

## 7Supplementary Material

### 7\.1Baseline Implementations

We provide additional details on the baseline models used in the experiments\.

#### Probabilistic Models for Dynamic Networks\.

DPGM, D\-NGPPF, and G\-HSEPM are designed for dynamic single\-relation networks\. Following standard practice, we train one independent model for each relation\. For directed relations, each relational graph is converted into an undirected bipartite graph by separating entities into source and target roles, resulting in a\(2​N×2​N\)\(2N\\times 2N\)adjacency matrix per relation\.

#### Probabilistic Models for Dynamic Count Data\.

PGDS, PRGDS, and NBRGDS operate on temporal count tensors\. We reshape the originalR×T×N×NR\\times T\\times N\\times Ntemporal knowledge graph into an event–time matrix, where each event corresponds to a triple\(s,r,o\)\(s,r,o\)\. Model inference is conducted following the settings described in the original papers\.

#### Neural Models for Temporal Knowledge Graphs\.

Know\-Evolve, DyRep, and RENet are neural temporal knowledge graph models that output real\-valued scores for candidate events\. We use the official implementations when available and follow the default hyperparameter configurations recommended by the authors\. For models that do not directly produce probabilities, a sigmoid function is applied to convert scores into probabilistic predictions\.

### 7\.2Additional Experimental Settings

All probabilistic generative models, including PGRE and count\-based baselines, are trained using Gibbs sampling\. For all datasets, the number of latent communities is fixed toK=200K=200\. To ensure fair comparison, the remaining hyperparameters for each probabilistic model follow the recommendations in the original papers or official implementations\. Model inference is performed with 2000 Gibbs sampling iterations, where the first 1000 iterations are discarded as burn\-in and the remaining 1000 iterations are used for posterior estimation\.

For neural network\-based methods, we use the authors’ publicly released code and follow their recommended experimental settings\. All neural models are trained in a supervised learning setting using the binary cross\-entropy loss\. Training is conducted for up to 1000 epochs with early stopping based on validation performance, using a patience of 20\. The model checkpoint achieving the best validation performance is selected for testing\. Unless otherwise specified, the learning rate and batch size are set to 0\.0001 and 200, respectively\.

To reduce the effect of randomness, each experiment was repeated five times with different random seeds, and the reported results correspond to average performance\. All experiments are implemented in Python 3\.9\.12 with PyTorch 2\.1\.0 and CUDA 12\.1, and are conducted on a Dell Precision 7920 workstation running Ubuntu Linux \(kernel 6\.11\.0\-25\-generic\)\. The implementation code and experimental scripts are publicly available at[https://github\.com/ffffkgh/PGRE](https://github.com/ffffkgh/PGRE)\.

### 7\.3Sampling Diagnostics

We assessed the sampling behavior of the Gibbs sampler using effective sample sizes \(ESSs\) and trace plots for a subset of representative model parameters\. The sampler was run for 2,000 iterations, with the first 1,000 iterations discarded as burn\-in and the remaining 1,000 iterations retained for posterior estimation\. Because the model contains a large number of latent variables, we report diagnostics for selected entries of the relation transition matrix and selected normalized temporal community weights on a representative dataset and temporal–relation slice\.

For the relation transition parameters, the post\-burn\-in ESS values were 49\.97 forπ00\\pi\_\{00\}, 336\.70 forπ20\\pi\_\{20\}, and 246\.59 forπ70\\pi\_\{70\}\. We additionally monitored two representative normalized temporal community weights,

δ~k\(t,r\)=δk\(t,r\)∑k′=1Kδk′\(t,r\),\\widetilde\{\\delta\}\_\{k\}^\{\(t,r\)\}=\\frac\{\\delta\_\{k\}^\{\(t,r\)\}\}\{\\sum\_\{k^\{\\prime\}=1\}^\{K\}\\delta\_\{k^\{\\prime\}\}^\{\(t,r\)\}\},whose post\-burn\-in ESS values were 23\.63 forδ~61\(4,0\)\\widetilde\{\\delta\}\_\{61\}^\{\(4,0\)\}and 12\.99 forδ~24\(4,0\)\\widetilde\{\\delta\}\_\{24\}^\{\(4,0\)\}\. The corresponding results are summarized in Table[3](https://arxiv.org/html/2607.02872#S7.T3)\.

Table 3:Post\-burn\-in effective sample sizes for selected representative model parameters\.Figs\.[6](https://arxiv.org/html/2607.02872#S7.F6)and[7](https://arxiv.org/html/2607.02872#S7.F7)show the corresponding trace plots over all 2,000 iterations\. The representative transition parameters exhibit an initial adaptation period followed by comparatively more stable trajectories in the retained sampling period\. Their ESS values also indicate more effective mixing forπ20\\pi\_\{20\}andπ70\\pi\_\{70\}, whileπ00\\pi\_\{00\}exhibits stronger serial dependence\.

![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/trace_pi_final.png)Figure 6:Trace plots of selected representative relation transition parameters over 2,000 Gibbs sampling iterations\. The first 1,000 iterations are treated as burn\-in, and the remaining 1,000 iterations are retained for posterior estimation\. The trajectories exhibit an initial adaptation period followed by comparatively more stable post\-burn\-in behavior\.The normalized temporal community\-weight summaries display slower variation and stronger autocorrelation, consistent with their lower ESS values\. Nevertheless, their trajectories become comparatively more stable after the initial adaptation period\. Taken together, the trace plots and ESS values provide complementary evidence that the adopted sampling design captures a more stable posterior regime after burn\-in\. These diagnostics therefore support the use of 1,000 burn\-in iterations followed by 1,000 retained iterations for posterior estimation, while also indicating that some latent community\-weight summaries remain more strongly autocorrelated than the transition parameters\.

![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/trace_delta_norm_final.png)Figure 7:Trace plots of selected normalized temporal community weights at\(t,r\)=\(4,0\)\(t,r\)=\(4,0\)over 2,000 Gibbs sampling iterations\. Compared with the transition parameters, these summaries exhibit stronger serial dependence and slower variation, consistent with their lower post\-burn\-in ESS values\.
### 7\.4Sensitivity Analysis of the Temporal Scale Parameter

We examined the sensitivity of PGRE to the temporal scale parameterτ\\tau, which controls the scale of the Gamma–Markov evolution\. We variedτ\\tauover\{0\.5,1\.0,1\.5,2\.0\}\\\{0\.5,1\.0,1\.5,2\.0\\\}while keeping all other experimental settings unchanged\. The results are reported in Table[4](https://arxiv.org/html/2607.02872#S7.T4)\.

Table 4:Sensitivity of PGRE to the temporal scale parameterτ\\tau\. The results correspond to a single\-run sensitivity analysis\.The performance remains stable across the tested values ofτ\\tau\. Specifically, the AUC\-ROC values vary only from 0\.9316 to 0\.9329, while the AUC\-PR values range from 0\.1991 to 0\.2067\. Althoughτ=0\.5\\tau=0\.5achieves the highest AUC\-PR andτ=1\.5\\tau=1\.5gives the highest AUC\-ROC, the differences are modest\. These results indicate that PGRE is reasonably robust to moderate variations in the temporal scale parameter and does not rely on a narrowly tuned value ofτ\\tau\. We therefore useτ=1\.0\\tau=1\.0as the default setting in the main experiments\.

### 7\.5Markov Chain Monte Carlo Inference

Here we present the Gibbs sampling for the PGRE model\.

Sampling latent countsxi​j\(t,r\)x\_\{ij\}^\{\(t,r\)\}\.We sample the latent count associated with each observed eventℳi​j\(t,r\)\\mathcal\{M\}\_\{ij\}^\{\(t,r\)\}as

\(xi​j\(t,r\)\|−\)∼ℳi​j\(t,r\)​Po\+​\(∑k=1Kδk\(t,r\)​ϕi​k​ψj​k\)\.\(x\_\{ij\}^\{\(t,r\)\}\|\-\)\\sim\\mathcal\{M\}\_\{ij\}^\{\(t,r\)\}\\text\{Po\}\_\{\+\}\(\\sum\_\{k=1\}^\{K\}\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\psi\_\{jk\}\)\.\(24\)wherePois\+​\(⋅\)\\mathrm\{Pois\}\_\{\+\}\(\\cdot\)denotes a zero\-truncated Poisson distribution\. Sincexi​j\(t,r\)=∑k=1Kxi​j​k\(t,r\)x\_\{ij\}^\{\(t,r\)\}=\\sum\_\{k=1\}^\{K\}x\_\{ijk\}^\{\(t,r\)\}, by the additive property of the Poisson distribution we havexi​j​k\(t,r\)∼Pois​\(δk\(t,r\)​ϕi​k​ψj​k\)x\_\{ijk\}^\{\(t,r\)\}\\sim\\text\{Pois\}\(\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\psi\_\{jk\}\)\. According to the Poisson–multinomial equivalence \(Theorem[3](https://arxiv.org/html/2607.02872#Thmtheorem3)\), the latent countxi​j​k\(t,r\)x\_\{ijk\}^\{\(t,r\)\}can be sampled as

\(xi​j​k\(t,r\)\|−\)∼Mult​\(xi​j\(t,r\),\(δk\(t,r\)​ϕi​k​ψj​k∑k=1Kδk\(t,r\)​ϕi​k​ψj​k\)\)\.\(x\_\{ijk\}^\{\(t,r\)\}\|\-\)\\sim\\text\{Mult\}\(x\_\{ij\}^\{\(t,r\)\},\(\\frac\{\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\psi\_\{jk\}\}\{\\sum\_\{k=1\}^\{K\}\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\psi\_\{jk\}\}\)\)\.\(25\)
Sampling community factor loadingsϕi​k\\phi\_\{ik\}andψj​k\\psi\_\{jk\}\.By the Gamma–Poisson conjugacy, the posterior distributions of the subject\- and object\-side memberships are given by

\(ϕi​k∣−\)∼Gam\(a0\+∑t=1T∑r=1R∑j=1j≠iNxi​j​k\(t,r\),1/\(ci\+∑t=1T∑r=1R∑j=1j≠iNδk\(t,r\)ψj​k\)\),\\begin\{split\}\(\\phi\_\{ik\}\\mid\-\)\\sim\\mathrm\{Gam\}\\Biggl\(&a\_\{0\}\+\\sum\_\{t=1\}^\{T\}\\sum\_\{r=1\}^\{R\}\\sum\_\{\\begin\{subarray\}\{c\}j=1\\\\ j\\neq i\\end\{subarray\}\}^\{N\}x\_\{ijk\}^\{\(t,r\)\},\\\\ &1/\\Bigl\(c\_\{i\}\+\\sum\_\{t=1\}^\{T\}\\sum\_\{r=1\}^\{R\}\\sum\_\{\\begin\{subarray\}\{c\}j=1\\\\ j\\neq i\\end\{subarray\}\}^\{N\}\\delta\_\{k\}^\{\(t,r\)\}\\psi\_\{jk\}\\Bigr\)\\Biggr\),\\end\{split\}\(26\)
\(ψj​k∣−\)∼Gam\(a1\+∑t=1T∑r=1R∑i=1i≠jNxi​j​k\(t,r\),1/\(cj\+∑t=1T∑r=1R∑i=1i≠jNδk\(t,r\)ϕi​k\)\)\.\\begin\{split\}\(\\psi\_\{jk\}\\mid\-\)\\sim\\mathrm\{Gam\}\\Biggl\(&a\_\{1\}\+\\sum\_\{t=1\}^\{T\}\\sum\_\{r=1\}^\{R\}\\sum\_\{\\begin\{subarray\}\{c\}i=1\\\\ i\\neq j\\end\{subarray\}\}^\{N\}x\_\{ijk\}^\{\(t,r\)\},\\\\ &1/\\Bigl\(c\_\{j\}\+\\sum\_\{t=1\}^\{T\}\\sum\_\{r=1\}^\{R\}\\sum\_\{\\begin\{subarray\}\{c\}i=1\\\\ i\\neq j\\end\{subarray\}\}^\{N\}\\delta\_\{k\}^\{\(t,r\)\}\\phi\_\{ik\}\\Bigr\)\\Biggr\)\.\\end\{split\}\(27\)
Sampling entity\-specific scaling parameterscic\_\{i\}andcjc\_\{j\}\.We place Gamma priors over the entity\-specific scaling parameters asci∼Gam​\(f0,1/g0\)c\_\{i\}\\sim\\mathrm\{Gam\}\(f\_\{0\},1/g\_\{0\}\)andcj∼Gam​\(z0,1/k0\)c\_\{j\}\\sim\\mathrm\{Gam\}\(z\_\{0\},1/k\_\{0\}\)\. Using the Gamma–Gamma conjugacy, the posterior distributions can be derived in closed form as:

\(ci\|−\)∼Gam​\(f0\+K​a0,1/\(g0\+∑k=1Kϕi​k\)\),\(c\_\{i\}\|\-\)\\sim\\text\{Gam\}\(f\_\{0\}\+Ka\_\{0\},1/\(g\_\{0\}\+\\sum\_\{k=1\}^\{K\}\\phi\_\{ik\}\)\),\(28\)\(cj\|−\)∼Gam​\(z0\+K​a1,1/\(k0\+∑k=1Kψj​k\)\),\(c\_\{j\}\|\-\)\\sim\\text\{Gam\}\(z\_\{0\}\+Ka\_\{1\},1/\(k\_\{0\}\+\\sum\_\{k=1\}^\{K\}\\psi\_\{jk\}\)\),\(29\)whereKKdenotes the number of latent communities\.

Sampling community weightsδk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}\.The community weightsδk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}evolve under a Markovian structure, so both backward and forward information must be incorporated into the posterior updates\.

For the last time stept=Tt=T, we define the aggregated latent count asx⋅⁣⋅k\(T,r\)=∑i=1N∑j=1j≠iNxi​j​k\(T,r\)x\_\{\\cdot\\cdot k\}^\{\(T,r\)\}=\\sum\_\{i=1\}^\{N\}\\sum\_\{\\begin\{subarray\}\{c\}j=1\\\\ j\\neq i\\end\{subarray\}\}^\{N\}x\_\{ijk\}^\{\(T,r\)\}, which follows a Poisson distributionx⋅⁣⋅k\(T,r\)∼Pois​\(δk\(T,r\)​sk\)x\_\{\\cdot\\cdot k\}^\{\(T,r\)\}\\sim\\text\{Pois\}\(\\delta\_\{k\}^\{\(T,r\)\}s\_\{k\}\), wheresk=∑i=1N∑j=1j≠iNϕi​k​ψj​ks\_\{k\}=\\sum\_\{i=1\}^\{N\}\\sum\_\{\\begin\{subarray\}\{c\}j=1\\\\ j\\neq i\\end\{subarray\}\}^\{N\}\\phi\_\{ik\}\\psi\_\{jk\}\. By applying the gamma–Poisson conjugacy, the posterior ofδk\(T,r\)\\delta\_\{k\}^\{\(T,r\)\}is given by

\(δk\(T,r\)\|−\)∼Gam​\(x⋅⁣⋅k\(T,r\)\+∑r′=1Rπr​r′​δk\(T−1,r′\),1/\(τ\+sk\)\)\.\(\\delta\_\{k\}^\{\(T,r\)\}\|\-\)\\sim\\text\{Gam\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(T,r\)\}\+\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(T\-1,r^\{\\prime\}\)\},1/\(\\tau\+s\_\{k\}\)\\right\)\.\(30\)
Fort=T−1t=T\-1, to incorporate forward information, we marginalize outδk\(T,r\)\\delta\_\{k\}^\{\(T,r\)\}using Theorem[1](https://arxiv.org/html/2607.02872#Thmtheorem1), which leads to

x⋅⁣⋅k\(T,r\)∼NB​\(∑r′=1Rπr​r′​δk\(T−1,r′\),sk/\(τ\+sk\)\)\.x\_\{\\cdot\\cdot k\}^\{\(T,r\)\}\\sim\\text\{NB\}\\left\(\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(T\-1,r^\{\\prime\}\)\},s\_\{k\}/\(\\tau\+s\_\{k\}\)\\right\)\.\(31\)
According to Theorem[2](https://arxiv.org/html/2607.02872#Thmtheorem2), the negative binomial distribution can be augmented with an auxiliary variable as

lk\(T,r\)∼CRT​\(x⋅⁣⋅k\(T,r\),∑r′=1Rπr​r′​δk\(T−1,r′\)\)\.l\_\{k\}^\{\(T,r\)\}\\sim\\text\{CRT\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(T,r\)\},\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(T\-1,r^\{\\prime\}\)\}\\right\)\.\(32\)
The joint distribution ofx⋅⁣⋅k\(T,r\)x\_\{\\cdot\\cdot k\}^\{\(T,r\)\}andlk\(T,r\)l\_\{k\}^\{\(T,r\)\}can then be written as

x⋅⁣⋅k\(T,r\)∼SumLog​\(lk\(T,r\),ρk\(T,r\)\),x\_\{\\cdot\\cdot k\}^\{\(T,r\)\}\\sim\\text\{SumLog\}\(l\_\{k\}^\{\(T,r\)\},\\rho\_\{k\}^\{\(T,r\)\}\),\(33\)
lk\(T,r\)∼Pois​\(−∑r′=1Rπr​r′​δk\(T−1,r′\)​ln⁡\(1−ρk\(T\)\)\),l\_\{k\}^\{\(T,r\)\}\\sim\\text\{Pois\}\\left\(\-\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(T\-1,r^\{\\prime\}\)\}\\ln\(1\-\\rho\_\{k\}^\{\(T\)\}\)\\right\),\(34\)whereρk\(T\)=skτ\+sk\\rho\_\{k\}^\{\(T\)\}=\\frac\{s\_\{k\}\}\{\\tau\+s\_\{k\}\}\. Sincelk\(T,r\)=lk\(T,r⋅\)=∑r2=1Rlk\(T,r​r2\)l\_\{k\}^\{\(T,r\)\}=l\_\{k\}^\{\(T,r\\cdot\)\}=\\sum\_\{r\_\{2\}=1\}^\{R\}l\_\{k\}^\{\(T,rr\_\{2\}\)\}, the distribution oflk\(T,r​r′\)l\_\{k\}^\{\(T,rr^\{\\prime\}\)\}is

lk\(T,r​r′\)∼Pois​\(−πr​r′​δk\(T−1,r′\)​ln⁡\(1−ρk\(T\)\)\)\.l\_\{k\}^\{\(T,rr^\{\\prime\}\)\}\\sim\\text\{Pois\}\\left\(\-\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(T\-1,r^\{\\prime\}\)\}\\ln\(1\-\\rho\_\{k\}^\{\(T\)\}\)\\right\)\.\(35\)
Using the additive property of the Poisson distribution and∑r1=1Rπr1​r=1\\sum\_\{r\_\{1\}=1\}^\{R\}\\pi\_\{r\_\{1\}r\}=1, we have

lk\(T,⋅r\)∼Pois​\(−δk\(T−1,r\)​ln⁡\(1−ρk\(T\)\)\)\.l\_\{k\}^\{\(T,\\cdot r\)\}\\sim\\text\{Pois\}\\left\(\-\\delta\_\{k\}^\{\(T\-1,r\)\}\\ln\(1\-\\rho\_\{k\}^\{\(T\)\}\)\\right\)\.\(36\)
Givenx⋅⁣⋅k\(T−1,r\)∼Pois​\(δk\(T−1,r\)​sk\)x\_\{\\cdot\\cdot k\}^\{\(T\-1,r\)\}\\sim\\text\{Pois\}\(\\delta\_\{k\}^\{\(T\-1,r\)\}s\_\{k\}\), the Poisson additive property leads to

x⋅⁣⋅k\(T−1,r\)\+lk\(T,⋅r\)∼Pois​\(δk\(T−1,r\)​\(sk−ln⁡\(1−ρk\(T\)\)\)\)\.x\_\{\\cdot\\cdot k\}^\{\(T\-1,r\)\}\+l\_\{k\}^\{\(T,\\cdot r\)\}\\sim\\text\{Pois\}\\left\(\\delta\_\{k\}^\{\(T\-1,r\)\}\(s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(T\)\}\)\)\\right\)\.\(37\)
This combines backward and forward information att=T−1t=T\-1\. With the gamma prior onδk\(T−1,r\)\\delta\_\{k\}^\{\(T\-1,r\)\}, its conditional posterior is

\(δk\(T−1,r\)\|−\)\\displaystyle\(\\delta\_\{k\}^\{\(T\-1,r\)\}\|\-\)∼Gam\(x⋅⁣⋅k\(T−1,r\)\+lk\(T,⋅r\)\+∑r′Rπr​r′δk\(T−2,r′\),\\displaystyle\\sim\\text\{Gam\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(T\-1,r\)\}\+l\_\{k\}^\{\(T,\\cdot r\)\}\+\\sum\_\{r^\{\\prime\}\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(T\-2,r^\{\\prime\}\)\},\\right\.\(38\)1/\(τ\+sk−ln\(1−ρk\(T\)\)\)\)\.\\displaystyle\\quad\\left\.1/\(\\tau\+s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(T\)\}\)\)\\right\)\.
For intermediate stepst=T−2,…,2t=T\-2,\\dots,2, we introduce

lk\(t,⋅r\)∼CRT​\(x⋅⁣⋅k\(t,r\)\+lk\(t\+1,⋅r\),∑r′=1Rπr​r′​δk\(t−1,r′\)\),l\_\{k\}^\{\(t,\\cdot r\)\}\\sim\\text\{CRT\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(t,r\)\}\+l\_\{k\}^\{\(t\+1,\\cdot r\)\},\\sum\_\{r^\{\\prime\}=1\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(t\-1,r^\{\\prime\}\)\}\\right\),\(39\)and apply the same augmentation–sampling procedure:

\(δk\(t,r\)\|−\)\\displaystyle\(\\delta\_\{k\}^\{\(t,r\)\}\|\-\)∼Gam\(x⋅⁣⋅k\(t,r\)\+lk\(t\+1,⋅r\)\+∑r′Rπr​r′δk\(t−1,r′\),\\displaystyle\\sim\\text\{Gam\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(t,r\)\}\+l\_\{k\}^\{\(t\+1,\\cdot r\)\}\+\\sum\_\{r^\{\\prime\}\}^\{R\}\\pi\_\{rr^\{\\prime\}\}\\delta\_\{k\}^\{\(t\-1,r^\{\\prime\}\)\},\\right\.\(40\)1/\(τ\+sk−ln\(1−ρk\(t\+1\)\)\)\),\\displaystyle\\quad\\left\.1/\(\\tau\+s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(t\+1\)\}\)\)\\right\),where

ρk\(t\+1\)=sk−ln⁡\(1−ρk\(t\+2\)\)τ\+sk−ln⁡\(1−ρk\(t\+2\)\)\.\\rho\_\{k\}^\{\(t\+1\)\}=\\frac\{s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(t\+2\)\}\)\}\{\\tau\+s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(t\+2\)\}\)\}\.\(41\)
Finally, fort=1t=1, we augment

lk\(1,r\)∼CRT​\(x⋅⁣⋅k\(1,r\)\+lk\(2,⋅r\),νr/K\),l\_\{k\}^\{\(1,r\)\}\\sim\\text\{CRT\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(1,r\)\}\+l\_\{k\}^\{\(2,\\cdot r\)\},\\nu\_\{r\}/K\\right\),\(42\)and sample

\(δk\(1,r\)\|−\)\\displaystyle\(\\delta\_\{k\}^\{\(1,r\)\}\|\-\)∼Gam\(x⋅⁣⋅k\(1,r\)\+lk\(2,⋅r\)\+νr/K,\\displaystyle\\sim\\text\{Gam\}\\left\(x\_\{\\cdot\\cdot k\}^\{\(1,r\)\}\+l\_\{k\}^\{\(2,\\cdot r\)\}\+\\nu\_\{r\}/K,\\right\.\(43\)1/\(τ\+sk−ln\(1−ρk\(2\)\)\)\)\.\\displaystyle\\quad\\left\.1/\(\\tau\+s\_\{k\}\-\\ln\(1\-\\rho\_\{k\}^\{\(2\)\}\)\)\\right\)\.
Sampling the transition matrixπr\\pi\_\{r\}\.After marginalizing outδ\\delta, the auxiliary counts follow a multinomial distribution\(lk\(t,1​r\),…,lk\(t,R​r\)\)∼Mult​\(lk\(t,⋅r\),\(π1​r,…,πR​r\)\)\(l\_\{k\}^\{\(t,1r\)\},\\dots,l\_\{k\}^\{\(t,Rr\)\}\)\\sim\\text\{Mult\}\\left\(l\_\{k\}^\{\(t,\\cdot r\)\},\(\\pi\_\{1r\},\\dots,\\pi\_\{Rr\}\)\\right\)\. By the Dirichlet–multinomial conjugacy, the posterior distribution ofπr\\pi\_\{r\}is given by

\(πr\|−\)∼Dir\(\\displaystyle\(\\pi\_\{r\}\|\-\)\\sim\\text\{Dir\}\\Bigl\(ν1​νr\+∑t=2T∑k=1Klk\(t,1​r\),…,\\displaystyle\\nu\_\{1\}\\nu\_\{r\}\+\\sum\_\{t=2\}^\{T\}\\sum\_\{k=1\}^\{K\}l\_\{k\}^\{\(t,1r\)\},\\ \\dots,\(44\)ξ​νr\+∑t=2T∑k=1Klk\(t,r​r\),…,\\displaystyle\\xi\\nu\_\{r\}\+\\sum\_\{t=2\}^\{T\}\\sum\_\{k=1\}^\{K\}l\_\{k\}^\{\(t,rr\)\},\\ \\dots,νRνr\+∑t=2T∑k=1Klk\(t,R​r\)\)\.\\displaystyle\\nu\_\{R\}\\nu\_\{r\}\+\\sum\_\{t=2\}^\{T\}\\sum\_\{k=1\}^\{K\}l\_\{k\}^\{\(t,Rr\)\}\\Bigr\)\.
Samplingνr\\nu\_\{r\}andξ\\xi\.We marginalize overΠ\\Pito obtain a Dirichlet–multinomial distribution

\(l⋅\(⋅,1​r\),…,l⋅\(⋅,R​r\)\)\\displaystyle\(l\_\{\\cdot\}^\{\(\\cdot,1r\)\},\\dots,l\_\{\\cdot\}^\{\(\\cdot,Rr\)\}\)\(45\)∼DirMult​\(l⋅\(⋅,⋅r\),\(ν1​νr,…,ξ​νr,…,νR​νr\)\),\\displaystyle\\quad\\sim\\text\{DirMult\}\\Bigl\(l\_\{\\cdot\}^\{\(\\cdot,\\cdot r\)\},\\ \(\\nu\_\{1\}\\nu\_\{r\},\\dots,\\xi\\nu\_\{r\},\\dots,\\nu\_\{R\}\\nu\_\{r\}\)\\Bigr\),wherel⋅\(⋅,⋅r\)=∑t=1T∑k=1K∑r1=1Klk\(t,r1​r\)l\_\{\\cdot\}^\{\(\\cdot,\\cdot r\)\}=\\sum\_\{t=1\}^\{T\}\\sum\_\{k=1\}^\{K\}\\sum\_\{r\_\{1\}=1\}^\{K\}l\_\{k\}^\{\(t,r\_\{1\}r\)\}\.

By introducing a beta\-distributed auxiliary variableqrq\_\{r\}, the Dirichlet–multinomial distribution can be rewritten as a negative binomial distribution:

qr∼Beta​\(l⋅\(⋅,⋅r\),νr​\(ξ\+∑r′≠rνr′\)\)\.q\_\{r\}\\sim\\text\{Beta\}\\left\(l\_\{\\cdot\}^\{\(\\cdot,\\cdot r\)\},\\,\\nu\_\{r\}\\left\(\\xi\+\\sum\_\{r^\{\\prime\}\\neq r\}\\nu\_\{r^\{\\prime\}\}\\right\)\\right\)\.\(46\)
Then,l⋅\(⋅,r​r\)l\_\{\\cdot\}^\{\(\\cdot,rr\)\}andl⋅\(⋅,r​r′\)l\_\{\\cdot\}^\{\(\\cdot,rr^\{\\prime\}\)\}follow negative binomial distributions asl⋅\(⋅,r​r\)∼NB​\(ξ​νr,qr\)l\_\{\\cdot\}^\{\(\\cdot,rr\)\}\\sim\\mathrm\{NB\}\(\\xi\\nu\_\{r\},q\_\{r\}\)andl⋅\(⋅,r​r′\)∼NB​\(νr​νr′,qr\)l\_\{\\cdot\}^\{\(\\cdot,rr^\{\\prime\}\)\}\\sim\\mathrm\{NB\}\(\\nu\_\{r\}\\nu\_\{r^\{\\prime\}\},q\_\{r\}\)\. To further facilitate posterior inference, we introduce auxiliary count variableshr​rh\_\{rr\}andhr​r′h\_\{rr^\{\\prime\}\}via the Chinese Restaurant Table \(CRT\) distribution:

hr​r\\displaystyle h\_\{rr\}∼CRT​\(l⋅\(⋅,r​r\),ξ​νr\),\\displaystyle\\sim\\text\{CRT\}\\left\(l\_\{\\cdot\}^\{\(\\cdot,rr\)\},\\,\\xi\\nu\_\{r\}\\right\),\(47\)hr​r′\\displaystyle h\_\{rr^\{\\prime\}\}∼CRT​\(l⋅\(⋅,r​r′\),νr​νr′\)\.\\displaystyle\\sim\\text\{CRT\}\\left\(l\_\{\\cdot\}^\{\(\\cdot,rr^\{\\prime\}\)\},\\,\\nu\_\{r\}\\nu\_\{r^\{\\prime\}\}\\right\)\.
Using the gamma–Poisson conjugacy,ξ\\xiis then sampled as

\(ξ\|−\)∼Gam​\(b0\+∑r=1Rhr​r,1e0−∑r=1Rνr​ln⁡\(1−qr\)\)\.\(\\xi\|\-\)\\sim\\mathrm\{Gam\}\\left\(b\_\{0\}\+\\sum\_\{r=1\}^\{R\}h\_\{rr\},\\,\\frac\{1\}\{e\_\{0\}\-\\sum\_\{r=1\}^\{R\}\\nu\_\{r\}\\ln\(1\-q\_\{r\}\)\}\\right\)\.\(48\)
Next, we define

nr=hr​r\+∑r1≠rhr1​r\+∑r2≠rhr​r2\+∑k=1Klk\(1,r⋅\),n\_\{r\}=h\_\{rr\}\+\\sum\_\{r\_\{1\}\\neq r\}h\_\{r\_\{1\}r\}\+\\sum\_\{r\_\{2\}\\neq r\}h\_\{rr\_\{2\}\}\+\\sum\_\{k=1\}^\{K\}l\_\{k\}^\{\(1,r\\cdot\)\},wherelk\(1,r\)∼Pois​\(τ​νr​ln⁡\(1−ρk\(1\)\)\)l\_\{k\}^\{\(1,r\)\}\\sim\\text\{Pois\}\(\\tau\\nu\_\{r\}\\ln\{\(1\-\\rho\_\{k\}^\{\(1\)\}\)\}\)\. Using the Poisson additive property and gamma–Poisson conjugacy, we have

\(νr\|−\)∼Gam​\(γ0R\+nr,1/\(β\+tr\)\),\(\\nu\_\{r\}\|\-\)\\sim\\text\{Gam\}\(\\frac\{\\gamma\_\{0\}\}\{R\}\+n\_\{r\},1/\(\\beta\+t\_\{r\}\)\),\(49\)wheretr=−ln⁡\(1−qr\)​\(ξ\+∑r1≠rνr1\)−∑r2≠rln⁡\(1−qr2\)​νr2−∑k=1K1K​ln⁡\(1−ρk\(1\)\)t\_\{r\}=\-\\ln\(1\-q\_\{r\}\)\\left\(\\xi\+\\sum\_\{r\_\{1\}\\neq r\}\\nu\_\{r\_\{1\}\}\\right\)\-\\sum\_\{r\_\{2\}\\neq r\}\\ln\(1\-q\_\{r\_\{2\}\}\)\\nu\_\{r\_\{2\}\}\-\\sum\_\{k=1\}^\{K\}\\frac\{1\}\{K\}\\ln\(1\-\\rho\_\{k\}^\{\(1\)\}\)\.

Samplingβ\\beta\.Finally, by gamma–gamma conjugacy, the posterior ofβ\\betais derived as

\(β\|−\)∼Gam​\(d0\+γ0,1/\(h0\+∑r=1Rνr\)\)\.\(\\beta\|\-\)\\sim\\text\{Gam\}\(d\_\{0\}\+\\gamma\_\{0\},1/\(h\_\{0\}\+\\sum\_\{r=1\}^\{R\}\\nu\_\{r\}\)\)\.\(50\)
Algorithm[1](https://arxiv.org/html/2607.02872#alg1)summarises the full sampling procedure of PGRE\.

Algorithm 1Gibbs sampling algorithm for PGRE1:Dynamic relational data

G\(1\),⋯,G\(T\)G^\{\(1\)\},\\cdots,G^\{\(T\)\}\.

2:Initialise the number of communities

KKand other parameters;

3:repeat

4:Sample

xi​j\(t,r\)x\_\{ij\}^\{\(t,r\)\}\(Eq\.[24](https://arxiv.org/html/2607.02872#S7.E24)\) and update

xi​j​k\(t,r\)x\_\{ijk\}^\{\(t,r\)\}\(Eq\.[25](https://arxiv.org/html/2607.02872#S7.E25)\)

5:Sample

ϕi​k\\phi\_\{ik\}\(Eq\.[26](https://arxiv.org/html/2607.02872#S7.E26)\) and

ψj​k\\psi\_\{jk\}\(Eq\.[27](https://arxiv.org/html/2607.02872#S7.E27)\)

6:update

cic\_\{i\}\(Eq\.[28](https://arxiv.org/html/2607.02872#S7.E28)\) and

cjc\_\{j\}\(Eq\.[29](https://arxiv.org/html/2607.02872#S7.E29)\)

7:for

t=T,⋯,1t=T,\\cdots,1do

8:if

t=Tt=Tthen

9:Sample

lk\(T,r\)l\_\{k\}^\{\(T,r\)\}\(Eq\.[32](https://arxiv.org/html/2607.02872#S7.E32)\)

10:elseif

t=T−1,⋯,2t=T\-1,\\cdots,2then

11:Sample

lk\(t,r\)l\_\{k\}^\{\(t,r\)\}\(Eq\.[39](https://arxiv.org/html/2607.02872#S7.E39)\)

12:elseif

t=1t=1then

13:Sample

lk\(1,r\)l\_\{k\}^\{\(1,r\)\}\(Eq\.[42](https://arxiv.org/html/2607.02872#S7.E42)\)

14:endif

15:Update

ρk\(t\)\\rho\_\{k\}^\{\(t\)\}\(Eq\.[41](https://arxiv.org/html/2607.02872#S7.E41)\)

16:endfor

17:for

t=1,⋯,Tt=1,\\cdots,Tdo

18:if

t=1t=1then

19:Sample

δk\(1,r\)\\delta\_\{k\}^\{\(1,r\)\}\(Eq\.[43](https://arxiv.org/html/2607.02872#S7.E43)\)

20:elseif

t=2,⋯,T−1t=2,\\cdots,T\-1then

21:Sample

δk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}\(Eq\.[40](https://arxiv.org/html/2607.02872#S7.E40)\)

22:elseif

t=Tt=Tthen

23:Sample

δk\(T,r\)\\delta\_\{k\}^\{\(T,r\)\}\(Eq\.[30](https://arxiv.org/html/2607.02872#S7.E30)\)

24:endif

25:endfor

26:Sample

πr\\pi\_\{r\}\(Eq\.[44](https://arxiv.org/html/2607.02872#S7.E44)\), update

qrq\_\{r\}\(Eq\.[46](https://arxiv.org/html/2607.02872#S7.E46)\) and

hr​rh\_\{rr\}\(Eq\.[47](https://arxiv.org/html/2607.02872#S7.E47)\)

27:Sample

ξ\\xi\(Eq\.[48](https://arxiv.org/html/2607.02872#S7.E48)\) and

νr\\nu\_\{r\}\(Eq\.[49](https://arxiv.org/html/2607.02872#S7.E49)\)

28:Sample

β\\beta\(Eq\.[50](https://arxiv.org/html/2607.02872#S7.E50)\)

29:untilconvergence

30:Posterior mean of

ϕi​k\\phi\_\{ik\},

ψj​k\\psi\_\{jk\}and

δk\(t,r\)\\delta\_\{k\}^\{\(t,r\)\}

### 7\.6Full Probabilistic Graphical Model

![Refer to caption](https://arxiv.org/html/2607.02872v1/figure/pgm.png)Figure 8:Full probabilistic graphical model of PGRE\.Fig\.[8](https://arxiv.org/html/2607.02872#S7.F8)presents the full probabilistic graphical model of PGRE, which illustrates the complete generative process including entity\-level latent factors, relation\-level temporal evolution, and observed interactions\.

Similar Articles

Generating Graph-like Rules for Knowledge Graph Reasoning via Diffusion Models

arXiv cs.AI

This paper introduces GRiD, a framework that uses diffusion models and reinforcement learning to generate graph-like rules (e.g., cycles, branches) for knowledge graph reasoning, addressing the limitations of existing chain-rule mining methods. Experiments on six benchmarks show competitive performance in KG completion tasks.

GraphReAct: Reasoning and Acting for Multi-step Graph Inference

arXiv cs.AI

This paper introduces GraphReAct, a framework that extends reasoning-acting paradigms to graph-structured data for multi-step inference. It combines topological and semantic retrieval with context refinement to improve performance on graph learning benchmarks.