Social recommendation method and system based on graph attention auto-encoder community discovery
By introducing graph attention autoencoder and self-supervised learning mechanism into the community discovery method, combined with the high credible group structure, the problems of high complexity and poor robustness of community discovery in large-scale complex networks are solved, and efficient and accurate community detection and social recommendation are achieved.
Patent Information
- Application Number
- CN202411925251.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-08
AI Technical Summary
Existing community discovery methods have high computational complexity and poor robustness when dealing with large-scale and complex networks, especially in high-noise data or dynamically changing networks. Relying on preset graph model assumptions, it is difficult to fully capture the local characteristics and global relationships of nodes.
The self-supervised community discovery method based on the graph attention autoencoder is adopted. The graph attention encoder encoder encoder encoder encoder encoder encoder encoder encoder encoder encoder reconstructs loss calculation, and combines high-trusted group structure and self-supervised signal to obtain community discovery results using K-means clustering analysis.
It improves the computing efficiency and robustness of community discovery, can accurately capture community structure without label data, improves the accuracy of social recommendation methods, and maintains good robustness in high-noise data environments.
Smart Images

Figure CN119782634A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data mining in complex networks, and in particular to a social recommendation method and system based on community discovery of graph attention autoencoders. Background Art
[0002] With the rapid development of information technology and data analysis technology, complex network analysis has become an important tool for studying the structure and dynamic behavior of complex systems. In various applications such as social networks, biological networks, and transportation networks, community detection, as one of the key tasks of network analysis, aims to reveal the potential grouping structure of nodes in the network. These communities often represent groups of nodes with high internal connections or specific functions in the network, and are an important basis for understanding network functions, predicting user behavior, and optimizing network design.
[0003] Traditional community discovery methods are mainly based on graph theory and statistical models, including modularity optimization, random walks, spectral clustering, etc. These methods can effectively identify community structures in networks to a certain extent, but their processing capabilities for large-scale and complex networks are relatively limited. In particular, in high-noise data or dynamically changing networks, traditional methods often exhibit problems such as high computational complexity and poor robustness. In addition, these methods usually rely on preset graph model assumptions, making it difficult to fully capture the local characteristics and global relationships of nodes in complex networks.
[0004] With the development of deep learning technology, Graph Neural Networks (GNNs) have gradually been introduced into community discovery tasks. These methods use neural networks to learn deep representations of node features and topological structures, providing new ideas for community segmentation in complex networks. For example, convolution-based graph neural networks (such as Graph Convolutional Networks, GCNs) can effectively capture local neighborhood information of nodes, and attention-based models (such as Graph Attention Networks, GATs) can dynamically adjust the association weights between nodes, thereby more accurately characterizing the characteristics of complex networks. However, these methods usually rely on unsupervised objective functions for optimization, lack the guidance of real labels, and easily cause model training to fall into local optimal solutions, affecting the accuracy of community discovery and adversely affecting the results of downstream tasks.
[0005] In response to the problem of lack of label guidance in unsupervised learning, self-supervised learning methods have gradually become an effective solution. By constructing pseudo-labels or generating contrastive learning objectives, self-supervised learning can provide effective supervision signals for the model without real labels, improving the model's learning ability on unlabeled data. In recent years, the application of self-supervised learning in graph neural networks has made significant progress, especially in community discovery tasks, where the generation of pseudo-labels and the construction of self-supervisory signals directly affect model performance. However, most existing methods lack credibility when generating pseudo-labels, easily introduce noise, and affect the training effect of the model.
[0006] To overcome the shortcomings of the prior art, the present invention proposes a self-supervised community discovery method based on graph attention autoencoder (GAAE) and applies it to the social recommendation method. By introducing a self-supervised learning mechanism, the present invention can accurately capture the community structure and improve the accuracy of the social recommendation method without labeled data. Summary of the invention
[0007] Technical issues: Existing community discovery methods have high computational complexity and poor robustness when dealing with large-scale, complex networks, especially in high-noise data or dynamically changing networks. In addition, these methods usually rely on preset graph model assumptions and have difficulty in fully capturing the local features and global relationships of nodes in complex networks. Although deep learning techniques such as graph neural networks (GNNs) have been applied to community discovery, they usually rely on unsupervised objective functions for optimization and lack the guidance of real labels, which can easily cause model training to fall into local optimal solutions, affecting the accuracy of community discovery and adversely affecting the effectiveness of downstream tasks.
[0008] The present invention aims to solve the following technical problems:
[0009] 1. Provide a community discovery method that can effectively handle large-scale and complex networks to improve computational efficiency and robustness.
[0010] 2. Develop a method that can comprehensively capture the local characteristics and global relationships of nodes in complex networks without relying on preset graph model assumptions.
[0011] 3. By introducing a self-supervised learning mechanism, the problem of lack of label guidance in unsupervised learning is solved, and the accuracy of the model in community discovery on unlabeled data is improved.
[0012] 4. Based on efficient community discovery methods, design a highly accurate social recommendation method to improve the recommendation accuracy in social recommendation methods.
[0013] In summary, the purpose of the present invention is to solve the problems of low computational efficiency, poor robustness and lack of labels in unsupervised learning encountered by existing community discovery methods when processing large-scale and complex networks, thereby improving the accuracy and efficiency of community discovery.
[0014] In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0015] The present invention provides a social recommendation method based on graph attention autoencoder community discovery, comprising the following steps:
[0016] Step 1: Encode the adjacency relationship and node attributes in the original topology graph through the graph attention encoder, and refine the multi-dimensional information of the node into a low-dimensional feature vector;
[0017] Step 2: Reconstruct the low-dimensional feature vector into an adjacency matrix through the inner product decoder and calculate the reconstruction loss;
[0018] Step 3: Calculate the high-confidence cluster structure in the topological graph and calculate the distance loss of the feature vectors between nodes in the cluster structure;
[0019] Step 4: Guide the graph attention self-encoder-decoder model to perform self-supervised training by minimizing the loss function. The graph attention self-encoder-decoder model is referred to as model.
[0020] Step 5: Use K-means to perform cluster analysis on the feature vectors to obtain community discovery results;
[0021] Step 6: Generate a recommendation list based on the community discovery results for recommendation.
[0022] Furthermore, in step 1, the process of encoding the adjacency relationship and node attributes in the topology graph is as follows:
[0023] Step 1.1: The main structure of the encoder is a three-layer neural network that introduces an attention mechanism, so that node representations can be propagated with different weights according to the importance of the nodes during the propagation process. The output of each layer of the graph attention network is expressed as:
[0024]
[0025] in, represents the representation vector of node i at layer l+1, N i represents all neighbor nodes of node i, α ij is the attention factor, representing the importance of node j to node i, σ is the nonlinear activation function, and W is the weight matrix, representing the weight parameters of the neural network;
[0026] Step 1.2: The calculation of the attention factor includes two parts. One part considers the attribute similarity between nodes. The more similar the node attributes are, the larger the attention factor is. The other part includes the topological distance relationship between nodes. The closer the topological distance is, the larger the attention factor is. The calculation process is as follows:
[0027]
[0028] Among them, δ is the activation function LeakyRELU, represents the similarity between node i and node j, W is the weight matrix, x i is the attribute vector of node i, It represents the sum of similarities of all neighbor nodes r of node i, M is the t-order transition probability matrix, M ij Represents the topological distance relationship between node i and node j, and its calculation process is as follows:
[0029] M=(B+B 2 +…+B t ) / t
[0030] Among them, B is the transfer matrix. When there is an edge connection between node i and node j, B ij =1 / d i , d i represents the degree of node i, otherwise B ij =0, t is a hyperparameter. The larger t is, the larger the number of topological hops that need to be considered.
[0031] Furthermore, in step 2, the process of decoding the node representation and calculating the reconstruction loss is as follows:
[0032] Step 2.1: The inner product decoder reconstructs the adjacency matrix of each node’s representation. The calculation process is as follows:
[0033]
[0034] in, is the reconstructed adjacency matrix, sigmoid is the activation function, Represents the transpose of the low-dimensional feature vector of node, z j Represents the low-dimensional feature vector of node j;
[0035] Step 2.2: Calculate the reconstruction loss L r , calculate the loss of the original adjacency matrix and the reconstructed adjacency matrix, the loss function is as follows:
[0036]
[0037] Among them, A i,j represents the element in the i-th row and j-th column of the adjacency matrix A, represents the element in the \(i\)-th row and \(j\)-th column of the reconstructed adjacency matrix.
[0038] Furthermore, in step 3, the process of calculating the high-trust clique structure in the graph and calculating the distance loss of nodes within the clique is as follows:
[0039] Step 3.1: Calculate the high-trust clique structure. By using recursive search and pivot optimization strategies, identify a set of tightly connected nodes in the original topology graph, that is, the clique structure;
[0040] Step 3.1.1: Preprocess and prune the original topology graph to exclude nodes with degrees less than \(k - 1\);
[0041] Step 3.1.2: Initialize variables. Define three sets required for recursive search: the set \(R\) of nodes in the currently constructed clique, which is initially empty; the set \(P\) of candidate nodes, which is initially all the remaining nodes after the exclusion in step 3.1.1; the set \(X\) of excluded nodes, which is initially empty. Among them, the set \(R\) of nodes in the currently constructed clique is simply referred to as the current clique \(R\);
[0042] Step 3.1.3: Pivot optimization. Reduce the number of recursive branches by selecting a pivot node \(u\) in \(P\cup X\), and use the neighbor set of \(u\) to limit the recursive branches, only dealing with nodes that are not connected to the neighbors of the pivot, providing a more efficient search space for the recursive search in step 3.1.4;
[0043] Step 3.1.4: Based on the variables initialized in step 3.1.2 and the optimized search space in step 3.1.3, deeply explore the topology graph recursively to identify all possible clique structures. The specific implementation includes the following steps:
[0044] Recursive search. For each candidate node \(v\) in the set \(P\) of candidate nodes initialized in step 3.1.2, add \(v\) to the current clique \(R\), update the candidate set \(P\) to the set of nodes adjacent to \(v\), update the set \(X\) of excluded nodes to the set of nodes adjacent to \(v\), recursively call until \(|R|+|P|\lt k\) or the size of \(R\) has reached \(k\), then record the current clique \(R\) and return. After backtracking, move \(v\) from the set \(P\) to the set \(X\);
[0045] Step 3.2: The formula for calculating the distance loss within the clique is as follows:
[0046]
[0047] where \(c\) represents the number of clique structures with \(k\) nodes, \(z\) ij represents the representation vector of the \(j\)-th node in the \(i\)-th clique, represents the mean of the representation vectors of all nodes in the \(i\)-th clique.
[0048] Furthermore, in step 4, the steps of minimizing the loss function to guide the self-supervised training of the model are as follows:
[0049] Step 4.1: Input the original topology graph adjacency matrix data and node attribute matrix data into the graph attention self-encoder decoder model and calculate the final loss L through forward propagation r +L k ;
[0050] Step 4.2: Use back propagation to calculate the gradient of the loss, and adjust the model parameters through the gradient descent method to gradually reduce the loss value;
[0051] Step 4.3: Repeat steps 4.1 and 4.2 until the loss value converges or reaches the preset condition.
[0052] Furthermore, in step 5, the specific process of using K-means to perform cluster analysis on the node representation vector to obtain the community discovery result is as follows:
[0053] Step 5.1: Determine the number of clusters k: Determine the value of k based on actual needs or use the elbow rule;
[0054] Step 5.2: Initially randomly select k cluster centers, i.e. centroids;
[0055] Step 5.3: Calculate the Euclidean distance from each node to the k centroids, and assign the node to the cluster with the nearest centroid;
[0056] Step 5.4: Recalculate the centroid of each cluster as the mean of the node representation vectors within the cluster;
[0057] Step 5.5: Iterate step 5.2 to step 5.4 until the clustering result converges or the preset maximum number of iterations is reached;
[0058] Step 5.6: Generate a node-to-community mapping table S from the final clustering results c = {v i , ..., v j}, where S c represents the cth community, v i represents the i-th node;
[0059] Furthermore, in step 6, the specific process of generating a recommendation list according to the community discovery result is as follows:
[0060] Step 6.1: Obtain the community adjacency matrix from the original adjacency matrix according to the node community mapping table, and extract the submatrix A(S c ), that is, only keep community S c Connection information between internal nodes;
[0061] Step 6.2: For each node in the community, the similarity between nodes is calculated based on the cosine similarity between node attributes. The formula is as follows:
[0062] X j Represents a node in the node set X;
[0063] Step 6.3: For each node, sort the similarity with it and generate a recommendation list sorted by similarity.
[0064] Step 6.4: Summarize the recommendation lists of all nodes to obtain the recommendation results within the entire community, and select the top-N nodes for each node for social recommendation.
[0065] The present invention also provides a social recommendation system based on graph attention autoencoder community discovery, comprising:
[0066] Graph Attention Encoder: The graph attention encoder encodes the adjacency relationship and node attributes in the original topology graph and extracts the multi-dimensional information of the node into a low-dimensional feature vector.
[0067] Inner product decoder: The inner product decoder reconstructs the low-dimensional feature vector into an adjacency matrix and calculates the reconstruction loss;
[0068] Clique structure analysis module: calculates the high-confidence clique structure in the topological graph and calculates the distance loss of the feature vectors between nodes in the clique structure;
[0069] Self-supervised training controller: guides the graph attention self-encoder-decoder model to perform self-supervised training by minimizing the loss function. The graph attention self-encoder-decoder model is referred to as model;
[0070] K-means clustering module: Use K-means to perform cluster analysis on feature vectors to obtain community discovery results;
[0071] Recommendation list generation unit: generates a recommendation list for recommendation based on the community discovery results.
[0072] Graph Attention Encoder: The process of encoding the adjacency relationships and node attributes in the topological graph is as follows:
[0073] Step 1.1: The main structure of the encoder is a three-layer neural network that introduces an attention mechanism, so that node representations can be propagated with different weights according to the importance of the nodes during the propagation process. The output of each layer of the graph attention network is expressed as:
[0074]
[0075] in, represents the representation vector of node i at layer l+1, N i represents all neighbor nodes of node i, α ij is the attention factor, representing the importance of node j to node i, σ is the nonlinear activation function, and W is the weight matrix, representing the weight parameters of the neural network;
[0076] Step 1.2: The calculation of the attention factor includes two parts. One part considers the attribute similarity between nodes. The more similar the node attributes are, the larger the attention factor is. The other part includes the topological distance relationship between nodes. The closer the topological distance is, the larger the attention factor is. The calculation process is as follows:
[0077]
[0078] Among them, δ is the activation function LeakyRELU, represents the similarity between node i and node j, W is the weight matrix, x i is the attribute vector of node i, It represents the sum of similarities of all neighbor nodes r of node i, M is the t-order transition probability matrix, M ij Represents the topological distance relationship between node i and node j, and its calculation process is as follows:
[0079] M=(B+B 2 +…+B t ) / t
[0080] Among them, B is the transfer matrix. When there is an edge connection between node i and node j, B ij =1 / d i , d i represents the degree of node i, otherwise B ij =0, t is a hyperparameter, the larger t is, the larger the number of topological hops that need to be considered;
[0081] Inner Product Decoder: The process of decoding the node representation and calculating the reconstruction loss is as follows:
[0082] Step 2.1: The inner product decoder reconstructs the adjacency matrix of each node’s representation. The calculation process is as follows:
[0083]
[0084] in, is the reconstructed adjacency matrix, sigmoid is the activation function, represents the transpose of the low-dimensional feature vector of node i, z j Represents the low-dimensional feature vector of node j;
[0085] Step 2.2: Calculate the reconstruction loss L r, calculate the loss between the original adjacency matrix and the reconstructed adjacency matrix. The loss function is as follows:
[0086]
[0087] where, \(A_{ij}\) i,j represents the element in the \(i\)-th row and \(j\)-th column of the adjacency matrix \(A\), \(\hat{A}_{ij}\) represents the element in the \(i\)-th row and \(j\)-th column of the reconstructed adjacency matrix;
[0088] Clique structure analysis module: The process of calculating the highly reliable clique structure in the graph and the distance loss within the clique is as follows:
[0089] Step 3.1: Calculate the highly reliable clique structure. By using recursive search and pivot optimization strategies, identify the set of tightly connected nodes in the original topological graph, i.e., the clique structure;
[0090] Step 3.1.1: Preprocess and prune the original topological graph to exclude nodes with degrees less than \(k - 1\);
[0091] Step 3.1.2: Initialize variables. Define three sets required for recursive search: the set \(R\) of nodes in the currently constructed clique, initially empty; the set \(P\) of candidate nodes, initially all the nodes remaining after the exclusion in Step 3.1.1; the set \(X\) of excluded nodes, initially empty. Here, the set \(R\) of nodes in the currently constructed clique is simply referred to as the current clique \(R\);
[0092] Step 3.1.3: Pivot optimization. Reduce the number of recursive branches by selecting a pivot node \(u\) in \(P\cup X\). Use the neighbor set of \(u\) to limit the recursive branches and only process nodes not connected to the neighbors of the pivot, providing a more efficient search space for the recursive search in Step 3.1.4;
[0093] Step 3.1.4: Based on the variables initialized in Step 3.1.2 and the optimized search space in Step 3.1.3, explore the topological graph recursively to identify all possible clique structures. The specific implementation includes the following steps:
[0094] Recursive search. For each candidate node \(v\) in the set \(P\) of candidate nodes initialized in Step 3.1.2, add \(v\) to the current clique \(R\), update the candidate set \(P\) to the set of nodes adjacent to \(v\), update the set \(X\) of excluded nodes to the set of nodes adjacent to \(v\), and recursively call until \(|R|+|P|\lt k\) or the size of \(R\) has reached \(k\). Then record the current clique \(R\) and return. After backtracking, move \(v\) from the set \(P\) to the set \(X\);
[0095] Step 3.2: The formula for calculating the distance loss within the clique is as follows:
[0096]
[0097] Among them, c represents the number of cluster structures with k nodes, z ij Represents the characterization vector of the jth node in the i-th group, Represents the mean of the representation vectors of all nodes in the i-th cluster.
[0098] Self-supervised training controller: The steps of minimizing the loss function to guide the model self-supervised training are as follows:
[0099] Step 4.1: Input the original topology graph adjacency matrix data and node attribute matrix data into the graph attention self-encoder decoder model and calculate the final loss L through forward propagation r +L k ;
[0100] Step 4.2: Use back propagation to calculate the gradient of the loss, and adjust the model parameters through the gradient descent method to gradually reduce the loss value;
[0101] Step 4.3: Repeat steps 4.1 and 4.2 until the loss value converges or reaches the preset condition;
[0102] K-means clustering module: The specific process of using K-means to perform cluster analysis on node representation vectors to obtain community discovery results is as follows:
[0103] Step 5.1: Determine the number of clusters k: Determine the value of k based on actual needs or use the elbow rule;
[0104] Step 5.2: Initially randomly select k cluster centers, i.e. centroids;
[0105] Step 5.3: Calculate the Euclidean distance from each node to the k centroids, and assign the node to the cluster with the nearest centroid;
[0106] Step 5.4: Recalculate the centroid of each cluster as the mean of the node representation vectors within the cluster;
[0107] Step 5.5: Iterate step 5.2 to step 5.4 until the clustering result converges or the preset maximum number of iterations is reached;
[0108] Step 5.6: Generate a node-to-community mapping table S from the final clustering results c = {v i , ..., v j}, where S c represents the cth community, v i represents the i-th node;
[0109] The specific process of generating a recommendation list according to the community discovery results is as follows:
[0110] Step 6.1: Obtain the community adjacency matrix from the original adjacency matrix according to the node community mapping table, and extract the submatrix A(S c ), that is, only retain community S c Connection information between internal nodes;
[0111] Step 6.2: For each node in the community, the similarity between nodes is calculated based on the cosine similarity between node attributes. The formula is as follows:
[0112] X j Represents a node in the node set X;
[0113] Step 6.3: For each node, sort the similarity with it and generate a recommendation list sorted by similarity.
[0114] Step 6.4: Summarize the recommendation lists of all nodes to obtain the recommendation results within the entire community, and select the top-N nodes for each node for social recommendation.
[0115] Because the present invention adopts the above technical means, it has the following beneficial effects:
[0116] 1. Encoding the adjacency relationship and node attributes in the topological graph through the graph attention encoder solves the technical problem that traditional methods are difficult to fully and simultaneously capture the attribute characteristics and topological relationships of nodes in complex networks, and achieves the effect of more accurately refining the multi-dimensional information of nodes into low-dimensional feature vectors. This encoding method not only considers the direct or indirect connection relationship between nodes, but also dynamically adjusts the association weights between nodes through the attention mechanism, so that the model can better capture the complex structure and node attributes in the network, and provide a more comprehensive feature representation for subsequent community discovery and recommendation.
[0117] 2. The inner product decoder is used to reconstruct the low-dimensional feature vector into an adjacency matrix and calculate the reconstruction loss, which solves the technical problem of lack of effective reconstruction targets in unsupervised learning and achieves the effect of guiding the model to learn effective feature representation. The calculation of reconstruction loss prompts the model to retain the topological structure information of the original network as much as possible during the encoding process, thereby ensuring that the learned low-dimensional feature vector can retain the original information while minimizing distortion, thereby completing the community division task more effectively and providing a more accurate input basis for community division and recommendation systems.
[0118] 3. Calculate the high-confidence group structure in the topology graph and calculate the distance loss of the feature vectors between nodes in the group structure, which solves the technical problem of the lack of credibility of pseudo-label generation in unsupervised learning and achieves the effect of providing more reliable self-supervisory signals. The identification of high-confidence group structure provides a stable pseudo-label for the model, and by reducing the distance loss between the feature vectors of nodes in the group, it further ensures that the low-dimensional feature vectors learned by the model can better reflect the characteristics of the community structure.
[0119] 4. Using K-means to cluster low-dimensional feature vectors to obtain community discovery results, we solved the technical problem that traditional clustering methods are difficult to directly apply in multi-dimensional complex networks, and achieved the effect of efficient and accurate community division. The feature vector processed by the graph attention autoencoder contains rich network structure and attribute information, providing better input for K-means clustering, thereby improving the accuracy and efficiency of community discovery.
[0120] 5. By analyzing the feature similarity and behavior patterns between nodes in the same community, a highly matched recommendation list is generated, which solves the problem that traditional recommendation methods are difficult to fully utilize network structure information, and achieves the effect of more accurate and personalized recommendations in complex networks. The recommendation system combines the community affiliation, behavior characteristics and attribute information of the nodes, effectively improving the accuracy and relevance of the recommendations.
[0121] 6. By introducing the node feature vector representation of the graph attention autoencoder in the recommendation system, the problems of strong label dependence and poor scalability of the traditional recommendation algorithm are solved, and the effect of using the community structure to provide strong support for recommendation in the absence of labels is achieved. In addition, based on the design of high-confidence group structure and self-supervisory signals, the recommendation system still has good robustness in a high-noise data environment, ensuring the stability and reliability of the recommendation results. In summary, the present invention not only effectively solves a series of technical difficulties in unsupervised community discovery in complex networks by introducing graph attention autoencoders and self-supervised learning mechanisms, combined with the identification of high-confidence group structures, but also achieves the goal of efficient and accurate community detection in the absence of labels. On this basis, it also innovatively combines the community discovery results to construct an efficient and accurate social recommendation method, which achieves a high degree of integration of community division and recommendation tasks, and provides technical support and practical value for social network applications. Description of the Figures
[0122] Figure 1 It is a flow chart of a social recommendation method based on community discovery of graph attention autoencoders provided by the present invention;
[0123] Figure 2 is a schematic diagram of a high-confidence group structure provided by the present invention;
[0124] Figure 3 It is a schematic diagram of a deep learning framework based on a graph attention autoencoder provided by the present invention. DETAILED DESCRIPTION
[0125] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions made to the present invention should all be included in the scope of the claims of the present invention.
[0126] In addition, in order to better illustrate the present invention, numerous specific details are given in the following specific embodiments. It will be understood by those skilled in the art that the present invention can also be implemented without these specific details.
[0127] like Figure 1 The figure is a flow chart of a social recommendation method based on community discovery of graph attention autoencoders provided by an example of the present invention, and the specific steps include:
[0128] Step 1: Encode the topological graph adjacency and node attributes in the original data through the graph attention encoder, and refine the multi-dimensional information of the node into a low-dimensional feature vector;
[0129] Step 2: Reconstruct the low-dimensional feature vector into an adjacency matrix through the inner product decoder and calculate the reconstruction loss;
[0130] Step 3: Calculate the high-confidence cluster structure in the topological graph and calculate the distance loss of the feature vectors between nodes in the cluster structure;
[0131] Step 4: Guide the model self-supervised training by minimizing the loss function;
[0132] Step 5: Use K-means to perform cluster analysis on the feature vectors to obtain community discovery results;
[0133] Step 6: Generate a recommendation list based on the community discovery results for recommendation.
[0134] In step 1, the process of encoding the adjacency relationship and node attributes in the topology graph is as follows:
[0135] Step 1.1: The main structure of the encoder is a three-layer neural network that introduces an attention mechanism, so that node representations can be propagated with different weights according to the importance of the nodes during the propagation process. The output of each layer of the graph attention network is expressed as:
[0136]
[0137] in, Represents the representation vector of node i at layer l+1, N irepresents all neighbor nodes of node i, α ij is the attention factor, representing the importance of node j to node i, and σ is the nonlinear activation function;
[0138] Step 1.2: The calculation of the attention factor includes two parts. One part considers the attribute similarity between nodes. The more similar the node attributes are, the larger the attention factor is. The other part includes the topological distance relationship between nodes. The closer the topological distance is, the larger the attention factor is. The calculation process is as follows:
[0139]
[0140] Among them, δ is the activation function LeakyRELU, represents the similarity between node i and node j, W is the weight matrix, x i is the attribute vector of node i, M ij Represents the topological distance relationship between node i and node j, and its calculation process is as follows:
[0141] M=(B+B 2 +…+B t ) / t
[0142] Where B is the transfer matrix. When there is an edge connection between node i and node j, B ij =1 / d i , otherwise B ij =0, t is a hyperparameter. The larger t is, the larger the number of topological hops that need to be considered.
[0143] In step 2, the process of decoding the node representation and calculating the reconstruction loss is as follows:
[0144] Step 2.1: The inner product decoder reconstructs the adjacency matrix of each node’s representation. The calculation process is as follows:
[0145]
[0146] in, is the reconstructed adjacency matrix, sigmoid is the activation function;
[0147] Step 2.2: Calculate the reconstruction loss. Calculate the loss of the original adjacency matrix and the reconstructed adjacency matrix. The loss function is as follows:
[0148]
[0149] In step 3, the process of calculating the high-confidence cluster structure in the graph and calculating the distance loss of nodes within the cluster is as follows:
[0150] like Figure 2The following is a schematic diagram of the high-trust clique described in the example of the present invention. The calculation steps for the high-trust clique structure are as follows:
[0151] Step 3.1.1: Preprocess and prune the topological graph to exclude nodes with a degree less than k - 1.
[0152] Step 3.1.2: Initialize variables and define three sets required for recursive search: R (the set of nodes in the currently constructed clique), P (the set of candidate nodes), and X (the set of excluded nodes).
[0153] Step 3.1.3: Pivot optimization. Reduce the number of recursive branches by selecting a pivot node u in P ∪ X, and use the neighbor set of u to limit the recursive branches, only processing nodes that are not connected to the neighbors of the pivot.
[0154] Step 3.1.4: Recursive search. For each candidate node v, add v to the current clique R, update the candidate set P to the set of nodes adjacent to v, update the excluded set X to the set of nodes adjacent to v, and recursively call until |R| + |P| < k or the size of R has reached k. Then record the current clique and return. After backtracking, move v from P to X.
[0155] Step 3.2: The formula for calculating the distance loss within the clique is as follows:
[0156]
[0157] Among them, c represents the number of clique structures with k nodes, and z ij represents the feature vector of the j-th node in the i-th clique, represents the mean of the feature vectors of all nodes in the i-th clique;
[0158] In step 4, the steps for minimizing the loss function to guide the self-supervised training of the model are as follows:
[0159] Step 4.1: Input the topological graph adjacency matrix data and node attribute matrix data into the above model, and obtain the model output through forward propagation.
[0160] Step 4.2: Use backpropagation to calculate the gradient of the loss function with respect to the model, and adjust the model parameters through gradient descent to gradually reduce the value of the loss function.
[0161] Step 4.3: Repeat steps 4.1 and 4.2 until the loss function converges or reaches a preset condition. In step 5, the specific process of using K-means for clustering analysis of node feature vectors to obtain the community discovery result is as follows:
[0162] Step 5.1: Determine the number of clusters k: Determine the value of k according to actual needs or using the elbow method.
[0163] Step 5.2: Initially randomly select k cluster centers (centroids);
[0164] Step 5.3: Calculate the Euclidean distance from each node to the k centroids, and assign the node to the cluster with the nearest centroid;
[0165] Step 5.4: Recalculate the centroid of each cluster as the mean of the node representation vectors within the cluster;
[0166] Step 5.5: Iterate step 5.2 to step 5.4 until the clustering result converges or the preset maximum number of iterations is reached;
[0167] Step 5.6: Generate a node-to-community mapping table S from the final clustering results c = {v i '..., v j}, where S c represents the cth community, v i represents the i-th node;
[0168] In step 6, the specific process of generating a recommendation list according to the community discovery result is as follows:
[0169] Step 6.1: Obtain the community adjacency matrix from the original adjacency matrix according to the node community mapping table, and extract the submatrix A(S c ), that is, only retain community S c Connection information between internal nodes.
[0170] Step 6.2: For each node in the community, the similarity between nodes is calculated based on the cosine similarity between node attributes. The formula is as follows:
[0171]
[0172] Step 6.3: For each node, sort the similarity with it and generate a recommendation list sorted by similarity.
[0173] Step 6.4: Summarize the recommendation lists of all nodes to obtain the recommendation results within the entire community, and select the top-N nodes for each node for social recommendation.
[0174] As another embodiment of the present invention, the present invention also provides a social recommendation system based on community discovery of graph attention autoencoders, including:
[0175] Graph Attention Encoder: The graph attention encoder encodes the adjacency relationship and node attributes in the original topology graph and extracts the multi-dimensional information of the node into a low-dimensional feature vector.
[0176] Inner product decoder: The inner product decoder reconstructs the low-dimensional feature vector into an adjacency matrix and calculates the reconstruction loss;
[0177] Clique structure analysis module: calculates the high-confidence clique structure in the topological graph and calculates the distance loss of the feature vectors between nodes in the clique structure;
[0178] Self-supervised training controller: guides the graph attention self-encoder-decoder model to perform self-supervised training by minimizing the loss function. The graph attention self-encoder-decoder model is referred to as model;
[0179] K-means clustering module: Use K-means to perform cluster analysis on feature vectors to obtain community discovery results;
[0180] Recommendation list generation unit: generates a recommendation list for recommendation based on the community discovery results.
[0181] Graph Attention Encoder: The process of encoding the adjacency relationships and node attributes in the topological graph is as follows:
[0182] Step 1.1: The main structure of the encoder is a three-layer neural network that introduces an attention mechanism, so that node representations can be propagated with different weights according to the importance of the nodes during the propagation process. The output of each layer of the graph attention network is expressed as:
[0183]
[0184] in, represents the representation vector of node i at layer l+1, N i represents all neighbor nodes of node i, α ij is the attention factor, representing the importance of node j to node i, σ is the nonlinear activation function, and W is the weight matrix, representing the weight parameters of the neural network;
[0185] Step 1.2: The calculation of the attention factor includes two parts. One part considers the attribute similarity between nodes. The more similar the node attributes are, the larger the attention factor is. The other part includes the topological distance relationship between nodes. The closer the topological distance is, the larger the attention factor is. The calculation process is as follows:
[0186]
[0187] Among them, δ is the activation function LeakyRELU, represents the similarity between node i and node j, W is the weight matrix, x i is the attribute vector of node i, It represents the sum of similarities of all neighbor nodes r of node i, M is the t-order transition probability matrix, M ijRepresents the topological distance relationship between node i and node j, and its calculation process is as follows:
[0188] M=(B+B 2 +…+B t ) / t
[0189] Among them, B is the transfer matrix. When there is an edge connection between node i and node j, B ij =1 / d i , d i represents the degree of node i, otherwise B ij =0, t is a hyperparameter, the larger t is, the larger the number of topological hops that need to be considered;
[0190] Inner Product Decoder: The process of decoding the node representation and calculating the reconstruction loss is as follows:
[0191] Step 2.1: The inner product decoder reconstructs the adjacency matrix of each node’s representation. The calculation process is as follows:
[0192]
[0193] in, is the reconstructed adjacency matrix, sigmoid is the activation function, represents the transpose of the low-dimensional feature vector of node i, z j Represents the low-dimensional feature vector of node j;
[0194] Step 2.2: Calculate the reconstruction loss L r , calculate the loss of the original adjacency matrix and the reconstructed adjacency matrix, the loss function is as follows:
[0195]
[0196] Among them, A i,j represents the element in the i-th row and j-th column of the adjacency matrix A, Represents the element of the i-th row and j-th column of the reconstructed adjacency matrix;
[0197] Clique structure analysis module: The process of calculating the high-confidence clique structure in the graph and the distance loss of nodes within the clique is as follows:
[0198] Step 3.1: Calculate the high-confidence cluster structure, and identify the set of closely connected nodes, i.e., cluster structure, in the original topology graph through recursive search and pivot optimization strategy;
[0199] Step 3.1.1: Preprocess and prune the original topology graph, excluding nodes with a degree less than k-1;
[0200] Step 3.1.2: Initialize variables and define three sets required for recursive search: the node set \(R\) of the currently constructed clique, which is initially empty; the candidate node set \(P\), which is initially all the nodes remaining after the exclusion in Step 3.1.1; and the excluded node set \(X\), which is initially empty. Here, the node set \(R\) of the currently constructed clique is simply referred to as the current clique \(R\).
[0201] Step 3.1.3: Pivot optimization. Reduce the number of recursive branches by selecting a pivot node \(u\) in \(P\cup X\), and use the neighbor set of \(u\) to restrict the recursive branches, only processing the nodes that are not connected to the pivot's neighbors, providing a more efficient search space for the recursive search in Step 3.1.4.
[0202] Step 3.1.4: Based on the variables initialized in Step 3.1.2 and the optimized search space in Step 3.1.3, explore the topological graph deeply in a recursive manner to identify all possible clique structures. The specific implementation includes the following steps:
[0203] Recursive search. For each candidate node \(v\) in the candidate node set \(P\) initialized in Step 3.1.2, add \(v\) to the current clique \(R\), update the candidate set \(P\) to the set of nodes adjacent to \(v\), update the excluded node set \(X\) to the set of nodes adjacent to \(v\), and make a recursive call until \(|R| + |P| < k\) or the size of \(R\) has reached \(k\). Then record the current clique \(R\) and return. After backtracking, move \(v\) from set \(P\) to set \(X\).
[0204] Step 3.2: The formula for calculating the distance loss within the clique is as follows:
[0205]
[0206] where \(c\) represents the number of clique structures with \(k\) nodes, \(z ij represents the representation vector of the \(j\)-th node in the \(i\)-th clique, represents the mean of the representation vectors of all nodes in the \(i\)-th clique.
[0207] Self-supervised training controller: The steps to minimize the loss function to guide the self-supervised training of the model are as follows:
[0208] Step 4.1: Input the original topological graph adjacency matrix data and node attribute matrix data into the graph attention autoencoder model, and calculate the final loss \(L r +L k ;
[0209] Step 4.2: Use backpropagation to calculate the gradient of the loss, and adjust the model parameters through gradient descent to gradually reduce the loss value.
[0210] Step 4.3: Repeat Step 4.1 and Step 4.2 until the loss value converges or reaches the preset conditions.
[0211] K-means clustering module: The specific process of using K-means to perform cluster analysis on node representation vectors to obtain community discovery results is as follows:
[0212] Step 5.1: Determine the number of clusters k: Determine the value of k based on actual needs or use the elbow rule;
[0213] Step 5.2: Initially randomly select k cluster centers, i.e. centroids;
[0214] Step 5.3: Calculate the Euclidean distance from each node to the k centroids, and assign the node to the cluster with the nearest centroid;
[0215] Step 5.4: Recalculate the centroid of each cluster as the mean of the node representation vectors within the cluster;
[0216] Step 5.5: Iterate step 5.2 to step 5.4 until the clustering result converges or the preset maximum number of iterations is reached;
[0217] Step 5.6: Generate a node-to-community mapping table S from the final clustering results c = {v i , ..., v j}, where S c represents the cth community, v i represents the i-th node;
[0218] The specific process of generating a recommendation list according to the community discovery results is as follows:
[0219] Step 6.1: Obtain the community adjacency matrix from the original adjacency matrix according to the node community mapping table, and extract the submatrix A(S c ), that is, only keep community S c Connection information between internal nodes;
[0220] Step 6.2: For each node in the community, the similarity between nodes is calculated based on the cosine similarity between node attributes. The formula is as follows:
[0221] X j Represents a node in the node set X;
[0222] Step 6.3: For each node, sort the similarity with it and generate a recommendation list sorted by similarity.
[0223] Step 6.4: Summarize the recommendation lists of all nodes to obtain the recommendation results within the entire community, and select the top-N nodes for each node for social recommendation.
[0224] Although the above describes the illustrative specific embodiments of the present invention to facilitate those skilled in the art to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations using the concept of the present invention are protected.
Claims
1. A social recommendation method based on graph attention autoencoder community discovery, characterized in that: The following steps are involved: Step 1: Encode the adjacency relationship and node attributes in the original topology graph through the graph attention encoder, and refine the multi-dimensional information of the node into a low-dimensional feature vector; Step 2: Reconstruct the low-dimensional feature vector into an adjacency matrix through the inner product decoder and calculate the reconstruction loss; Step 3: Calculate the high-confidence cluster structure in the topological graph and calculate the distance loss of the feature vectors between nodes in the cluster structure; Step 4: Guide the graph attention self-encoder-decoder model to perform self-supervised training by minimizing the loss function. The graph attention self-encoder-decoder model is referred to as model. Step 5: Use K-means to perform cluster analysis on the feature vectors to obtain community discovery results; Step 6: Generate a recommendation list based on the community discovery results for recommendation.
2. According to claim 1, a social recommendation method based on graph attention autoencoder community discovery is characterized in that: In step 1, the process of encoding the adjacency relationship and node attributes in the topology graph is as follows: Step 1.1: The main structure of the encoder is a three-layer neural network that introduces an attention mechanism, so that node representations can be propagated with different weights according to the importance of the nodes during the propagation process. The output of each layer of the graph attention network is expressed as: in, Represents the representation vector of node i at layer l+1, N i represents all neighbor nodes of node i, α ij is the attention factor, representing the importance of node j to node i, σ is the nonlinear activation function, and W is the weight matrix, representing the weight parameters of the neural network; Step 1.2: The calculation of the attention factor includes two parts. One part considers the attribute similarity between nodes. The more similar the node attributes are, the larger the attention factor is. The other part includes the topological distance relationship between nodes. The closer the topological distance is, the larger the attention factor is. The calculation process is as follows: Among them, δ is the activation function LeakyRELU, represents the similarity between node i and node j, W is the weight matrix, x i is the attribute vector of node i, It represents the sum of similarities of all neighbor nodes r of node i, M is the t-order transition probability matrix, M ij Represents the topological distance relationship between node i and node j, and its calculation process is as follows: M=(B+B 2 +…+B t ) / t Among them, B is the transfer matrix. When there is an edge connection between node i and node j, B ij =1 / d i , d i represents the degree of node i, otherwise B ij =0, t is a hyperparameter. The larger t is, the larger the number of topological hops that need to be considered.
3. According to claim 1, a social recommendation method based on graph attention autoencoder community discovery is characterized in that: In step 2, the process of decoding the node representation and calculating the reconstruction loss is as follows: Step 2.1: The inner product decoder reconstructs the adjacency matrix of each node’s representation. The calculation process is as follows: in, is the reconstructed adjacency matrix, sigmoid is the activation function, represents the transpose of the low-dimensional feature vector of node i, z j Represents the low-dimensional feature vector of node j; Step 2.2: Calculate the reconstruction loss L r , calculate the loss of the original adjacency matrix and the reconstructed adjacency matrix, the loss function is as follows: Among them, A i,j represents the element in the i-th row and j-th column of the adjacency matrix A, Represents the element in the i-th row and j-th column of the reconstructed adjacency matrix.
4. According to claim 1, a social recommendation method based on graph attention autoencoder community discovery is characterized in that: In step 3, the process of calculating the high-confidence cluster structure in the graph and calculating the distance loss of nodes within the cluster is as follows: Step 3.1: Calculate the high-confidence cluster structure, and identify the set of closely connected nodes, i.e., cluster structure, in the original topology graph through recursive search and pivot optimization strategy; Step 3.1.1: Preprocess and prune the original topology graph, excluding nodes with a degree less than k-1; Step 3.1.2: Initialize variables and define the three sets required for recursive search: the node set R of the currently constructed group, which is initially empty, the candidate node set P, which is initially all the nodes left after step 3.1.1 is excluded, and the excluded node set X, which is initially empty. The node set R of the currently constructed group is referred to as the current group R. Step 3.1.3: Pivot optimization, by selecting a pivot node u in P∪X to reduce the number of recursive branches, using u's neighbor set to limit the recursive branches, only processing nodes that are not connected to the pivot neighbors, providing a more efficient search space for the recursive search in step 3.1.4; Step 3.1.4: Based on the variables initialized in step 3.1.2 and the search space optimized in step 3.1.3, recursively explore the topology graph and identify all possible cluster structures. The specific implementation includes the following steps: Recursive search: For each candidate node v in the set P of candidate nodes initialized in step 3.1.2, add v to the current clique R, update the candidate set P to the set of nodes adjacent to v, update the set X of excluded nodes to the set of nodes adjacent to v, and recursively call until |R| + |P| < k or the size of R has reached k. Then record the current clique R and return. After backtracking, move v from set P to set X; Step 3.2: The formula for calculating the distance loss within the clique is as follows: Among them, c represents the number of cluster structures with k nodes, z ij Represents the characterization vector of the jth node in the i-th group, Represents the mean of the representation vectors of all nodes in the i-th cluster.
5. According to claim 1, a social recommendation method based on graph attention autoencoder community discovery is characterized in that: In step 4, the steps for minimizing the loss function to guide the self-supervised training of the model are as follows: Step 4.1: Input the original topology graph adjacency matrix data and node attribute matrix data into the graph attention self-encoder decoder model and calculate the final loss L through forward propagation r +L k ; Step 4.2: Use backpropagation to calculate the gradient of the loss, and adjust the model parameters through gradient descent to gradually reduce the loss value; Step 4.3: Repeat step 4.1 and step 4.2 until the loss value converges or reaches a preset condition.
6. A social recommendation method based on graph attention autoencoder community discovery according to claim 1, characterized in that: In step 5, the specific process of using K-means to perform clustering analysis on the node representation vectors to obtain the community discovery result is as follows: Step 5.1: Determine the number of clusters k: Determine the value of k according to actual needs or using the elbow method; Step 5.2: Randomly select k cluster centers initially, that is, centroids; Step 5.3: Calculate the Euclidean distance from each node to the k centroids, and assign the node to the cluster where the nearest centroid is located; Step 5.4: Recalculate the centroid of each cluster as the mean of the node representation vectors within the cluster; Step 5.5: Iterate step 5.2 to step 5.4 until the clustering result converges or reaches the preset maximum number of iterations; Step 5.6: Generate a node-to-community mapping table S from the final clustering results c = {v i , ..., v j }, where S c represents the cth community, v i Represents the i-th node.
7. A social recommendation method based on graph attention autoencoder community discovery according to claim 1, characterized in that: In step 6, the specific process of generating a recommendation list based on the community discovery result is as follows: Step 6.1: Obtain the community adjacency matrix from the original adjacency matrix according to the node community mapping table, and extract the submatrix A(S c ), that is, only keep community S c Connection information between internal nodes; Step 6.2: For each node within a community, calculate the similarity between nodes based on the cosine similarity between node attributes, and the formula is as follows: X j Represents a node in the node set X; Step 6.3: For each node, sort the nodes according to the level of their similarity to generate a recommendation list sorted by similarity. Step 6.4: Aggregate the recommendation lists of all nodes to obtain the recommendation result within the entire community, and select the top Top_N nodes for each node for social recommendation.
8. A social recommendation system based on graph attention autoencoder community discovery, characterized in that: Including: Graph attention encoder: Encode the adjacency relationship and node attributes in the original topological graph through the graph attention encoder, and refine the multi-dimensional information of the nodes into low-dimensional feature vectors; Inner product decoder: Reconstruct the low-dimensional feature vectors into an adjacency matrix through the inner product decoder and calculate the reconstruction loss; Clique structure analysis module: Calculate the highly credible clique structure in the topological graph and calculate the distance loss between the feature vectors of the nodes in the clique structure; Self-supervised training controller: Guide the graph attention autoencoder decoder model to perform self-supervised training by minimizing the loss function. The graph attention autoencoder decoder model is abbreviated as the model; K-means clustering module: Use K-means to perform clustering analysis on the feature vectors to obtain the community discovery result; Recommendation list generation unit: Generate a recommendation list based on the community discovery result for recommendation.
9. The social recommendation system based on graph attention autoencoder community discovery according to claim 8, characterized in that Graph attention encoder: The process of encoding the adjacency relationship and node attributes in the topological graph is as follows: Step 1.1: The main structure of the encoder is a three-layer neural network introducing the attention mechanism, enabling different weights of propagation for node representations during the propagation process according to the importance of nodes. The output of each layer of the graph attention network is expressed as: in, Represents the representation vector of node i at layer l+1, N i represents all neighbor nodes of node i, α ij is the attention factor, representing the importance of node j to node i, σ is the nonlinear activation function, and W is the weight matrix, representing the weight parameters of the neural network; Step 1.2: The calculation of the attention factor includes two parts. One part considers the attribute similarity between nodes. The more similar the node attributes are, the larger the attention factor. The other part includes the topological distance relationship between nodes. The closer the topological distance is, the larger the attention factor. The calculation process is as follows: Among them, δ is the activation function LeakyRELU, represents the similarity between node i and node j, W is the weight matrix, x i is the attribute vector of node i, It represents the sum of similarities of all neighbor nodes r of node , M is the t-order transition probability matrix, M ij Represents the topological distance relationship between node i and node j, and its calculation process is as follows: M=(B+B 2 +…+B t ) / t Among them, B is the transfer matrix. When there is an edge connection between node i and node j, B ij =1 / d i , d i represents the degree of node i, otherwise B ij =0, t is a hyperparameter, the larger t is, the larger the number of topological hops that need to be considered; Inner product decoder: The process of decoding node representations and calculating the reconstruction loss is as follows: Step 2.1: The inner product decoder reconstructs the adjacency matrix for the representations of each node. The calculation process is as follows: in, is the reconstructed adjacency matrix, sigmoid is the activation function, represents the transpose of the low-dimensional feature vector of node i, z j Represents the low-dimensional feature vector of node j; Step 2.2: Calculate the reconstruction loss L r , calculate the loss of the original adjacency matrix and the reconstructed adjacency matrix, the loss function is as follows: Among them, A i,j represents the element in the i-th row and j-th column of the adjacency matrix A, Represents the element of the i-th row and j-th column of the reconstructed adjacency matrix; Clique structure analysis module: The process of calculating high-confidence clique structures in the graph and calculating the distance loss within the clique is as follows: Step 3.1: Calculate high-confidence clique structures. By using recursive search and pivot optimization strategies, identify a set of tightly connected nodes in the original topological graph, that is, the clique structure; Step 3.1.1: Preprocess and prune the original topological graph to exclude nodes with degrees less than k - 1; Step 3.1.2: Initialize variables and define three sets required for recursive search: the set of nodes R in the currently constructed clique, which is initially empty, the set of candidate nodes P, which is initially all the nodes remaining after the exclusion in Step 3.1.1, and the set of excluded nodes X, which is initially empty. Among them, the set of nodes R in the currently constructed clique is simply referred to as the current clique R; Step 3.1.3: Pivot optimization. Reduce the number of recursive branches by selecting a pivot node u in P ∪ X, and use the neighbor set of u to limit the recursive branches, only dealing with nodes not connected to the neighbors of the pivot, providing a more efficient search space for the recursive search in Step 3.1.4; Step 3.1.4: Based on the variables initialized in Step 3.1.2 and the optimized search space in Step 3.1.3, deeply explore the topological graph recursively to identify all possible clique structures. The specific implementation includes the following steps: Recursive search. For each candidate node v in the set of candidate nodes P initialized in Step 3.1.2, add v to the current clique R, update the candidate set P to the set of nodes adjacent to v, update the set of excluded nodes X to the set of nodes adjacent to v, and recursively call until |R| + |P| < k or the size of R has reached k, then record the current clique R and return. After backtracking, move v from the set P to the set X; Step 3.2: The formula for calculating the distance loss within the clique is as follows: Among them, c represents the number of cluster structures with k nodes, z ij Represents the characterization vector of the jth node in the i-th group, Represents the mean of the representation vectors of all nodes in the i-th cluster.
10. A social recommendation system based on graph attention autoencoder community discovery according to claim 8, characterized in that: Self-supervised training controller: The steps of minimizing the loss function to guide the self-supervised training of the model are as follows: Step 4.1: Input the original topology graph adjacency matrix data and node attribute matrix data into the graph attention self-encoder decoder model and calculate the final loss L through forward propagation r +L k ; Step 4.2: Use backpropagation to calculate the gradient of the loss, and adjust the model parameters by the gradient descent method to gradually reduce the loss value; Step 4.3: Repeat Step 4.1 and Step 4.2 until the loss value converges or reaches the preset conditions; K-means clustering module: The specific process of using K-means to perform clustering analysis on the node representation vectors to obtain the community discovery results is as follows: Step 5.1: Determine the number of clusters k: Determine the value of k according to actual needs or using the elbow method; Step 5.2: Initially randomly select k cluster centers, i.e. centroids; Step 5.3: Calculate the Euclidean distance from each node to the k centroids, and assign the node to the cluster with the nearest centroid; Step 5.4: Recalculate the centroid of each cluster as the mean of the node representation vectors within the cluster; Step 5.5: Iterate step 5.2 to step 5.4 until the clustering result converges or the preset maximum number of iterations is reached; Step 5.6: Generate a node-to-community mapping table S from the final clustering results c = {v i , ..., v j }, where S c represents the cth community, v i represents the i-th node; The specific process of generating a recommendation list according to the community discovery results is as follows: Step 6.1: Obtain the community adjacency matrix from the original adjacency matrix according to the node community mapping table, and extract the submatrix A(S c ), that is, only keep community S c Connection information between internal nodes; Step 6.2: For each node in the community, the similarity between nodes is calculated based on the cosine similarity between node attributes. The formula is as follows: X j Represents a node in the node set X; Step 6.3: For each node, sort the similarity with it and generate a recommendation list sorted by similarity. Step 6.4: Summarize the recommendation lists of all nodes to obtain the recommendation results within the entire community, and select the top-N nodes for each node for social recommendation.
Citation Information
Patent Citations
Community discovery method in social network based on maximum group enumeration
CN109978705A
Community division method and system based on social network, and storage medium
CN113407784A
Commercial decision-making method based on regional frequent co-location mode
CN116091095A
Community discovery method and system based on graph attention automatic encoder
CN116542802A