Hunting Sparsity: Density-Guided Contrastive Learning for Semi-Supervised Semantic Segmentation

Xiaoyang Wang, Bingfeng Zhang, Limin Yu, Jimin Xiao
2/14/2026

No official code found. Best implementation: gavinwxy/DGCL (31 stars, Apache-2.0, last commit 2024-09-25).

Abstract

Recent semi-supervised semantic segmentation methods combine pseudo labeling and consistency regularization to enhance model generalization from perturbation-invariant training. In this work, we argue that adequate supervision can be extracted directly from the geometry of feature space. Inspired by density-based unsupervised clustering, we propose to leverage feature density to locate sparse regions within feature clusters defined by label and pseudo labels. The hypothesis is that lower-density features tend to be under-trained compared with those densely gathered. Therefore, we propose to apply regularization on the structure of the cluster by tackling the sparsity to increase intra-class compactness in feature space. With this goal, we present a Density-Guided Contrastive Learning (DGCL) strategy to push anchor features in sparse regions toward cluster centers approximated by high-density positive keys. The heart of our method is to estimate feature density which is defined as neighbor compactness. We design a multi-scale density estimation module to obtain the density from multiple nearest-neighbor graphs for robust density modeling. Moreover, a unified training framework is proposed to combine label-guided self-training and density-guided geometry regularization to form complementary supervision on unlabeled data. Experimental results on PAS-CAL VOC and Cityscapes under various semi-supervised settings demonstrate that our proposed method achieves state-of-the-art performances. The project is available at https://github.com/Gavinwxy/DGCL.

DOISemantic Scholar

Code Implementations(1)

gavinwxy/DGCLCommunity60%
Apache-2.0

[CVPR 2023] Hunting Sparsity: Density-Guided Contrastive Learning for Semi-Supervised Semantic Segmentation

311Shell, PythonMar 9, 20232 years agoApache-2.0

Cite this paper

@article{wang2026hunting,
  title  = {Hunting Sparsity: Density-Guided Contrastive Learning for Semi-Supervised Semantic Segmentation},
  author = {Xiaoyang Wang and Bingfeng Zhang and Limin Yu and Jimin Xiao},
  year   = {2026},
  doi    = {10.1109/CVPR52729.2023.00304},
  url    = {https://doi.org/10.1109/CVPR52729.2023.00304},
  journal = {CVPR 2023 2023}
}

Discussion