Beyond Homophily: Community Search on Heterophilic Graphs
Qing Sima, Xiaoyang Wang, Wenjie Zhang
TL;DR
The paper tackles community search on heterophilic graphs where edge signs are unknown, a setting where traditional homophily-based signals and pure structure-based methods fail. It introduces AdaptCS, a two-phase framework with a Distinctive-Hop encoder that disentangles distance and frequency signals and a memory-efficient low-rank optimization to scale to large graphs. Phase II offers online search via Signed Community Search (SCS) and Adaptive Community Score (ACS), balancing embedding similarity and topology conditioned on estimated homophily. Empirical results show AdaptCS achieves higher F1-scores, robust performance across heterophily levels, and up to two orders of magnitude faster queries, enabling practical CS on massive real-world networks.
Abstract
Community search aims to identify a refined set of nodes that are most relevant to a given query, supporting tasks ranging from fraud detection to recommendation. Unlike homophilic graphs, many real-world networks are heterophilic, where edges predominantly connect dissimilar nodes. Therefore, structural signals that once reflected smooth, low-frequency similarity now appear as sharp, high-frequency contrasts. However, both classical algorithms (e.g., k-core, k-truss) and recent ML-based models struggle to achieve effective community search on heterophilic graphs, where edge signs or semantics are generally unknown. Algorithm-based methods often return communities with mixed class labels, while GNNs, built on homophily, smooth away meaningful signals and blur community boundaries. Therefore, we propose Adaptive Community Search (AdaptCS), a unified framework featuring three key designs: (i) an AdaptCS Encoder that disentangles multi-hop and multi-frequency signals, enabling the model to capture both smooth (homophilic) and contrastive (heterophilic) relations; (ii) a memory-efficient low-rank optimization that removes the main computational bottleneck and ensures model scalability; and (iii) an Adaptive Community Score (ACS) that guides online search by balancing embedding similarity and topological relations. Extensive experiments on both heterophilic and homophilic benchmarks demonstrate that AdaptCS outperforms the best-performing baseline by an average of 11% in F1-score, retains robustness across heterophily levels, and achieves up to 2 orders of magnitude speedup.
