Home

Awesome

ShrinkMatch

PWC PWC PWC PWC

[Paper] [Logs] [BibTeX]

This codebase provides the official PyTorch implementation of our ICCV 2023 paper:

Shrinking Class Space for Enhanced Certainty in Semi-Supervised Learning</br> Lihe Yang, Zhen Zhao, Lei Qi, Yu Qiao, Yinghuan Shi, Hengshuang Zhao</br> In International Conference on Computer Vision (ICCV), 2023</br>

<p align="left"> <img src="./teaser.png" width=95% height=95% class="center"> </p>

Summary

In semi-supervised learning, to mitigate potentially incorrect pseudo labels, recent frameworks mostly set a fixed confidence threshold to discard uncertain samples. This practice ensures high-quality pseudo labels, but incurs a relatively low utilization of the whole unlabeled set.

Our key insight is that these uncertain samples can be turned into certain ones, as long as the confusion classes for the top-1 class are detected and removed. For each uncertain sample, our proposed ShrinkMatch adaptively seeks a shrunk class space, which merely contains the original top-1 class as well as remaining less likely classes, to satisfy the pre-defined threshold, e.g., 0.95. We then impose a consistency regularization in this shrunk space. Furthermore, considering the varied reliability among uncertain samples and the gradually improved model during training, we correspondingly design two reweighting principles for our uncertain loss.

Results

We provide all training logs. You can refer to them when reproducing.

CIFAR-10 @40 labels

Seed01234Mean
SimMatch95.3495.1692.6393.7695.1094.39
ShrinkMatch95.0994.6695.1294.7894.9594.92

CIFAR-100 @400 labels

Seed01234Mean
SimMatch62.0660.1959.8964.8863.9262.19
ShrinkMatch65.0063.4763.7766.4264.5264.64

STL-10 @40 labels

Seed012Mean
FlexMatch76.7168.2867.5570.85
ShrinkMatch85.7585.6486.5585.98

SVHN @40 labels

Seed012Mean
FlexMatch89.1989.9396.3291.81
FixMatch94.5396.9097.1496.19
ShrinkMatch97.9697.8196.7097.49

ImageNet-1K

AccuracyTop-1 @1% labelsTop-1 @10% labelsTop-5 @1% labelsTop-5 @10% labels
SimMatch*67.074.186.991.5
ShrinkMatch67.574.587.491.9

*Reproduced in our environment

Usage

Please enter the corresponding directory according to your dataset.

Acknowledgment

Many thanks to SimMatch, TorchSSL, and FixMatch-PyTorch for sharing their codebases and training logs.

Citation

If you find this project useful, please consider citing:

@inproceedings{shrinkmatch,
  title={Shrinking Class Space for Enhanced Certainty in Semi-Supervised Learning},
  author={Yang, Lihe and Zhao, Zhen and Qi, Lei and Qiao, Yu and Shi, Yinghuan and Zhao, Hengshuang},
  booktitle={ICCV},
  year={2023}
}