# Multi-Layer Feature Fusion-Based Community Evolution Prediction
## 3 Multi-Layer Feature Fusion-Based Community Evolution Prediction
### Global- and Local-Based Community Role Extraction  
This section introduces the global and local-based community role-extraction algorithm in detail. \begin{table}
\begin{tabular}{c c} \hline \hline
**Feature** & **Calculation Formula** \\ \hline degree & \(D_{v}=|Nei_{v}|\) \\ Size & \(S=|V|\) \\ Density & \(det(C)=\frac{\sum_{v}D_{v}}{|C|\times|C|-1}\) \\ Cohesion & \(\zeta_{c}=\frac{det(C)}{\sum_{v}\frac{det(C)}{\sum_{v}\frac{det(C)}{\sum_{v} \frac{det(C)}{\sum_{v}\frac{det(C)}{\sum_{v}\frac{det(C)}{\sum_{v}\frac{det(C)}{ \sum_{v}\frac{det(C)}{\sum_{v}\frac{det(C)}{\sum_{v}\frac{det(C)}{\  
As mentioned above, in addition to leader nodes, there are many other types of nodes in the community, which will also affect the evolution of the community. We refer to different types of nodes in the community as community roles, which are specifically defined as follows:  
**Definition 1** (Community role). : _The community role classifies nodes according to the structural features of nodes. Community role describes the different features of nodes in the community. Nodes belonging to different roles will have different effects on the evolution of the community._  
In contrast to traditional role extraction, the discovery of community role not only needs to consider the network structure features of the node, but also needs to consider the community structure features of the node. Therefore, it is difficult to accurately discover community roles using traditional role-extraction algorithms. To accurately discover the community role, we propose the global- and local-based community role-extraction algorithm (GLRE). In this algorithm, global refers to the whole network, and local refers to the community where the node is located. GLRE obtains the community role mainly by obtaining the community role attribution matrix. The definition of the community role attribution matrix is as follows:  
**Definition 2** (Community role attribution matrix). : _The community role attribution matrix \(R\) reflects the probability that a node belongs to each community role. The role can be assigned to nodes in the community through this matrix._  
To obtain the community role attribution matrix, GLRE first calculates the structural features of the node from the global scope and the local scope. Then, GLRE constructs the global and local feature matrix. The features used in GLRE are the node features mentioned in Section 3.1. After obtaining the global and local feature matrices, GLRE decomposes the two matrices simultaneously through NMF to obtain the community role attribution matrix. The rest of this section will introduce the process of the GLRE algorithm in detail. First, GLRE calculates the features of nodes in the global and local scores and constructs the global and local feature matrix \(\xi_{C}\) and \(\ell_{C}\). It is worth pointing out that when calculating the features of a node from a local scope, GLRE will ignore nodes that do not belong to the community. Figure 1 is an example. Among them, nodes of the same color belong to the same community. For node 1 in the graph, its degree is 4. Among the neighbors of node 1, two nodes belong to the same community as node 1, and two nodes belong to different communities from node 1. When computing node features from the global scope, the degree of node 1 is 4, as shown on the left. When computing node features from a local scope, the degree of node 1 is 2, as shown on the right. After obtaining the global and local feature matrices of the community, GLRE uses NMF to decompose matrix \(\xi_{C}\) and \(\ell_{C}\) to obtain the community role attribution matrix. To consider both the global and local features of the node in the NMF, we design an effective loss function so that GLRE can decompose matrix \(\xi_{C}\) and \(\ell_{C}\) at the same time in the NMF.