# Community Detection Framework Using Deep Learning in Social Media Analysis
## 3 Proposed Community Detection Framework
### Feature Matrix Computation  
The topology creation process in a GCN involves defining the graph structure by identifying nodes and edges. During the forward pass of the network, the topology  
Figure 1: Workflow of the proposed community detection framework. defines which nodes are considered neighbors. The GCN aggregates the characteristics of these neighbors from the topology creation process and the content features between neighbors. By integrating topology with feature calculations, GCNs can effectively capture the underlying patterns in complex networks. Feature matrix computation in community detection involves generating a feature matrix that represents the characteristics of nodes in a graph. This matrix is then used as input for a community detection algorithm to identify communities or clusters of nodes with similar characteristics. To construct the feature matrix, various features of each node in the graph are computed. These features could be based on node attributes such as user demographic information, user activity patterns, network connectivity, content analysis of posts, sentiment analysis of posts, and other relevant features that can capture the behavior and characteristics of nodes in the graph. Once the features are computed, they are organized into a matrix format where each row represents a node and each column represents a feature. This matrix is then used as input to community detection algorithms such as spectral clustering, modularity optimization, or label propagation to partition the nodes into communities. The choice of features and the method of computing the feature matrix are critical for accurate community detection. The feature matrix should be designed such that it captures the underlying structure of the network and the nodes within it. Additionally, the feature matrix should be normalized to avoid bias towards any specific feature, and the feature selection process should be guided by domain knowledge and data analysis to ensure that relevant features are included. The GNN is a neural network structure designed to process graph data based on CNNs, recurrent neural networks, and auto-encoder algorithms. The GCN, one of the GNN algorithms, is initially applied to data such as images and later extended to graph data in order to capture relationships between nodes (e.g., users in a social network) and their features. GCNs work by aggregating information from a node's neighbors to update its representation, effectively learning how to combine features based on the graph's topology. This process allows GCNs to capture complex patterns and dependencies in the data, making them particularly effective for tasks like community detection, node classification, and link prediction. The core idea is to learn a mapping function f and learn the graph-level feature expression H through the topology graph G. For the multi-level GCN structure, the mapping function formula on each level is as Equation (1):  
\[f(H^{(l+1)},A)=\sigma(D^{-1/2}\;(A+I)D^{-1/2}\;H^{(l)}W^{(l)}), \tag{1}\]  
where \(H^{(l)}\in R^{N\times d(l)}\) is the feature matrix of the node on the \(l_{th}\) level, N is the number of nodes, and \(d^{(l)}\) represents the feature dimension of the node on the \(l_{th}\) level. \(D\) is the degree matrix, \(A\) is the adjacency matrix, and \(W^{(l)}\) is the weight parameter matrix of the node on the \(l_{th}\) level. In the GCN algorithm for social network analysis, the node feature of the graph refers to the user feature in the social network. In order to incorporate the textual semantics of user communication into the user feature matrix, we use the Node2 Vec method based on Word2 Vec. Word2 Vec is selected for its proven ability to capture the semantic relationships between words, which is critical for analyzing communication content within social networks. Its use allows us to transform raw text into meaningful vector representations that can effectively feed into further analysis.