[Paper Review] Revisiting Modularity Maximization for Graph Clustering: A Contrastive Learning Perspective
This paper proposes Magi, a novel augmentation-free graph clustering framework that leverages modularity maximization as a contrastive pretext task to improve clustering performance and scalability. By formulating positive and negative samples through modularity scores and using a two-stage random walk to approximate the modularity matrix, Magi avoids semantic drift and achieves state-of-the-art performance on large-scale graphs, including a 100M-node graph, outperforming existing GCL-based methods.
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.
Motivation & Objective
- To address the limitations of existing graph contrastive learning (GCL) methods, particularly semantic drift and scalability issues arising from data augmentation and expensive clustering-based pseudo-labeling.
- To uncover the underlying connection between modularity maximization and contrastive learning, revealing that modularity naturally defines positive and negative sample pairs.
- To develop a scalable, augmentation-free GCL framework that leverages modularity as a self-supervised pretext task for community-aware graph clustering.
- To demonstrate that modularity-based contrastive learning can achieve superior clustering performance while maintaining computational efficiency on large-scale graphs.
Proposed method
- Magi formulates positive and negative sample pairs based on the sign of the modularity score and edge indicators, using modularity as a natural contrastive signal.
- It employs a two-stage random walk strategy to efficiently approximate the modularity matrix in a mini-batch manner, reducing computational cost.
- The framework uses a contrastive loss function that optimizes for modularity maximization, with temperature hyperparameter tuning to balance hard negative sampling.
- It integrates high-order proximity via random walks to better capture complex community structures beyond immediate neighbors.
- The method avoids data augmentation and K-means/KNN clustering for pseudo-label generation, reducing semantic drift and improving scalability.
- A sampling strategy based on community-aware random walks ensures stable performance with minimal positive samples per node, enabling scalability to graphs with up to 100M nodes.
Experimental results
Research questions
- RQ1How does modularity maximization relate to graph contrastive learning, and can it serve as a principled alternative to data augmentation in GCL?
- RQ2Can a contrastive learning framework based on modularity avoid semantic drift caused by noisy or inconsistent augmentations?
- RQ3What is the impact of high-order proximity and sampling strategy on the scalability and performance of modularity-based GCL?
- RQ4How does the proposed framework compare to state-of-the-art GCL methods in terms of clustering accuracy and computational efficiency on large-scale graphs?
- RQ5Can modularity-based contrastive learning achieve competitive performance without relying on expensive clustering algorithms like K-means for pseudo-label generation?
Key findings
- Magi achieves state-of-the-art clustering performance across eight real-world datasets, outperforming strong baselines including augmentation-free and GCL-based methods.
- The framework scales effectively to graphs with up to 100 million nodes, demonstrating superior scalability compared to methods relying on K-means or KNN for pseudo-labeling.
- A walk depth of approximately 5 provides optimal performance, as larger depths risk sampling positive pairs with differing community semantics.
- The temperature hyperparameter performs best around 0.5, balancing attention to hard negative samples and overall contrastive signal.
- Using the sign of modularity scores and edge indicators for defining positive/negative pairs improves performance over direct edge-based sampling, which suffers from inter-community edge noise.
- The proposed sampling strategy achieves performance comparable to high-order modularity score-based methods but with significantly lower computational complexity, enabling large-scale deployment.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.