ComGPT: Detecting Local Community Structure with Large Language Models
<|reference_start|>ComGPT: Detecting Local Community Structure with Large Language Models: 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.<|reference_end|>
@article{ni2024comgpt:,
    title={ComGPT: Detecting Local Community Structure with Large Language Models},
    author={Li Ni, Haowen Shen, Lin Mu, Yiwen Zhang, Wenjian Luo},
    journal={arXiv preprint arXiv:2408.06658},
    year={2024},
    archivePrefix={arXiv},
    eprint={2408.06658},
    primaryClass={cs.SI}
}