\documentclass[times,sort&compress,3p]{elsarticle}
\journal{Journal of Multivariate Analysis}
\usepackage[labelfont=bf]{caption}

% set up labelformat and labelsep for figure
\captionsetup[figure]{labelsep=period}
% set up labelformat and labelsep for table
\captionsetup[table]{labelsep=newline}
\captionsetup{singlelinecheck = false}

\renewcommand{\figurename}{Fig.}
\renewcommand{\tablename}{Table}

\usepackage{amsmath,amsfonts,amssymb,amsthm,enumerate,booktabs,color,epsfig,graphicx,hyperref,url}
\usepackage{algorithm}
\usepackage{dsfont}

\DeclareGraphicsExtensions{.pdf, .jpg}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}

\newtheorem{thm}{Theorem}
\newtheorem{lemma}{Lemma}

\theoremstyle{definition}
\newtheorem{definition}{Definition}

\newcommand{\E}{\mathrm{E}}
\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\newcommand{\tbs}[1]{\boldsymbol{\tilde{#1}}}
\newcommand{\hbs}[1]{\boldsymbol{\hat{#1}}}
\newcommand{\bs}[1]{\boldsymbol{#1}}
\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\red}{\color{red}}
\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

\begin{document}

\begin{frontmatter}

\title{Supplementary materials for ``Model-based clustering of time-evolving networks through temporal exponential-family random graph models''}

\author[A1]{Kevin H.~Lee}
\author[A2]{Lingzhou Xue\corref{mycorrespondingauthor}}
\author[A2]{David R.~Hunter}

\address[A1]{Department of Statistics, Western Michigan University, Kalamazoo, MI 49008, USA}
\address[A2]{Department of Statistics, The Pennsylvania State University, University Park, PA 16802, USA}

\cortext[mycorrespondingauthor]{Corresponding author. Email address: \url{lzxue@psu.edu}}

\end{frontmatter}


In this supplementary note, we provide additional details of the proposed variational EM algorithm 
and also a simulation study with unbalanced clusters, i.e., clusters whose marginal probabilities are
unequal.

\section{More details of variational EM algorithm}

\subsection{Obtaining a lower bound of the log-likelihood (9)}
\label{sec:lb}

Using Jensen's inequality, the log-likelihood function can be bounded as
\begin{equation}\label{jensens}
\begin{split}
\ln \Pr({{\mathbf{y}_{1}, \ldots, \mathbf{y}_{T}}} \mid \mathbf{y}_{0}) = & \ln\left\{\sum_{\boldsymbol{z} \in \mathcal{Z}}\frac{\Pr
({{\mathbf{y}_{1}, \ldots, \mathbf{y}_{T}, \boldsymbol{z}}} \mid
\mathbf{y}_{0})}{A(\boldsymbol{z})}A(\boldsymbol{z})\right\} \\
\geq & \sum_{\boldsymbol{z} \in \mathcal{Z}}\left\{\ln \frac{\Pr
({{\mathbf{y}_{1}, \ldots, \mathbf{y}_{T}, \boldsymbol{z}}} \mid
\mathbf{y}_{0})}
{A(\boldsymbol{z})}\right\}A(\boldsymbol{z}). \\
= & \mathrm{E}_{A}\left\{\ln {\Pr({{\mathbf{y}_{1}, \ldots, \mathbf{y}_{T}, \boldsymbol{z}}} \mid
\mathbf{y}_{0})}\right\} - \mathrm{E}_{A}\left\{\ln A(\boldsymbol{z})\right\}.
\end{split}
\end{equation}

Some choices of $A(\boldsymbol{z})$ give rise to better lower bounds than others. The difference between the log-likelihood and the lower bound is equal to the Kullback-Leibler divergence from $A(\boldsymbol{z})$ to $\Pr(\boldsymbol{Z} = \boldsymbol{z} \mid \mathbf{y}_{T}, \ldots, \mathbf{y}_{0})$, since
\begin{equation*}
\ln \Pr({{\mathbf{y}_{1}, \ldots, \mathbf{y}_{T}}} \mid \mathbf{y}_{0}) - \sum_{\boldsymbol{z} \in \mathcal{Z}}\left\{\ln \frac{\Pr({{\mathbf{y}_{1}, \ldots, \mathbf{y}_{T}, \boldsymbol{z}}} \mid
\mathbf{y}_{0})}{A(\boldsymbol{z})}\right\}A(\boldsymbol{z}) = \sum_{\boldsymbol{z} \in \mathcal{Z}}\left\{\ln \frac{A(\boldsymbol{z})}{\Pr(\boldsymbol{Z} = \boldsymbol{z} \mid \mathbf{y}_{T}, \ldots, \mathbf{y}_{0})}\right\}A(\boldsymbol{z}).
\end{equation*}

Hence, we would obtain the best lower bound, yielding equality in \eqref{jensens}, when $A(\boldsymbol{z}) = \Pr(\boldsymbol{Z} = \boldsymbol{z} \mid \mathbf{y}_{T}, \ldots, \mathbf{y}_{0})$, which reduces the Kullback-Leibler divergence to zero. However, this $A(\boldsymbol{z})$ is computationally intractable since it cannot be
further factored over nodes.

To achieve tractability, we constrain $A(\boldsymbol{z})$ to the mean-field variational family where the $\boldsymbol{Z}_{i}$ are mutually independent, i.e.,
$$
A(\boldsymbol{z}) = \Pr(\boldsymbol{Z} = \boldsymbol{z}) = \prod_{i=1}^{n}\Pr(\boldsymbol{Z}_{i} = \boldsymbol{z}_{i}).
$$
To allow for achieving the optimal such $A(\boldsymbol{z})$ in terms of Kullback-Leibler divergence, we
maximize the flexibility of our model by specifying that each $\boldsymbol{Z}_{i}$ has
its own multinomial parameter vector.  That is, we assume that 
$\Pr(\boldsymbol{Z}_{i} = \boldsymbol{z}_{i})$ is $\mbox{Multinomial}(1; \gamma_{i1}, \ldots, \gamma_{iK})$ for $i=1,\ldots,n$.  Therefore, $\boldsymbol{\Gamma} = (\boldsymbol{\gamma}_{1}, \ldots, \boldsymbol{\gamma}_{n})$ is the variational parameter.

With $A(\boldsymbol{z}) = \Pr(\boldsymbol{Z} = \boldsymbol{z})$, we obtain the following explicit lower bound of the log-likelihood:
\begin{equation*}
\begin{split}
\mbox{LB}(\boldsymbol{\pi}, \boldsymbol{\theta}; \boldsymbol{\Gamma}) = & \mathrm{E}_{\boldsymbol{\Gamma}}\left\{\ln \Pr({{\mathbf{y}_{1}, \ldots, \mathbf{y}_{T}, \boldsymbol{z}}} \mid
\mathbf{y}_{0})\right\} - \mathrm{E}_{\boldsymbol{\Gamma}}\left\{\ln \Pr(\boldsymbol{Z} = \boldsymbol{z})\right\} \\
= & \mathrm{E}_{\boldsymbol{\Gamma}}\left\{\ln \Pr({{\mathbf{y}_{1}, \ldots, \mathbf{y}_{T}}} \mid \mathbf{y}_{0}, \boldsymbol{z}) + \ln \Pr(\boldsymbol{Z} = \boldsymbol{z} \mid \mathbf{y}_{0})\right\} - \mathrm{E}_{\boldsymbol{\Gamma}}\left\{\ln \Pr(\boldsymbol{Z} = \boldsymbol{z})\right\} \\
= & \mathrm{E}_{\boldsymbol{\Gamma}}\left\{\ln \prod_{t=1}^{T}\Pr(\mathbf{Y}_{t} = \mathbf{y}_{t} \mid \mathbf{y}_{0}, \boldsymbol{z})\right\} + \mathrm{E}_{\boldsymbol{\Gamma}}\left\{\ln \Pr(\boldsymbol{Z} = \boldsymbol{z} \mid \mathbf{y}_{0}) - \ln \Pr(\boldsymbol{Z} = \boldsymbol{z})\right\} \\
= & \sum_{t=1}^{T}\sum_{i<j}^{n}\sum_{k=1}^{K}\sum_{l=1}^{K}\gamma_{ik}\gamma_{jl}
\ln \Pr(Y_{t,ij} = y_{t,ij} \mid y_{t-1,ij}, Z_{ik} = Z_{jl}  = 1) + \sum_{i=1}^{n}\sum_{k=1}^{K}\gamma_{ik}(\ln \pi_{k} - \ln \gamma_{ik}).
\end{split}
\end{equation*}


\subsection{Constructing a surrogate function}
\label{sec:surrogate}

To construct the surrogate function 
$Q(\boldsymbol{\pi}^{(\tau)}, \boldsymbol{\theta}^{(\tau)},
\boldsymbol{\Gamma}^{(\tau)}; \boldsymbol{\Gamma})$
of equation (10), which satisfies equations (11) and (12), 
we separate the lower bound of the log-likelihood,
$\mbox{LB}(\boldsymbol{\pi}^{(\tau)}, \boldsymbol{\theta}^{(\tau)}; \boldsymbol{\Gamma})$, into two parts,
$$
\sum_{t=1}^{T}\sum_{i<j}^{n}\sum_{k=1}^{K}\sum_{l=1}^{K}\gamma_{ik}\gamma_{jl}
\ln \Pr(Y_{t,ij} = y_{t,ij} \mid y_{t-1,ij},  Z_{ik} = Z_{jl}  = 1)
$$ and
$$
\sum_{i=1}^{n}\sum_{k=1}^{K}\gamma_{ik}(\ln \pi_{k}^{(\tau)} - \ln \gamma_{ik}).
$$
For the first part, since $\ln \Pr(Y_{t,ij} = y_{t,ij} \mid y_{t-1,ij}, Z_{ik} = Z_{jl}  = 1) < 0$,
the arithmetic-geometric mean inequality
$A^2 + B^2 \ge 2AB$ implies that
\begin{equation*}
\left(\gamma_{ik}^{2} \frac{\gamma_{jl}^{(\tau)}}{2\gamma_{ik}^{(\tau)}} + \gamma_{jl}^{2}
\frac{\gamma_{ik}^{(\tau)}}{2\gamma_{jl}^{(\tau)}}\right)\ln \Pr
(Y_{t,ij} = y_{t,ij} \mid y_{t-1,ij}, Z_{ik} = Z_{jl}  = 1) \leq \gamma_{ik}\gamma_{jl} \ln \Pr(Y_{t,ij} = y_{t,ij} \mid y_{t-1,ij}, Z_{ik} = Z_{jl}  = 1).
\end{equation*}
Hence, the first part of our surrogate function is written as
$$
\sum_{t=1}^{T}\sum_{i<j}^{n}\sum_{k=1}^{K}\sum_{l=1}^{K}\left(\gamma_{ik}^{2}\frac{\gamma_{jl}^{(\tau)}}
{2\gamma_{ik}^{(\tau)}} + \gamma_{jl}^{2}\frac{\gamma_{ik}^{(\tau)}}{2\gamma_{jl}^{(\tau)}}\right)\ln
\Pr(Y_{t,ij} = y_{t,ij} \mid y_{t-1,ij}, Z_{ik} = Z_{jl}  = 1).
$$
For the second part, the concavity of the logarithm function means that its graph is bounded above by
any tangent line, giving the inequality
\begin{equation*}
-\log\gamma_{ik} \geq -\log\gamma_{ik}^{(\tau)} - \frac{\gamma_{ik}}{\gamma_{ik}^{(\tau)}} + 1 .
\end{equation*}
Therefore, the second part of our surrogate function is written as
$$
\sum_{i=1}^{n}\sum_{k=1}^{K}\gamma_{ik}\left(\log \pi_{k}^{(\tau)}  -\log\gamma_{ik}^{(\tau)} -
\frac{\gamma_{ik}}{\gamma_{ik}^{(\tau)}} + 1\right).
$$
Combining these two parts, we have the surrogate function $Q(\boldsymbol{\pi}^{(\tau)}, \boldsymbol{\theta}^{(\tau)},
\boldsymbol{\Gamma}^{(\tau)}; \boldsymbol{\Gamma})$, which equals
\begin{equation*}
\sum_{t=1}^{T}\sum_{i<j}^{n}\sum_{k=1}^{K}\sum_{l=1}^{K}\left(\gamma_{ik}^{2}\frac{\gamma_{jl}^{(\tau)}}
{2\gamma_{ik}^{(\tau)}} + \gamma_{jl}^{2}\frac{\gamma_{ik}^{(\tau)}}{2\gamma_{jl}^{(\tau)}}\right)
\ln \Pr(Y_{t,ij} = y_{t,ij} \mid y_{t-1,ij}, Z_{ik} = Z_{jl}  = 1) + \sum_{i=1}^{n}\sum_{k=1}^{K}\gamma_{ik}\left(\log \pi_{k}^{(\tau)} - \log \gamma_{ik}^{(\tau)} -
\frac{\gamma_{ik}}{\gamma_{ik}^{(\tau)}} + 1 \right).
\end{equation*}

\newpage

\section{A simulation study with unbalanced clusters}

We provide an additional simulation study to check the performance of our proposed algorithm in an unbalanced clusters setting, called Model 7, in which the mixing parameters are unequal
but all other parameters are the same as in Model 1.

\begin{table*}[!htpb]\centering
%\ra{1.3}
\caption{Parameter values for a model with unequal mixing proportions.}\label{table000}
\begin{tabular}{@{}ccccc@{}}
\toprule
& \multicolumn{3}{c}{Model 7} & \\
\cmidrule{2-4}
& $\text{G}_{1}$ & & $\text{G}_{2}$ & \\
\midrule
Mixing proportion $\pi_k$ & 0.2 & & 0.8 & \\
Stability parameter $\theta^s_k$ & -0.5 & & 0.5 & \\
Initial network density parameter $\theta^d_k$ & -0.5 & & 0.5 & \\
\bottomrule
\end{tabular}
\end{table*}

We check the performance of our criterion functions in choosing the correct number of groups. As shown in Table 2, both CL-BIC and modified ICL perform well. Next, we assess the clustering performance. The average value of RI and NMI results are reported in Table 3.

\begin{table*}[!htpb]\centering
%\ra{1.3}
\caption{Frequencies of $\min\mbox{CL-BIC}$ and $\max\mbox{ICL}$ over 100 repetitions.
$K_{0}$ represents the true number of groups.}\label{table111}
\begin{tabular}{@{}cccccc@{}}
\toprule
& \multicolumn{4}{c}{Model 7 $(K_{0}=2)$} & \\
\cmidrule{2-5}
& $K=1$ & $K=2$ & $K=3$ & $K=4$ & \\
\midrule
$\min\mbox{CL-BIC}$ & 0 & 98 & 0 & 2 &  \\
$\max\mbox{ICL}$ & 0 & 100 & 0 & 0 & \\
\bottomrule
\end{tabular}
\end{table*}



\begin{table*}[!htpb]\centering
%\ra{1.3}
\caption{Mean values of Rand Index (RI) and Normalized Mutual Information (NMI) for 100 repetitions for various models and values of $K$,
with sample standard deviations in parentheses, where $K_0$ is the true number of groups.}\label{table222}
\begin{tabular}{@{}cccc@{}}
\toprule
\multicolumn{4}{c}{Model 7 $(K_{0}=2)$} \\
\cmidrule{2-4}
& $K=2$ & $K=3$ & $K=4$ \\
\midrule
RI & 1.000 (0.000) & 0.686 (0.033) & 0.586 (0.053) \\
NMI & 1.000 (0.000) & 0.479 (0.040) & 0.373 (0.046) \\
\bottomrule
\end{tabular}
\end{table*}

Finally, Table 4 summarizes estimation performance of our algorithm. The results of Tables 2 through 4 together tell us that our algorithm performs convincingly on this test case.

\begin{table*}[!htpb]\centering
%\ra{1.3}
\caption{Average values of $\ell^{2}$ norm loss for estimated mixing proportions and network parameters over 100 repetitions
with standard deviations shown in parentheses. $K_{0}$ represents the true number of groups.}\label{table333}
\begin{tabular}{@{}ccc@{}}
\toprule
\multicolumn{3}{c}{Model 7 $(K_{0}=2)$} \\
\cmidrule{1-3}
$\mbox{RSE}_{\boldsymbol{\pi}}$ & & $\mbox{RSE}_{\boldsymbol{\theta}^{s}}$ \\
\midrule
0.045 (0.032) & & 0.020 (0.013) \\
\bottomrule
\end{tabular}
\end{table*}




\end{document} 