Abstract
Graph-level clustering is a critical yet under-explored task in graph representation learning. Unlike node-level clustering, graph-level tasks involve grouping isolated graph instances, which lack natural inter-sample connections. We present GLCC (Graph-Level Contrastive Clustering), a novel framework that addresses this isolation by constructing an adaptive affinity graph to link similar instances. GLCC employs a dual-level contrastive learning strategy—instance-level and cluster-level—alongside neighbor-aware pseudo-labeling to learn clustering-friendly representations. Experimental results on biochemical and social network datasets demonstrate that GLCC significantly outperforms state-of-the-art methods, achieving up to 9.9% improvement in accuracy over strong baselines.
Introduction
In Graph Neural Networks (GNNs), research has predominantly focused on node-level tasks, such as grouping users within a single social network. However, many real-world applications—ranging from protein categorization to chemical compound classification—require graph-level clustering, where the objective is to group entire independent graphs.
The primary challenge in graph-level clustering is the "isolation" of instances. Unlike nodes in a single graph, separate graphs lack inherent edges, preventing standard message-passing techniques from sharing information between similar samples. Furthermore, traditional two-stage approaches—learning representations first and clustering later—often yield sub-optimal results because the features are not optimized for the clustering objective.
The GLCC Framework
GLCC addresses these challenges through an end-to-end framework that bridges the gap between representation learning and clustering.
1. Adaptive Affinity Graph Construction
To overcome instance isolation, GLCC constructs a "graph of graphs." By calculating similarities between graph instances and connecting each to its $k$-nearest neighbors, the model creates a structure that allows information propagation across the entire dataset.
2. Dual-Level Contrastive Learning
GLCC utilizes a multi-granularity contrastive strategy:
- Instance-level Contrast: A novel graph Laplacian-based contrastive loss is employed to pull neighbor graphs (identified in the affinity graph) closer in the embedding space while pushing non-neighbors apart.
- Cluster-level Contrast: This component operates on cluster assignments (the columns of the probability matrix), ensuring that different clusters are distinct and well-separated.
3. Neighbor-aware Pseudo-Labeling
The model generates "soft" pseudo-labels for each graph. These labels are refined by averaging the predictions of a graph’s neighbors in the affinity graph, providing a more accurate supervised signal back to the GNN.
Experimental Evaluation
The authors evaluated GLCC across six datasets in the biochemical (DD, AnchorQuery-10K/25K) and social network (IMDB-B, REDDIT-B/12K) domains.
Performance and Scalability
GLCC consistently outperformed traditional graph kernels and state-of-the-art contrastive methods. On social network datasets like IMDB-B and REDDIT-B, GLCC improved clustering accuracy by 8.2% and 9.9%, respectively. Notably, on the large-scale AnchorQuery-25K dataset, GLCC maintained a significant performance lead, demonstrating its robustness in complex multi-class scenarios.
Ablation Studies
Ablation experiments confirmed that both instance-level and cluster-level contrastive components are vital. Removing either led to a measurable drop in performance, highlighting the importance of multi-granularity information.
Conclusion
GLCC introduces a powerful paradigm for graph-level clustering by breaking the isolation between independent graphs. By integrating affinity graph construction with dual-level contrastive learning, it learns representations that are inherently more suitable for clustering. While the $O(N \log N)$ complexity of affinity graph construction is a consideration for massive datasets, GLCC sets a new benchmark for accuracy and robustness in graph-level unsupervised learning.
Summary updated