FreeMatch: Self-adaptive Thresholding for Semi-supervised Learning

Yidong Wang, Hao Chen, Qiang Heng, Wenxin Hou, Yue Fan, Zhen Wu, Marios Savvides, Takahiro Shinozaki, Bhiksha Raj, Bernt Schiele · DOI

Introduction

Semi-supervised learning (SSL) aims to leverage vast amounts of unlabeled data alongside a small set of labeled examples. A dominant approach in recent years, exemplified by frameworks like FixMatch, is pseudo-labeling: the model generates labels for unlabeled data based on its own high-confidence predictions. However, these methods typically rely on a fixed confidence threshold (e.g., 0.95), which introduces two significant challenges:

  1. The "Cold Start" Problem: Early in training, the model's confidence is low, meaning a high fixed threshold rejects most unlabeled data, leading to slow convergence.
  2. Class Imbalance: Harder-to-learn classes may never reach the fixed threshold, causing the model to become biased toward "easier" classes.

FreeMatch addresses these issues by making the thresholding process "free" of manual tuning through a self-adaptive mechanism that adjusts to the model's internal state.

The FreeMatch Framework

FreeMatch introduces two core components: Self-Adaptive Thresholding (SAT) and Self-Adaptive Fairness (SAF). Together, these mechanisms allow the model to decide its own confidence levels and ensure a balanced learning process across all classes.

The FreeMatch framework: SAT dynamically adjusts global and local thresholds based on model confidence, while SAF ensures diverse class predictions.

Self-Adaptive Thresholding (SAT)

Instead of a static value, SAT estimates thresholds dynamically at two levels:

  • Global Threshold: The model tracks the average confidence of all predictions using an Exponential Moving Average (EMA). As the model learns, this global bar naturally rises, solving the cold start problem by allowing more samples in early on.
  • Local (Class-Specific) Thresholds: The global threshold is modulated for each class based on the model's class-specific confidence. If the model is less certain about a specific category, the threshold for that category is lowered, ensuring the model continues to learn from difficult classes rather than ignoring them.

Self-Adaptive Fairness (SAF)

To prevent the model from collapsing into a few dominant classes, FreeMatch employs a fairness regularization term. SAF uses the model's prediction history to encourage diversity, penalizing skewed pseudo-label distributions. This forces the model to explore under-represented classes, maximizing the mutual information between inputs and outputs.

Experimental Results

FreeMatch was evaluated across standard benchmarks including CIFAR-10/100, STL-10, and ImageNet. It consistently outperformed state-of-the-art methods like FlexMatch and FixMatch, particularly in "barely supervised" scenarios.

Comparison of FreeMatch against baselines across decision boundaries, fairness, thresholds, and sampling rates.

Key Performance Metrics

  • Extreme Scarcity: On CIFAR-10 with only 1 label per class, FreeMatch reduced the error rate by 5.78% compared to FlexMatch.
  • STL-10 Superiority: On the STL-10 dataset (4 labels per class), it achieved a massive 13.59% error rate reduction.
  • Large-Scale Scalability: On ImageNet with 100 labels per class, it achieved a 1.28% improvement while maintaining the computational efficiency of simpler methods.

As shown in the analysis above, FreeMatch's threshold (red line in plot c) starts lower and adapts over time, allowing for a much higher sampling rate (plot d) in the early stages of training compared to fixed-threshold methods.

Conclusion

FreeMatch represents a significant advancement in making semi-supervised learning more robust and "plug-and-play." By linking confidence thresholds directly to the model's learning progress and enforcing class fairness, it removes the need for tedious, dataset-specific hyperparameter tuning while achieving superior results in data-scarce environments.

Summary updated

BibTeX
@inproceedings{wang2023freematch,
  author = {Yidong Wang and Hao Chen and Qiang Heng and Wenxin Hou and Yue Fan and Zhen Wu and Marios Savvides and Takahiro Shinozaki and Bhiksha Raj and Bernt Schiele},
  title = {{FreeMatch: Self-adaptive Thresholding for Semi-supervised Learning}},
  booktitle = {International Conference on Learning Representations},
  year = {2023},
  url = {https://openreview.net/forum?id=PDrUPTXJI_A},
}
Figure