A Lightweight Clustering Framework for Unsupervised Semantic Segmentation

Yau Shing Jonathan Cheung, Xi Chen, Lihe Yang, Hengshuang ZhaoarXiv 2023 · DOI

Introduction

Semantic segmentation—the task of assigning a category label to every pixel in an image—is a cornerstone of computer vision, essential for applications ranging from medical imaging to autonomous driving. Traditionally, this task requires massive, manually labeled datasets, which are prohibitively expensive to produce. While unsupervised methods have emerged to bypass the need for labels, most still rely on resource-intensive neural network training or fine-tuning.

Researchers from The University of Hong Kong have introduced a "network-free" framework that achieves state-of-the-art results without any additional training. By applying multilevel clustering to the attention features of self-supervised Vision Transformers (ViT), the method outperforms complex models while running in a fraction of the time.

The Lightweight Clustering Pipeline

The core of this approach is a four-stage pipeline that leverages the rich representations of pre-trained models without updating their weights.

Overview of the four-stage lightweight clustering framework.
  1. Feature Extraction: The framework utilizes a pre-trained, self-supervised Vision Transformer (DINOv2). The researchers identified that the "Key" (K) features in the transformer's attention layers are exceptionally effective at distinguishing foreground objects from backgrounds.
  2. Multilevel Clustering: Instead of a single global pass, the system performs K-means clustering at three distinct granularities: Dataset-level (broad structures), Category-level (superclasses like "animals"), and Image-level (specific object boundaries).
  3. Consistency Filtering: These levels are combined using a logical consistency formula to ensure only the most confident foreground regions remain, effectively filtering out background noise.
  4. Class Assignment: Once a binary mask is established, the image is cropped, and the "Classification" (CLS) token is extracted and clustered to assign final semantic labels (e.g., "dog," "car").

Multilevel Harmony

A key insight of this research is that clustering at a single level is often insufficient. Dataset-level clustering tends to be too coarse, while image-level clustering can be overly sensitive to local noise. By enforcing consistency across three levels, the framework captures both the global context and fine-grained details necessary for accurate segmentation.

Visual comparison of clustering results at dataset, category, and image levels.

Performance and Efficiency

The framework was evaluated on the PASCAL VOC 2012 and MS COCO benchmarks, yielding impressive results:

  • Superior Accuracy: On PASCAL VOC, the framework achieved a 54.5% mIoU (Mean Intersection over Union), a 4.5-point improvement over the previous state-of-the-art (COMUS), which required multiple rounds of self-training.
  • Extreme Efficiency: Because the method avoids backpropagation and weight updates, the entire process for PASCAL VOC takes less than 45 minutes on standard hardware, compared to the hours or days required by training-heavy alternatives.
  • Robustness: The method is particularly effective at identifying small objects that are often lost during the downsampling processes of traditional neural networks.

Limitations and Future Work

While highly effective, the framework currently treats all background elements (e.g., sky, grass, water) as a single class. Additionally, it can struggle with "separation anxiety" when different objects are physically touching or overlapping, which can confuse the CLS token during class assignment. Future research will focus on more sophisticated assignment schemes to handle multi-object regions and complex backgrounds.

Reference: Cheung, Y. S. J., Chen, X., Yang, L., & Zhao, H. (2023). A Lightweight Clustering Framework for Unsupervised Semantic Segmentation. arXiv:2311.18628v2.

Summary updated

BibTeX
@misc{cheung2023lightweight,
  author = {Yau Shing Jonathan Cheung and Xi Chen and Lihe Yang and Hengshuang Zhao},
  title = {{A Lightweight Clustering Framework for Unsupervised Semantic Segmentation}},
  year = {2023},
  eprint = {2311.18628},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.18628},
}
Figure