Complex network community division method based on large language model

Through a large language model, a hierarchical directed acyclic graph is constructed, combined with a local search algorithm, the efficiency and accuracy of community division in large-scale networks are solved, and efficient and accurate community structure recognition is achieved.

CN120509488APending Publication Date: 2025-08-19HANGZHOU NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510651795.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-20
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

Traditional community division methods have high computational complexity in large-scale networks and are susceptible to noise data interference, making it difficult to efficiently and accurately identify community structures.

Method used

Use large language models to identify the central nodes of the community, build a hierarchical directed acyclic graph, and combine local search and breadth priority algorithms to divide the community, and optimize the community structure through centrality and influence values.

Benefits of technology

It realizes efficient and accurate community division in large-scale networks, reduces calculation costs, improves the accuracy and speed of community identification, and is suitable for a variety of practical application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_42
    Figure QLYQS_42
  • Figure QLYQS_76
    Figure QLYQS_76
Patent Text Reader

Abstract

The invention discloses a complex network community division method based on a large language model. A traditional community division method has certain limitation in a large-scale network and is easily interfered by noise data or abnormal values. The method comprises the following steps: firstly, constructing an initial undirected network; secondly, generating an initial sub-community, and accurately positioning a community core node based on connection characteristics and local topological information of nodes by utilizing the deep reasoning capability of a large model; and finally, constructing a hierarchical directed graph, applying a local search technology, combining a centrality PR value, an influence value and a composite evaluation standard of a path length, and gradually dividing a multi-level community. The method disclosed by the invention shows excellent adaptability in a complex network, and can obviously reduce the calculation burden and improve the segmentation quality. The method not only provides a new research perspective for the field of network analysis, but also provides efficient support for solving practical problems in related fields, and is wide in application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, particularly network analysis technology, and specifically relates to a method for delineating complex network communities based on a large language model. This method combines the reasoning capabilities of a large language model with a local search strategy to identify community structures in the network, achieving efficient and accurate community delineation. Background Art

[0002] Community partitioning is a core problem in network analysis. Its goal is to identify closely connected groups of nodes in a network, called communities. Through community partitioning, complex network structures can be identified. For example, on social networks such as Weibo, community partitioning can identify user interest groups, such as photography enthusiasts or food blogger circles, thereby supporting personalized recommendations and targeted advertising. In biology, community partitioning is used to analyze protein interaction networks. By identifying functional modules, it can better understand biological processes within cells and even discover the underlying mechanisms of disease, such as the clustering patterns of cancer-related genes. With the advent of the big data era, the scale and complexity of networks continue to increase. Efficient community partitioning methods have become key tools for mining hidden information and optimizing resource allocation.

[0003] Traditional community partitioning methods, such as modularity optimization and spectral clustering, can effectively reveal community structures in small-scale networks. However, as the network scale expands and the community structure becomes more complex, the limitations of these methods gradually become apparent. For example, modularity optimization relies on global calculations, which are too computationally complex for large-scale networks and often cannot be completed within a reasonable time. Spectral clustering is sensitive to changes in network topology and is easily interfered with by noisy data or outliers. Traditional methods are often unable to accurately identify the boundaries of communities at different levels. Therefore, how to design more efficient and accurate community partitioning for large and complex networks is a major challenge currently faced.

[0004] In recent years, large language model technology, leveraging its powerful capabilities in natural language processing, pattern recognition, and intelligent decision-making, has begun to be applied to network analysis, bringing new possibilities to community segmentation. By learning from massive amounts of data, large language models can understand complex network structures and underlying patterns, providing innovative solutions to address the limitations of traditional methods. Therefore, combining large language models with community segmentation, through central node identification, hierarchical directed acyclic graph construction, and subcommunity merging, achieves efficient and accurate community segmentation in large-scale networks. Summary of the Invention

[0005] The purpose of this invention is to provide a complex network community partitioning method based on a large language model. By utilizing the reasoning ability of the large language model and combining local search and hierarchical strategies, the method can achieve efficient and accurate partitioning of community structures in large-scale networks. The method is particularly suitable for large-scale network community partitioning scenarios.

[0006] The proposed method uses a large language model to identify community center nodes in a network and constructs a hierarchical directed acyclic graph to achieve community partitioning. The core steps include: (1) calculating the centrality characteristics of each node and selecting candidate community center nodes using large language model reasoning; (2) constructing a hierarchical directed acyclic graph based on the candidate community center nodes and partitioning the initial subcommunities using a breadth-first algorithm; (3) merging subcommunities based on the influence of community center nodes to complete the community partitioning task. This method combines heuristic search, large language model reasoning, and graph algorithms and can be used to discover community structures in large and complex networks.

[0007] The method of the present invention specifically is: Step (1) construct an initial undirected network, delete the self-loops and duplicate edges in the network, and obtain an undirected network , node set , edge set , is the number of nodes in the network, is the number of edges; Step (2) Generate initial sub-community: (2-1) Obtaining node features: Collecting undirected network Each node Topology information, including each node The set of neighbor nodes And the degree centrality value of the node , , the two nodes with an edge are neighbors to each other. Indicates modulo, the number of neighbor nodes ; (2-2) Community center identification based on large language model: First, for each node Construct structured prompt words and input them into the large language model to obtain decision results; the prompt words include source node description, candidate node description and question description: Input the prompt word into the large language model and require it to return a node ID as the target node , ,The large language model determines whether there is a more important node among the neighbor nodes based on the ,degree centrality value and the neighbor list. If there is one, the neighbor ID is returned to ,generate a directed edge from the source node to the neighbor in the subsequent ,directed acyclic network. If there is no one, the source node ID is returned, indicating that no ,directed edge is generated. (2-3) Constructing a directed acyclic network: Based on the decision results of the large language model, a directed acyclic network is constructed. , whose node set Undirected Network Node set Exactly the same, then according to the source node returned by the large language model The corresponding target node ,exist Add a directed edge to , if the source node is returned itself, no edge is added; (2-4) Repeat (2-2) and (2-3) until the large language model traverses the undirected network All nodes in the network form a hierarchical directed acyclic network structure ; Candidate community center nodes in the directed acyclic network The candidate community center node set has the characteristic of out-degree 0 , is the number of candidate community center nodes, candidate community center nodes ,and , for The out-degree, ; Step (3) Divide the final community structure: (3-1) Obtaining an undirected network The centrality PR value of all nodes in , the PR value reflects the importance of the node in the global network: , For nodes PR value, For nodes Neighbor nodes PR value, , L is the damping factor, which represents the random jump probability; (3-2) Calculate the influence value of all candidate community center nodes ; (3-3) Screening community centers and dividing communities: First, the influence values of all candidate community center nodes are calculated. Sort in descending order, select the first Nodes are used as community center nodes. is the default value; for nodes that are not selected as community center nodes candidate nodes , according to the method (3-2) to determine the superior leader of each unselected candidate node, in the directed acyclic network Add a new node Directed edges pointing to superior leaders, updating the directed acyclic network ; With the selected Community Center Node As the root node, in the updated directed acyclic network Back propagation along the directed edges to obtain the center node of each community Reverse reachable set ,in are all nodes that can reach the community center through directed paths The node set of ; If the path exists Pointing to a node , then the judgment value is 1, otherwise 0; Repeatedly traverse the directed acyclic network All root nodes in the network generate back-propagation reachable sets, and the final community is divided into .

[0008] Further, in step (2-2), the source node is described as {source node :degree , neighbor list }; the candidate node is described as {neighbor node :degree , neighbor list }, {neighbor node :degree , neighbor list }, , {neighbor node :degree , neighbor list }; Description of the problem: Identify potential community center nodes in the network; community center nodes have the following characteristics: ① more connected nodes, ② strong connectivity in the local structure; Based on the description of the source node and candidate nodes, select a node as the community center node.

[0009] Furthermore, step (3-2) is as follows: from each candidate community center node Starting from the original undirected network From oneself Start to execute the breadth-first search algorithm, visit all nodes in order of hierarchy, and ensure that the search path increases by distance; during the search process, if other candidate community center nodes are traversed , then compare the PR values of the two candidate community center nodes. If the node The PR value is greater than the node The PR value of Defined as a node The superior leader records the distance between the two nodes as the shortest path length If no candidate community center node with a higher PR value is found after traversing all reachable nodes, then the node has no superior leader, and the longest distance to other candidate community center nodes is used as the shortest path length. ; Calculate the influence value of all candidate community center nodes , .

[0010] The method of the present invention achieves efficient and accurate community division by combining the network topology properties and the powerful reasoning ability of the large language model. This method fully utilizes the unique advantages of the large language model in understanding complex network structures and making intelligent decisions. It adopts local search to gradually explore from the local leadership, and constructs a directed acyclic network through a hierarchical strategy to effectively handle the complexity of multi-scale community structures, that is, the situation where small communities are nested within large communities. Compared with traditional global optimization methods, it avoids high computational costs and ensures high accuracy of division through influence values. It is particularly suitable for real-time analysis of large-scale networks. In practical applications, this method performs well in a variety of scenarios: for example, in user relationship analysis on large-scale social platforms, it can quickly identify interest groups and provide support for precision marketing or personalized content recommendations; in biological networks, it can analyze protein interaction networks, reveal functional modules or key gene groups, and provide important basis for disease mechanism research and drug target development; in traffic networks, it can divide high-traffic communities to help optimize traffic flow and urban road planning. From a scientific research perspective, this invention introduces large language model technology into the field of community division, which not only breaks through the limitations of traditional methods in efficiency and adaptability, but also provides a new theoretical approach for multi-scale community analysis, and promotes the development of the intersection of network science and artificial intelligence, such as exploring the dynamic evolution of community structure or combining other network indicators to further optimize algorithms; from a practical perspective, it optimizes resource allocation and improves application efficiency by efficiently dividing communities, and has far-reaching theoretical innovation and practical application value in fields such as social network marketing, economic resource allocation, and biomedical research. DETAILED DESCRIPTION

[0011] The present invention is further illustrated below through specific examples. A complex network community partitioning method based on a large language model uses a large language model to identify community center nodes in the network and construct a hierarchical directed acyclic network to achieve community partitioning. The core steps include: (1) calculating the centrality characteristics of each node and selecting candidate community center nodes using a large language model inference; (2) constructing a hierarchical directed acyclic network based on the candidate community center nodes and dividing the initial sub-communities through a breadth-first algorithm; (3) merging sub-communities according to the influence of the community center nodes to complete the community partitioning task. This method combines heuristic search, large language model inference and graph algorithm, and can be used to discover multi-scale community structures. Specifically as follows: Step (1) constructs an initial undirected network. In order to ensure that the network can fully and accurately reflect the topological characteristics of the original network, the self-loops and duplicate edges in the network are deleted to obtain an undirected network. , node set , edge set , is the number of nodes in the network, is the number of edges.

[0012] Step (2) Generate initial sub-community: (2-1) Obtaining node features: Collecting undirected network Each node Topology information, including each node The set of neighbor nodes And the degree centrality value of the node , , the two nodes with an edge are neighbors to each other. Indicates modulo, the number of neighbor nodes .

[0013] (2-2) Community center identification based on large language models, using existing large language models (such as ChatGPT-4O, DeepSeek, and LLama3): For each node Construct structured prompt words and input them into the large language model to obtain decision results. The prompt words consist of the following three parts: I. Source Node Description: Provides characteristic information of all nodes in the network, described as {source node :degree , neighbor list }.

[0014] II. Candidate node description: List source nodes Each neighbor node and its characteristics, , described as: {neighbor node :degree , neighbor list }, {neighbor node :degree , neighbor list }, , {neighbor node :degree , neighbor list }.

[0015] III. Problem Description: Clarify the task objectives and guide the large model to understand the scenario of identifying candidate community center nodes. In the network, identify potential community center nodes; community center nodes have the following characteristics: ① a large number of connected nodes, ② strong connectivity in the local structure; based on the descriptions of the source node and candidate nodes, select a node as the community center node.

[0016] Input the prompt word into the large language model and require it to return a node ID as the target node , The large language model determines whether there is a more important node among the neighbor nodes based on the degree centrality value and the neighbor list. If so, the neighbor ID is returned to generate a directed edge from the source node to the neighbor in the subsequent directed acyclic network; if not, the source node ID is returned, indicating that no directed edge is generated.

[0017] (2-3) Constructing a directed acyclic network: Based on the decision results of the large language model, construct a directed acyclic network First, define a directed acyclic network , whose node set is similar to the undirected network The node set is exactly the same, and then the source node returned by the large language model The corresponding target node ,exist Add a directed edge to , if the source node is returned By itself, no edge is added.

[0018] (2-4) Repeat (2-2) and (2-3) until the large language model traverses the undirected network All nodes in the network form a hierarchical directed acyclic network structure The candidate community center node in the directed acyclic network The candidate community center node set has the characteristic of out-degree 0 , is the number of candidate community center nodes, candidate community center nodes ,and , for The out-degree, .

[0019] Step (3) Divide the final community structure: (3-1) Obtaining an undirected network The PageRank (PR) centrality values of all nodes in , the PR value reflects the importance of the node in the global network: , For nodes PR value, For nodes Neighbor nodes PR value, L is the damping factor, L = 0.8 to 0.9 (set to 0.85 in this embodiment), indicating the random jump probability.

[0020] (3-2) Determine the superior leader and influence value: From each candidate community center node Starting from the original undirected network From oneself Start to execute the breadth-first search algorithm, visit all nodes in order of hierarchy, and ensure that the search path increases by distance; during the search process, if other candidate community center nodes are traversed , then compare the PR values of the two candidate community center nodes. If the node The PR value is greater than the node The PR value of Defined as a node The superior leader records the distance between the two nodes as the shortest path length If no candidate community center node with a higher PR value is found after traversing all reachable nodes, then the node has no superior leader, and the longest distance to other candidate community center nodes is used as the shortest path length. ; Calculate the influence value of all candidate community center nodes , .

[0021] (3-3) Screening community centers and dividing communities: First, the influence values of all candidate community center nodes are calculated. Sort in descending order, select the first Nodes are used as community center nodes. is the default value. candidate nodes , according to the method (3-2) to determine the superior leader of each unselected candidate node, in the directed acyclic network Add a new node Directed edges pointing to superior leaders, updating the directed acyclic network .

[0022] With the selected Community Center Node As the root node, in the updated directed acyclic network Back propagation along the directed edges to obtain the center node of each community Reverse reachable set ,in ; If the path exists Pointing to a node , then the judgment value is 1 if the value is set, otherwise it is 0.

[0023] Repeatedly traverse the directed acyclic network All root nodes in the network generate back-propagation reachable sets, and the final community is divided into .

Claims

1. A complex network community segmentation method based on a large language model, characterized by: Step (1) construct an initial undirected network, delete the self-loops and duplicate edges in the network, and obtain an undirected network , node set , edge set , is the number of nodes in the network, is the number of edges; Step (2) Generate initial sub-community: (2-1) Obtaining node features: Collecting undirected network Each node Topology information, including each node The set of neighbor nodes And the degree centrality value of the node , , the two nodes with edges are neighbors to each other, Indicates modulo, the number of neighbor nodes ; (2-2) Community center identification based on large language model: First, for each node Construct structured prompt words and input them into the large language model to obtain decision results; the prompt words include source node description, candidate node description and question description: Input the prompt word into the large language model and require it to return a node ID as the target node , ,The large language model determines whether there is a more important node among the neighbor nodes based on the degree centrality value and the neighbor list. If so, the neighbor ID is returned to ,generate a directed edge from the source node to the neighbor in the subsequent directed acyclic ,network; If it does not exist, the source node ID is returned, indicating that no directed edge is generated; (2-3) Constructing a directed acyclic network: Based on the decision results of the large language model, a directed acyclic network is constructed. , whose node set Undirected Network Node set Exactly the same, then according to the source node returned by the large language model The corresponding target node ,exist Add a directed edge to , if the source node is returned itself, no edge is added; (2-4) Repeat (2-2) and (2-3) until the large language model traverses the undirected network All nodes in the network form a hierarchical directed acyclic network structure ; Candidate community center nodes in a directed acyclic network The candidate community center node set has the characteristic of out-degree 0 , is the number of candidate community center nodes, candidate community center nodes ,and , for The out-degree, ; Step (3) Divide the final community structure: (3-1) Obtaining an undirected network The centrality PR value of all nodes in , the PR value reflects the importance of the node in the global network: , For nodes PR value, For nodes Neighbor nodes PR value, , L is the damping factor, L=0.8~0.9, which represents the random jump probability; (3-2) Calculate the influence value of all candidate community center nodes ; (3-3) Screening community centers and dividing communities: First, the influence values of all candidate community center nodes are calculated. Sort in descending order, select the first Nodes are used as community center nodes. is the default value; for nodes that are not selected as community center nodes candidate nodes , according to the method (3-2) to determine the superior leader of each unselected candidate node, in the directed acyclic network Add a new node Directed edges pointing to superior leaders, updating the directed acyclic network ; With the selected Community Center Node As the root node, in the updated directed acyclic network Back propagation along the directed edges to obtain the center node of each community Reverse reachable set ,in are all nodes that can reach the community center through directed paths The node set of ; If the path exists Pointing to a node , then the judgment value is 1, otherwise 0; Repeatedly traverse the directed acyclic network All root nodes in the network generate back-propagation reachable sets, and the final community is divided into .

2. The method for dividing complex network communities based on a large language model according to claim 1, wherein: In step (2-2), the source node is described as {source node :degree , neighbor list }; the candidate node is described as {neighbor node :degree , neighbor list }, {neighbor node :degree , neighbor list }, , {neighbor node :degree , neighbor list }; Description of the problem: Identify potential community center nodes in the network; community center nodes have the following characteristics: ① more connected nodes, ② strong connectivity in the local structure; Based on the description of the source node and candidate nodes, select a node as the community center node.

3. The complex network community division method based on a large language model according to claim 1, characterized in that: Step (3-2) is as follows: From each candidate community center node Starting from the original undirected network From oneself Start to execute the breadth-first search algorithm, visit all nodes in order of hierarchy, and ensure that the search path increases by distance; during the search process, if other candidate community center nodes are traversed , then compare the PR values of the two candidate community center nodes. If the node The PR value is greater than the node The PR value of Defined as a node The superior leader records the distance between the two nodes as the shortest path length If no candidate community center node with a higher PR value is found after traversing all reachable nodes, then the node has no superior leader, and the longest distance to other candidate community center nodes is used as the shortest path length. ; Calculate the influence value of all candidate community center nodes , .