One-Step Spectral Clustering via Dynamically Learning Affinity Matrix and Subspace

Xiaofeng Zhu, Wei He, Yonggang Li, Yang Yang, Shichao Zhang, Rongyao Hu, Yonghua Zhu

Abstract

Traditional spectral clustering methods typically involve a disjointed two-step process: constructing an affinity matrix from raw data and then applying k-means to the resulting eigenvectors. This approach is often sensitive to noise and leads to suboptimal clustering due to the lack of integration between graph learning and the final clustering task. This paper introduces a unified "one-step" spectral clustering framework that simultaneously performs subspace learning, feature selection, and affinity matrix optimization. By incorporating a graph-theoretic constraint that ensures the affinity matrix has exactly $c$ connected components, the proposed method eliminates the need for k-means post-processing. Experimental results across various benchmark datasets demonstrate that this approach significantly improves clustering accuracy and robustness to noise.

Introduction

Spectral clustering has become a cornerstone of unsupervised learning due to its ability to identify complex data structures. However, standard implementations face three significant challenges. First, they are highly sensitive to noise because the initial similarity graph is often built from raw, high-dimensional data. Second, the "two-step" gap—where graph construction and k-means clustering are optimized independently—prevents the model from reaching a global optimum. Third, the reliance on k-means introduces instability due to its sensitivity to initial cluster centers.

To address these issues, this research proposes a model that integrates subspace learning and clustering into a single optimization objective. This "one-step" approach ensures that the learned affinity matrix directly represents the final clustering result.

Methodology

The proposed framework optimizes a unified objective function consisting of three main components:

1. Subspace Learning and Feature Selection

The model learns a transformation matrix $W$ to map high-dimensional data into a robust, low-dimensional "intrinsic subspace." To handle noisy or redundant dimensions, an $\ell_{2,1}$-norm penalty is applied to $W$, facilitating effective feature selection by ignoring irrelevant dimensions.

2. Dual Affinity Matrices

The system maintains two matrices: an initial affinity matrix $G$ derived from the original feature space and an intrinsic affinity matrix $S$ learned within the subspace. By minimizing the divergence between $G$ and $S$, the model leverages the cleaner subspace to refine similarity relationships between data points.

3. The One-Step Constraint

The core innovation lies in enforcing a structural constraint on the affinity matrix $S$. According to graph theory, a graph with $c$ clusters should ideally consist of exactly $c$ connected components. This is equivalent to the Laplacian matrix of $S$ having exactly $c$ zero eigenvalues. By embedding this constraint directly into the optimization, the resulting matrix $S$ naturally partitions into $c$ isolated subgraphs, making k-means unnecessary.

Experimental Evaluation

The method was evaluated on a synthetic dataset and six benchmark datasets, including face images (Umist, YaleB, Jaffe), object images (COIL-20), and chemical/biological data (Wine, Ecoli).

Robustness to Noise

A key advantage of the proposed method is its resilience to data corruption. In synthetic tests, Gaussian noise was added with standard deviations ranging from $\sigma = 0.5$ to $\sigma = 0.9$.

Comparison of original affinity matrices vs. proposed learned graphs under varying noise levels.

As shown in the figure above, while the original affinity matrices (a, c) become increasingly obscured by noise, the proposed method (b, d) successfully recovers the underlying block-diagonal structure, effectively filtering out the noise through the learned subspace.

Results and Discussion

The proposed method consistently outperformed state-of-the-art algorithms such as NCut, CLR, and SSC across all benchmarks:

  • Accuracy (ACC): On the Umist dataset, the method achieved 79.83% accuracy, significantly higher than CLR (69.22%). On the challenging YaleB dataset, it reached 45.94%, while most competitors remained below 37%.
  • Normalized Mutual Information (NMI): The method achieved an NMI of 97.69% on the COIL-20 dataset, demonstrating superior cluster quality.
  • Noise Resilience: In high-noise synthetic scenarios ($\sigma = 0.9$), the one-step method maintained 95% accuracy, whereas traditional Normalized Cut (NCut) performance dropped to 85%.

Conclusion

By unifying subspace learning and graph construction with a structural connectivity constraint, this "one-step" framework overcomes the primary limitations of traditional spectral clustering. It provides a more robust, consistent, and accurate clustering solution. Future work will focus on reducing the computational cost of Singular Value Decomposition (SVD) within the optimization loop and extending the framework to handle datasets with missing values.

Summary updated

BibTeX
@inproceedings{zhu2017one,
  author = {Xiaofeng Zhu and Wei He and Yonggang Li and Yang Yang and Shichao Zhang and Rongyao Hu and Yonghua Zhu},
  title = {{One-Step Spectral Clustering via Dynamically Learning Affinity Matrix and Subspace}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2017},
  doi = {10.1609/aaai.v31i1.10780},
}
Figure