Unsupervised constrained community detection via self-expressive graph neural network

Sambaran Bandyopadhyay, Vishal PeterUAI 2021

Abstract

Community detection is a cornerstone of network analysis, yet traditional Graph Neural Network (GNN) approaches often decouple embedding learning from the clustering task. This separation frequently results in node representations that are not optimized for identifying community structures. We propose SEComm (Self-Expressive Community detection), an end-to-end unsupervised framework that bridges this gap. By incorporating a self-expressive layer to generate soft constraints, SEComm guides a GNN encoder to learn cluster-friendly embeddings. Our evaluation on five benchmark datasets demonstrates that SEComm significantly outperforms existing methods in both accuracy and scalability.

Introduction

The goal of community detection is to partition a graph into groups of nodes with dense internal connections. While GNNs have excelled in supervised tasks, their application to unsupervised community detection typically involves a two-stage pipeline: first, generating node embeddings via a self-supervised objective, and second, applying a clustering algorithm like K-means or Spectral Clustering.

The fundamental flaw in this "decoupled" approach is that the embedding process remains agnostic to the eventual clustering goal. Consequently, the learned vector space may not effectively separate distinct communities. SEComm addresses this by integrating the clustering objective directly into the GNN training loop, using self-generated constraints to provide feedback to the encoder.

The SEComm Framework

SEComm operates through a unified three-phase architecture designed for end-to-end optimization.

The three-phase architecture of SEComm, integrating node embedding, self-expressive similarity generation, and community detection.

Phase 1: Self-Supervised Embedding

The process begins with a GNN encoder that maps the input graph $G = (V, E, X)$ into a latent space $Z$. To capture the underlying topology without labels, the model employs a contrastive loss, ensuring that embeddings are robust to local structural perturbations.

Phase 2: Self-Expressive Similarity

The core innovation of SEComm is the Self-Expressive Module. Drawing from subspace clustering theory, it assumes that a node's embedding can be reconstructed as a linear combination of other nodes within the same community ($Z \approx QZ$). By processing nodes in batches, the module calculates a similarity matrix $S_{ext}$. This matrix identifies "must-link" and "no-link" pairs based on high and low similarity thresholds, effectively creating unsupervised soft constraints.

Phase 3: End-to-End Training

In the final phase, a Community Detection Module (an MLP) predicts community assignments $C$. Crucially, the loss from this module—constrained by the similarities found in Phase 2—is backpropagated to the GNN encoder. This ensures that the GNN learns representations specifically tailored for community separation.

Experimental Results

We evaluated SEComm on several benchmarks, including citation networks (Cora, Citeseer, Pubmed) and co-authorship networks (Physics).

Performance and Convergence

SEComm achieved a new state-of-the-art on the Cora dataset with 75.92% accuracy, a substantial improvement over previous methods like AGC (68.92%). As shown in the training curves below, the model exhibits stable convergence, with accuracy rising steadily as the loss decreases over epochs.

Training curves for the Cora and Wiki datasets showing the inverse relationship between loss and accuracy during end-to-end training.

Scalability

A major hurdle for self-expressive methods is the $O(N^3)$ complexity of subspace clustering. SEComm overcomes this through its batch-based constraint generation. On the Physics dataset (~34k nodes), SEComm was approximately 11 times faster than the AGC baseline (624 seconds vs. 6931 seconds) while maintaining superior accuracy.

Conclusion

SEComm demonstrates that joint optimization of embeddings and clustering is vital for effective unsupervised community detection. By leveraging self-expressive properties to generate internal constraints, the model bypasses the need for ground-truth labels while remaining scalable to large-scale networks. Future work will explore methods to automatically determine the number of communities ($K$) and further investigate the model's inductive capabilities for dynamic graphs.

Summary updated

BibTeX
@inproceedings{bandyopadhyay2021unsupervised,
  author = {Sambaran Bandyopadhyay and Vishal Peter},
  title = {{Unsupervised constrained community detection via self-expressive graph neural network}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2021},
}
Figure