## 2 Community Detection across Space and Its Variation across Time
### Community Detection across Space
#### 2.2.1 Similarity of Nodes
The detail is as follows:  
\[Attr_{(N_{i}N_{j})}=\prod_{k=i}^{k=j-1}f_{(N_{k}N_{k+1})} \tag{4}\]  
It should be noted that there might be multiple paths between nodes \(N_{i}\) and \(N_{j}\), and thus there could be more than one attraction degree value for our analysis. In this regard, we choose the largest-weight path between \(N_{i}\) and \(N_{j}\) to calculate the attraction degree. In general, the nodes directly or indirectly connected by a larger-weight path have a stronger mutual relationship. Compared to the indirectly connected nodes, the directly connected nodes have a higher probability to be attracted by each other. In Figure 3, there are three paths from \(N_{1}\) to \(N_{6}\), including path 1 (PT1: \(N_{1}{\rightarrow}N_{2}{\rightarrow}N_{6}\)), path 2 (PT2: \(N_{1}{\rightarrow}N_{5}{\rightarrow}N_{6}\)), and path 3 (PT3: \(N_{1}{\rightarrow}N_{2}{\rightarrow}N_{5}{\rightarrow}N_{6}\)). The weight of PT1 is \(W_{\text{PT1}}=2+1=3\), the weight of PT2 is \(W_{\text{PT2}}=1+3=4\), and the weight of PT3 is \(W_{\text{PT3}}=2+1+3=6\). The largest-weight path, between \(N_{1}\) and \(N_{6}\), is PT3. Thus, according to Equation (2) and Equation (3), \(Attr_{(N_{1},N_{2})}=0.8047\), \(Attr_{(N_{2},N_{5})}=0.5148\), \(Attr_{(N_{5},N_{6})}=0.9730\), and thus \(Attr_{(N_{1},N_{6})}=0.8047\times 0.5148\times 0.9730=0.4031\) (Equation (4)). Besides the strength of connectivity between nodes, the local structure of a graph is also critical to cluster nodes. More specifically, for any pair of nodes connected by a path, the greater proportion their path weight has in the total weight of their neighbors, the more similar the two nodes are. In a local structure, the nodes with a relatively stronger linkage tend to be grouped together. As a comparison, two nodes with a large connection could also be separated into different groups if one of them were to have another, stronger linkage to other nodes. To this end, we introduce structure similarity into our method, as follows. Our structure similarity indicator is inspired by the Jaccard similarity coefficient, which has been widely applied to describe the relevance among objects. Assuming \(X\) and \(Y\) are two sets, the Jaccard similarity coefficient is defined as follows:  
\[sim_{(X,Y)}=\frac{|X\cap\ Y|}{|X\cup\ Y|} \tag{5}\]  
In addition, in graph theory, it is believed that the critical structural factors of a graph are the links that have relatively larger weight [29]. In this regard, we define structure similarity based on local edges and associated weights, as presented in Definition 5. **Definition 5**. : _(Structure similarity): For two directly connected nodes \(N_{1}\) and \(N_{2}\), their structure similarity is as follows:_  
\[sim_{(N_{1},N_{2})}=\frac{W_{(N_{1},N_{2})}}{\sum_{c=1}^{d_{N_{1}}}W_{(N_{1},N _{lc})}+\sum_{c=1}^{d_{N_{2}}}W_{(N_{2},N_{2c})}-W_{(N_{1},N_{2})}} \tag{6}\]  
_where \(W_{(N_{1},N_{lc})}\) is the weight of the edge connecting node \(N_{1}\) and its neighbor \(N_{1c}\), and \(W_{(N_{2},N_{2c})}\) is the weight of the edge connecting node \(N_{2}\) and its neighbor \(N_{2c}\). Equation (6) can be only used to measure the structure similarity of directly connected nodes, and in order to analyze the relationships between indirectly connected nodes, we extend Equation (6), as follows:_  
\[sim_{(N_{i}N_{j})}=\prod_{k=i}^{k=j-1}sim_{(N_{k},N_{k+1})} \tag{7}\]_where \(N_{k}\) and \(N_{k+1}\) are two directly connected nodes on the path connecting \(N_{i}\) and \(N_{j}\)._  
In addition, we choose the largest-weight path between \(N_{i}\) and \(N_{j}\) to calculate the structure similarity. Generally, the directly connected nodes have a larger structure similarity than the indirectly connected nodes do. In Figure 3, \(\sum_{j=1}^{d_{N_{1}}}W_{1j}=6\), \(\sum_{j=1}^{d_{N_{5}}}W_{5j}=5\), \(W_{(N_{1},N_{5})}=1\), \(sim_{(N_{1},N_{5})}=\frac{1}{6+5-1}=0.1\).