Community Search: A Meta-Learning Approach

Shuheng Fang, Kangfei Zhao, Guanghua Li, Jeffrey Xu Yu

TL;DR

This paper introduces Conditional Graph Neural Process (CGNP), a novel meta-learning framework for Community Search (CS). CGNP effectively learns transferable prior knowledge from multiple CS tasks, enabling rapid adaptation to new tasks with limited ground-truth data, outperforming existing methods in both accuracy and efficiency.

What Problem Does This Paper Address?

Community Search (CS) is a crucial graph analysis task aimed at identifying cohesive subgraphs around given "query nodes." Traditional CS methods often rely on rigid, predefined structural patterns (like k-cores or k-trusses) to define communities. This inflexibility limits their ability to discover real-world communities that don't conform to these strict patterns. While machine learning (ML) and deep learning (DL) approaches offer more flexibility by learning from data, they typically require substantial amounts of ground-truth community data, which is often scarce and labor-intensive to collect. This paper addresses the challenge of performing effective CS with limited training data by leveraging meta-learning to extract and transfer knowledge across different CS tasks.

Methods

The core contribution is the Conditional Graph Neural Process (CGNP), a meta-learning framework designed specifically for CS. CGNP builds upon the concept of Conditional Neural Processes (CNPs), which are neural network approximations of stochastic processes.

Key aspects of CGNP include:

  • Meta-Learning for Prior Knowledge: Instead of training a model from scratch for each new CS task, CGNP learns a "meta-model" that captures shared prior knowledge across multiple CS tasks. This meta-model can then be quickly adapted to a new task using only a few examples (few-shot learning).
  • Conditional Graph Neural Process (CGNP): This is the proposed framework. It's a graph-specific adaptation of CNPs. CGNP models the predictive distribution of community membership for query nodes. It uses a GNN encoder to generate task-specific node embeddings, a commutative operation (like sum, average, or self-attention) to aggregate these embeddings into a context representation, and a decoder to make the final community membership predictions.
  • Metric-Based Learning: CGNP employs a metric-based learning approach, focusing on learning a distance-aware hidden space where the proximity of nodes indicates community membership. This is particularly well-suited for classification tasks with limited and potentially imbalanced data.
  • Task Definition: The paper defines CS tasks as triplets of (graph, query nodes, partial ground-truth). They explore different task configurations, including single graphs with shared/disjoint communities and multiple graphs from one or different domains.

The paper also evaluates naive meta-learning approaches like Feature Transfer, Model-Agnostic Meta-Learning (MAML), and Graph Prototypical Network (GPN) as baselines, highlighting their limitations for CS.

Datasets

The authors evaluated CGNP on six real-world graph datasets:

  • Single Graphs: Cora, Citeseer, Arxiv, Reddit, DBLP.
  • Multiple Graphs: Facebook (composed of 10 ego-centric social networks).

For citation networks (Cora, Citeseer, Arxiv), node class labels were used to simulate communities. For DBLP, publication venue was used. For Reddit, community labels of posts were used. For Facebook, friendship community ground-truth was used.

Key Insights and Ideas

  • Meta-learning is crucial for low-data CS: The scarcity of ground-truth data is a major bottleneck for traditional ML/DL approaches in CS. Meta-learning offers a powerful solution by transferring knowledge from related tasks.
  • CS has unique characteristics that meta-learning can exploit: Unlike general meta-learning tasks, CS involves query-dependent communities and requires learning a transferable "community membership" prediction mechanism. CGNP is designed to leverage these specific characteristics.
  • Metric-based learning is robust for imbalanced data: The paper argues that metric-based approaches, like CGNP, are more suitable for CS tasks with imbalanced labels compared to optimization-based methods that can overfit.
  • GNN encoders benefit from attention mechanisms: The study found that using Graph Attention Networks (GAT) as the GNN encoder in CGNP generally led to better performance, suggesting that attention mechanisms help in weighting neighbor importance for community detection.

Key Results

  • Superior Performance: CGNP consistently outperformed existing CS algorithms and ML/DL baselines across various task configurations (Single Graph Shared/Disjoint Communities, Multiple Graphs). On average, CGNP achieved a 0.33 and 0.26 higher F1 score compared to native graph algorithms and ML/DL baselines, respectively.
  • Efficiency: CGNP demonstrated significant efficiency gains. It was over an order of magnitude faster in prediction time than many baselines and comparable to simpler transfer learning methods in training time.
  • Robustness to Ground-Truth Scarcity: CGNP showed strong performance even with very limited ground-truth data (e.g., 2% positive and 10% negative samples), outperforming ML baselines by an average of 30% in such scenarios.
  • Scalability: CGNP scales well with increasing graph sizes, maintaining efficient test times.

Limitations and Future Work

  • Task Configurations: While CGNP was tested on various task configurations, the paper notes that tasks across different domains (MGDD) are inherently harder.
  • Decoder Variants: The performance differences between CGNP's decoder variants (Inner Product, MLP, GNN) were subtle, suggesting that the encoder and meta-learning strategy are more critical.
  • Future Work: The paper suggests exploring different GNN layers and commutative operations for the encoder and aggregation steps, respectively, to further optimize CGNP. Investigating more complex graph structures and real-world scenarios with dynamic graphs could also be future directions.

Summary updated

BibTeX
@inproceedings{fang2023community,
  author = {Shuheng Fang and Kangfei Zhao and Guanghua Li and Jeffrey Xu Yu},
  title = {{Community Search: A Meta-Learning Approach}},
  booktitle = {ICDE},
  year = {2023},
  url = {https://openreview.net/forum?id=NB9dUnG5po},
}
Figure