1. Introduction
This paper focuses on testing the null hypothesis of no community structure in a temporally evolving sequence of networks (Holme and Saramäki, Reference Holme and Saramäki2012). For the case of a static network, there has been considerable work on this topic (e.g., Lancichinetti et al., Reference Lancichinetti, Radicchi and Ramasco2010; Bickel and Sarkar, Reference Bickel and Sarkar2016; Li and Qi, Reference Li and Qi2020; Yuan et al., Reference Yuan, Liu, Feng and Shang2022). The key challenged addressed in the aforementioned references is selecting a sensible null model to represent “no community structure,” as well as deriving the null distribution of the test statistic. Indeed, even defining what it means for a network to exhibit community structure is not universally agreed upon (Cazabet and Rossetti, Reference Cazabet and Rossetti2023). For the null model, many methods use the Erdos-Renyi (Erdös and Renyi, Reference Erdös and Renyi1959, henceforth ER) model (e.g., Bickel and Sarkar, Reference Bickel and Sarkar2016) while others use the configuration or Chung-Lu model (Chung and Lu, Reference Chung and Lu2002; Yanchenko and Sengupta, Reference Yanchenko and Sengupta2024). For deriving the null distribution, an asymptotic distribution can be found in some situations, but when this is not possible, a bootstrap approach is also available (Yanchenko and Sengupta, Reference Yanchenko and Sengupta2024).
Despite this extensive work on static networks, to the authors’ knowledge, there are no existing tests for community structure on temporal networks. Users may be tempted to simply aggregate the temporal network into a static network and then use an existing static hypothesis test for community structure. Not only does this remove any temporal variation, but it has also proven to be a poor approach for other network tasks, e.g., Influence Maximization (Erkol et al., Reference Erkol, Mazzilli and Radicchi2020; Yanchenko et al., Reference Yanchenko, Murata and Holme2024). Perhaps the closest related work comes from network monitoring and surveillance (Woodall et al., Reference Woodall, Zhao, Paynabar, Sparks and Wilson2017; Jeske et al., Reference Jeske, Stevens, Tartakovsky and Wilson2018). For example, Wilson et al. (Reference Wilson, Stevens and Woodall2019) study change-point detection in a temporally evolving network using the degree-corrected block model (Karrer and Newman, Reference Karrer and Newman2011, henceforth DCBM). Those authors assume that network snapshots are being generated independently and identically distributed until some unknown time
$t^*$
, at which point the data-generating process changes. The goal is to find this change-point time
$t^*$
. In another work, Wilson et al. (Reference Wilson, Palowitch, Bhamidi and Nobel2017) derive a hypothesis test for community structure in multilayer networks, for which temporal networks could be considered as a special case. Their method identifies densely-connected nodes to compute a significance score which is then compared against the configuration model (Newman, Reference Newman2006).
When testing on temporal networks, new challenges emerge in addition to inheriting those of the static setting. As in static network testing, carefully defining community structure in a temporal setting is quite difficult (Cazabet and Rossetti, Reference Cazabet and Rossetti2023). Unique to temporal networks on the other hand, sequential realizations induce highly non-trivial dependence, making it difficult to combine results across observations using, e.g., p-values.
To overcome these challenges, we develop a community detection hypothesis test for temporal networks using an e-value framework. E-values have recently been gaining popularity in testing settings (e.g., Vovk and Wang, Reference Vovk and Wang2021; Xu and Ramdas, Reference Xu and Ramdas2024). The name comes from “expectation” in that their key property is their expectation is less than or equal to 1 when the null hypothesis is true. Thus, large e-values correspond to evidence against the null. Moreover, key properties of e-values address the difficulty of combining results with arbitrary dependence. As many in the network science community may be unfamiliar with e-values, we devote a sizable portion the manuscript to discussing their basic features.
The proposed test first calculates a p-value for (static) community structure on each temporal snapshot before converting this to an e-value. The e-values are then averaged to yield an overall measure of evidence against the null hypothesis of no community structure across networks. Large e-values indicate the likely presence of community structure. By using e-values, we can easily combine information from different snapshots while still maintaining type I error guarantees even with arbitrary dependence in the network process. Additionally, the general nature of our method means it can be applied to a wide range of data-generating mechanisms and static hypothesis tests. Indeed, we apply the method to two different static hypothesis tests as well as three data-generating mechanisms. Moreover, our experiments on real data highlight some of the challenges of defining and testing for temporal community structure (Cazabet and Rossetti, Reference Cazabet and Rossetti2023).
The remainder of the paper is organized as follows. Section 2 provides the necessary preliminaries before describing the details of the hypothesis testing framework in Section 3. The method is applied to both synthetic and real-world networks in Sections 4 and 5, respectively. Finally, we close with an extended discussion in Section 6.
2. Background
2.1 Notation
Let
$\mathcal G=(\mathcal G^{(1)},\ldots ,\mathcal G^{(T)})$
be a temporal network where
$\mathcal G^{(t)}=(\mathcal V^{(t)},\mathcal E^{(t)})$
is the “snapshot” of the network at time
$t$
, with node set
$\mathcal V^{(t)}$
and edge set
$ \mathcal E^{(t)}$
, and
$T$
is the number of snapshots. At time
$t$
, we assume that there are
$| \mathcal V^{(t)}|=n_t$
nodes and
$| \mathcal E^{(t)}|=m_t$
edges. In this work, we assume that all edges are undirected, but the ideas can easily be extended to directed networks. Notice that both the number of nodes and edges can change over time, but in this work, we primarily focus on the setting where the number of nodes is constant, i.e.,
$n_t\equiv n$
for all
$t$
. We also define
$\textbf {A}=(\textbf {A}^{(1)},\ldots ,\textbf {A}^{(T)})$
as the adjacency matrix corresponding to
$\mathcal G$
where
$A_{ij}^{(t)}=1$
if nodes
$i$
and
$j$
have an edge at time
$t$
, and 0 otherwise. For now, we remain agnostic as to how the network is generated and evolves, but assume that there are no self-loops, i.e.,
$A_{ii}^{(t)}=0$
for all
$i,t$
. Lastly, we define
$\mathcal M_1$
as a set of probability distributions over sample space
$\Omega$
and
$\sigma$
-algebra
$\mathcal F$
, and
${\mathcal P}_0\subseteq \mathcal M_1$
as the distributions corresponding to some null hypothesis. We let
$\mathbb P\in \mathcal M_1$
represent a single distribution.
2.2 Challenges in temporal network testing
Hypothesis testing on networks is difficult due to the inherent dependence in the data, and it is made even more difficult when working with temporal networks. Specifically, we need to combine information with unknown and non-trivial dependence. Assume we observe a temporal network
$\mathcal G=(\mathcal G^{(1)},\ldots ,\mathcal G^{(T)})$
, consisting of
$T$
“snapshots” or realizations of the network-generating process. Each snapshot,
$\mathcal G^{(t)}$
, yields some information about the presence/absence of a community structure in the underlying data-generating process. We may assume that there are existing methods to extract the evidence of a community structure for each individual snapshot, i.e., using a static hypothesis test for community structure (e.g., Bickel and Sarkar, Reference Bickel and Sarkar2016; Yanchenko and Sengupta, Reference Yanchenko and Sengupta2024). But how can we combine the evidence from each snapshot into an overall measure of evidence of community structure in the temporal network? Indeed, the snapshots likely have a highly non-trivial dependence, greatly complicating their combination. If we use traditional p-values, then in general it is quite challenging to combine this information, especially with unspecified dependence (e.g., Benjamini and Hochberg, Reference Benjamini and Hochberg1995). Therefore, we seek a method that can easily combine information about the underlying data-generating structure even with unknown dependence.
2.3 E-values
2.3.1 Basics
Before presenting the proposed test, we give some important background on e-values and their basic properties. Recently, e-values have become a popular approach for hypothesis testing (Wasserman et al., Reference Wasserman, Ramdas and Balakrishnan2020; Ramdas et al., Reference Ramdas, Ruf, Larsson and Koolen2020; Dey et al., Reference Dey, Martin and Williams2024; Xu and Ramdas, Reference Xu and Ramdas2024; Grünwald et al., Reference Grünwald, de Heide and Koolen2024). Among other things, they allow for combination under arbitrary dependence, anytime-valid stopping rules, and optional continuation of experiments, but we primarily focus on the combination property. We emphasize that the results in this subsection are not novel; this discussion is intended to provide the foundation for understanding our proposed method as described in Section 3.
Before introducing e-values, we briefly review the basics of p-values. Recall that
$\mathcal M_1$
is the set of probability distributions and
${\mathcal P}_0\subseteq \mathcal M_1$
are the probability distributions corresponding to some null hypothesis. Then
$P$
is a p-value for
${\mathcal P}_0$
if
In words, this condition requires that, for all
$\mathbb P\in {\mathcal P}_0$
,
$P$
is stochastically no smaller than a uniform random variable on
$[0,1]$
. On the other hand, an e-value,
$E$
, is a
$[0,\infty ]$
-valued random variable such that its expectation under the null hypothesis is at most 1, i.e.,
where
${\mathbb E}_{\mathbb P}$
represents the expectation taken with respect to
$\mathbb P$
. A basic result says that if
$E$
is an e-value, then
$1/E$
is a p-value. This is easy to see using Markov's inequality and (2):
where we used the fact that
${\mathbb E}_{\mathbb P}(E)\leq 1$
for all
${\mathbb P}\in {\mathcal P}_{0}$
.
2.3.2 Combination
We show that it is easy to combine e-values, even with unknown dependence. Assume that we have
$T$
e-values,
$E_1,\ldots ,E_T$
where
$E_t$
was computed from
$\mathcal G^{(t)}$
, and assume that we do not know the dependence between
$\mathcal G^{(t)}$
and
$\mathcal G^{(t')}$
for
$t'\neq t$
. Thus, we also do not know the dependence between
$E_t$
and
$E_{t'}$
for
$t\neq t'$
. A natural, and in some sense “best” approach to combine e-values is with the arithmetic mean, i.e.,
\begin{equation*} \mathbb M(e_1,\ldots ,e_T)=\frac 1T\sum _{t=1}^T e_t. \end{equation*}
It is easy to see that the arithmetic mean of e-values is still an e-value as, for any
$\mathbb P\in {\mathcal P}_0$
,
\begin{equation*} {\mathbb E}_\mathbb P\{\mathbb M(E_1,\ldots ,E_T)\} =\frac 1T\sum _{t=1}^T {\mathbb E}_\mathbb P(E_t) \leq \frac 1T\sum _{t=1}^T 1 =1. \end{equation*}
We refer the interested reader to Vovk and Wang (Reference Vovk and Wang2021) and Ramdas and Wang (Reference Ramdas and Wang2025) for more details on combining e-values. Intuitively, if e-values from the individual snapshots are large, then the arithmetic mean will also be large. In other words, if there is strong evidence for community structure on individual snapshots, then there will be strong evidence for community structure on the temporal network.
3. Methodology
3.1 Proposed test
We propose the following hypothesis test for community structure in temporal networks.
-
1. For
$t\in \{1,\ldots ,T\}$
, compute a p-value,
$P_t$
, on
$\mathcal G^{(t)}$
. -
2. Convert each p-value to an e-value,
$E_t$
. -
3. Find the average of the e-values,
$\bar E_T=\frac 1T\sum _{t=1}^T E_t$
. -
4. Reject
$H_0$
if
$\bar E_T$
is “large.”
Step 1: Compute p-values: First, we must compute a p-value on each graph snapshot
$\mathcal G^{(t)}$
for
$t\in \{1,\ldots ,T\}$
. This p-value corresponds to the evidence for/against a community structure on the static component
$\mathcal G^{(t)}$
. We stress that any static hypothesis test for community structure can be used as long as it yields a valid p-value. We primarily use the approach from Bickel and Sarkar (Reference Bickel and Sarkar2016), with details provided in the Supplementary Materials.
Step 2: Convert p-values to e-values: Since
$\mathcal G^{(t)}$
is likely dependent on
$\mathcal G^{(t')}$
for
$t'\neq t$
, the corresponding p-values
$P_t$
and
$P_{t'}$
will also be dependent. In general, it is quite difficult to combine dependent p-values, especially if this dependence is unknown. To circumvent this issue, we convert each p-value to an e-value since the latter are trivial to combine. To do this, we use a (p-e) calibrator. A calibrator is a non-negative decreasing function
$g\,:\,[0,\infty )\to [0,\infty ]$
with integral at most one such that
$g(x)=0$
for all
$x\in (1,\infty )$
and
$g(P)$
is an e-value if
$P$
is a p-value. In other words, the calibrator transforms a p-value into an e-value; the reverse transformation is also possible, but we will not need this in the present paper. Some examples of calibrators are given in Shafer et al. (Reference Shafer, Shen, Vereshchagin and Vovk2011) and Vovk and Wang (Reference Vovk and Wang2021). Specifically, for any
$\kappa \in (0,1)$
,
is a calibrator. In case one does not want to specify the parameter
$\kappa$
, there are two natural options. First, one might choose
$\kappa$
to maximize
$g_\kappa (p)$
at each
$p$
, leading to
\begin{align*} g_{\text{max}}(p) = \begin{cases} -\exp\!(\!-1)/(p\log p) &\quad p\leq \exp\!(\!-1),\\[3pt] 1 &\quad \text{otherwise}, \end{cases} \end{align*}
but this is not a calibrator. We refer to this as max in the rest of the paper. Second, and less greedy, one might average over
$\kappa$
to get
the calibrator we call avg. We consider each of these three approaches in our simulations.
Step 3: Average e-values: Once the p-values have been converted to e-values, we combine them by taking the arithmetic mean. We showed in Section 2 that not only does this yield a valid e-value, but it can also be shown that this is the best way to combine them with unknown dependence (Vovk and Wang, Reference Vovk and Wang2021). More generally, for any positive weights
$w_1,\ldots ,w_T$
such that
$\sum _{t=1}^T w_t=1$
,
\begin{equation*} \tilde E_T =\sum _{t=1}^T w_t E_t \end{equation*}
is also a valid e-value. Of course, the user would then need to choose the weights, but, e.g., selecting weights such that
$w_1\lt w_2\lt \ldots \lt w_T$
would place a greater importance on more recent snapshots, which would be reasonable if it was plausible that a community structure was “evolving” in the time index
$t$
. Finally, if we knew that the snapshots
$\mathcal G^{(t)}$
were independent, then we could also multiply the e-values to form a new e-value, but in general we do not expect the network realizations to be independent.
Step 4: Rejection decision: After averaging the e-values, we are left with a single e-value which quantifies the evidence for or against the presence of a community structure in the temporal network. Typically in hypothesis testing, the user chooses some threshold
$\alpha \in (0,1)$
as their type I error rate and then rejects if the p-value is smaller than
$\alpha$
with common choices
$\alpha =0.05$
or
$\alpha =0.01$
. On the other hand, for e-values, we could reject the null hypothesis when it is “large.” While there is no universally agreed upon threshold,
$E\gt 20$
yields a sensible rejection threshold, yielding a type I error of no more than
$\alpha =0.05$
(Wang, Reference Wang2023). That being said, we do not necessarily endorse the use of 20 as the threshold for decision making. Instead, the raw e-value should be considered as the strength of evidence against the null hypothesis of “no community structure,” and the practitioner can choose the appropriate level, albeit greater than 1.
3.2 Properties
We first state the key property of the previous test with the following theorem.
Theorem 1.
Let
$\mathcal G^{(1)},\ldots ,\mathcal G^{(T)}$
be a sequence of snapshots from a temporal network and let
$\bar E_T$
be constructed as in Section 3.1
. Then
$\bar E_T$
is an e-value in the sense of (
1
).
Theorem 1 follows directly from the basic definition of e-values described in Section 2.3 and allows
$\bar E_T$
to be used for hypothesis testing. The novelty here lies in the application to testing on temporal networks. Indeed, to the authors’ knowledge, this is the first hypothesis test for community structure in temporal networks.
While not explicitly stated, the proposed test implicitly adopts its null hypothesis of “no community structure” via the static community detection hypothesis test. Many methods use the ER model, e.g., Bickel and Sarkar (Reference Bickel and Sarkar2016); Yuan et al. (Reference Yuan, Liu, Feng and Shang2022); Yanchenko and Sengupta (Reference Yanchenko and Sengupta2024). Here, the probability of an edge between any two nodes is independently
$p$
, i.e.,
$A_{ij}\mid p\stackrel {\text{iid.}}{\sim }\mathsf{Bernoulli}(p)$
. We write
$\textbf {A}\sim \mathbb P_{ER}(p)$
as short-hand to denote the ER data-generating distribution with edge probability
$p$
. Then
$\mathcal M_1$
as the set of all possible network-generating matrices, and
${\mathcal P}_0=\{\mathbb P_{ER}(p)\mid p\in (0,1)\}$
. Tautologically, this model does not encode any community structure. Furthermore, certain data-generating models implicitly encode the ER model as a null model (e.g., Sasahara et al., Reference Sasahara, Chen, Peng, Ciampaglia, Flammini and Menczer2021).
Practitioners may be wary of this choice of null model. In particular, the model may be so simple that virtually all real-world networks diverge from it, whether they possess a community structure or not. In such cases, the configuration model may be a more appropriate null model (Lancichinetti et al., Reference Lancichinetti, Radicchi and Ramasco2010; Palowitch et al., Reference Palowitch, Bhamidi and Nobel2017). For ease of exposition, we focus on the ER null model and Bickel and Sarkar (Reference Bickel and Sarkar2016) hypothesis testing framework, but we stress that the method can easily be generalized to other null models and/or hypothesis tests. Indeed, any community structure hypothesis test for static networks can be adapted to this framework. We explore such generalizations in the real-data analysis.
As for the alternative hypothesis, this is generally not explicitly encoded in the hypothesis test. Instead, the definition of “community structure” will be determined by the user depending on their data-generating model. A sensible choice would be the stochastic block model (SBM) (Holland et al., Reference Holland, Laskey and Leinhardt1983) but it can be more general. As our preferred hypothesis test from Bickel and Sarkar (Reference Bickel and Sarkar2016) does not encode a specific alternative hypothesis, the proposed test does not make any modeling assumptions of the network-generating process. This means that the test can be used for a wide range of models and settings, e.g., the community structure changes over time as nodes change groups, new communities form and/or disappear, new nodes are added to the network, etc. Similarly, we did not need to specify the dependence between successive observations
$\mathcal G^{(t)}$
and
$\mathcal G^{(t+1)}$
because the averaging of e-values is still a valid e-value, regardless of their dependence.
Lastly, we stress that the main reason for leveraging an e-value framework is that it easily allows for combining evidence across different snapshots (here, via averaging). If we had used p-values directly, then it would be highly non-trivial to combine results, even if we assume a data-generating model. That being said, by averaging e-values, the proposed approach implicitly tests for an “average” community structure over the temporal evolution of the network. This means, for example, that if the snapshot ordering was shuffled, the proposed approach would still yield the same e-value. We do not consider this a feature or a bug of the method, but rather a reality that users need to be aware of. Indeed, as we discuss further in the Conclusion, defining community structure on a temporal network is quite difficult, and since, to our knowledge, there are no other existing hypothesis tests for this situation, we view this as a sensible first solution. Of course, more explicitly accounting for the evolution in the network could yield a more powerful test. We leave this investigation for future work. Our method does, however, implicitly account for correlation in the network, e.g., if every snapshot was identical (perfect correlation), then the e-value would not be an average and instead would be the value from only a single snapshot.
4. Simulation study
4.1 Set-up
Here we perform numerical simulations to study the properties of the proposed hypothesis test, demonstrating its ability to combine results across dependent network snapshots. Thus, we assume that the number of observations,
$T$
, was fixed before the experiment began.
As the test is not tied to a particular data-generating model, we consider three different network-generating models. Since we use the static test from Bickel and Sarkar (Reference Bickel and Sarkar2016), for each model, the hypotheses being tested are
We vary parameter settings which control the strength of the community structure or the number of nodes and report the median e-value over 100 Monte Carlo (MC) iterations. To clarify, the individual e-values are calculated as the average e-value from each snapshot, while the median is taken over the MC replicates. We compare the proposed test using five different calibrators: max, avg and
$\kappa =0.25,0.50,0.75$
. Recall that max is not a proper calibrator but we may refer to it as one for ease of exposition. We prefer the median as opposed to the mean as an infinite e-value from just a single MC iteration can obscure the overall trends. While we are primarily interested in reporting the e-values of the test directly, we also report the type I error and power of the test for a rejection threshold of
$\bar E_T\gt 20$
in the Supplemental Materials, in addition to variability results. We stress that he goal of these simulations is not to identify the specific communities but rather to test for the presence/absence of a community structure. Finally, code to implement the proposed test and reproduce the simulation studies is available from the first author's GitHub page: https://github.com/eyanchenko/tempComDet#.
4.2 Correlated SBM
4.2.1 Model
First, we propose a novel model to generate correlated observations with a stochastic block model (Holland et al., Reference Holland, Laskey and Leinhardt1983). The SBM is a popular model to generate networks with a community structure in static networks. We present the basic ideas before generalizing to temporal networks. Given some network with
$n$
nodes and
$K$
communities, let
$\boldsymbol{{c}}\in \{1,\ldots ,K\}^n$
be such that
$c_i=k$
if node
$i$
is in community
$k$
. Here,
$\boldsymbol{{c}}$
represents the latent community structure. Given
$\boldsymbol{{c}}$
, the probability of an edge between nodes
$i$
and
$j$
,
$P_{ij}$
, is
$P_{ij}=B_{c_i,c_j}$
, where
$\textbf {B}\in (0,1)^{K\times K}$
is the block-probability matrix such that
$B_{k,k'}$
is the probability of an edge between nodes in community
$k$
and
$k'$
for
$k,k'\in \{1,\ldots ,K\}$
. If
$B_{k,k'}=b$
for all
$k,k'\in \{1,\ldots ,K\}$
, then this model reduces to the ER (null) model. On the other hand, if the diagonal entries of
$\textbf {B}$
are larger than those on the off-diagonal, then the SBM generates networks with assortative community structure (alternative hypothesis).
To extend this to the temporal setting, we are inspired by the graph matching literature (see, e.g. Lyzinski et al., Reference Lyzinski, Fishkind and Priebe2014) to generate a (potentially correlated) sequence of network realizations, or snapshots. At time step,
$t=1$
, we generate a static SBM network, i.e.,
Then for all
$i,j$
and
$t\geq 2$
,
\begin{align} A_{ij}^{(t)}\big|A_{ij}^{(t-1)},\boldsymbol{{c}},{\textbf {B}} \stackrel {ind.}{\sim } \begin{cases} \mathsf{Bernoulli}\{B_{c_i,c_j}+\rho (1-B_{c_i,c_j})\}&\text{if }A_{ij}^{(t-1)}=1\\[3pt] \mathsf{Bernoulli}\{B_{c_i,c_j}(1-\rho )\}&\text{if }A_{ij}^{(t-1)}=0. \end{cases} \end{align}
This formulation ensures that
$\mathsf{Cor}(A_{ij}^{(t)},A_{ij}^{(t-1)})=\rho$
, which we prove in the Supplemental Materials. As special cases, if
$\rho =0$
, then the snapshots are independent, and if
$\rho =1$
, then they are identical. This resembles a first-order Markov process as the next snapshot only depends on the current one, and
$\rho$
controls the amount of correlation between the successive realizations. Additionally, this model assumes that the latent community labels,
$\boldsymbol{{c}}$
, do not vary with time, but we relax this assumption in the subsequent model.
Median e-value over 100 MC simulations for correlated SBM networks with
$\rho =0.25$
. Gray line at
$E=20$
corresponding to
$\alpha =0.05$
rejection threshold.

Figure 1 Long description
The image contains two line graphs. The first graph shows the median e-value over 100 Monte Carlo simulations for correlated stochastic block model networks with varying delta. The x-axis represents delta values ranging from 0.0000 to 0.0100, and the y-axis represents the e-value on a logarithmic scale from 0.1 to 100. Different lines represent various calibrators: kappa equals 0.25, kappa equals 0.5, kappa equals 0.75, average, and maximum. The second graph shows the median e-value over 100 Monte Carlo simulations for correlated stochastic block model networks with varying n. The x-axis represents n values ranging from 250 to 1000, and the y-axis represents the e-value on a logarithmic scale from 0.1 to 100. Different lines represent various calibrators: kappa equals 0.25, kappa equals 0.5, kappa equals 0.75, average, and maximum. The gray line in both graphs corresponds to the rejection threshold. All values are approximated.
4.2.2 Settings
To generate networks using this model, we set
$n_1=\cdots =n_T\equiv n=1000$
where
$T=10$
and assume
$K=2$
such that
\begin{align*} {\textbf {B}} = \begin{pmatrix} b+\delta /2 &\quad b-\delta /2\\[2pt] b-\delta /2 &\quad b+\delta /2 \end{pmatrix} \!. \end{align*}
Then we set
$b=0.01$
such that
$\delta \gt 0$
corresponds to the strength of the community structure in the network. We assume that
$\boldsymbol{{c}}$
is fixed for all
$t$
and that 80% of the nodes are in group 1 and the remaining are in group 2. With
$\rho =0.25$
, we generate temporal networks using (3). In Figure 1(a), we vary
$\delta \in \{0,5\times 10^{-4},\ldots ,0.01\}$
, i.e., increasing community structure. In Figure 1(b), we fix
$\delta =0.009$
and vary
$n\in \{100, 150, \ldots , 1000\}$
, i.e., increasing network size. The results are similar for the same settings but with
$\rho =0.75$
, so we leave these to the Supplemental Materials.
4.2.3 Results
For
$\delta \gt 0$
, the alternative hypothesis is true so we expect to see large e-values. Indeed, as
$\delta$
increases, the median e-value monotonically increases for each calibrator. The max and
$\kappa =0.25$
calibrators consistently have slightly larger e-values for
$\delta \gt 0.006$
with
$\kappa =0.75$
having the lowest. For the increasing
$n$
setting,
$\delta \gt 0$
so we expect large e-values. All calibrators, save
$\kappa =0.75$
, yield large values for
$n=1000$
, and the relative performance of the calibrators is similar to that of the previous setting. These results show that the proposed testing method can detect community structure in SBMs, with the max and
$\kappa =0.25$
calibrators performing the best, even when the networks (and therefore the e-values) are correlated. Moreover, the test yields a high power when the community structure is relatively weak, e.g.,
$\delta =0.01$
implies that an intra-community edge is only 1% more likely than an inter-community edge.
4.3 Dynamic SBM
4.3.1 Model
While the previous model allows for correlation between successive realizations of the network, it does not allow the node communities to change with time. To allow for this property, we discuss the dynamic SBM (Matias and Miele, Reference Matias and Miele2017). Recall that we represent our temporal network as a sequence of adjacency matrices
$\textbf {A}^{(1)},\ldots ,\textbf {A}^{(T)}$
. Additionally, we have community labels
$\boldsymbol{{c}}^{(1)},\ldots ,\boldsymbol{{c}}^{(T)}$
such that
$\boldsymbol{{c}}^{(t)}\in \{1,2,\ldots ,K\}^{n}$
and
$c_i^{(t)}=k$
means that node
$i$
is in group
$k$
at time
$t$
. Thus, the community labels are now allowed to vary with time. We also define
$\boldsymbol{{c}}_i=(c_i^{(1)},\ldots ,c_i^{(T)})^\top$
to represent the group membership for node
$i$
over time.
Matias and Miele (Reference Matias and Miele2017) assume that
$\boldsymbol{{c}}_1,\ldots ,\boldsymbol{{c}}_n$
are independent and identically distributed random variables. For a given node, however,
$\boldsymbol{{c}}_i$
is a Markov chain defined by transition matrix
$\boldsymbol \pi \in (0,1)^{K\times K}$
and initial stationary distribution
$\boldsymbol{\alpha }=(\alpha _1,\ldots ,\alpha _K)^\top$
. In words, if node
$i$
is in community
$k$
at time
$t$
, then the probability that it is in group
$k'$
at time
$t+1$
is
$\pi _{k,k+1}$
for
$k,k'\in \{1,\ldots ,K\}$
. Given
$\boldsymbol{{c}}^{(1)},\ldots ,\boldsymbol{{c}}^{(T)}$
, we generate a SBM as before:
where
${\textbf {B}}\in (0,1)^{K\times K}$
is the block model probability matrix. The authors show that, for identifiability, the community labels and block-model parameters cannot both vary with time, so we consider
$\textbf {B}$
as fixed over time. This also means that if all the entries of
$\textbf {B}$
are the same, then we recover the ER null model again. Lastly, notice that conditional on the group labels, the consecutive snapshots are independent, unlike the previous model.
4.3.2 Settings
We again let
$n=1000$
,
$T=10$
,
$K=2$
and take
\begin{align*} {\textbf {B}} = \begin{pmatrix} b+\delta /2 &\quad b-\delta /2\\[2pt] b-\delta /2 &\quad b+\delta /2 \end{pmatrix}\! , \end{align*}
with
$b=0.01$
and
$\boldsymbol{\alpha }=(0.80, 0.20)^\top$
. We set
\begin{align*} \boldsymbol \pi _1 = \begin{pmatrix} 0.90 &\quad 0.10\\[2pt] 0.10 &\quad 0.90 \end{pmatrix} \\[-20pt] \end{align*}
which discourages nodes from switching groups, vary
$\delta \in \{0,5\times 10^{-4},\ldots ,0.01\}$
and generate networks using (4). The results are in Figure 2(a). We also fix
$\delta =0.009$
and vary
$n\in \{100, 150,\ldots ,1000\}$
in Figure 2(b). The same settings but with
\begin{align*} \boldsymbol \pi _2 = \begin{pmatrix} 0.60 &\quad 0.40\\[2pt] 0.40 &\quad 0.60 \end{pmatrix} \end{align*}
were also considered and these results are in the Supplemental Materials.
4.3.3 Results
When
$\delta \gt 0$
, the alternative hypothesis is true so we expect to see large e-values. The median e-value is low for all methods until around
$\delta =0.007$
, at which point they all begin to increase. Again, the max calibrator consistently has the largest e-values. For
$\delta \geq 0.009$
, all p-values were 0 leading to an infinite e-value, and is therefore not plotted. The trends are similar for increasing
$n$
; for
$n\geq 900$
, all e-values were infinite and not plotted. These results show that the proposed testing method can detect community structure even when it is weak and the community labels vary temporally.
Median e-value over 100 MC simulations for dynamic SBM networks with
$\boldsymbol \pi _1$
. Gray line at
$E=20$
corresponding to
$\alpha =0.05$
rejection threshold.

Figure 2 Long description
Two line graphs display the median e-value over 100 Monte Carlo simulations for dynamic stochastic block model networks. The top graph varies delta, while the bottom graph varies n. Each graph includes multiple lines representing different calibrators: kappa equals 0.25, 0.5, 0.75, average, and maximum. The x-axis of the top graph represents delta values ranging from 0 to 0.01, and the y-axis represents e-values ranging from 1 to 100. The x-axis of the bottom graph represents n values ranging from 0 to 1000, and the y-axis represents e-values ranging from 1 to 100. The gray line indicates the rejection threshold. The lines show an upward trend as delta and n increase, with the maximum calibrator consistently having the highest e-values.
4.4 Dynamic DCBM
4.4.1 Model
For the final simulation, we consider a temporal degree-corrected block model (DCBM). The DCBM was first proposed in Karrer and Newman (Reference Karrer and Newman2011) to model the fact that many real-world networks have degree heterogeneity. As before, let
$\boldsymbol{{c}}$
correspond to the community labels and
$\textbf {B}$
represent the community edge probabilities. We also introduce node weights,
$\boldsymbol \theta =(\theta _1,\ldots ,\theta _n)^\top$
such that if
$\theta _i$
is large, then we expect node
$i$
to have relatively more edges. Then the probability distribution of the network is defined as
Thus, the probability of an edge between nodes
$i$
and
$j$
depends not only on their community assignment (through
$\textbf {B}$
) but also their relative importance (via
$\theta$
). Note that if
$\theta _i\equiv \theta$
for all
$i$
, then we recover the non-degree-corrected SBM. Furthermore, if
$B_{k,k'}=b$
for all
$k,k'$
, then the DCBM reduces to the Chung-Lu (CL) model (Chung and Lu, Reference Chung and Lu2002) which does not possess community structure but also differs from the ER model, i.e.,
$P_{ij}\propto \theta _i\theta _j$
.
There are various ways for this model to vary temporally including through the community assignments
$(\boldsymbol{{c}})$
, block probabilities
$({\textbf {B}})$
or weight parameters
$(\boldsymbol \theta )$
(Wilson et al., Reference Wilson, Stevens and Woodall2019). For simplicity, we follow the approach of Matias and Miele (Reference Matias and Miele2017) to let the community labels change with time, in addition to varying
$\theta _i$
(Wilson et al., Reference Wilson, Stevens and Woodall2019). Specifically, we generate
and
$\boldsymbol{{c}}^{(t)}$
as in Section 4.3. Then conditional on
$\boldsymbol{{c}}^{(t)},\boldsymbol \theta ^{(t)}$
and
$\textbf {B}$
, we generate independent snapshots using (5).
4.4.2 Settings
We use similar settings as in Section 4.3. Let
$n=1000$
,
$T=10$
,
$K=2$
and take
$\textbf {B}$
as before with
$b=0.01$
and
$\boldsymbol{\alpha }=(0.80, 0.20)^\top$
. We use
$\boldsymbol \pi _1$
to model the community transition probabilities and take
$\varepsilon =0.6$
. We vary
$\delta \in \{0,5\times 10^{-4},\ldots ,0.01\}$
, i.e., increasing community structure, and generate networks using (5). The results are in Figure 3(a). Next, we fix
$\delta =0.009$
and vary
$n\in \{100, 150,\ldots ,1000\}$
with results in Figure 3(b)). We repeat these settings with
$\varepsilon =0.2$
(decreased degree heterogeneity) in the Supplemental Materials.
4.4.3 Results
The results are similar to the previous ones. As
$\delta$
and
$n$
increase, the median e-value also increases. When
$\delta$
is varied, the max and
$\kappa =0.25$
calibrators yield the largest e-values for all values of
$\delta$
. Again, the
$\kappa =0.75$
calibrator tends to have the smallest e-value. The main difference from the previous settings is that the e-value increase occurs for smaller
$\delta$
and
$n$
. This is because the added heterogeneity from the
$\boldsymbol \theta$
parameters means the model diverges from the ER model more quickly than a basic SBM. Indeed, in Figure 3(a), the median e-values are greater than 1 even when
$\delta =0$
(no block model structure). Even though
$\delta =0$
and the null hypothesis appears to be true, the DCBM behaves like a CL model which still differs from the ER model, causing the slight inflation in the e-value. This is a key limitation of the method from Bickel and Sarkar (Reference Bickel and Sarkar2016) in that it only tests against the ER null. As seen here, it is possible for a network to diverge from the ER null without possessing a community structure. This idea will be more fully explored in the real-data analysis.
Median e-value over 100 MC simulations for dynamic DCBM networks with
$\varepsilon =0.6$
. Gray line at
$E=20$
corresponding to
$\alpha =0.05$
rejection threshold.

Figure 3 Long description
Two line graphs depict median e-value over 100 MC simulations for dynamic DCBM networks. The first graph shows varying delta on the x-axis and e-value on the y-axis, with multiple lines representing different calibrators. The second graph shows varying n on the x-axis and e-value on the y-axis, with similar lines for different calibrators. Each graph includes a gray line representing the rejection threshold. The lines represent different calibrators with varying kappa values and average and maximum values.
5. Real-data analysis
5.1 Choice of null model
We turn our attention to studying real-world networks, further demonstrating the ability of the proposed test to combine information across dependent network realizations. In the previous sections, we leveraged the static community structure hypothesis test from Bickel and Sarkar (Reference Bickel and Sarkar2016). The proposed e-value testing procedure, however, works more generally for any test that yields p-values on static networks. Indeed, in many cases, the ER model may not be a satisfactory null model as it is too easy to reject. In other words, almost all real-world networks diverge from a simple ER model, even if they do not have a community structure. Specifically, in the dynamic DCBM simulations, we found that even if there was no block community structure
$(\delta =0)$
, the CL model alone led to slightly larger e-values then we would have expected under the null (ER model). Moreover, in the following examples, we found that each network (save Kenya) yielded an infinite e-value when using the method from Bickel and Sarkar (Reference Bickel and Sarkar2016). If every network yields an infinite e-value, then it may not be useful metric for discriminating community strength in networks.
In light of these observations, we apply the bootstrap testing approach from Yanchenko and Sengupta (Reference Yanchenko and Sengupta2024) in order to leverage the CL model as the null model, i.e., testing
$H_0\,:\,\text{Chung-Lu model}$
versus
$H_1\,:\,\text{not }H_0$
. We prefer this null as it can model degree heterogeneity while still not exhibiting community structure, making it a more flexible null model. Indeed, the CL model is a close cousin of the configuration model which is commonly used as a null model in community detection algorithms (e.g., Newman, Reference Newman2006).
5.2 Bootstrap method
We briefly describe the bootstrap testing method from Yanchenko and Sengupta (Reference Yanchenko and Sengupta2024). The authors begin by defining the expected edge density difference (E2D2) parameter to quantify the strength of a community structure. Specifically, for adjacency matrix
$\textbf {A}$
and community labels
$\boldsymbol{{c}}$
, the E2D2 statistic is defined as scaled difference between the intra- and inter-community edge density, i.e.,
where
and where
$\mathbb I(\! \cdot \!)$
is the indicator function and
$n_k$
is the number of nodes in community
$k$
, i.e.,
$n_k=\sum _{i=1}^n\mathbb I(c_i=k)$
for
$k\in \{1,\ldots ,K\}$
. The authors also propose a greedy algorithm to approximate the maximum value, i.e.,
The bootstrap test proceeds as follows. Given the observed adjacency matrix
$\textbf {A}$
,
$\tilde U(\textbf {A})$
is calculated as in (7). Since we are testing against the null hypothesis of a CL model, we need to generate CL networks that resemble
$\textbf {A}$
. To do this, we first estimate the weight vector
$\boldsymbol \theta$
with using the rank 1 adjacency spectral embedding (ASE) (Sussman et al., Reference Sussman, Tang, Fishkind and Priebe2012):
where
$\lambda _1$
is the largest eigenvalue of
$\textbf {A}$
(in magnitude) and
$\textbf {u}$
is the corresponding eigenvector. Then for the
$b$
th bootstrap iteration, we sample from
$\hat {\boldsymbol \theta }=(\hat \theta _1,\ldots ,\hat \theta _n)^\top$
with replacement to obtain
$\boldsymbol \theta ^{(b)}=(\theta _1^{(b)},\ldots ,\theta _n^{(b)})^\top$
and then sample a network
$\textbf {A}^{(b)}$
using
$\boldsymbol \theta ^{(b)}$
. We compute
$\tilde U(\textbf {A}^{(b)})=\max _{\boldsymbol{{c}}}\{U(\textbf {A}^{(b)},\boldsymbol{{c}})\}$
and repeat this process for
$B$
iterations. Finally, the p-value is
\begin{equation*} \frac 1B\sum _{b=1}^B\mathbb I\big\{\tilde U\big(\textbf {A}^{(b)}\big)\geq \tilde U(\textbf {A})\big\}. \end{equation*}
See Yanchenko and Sengupta (Reference Yanchenko and Sengupta2024) for further details and properties of this test. We briefly note that only the largest connected component of the graph is used when computing
$\tilde U(\textbf {A})$
and the number of communities
$K$
is found using the Fast Greedy Algorithm, with an upper bound set at
$\tilde n^{1/2}$
, where
$\tilde n$
is the number of nodes in the largest connected component. In this real-data analysis, we use this test to compute the p-value on each network snapshot and then flip to e-values using the procedure described in Section 3.1.
5.3 Data sets
To study the performance of the proposed hypothesis test under various settings, we consider five real-world networks of various sizes and domains. The first four networks are all proximity networks which record an edge if two people are close to each other: Kenya (Kiti et al., Reference Kiti, Tizzoni, Kinyanjui, Koech, Munywoki, Meriac, Cappa, Panisson, Barrat, Cattuto and Nokes2016), Reality (Eagle and Pentland, Reference Eagle and Pentland2006), Hospital (Vanhems et al., Reference Vanhems, Barrat, Cattuto, Pinton, Khanafer, Régis, Kim, Comte, Voirin and Viboud2013) and High School 1 (Mastrandrea et al., Reference Mastrandrea, Fournet and Barrat2015). The remaining network is constructed from online communication on a social media platform: College (Panzarasa et al., Reference Panzarasa, Opsahl and Carley2009). For each network, we apply the bootstrap hypothesis test with CL null from Yanchenko and Sengupta (Reference Yanchenko and Sengupta2024) with
$B=1,000$
bootstrap iterations. We also look at the effect of the number of snapshots by varying
$T\in \{5,10\}$
, where we again assume that this choice was made before the data were collected. We emphasize that the temporal network is given with each edge having a time stamp. Thus, the total observation time of the network process is fixed, but we can vary the number of snapshots based on how we bin the data. Indeed, increasing
$T$
should not be confused with increasing the length of the observation period in this setting.
5.4 Results
For each network, the number of nodes
$n$
and e-value are reported in Table 1. We use the
$\kappa =0.25$
calibrator because it yielded the largest e-values in the simulation studies when
$E\gt 1$
and a rejection threshold of
$\bar E_T\gt 20$
. Kenya does not show evidence of a statistically significant community structure given the small e-values. Hospital and College have slightly larger e-values, but still not large enough to warrant rejection of the null hypothesis. For Hospital, this finding accords with that in Yanchenko and Sengupta (Reference Yanchenko and Sengupta2024), which found no community structure compared to the CL null for this network, though this was when the network was treated as static, i.e.,
$T=1$
. For Reality and High School 1, however, there is very strong evidence to reject the null hypothesis and claim that these networks exhibit a statistically meaningful community structure. In general, the results do not seem to be overly sensitive to the choice of
$T$
. Regardless, we stress that in practice this choice should be carried out in a meaningful way based on the domain.
Real-world network e-values using the Chung-Lu null model, bootstrap hypothesis test and
$\kappa =0.25$
calibrator

Table 1 Long description
The table presents data for five networks: Kenya, Reality, Hospital, High School 1, and College. It includes the number of nodes (n) and e-values for T values of 5 and 10. Kenya has 52 nodes with e-values of 0.4 for both T values. Reality has 64 nodes with e-values marked as infinity for both T values. Hospital has 75 nodes with e-values of 9.4 and 6.5 for T values of 5 and 10, respectively. High School 1 has 312 nodes with e-values marked as infinity for both T values. College has 1899 nodes with e-values of 5.0 and 5.7 for T values of 5 and 10, respectively. The table indicates that Kenya does not show significant community structure, while Reality and High School 1 exhibit strong evidence of community structure. Hospital and College show some evidence but not enough to reject the null hypothesis.
6. Conclusion
In this work, we proposed a novel test for community structure in temporal networks which, to the knowledge of the authors, is the first of its kind. The proposed test finds the p-value from a static hypothesis test on each snapshot before converting these to e-values and averaging. A large e-value gives evidence in favor of community structure being present in the temporal network. Moreover, the e-value framework easily accommodates arbitrary dependence in the network. The simulation studies showed that our test can accurately detect the presence/absence of community structure under a range of data-generating models.
The results of the real-data analysis elucidate some of the challenges of temporal network testing, as well as the limitations of the proposed approach. For example, consider the Reality network where we found that the e-values were infinite. This resulted from the last snapshot yielding a p-value of 0, implying an infinite e-value. Of course, averaging any set of numbers where one is infinite will also be infinite. In other words, if the p-value is extremely small (or 0) on just a single snapshot, then the e-value will explode. Indeed, in the Reality network example, if we remove the last snapshot from the averaging, then the e-value is only 1.2 and 0.4 for
$T=5,10$
, respectively, indicating no significant community structure. On the other hand, the e-value was large for almost all snapshots in the High School 1 network results.
These examples serve as a case study in the difficulties of testing for community structure in temporal networks. In this work, the approach to average e-values implicitly assumes that the “strength” of the community structure is roughly constant with time. In other words, we do not expect there to be extremely strong community structure in one snapshot, but none later in the observation process. This implicit assumption also arises because by averaging, we believe that subsequent temporal observations are yielding more evidence about some underlying community structure. The dynamic SBM/DCBM examples show that our framework does allow for community memberships to change, but the underling strength is roughly constant. Specifically, in all simulations, we assumed that
$\textbf {B}$
, the block probabilities, were constant with time.
This raises an important question which we have hitherto not explicitly addressed: what does it mean for a temporal network to have community structure? This question is discussed in Cazabet and Rossetti (Reference Cazabet and Rossetti2023). Perhaps the simplest definition is fixed community structure where the labels and underlying strength of the community structure are invariant with time. The correlated SBM discussed in Section 4.2 would be one example of this. Next, we may have persistent community structure where the community labels are now allowed to change over time, but the strength of the community structure is still roughly constant. The dynamic SBM (Section 4.3) and dynamic DCBM (Section 4.4) both exhibit this kind of community structure, as did the High School 1 network. The proposed hypothesis testing formulation is sensible for either of these cases.
On the other hand, the community structure may change dramatically over the life of the network. For example, new communities may appear (Birth), disappear (Death), join together (Merge), separate (Split), disappear and then reappear (Resurgence) or do something else entirely. These concepts are most connected with the community labels, but the edge probabilities may also vary time. The Reality network seemed to exhibit at least one of these feature as it evolved between exhibiting and not exhibiting community structure, what we might refer to as intermittent community structure. As a result, the e-value-based test was extremely sensitive to these fluctuations. In this case, it is not clear whether the proposed test is even meaningful.
Another related possibility is accumulating community structure where the strength of the community structure increases with time. An example of this case comes from models like that of Sasahara et al. (Reference Sasahara, Chen, Peng, Ciampaglia, Flammini and Menczer2021). In this work, the authors propose a model for echo chambers formation in online social networks, describing how starting from a relatively well-mixed population can quickly lead to strong communities if edges are formed and removed based on some simple heuristics. In this case, the community structure is, by design, not constant and only arises after a certain point. In this case, we may be more interested in change-point detection to know when a community structure arises (e.g., Wilson et al., Reference Wilson, Stevens and Woodall2019).
Regardless, a precise characterization of temporal network community structure is needed to develop a sensible hypothesis test. For example, is the intermittent community structure like that of Reality a meaningful structure? How “intermittent” can it be until it is no longer community structure? Does it make sense to test for community structure where communities are coming, going, merging, and splitting through the process? In this work, we proposed a statistically valid test by extending the definition from static networks, but a more nuanced definition may be needed depending on the particular behavior of the network of interest. These and similar questions will also need to be addressed if the methods in this work are extended to test for other network properties, e.g., core-periphery structure (Yanchenko and Sengupta, Reference Yanchenko and Sengupta2023).
As another possible direction for future work, our proposed framework can easily be extended to other situations where multiple realizations of the network arise, i.e., multilayer networks. (Kivelä et al., Reference Kivelä, Arenas, Barthelemy, Gleeson, Moreno and Porter2014). For example, there could be a network where nodes are researchers, and one layer of the network represents collaborations as edges, a different layer uses edges to denote citations, and a third layer corresponds to a friendship network. If the practitioner is interested in testing for the significance of community structure across these different layers, then our approach could easily be applied.
On the theoretical and methodological side, one possible improvement would be to construct the network-specific e-values directly, rather than applying a calibrator to a known p-value. The intuition would go roughly as follows. The individual p-values are themselves relatively efficient, and the “dream-world” e-value would be simply the reciprocal of that efficient p-value. Unfortunately, the reciprocal of a p-value is not an e-value, and, roughly speaking, the calibrator strategically inflates the p-value by a small amount before taking the reciprocal and returning an e-value. It is this preliminary inflation that, while validity is preserved, leads to a less-efficient-than-necessary e-value. A direct e-value construction like in Grünwald et al. (Reference Grünwald, de Heide and Koolen2024); Larsson et al. (Reference Larsson, Ramdas and Ruf2025) would generally be more efficient, and the construction of such an e-value is the focus of future research.
Acknowledgements
None.
Supplementary material
The supplementary material for this article can be found at https://doi.org/10.1017/nws.2026.10036.
Data availability statement
The data used in this study are freely available online.
Funding statement
The authors have no funding to report.
Competing interests
The authors have no competing interests to declare.
ρ=0.25
E=20
α=0.05
π1
E=20
α=0.05
ε=0.6
E=20
α=0.05
κ=0.25