Table of Contents
Fetching ...

Revisiting Modularity Maximization for Graph Clustering: A Contrastive Learning Perspective

Yunfei Liu, Jintang Li, Yuehe Chen, Ruofan Wu, Ericbk Wang, Jing Zhou, Sheng Tian, Shuheng Shen, Xing Fu, Changhua Meng, Weiqiang Wang, Liang Chen

TL;DR

This paper uncovers a fundamental link between modularity maximization and graph contrastive learning, reframing modularity as a natural pretext for contrastive tasks. It introduces MAGI, a community-aware, augmentation-free framework that leverages a two-stage random-walk minibatch sampler to approximate the modularity matrix and a SimCLR-style loss to learn scalable node representations. MAGI achieves state-of-the-art clustering performance across eight real-world datasets, including industrial-scale graphs with up to 100M nodes, and mitigates semantic drift by exploiting inherent community structure rather than augmentations. The work provides both theoretical insight and empirical evidence that modularity-based objectives can drive effective, scalable graph clustering in practice.

Abstract

Graph clustering, a fundamental and challenging task in graph mining, aims to classify nodes in a graph into several disjoint clusters. In recent years, graph contrastive learning (GCL) has emerged as a dominant line of research in graph clustering and advances the new state-of-the-art. However, GCL-based methods heavily rely on graph augmentations and contrastive schemes, which may potentially introduce challenges such as semantic drift and scalability issues. Another promising line of research involves the adoption of modularity maximization, a popular and effective measure for community detection, as the guiding principle for clustering tasks. Despite the recent progress, the underlying mechanism of modularity maximization is still not well understood. In this work, we dig into the hidden success of modularity maximization for graph clustering. Our analysis reveals the strong connections between modularity maximization and graph contrastive learning, where positive and negative examples are naturally defined by modularity. In light of our results, we propose a community-aware graph clustering framework, coined MAGI, which leverages modularity maximization as a contrastive pretext task to effectively uncover the underlying information of communities in graphs, while avoiding the problem of semantic drift. Extensive experiments on multiple graph datasets verify the effectiveness of MAGI in terms of scalability and clustering performance compared to state-of-the-art graph clustering methods. Notably, MAGI easily scales a sufficiently large graph with 100M nodes while outperforming strong baselines.

Revisiting Modularity Maximization for Graph Clustering: A Contrastive Learning Perspective

TL;DR

This paper uncovers a fundamental link between modularity maximization and graph contrastive learning, reframing modularity as a natural pretext for contrastive tasks. It introduces MAGI, a community-aware, augmentation-free framework that leverages a two-stage random-walk minibatch sampler to approximate the modularity matrix and a SimCLR-style loss to learn scalable node representations. MAGI achieves state-of-the-art clustering performance across eight real-world datasets, including industrial-scale graphs with up to 100M nodes, and mitigates semantic drift by exploiting inherent community structure rather than augmentations. The work provides both theoretical insight and empirical evidence that modularity-based objectives can drive effective, scalable graph clustering in practice.

Abstract

Graph clustering, a fundamental and challenging task in graph mining, aims to classify nodes in a graph into several disjoint clusters. In recent years, graph contrastive learning (GCL) has emerged as a dominant line of research in graph clustering and advances the new state-of-the-art. However, GCL-based methods heavily rely on graph augmentations and contrastive schemes, which may potentially introduce challenges such as semantic drift and scalability issues. Another promising line of research involves the adoption of modularity maximization, a popular and effective measure for community detection, as the guiding principle for clustering tasks. Despite the recent progress, the underlying mechanism of modularity maximization is still not well understood. In this work, we dig into the hidden success of modularity maximization for graph clustering. Our analysis reveals the strong connections between modularity maximization and graph contrastive learning, where positive and negative examples are naturally defined by modularity. In light of our results, we propose a community-aware graph clustering framework, coined MAGI, which leverages modularity maximization as a contrastive pretext task to effectively uncover the underlying information of communities in graphs, while avoiding the problem of semantic drift. Extensive experiments on multiple graph datasets verify the effectiveness of MAGI in terms of scalability and clustering performance compared to state-of-the-art graph clustering methods. Notably, MAGI easily scales a sufficiently large graph with 100M nodes while outperforming strong baselines.
Paper Structure (31 sections, 11 equations, 8 figures, 6 tables, 1 algorithm)

This paper contains 31 sections, 11 equations, 8 figures, 6 tables, 1 algorithm.

Figures (8)

  • Figure 1: An illustrative overview of how positive and negative examples of a query node are guided by the "modularity" measure.
  • Figure 2: Overview of proposed Magi framework. During the self-supervised learning phase, the original graph $\mathcal{G}$ is provided to generate node embedding and modularity matrix through a GNN encoder and a two-stage random walk process, respectively. Then, the SimCLR loss function is employed to optimize the encoder in a self-supervised manner.
  • Figure 3: Comparison of pseudo-labels constructed by Magi and other methods.
  • Figure 4: The performance of Magi with varying the number and depth of random walks on the Cora and Reddit dataset in terms of NMI.
  • Figure 5: The performance of Magi with varying the temperature $\tau$ on the Cora and Reddit dataset, respectively.
  • ...and 3 more figures