Here are a few pictures from some Mid-War demo games played during the weekend, we had 2 aspiring FoW gamers checking out the game. And it was also a great opportunity for both me and David to try out each of our 500pts of painted Germans. I really love the way he has done them sitting around in their foxholes. Looks super cool (and he does not have to paint more than 50% of each model either haha). Anyway, me and David joined forces against a US army that ended up defending. 1000 points per side. In another room there was a horde of Soviets fighting Germans.
Our little North Afrika game went south pretty fast - and I think it was very good to try out my new units before the escalation campaign starts in two weeks to get familiar with the German rules and new ratings. For instance I completely forgot that I had Rate of Fire 3 with all my Panzer III tanks (after all I had made sure to buy models with RoF 3 only while picking units in EasyArmy). I also reluctantly used "Stormtrooper" a few times, I still think that the rule is rather odd. I ended up going back and forth with my tanks - I should however blame some of the casualties on my German partner since David said 'those Bazookas only fire 4"/10cm'. They fired a bit further, managing to blow up 2 Panzer III over 2 turns while I was tactically outwitted by dug in infantry hiding in the nearby treeline.
The ebb and flow of our battle was also quite funny, the Germans managed to pin down the Americans and David charged head on with his German paratroopers only to lose 3 teams and had to fall back. The following turn David manage to inflict something like 5 casualties to dug in infantry but is 1 team away from forcing the enemy platoon to take a platoon morale check. Enemy Bazookas kept missing tanks in the open but always hitting tanks in concealment, and enemy artillery also managed to knock out 1 Pz III. We also had an enemy sniper kill 1 of our Paratrooper mortar teams. I also think that both me and David suffered from the mandatory "new painted stuff must die" LOL.
All in all I think the game summarized FoW perfectly and showed both infantry, tank and artillery rules in a good way. Hopefully this will attract a few more gamers to the FoW crowd here in Southern Sweden.
Also received an SMS from Patrik this evening, telling me he is getting into By Fire and Sword by the end of the month. I replied that it served him right for having lured me into Mid-War gaming against my better judgment haha. There are so many events and varied stuff going on at the moment, I really think that the spring and summer will be great for wargaming.
Wait...you don't use Stormtrooper every chance you get?
It's the definitive rule of the Axis forces in Flames of War.
The cost of that rule is built into every unit available to them. It's the primary reason why German forces are more compact than any other in the game.
Heck, you can bet I'll be packing Van Saucken into every Grey Wolf list I can....I fail Stormtrooper rolls like nobody's business.
Do your allied opponents feel bad about using stabilizers, time on target, tally-ho, or the horrific new Seek, Strike, Destroy on your Axis army?
I just think it is such a cartoony and ahistorical rule. There are many others in the game, but this one stands out the most to me. It is also a contrast to national/special rules found in games like By Fire and Sword where the national special rules are grounded in historical facts, actual tactics or have a somewhat better understanding of the national character of each force.
Imo, the better German rule in FoW is "Mission tactics".
Now pretty much every single German unit across the board can stormtrooper - no matter which period of the war it takes place or what kind of organization it belongs to.
I can't agree with this, it stands out as "silly/stupid" to me. I would not worry about "points balance" and the Stormtrooper rule being paid for because the points as I see it are more invested in Veteran rating and Mission tactics more than anything.
Discussions among fellow gamers about Stormtrooper have brought up interesting tactical perceptions. Such as Early War Germans should be able to use it - to move forwards. While Late War Germans should use it to move backwards (firing and then withdrawing to the next position).
I use the rule, but do so reluctantly. The idea behind it is good but the execution in the rules is bad imo.


Mahalo to all participating teams and clubs for a successful power league season. We are looking forward to the future as the league continues to provide a venue for our Aloha Region teams to play high level competitive matches and to improve as the season progresses.
We want to wish you the best of luck as your teams continue on their play this USAV season. For those of you going on to represent our Aloha Region on the continent in tournaments, play hard and continue to show everyone our region can compete on the national scale.


By Amid Amidi | 09/16/2018 11:50 pm | Be the First to Comment!
The cult U.K.-produced webseries Don't Hug Me I'm Scared, a surrealist and often disturbing takeoff on children's series, is being developed as a television show by Blink Industries, the company that produced the original shorts, and Conan O'Brien's production company Conaco. Turner's Super Deluxe will produce the series.
The mixed-media series is being developed by Don't Hug Me I'm Scared's creators, Becky Sloan and Joseph Pelling, and Baker Terry, who helped write the shorts.
According to a report on CNET, a spec pilot for the new series has already been made and is being shopped around to both streaming and cable networks.
This wouldn't be the first time that Conaco has turned a webseries IP into a mainstream production. O'Brien's production company also developed Olan Rogers' Gary Space webseries into the series Final Space, which launched earlier this year on TBS in the United States and Netflix internationally.


Join us for a special Mother's Day Brunch, scheduled for 9:30 a.m. to 2 p.m., on Sunday, May 12, in the O'Shaughnessy Dining Room, located at Providence Spirituality & Conference Center. Take the opportunity to enjoy the extended menu, featuring all-time favorites such as shrimp cocktail, carved prime rib, raspberry pork loin, side dishes, homemade desserts and much more.
Cost is $24 for adults, $22 for seniors 55-older, military personnel, special emergency personnel (police, firefighters and emergency medical technicians) and teachers, and $13 for children ages 5-11. Children ages 4-under will be admitted free, and all the prices include tax, beverages and desserts.
Reservations are not required. Two specific seating times are available, including 9:30 a.m. to 11:30 a.m., and noon to 2 p.m. Guests may purchase tickets online here or in person. A limited number of tickets will be available for purchase online for each setting time.
Walk-ins will also be welcome. For more information, call 812-235-4531.


Speaking for myself of course.
but for me, there is always this sever, a departure, a farewell and goodbye.
Piece by piece, I die away, and yet, there it is, more life, the next day.
So there you have it, a look inside.
Now I can go back to hide.


Crews in Southern California tamed some of the wildfires burning across San Diego County, thanks to cooler temperatures and calmer winds Friday. But the blazes still posed threats to residents and structures.
A 57-year-old man pleaded not guilty to an arson charge that accuses him of having tried to add fuel to one of the fires and was held on $75,000 bail, authorities said Friday.
The man, identified as Alberto Serrato, was seen adding brush to a fire in the San Luis River bed, San Diego County District Attorney Bonnie Dumanis said at a news conference. If convicted, Serrato could face seven years in prison.
On Thursday, two people were arrested in the Escondido area on suspicion of attempted arson. Isaiah David Silver, 19, was held on $50,000 bail; details about the second person were withheld because, at age 17, he or she is a juvenile.
The newest fire, one of three in the area around Marine Corps' Camp Pendleton, forced new evacuations Friday as it grew to 800 acres.
A second fire nearby grew on Friday to more than 15,000 acres but was 40 percent contained, according to the base.
In all, three sections within the vast base were evacuated — camps Las Flores, Pulgas and Margarita — a spokeswoman told NBC News. A firefighter working to expel the flames was hospitalized for heat exhaustion as the blazes left charred hillsides, homes and vehicles in their wake.
The injured firefighter was from Camp Pendleton, a major Marine base in San Diego County roughly the size of Rhode Island, officials said.
He received treatment for heat exhaustion, but no further details were released about his condition or identity.
A third fire on the base — dubbed the Tomahawk fire — was 65 percent contained Friday evening and had burned more than 6,500 acres, the base reported.
All non-essential personnel on the base were sent home at noon, according to the camp's public affairs office.
On Thursday, the fires claimed their first known victim when a badly burned body was found in a transient encampment near Carlsbad, according to local officials.
Some of the fires rampaging through the region had showed signs of abating early Thursday, before the Cocos fire showed "explosive growth" in the San Marcos area and headed toward the city of Escondido, said Capt. Mike Mohler of the California Department of Forestry and Fire Protection, or Cal Fire.
Explosions could be heard when a number of buildings were engulfed in flames and black plumes of smoke filled the sky, as the fire ate up hillsides and destroyed eucalyptus trees. Visibility was reduced to a few feet in the worst-affected parts.
The blaze, dubbed the Cocos fire, was 30 percent contained Friday afternoon, and some residents in the San Marcos area were allowed back into their homes, San Marcos officials said. Meanwhile, residents in at least five neighborhoods were warned not to return to their houses.
"Please evacuate," San Diego County Sheriff Bill Gore urged residents. "There will be no vandalism. We want you to return safely and not get hurt in these fires."
"The grass out there is nothing but kindling for these fires," Gore said.
By Friday evening, the Cocos fire had scorched about 2,520 acres and was burning close to Cal State University-San Marcos, according to NBC San Diego. The college evacuated Wednesday and remained closed Friday, according to the school's website.
Twenty homes have been destroyed in that fire, along with an 18-unit apartment building and two commercial buildings. Another apartment building suffered considerable damage, San Diego County said in a damage assessment.
Also the Harmony Grove spiritualist retreat, a century-old spiritual center west of Escondido lost more than half of its buildings, NBC San Diego reported.
The first fire that flared in the area was ruled an accident Friday, Cal Fire spokeswoman Lynne Tolmachoff said. That blaze in Rancho Bernardo was caused by sparks from faulty construction equipment, she said.
The cause of 10 other fires that started in the region between Tuesday and Thursday has not yet been determined, and the outbreak has caused officials to question whether some were triggered deliberately. The true extent of the damage will not be known for days.
Santa Ana winds and unseasonably high temperatures have contributed to the devastation as mercury readings rose above 100 degrees this week.
Some cooling and higher humidity was expected on Saturday and Sunday, according to the National Weather Service. But the area was to remain under a red flag warning until midnight Friday, the weather service said.
Tens of thousands of people have fled their homes north of San Diego, schools have been closed, graduation ceremonies have been canceled and amusement parks, including Legoland, have been shuttered.


text:
\section{Introduction}\label{sec:intro}
In 1953, Shannon~\cite{shannon1953lattice} proposed the problem of structural information quantification to analyze communication systems.
Since then, many information metrics of graph structures~\cite{rashevsky1955life-c1, trucco1956note-c2, mowshowitz1967entropy, korner1973coding-c7} were presented based on the Shannon entropy of random variables.
In recent years, Li et al.~\cite{structural-entropy, li2022principles} proposed an encoding-tree-based graph structural information metric, namely \textit{structural entropy}, to discover the natural hierarchical structure, which preserves the rules and regulations embedded in a graph.
The structural entropy has been used extensively in the fields of biological data mining~\cite{Hi-C, zhang2021supertad}, information security~\cite{REM, li2017resistance}, and graph neural networks~\cite{dim-estimation, xu2022pooling}, etc.

The structural entropy~\cite{structural-entropy} computation consists of three steps, encoding tree construction, node structural entropy calculation, and total structural entropy calculation.
Firstly, the graph node set is hierarchically divided into several communities (shown in Fig. \ref{intro2in1}(a)) to construct a partitioning tree, namely an encoding tree (shown in Fig. \ref{intro2in1}(b)).
Secondly, the volume and cut edge number of each community are counted to compute the structural entropy of each non-root node in the encoding tree.
Finally, the structural entropy of the whole graph is calculated by summing up the node structural entropy.
In addition, the minimized structural entropy, namely \textit{the graph structural entropy}, corresponds to the optimal encoding tree, which reveals the hierarchical abstracting of the graph.

\begin{figure*}[ht]
\centering
\includegraphics[scale=0.54]{figures/Intro2in1.pdf}
\caption{
a) A graph containing three communities A, B, and C, where A is divided into two sub-communities A.1 and A.2.
b) An encoding tree of the left graph.
Each leaf node corresponds to a single graph node.
Each branch node corresponds to a community.
The root node corresponds to the graph node set.
c) The dynamic adjustment examples of one- and two-dimensional encoding trees.
The original graph is changed into the updated graph by inserting a red edge and a red node.
The one-dimensional encoding tree is adjusted by inserting a red leaf node as an immediate successor of the root. The red leaf node corresponds to the new red graph node.
The two-dimensional encoding tree is adjusted by inserting a red leaf node as an immediate successor of the blue branch node corresponding to the community where the red graph node's neighbor is located.
}
\label{intro2in1}
\end{figure*}

In dynamic scenarios, a graph evolves from the original state to many updated states during time series~\cite{harary1997dynamic}.
To better measure the temporal complexity of the dynamic graph, we need to efficiently compute the updated structural entropy at any given time.
Unfortunately, the current structural entropy methods~\cite{structural-entropy, li2022principles} do not support efficient incremental computation.
That is, the encoding tree needs to be reconstructed for every updated graph, which leads to enormous time consumption.
To address this issue, we propose two dynamic adjustment strategies for one- and two-dimensional encoding trees.
For one-dimensional cases, when new graph nodes come, we adjust the encoding tree by incrementally setting an equal number of corresponding leaf nodes as the immediate successors of the root node.
For two-dimensional encoding trees, we give two adjustment rules: 1) new edges do not change the encoding tree's structure, and 2) new nodes are assigned to their neighbors' communities.
Adjustment examples of one- and two-dimensional encoding trees are shown in Fig.~\ref{intro2in1}(c).

To efficiently measure the structural entropy of the updated graph, we present two metrics named \textit{Global Invariant} and \textit{Local Difference}.
The Global Invariant is an approximation of the updated structural entropy, whose computational complexity is $O(1)$.
The Local Difference is defined as the approximation error (i.e., the absolute error between the updated structural entropy and the approximate value), which is determined by the adjustment strategies.
Its computational complexity is $O(n)$, where $n$ denotes the incremental size.
We give the upper bound and the lower bound of the Local Difference and further prove that the Local Difference and its first-order absolute moment converge to $0$ in order of $O(\frac{\log m}{m})$, where $m$ denotes the total edge number of the original graph.

To implement the above ideas, we design efficient incremental algorithms, namely \textbf{Incre-1dSE} and \textbf{Incre-2dSE}, for measuring one- and two-dimensional updated structural entropy.
The algorithms consist of two parts, \textit{the initialization stage} and \textit{the measurement stage}.
The initialization executes only once for the same original graph.
In this stage, graph properties at different levels, namely \textit{Structural Data}, like node degree, community volume and cut edge number, and graph edge number, are recorded from the original graph and the original encoding tree.
In addition, the \textit{Structural Expressions} composed of the Structural Data are computed for future calculation of the Global Invariant.
During the measurement stage, we extract each level's \textit{Incremental Data}, like incremental size, degree incremental, and volume and cut edge incremental, from the incremental sequence, which converts the original graph into the updated graph.
At the end of this stage, we calculate the Global Invariant and Local Difference, respectively, and then sum them up to obtain the updated structural entropy.
Furthermore, we implement one- and two-dimensional \textbf{R}ecalculate-\textbf{F}rom-\textbf{S}cratch algorithms, namely \textbf{1d-RFS} and \textbf{2d-RFS}, as baselines which compute the updated structural entropy by reconstructing the encoding trees.

We conduct extensive experiments on dynamic graph datasets generated by \textit{Hawkes Process}, \textit{Triad Closure Process} and \textit{Partitioning-based Process}.
Every dynamic graph includes one original graph and $20$ updated graphs, and the encoding tree of the original graph is given.
We evaluate the time consumption difference and the error between our algorithms and the baselines.
Comprehensive experimental results show that our incremental algorithms reduce the time computation, and up to $3$ times speedup for one-dimensional cases and at least $11$ times for two-dimensional cases are achieved on average while maintaining relative errors within $2\%$.
In addition, we perform statistical experiments to verify the convergence of the first-order absolute moment of the Local Difference.
The source code and data of this work are publicly available at \url{https://github.com/yangrunze1013/Incre-SE}.

The main contributions of this paper are as follows:
\begin{itemize}[leftmargin=0pt, itemindent=3.1ex]
\item A novel incremental structural entropy measurement method for dynamic graphs is proposed, which significantly reduces the time consumption.
\item A set of dynamical adjustment strategies are presented for incrementally changing one- and two-dimensional encoding trees, avoiding the reconstruction of the encoding trees. Efficient incremental algorithms, \textit{Incre-1dSE} and \textit{Incre-2dSE}, are designed to implement the adjustment strategies.
\item Two new metrics, Global Invariant and Local Difference, are proposed to measure the approximate updated structural entropy in the time complexity of $O(1)$ and the approximation error in $O(n)$, respectively.
\item Solid theoretic proofs guarantee the boundedness of the Local Difference and the convergence when the original graph is infinitely large.
Further, we also prove the convergence of the first-order absolute moment of the Local Difference.
\item Extensive experiments on dynamic graph datasets generated by Hawkes Process, Triad Closure Process, and Partitioning-based Process convincingly confirm the efficiency and the correctness of our method.
\end{itemize}

The article is structured as follows:
Section~\ref{sec:problem} outlines the problem formulation and notations.
Section~\ref{sec:metrics} and~\ref{sec:strategies} describe the metrics and adjustment strategy, respectively.
The algorithms are detailed in Section~\ref{sec:algo}, and the experiments are discussed in Section~\ref{sec:eval}.
Section~\ref{sec:relatedworks} presents the related works before concluding the paper in section~\ref{sec:conc}.

\section{Problem Formulation and Notations}\label{sec:problem}
In this section, we summarize the notations in Table \ref{notations}, and formalize the definition of \textit{Incremental Sequence}, \textit{Dynamic Graph}, \textit{Encoding Tree}, and \textit{Structural Entropy} as follows.
Finally, we give the problem definition of \textit{Measuring the Structural Entropy of a Dynamic Graph}.

\begin{definition}[Incremental Sequence]
An incremental sequence is an ordered set of incremental edges which can be written as $\xi = \{(v_1,u_1) \rightarrow (v_2,u_2) \rightarrow ... \rightarrow (v_n,u_n) \}$, where $(v_i,u_i)$ denotes the $i$-th incremental edge $e_i$.
The number of the incremental edges $n$ is named the incremental size.
Given $\xi_1 = \{e_1 \rightarrow e_2 \rightarrow ... \rightarrow e_n \}$ and $\xi_2 = \{e_{n+1} \rightarrow e_{n+2} \rightarrow ... \rightarrow e_m \}$, we define the operation ``$\Rightarrow$ " as  $\xi_1 \Rightarrow \xi_2 = \{e_1 \rightarrow e_2 \rightarrow ... \rightarrow e_m \}$.
\label{incre-seq}
\end{definition}

\begin{definition}[Dynamic Graph]
In this work, a dynamic graph $\mathcal{G} = \{ G_0, G_1, ... , G_T\}$ is defined as a series of snapshots of a temporal, undirected, unweighted, and connected graph.
$G_0=(\mathcal{V}_0,\mathcal{E}_0)$ denotes the original graph, and $G_t=(\mathcal{V}_t,\mathcal{E}_t)$ denotes the updated graph at time $t$ $(1 \le t \le T)$.
To describe the temporal dynamic graph, we suppose that an incremental sequence $\xi_t$ arrives at each non-zero time $t$.
The updated graph $G_t$ is generated by orderly combining all new edges and nodes introduced by $\xi_t$ into $G_{t-1}$, i.e., $G_t := \text{CMB}(G_{t-1} , \xi_t)$.
We further define the cumulative incremental sequence at time $t$ as $\xi_{1\rightarrow t}= \xi_{1} \Rightarrow \xi_{2} \Rightarrow ... \Rightarrow \xi_{t}$, and then we have $G_t := \text{CMB}(G_{0} , \xi_{1 \rightarrow t})$.
We define $\chi(\xi)$ as the set of nodes that appeared in an incremental sequence $\xi$.
To ensure graph connectivity and no multiple edges at any time, a legal incremental sequence $\xi_t$ should satisfy:
$\forall (v_i,u_i)\in \xi_t$, $v_i \text{ or } u_i \in \mathcal{V}_{t-1} \cup \chi(\xi_t[:i-1])$, and $(v_i,u_i)\notin \mathcal{E}_{t-1}\cup \xi_t[:i-1]$, where $\xi_t[:i-1]$ denotes the first $i-1$ edges of $\xi_t$.
\label{dynam-graph}
\end{definition}

\begin{definition}[Encoding Tree]
The concept of the encoding tree is the same as ``the Partitioning Tree" proposed in the previous work~\cite{structural-entropy}.
The encoding tree $\mathcal{T}$ of a graph $G=(\mathcal{V}, \mathcal{E})$ is an undirected tree that satisfies the following properties:
\begin{enumerate}
\item The root node $\lambda$ in $\mathcal{T}$ has a label $T_\lambda=\mathcal{V}$.
\item Each non-root node $\alpha$ in $\mathcal{T}$ has a label $T_{\alpha} \subset \mathcal{V}$.
\item For each node $\alpha$ in $\mathcal{T}$, if $\beta_{1}, \beta_{2}, \ldots, \beta_{k}$ are all immediate successors of $\alpha$, then $T_{\beta_{1}}, \ldots, T_{\beta_{k}}$ is a partitioning of $T_{\alpha}$.
\item The label of each leaf node $\gamma$ is a single node set, i.e., $T_{\gamma}=\{v\}$.
\item For a node $\alpha$ in $\mathcal{T}$, its height is denoted as $h(\alpha)$.
Let $h(\lambda)=0$ and $h(\alpha)=h\left(\alpha^{-}\right)+1$, where $\alpha^{-}$ is the parent of $\alpha$.
The height of the encoding tree $h(\mathcal{T})$, namely the dimension, is equal to the maximum of $h(\gamma)$.
\end{enumerate}
\end{definition}

\begin{definition}[Structural Entropy]
The structural entropy~\cite{structural-entropy} is defined by Li et al.
We follow this work and state the definition below.
Given an undirected, unweighted, and connected graph $ G = (\mathcal{V},\mathcal{E}) $ and its encoding tree $ \mathcal{T} $, the structural entropy of $ G $ by $ \mathcal{T} $ is defined as:
\begin{equation}
H^{\mathcal{T}}(G)=\sum_{\alpha \in \mathcal{T}, \alpha \neq \lambda} -\frac{g_{\alpha}}{2 m} \log \frac{V_{\alpha}}{V_{\alpha^-}},
\end{equation}
where $m$ is the total edge number of $G$; $g_{\alpha}$ is the cut edge number of $T_{\alpha}$, i.e., the number of edges between nodes in and not in $T_{\alpha}$; $V_{\alpha}$ is the volume of $T_{\alpha}$, i.e., the sum of the degrees of all nodes in $T_{\alpha}$; $\log(\cdot)$ denotes logarithm with a base of 2.
We name $H^{\mathcal{T}}(G)$ as the $K$-dimensional structural entropy if $\mathcal{T}$' height is $K$.

The graph structural entropy of $G$ is defined as
\begin{equation}
H(G)=\min _{\mathcal{T}}\left\{H^{\mathcal{T}}(G)\right\},
\end{equation}
where $\mathcal{T}$ ranges over all possible encoding trees.

If the height of $\mathcal{T}$ is restricted to $K$, the $K$-dimensional graph structural entropy of $G$ is defined as
\begin{equation}
H^K(G)=\min _{\mathcal{T}}\left\{H^{\mathcal{T}}(G)\right\},
\end{equation}
where $\mathcal{T}$ ranges over all the possible encoding trees of height $K$.
The encoding tree corresponding to $H^K(G)$, which minimizes the $K$-dimensional structural entropy, is named the optimal $K$-dimensional encoding tree.
\end{definition}

\begin{definition}[Measuring the Structural Entropy of a Dynamic Graph]
Measuring the structural entropy of a dynamic graph $\mathcal{G}$ means given the original graph $G_0$ and its $K$-dimensional encoding tree $\mathcal{T}_0$, finding a $K$-dimensional encoding tree $\mathcal{T}_t$ of the updated graph $G_t$ and calculating the updated $K$-dimensional structural entropy $H^{\mathcal{T}_t}(G_t)$.
The encoding tree $\mathcal{T}_t$ should minimize $H^{\mathcal{T}_t}(G_t)$ as closer to $H^K(G_t)$ as possible.
\end{definition}

\begin{table}[]
\centering
\caption{Glossary of Notations.}
\begin{tabular}{@{}l|l@{}}
\toprule
\textbf{Notation} & \textbf{Description}                    \\ \midrule
$G$         & Graph       \\
$\mathcal{V}; \mathcal{E}$ & Node set; Edge set \\
$v; e$            & Node; Edge                              \\
$d_i$               & Node degree of node $v_i$               \\
$m$               & The total edge number of $G$\\ \midrule
$\mathcal{T}$               & Encoding tree                         \\
$\lambda$          & The root node of an encoding tree \\
$\alpha$          & The non-root node in an encoding tree\\
$A$          & The set of 1-height nodes in an encoding tree\\
$T_\alpha$        & The label of $\alpha$, i.e., the node community  \\
             & corresponding to $\alpha$\\
$V_\alpha$        & The volume of $T_\alpha$ \\
$g_\alpha$        & The cut edge number of $T_\alpha$\\ \midrule
$\mathcal{G}$          & Dynamic graph \\
$G_0$       & Original graph\\
$G_t$ & The updated graph at time $t$\\
$\xi_t$ & Incremental sequence at time $t$\\
$\xi_{1 \rightarrow t}$ & Cumulative incremental sequence at time $t$\\
$n$ & Incremental size\\
$\delta(v)$ & The degree incremental of $v$ \\
$\delta_V(\alpha)$ & The volume incremental of $T_\alpha$ \\
$\delta_g(\alpha)$ & The cut edge incremental of $T_\alpha$ \\
$\phi_\lambda$& The degree-changed node set \\
$\mathcal{A}$& The set of 1-height nodes in an encoding tree \\
& whose volume or cut edge number change \\ \midrule
$H^{\mathcal{T}}(G)$          & The structural entropy of $G$ by $\mathcal{T}$ \\
$H^\mathcal{T}_{GI}(G, n)$ & Global Invariant with incremental size $n$\\
$\Delta L$ & Local Difference, i.e., the approximation error\\
& between $H^\mathcal{T}(G)$ and $H^\mathcal{T}_{GI}(G, n)$\\\bottomrule
\end{tabular}
\label{notations}
\end{table}

\section{Metrics of Structural Information for Dynamic Graphs} \label{sec:metrics}
In this section, we propose two novel metrics, Global Invariant and Local Difference, to measure one- and two-dimensional updated structural entropy of dynamic graphs.
We first review the formulas of structural entropy and then give the definitions of the Global Invariant and the Local Difference for one- and two-dimensional cases, respectively.
Finally, we list some properties of the two metrics.

\subsection{One-Dimensional Global Invariant and Local Difference}
Given a graph $G$ and its one-dimensional encoding tree $\mathcal{T}$,
the one-dimensional structural entropy of $G$ by $\mathcal{T}$ is defined as
\begin{equation}
    H^\mathcal{T}(G)=\sum_{v_i \in \mathcal{V}}-\frac{d_i}{2m}\log\frac{d_i}{2m}.
\label{1dSE}
\end{equation}
Since the one-dimensional encoding tree $\mathcal{T}$ has one unified form (like the one-dimensional encoding tree shown in Fig. \ref{intro2in1}(c)), it must be optimal.
Therefore, $H^\mathcal{T}(G)$ is equal to the one-dimensional graph structural entropy $H^1(G)$.
Then, we give the definition of the one-dimensional Global Invariant and Local Difference based on Eq.~(\ref{1dSE}).
\begin{definition}[One-Dimensional Global Invariant and Local Difference]
Given an original graph $G$ and its one-dimensional encoding tree $\mathcal{T}$, the one-dimensional Global Invariant with incremental size $n$ is defined as
\begin{align}
H^\mathcal{T}_{GI}(G, n)=&\sum_{v_i \in \mathcal{V}}-\frac{d_i}{2(m+n)}\log\frac{d_i}{2(m+n)} \notag \\
=&-\frac{1}{2m+2n}(S_N+S_G),
\label{1dGI}
\end{align}
where

\begin{align}
S_N &= \sum_{v_i \in \mathcal{V}}d_i\log{d_i},\\
S_G &= -2m\log(2m+2n).
\end{align}
Given the updated graph $G'$, the updated one-dimensional encoding tree $\mathcal{T}'$, and the incremental size $n$, the one-dimensional Local Difference is defined as
\begin{equation}
\begin{aligned}
\Delta L_1 = H^{\mathcal{T}'}(G')-H^\mathcal{T}_{GI}(G, n).
\end{aligned}
\label{1dLD}
\end{equation}
\end{definition}

\subsection{Two-Dimensional Global Invariant and Local Difference}
Given a graph $G$ and its two-dimensional encoding tree $\mathcal{T}$, the two-dimensional structural entropy of $G$ by $\mathcal{T}$ is defined as
\begin{equation}
\begin{aligned}
H^\mathcal{T}(G)=\sum_{\alpha_i \in A}(-\frac{g_{\alpha_i}}{2m}\log\frac{V_{\alpha_i}}{2m}
+\sum_{v_j\in T_{\alpha_i}}-\frac{d_{j}}{2m}\log\frac{d_j}{V_{\alpha_i}}),
\end{aligned}
\label{2dSE}
\end{equation}
where $A$ denotes the set of 1-height nodes in $\mathcal{T}$, i.e., $A = \{\alpha \text{ in } \mathcal{T}| h(\alpha) = 1\}$.
In this paper, we only consider the two-dimensional encoding trees where the height of all leaf nodes is $2$.
According to Eq. (\ref{2dSE}), we give the definition of the two-dimensional Global Invariant and Local Difference as follows.
\begin{definition}[Two-Dimensional Global Invariant and Local Difference]
Given an original graph $G$ and its two-dimensional encoding tree $\mathcal{T}$, the two-dimensional Global Invariant with incremental size $n$ is defined as
\begin{align}
H_{GI}^\mathcal{T}(G,n) =& \sum_{\alpha_i \in A}(-\frac{g_{\alpha_i}}{2m+2n}\log\frac{V_{\alpha_i}}{2m+2n} \notag \\
&+ \sum_{v_j\in T_{\alpha_i}}-\frac{d_{j}}{2m+2n}\log\frac{d_j}{V_{\alpha_i}}) \notag \\
=&-\frac{1}{2m+2n}(S_N+S_C+S_G),
\label{2dGI}
\end{align}
where
\begin{align}
S_N &= \sum_{v_i \in \mathcal{V}}d_i\log{d_i},\\
S_C &= \sum_{\alpha_i \in A}(g_{\alpha_i}-V_{\alpha_i})\log V_{\alpha_i},\\
S_G &= -\sum_{\alpha_i \in A}g_{\alpha_i}\log(2m+2n).
\end{align}
Given the updated graph $G'$, the updated two-dimensional encoding tree $\mathcal{T}'$, and incremental size $n$, the two-dimensional Local Difference is defined as
\begin{equation}
\begin{aligned}
\Delta L_2 = H^{\mathcal{T}'}(G')-H^\mathcal{T}_{GI}(G, n).
\end{aligned}
\label{2dLD}
\end{equation}
\end{definition}

\subsection{Properties of the Metrics}
The properties of the two metrics are listed below.
On the one hand, the Global Invariant is an approximation of the updated structural entropy.
Given an original graph $G$ and its encoding tree $\mathcal{T}$, the Global Invariant $H^\mathcal{T}_{GI}(G, n)$ is only dependent on the incremental size $n$.
Hence, the computational complexity of the Global Invariant is only $O(1)$ after recording the original graph's information.
On the other hand, the Local Difference represents the gap between the updated structural entropy and the Global Invariant, which is determined by a specific incremental sequence.
For an incremental sequence with size $n$, the computational complexity of the Local Difference is $O(n)$ with our adjustment strategies (detailed in Section~\ref{sec:strategies}).

\section{Dynamic Adjustment Strategies and the Updated Structural Entropy}\label{sec:strategies}
In this section, we first present the dynamic adjustment strategies, and then analyze the upper bound and the lower bound of the Local Difference for one- and two-dimensional cases, respectively.
Second, we prove that the Local Difference converges to $0$ when the original graph is infinitely large.
We further prove the convergence of the first-order absolute moment of the Local Difference.

\subsection{The Dynamic Adjustment Strategy for One-Dimensional Encoding Trees}
In this part, we first give the formal description of the adjustment strategy for one-dimensional encoding trees.
Next, we derive the formula of the one-dimensional Local Difference.
Finally, we analyze the lower bound and the upper bound of the one-dimensional Local Difference.

\subsubsection{Strategy Description}
The dynamic adjustment strategy for the one-dimensional encoding tree is as follows.
\textit{When new graph nodes come, an equal number of leaf nodes are set as immediate successors of the root node. }
\textit{Each of new leaf nodes $\gamma$ has a single-node set label $T_\gamma = \{v\}$, where $v$ is one of the new graph nodes.}
Obviously, the updated one-dimensional encoding tree $\mathcal{T}'$ is also unique and optimal.
So the updated one-dimensional entropy is always equal to the minimum structural entropy, i.e., $H^1(G')$.

\subsubsection{Formula Derivation of the Local Difference}
Suppose that after getting an incremental sequence $\xi$ with size $n$, the graph $G$ becomes $G'$ and its one-dimensional encoding tree $\mathcal{T}$ becomes $\mathcal{T}'$, the updated one-dimensional structural entropy can then be written as
\begin{equation}
\begin{aligned}
H^{\mathcal{T}'}(G')=&\sum_{v_i \in \mathcal{V}'}-\frac{d'_i}{2m+2n}\log\frac{d'_i}{2m+2n},
\end{aligned}
\label{1dSE-updated}
\end{equation}
where $\mathcal{V}'$ is the updated node set and $d'_i$ denotes the updated degree of $v_i$.
According to Eq.~(\ref{1dLD}), we get the one-dimensional Local Difference as
\begin{equation}
\begin{aligned}
\Delta L_1 =& H^{\mathcal{T}'}(G')-H^\mathcal{T}_{GI}(G,n)\\
=&-\frac{1}{2m+2n}(\Delta S_N + \Delta S_G),
\end{aligned}
\label{1dLD-unfold}
\end{equation}
where
\begin{align}
\Delta S_N &= \sum_{v_k \in \phi_\lambda}[(d_k+\delta(v_k))\log(d_k+\delta(v_k)) - d_k\log{d_k}],\\
\Delta S_G &= -2n\log(2m+2n).
\end{align}
$\delta(v_k)$ denotes the degree incremental $d'_k - d_k$, and $\phi_\lambda$ denotes the set of nodes that have changes in degree, i.e., $\phi_\lambda = \{v_k \in \mathcal{V}|\delta(v_k) \neq 0 \}$.

\subsubsection{Boundedness Analysis of the Local Difference} \label{sec:bound-1dLD}
We first analyze the maximum and minimum value of $\Delta S_N$ before we bound the Local Difference.
Let
\begin{equation}
s_N(d, x) = (d+x)\log(d+x) - d\log{d}.
\end{equation}
Since $s_N(d,n)$ is monotonically increasing with $d$, $\Delta S_N$ takes the maximum value when $n$ new incremental edges connect the two nodes with the largest degree.
Hence, we have
\begin{equation}
\Delta S_N \le 2s_N(d_{m},n),
\end{equation}
where $d_m$ denotes the maximum degree in $G$.
Since multiple edges are not allowed, the equality may hold if and only if $n = 1$.
When each of $n$ incremental edges connects a one-degree node and a new node, $\Delta S_N$ is minimized:
\begin{equation}
\Delta S_N \ge ns_N(1,0).
\end{equation}
Now we can get a lower bound of $\Delta L_1$ as
\begin{equation}
\begin{aligned}
\text{LB}(\Delta L_1)  = & -\frac{1}{2m+2n}(2s_N(d_m,n)+\Delta S_G)\\
= & \frac{d_m\log d_m-(d_m+n)\log{(d_m+n)}}{m+n}\\
& + \frac{n}{m+n}\log(2m+2n).\\
\end{aligned}
\end{equation}
An upper bound of $\Delta L_1$ is
\begin{equation}
\begin{aligned}
\text{UB}(\Delta L_1) &= -\frac{1}{2m+2n}(ns_N(1,0)+\Delta S_G)\\
&= \frac{2n\log(2m+2n)+ n}{2m+2n}\\
&= \frac{n\log(m+n)+ \frac{3}{2}n}{m+n}.\\
\end{aligned}
\end{equation}
\subsection{The Dynamic Adjustment Strategy for Two-Dimensional Encoding trees}
In this subsection, we first give the formal description of the adjustment strategy for two-dimensional encoding trees.
Secondly, we derive the formula of the two-dimensional Local Difference, and then we analyze its lower bound and upper bound.

\subsubsection{Strategy Description}

For two-dimensional encoding trees, the dynamic adjustment strategy consists of two parts: the edge strategy and the node strategy.
The edge strategy is that, \textit{the incremental edges do not change the encoding tree's structure}.
It means that all the incremental edges do not change the communities to which the original nodes belong.
For the new nodes, we develop the node strategy, which minimizes the structural entropy in most cases.
The node strategy is that, \textit{when a new node $v$ is connected with an existed node $u$ (shown in Fig.~\ref{node-strategy}(a)), and $u$ corresponds to a leaf node $\eta$ in the two-dimensional encoding tree, i.e., $T_{\eta} = \{u\}$ (shown in Fig.~\ref{node-strategy}(b)), a new leaf node $\gamma$ with a label $T_\gamma = \{v\}$ will be set as an immediate successor of $\eta$'s parent ($\alpha$ in Fig.~\ref{node-strategy}(d)), instead of another 1-height node ($\beta$ in Fig.~\ref{node-strategy}(f))}.
In another word, \textit{the new node is assigned to its neighbor's community ($T_\alpha$ in Fig.~\ref{node-strategy}(c)), rather than another arbitrary community ($T_\beta$ in Fig.~\ref{node-strategy}(e))}.
To ensure that the node strategy minimizes the updated structural entropy most of the time, we give the following theorem.
\begin{figure}[ht]
\centering
\includegraphics[scale=0.59]{figures/node-strategy.pdf}
\caption{
An example of the node strategy for adjusting the two-dimensional encoding tree.
}
\label{node-strategy}
\end{figure}
\begin{theorem}
Suppose that a new graph node $v$ is connected to an existed node $u$, where $\{ u\} \subseteq T_\alpha $.
If $\frac{2m+2}{V_\alpha+2} \ge e$, we have
\begin{equation}
\begin{aligned}
H^{\mathcal{T}'}_{v\rightarrow \alpha}(G')  < H^{\mathcal{T}'}_{v\rightarrow \beta \neq \alpha}(G') ,
\end{aligned}
\label{node-entropy-difference}
\end{equation}
where $H^{\mathcal{T}'}_{v\rightarrow \alpha}(G')$ denotes the updated structural entropy when the new node $v$ is assigned to $u$'s community $T_\alpha$, i.e., $\{v\} \subset T_\alpha$, and $H^{\mathcal{T}'}_{v\rightarrow \beta \neq \alpha}(G')$ represents the updated structural entropy when $v$ is allocated to another arbitrary community $T_{\beta \neq \alpha}$, i.e., $ \{v\} \subset T_{\beta \neq \alpha}$.
\label{node strategy}
\end{theorem}
\textit{Proof.}
Differentiating the updated structural entropy of the two cases above, we can obtain
\begin{align}
\Delta H^{\mathcal{T}'}(G') = &H^{\mathcal{T}'}_{v\rightarrow \alpha}(G') - H^{\mathcal{T}'}_{v\rightarrow \beta \neq \alpha}(G')\notag \\
=& \frac{1}{2m+2}[\log{\frac{V_\alpha+2}{2m+2}} + (g_{\alpha}-V_{\alpha})\log \frac{V_{\alpha}+1}{V_{\alpha}+2}\notag \\
&-(g_{\beta}-V_{\beta})\log \frac{V_{\beta}}{V_{\beta}+1}].
\end{align}
Here we define
\begin{align}
f_1(g, V) =& (g-V)\log \frac{V+1}{V+2}, \\
f_2(g, V)=& -(g-V)\log \frac{V}{V+1}.
\end{align}
Let $\theta $ $( 0 \le \theta <1)$ be the minimum proportion of the in-community edges in each community, i.e.,
\begin{align}
\theta = \min_\alpha \{ \frac{V_\alpha-g_\alpha}{V_\alpha}\}.
\end{align}
Since $1 \le V <2m$ and $0<g\le (1 - \theta) V$, we have
\begin{align}
f_1(g, V) &< -V \log \frac{V+1}{V+2}<\frac{1}{\ln{2}}=\log{e},\\
f_2(g, V) &\le \theta V\log{\frac{V}{V+1}}\le \theta \log{\frac{1}{2}} = -\theta.
\end{align}
So
\begin{equation}
\begin{aligned}
\Delta H^{\mathcal{T}'}(G') < & \frac{1}{2m+2}(\log{\frac{V_\alpha+2}{2m+2}} + \log e - \theta)\\
= & \frac{1}{2m+2}\log( {\frac{V_\alpha+2}{2m+2}}\cdot 2^{-\theta} e).
\end{aligned}
\end{equation}
Therefore, if
\begin{equation}
\begin{aligned}
\frac{2m+2}{V_\alpha+2} \ge \max\{2^{-\theta} e\}=e,\\
\end{aligned}
\end{equation}
Eq. (\ref{node-entropy-difference}) holds, and thus Theorem~\ref{node strategy} is proved.
According to Theorem~\ref{node strategy}, our node strategy minimizes the updated structural entropy when the total volume of the whole graph $2m$ is approximately larger than $e$ times the maximum volume $V_m$ of all communities.
Usually, we have $\theta \approx 1$, so the real condition is much looser.

\subsubsection{Formula Derivation of the Local Difference}
Suppose that after getting an incremental sequence $\xi$ with size $n$, the graph $G$ becomes $G'$ and its two-dimensional encoding tree $\mathcal{T}$ becomes $\mathcal{T}'$, the updated two-dimensional structural entropy can then be written as
\begin{equation}
\begin{aligned}
H^{\mathcal{T}'}(G')=&\sum_{\alpha_i \in A}(-\frac{g'_{\alpha_i}}{2m+2n}\log\frac{V'_{\alpha_i}}{2m+2n}\\
&+\sum_{v_j\in T_{\alpha_i}}-\frac{d'_{j}}{2m+2n}\log\frac{d'_j}{V'_{\alpha_i}}).
\end{aligned}
\label{2dSE-updated}
\end{equation}
According to Eq. (\ref{2dLD}), we get the two-dimensional Local Difference as
\begin{equation}
\begin{aligned}
\Delta L_2 =& H^{\mathcal{T}'}(G')-H^\mathcal{T}_{GI}(G,n)\\
=&-\frac{1}{2m+2n}(\Delta S_N + \Delta S_C + \Delta S_G),
\end{aligned}
\label{2dLD-unfold}
\end{equation}
where
\begin{align}
\Delta S_N =& \sum_{v_k \in \phi_\lambda}[(d_k+\delta(v_k))\log(d_k+\delta(v_k)) - d_k\log{d_k}],\\
\Delta S_C =& \sum_{\alpha \in \mathcal{A}}[(g_{\alpha} +\delta_g(\alpha) - V_\alpha-\delta_V(\alpha))\log(V_{\alpha}+\delta_V(\alpha)) \notag \\
&- (g_{\alpha}-V_\alpha)\log V_{\alpha}],\\
\Delta S_G =& -\sum_{\alpha \in \mathcal{A}}\delta_g(\alpha)\log(2m+2n).
\end{align}
$\delta_V(\alpha)$ denotes the volume incremental $V'_\alpha-V_\alpha$, $\delta_g(\alpha)$ denotes the cut edge incremental $g'_\alpha - g_\alpha$, and $\mathcal{A}$ denotes the set of the 1-height nodes that have changes in $V_\alpha$ or $g_\alpha$, i.e. $\mathcal{A} = \{\alpha \in A | \delta_V(\alpha) \neq 0 \text{ or } \delta_g(\alpha) \neq 0\}$.

\subsubsection{Boundedness Analysis of the Local Difference}
According to Eq.~(\ref{2dLD-unfold}), we can obtain the bounds of $\Delta L_2$ by analyze its components, $\Delta S_N$, $\Delta S_C$ and $\Delta S_G$.
Since the bounds of $\Delta S_N$ are obtained in Section~\ref{sec:bound-1dLD}, we only need to analyze $\Delta S_C$ and $\Delta S_G$.
For convenience, we let
\begin{equation}
\begin{aligned}
 \Delta S_{CG} = \Delta S_C +\Delta S_G.
\end{aligned}
\end{equation}
First, we analyze the bound of $\Delta S_{CG}$ when adding one new edge.
If a new edge is added between two communities $T_{\alpha_1}$ and $T_{\alpha_2}$, we get
\begin{align}
\Delta S_{CG} =& (g_{\alpha_1} - V_{\alpha_1})\log(V_{\alpha_1} + 1) - (g_{\alpha_1}-V_{\alpha_1})\log V_{\alpha_1} \notag\\
 &+ (g_{\alpha_2} - V_{\alpha_2})\log(V_{\alpha_2} + 1) - (g_{\alpha_2}-V_{\alpha_2})\log V_{\alpha_2} \notag\\
 &- 2 \log (2m+2).
\end{align}
Thus we have
\begin{align}
\Delta S_{CG} \ge &  2V_m\log(\frac{V_m}{V_m + 1}) - 2 \log (2m+2) , \\
\Delta S_{CG} \le & -2 \log(2m+2),
\end{align}
where $V_m$ denotes the maximum volume of all $T_\alpha$.
If a new edge is added within a single community $T_\alpha$ (or a new node is connected with an existed node in $T_\alpha$), we have

\begin{equation}
\begin{aligned}
\Delta S_{CG} =& (g_\alpha  - V_\alpha -2)\log(V_\alpha+2) - (g_\alpha-V_\alpha)\log V_\alpha.\\
\end{aligned}
\end{equation}
Then we can obtain
\begin{align}
\Delta S_{CG} \ge & - (V_m + 2)\log(V_m+2) + V_m\log V_m,\\
\Delta S_{CG} \le& -2\log(V_{min}+2),
\end{align}
where $V_{min}$ denotes the minimum volume of all $T_\alpha$.
Next, we analyze the bound of $\Delta S_{CG}$ when adding $n$ new edges.
When the $n$ edges are all between the two communities with the largest volume, we have
\begin{equation}
\begin{aligned}
\Delta S_{CG} \ge &  2V_m\log(\frac{V_m}{V_m + n}) - 2n \log (2m+2n)\\
 >  &- 2n- 2n \log (2m+2n),\\
\end{aligned}
\end{equation}
and $\Delta S_{CG}$ takes the minimum value:
\begin{equation}
\begin{aligned}
\Delta S_{CGmin} =  &- 2n- 2n \log (2m+2n).\\
\end{aligned}
\end{equation}
When each of the $n$ edges is added within $n$ communities with the smallest volume, respectively, $\Delta S_{CG}$ takes the maximum value:
\begin{equation}
\begin{aligned}
\Delta S_{CGm} = & -2n\log(V_{min}+2).
\end{aligned}
\end{equation}
Finally, we can get a lower bound of $\Delta L_2$ as
\begin{align}
\text{LB}(\Delta L_2) =& -\frac{1}{2m+2n}(2s_N(d_m,n) + \Delta S_{CGm}) \notag \\
=&\frac{d_m\log d_m-(d_m+n)\log{(d_m+n)}}{m+n} \notag \\
&+\frac{n \log(V_{min}+2)}{m+n}.
\end{align}
An upper bound of $\Delta L_2$ is as follows:
\begin{align}
\text{UB}(\Delta L_2) & =  -\frac{1}{2m+2n}(ns_N(1,0) + \Delta S_{CGmin}) \notag \\
&= \frac{n + 2n + 2n\log(2m+2n)}{2m+2n} \notag \\
&= \frac{ n\log(m+n) + \frac{5}{2}n}{m+n}.
\end{align}

\subsection{Convergence Analysis}
In this section, we analyze the convergence of the Local Difference and its first-order absolute moment.
We denote $g(m) = O(f(m))$ as $\lim_{m\rightarrow \infty}\frac{g(m)}{f(m)} = C$, where $C$ is a constant, to indicate that the $g(m)$ converges faster than or as fast as $f(m)$.

\subsubsection{Convergence of the Local Difference}
\begin{theorem}
Given the incremental size $n$, the one- and two-dimensional Local Difference both converge in order of $O(\frac{\log m}{m})$:
\begin{equation}
\begin{aligned}
\Delta L_{1,2} =& O(\frac{\log m}{m}).
\end{aligned}
\label{LD-order}
\end{equation}
and thus converge to $0$ when the total edge number $m$ of the original graph is infinitely large:
\begin{equation}
\begin{aligned}
\lim_{m \rightarrow \infty} \Delta L_{1,2} = 0.
\end{aligned}
\label{conv-L-eq}
\end{equation}
\label{conv-L}
\end{theorem}
\textit{Proof.}
For one-dimensional cases, we have
\begin{align}
\text{LB}(\Delta L_1) = & \frac{d_m\log d_m-(d_m+n)\log{(d_m+n)}}{m+n} \notag\\
& + \frac{n}{m+n}\log(2m+2n) \notag\\
\ge & \frac{m\log m-(m+n)\log{(m+n)}}{m+n} \notag\\
& + \frac{n}{m+n}\log(2m+2n) \notag\\
= & \frac{1}{m+n}[\log (1-\frac{n}{m+n})^m +n] \notag\\
= & O(\frac{1}{m}),\\
\text{UB}(\Delta L_1) = & \frac{n\log(m+n)+ \frac{3}{2}n}{m+n} \notag\\
= & O(\frac{\log m}{m}).
\end{align}
For two-dimensional cases, we have
\begin{align}
\text{LB}(\Delta L_2) =&\frac{d_m\log d_m-(d_m+n)\log{(d_m+n)}}{m+n}\\
&+\frac{n \log(V_{min}+2)}{m+n} \notag\\
\ge&\frac{m\log m-(m+n)\log{(m+n)}}{m+n} \notag\\
&+\frac{n \log(2+2)}{m+n}, \notag\\
\ge & \frac{1}{m+n}[\log (1-\frac{n}{m+n})^m - n\log (m+n)] \notag\\
= & O(\frac{\log m}{m}),\\
\text{UB}(\Delta L_2) =& \frac{ n\log(m+n) + \frac{5}{2}n}{m+n} = O(\frac{\log m}{m}).
\end{align}
Since
\begin{equation}
\begin{aligned}
 \text{LB}(\Delta L_1) \le \Delta L_1 \le \text{UB}(\Delta L_1),\\
 \text{LB}(\Delta L_2) \le \Delta L_2 \le \text{UB}(\Delta L_2),\\
\end{aligned}
\end{equation}Eq. (\ref{conv-L-eq}) is satisfied, and thus Theorem \ref{conv-L} is proved.
We can conclude that the gap between the updated structural entropy and the Global Invariant converges to $0$ in order of $O(\frac{\log m}{m})$.
\subsubsection{Convergence of the First-order Absolute Moment}
\begin{definition}
Let $X$ be a random variable representing the incremental size $n$. We remind that $\mathbb{E}[X] = \overline n$.
\end{definition}
\begin{theorem}
The first-order absolute moment of the two-dimensional Local Difference converges in the order of $O(\frac{\log m}{m})$:
\begin{equation}
\begin{aligned}
\mathbb{E}[|\Delta L_{1,2}| ] = O(\frac{\log m}{m}),
\end{aligned}
\label{LD-order}
\end{equation}
and thus converges to $0$ in the limit of infinity:
\begin{equation}
\begin{aligned}
\lim_{m \rightarrow \infty} \mathbb{E}[|\Delta L_{1,2}|] = 0.
\end{aligned}
\end{equation}
\label{first-order}
\end{theorem}
\textit{Proof.}
For one-dimensional cases, we have
\begin{align}
\mathbb{E}[|\text{LB}(\Delta L_1)|] = &  \mathbb{E}[|\frac{d_m\log d_m-(d_m+X)\log(d_m+X)}{m+X} \notag\\
&+\frac{X\log(2m+2X)}{m+X}|] \notag\\
\le & \mathbb{E}[\frac{(m+X)\log{(m+X)}-m\log m}{m+X}] \notag\\
&+\mathbb{E}[\frac{X\log(2m+2X)}{m+X}] \notag\\
\le & \frac{m\log m-(m+\overline n)\log{(m+\overline n)}}{m+\overline n} \notag\\
&+ \frac{\overline n\log(2m+2 \overline n)}{m+\overline n} \text{ (Jensen's inequality)} \notag\\
= & O(\frac{\log m}{m}),\\
\mathbb{E}[|\text{UB}(\Delta L_1)|] = &  \mathbb{E}[\frac{ X\log(m+X) + \frac{3}{2}X}{m+X}] \notag\\
\le & \frac{ \overline n\log(m+ \overline n) + \frac{3}{2}\overline n}{m+\overline n} \text{ (Jensen's inequality)} \notag\\
= & O(\frac{\log m}{m}).
\end{align}
Since
\begin{equation}
\begin{aligned}
0 \le \mathbb{E}[|\Delta L_1|] \le \max\{ \mathbb{E}[|\text{LB}(\Delta L_1)|], \mathbb{E}[|\text{UB}(\Delta L_1)|]\},
\end{aligned}
\end{equation}
we have
\begin{equation}
\begin{aligned}
\mathbb{E}[|\Delta L_1| ] = O(\frac{\log m}{m}).
\end{aligned}
\end{equation}
For two-dimensional cases, we have
\begin{align}
\mathbb{E}[|\text{LB}(\Delta L_2)|] = &  \mathbb{E}[|\frac{d_m\log d_m-(d_m+X)\log(d_m+X)}{m+X} \notag\\
&+\frac{n\log(V_{min}+2)}{m+X}|] \notag\\
\le & \mathbb{E}[\frac{(m+X)\log{(m+X)}-m\log m}{m+X}] \notag\\
&+\mathbb{E}[\frac{X\log(m+2)}{m+X}] \notag\\
\le & \frac{m\log m-(m+\overline n)\log{(m+\overline n)}}{m+\overline n} \notag\\
&+ \frac{\overline n\log(m+2)}{m+\overline n}\text{ (Jensen's inequality)} \notag\\
= & O(\frac{\log m}{m}),\\
\mathbb{E}[|\text{UB}(\Delta L_2)|] = &  \mathbb{E}[\frac{ X\log(m+X) + \frac{5}{2}X}{m+X}] \notag\\
\le & \frac{ \overline n\log(m+ \overline n) + \frac{5}{2}\overline n}{m+\overline n} \text{ (Jensen's inequality)} \notag\\
= & O(\frac{\log m}{m}).
\end{align}
Since
\begin{equation}
\begin{aligned}
0 \le \mathbb{E}[|\Delta L_2|] \le \max\{ \mathbb{E}[|\text{LB}(\Delta L_2)|], \mathbb{E}[|\text{UB}(\Delta L_2)|]\},
\end{aligned}
\end{equation}
we have
\begin{equation}
\begin{aligned}
\mathbb{E}[|\Delta L_2| ] = O(\frac{\log m}{m}).
\end{aligned}
\end{equation}Therefore, Theorem \ref{first-order} is proved.
We can conclude that the expectation of the absolute value (i.e., the first-order absolute moment) of one- and two-dimensional Local Difference both converge in order of $O(\frac{\log m}{m})$.

\section{Algorithms}\label{sec:algo}

\begin{figure*}[ht]
\centering
\includegraphics[scale=0.62]{figures/algo-outline.pdf}
\caption{The Outline of Our Incremental Algorithms and RFS Algorithms.}
\label{outline}
\end{figure*}
In this section, we first present two incremental algorithms, named \textit{Incre-1dSE} and \textit{Incre-2dSE}, for fast measuring one- and two-dimensional updated structural entropy.
Besides, we design two baselines, namely 1d-RFS and 2d-RFS, for our incremental algorithms.
\subsection{Incremental Algorithm of Measuring One-dimensional Structural Entropy (Incre-1dSE)}
\subsubsection{Stage 1: Initialization}
First, we record each level's one-dimensional Structural Data from the original graph $G_0 = (\mathcal{V}_0, \mathcal{E}_0)$~(\circled{i} in Fig.~\ref{outline}).
The one-dimensional Structural Data of $G_0$ is defined as 1) (node level) the degree $d_i$ of each node $v_i\in \mathcal{V}_0$, and 2) (graph level) the total edge number $m$ of $G_0$.
Next, we compute the one-dimensional Structural Expressions~(\circled{ii} in Fig.~\ref{outline}), which is defined as
\begin{enumerate}
\item  (node level)
\begin{equation}
\hat{S}_N = \sum_{v_i \in \mathcal{V}_0}d_i\log{d_i};
\label{1dSN}
\end{equation}
\item (graph level)
\begin{equation}
\hat{S}_G = -2m.
\label{1dSG}
\end{equation}
\end{enumerate}
Given the incremental size $n$, we can thus efficiently compute the one-dimensional Global Invariant by
\begin{equation}
\begin{aligned}
H^{\mathcal{T}_0}_{GI}(G_0, n)=&-\frac{1}{2m+2n}[\hat S_N+\hat S_G\log(2m+2n)],
\end{aligned}
\label{1dGI-fast}
\end{equation}
where $\mathcal{T}_0$ denotes the original one-dimensional encoding tree.

Overall, since we need to traverse all nodes in $\mathcal{V}_0$, the time complexity of the one-dimensional initialization stage is $O(|\mathcal{V}_0|)$.

\subsubsection{Stage 2: Measurement}
In this stage, we first extract each level's Incremental Data from the cumulative incremental sequence $\xi_{1 \rightarrow t}$~(\circled{1} in Fig.~\ref{outline}).
The Incremental Data of $\xi_{1 \rightarrow t}$  includes 1) (sequence level) the incremental size $n$, and 2) (node level) the degree incremental $\delta(v)$ of each node $v \in \phi_\lambda$.
Since we need to orderly traverse all the edges in $\xi_{1 \rightarrow t}$ to get them, the time complexity of this step is $O(n)$.
After getting the Incremental Data, the one-dimensional Global Invariant $H^{\mathcal{T}_0}_{GI}(G_0,n)$ and Local Difference $\Delta L_1$ are computed via Eq.~(\ref{1dGI-fast}) and Eq.~(\ref{1dLD-unfold}) in the time complexity of $O(1)$ and $O(|\phi_\lambda|)$, respectively~(\circled{2} in Fig.~\ref{outline}).
Finally, we sum them up to get the one-dimensional updated structural entropy~(\circled{3} in Fig.~\ref{outline}).

Overall, the time complexity of measuring the updated one-dimensional structural entropy is $O(n+|\phi_\lambda|)=O(n)$, after the initialization stage of $O(|\mathcal{V}_0|)$.
The pseudo-code of \textit{Incre-1dSE} is shown in Algorithm \ref{incre-1dse}.
\begin{algorithm}[]
  \SetAlgoLined
  \SetKwInOut{Input}{Input}\SetKwInOut{Output}{Output}
  \SetKwFunction{GetLength}{GetLength}
  \Input{Original graph $G_0 = (\mathcal{V}_0, \mathcal{E}_0)$, Cumulative incremental sequence $\xi_{1\rightarrow t}$.}
  \Output{Updated one-dimensional structural entropy $H^{\mathcal{T}_t}(G_{t})$.}
  \tcp{Stage 1: Initialization}
  Get the degree $d_i$ of each node $v_i \in \mathcal{V_0}$\;
  Get the total edge number $m$ of $G_0$\;
  Calculate $\hat S_N$ and $\hat S_G$ via Eq.~(\ref{1dSN}) and Eq.~(\ref{1dSG}), respectively\;
  \tcp{Stage 2: Measurement}
  Obtain the incremental size $n:=$ \GetLength($\xi_{1\rightarrow t}$)\;
  $\phi_\lambda:=\emptyset$; \tcp{Obtain $\phi_\lambda$ and $\delta(v), v\in \phi_\lambda$}
  \For{$e=(u,v) \in \xi_{1\rightarrow t}$}{
    $\phi_\lambda := \phi_\lambda \cup \{u,v\}$\;
    $\delta(u):=\delta(u)+1$  ($\delta(u):=1$ if $\delta(u)$ is not exist, the same below)\;
    $\delta(v):=\delta(v)+1$\;
  }
  Obtain $H^{\mathcal{T}_0}_{GI}(G_0,n)$ via Eq.~(\ref{1dGI-fast})\;
  Obtain $\Delta L_1$ via Eq.~(\ref{1dLD-unfold})\;
  \Return $H^{\mathcal{T}_t}(G_{t}):=H^{\mathcal{T}_0}_{GI}(G_0,n)+\Delta L_1$.
  \caption{Incre-1dSE}
  \label{incre-1dse}
\end{algorithm}
\subsection{Incremental Algorithm of Measuring Two-dimensional Structural Entropy (Incre-2dSE)}
\subsubsection{Stage 1: Initialization}
Firstly, we record the two-dimensional Structural Data from $G_0$~(\circled{i} in Fig.~\ref{outline}).
The nodes of $G_0$ is divided into $r$ communities $T_{\alpha_1}, T_{\alpha_2}, ..., T_{\alpha_r}$ according to the given original encoding tree $\mathcal{T}_0$.
We define the two-dimensional Structural Data of $G_0$ as follows:
\begin{enumerate}
\item (node level) the degree $d_i$ of each node $v_i\in \mathcal{V}_0$;
\item (community level) the volume $V_\alpha$ and the cut edge number $g_\alpha$ of $\alpha \in A_0$;
\item (graph level) the total edge number $m$ of $G_0$.
\end{enumerate}
Since we need to traverse each edge in $G_0$ to obtain the community level Incremental Data, the time complexity of the first step is $O(|\mathcal{E}_0|)$.
Subsequently, we compute the two-dimensional Structural Expressions~(\circled{ii} in Fig.~\ref{outline}), which is defined as follows:
\begin{enumerate}
\item (node level)
\begin{equation}
\hat{S}_N=\sum_{v_i \in \mathcal{V}_0}d_i\log{d_i};
\label{2dSN}
\end{equation}
\item (community level)
\begin{equation}
\hat{S}_C= \sum_{\alpha_i \in A_0}(g_{\alpha_i}-V_{\alpha_i})\log V_{\alpha_i};
\label{2dSC}
\end{equation}
\item (graph level)
\begin{equation}
\hat{S}_G = -\sum_{\alpha_i \in A_0} g_{\alpha_i}.
\label{2dSG}
\end{equation}
\end{enumerate}
We compute $\hat{S}_N$, $\hat{S}_C$, and $\hat{S}_G$ with time complexity $O(|\mathcal{V}_0|)$, $O(r)$, and $O(r)$, respectively.
Given the incremental size $n$, we can thus efficiently compute the two-dimensional Global Invariant by
\begin{align}
H^{\mathcal{T}_0}_{GI}(G_0, n)=&-\frac{1}{2m+2n}[\hat S_N + \hat S_C + \hat S_G\log(2m+2n)],
\label{2dGI-fast}
\end{align}
where $\mathcal{T}_0$ denotes the original two-dimensional encoding tree.

In summary, the time complexity of the two-dimensional initialization stage is $O(|\mathcal{E}_0|+|\mathcal{V}_0|+r) = O(|\mathcal{E}_0|)$.

\subsubsection{Stage 2: Measurement}
Similar to one-dimensional cases, we first count two-dimensional Incremental Data by orderly traversing the edges in the cumulative incremental sequence $\xi_{1 \rightarrow t}$~(\circled{1} in Fig.~\ref{outline}).
The two-dimensional Incremental Data consists of three parts:
\begin{enumerate}
\item (sequence level) the incremental size $n$;
\item (node level) the degree incremental $\delta(v)$ of $v \in \phi_\lambda$;
\item (community level) the volume incremental $\delta_V(\alpha)$ and the cut edge incremental $\delta_g(\alpha)$ of $\alpha \in \mathcal{A}$.
\end{enumerate}
The same as the one-dimensional cases, the time complexity of counting the two-dimensional Incremental Data is $O(n)$.
Next, we compute the two-dimensional Global Invariant and Local Difference via Eq.~(\ref{2dGI-fast}) and Eq.~(\ref{2dLD-unfold}) with $O(1)$ and $O(|\phi_\lambda|+|\mathcal{A}|)$, respectively~(\circled{2} in Fig.~\ref{outline}).
Finally, we sum them up to get the two-dimensional updated structural entropy~(\circled{3} in Fig.~\ref{outline}).

Overall, the time complexity of measuring the updated two-dimensional structural entropy is $O(n+|\phi_\lambda|+|\mathcal{A}|)=O(n)$, after the initialization stage of $O(|\mathcal{E}_0|)$.
The pseudo-code of \textit{Incre-2dSE} is shown in Algorithm \ref{incre-2dse}.
\begin{algorithm}[ht]
  \SetAlgoLined
  \SetKwInOut{Input}{Input}\SetKwInOut{Output}{Output}
  \SetKwFunction{GetLength}{GetLength}
  \SetKwFunction{NULL}{NULL}
  \SetKwFunction{Partition}{Partition}
  \Input{Original graph $G_0 = (\mathcal{V}_0,\mathcal{E}_0)$, Cumulative incremental sequence $\xi_{1\rightarrow t}$, Original two-dimensional encoding tree $\mathcal{T}_0$.}
  \Output{Updated two-dimensional structural entropy $H^{\mathcal{T}_t}(G_{t})$.}
  \tcp{Stage 1: Initialization}
  Get the degree $d_i$ of each node $v_i \in V_0$\;
  Get the volume $V_{\alpha}$ and the cut edge number $g_{\alpha}$ of $\alpha \in A_0$\;
  Get the total edge number $m$ in $G_0$\;
  Calculate $\hat S_N$, $\hat S_C $, and $\hat S_G$ via Eq.~(\ref{2dSN}), Eq.~(\ref{2dSC}), and Eq.~(\ref{2dSG}), respectively\;
  \tcp{Stage 2: Measurement}
  Obtain the incremental size $n:=$ \GetLength($\xi_{1\rightarrow t}$)\;
  $\phi_\lambda:=\emptyset$\;
  $\mathcal{A} := \emptyset$\;
  \For{$e=(u,v) \in \xi_{1\rightarrow t}$}{
    \tcp{Obtain $\delta(v)$, $v\in \phi_\lambda$}
    $\phi_\lambda := \phi_\lambda \cup \{u,v\}$\;
    $\delta(u):=\delta(u)+1$\;
    $\delta(v):=\delta(v)+1$\;

    \tcp{Obtain $\delta_V(\alpha)$ and $\delta_g(\alpha)$, $\alpha \in \mathcal{A}$}
    \tcp{Let $\alpha(v) = \rho$ if $v \subseteq T_\rho$}
    \If{$\alpha(u)$ == \NULL}{$\alpha(u) := \alpha(v)$\;}
    \If{$\alpha(v)$ == \NULL}{$\alpha(v) := \alpha(u)$\;}
    $\mathcal{A} := \mathcal{A} \cup \{\alpha(u), \alpha(v)\}$\;
    \If{$\alpha(v) == \alpha(u)$}{
      $\delta_V(\alpha(v))$ := $\delta_V(\alpha(v)) + 2$\;
    }
    \If{$\alpha(v) != \alpha(u)$}{
      $\delta_V(\alpha(v))$ := $\delta_V(\alpha(v)) + 1$\;
      $\delta_V(\alpha(u))$ := $\delta_V(\alpha(u)) + 1$\;
      $\delta_g(\alpha(v))$ := $\delta_g(\alpha(v)) + 1$\;
      $\delta_g(\alpha(u))$ := $\delta_g(\alpha(u)) + 1$\;
    }
  }
  Obtain $H^{\mathcal{T}_0}_{GI}(G_0,n)$ via Eq.~(\ref{2dGI-fast})\;
  Obtain $\Delta L_2$ via Eq.~(\ref{2dLD-unfold})\;
  \Return $H^{\mathcal{T}_t}(G_{t}):=H^{\mathcal{T}_0}_{GI}(G_0,n)+\Delta L_2$\;
  \caption{Incre-2dSE}
  \label{incre-2dse}
\end{algorithm}

\subsection{Baseline: Recalculate-From-Scratch (RFS)}
In this part, we propose one- and two-dimensional \textbf{R}ecalculate-\textbf{F}rom-\textbf{S}cratch algorithms, namely 1d-RFS and 2d-RFS, as baselines.
They reconstruct the encoding tree of the updated graph and calculate the updated structural entropy based on the definition formula.
The two RFS algorithms consist of the following four steps.
Firstly, they generate the updated graph $G_t$ by combining the original graph $G_0$ and the cumulative incremental sequence $\xi_{1 \rightarrow t}$~(\textcircled{a} in Fig.~\ref{outline}).
Secondly, 2d-RFS partitions the node set $\mathcal{V}_t$ into communities to construct the two-dimensional encoding tree $\mathcal{T}_t$~(\textcircled{b} in Fig.~\ref{outline}).
Note that in one-dimensional cases, each node belongs to a single-node community.
So 1d-RFS does not need to take time to construct the one-dimensional encoding tree.
Thirdly, the two RFS algorithms record the Structural Data of $G_t$, namely the updated Structural Data~(\textcircled{c} in Fig.~\ref{outline}).
Finally, they compute the updated structural entropy via Eq.~(\ref{1dSE-updated}) and Eq.~(\ref{2dSE-updated})~(\textcircled{d} in Fig.~\ref{outline}).
The total time complexity of 1d-RFS is $O(|\mathcal{V}_t|+n)$.
The time complexity of 2d-RFS is $O(|\mathcal{E}_t|+n)$ excluding the construction of the encoding tree.
In this paper, we use Louvain~\cite{louvain} (a community detection algorithm) to partition the graph node set and construct the two-dimensional encoding tree, which has a time complexity of $O(|\mathcal{V}_t|\log|\mathcal{V}_t|)$.
The pseudo-code of 1d-RFS and 2d-RFS is shown in Algorithm \ref{1d-RFS} and \ref{2d-RFS}, respectively.

\begin{algorithm}[]
  \SetAlgoLined
  \SetKwInOut{Input}{Input}\SetKwInOut{Output}{Output}
  \SetKwFunction{CMB}{CMB}
  \Input{Original graph $G_0 = (\mathcal{V}_0,\mathcal{E}_0)$, Cumulative incremental sequence $\xi_{1\rightarrow t}$.}
  \Output{Updated one-dimensional structural entropy $H^{\mathcal{T}_t}(G_{t})$.}
  $G_t := $ \CMB$(G_0, \xi_{1 \rightarrow t})$\;
  Get the degree $d_i$ of each node $v_i\in \mathcal{V}_t$\;
  Get the total edge number $m$ of $G_t$\;
  Obtain $H^{\mathcal{T}_t}(G_{t})$ via Eq.~(\ref{1dSE-updated})\;
  \Return $H^{\mathcal{T}_t}(G_{t})$\;
  \caption{1d-RFS}
  \label{1d-RFS}
\end{algorithm}

\begin{algorithm}[]
  \SetAlgoLined
  \SetKwInOut{Input}{Input}\SetKwInOut{Output}{Output}
  \SetKwFunction{CMB}{CMB}
  \Input{Original graph $G_0 = (\mathcal{V}_0,\mathcal{E}_0)$, Cumulative incremental sequence $\xi_{1\rightarrow t}$.}
  \Output{Updated two-dimensional structural entropy $H^{\mathcal{T}_t}(G_{t})$.}
  $G_t := $ \CMB$(G_0, \xi_{1 \rightarrow t})$\;
  Construct the two-dimensional encoding tree $\mathcal{T}_t$.\;
  Get the degree $d_i$ of each node $v_i \in \mathcal{V}_t$\;
  Get the volume $V_{\alpha}$ and the cut edge number $g_{\alpha}$ of $\alpha \in A_t$\;
  Get the total edge number $m$ of $G_t$\;
  Obtain $H^{\mathcal{T}_t}(G_{t})$ via Eq.~(\ref{2dSE-updated})\;
  \Return $H^{\mathcal{T}_t}(G_{t})$\;
  \caption{2d-RFS}
  \label{2d-RFS}
\end{algorithm}
\section{Experiments and Evaluations}\label{sec:eval}
In this section, we first generate three dynamic graph datasets.
Subsequently, we give the computational efficiency analysis and the error evaluation of the structural entropy between our algorithms and baselines.
Finally, we conduct statistical experiments to prove the convergence of the Local Difference and its first-order absolute moment.

\subsection{Generation of the Dynamic Graph Datasets}
In this part, we first describe the generation of the original graph.
Then, we use Hawkes Process~\cite{hawkes-origin}, Triad Closure Process~\cite{triad-origin}, and our proposed Partitioning-based Process to generate the incremental sequences.
Lastly, we give the parameter settings and the description of the generated datasets.

\subsubsection{Original Graph Generation}
We generate the original graph by utilizing the \textit{random\_partition\_graph} method in ``Networkx"~\cite{networkx} (a python library).
This method has three parameters.
The first parameter is a list of community sizes $\mathcal{S} = [s_1, s_2,...]$, which denotes the node number of each community of the original graph.
The other two parameters are two probabilities $p_\mathrm{in}$ and $p_\mathrm{ac}$.
Nodes in the same community are connected with $p_\mathrm{in}$ and nodes across different communities are connected with $p_\mathrm{ac}$.

\subsubsection{Incremental Sequence Generation}
In this part, we give the procedure for generating incremental sequences by Hawkes Process~\cite{hawkes-origin}, Triad Closure Process~\cite{triad-origin}, and our proposed Partitioning-based Process.
We refer to some settings of Zuo et al.~\cite{hawkes-zuo} for Hawkes Process, and Zhou et al.~\cite{triad-zhou} for Triad Closure Process.

\noindent \textbf{Hawkes Process:}
Hawkes Process~\cite{hawkes-origin} models discrete sequence events by assuming that historical events can influence the occurrence of current events.
In this process, we first use node2vec~\cite{node2vec} to get the embedding vectors of all nodes.
Second, we randomly choose node $x$ to be the target node.
With probability $p_\mathrm{hn}$, we connect a new node with $x$, whose embedding vector is set to be the same as $x$'s.
With probability $1-p_\mathrm{hn}$, we use the embedding vectors to calculate the conditional intensity function $\Lambda_{y_i|x}$ of $x$ and each of its non-neighboring nodes $y_i$, and then we add an edge between $x$ and $y_i$ with the conditional probability $p_{y_i|x} = \Lambda_{y_i|x}/\sum_{y}\Lambda_{y|x}$.
We repeat the above two steps to generate the incremental sequence.

\noindent \textbf{Triad Closure Process:}
Triad Closure Process~\cite{triad-origin} describes the process of adding an edge between two non-neighboring nodes under the influence of their common neighbors.
In this process, we first get the embedding vectors of all nodes with node2vec~\cite{node2vec}.
Second, with probability $p_\mathrm{tn}$, we connect a new node to a random existed node.
With probability $1-p_\mathrm{tn}$, 1) we randomly select two non-neighboring nodes $v$ and $u$ with a common neighbor set $\mathcal{N}$, and calculate their connection probability $p_\mathrm{c}$ under the influence of $\mathcal{N}$;
2) we add an edge between $v$ and $u$ with probability $p_\mathrm{c}$, and return step 1) with probability $1-p_\mathrm{c}$.
The same as Hawkes Process, we repeat the above steps to generate the incremental sequence.

\noindent \textbf{Partitioning-based Process:}
We propose Partitioning-based Process to generate the dynamic graphs which evolve based on the community partitioning.
We first use Louvain~\cite{louvain} to get the node communities of the original graph.
We then repeatedly adds edges within a random community with probability $p_\mathrm{pin}$,
across two random communities with probability $p_\mathrm{pac}$,
and between a new node and a random existed node with probability $p_\mathrm{pn} = (1-p_\mathrm{pin}-p_\mathrm{pac})$, to generate the incremental sequence.
This process makes it easy to change the proportion of the three types of incremental edges to generate various incremental sequences for converge evaluation statistical experiments.

\subsubsection{Parameter Settings and Generated Datasets}
The parameters of the original graph and the processes are as follows.
\begin{itemize}[leftmargin=0pt, itemindent=3.1ex]
\item \textbf{Original graph settings:}
The total node number is $2000$, $\mathcal{S} = [200, 300, 400, 500, 600]$, $p_\mathrm{in}=0.3$, and $p_\mathrm{ac}=0.01$.
\item \textbf{Hawkes Process settings:}
We set the dimension of the embedding vectors as $16$ and $p_\mathrm{hn}$ as $0.05$.
\item \textbf{Triad Closure Process settings:}
We let the embedding vector dimension to be $16$, $p_\mathrm{tn}$ to be $0.05$.
\item \textbf{Partitioning-based Process settings:}
We set $p_\mathrm{pin}$ as $0.90$ and $p_\mathrm{pac}$ as $0.05$.
Thus we get $p_\mathrm{pn}=0.05$.
\end{itemize}
The generated original graph, according to the above parameters, has $150187$ edges.
We generate three total cumulative incremental sequences $\xi_{1\rightarrow T}$ with size $N=150187$ using the three processes.
Next, we let $T=20$ and divide each $\xi_{1\rightarrow T}$ into $20$ sub-sequences $\xi_1,\xi_2,... ,\xi_{20}$ of equal length.
Then we construct $20$ cumulative incremental sequences $\xi_1,\xi_{1\rightarrow 2},... ,\xi_{1\rightarrow 20}$ as the input of our algorithms for evaluation under different incremental sizes.
Each cumulative incremental sequence $\xi_{1 \rightarrow t}$ has a size of $\frac{N}{T}t = 7509t $, which is $5\% \sim 100\%$ of the total edge number of $G_0$ (i.e., the incremental percentage).
Table~\ref{datasets} shows the three dynamic graph datasets generated based on the original graph and $3 \times 20$ cumulative incremental sequences.
In addition, the original two-dimensional encoding tree is constructed based on the node communities generated by Louvain~\cite{louvain}.

\begin{table}[]
\caption{Generated dynamic graph datasets.}
\centering
\begin{threeparttable}
\begin{tabular}{@{}c|ccc|c@{}}
\toprule
\multirow{2}{*}{\begin{tabular}[c]{@{}c@{}}Dynamic\\ Graph $\mathcal{G}$\end{tabular}} & \multicolumn{3}{c|}{Nodes} & \multirow{2}{*}{Edges} \\ \cmidrule(lr){2-4}
& Hawkes\tablefootnote{Hawkes denotes ``Hawkes Process Dataset''.}  & Triad\tablefootnote{Triad means ``Triad Closure Process Dataset''.}   & PBP\tablefootnote{PBP represents ``Partitioning-based Process Dataset''.}  \\ \midrule
$G_0$               & 2000     & 2000    & 2000  & 150187                 \\
$G_1$               & 2398     & 2378    & 2391  & 157697                 \\
$G_2$               & 2779     & 2767    & 2756  & 165207                 \\
$G_3$               & 3144     & 3174        & 3123  & 172717                 \\
$G_4$               & 3508     & 3528        & 3542  & 180227                 \\
$G_5$               & 3876     & 3892        & 3913  & 187737                 \\
$G_6$               & 4243     & 4241        & 4306  & 195247                 \\
$G_7$               & 4617     & 4620        & 4690  & 202757                 \\
$G_8$               & 5019     & 5009        & 5033  & 210267                 \\
$G_9$               & 5415     & 5394        & 5428  & 217777                 \\
$G_{10}$            & 5781     & 5796        & 5795  & 225287                 \\
$G_{11}$            & 6155     & 6125        & 6154  & 232797                 \\
$G_{12}$            & 6481     & 6498        & 6528  & 240307                 \\
$G_{13}$            & 6838     & 6860        & 6879  & 247817                 \\
$G_{14}$            & 7204     & 7251        & 7279  & 255327                 \\
$G_{15}$            & 7591     & 7590        & 7619  & 262837                 \\
$G_{16}$            & 7958     & 7943        & 8012  & 270347                 \\
$G_{17}$            & 8331     & 8295        & 8366  & 277857                 \\
$G_{18}$            & 8683     & 8683        & 8710  & 285367                 \\
$G_{19}$            & 9076     & 9056        & 9087  & 292877                 \\
$G_{20}$            & 9434     & 9415        & 9486  & 300347                 \\ \bottomrule
\end{tabular}
\end{threeparttable}
\label{datasets}
\end{table}

\subsection{Results and Analysis}
In this section, we first give the time consumption of our incremental algorithms and baselines and analyze the speedup.
Second, we discuss the relative error of the updated structural entropy between our algorithms and baselines.
Lastly, we conduct statistical experiments to confirm the convergence of the Local Difference and its first-order absolute moment.

\subsubsection{Time Consumption Evaluation}
\begin{figure}[htbp]
	\centering
    \subfigure[Hawkes Process Dataset]{
    \includegraphics[scale=0.54]{figures/hawkes_time_1d.pdf}
    \label{hawkes_timecost_1d}
    }

    \subfigure[Triad Closure Process Dataset]{
    \includegraphics[scale=0.54]{figures/triad_time_1d.pdf}
    \label{triad_timecost_1d}
    }

    \subfigure[Partition-based Process Dataset]{
    \includegraphics[scale=0.54]{figures/random_time_1d.pdf}
    \label{random_timecost_1d}
    }
	\caption{Time consumption of Incre-1dSE \& 1d-RFS on three datasets.}
	\label{time-consumption-1d}
\end{figure}

\begin{figure}[htbp]
	\centering
    \subfigure[Hawkes Process Dataset]{
    \includegraphics[scale=0.54]{figures/hawkes_time_2d.pdf}
    \label{hawkes_timecost_2d}
    }

    \subfigure[Triad Closure Process Dataset]{
    \includegraphics[scale=0.54]{figures/triad_time_2d.pdf}
    \label{triad_timecost_2d}
    }

    \subfigure[Partition-based Process Dataset]{
    \includegraphics[scale=0.54]{figures/random_time_2d.pdf}
    \label{random_timecost_2d}
    }
	\caption{Time consumption of Incre-2dSE \& 2d-RFS on three datasets.}
    \label{time-consumption-2d}
\end{figure}

In this part, we evaluate the time consumption of \textit{Incre-1dSE} and \textit{Incre-2dSE} and baselines, i.e., 1d-RFS and 2d-RFS.
We define $SP_t = {C^R_t} / {C^M_t}$ as the speedup of our algorithms with respect to the baselines at time $t$, where $C^R_t$ denotes the time consumption of the RFS algorithms and $C^M_t$ denotes the time consumption of the measurement stage of our algorithms.
Fig.~\ref{time-consumption-1d} and Fig.~\ref{time-consumption-2d} summarize the time consumption evaluation results.
In one-dimensional cases, the speedup reaches $3.3$, $3.4$, and $2.9$ in Fig.~\ref{hawkes_timecost_1d},~\ref{triad_timecost_1d}, and~\ref{random_timecost_1d}, respectively, when the incremental percentage is $100\%$.
Meanwhile, the time consumption of the initialization stage of \textit{Incre-1dSE} is $3.23 (\pm 0.50) \times 10^{-3}\mathrm{s}$, which can be neglected when the incremental size is large e
nough.
In two-dimensional cases, the speedup becomes $17$, $10$, and $6$ in Fig.~\ref{hawkes_timecost_2d},~\ref{triad_timecost_2d}, and~\ref{random_timecost_2d} when the incremental percentage is $100\%$.
When the incremental percentage is less than $10\%$, the speedup reaches at least $32$ on all three datasets.
Moreover, the time consumption of the initialization stage of \textit{Incre-2dSE} is $6.98 (\pm 0.51) \times 10^{-2}\mathrm{s}$.

From the experimental results, we can see that \textit{Incre-1dSE} and \textit{Incre-2dSE} are significantly faster than baselines on all three dynamic graph datasets in both one- and two-dimensional cases.
The reason for this is that our algorithms incrementally measure the updated structural entropy by dynamically adjusting the encoding tree and by utilizing the information of the original graph.
On the contrary, the RFS algorithms reconstruct the encoding tree (for two-dimensional cases) and calculate the structural entropy through the definition formula ignoring the original graph's information.
In addition, we also notice that the speedup of one-dimensional cases increases with the incremental size, while the speedup of two-dimensional cases increases as the incremental size decreases.
We give our explanation as follows.
For one-dimensional cases, the time complexity of \textit{Incre-1dSE} (the measurement stage) and 1d-RFS is $O(n)$ and $O(|\mathcal{V}_t|+n)$, respectively.
In the process of generating datasets, the probability of adding new nodes is constant.
Therefore, we assume that the updated node number $|\mathcal{V}_t|$ increases linearly with the incremental size $n$, i.e., $|\mathcal{V}_t| = |\mathcal{V}_0|+\epsilon_0 n$, where $\epsilon_0$ is a constant.
Then the speedup of one-dimensional cases can be approximately represented by
\begin{align}
SP^1_{t} &= \frac{a_1(|\mathcal{V}_0|+\epsilon_0 n) + b_1 n + c_1}{a_2 n + c_2},
\end{align}
where $a_1, a_2, b_1, c_1, c_2$ are all constants.
Since the time consumption in one-dimensional case is small, the additional constant execution time ($c_1$ and $c_2$) caused by function call, etc., can not be ignored.
When $(a_1 \epsilon_0 + b_1)c_2 > a_2c_1 + a_1a_2|\mathcal{V}_0|$, we have $\mathrm{d} SP_t / \mathrm{d}  n > 0$, and thus the speedup $SP_t$ increases with the incremental size $n$.
For two-dimensional cases, the time complexity of \textit{Incre-2dSE} (the measurement stage) and 2d-RFS with Louvain is $O(n)$ and $O(|\mathcal{V}_t|\log |\mathcal{V}_t|+|\mathcal{E}_t|+n)$, respectively.
Then the speedup of two-dimensional cases can be approximately represented by
\begin{align}
SP^2_{t} &= \frac{a_1|\mathcal{V}_t|\log |\mathcal{V}_t|+b_1|\mathcal{E}_t|+ k_1 n + c_1}{a_2 n + c_2},
\end{align}
where $a_1, a_2, b_1, k_1, c_1, c_2$ are all constants.
In the two-dimensional cases, the constant time consumption $c_1$ and $c_2$ are much smaller than the total cost and thus can nearly be ignored.
Therefore when $n\rightarrow 0$, the speedup in two-dimensional cases gradually increases and finally reaches $SP^2_{0} = \frac{1}{c_2}(a_1|\mathcal{V}_0|\log |\mathcal{V}_0|+b_1|\mathcal{E}_0| + c_1)$.

\subsubsection{Error Evaluation}
The relative error between our algorithms and baselines is caused by the difference between the updated and the reconstructed encoding trees.
For an updated graph, the one-dimensional encoding tree is unique.
So the relative error between \textit{Incre-1dSE} and 1d-RFS is always $0$.
For two-dimensional cases, the relative error between \textit{Incre-2dSE} and 2d-RFS is shown in Table~\ref{error table}.
In the Hawkes Process Dataset, the relative error is within $1\%$, and the maximum mean error is $5.88\times 10^{-1}\%$.
In the Triad Closure Process Dataset, the relative error is within $2\%$, and the maximum mean error is $1.42\%$.
In these two datasets, the relative error increases with the incremental size.
This is because the community changes of the original nodes are captured by Louvain in 2d-RFS but are neglected by the dynamic adjustment strategy in \textit{Incre-2dSE}.
These community changes lead to a divergence between the encoding trees of \textit{Incre-2dSE} and 2d-RFS, which gradually increases with the incremental size.
In the Partitioning-based Process Dataset, the relative error is almost $0$ (within $10^{-10}\%$), and the maximum mean error is $1.32\times 10^{-11}\%$.
The reason for this is that Partitioning-based Process mainly adds edges between nodes in the same community, which almost does not affect the community division of the original nodes.

\begin{table}[]
\caption{Relative Error between Incre-2dSE \& 2d-RFS.}
\begin{tabular}{@{}c|ccc@{}}
\toprule
$t$ & Hawkes $(\times 10^{-1} \%)$ & Triad $(\%)$ & PBP $(\times 10^{-12} \%)$ \\ \midrule
1   & $0.14 \pm 0.01$              & $0.01 \pm 0.00$   & $-0.39 \pm 0.00$           \\
2   & $0.62 \pm 0.01$              & $0.02 \pm 0.00$   & $0.78 \pm 0.00$            \\
3   & $1.35 \pm 0.03$              & $0.06 \pm 0.00$   & $-2.15 \pm 0.00$           \\
4   & $-5.85 \pm 0.02$             & $0.10 \pm 0.00$   & $-2.19 \pm 0.00$           \\
5   & $-4.88 \pm 0.02$             & $0.14 \pm 0.00$   & $-0.47 \pm 0.00$           \\
6   & $-3.80 \pm 0.02$             & $0.19 \pm 0.00$   & $-7.71 \pm 0.00$           \\
7   & $-2.47 \pm 0.06$             & $0.28 \pm 0.00$   & $4.65 \pm 0.00$            \\
8   & $-1.13 \pm 0.03$             & $0.36 \pm 0.00$   & $2.81 \pm 0.00$            \\
9   & $-0.51 \pm 0.06$             & $0.45 \pm 0.00$   & $-7.93 \pm 0.00$           \\
10  & $0.30 \pm 0.09$              & $0.54 \pm 0.00$   & $1.92 \pm 0.00$            \\
11  & $0.97 \pm 0.06$              & $0.64 \pm 0.00$   & $-3.83 \pm 0.00$           \\
12  & $1.86 \pm 0.12$              & $0.77 \pm 0.00$   & $-1.26 \pm 0.00$           \\
13  & $2.48 \pm 0.09$              & $0.24 \pm 0.80$   & $2.32 \pm 0.00$            \\
14  & $3.10 \pm 0.15$              & $0.98 \pm 0.00$   & $-0.96 \pm 0.00$           \\
15  & $3.28 \pm 1.60$              & $0.88 \pm 0.37$   & $-7.41 \pm 0.00$           \\
16  & $4.50 \pm 0.24$              & $1.17 \pm 0.01$   & $-8.88 \pm 0.00$           \\
17  & $4.86 \pm 0.18$              & $1.08 \pm 0.39$   & $-0.90 \pm 0.00$           \\
18  & $5.36 \pm 0.17$              & $1.36 \pm 0.02$   & $-19.9\pm 0.00$            \\
19  & $7.06 \pm 3.32$              & $1.12 \pm 0.50$   & $-17.0 \pm 0.00$           \\
20  & $5.88 \pm 4.30$              & $1.42 \pm 0.36$   & $-13.2 \pm 0.00$           \\ \bottomrule
\end{tabular}
\label{error table}
\end{table}

\subsubsection{Convergence Evaluation}
In this part, we conduct a statistical experiment to confirm the convergence of the one-and two-dimensional Local Difference and their first-order absolute moments.
We first generate original graphs with increasing total edge number from $480$ to $24000$.
Based on each original graph, we generate $30$ incremental sequences with size $n$ sampling from a normal distribution with a mean of $100$ and a standard deviation of $10$.
These incremental sequences are generated by Partitioning-based Process with random parameters $p_\mathrm{pin}\in [0,0.8)$ and $p_\mathrm{pac}\in[0,0.1)$.
We then count the one- and two-dimensional Local Difference and their upper bounds.
The results are shown in Fig.~\ref{moment_plot_figure_1d} and Fig.~\ref{moment_plot_figure_2d}.
As the total edge number increases from $1$ to $50$ times, the mean value of the one- and two-dimensional Local Difference gradually decreases by $96.27\%$ (from $1.20$ to $0.04$) and $95.98\%$ (from $1.08$ to $0.04$), respectively, and are always positive.
This solidly supports the convergence of the one- and two-dimensional Local Difference and their first-order absolute moments.
Moreover, the one- and two-dimensional Local Difference is always below their upper bounds, which confirms the validity of our bounds.

\begin{figure}[ht]
\centering
\includegraphics[scale=0.45]{figures/moment_plot_figure_1d_exp.pdf}
\caption{The statistics of the one-dimensional Local Difference and its upper bound.}
\label{moment_plot_figure_1d}
\end{figure}
\begin{figure}[ht]
\centering
\includegraphics[scale=0.45]{figures/moment_plot_figure_2d_exp.pdf}
\caption{The statistics of the two-dimensional Local Difference and its upper bound.}
\label{moment_plot_figure_2d}
\end{figure}

\section{Related Works}\label{sec:relatedworks}
\noindent \textbf{Graph Entropy.}
Many efforts have been devoted to measuring the information of graphs.
The graph entropy was first defined and investigated by Rashevsky~\cite{rashevsky1955life-c1}, Trucco~\cite{trucco1956note-c2}, and Mowshowitz~\cite{mowshowitz1967entropy}.
After them, a different graph entropy closely related to information and coding theory was proposed by Körner\cite{korner1973coding-c7}.
Later, Bianconi~\cite{bianconi2009entropy} introduced the concept of ``structural entropy of network ensembles," known as the Gibbs entropy.
Anand et al.~\cite{anand2009entropy} proposed the Shannon entropy for network ensembles.
Braunstein et al.~\cite{braunstein2006laplacian} proposed the von Neumann graph entropy based on the combinatorial graph Laplacian matrix.
These three metrics \cite{bianconi2009entropy, anand2009entropy, braunstein2006laplacian} are defined by statistical mechanics and are used to compare different graph models.
The structural entropy method proposed by Li et al.~\cite{structural-entropy} provides an approach to measuring the high-dimensional information embedded in graphs and can further decode the graph's hierarchical abstracting by an optimal encoding tree.

\noindent \textbf{Fast Computation for Graph Entropy.}
Chen et al.~\cite{chen2019fast} proposed a fast incremental von Neumann graph entropy computational framework, which reduces the cubic complexity to linear complexity in the number of nodes and edges.
Liu et al.~\cite{liu2022similarity, liu2021bridging} used the structural entropy~\cite{structural-entropy} as a proxy of von Neumann graph entropy for the latter's fast computation, and also implement an incremental method for one-dimensional structural entropy.
In this paper, we mainly focus on the incremental computation for both the one- and two- dimensional structural entropy based on our dynamic adjustment strategies for encoding trees.
\section{Conclusion} \label{sec:conc}
In this paper, we propose a novel incremental structural entropy measurement method in dynamic graphs scenarios, which avoids reconstructing the encoding tree and significantly accelerates the measurement.
We theoretically prove the convergence of the one- and two-dimensional Local Difference and their first-order absolute moments.
Experimental results show that our incremental algorithms, on average, achieve up to $3$ times speedup for one-dimensional cases and at least $11$ times speedup for two-dimensional cases.
In the future, we aim to develop incremental measurement methods for higher dimensional structural entropy.

redpajama_set_name: RedPajamaArXiv


Founded in 1985, Chief Executive Women now represents more than 550 of Australia's most senior and distinguished women leaders, whose shared vision is Women Leaders Enabling Women Leaders.
We strive to educate and influence all levels of Australian business and government on the importance of gender balance. Through advocacy, targeted programs and scholarships, CEW works to remove the barriers to women's progression and ensure equal opportunity for prosperity.
CEW's programs are informed by research, led by CEW members, and generously supported by our partners.
Female graduates outnumber men at record levels in Australia, yet start out earning 90 cents for every dollar their male counterparts earn. The pay gap widens over time, with an overall average pay differential of around 18.75%.
Fewer women than men participate in the paid workforce – 77.7% for women, compared to more than 90.3% for men – and part time work is dominated by women, when only around 6.4% of part-time jobs are managerial.
Some women make it to positions of leadership and decision making, but not many. Only 7% of CEOs in the ASX200* are women. For women in the Australian workforce, it's a long way to the top.