ComGPT: Detecting Local Community Structure with Large Language Models

📅 2024-08-13
🏛️ arXiv.org
📈 Citations: 2
Influential: 0
📄 PDF
🤖 AI Summary
To address the limitations of large language models (LLMs) in community semantic understanding and the seed-dependency, community-drift, and free-riding issues inherent in conventional seed-expansion algorithms, this paper proposes ComGPT—a novel local community detection framework integrating LLMs with local modularity-driven optimization. Methodologically, ComGPT introduces (1) an incident graph encoding scheme enhanced by community knowledge to explicitly model neighborhood structural semantics, and (2) a Node Selection Guide (NSG) prompting mechanism that directs LLMs to accurately assess candidate node membership. By leveraging local modularity (M) for node filtering, custom prompt engineering, and synergistic optimization with GPT-series models, ComGPT achieves significant performance gains over traditional algorithms and LLM-based baselines across multiple benchmark graph datasets. Results empirically validate that semantic-aware graph encoding and controllable prompting are critical for enhancing community detection accuracy and robustness.

Technology Category

Application Category

📝 Abstract
Large Language Models (LLMs), like GPT, have demonstrated the ability to understand graph structures and have achieved excellent performance in various graph reasoning tasks, such as node classification. Despite their strong abilities in graph reasoning tasks, they lack specific domain knowledge and have a weaker understanding of community-related graph information, which hinders their capabilities in the community detection task. Moreover, local community detection algorithms based on seed expansion, referred to as seed expansion algorithms, often face the seed-dependent problem, community diffusion, and free rider effect. To use LLMs to overcome the above shortcomings, we explore a GPT-guided seed expansion algorithm named ComGPT. ComGPT iteratively selects potential nodes by local modularity M from the detected community's neighbors, and subsequently employs LLMs to choose the node to join the detected community from these selected potential nodes. To address the above issues faced by LLMs, we improve graph encoding method, called Incident, by incorporating community knowledge to improve LLMs's understanding of community-related graph information. Additionally, we design the NSG (Node Selection Guide) prompt to enhance LLMs' understanding of community characteristics. Experimental results demonstrate that ComGPT outperforms the comparison methods, thereby confirming the effectiveness of the improved graph encoding method and prompts.
Problem

Research questions and friction points this paper is trying to address.

Detects local community structure using large language models
Overcomes seed expansion algorithm shortcomings in community detection
Enhances LLMs' understanding of community-related graph information
Innovation

Methods, ideas, or system contributions that make the work stand out.

ComGPT uses GPT-guided seed expansion algorithm
ComIncident encodes graphs with community knowledge
Node Selection Guide prompt enhances LLM understanding
🔎 Similar Papers
No similar papers found.