Simplifying Clustering with Graph Neural Networks

Filippo Maria Bianchi

Abstract

Graph clustering aims to group similar nodes while minimizing inter-group connectivity. Traditional methods and recent deep learning adaptations often rely on complex objective functions that balance smoothing and cluster size. This paper introduces Just Balance GNN (JBGNN), a streamlined approach that eliminates the smoothing term from the loss function. By demonstrating that Graph Neural Network (GNN) architectures inherently perform feature smoothing through message-passing, we show that optimizing solely for cluster balance is sufficient. JBGNN achieves state-of-the-art performance with significant improvements in training speed and numerical stability.

Introduction

Clustering nodes in a graph is a classic problem typically addressed via spectral clustering. The objective function in these methods usually involves two competing goals: minimizing Local Quadratic Variation (LQV) to ensure connected nodes share cluster assignments, and balancing cluster sizes to avoid degenerate solutions. Modern GNN-based clustering models like MinCutPool and DMoN incorporate these terms but often face challenges with numerical instability and high computational overhead due to complex loss ratios.

JBGNN addresses these issues by asking: Can we simplify the objective without losing performance?

The JBGNN Framework

The core innovation of JBGNN is the removal of the LQV (smoothing) term from the unsupervised loss function. The proposed minimalist loss function is: $$\mathcal{L} = -\text{Tr}(\sqrt{\mathbf{S}^T \mathbf{S}})$$ where $\mathbf{S}$ represents the cluster assignment matrix. This objective focuses exclusively on ensuring that clusters are high-confidence and balanced.

Architecture as Optimization

The theoretical justification for this simplification lies in the GNN's architecture. Theorem 1 in the original work proves that Message Passing (MP) layers act as a gradient descent step that minimizes the LQV of node features. Consequently, the GNN structure itself performs the necessary smoothing, making an explicit smoothing term in the loss function redundant.

Experimental Evaluation

The model was evaluated on four standard citation network benchmarks: Cora, Citeseer, Pubmed, and DBLP. These datasets consist of attributed graphs where nodes possess features (e.g., word counts) alongside link structures.

Figure 1: Distribution of node properties across the benchmark datasets.

Key Results and Discussion

JBGNN demonstrates significant advantages over existing end-to-end GNN models in terms of efficiency and stability.

Computational Efficiency and Stability

By reducing the loss function to a single balancing term, the computational complexity is lowered to $O(NK^2)$, where $N$ is the number of nodes and $K$ is the number of clusters. This is significantly more efficient than methods scaling with the number of edges ($E$) or $N^2$. Furthermore, the absence of complex ratios in the loss function enhances numerical stability, preventing common issues like exploding or vanishing gradients.

Performance and Convergence

JBGNN maintains or exceeds the clustering performance (measured by Accuracy and Normalized Mutual Information) of more complex models. Notably, it achieved training speedups ranging from 27% to 1,376% on the Pubmed dataset.

Figure 2: Comparison of training dynamics (Loss and NMI) between (a) MinCutPool, (b) DMoN, and (c) the proposed JBGNN.

As shown in Figure 2, JBGNN exhibits faster and cleaner convergence. Unlike MinCutPool or DMoN, which must balance competing objectives, JBGNN's single-term loss allows for a more direct optimization path.

Limitations and Future Work

While effective, JBGNN currently assumes that clusters should be roughly equal in size. This may not hold for real-world graphs with power-law distributions. Future work could involve adapting the balancing term for known non-uniform cluster distributions or integrating JBGNN into hierarchical GNN pipelines for graph-level classification tasks.

Summary updated

BibTeX
@inproceedings{bianchi2023simplifying,
  author = {Filippo Maria Bianchi},
  title = {{Simplifying Clustering with Graph Neural Networks}},
  booktitle = {NLDL},
  year = {2023},
  doi = {10.7557/18.6790},
}
Figure