Skip to main content
QUICK REVIEW

[Paper Review] Detecting Communities from Heterogeneous Graphs: A Context Path-based Graph Neural Network Model

Linhao Luo, Yixiang Fang|arXiv (Cornell University)|Sep 5, 2021
Complex Network Analysis TechniquesPhysics and Astronomy59 references7 citations
TL;DR

This paper proposes CP-GNN, a context path-based graph neural network for community detection in heterogeneous graphs that eliminates reliance on manually defined meta-paths. By modeling high-order relationships through learnable context paths and using attention mechanisms to weigh path importance, CP-GNN achieves state-of-the-art performance on real-world datasets, outperforming existing methods in unsupervised community detection tasks.

ABSTRACT

Community detection, aiming to group the graph nodes into clusters with dense inner-connection, is a fundamental graph mining task. Recently, it has been studied on the heterogeneous graph, which contains multiple types of nodes and edges, posing great challenges for modeling the high-order relationship between nodes. With the surge of graph embedding mechanism, it has also been adopted to community detection. A remarkable group of works use the meta-path to capture the high-order relationship between nodes and embed them into nodes' embedding to facilitate community detection. However, defining meaningful meta-paths requires much domain knowledge, which largely limits their applications, especially on schema-rich heterogeneous graphs like knowledge graphs. To alleviate this issue, in this paper, we propose to exploit the context path to capture the high-order relationship between nodes, and build a Context Path-based Graph Neural Network (CP-GNN) model. It recursively embeds the high-order relationship between nodes into the node embedding with attention mechanisms to discriminate the importance of different relationships. By maximizing the expectation of the co-occurrence of nodes connected by context paths, the model can learn the nodes' embeddings that both well preserve the high-order relationship between nodes and are helpful for community detection. Extensive experimental results on four real-world datasets show that CP-GNN outperforms the state-of-the-art community detection methods.

Motivation & Objective

  • To address the challenge of community detection in heterogeneous graphs where multiple node and edge types carry rich semantic information.
  • To overcome the limitations of meta-path-based methods that require expert-defined paths and suffer from exponential path explosion.
  • To develop an unsupervised learning framework that captures high-order node relationships without prior schema knowledge.
  • To enable the model to automatically identify and prioritize the most informative high-order relationships for community detection.
  • To improve community detection performance by modeling context paths as probabilistic co-occurrence signals through an attention-augmented GNN architecture.

Proposed method

  • Introduces context paths as sequences connecting primary-type nodes via auxiliary-type nodes, capturing high-order relationships without predefined meta-paths.
  • Defines a context path probability to model the likelihood of two nodes being connected via such paths, forming the basis of the objective function.
  • Proposes an unsupervised objective function that maximizes the expected co-occurrence of nodes linked by context paths to preserve high-order structure.
  • Employs a GNN architecture with multi-head attention to recursively aggregate embeddings, distinguishing the importance of different context paths.
  • Incorporates a context path length attention mechanism that assigns lower weights to longer, less relevant paths, improving robustness to hyperparameter choice.
  • Uses relation-level attention to dynamically weigh the contribution of different edge types in context paths, identifying semantically meaningful relationships.

Experimental results

Research questions

  • RQ1Can context paths effectively model high-order relationships in heterogeneous graphs without relying on manually designed meta-paths?
  • RQ2How can a graph neural network be trained in an unsupervised manner to preserve high-order structural patterns for community detection?
  • RQ3Can attention mechanisms effectively identify and prioritize the most informative context paths for community detection?
  • RQ4Does the proposed CP-GNN model achieve superior performance compared to state-of-the-art community detection methods on real-world heterogeneous graphs?
  • RQ5How sensitive is the model’s performance to the choice of context path length, and can attention mechanisms reduce this dependency?

Key findings

  • CP-GNN outperforms state-of-the-art community detection methods on four real-world datasets, including ACM, DBLP, and others, across multiple evaluation metrics.
  • The model achieves optimal performance when context path length K=4, with performance slightly declining for K>4 due to overfitting to long, less relevant paths.
  • Attention weights for context path lengths decrease with increasing length, confirming that shorter paths are more informative and aligning with intuitive expectations.
  • The relation-level attention mechanism successfully identifies more meaningful paths—such as PSP and APCPA—whose higher attention scores correlate with better F1 scores in downstream evaluation.
  • The attention mechanism reduces sensitivity to the hyperparameter K, as results remain close to optimal even when K is set higher than the optimal value (e.g., K=5 or 6).
  • Visualizations of attention matrices confirm that the model learns to focus on semantically relevant node and edge types, such as author-paper-topic connections, which are critical for community formation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.