FLSL: Feature-level Self-supervised Learning

Qing Su, Anton Netchaev, Hai Li, Shihao Ji

Abstract

Self-supervised learning (SSL) has traditionally focused on instance-level discrimination, treating entire images as single points in an embedding space. While effective for classification, this approach creates a semantic gap for dense prediction tasks like object detection and segmentation. We present Feature-level Self-supervised Learning (FLSL), a method that reinterprets Vision Transformers (ViTs) as mean-shift clustering engines. FLSL employs a bi-level clustering strategy—intra-view and inter-view—to align local features with semantic concepts. Our approach achieves state-of-the-art performance on MS-COCO and UAVDT, demonstrating superior local semantic awareness and boundary alignment.

Introduction

Standard SSL methods like SimCLR and DINO learn by matching global representations of augmented image views. This "instance-level" focus ignores the internal semantic structure of images, which are composed of multiple distinct objects and backgrounds. For dense prediction tasks, models must distinguish between these local entities. Previous attempts at dense SSL often relied on rigid patch-matching or complex region proposals. FLSL addresses this by leveraging the inherent clustering properties of ViT attention mechanisms to group features into semantic clusters without requiring explicit object masks or class tokens.

Methods: Bi-level Feature Clustering

FLSL is built on the theoretical insight that the self-attention mechanism in ViTs acts as a non-parametric mean-shift clustering process. The method utilizes two levels of clustering to bridge the gap between local pixels and global categories.

Conceptual overview of FLSL's bi-level clustering strategy, showing intra-view local grouping and inter-view global semantic alignment.

Intra-view and Inter-view Alignment

  1. Intra-view Clustering: Within a single image, self-attention drives local features toward "modes" representing semantic parts (e.g., a person's arm, a tree leaf).
  2. Inter-view Clustering: Across different views and the entire dataset, a $k$-means-based objective ensures that these local representatives are semantically consistent. For example, "leaf" clusters from different images are pushed together in the embedding space.
  3. Positive Retrieval: Instead of matching fixed spatial patches, FLSL uses cross-attention to retrieve positive samples from amorphous clusters, allowing the model to handle objects of varying shapes and sizes.

Results and Evaluation

We evaluated FLSL on several dense prediction benchmarks, including MS-COCO (object detection/segmentation), UAVDT (small object detection), and ADE20K (semantic segmentation).

Quantitative Performance

On MS-COCO, FLSL with a ViT-S/16 backbone achieved 44.9% AP, a 2.8% improvement over the DINO+SelfPatch baseline. Performance increased to 46.5% AP with a smaller patch size (ViT-S/8). Notably, on the UAVDT dataset, FLSL outperformed DINO by 4.2% AP (53.1% vs 48.9%), highlighting its effectiveness for small, dense objects.

Qualitative Analysis

Visualizations of Aggregated Similarity Scores (ASS) reveal that FLSL's attention maps align more precisely with object boundaries than previous methods. The evolution of feature clusters across transformer layers demonstrates the model's ability to iteratively refine semantic groupings.

Qualitative comparison of attention maps and cluster evolution across layers. FLSL shows cleaner alignment with object boundaries compared to DINO.

Discussion and Conclusion

FLSL demonstrates that leaning into the architectural strengths of Vision Transformers—specifically their capacity for iterative clustering—can significantly improve self-supervised representations for dense tasks. By moving beyond simple patch-matching to a flexible bi-level clustering framework, FLSL captures the natural semantics of scenes. While computationally more intensive than standard SSL, the gains in object-level awareness provide a promising direction for future vision models.

Summary updated

BibTeX
@inproceedings{su2023flsl,
  author = {Qing Su and Anton Netchaev and Hai Li and Shihao Ji},
  title = {{FLSL: Feature-level Self-supervised Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=8pOBo5NgTQ},
}
Figure