& =\mathbb{E}\left[\mathbb{E}\left[I_{\alpha,T} | W_1,\ldots,W_p\right]\right] \nonumber\\
& = \mathbb{E}\left[ \sum_{i\neq j}\left(\mathbb{E}\left[\int_0^T \lambda_{ij}(t)dt\mid  W_1,\ldots,W_p \right] \right) \right]\nonumber\\
& = \mathbb{E}\left[ \sum_{i\neq j}\left( \int_0^T \mathbb{E}\left[   \mu_{ij} \frac{\delta}{\delta - \eta}  - \mu_{ij}\frac{\eta}{\delta - \eta}e^{-{t(\delta - \eta)}}    \mid W_1,\ldots,W_p \right]  dt \right) \right]\nonumber\\
& = \mathbb{E}\left[ \sum_{i\neq j}{\boldsymbol{w}}_i^T {\boldsymbol{w}}_j  \right]    \int_0^T \left[    \frac{\delta}{\delta - \eta}  - \frac{\eta}{\delta - \eta}e^{-{t(\delta - \eta)}} \right]  dt \nonumber\\
& =  \alpha^2 {\boldsymbol{\mu}}_w^T{\boldsymbol{\mu}}_w \left (\frac{\delta}{\delta - \eta} T - \frac{\eta}{(\delta - \eta)^2}(1 - e^{-T(\delta - \eta)})\right )
\label{dir_edges}\end{aligned}$$ where the third line follows from [@Dassios_Zhao], the last line follows from another application of the extended Slivnyak-Mecke formula for Poisson point processes and ${\boldsymbol{\mu}}_w =\int_{\mathbb{R}^p_+} {\boldsymbol{w}}\rho(dw_1,\ldots,dw_p)$.

C: Details of the approximate inference algorithm {#c-details-of-the-approximate-inference-algorithm .unnumbered}
=================================================

Here we provide additional details on the two-stage procedure for approximate posterior inference. The code is publicly available at <https://github.com/OxCSML-BayesNP/HawkesNetOC>.

Given a set of observed interactions $\mathcal D=(t_k,i_k,j_k)_{k\geq 1}$ between $V$ individuals over a period of time $T$, the objective is to approximate the posterior distribution $\pi(\phi,\xi|\mathcal D)$ where $\phi=(\eta,\delta)$ are the kernel parameters and $\xi=((w_{ik})_{i=1,\ldots,V,k=1,\ldots,p},(a_k,b_k)_{k=1,\ldots,p},\alpha,\sigma,\tau)$, the parameters and hyperparameters of the compound CRM. Given data $\mathcal D$, let $\mathcal Z=(z_{ij}(T))_{1\leq i,j\leq V}$ be the adjacency matrix defined by $z_{ij}(T)=1$ if there is at least 