Generalized Clustering by Learning to Optimize Expected Normalized Cuts

Azade Nazi, Will Hang, Anna Goldie, Sujith Ravi, Azalia MirhoseiniarXiv 2019

Abstract

Clustering remains a fundamental challenge in unsupervised learning, often hindered by multi-step pipelines and poor generalization to unseen data. This paper introduces CNC, an end-to-end deep learning framework developed by researchers at Google Brain and Stanford. CNC bridges classical graph theory with modern neural networks by directly minimizing a differentiable "Expected Normalized Cuts" objective.

Introduction

Traditional clustering methods, particularly spectral clustering, are powerful but suffer from two primary limitations: a fragmented "two-step" process requiring expensive eigen-decomposition followed by k-means, and a lack of out-of-sample extension (OOSE). CNC addresses these by training a neural network to output cluster probabilities directly, enabling real-time inference on new data points while maintaining the mathematical rigor of Normalized Cuts (Ncuts).

The Problem: The Generalization Gap in Clustering

Most graph-based clustering methods are transductive; they are defined only on the training set. Adding new data typically requires re-running the entire algorithm. Furthermore, the disconnect between the embedding phase and the clustering phase often leads to sub-optimal global solutions. The authors sought a unified approach where a single feed-forward network $F_\theta$ maps raw data to cluster assignments by optimizing the Ncut objective through gradient descent.

Methodology: Learning to Cut

The CNC framework operates in two primary stages:

  1. Siamese Embedding: A Siamese network with a contrastive loss learns a representation where similar neighbors are pulled together.
  2. Expected Normalized Cut Optimization: The core innovation is a differentiable loss function. By treating the network's softmax output as a probability distribution, the Ncut objective is reformulated as an expectation.
  3. Gumbel-Softmax: This trick allows the model to produce sharp, discrete-like cluster assignments while remaining end-to-end trainable.
  4. Batch-based Training: CNC constructs local affinity graphs for minibatches, optimizing the Ncut loss locally. This approach scales to massive datasets and, surprisingly, converges to high-quality global clusters.
Overview of the CNC framework showing the graph cut objective, model architecture, and loss convergence.

Experimental Results

The authors evaluated CNC on MNIST, Reuters, CIFAR-10, and CIFAR-100. The results demonstrate that direct optimization of the Ncut objective via neural networks often finds "better" cuts than traditional spectral methods.

Performance Benchmarks

CNC achieved state-of-the-art results, particularly on complex image datasets:

  • CIFAR-10: CNC reached 70.2% accuracy, significantly outperforming SpectralNet (50.1%) and IIC (61.7%).
  • CIFAR-100: It achieved 34.5% accuracy, a 7% improvement over the next best baseline.
  • Generalization: In out-of-sample tests, CNC maintained high performance, outperforming SpectralNet by up to 21.9% on unseen data.
Comparison of CNC against state-of-the-art clustering methods on standard benchmarks.

Discussion and Limitations

CNC demonstrates that direct optimization of classical graph objectives within a deep learning framework is not only feasible but superior to traditional multi-step pipelines. However, some challenges remain:

  • Cluster Count: The number of clusters $g$ must be pre-defined.
  • Initialization Sensitivity: The final performance is tied to the quality of the initial Siamese embeddings.
  • Batch Dynamics: The reliance on local affinity graphs means batch size can influence the capture of complex global structures.

Future research may explore self-supervised pre-training integrations or methods to automatically determine the optimal number of clusters.

Summary updated

BibTeX
@misc{nazi2019generalized,
  author = {Azade Nazi and Will Hang and Anna Goldie and Sujith Ravi and Azalia Mirhoseini},
  title = {{Generalized Clustering by Learning to Optimize Expected Normalized Cuts}},
  year = {2019},
  eprint = {1910.07623},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.07623},
}
Figure