Overlapping community detection method based on graph attention network and topology potential

By using graph attention networks and an improved topological potential calculation method, the problem of multiple community affiliation of nodes in overlapping community detection is solved. This achieves accurate quantification of node structural similarity in sparse networks and effective utilization of global topological structure, thereby improving the recognition accuracy of community boundaries and overlapping regions.

CN121388697APending Publication Date: 2026-01-23SHIHEZI UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511567204.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-30
Publication Date
2026-01-23

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the problem of multiple community affiliations of nodes in overlapping community detection. Traditional topological potential methods are not accurate in characterizing the structural similarity of nodes in sparse networks and ignore the differences in node influence. Existing graph neural network methods are difficult to utilize global topological structure information, resulting in limited accuracy in identifying community boundaries and overlapping areas.

Method used

We employ graph attention networks and an improved topological potential calculation method. The topological potential of nodes is calculated using PageRank and Jaccard distance. The adjacency matrix and attribute matrix are fused as inputs to the graph attention network. A topological potential regularization term is added to the loss function to constrain the consistency between node embedding and the topological potential space, thereby achieving multi-community affiliation of nodes.

Benefits of technology

It improves the accuracy of community boundary identification and the recall rate of overlapping nodes, enhances the quantification of node structural similarity in sparse networks, and improves the accuracy of overlapping community detection in large and complex networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121388697A_ABST
    Figure CN121388697A_ABST
Patent Text Reader

Abstract

The invention discloses an overlapping community detection method based on a graph attention network and a topology potential, and the method comprises the following steps: constructing an adjacent matrix of a graph based on the relation between users; calculating a PageRank value and a Jaccard distance of each node based on an adjacent matrix of the graph; improving a topology potential calculation method based on the PageRank value and the Jaccard distance, and calculating a topology potential value of each node based on the improved topology potential calculation method; fusing the obtained topology potential value with the adjacent matrix and the attribute matrix to obtain a multi-dimensional feature matrix, and inputting the multi-dimensional feature matrix into a graph attention network to obtain a node-community membership matrix; and based on the node-community membership matrix, setting a threshold value for each element, judging whether the node belongs to a community, and realizing multi-community affiliation of the node. The method can improve the accuracy and applicability of overlapping community detection, and is especially suitable for an overlapping community analysis scene of a large complex network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of community detection, and particularly relates to an overlapping community detection method based on a graph attention network and a topological potential. BACKGROUND

[0002] Overlapping community detection needs to realize that a node belongs to multiple communities at the same time, and faces the problems of fuzzy community boundaries and complex structures. Traditional non-overlapping community detection methods cannot be directly applied, and it is difficult to meet the needs of node multi-community attribution in actual networks. Although the topological potential theory can quantify the interaction strength between nodes to assist community analysis, the traditional topological potential relies on the shortest path distance and equal weight assumption, which has obvious limitations in actual application scenarios.

[0003] The shortest path cannot reflect the structural similarity of nodes in sparse networks, and the equal weight assumption ignores the influence difference of nodes in the global network, resulting in inaccurate description of community structure. At the same time, the input of existing overlapping community detection methods based on graph neural networks mainly depends on the adjacency matrix and node attributes, and the adjacency matrix can only reflect the binary information of whether the nodes are connected, and cannot directly describe the structural similarity or correlation strength between nodes, which has limited accuracy in identifying community boundaries and overlapping areas, especially in large complex networks, it is difficult to fully utilize the global topological structure information.

[0004] In view of the above problems in the prior art, it is urgent to propose an overlapping community detection method based on a graph attention network and a topological potential. SUMMARY

[0005] To solve the above technical problems, the application provides an overlapping community detection method based on a graph attention network and a topological potential, comprising the following steps:

[0006] Based on the relationship between users and users, an adjacency matrix of a graph is constructed;

[0007] Based on the adjacency matrix of the graph, the PageRank value and the Jaccard distance of each node are calculated;

[0008] Based on the PageRank value and the Jaccard distance, the topological potential calculation method is improved, and the topological potential value of each node is calculated based on the improved topological potential calculation method;

[0009] The obtained topological potential value is fused with the adjacency matrix and the attribute matrix to obtain a multi-dimensional feature matrix, which is input into a graph attention network to obtain a node-community membership matrix;

[0010] Based on the node-community membership matrix, a threshold value is set for each element to determine whether the node belongs to the community, thereby realizing the multi-community attribution of the node.

[0011] Optionally, the process of calculating the PageRank value and the Jaccard distance of each node based on the graph-based adjacency matrix comprises:

[0012] calculating the PageRank value of each node based on the PageRank algorithm, and calculating the Jaccard distance between nodes based on the Jaccard algorithm.

[0013] Optionally, the process of improving the calculation method of the topological potential based on the PageRank value and the Jaccard distance comprises:

[0014] taking the PageRank value as the node quality, replacing the equal-weight quality in the traditional topological potential formula with the normalized PageRank value to obtain a quality item that dynamically changes with the importance of the node; replacing the shortest path distance in the traditional topological potential formula with the Jaccard distance to obtain a distance item that only depends on the local neighbor structure and is robust to sparse networks; and substituting the quality item and the distance item into a Gaussian influence kernel function, and summing all neighbor nodes under the control of an influence factor to obtain the topological potential value of the current node.

[0015] Optionally, the improved topological potential calculation formula is:

[0016] ;

[0017] wherein, is the PageRank value, and is the node, and σ is the influence factor, is the Jaccard distance.

[0018] Optionally, the process of obtaining the node-community membership matrix by inputting the obtained topological potential value into the graph attention network and fusing the adjacency matrix and the attribute matrix to obtain a multi-dimensional feature matrix comprises:

[0019] arranging the topological potential values of the nodes into a topological potential vector, and splicing the topological potential vector with the adjacency matrix and the attribute matrix column by column to form a multi-dimensional feature matrix;

[0020] taking the multi-dimensional feature matrix as the input of the graph attention network, performing attention weighting aggregation under the guidance of the adjacency relationship, and outputting the node embedding;

[0021] performing feedforward mapping on the node embedding to obtain the node-community membership matrix.

[0022] Optionally, the loss function of the graph attention network adopts a balanced negative log-likelihood loss.

[0023] Optionally, the calculation formula of the balanced negative log-likelihood loss is:

[0024]

[0025] ;

[0026] in, Assuming a uniform distribution of edges, It is a uniform distribution that is not an edge. The regularization coefficient is . For nodes Embedded vector, For nodes The topological potential vector, Let be the cosine similarity.

[0027] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method.

[0028] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method.

[0029] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method.

[0030] Compared with the prior art, the present invention has the following advantages and technical effects:

[0031] This invention replaces the shortest path in the traditional topological potential with Jaccard distance, and uses the overlap of neighbor sets to characterize the local similarity of nodes. In sparse networks, it avoids the distortion of the shortest path caused by missing connections, thus reducing the error in structural similarity measurement. Secondly, it introduces PageRank value as node quality, replacing the equal weight assumption, and quantifies the influence of nodes based on the global walk probability, ensuring that core nodes receive higher weight in community partitioning and enhancing the accuracy of community center positioning. Finally, the improved topological potential matrix is ​​concatenated with the adjacency matrix and attribute matrix along the feature dimension to form a multi-dimensional input that combines connectivity, attribute information, and topological semantics. At the same time, a topological potential regularization term is added to the graph attention network loss function to constrain the cosine consistency between the embedding space and the topological potential space, strengthening the model's utilization of global structural information, thereby simultaneously improving the accuracy of community boundary identification and the recall rate of overlapping nodes. Attached Figure Description

[0032] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0033] Figure 1 A method flowchart of an embodiment of the present application;

[0034] Figure 2 A Jaccard similarity coefficient diagram of the NOCD, AOCD and ATPOCD of an embodiment of the present application. DETAILED DESCRIPTION

[0035] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0036] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.

[0037] Embodiment one

[0038] Social networks are the most typical carrier of overlapping communities, and the "multiple identity attributes" of users naturally correspond to the structure of overlapping communities. Its application focuses on understanding user behavior, relationship mining and precise service. Through the detection of user's simultaneous participation in multiple communities such as "technology enthusiasts group" and "photography community", a more three-dimensional user interest portrait is constructed, and then cross-domain content is pushed, such as recommending "professional photography equipment evaluation" to "technology + photography" overlapping users. It is suitable for social network analysis, biomedical and academic and technological innovation fields.

[0039] The embodiment proposes an overlapping community detection method based on graph attention network and topological potential. For the problems that the traditional non-overlapping community detection method cannot meet the actual network node multi-community attribution demand, the traditional topological potential method lacks precision in describing node structure similarity in sparse network and ignores the difference in node influence, and the existing overlapping community detection method based on graph neural network cannot utilize global topological structure information, the embodiment precisely quantifies node structure similarity and fully utilizes global topological information, thereby improving the accuracy and applicability of overlapping community detection, especially suitable for overlapping community analysis scenarios of large and complex networks.

[0040] Specifically, the embodiment provides an overlapping community detection method based on graph attention network and topological potential, comprising the following steps:

[0041] The graph-based adjacency matrix calculates the PageRank value and Jaccard distance of each node;

[0042] An improved topological potential calculation method based on node PageRank and Jaccard distance is used to calculate the topological potential value of each node.

[0043] Based on the multi-dimensional feature combination of the graph's adjacency matrix, attribute matrix and topological potential matrix, a node-community membership matrix is ​​obtained through a two-layer graph attention network and an improved loss function.

[0044] Based on the node-community membership matrix, a reasonable threshold is set for each element. If the threshold is exceeded, the node is determined to belong to a community, thus realizing the multi-community affiliation of a node.

[0045] As a specific implementation method, such as Figure 1 As shown, in social network analysis, a network topology is constructed with users as nodes and the relationships between users as edges. This structure is essentially a graph, denoted as […]. ,in For a set of nodes, Let be the set of edges.

[0046] The overlapping community detection algorithm proposed in this embodiment addresses the problem that traditional community detection algorithms using topological potential have insufficient accuracy in characterizing the structural similarity of nodes in sparse networks and ignore the differences in the influence of nodes. This embodiment uses the adjacency matrix of the graph to calculate the PageRank value and Jaccard distance of each node, thereby improving the topological potential calculation method.

[0047] The traditional method for calculating topological potential is as follows:

[0048] ;

[0049] in, Represents a node and The shortest path between, Represents a node The quality of the influence factor σ is used to control the scope of influence of each node.

[0050] Nodes within a community typically have similar neighbor structures, and the smaller Jaccard distance allows for more accurate clustering of nodes from the same community. In sparse networks, the shortest path can be distorted due to missing connections, while the Jaccard distance relies only on local neighbor information, making it more robust to sparse connections. The Jaccard distance calculation method is as follows:

[0051] ;

[0052] The PageRank algorithm is used to replace the node importance, and the global influence of the node is quantified by the random walk model, which considers not only the direct connection but also the indirect association. The PageRank algorithm can quantify the influence of the node in the global network, and the PageRank value of the core node is higher, and the contribution of the topological potential of the surrounding node is greater. The calculation formula of the PageRank value of the node is as follows:

[0053] ;

[0054] Among them, represents the PageRank value of the node , d is the damping factor (usually 0.85), represents the in-adjacent point set of the node , and represents the out-degree of the node .

[0055] The improved calculation formula of the topological potential is as follows:

[0056] ;

[0057] Among them, is the PageRank value after Min-Max normalization processing.

[0058] In view of the problem that the existing graph neural network-based overlapping community detection method is difficult to utilize the global topological structure information, resulting in limited recognition accuracy of the community boundary and overlapping area, the improved topological potential matrix is fused with the adjacent matrix and the attribute matrix as the input feature of the graph attention network, and a topological potential regularization term is added to the loss function to constrain the consistency of the node embedding and the topological potential space.

[0059] Based on the Bernoulli-Poisson (BP) probability model, given the membership , the adjacent matrix is generated, and each is sampled independently and subject to the same probability distribution:

[0060] ;

[0061] The node membership degree affects the edge probability, that is, the greater the inner product of the membership degree vectors of two nodes, the higher the edge probability. The BP model has the advantages of generating overlapping communities and supporting complex topological structures, and its graph generation probability can be expressed as:

[0062] ;

[0063] The graph attention network is used to generate ​:

[0064] ;

[0065] The negative log-likelihood of the Bernoulli-Poisson model is:

[0066] ;

[0067] The two terms are balanced by considering the uniform distribution of the presence or absence of edges, and a topological potential regularization term is added to guide the node embedding to be consistent with the topological potential features, which enhances the use of the global topological structure of the network. The loss function adopts a balanced negative log-likelihood loss:

[0068]

[0069]

[0070] where, is the uniform distribution of edges, is the uniform distribution of non-edges, is the regularization coefficient, is the embedding vector of node , is the topological potential vector of node , and is the cosine similarity. The neural network parameters that minimize the negative log-likelihood function are found: :

[0071] ;

[0072] Finally, the membership matrix is obtained, and each element is set to a reasonable threshold. If exceeds the threshold, it is determined that node belongs to community , and the multi-community membership of the node is realized.

[0073] At this time, the "overlapping community label" can be used to supplement the cross-interest of users, and cross-interest content or goods can be pushed.

[0074] ​The embodiment provides a kind of based on graph attention network and topological potential overlapping community detection method provided in the embodiment, by adopting Jaccard distance instead of the shortest path in traditional topological potential, accurately depict the local neighbor similarity of node in community, avoid the distortion caused by connection missing in sparse network, improve the accuracy of node structure similarity measurement;Introduce PageRank algorithm to quantify the global influence of node, replace equal weight assumption, more comprehensively represent the structural role of node in network, provide more reasonable node importance basis for community structure analysis;Improved topological potential matrix is fused with adjacency matrix and attribute matrix as the input feature of graph attention network, and topological potential regularization term is added in loss function, constrain the consistency of node embedding and topological potential space, enhance the use of global topological structure of model to network. Figure 2 As shown in Table 1, Table 2 and

[0075] Table 1

[0076] Facebook 348 Facebook 414 Facebook 686 Facebook 698 Facebook 1684 Facebook 1912 BigCLAM 26.0 48.3 13.8 45.6 32.7 21.4 CESNA 29.4 50.3 13.3 39.4 28.0 21.2 SNMF 13.5 32.5 11.6 40.1 37.2 20.8 NOCD-G 34.2 54.9 18.6 46.0 34.7 39.6 NOCD-X 33.8 55.6 17.6 44.9 35.8 40.1 UCoDe 33.9 59.5 22.1 34.9 33.3 33.1 AOCD-G(GAT2) 34.1 52.0 17.4 45.3 37.2 39.2 AOCD-X(GAT2) 33.8 52.5 17.0 45.5 33.6 36.6 AOCD-G(GAT6) 34.1 52.7 17.3 48.2 40.5 36.4 AOCD-X(GAT6) 33.2 52.6 17.2 48.1 40.4 36.1 ATPOCD-G(GAT2) 33.9 51.6 17.2 46.4 38.2 38.9 ATPOCD-X(GAT2) 33.0 51.1 17.0 45.7 39.4 38.5 ATPOCD-G(GAT6) 34.2 53.7 17.6 49.1 41.0 36.2 ATPOCD-X(GAT6) 33.8 54.3 17.6 48.8 40.6 36.5

[0077] Table 2

[0078] Chemistry Computer Science Engineering Medicine BigCLAM 0.0 0.0 7.9 0.0 CESNA 23.3 33.8 24.3 14.4 SNMF 2.6 9.4 10.1 4.9 NOCD-G 18.2 29.9 16.4 23.9 NOCD-X 37.5 41.9 28.9 33.2 UCoDe / / 33.2 / AOCD-G(GAT2) 20.7 31.1 19.1 25.8 AOCD-X(GAT2) 36.7 40.6 26.4 33.3 AOCD-G(GAT6) 23.0 32.9 19.9 DNF AOCD-X(GAT6) 41.2 45.0 32.7 DNF ATPOCD-G(GAT2) 20.7 31.1 18.4 26.7 ATPOCD-X(GAT2) 38.0 41.3 30.3 33.6 ATPOCD-G(GAT6) 22.5 31.2 21.2 DNF ATPOCD-X(GAT6) 41.4 45.7 33.4 DNF

[0079] Embodiment Two

[0080] The embodiment also discloses a computer device, which comprises a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to realize the steps of the method in the embodiment one.

[0081] Embodiment Three

[0082] The embodiment also discloses a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the method in the embodiment one.

[0083] Embodiment Four

[0084] The embodiment also discloses a computer program product, which comprises a computer program, and the computer program is executed by a processor to realize the steps of the method in the embodiment one.

[0085] The above merely provides the preferred embodiment of the present application, and the protection scope of the present application is not limited thereto. Any modification or replacement within the technical scope disclosed by the present application can be easily conceived by those skilled in the art, and should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for detecting overlapping communities based on graph attention networks and topological potentials, characterized in that, Includes the following steps: Construct an adjacency matrix for the graph based on the relationships between users; The PageRank value and Jaccard distance of each node are calculated based on the adjacency matrix of the graph. The topological potential calculation method is improved based on the PageRank value and Jaccard distance, and the topological potential value of each node is calculated based on the improved topological potential calculation method. The obtained topological potential is fused with the adjacency matrix and attribute matrix to obtain a multi-dimensional feature matrix, which is then input into the graph attention network to obtain the node-community membership matrix. Based on the node-community membership matrix, a threshold is set for each element to determine whether a node belongs to a community, thus realizing the multi-community affiliation of a node.

2. The method according to claim 1, characterized in that, The process of calculating the PageRank value and Jaccard distance of each node based on the graph adjacency matrix includes: The PageRank value of each node is calculated using the PageRank algorithm; the Jaccard distance between nodes is calculated using the Jaccard algorithm.

3. The method according to claim 1, characterized in that, The improved topological potential calculation method based on the PageRank value and Jaccard distance includes the following steps for calculating the topological potential value of each node: Using the PageRank value as the node quality, the normalized PageRank value is used to replace the equal-weighted quality in the traditional topological potential formula to obtain a quality term that dynamically changes with node importance; the Jaccard distance is used to replace the shortest path distance in the traditional topological potential formula to obtain a distance term that depends only on the local neighbor structure and is robust to sparse networks; the quality term and the distance term are substituted into the Gaussian influence kernel function and summed over all neighbor nodes under the control of the influence factor to obtain the topological potential value of the current node.

4. The method according to claim 1, characterized in that, The improved formula for calculating the topological potential is as follows: ; in, This is the PageRank value. and Let σ be a node, and σ be an influencing factor. This is the Jaccard distance.

5. The method according to claim 1, characterized in that, The process of fusing the obtained topological potential with the adjacency matrix and attribute matrix to obtain a multi-dimensional feature matrix, and then inputting it into the graph attention network to obtain the node-community membership matrix includes: The topological potential values ​​of each node are arranged into a topological potential vector, and then concatenated with the adjacency matrix and attribute matrix column by column to form a multi-dimensional feature matrix. The multi-dimensional feature matrix is ​​used as input to the graph attention network, and attention weighted aggregation is performed under the guidance of adjacency relationship to output node embedding; The node-community membership matrix is ​​obtained by embedding the nodes and then performing a feedforward mapping.

6. The method according to claim 5, characterized in that, Note that the loss function of the network described in the figure uses a balanced negative log-likelihood loss.

7. The method according to claim 6, characterized in that, The formula for calculating the balanced negative log-likelihood loss is: ; in, Assuming a uniform distribution of edges, It is a uniform distribution that is not an edge. The regularization coefficient is . For nodes Embedded vector, For nodes The topological potential vector, Let be the cosine similarity.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-7.

10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1-7.