# Community Detection Based on Graph Representation Learning in Evolutionary Networks
## 4 Methods  
The proposed algorithm employs a Laplacian matrix to map the nodes with directly connected edges in the network structure of the last time slice to the deep sparse autoencoder representation layer. It is beneficial to retain the node information of the network of the last time slice, and it is not easy to lose the historical evolution information of the network. Meanwhile, the temporal smoothness affects the structure of the evolutionary network and, thus, is taken into account in the graph representation learning algorithm. Furthermore, the deep sparse autoencoder is used to represent the network structure under the current time slice of the evolution network, to obtain a better expression of the characteristics of the network structure, and then the representation vector of the node is achieved. Finally, the \(K\)-means clustering algorithm is used to cluster the low-dimensional feature matrix of the network structure under the current time slice to obtain the community structure. For the network structure of continuous-time slices, we successively utilize the information between the node pairs of the network structure under the last time slice. The network structure of the current time slice is learned and presented through the deep sparse autoencoder, and then the low-dimensional representation matrix of the network structure of the current time slice is obtained. The following shows the process of the proposed algorithm:  
1. Initialize the relevant parameters and load the dataset. 2. Based on the breadth-first traversal algorithm to traverse the network structure adjacency matrix of the current time slice. 3. Calculate the degree by using the path length to obtain the proximity matrix. 4. Use a Laplacian Matrix to obtain the information of directly connected nodes in the network of a time slice, and the features of the proximity matrix of the network under the current time slice are extracted by employing a deep sparse autoencoder. 5. Use the \(K\)-means algorithm to obtain the network community structure under the current time slice. The proposed algorithm (Algorithm 1) is based on the TensorFlow framework, and its pseudocode is as follows. In this pseudocode, the Breadth-first traversal algorithm is used to convert the adjacency matrix \(A_{t}\) into the proximity matrix \(M_{t}\), and then to input it into the deep sparse autoencoder for encoding. Simultaneously, we use the adjacency matrix \(A_{t-1}\) to calculate the Laplacian matrix, to map the node information with directly connected edges to the presentation layer of the deep sparse autoencoder, and to obtain the result of the presentation layer--that is, the required low-dimensional matrix representation vector \(Y_{t}\). Finally, the \(K\)-means clustering algorithm is used to cluster the low-dimensional matrix representation vector \(Y_{t}\), and the community results are obtained. ```
Input: Evolution graph \(G\), adjacency matrix \(A_{t-1}\), adjacency matrix \(A_{t}\), number of communities \(k\), path length threshold \(L_{e}\), degree of attenuation \(\alpha\), deep sparse autoencoder with 3 layers, number of nodes in each layer of the deep autoencoder \(d^{(i)}\), \(i=1,2,3\), Output: Community results \(Com_{t}=\{c_{1},\,c_{2},\ldots,c_{k}\}\).