Abstract
Traditional spectral clustering methods, while effective for capturing complex data structures, suffer from significant scalability issues and the "out-of-sample" problem. This paper presents NCutEmb (Normalized Cut Embedding), a framework that reformulates clustering as a single-stage functional optimization problem. By learning a mapping function—such as a neural network—via stochastic gradient descent, the proposed method achieves competitive performance on large-scale datasets like MNIST while providing a natural mechanism for inductive inference on unseen data.
Introduction
Clustering high-dimensional data is a fundamental task in machine learning. Spectral clustering is often preferred for its ability to find non-convex clusters by embedding data into a lower-dimensional space derived from the eigenvectors of a similarity matrix. However, this approach has three primary drawbacks:
- Computational Complexity: Eigenvector computation scales poorly ($O(N^3)$ or $O(N^2)$), making it impractical for millions of points.
- Out-of-Sample Extension: Standard spectral methods are transductive; assigning new points to existing clusters typically requires re-solving the entire system.
- Disjoint Optimization: The two-stage process (embedding followed by $k$-means) means the embedding is not explicitly optimized for the final clustering objective.
Methodology: NCutEmb
The authors propose NCutEmb, which treats clustering as a functional dimensionality reduction problem. Instead of optimizing discrete point positions, the model learns a function $f(x; \theta)$ that maps inputs directly to a continuous embedding space suitable for clustering.
Functional Mapping and Pairwise Loss
By using a parametric function (e.g., a neural network or linear model), the method inherently solves the out-of-sample problem. The objective function is defined over pairs of points. If two points are neighbors in the original space, the loss function minimizes their distance in the embedding space. Conversely, non-neighbors are pushed apart. This allows for training via Stochastic Gradient Descent (SGD), bypassing the need for a full $N \times N$ similarity matrix.
Balancing Constraints
A common failure mode in clustering optimization is the "trivial solution," where all points are assigned to a single cluster. To prevent this, NCutEmb incorporates balancing constraints that monitor cluster sizes during training.
As shown in the figure above, the optimization process dynamically adjusts the mapping to ensure that clusters remain balanced and well-separated. These "hard" and "soft" constraints adjust the learning dynamics on-the-fly, ensuring the functional mapping converges to a meaningful partition of the data.
Experimental Evaluation
The authors evaluated NCutEmb across various benchmarks, ranging from small UCI datasets to the large-scale MNIST handwritten digit database.
Performance and Scalability
On the bcw (Breast Cancer Wisconsin) dataset, NCutEmb achieved a 3.15% error rate, outperforming traditional spectral clustering (3.60%). More importantly, the method demonstrated superior scalability. While traditional spectral methods struggle with the memory and compute requirements of the 70,000-point MNIST dataset, NCutEmb successfully clustered it in approximately 60 minutes on a standard PC.
Generalization
A key advantage of the functional approach is generalization. The "test error" on unseen data was found to be very close to the training error. This indicates that the neural network effectively learns the underlying manifold of the data rather than simply memorizing training point assignments.
Conclusion and Future Work
NCutEmb provides a robust framework for scaling spectral-style clustering to massive datasets. By replacing discrete embeddings with a functional mapping, it solves the out-of-sample problem and enables the use of modern optimization techniques like SGD.
However, the method's performance is tied to the "smoothness assumption"—the idea that local neighbors should share cluster labels. Future work may involve integrating learned similarity metrics to better handle complex, non-linear manifolds where simple epsilon-neighborhoods or $k$-nearest neighbor graphs might be insufficient.
Summary updated