Introduction
Spectral Clustering (SC) is a powerful technique for identifying non-linear patterns and complex, non-convex cluster shapes that traditional methods like K-Means often fail to capture. However, its practical application to large-scale datasets is severely limited by its quadratic computational complexity ($O(n^2)$) and massive memory requirements. Most existing "large-scale" variants still require the entire dataset to fit in RAM, leading to performance degradation or system failure due to disk swapping once memory limits are exceeded.
This paper introduces Sequential Spectral Clustering (SeqSC), a novel algorithm designed to process data in small, sequential blocks. By making the memory footprint independent of the total number of data points, SeqSC achieves speeds up to 1,000x faster than previous state-of-the-art methods while maintaining high accuracy on standard hardware.
Methodology
SeqSC overcomes the "memory wall" through two primary sequential components:
1. Sequential K-Means (SeqKM)
To avoid the $O(n^2)$ similarity matrix, SeqSC utilizes a bipartite graph approach where data points are connected to a small set of $m$ "anchor points." SeqKM generates these anchors efficiently:
- Initialization: A small random sample is used to initialize cluster centers via K-Means++.
- Refinement: The algorithm performs a single pass over the remaining data using Stochastic Gradient Descent (SGD) to refine these centers. This ensures the anchors accurately represent the data manifold without requiring all points to be in memory simultaneously.
2. Sequential Singular Value Decomposition (SSVD)
The spectral step involves finding eigenvectors of a "tall and thin" bipartite graph matrix $Z$ ($n$ rows by $m$ anchors). SeqSC computes the SVD by sequentially constructing a small $m \times m$ Gram matrix ($Z^T Z$). Since $m$ is typically small, this matrix fits easily in memory even for datasets with millions of points ($n$).
Experimental Evaluation
The authors evaluated SeqSC against several competitors, including standard SC, Landmark-based Spectral Clustering (LSC), and the Nyström method, using benchmarks such as MNIST and CovType.
Key Results
- Efficiency and Scalability: As shown in Figure 1, SeqSC's running time grows linearly with the number of data blocks, whereas traditional SC and other variants scale poorly. On larger datasets, competitors like LSC and KASP eventually failed due to out-of-memory errors, while SeqSC continued to perform efficiently.
- Accuracy Preservation: Despite its speed, SeqSC does not sacrifice quality. Figure 2 illustrates that SeqSC consistently matches or exceeds the accuracy of more computationally expensive methods. The use of SeqKM for anchor selection proves superior to the random sampling used in the Nyström method.
- Hardware Accessibility: Experiments were conducted on a modest desktop (3.0GHz CPU, 1GB RAM), proving that SeqSC enables large-scale spectral clustering on commodity hardware without the need for massive distributed clusters.
Conclusion
SeqSC effectively breaks the memory barrier for spectral clustering by sequentializing both graph construction and the SVD process. Its memory requirement of $O((m+d)m)$—independent of the total number of points $n$—makes it a truly scalable solution for real-world big data. Future work may explore sub-selection techniques to further reduce complexity and optimization for distributed environments.
Summary updated