# Structural Hierarchy-Enhanced Network Representation Learning
## 3 The Proposed SHE-NRL Model  
The proposed SHE-NRL consists of four phases: (1) construction of structural hierarchy, (2) intra-level NRL, (3) level-wise pooling mechanism, and (4) generating final node embeddings. We first elaborate these four phases based on Figure 2. First, we construct the structural hierarchy by performing network community detection algorithm from lower- to higher-level graphs. Second, an existing or state-of-the-art NRL method is performed at the level-\(h\) graph (the original graph is level-0 graph) to generate level-\(h\) node embeddings. Third, a level-wise pooling mechanism is utilized to aggregate level-\(h\) node embeddings to not only initialize the level-(\(h+1\)) node embeddings for its NRL in a bottom-up manner, but also to initialize the level-(\(h-1\)) node embeddings for level-(\(h-1\) \begin{table}
\begin{tabular}{c l} \hline \hline
**Notation** & **Description** \\ \hline \(G=(V,E)\) & the original graph with node set \(V\) and edge set \(E\) \\ \hline \(k\) & the embedding dimension \\ \hline \(n\) & the number of nodes in \(G\) \\ \hline \(\mathcal{H}\) & the structural hierarchy \\ \hline \(H^{h}\) & the level-\(h\) graph in \(\mathcal{H}\) \\ \hline \(\tau\) & the number of levels in \(\mathcal{H}\) \\ \hline \(C_{i}^{h}\) & the \(i\)-th community node in \(H^{h}\) \\ \hline \(e_{ij}^{h}\) & the edge that connects node \(C_{i}^{h}\) with node \(C_{j}^{h}\) in \(H^{h}\) \\ \hline \(D^{h}\) & the set of edges that connect community nodes in \(H^{h}\) \\ \hline \(\rho\) & the hyperparameter controlling the height of \(\mathcal{H}\) \\ \hline \(n_{h}\) & the number of nodes in \(H^{h}\) \\ \hline \(\mathbf{X}^{h}\) & the embeddings of nodes in \(H^{h}\) \\ \hline \(v_{j}^{h}\) & the \(j\)-th node in \(H^{h}\) \\ \hline \(\mathbf{x}_{v}^{h}\) & the embedding vector of node \(v\) in \(H^{h}\) \\ \hline \(\mathbf{x}_{v}^{h}\) & the new-initialized embedding vector of node \(v\) in \(H^{h}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Table of notations. NRL in a top-down manner. The second and third phases are performed iteratively until the highest level of the hierarchy is reached. Lastly, the final node embeddings can be produced by concatenating node embeddings at different levels based on their community memberships. Phase 1: Construction of Structural Hierarchy. The structural hierarchy \(\mathcal{H}\) is constructed from a network \(G\). By applying a certain community detection algorithm to level-\(h\) graph \(H^{h}\), we can obtain a set of communities (i.e., node sets) \(\mathcal{C}^{h}=\{\mathcal{C}^{h}_{1},\mathcal{C}^{h}_{2},...,\mathcal{C}^{h}_ {n_{h}}\}\), where \(n_{h}\) is the number of communities in \(H^{h}\), and \(\mathcal{C}^{h}_{i}\) is the \(i\)-th community. These communities are treated as nodes at level-\((h+1)\) graph \(H^{h+1}\), given by:  
\[H^{h+1}=(\mathcal{C}^{h},\mathcal{D}^{h}), \tag{1}\]  
where \(\mathcal{D}^{h}\) is the set of edges that connect communities. For every pair of communities \(\mathcal{C}^{h}_{i}\) and \(\mathcal{C}^{h}_{j}\), we create an edge \(e^{h+1}_{ij}\) to connect them in \(H^{h+1}\) if there exists at least one edge between nodes in \(\mathcal{C}^{h}_{i}\) and nodes in \(\mathcal{C}^{h}_{j}\) in \(H^{h}\). To adaptively determine the number of communities \(n_{h}\) for every graph \(H^{h}\), we utilize Louvain [14] algorithm for community detection. We do not pre-define the number of levels \(\tau\) in the hierarchy, but continue to produce \(H^{h+1}\) from \(H^{h}\) until \(n_{h}<\rho\), where \(\rho\) is a hyperparameter controlling the height of the hierarchy. We set \(\rho=5\) by default. In other words, we will not generate level-\((h+1)\) graph \(H^{h+1}\) if the number of nodes \(n_{h}\) in \(H^{h}\) is lower than \(\rho\). In other words, the hyperparameter \(\rho\) is the minimum number of communities at the last (highest) level of the hierarchy, rather than the hierarchy height. Another hyperparameter \(\tau\), described in Phase 2, is the  
Figure 2: Overview of the proposed SHE framework.