NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improving Open-Set Semi-Supervised Learning with Self-Supervision

Erik Wallin, Lennart Svensson, Fredrik Kahl, Lars Hammarstrand

TL;DR

SeFOSS (Self-supervision-centric Framework for Open-set Semi-Supervised learning) challenges the common assumption that "unknown" classes in unlabeled data are harmful. By applying self-supervised consistency training to all unlabeled samples and using a theoretically grounded free-energy score to detect outliers, the framework achieves state-of-the-art performance in both classification accuracy and open-set recognition.

What Problem Does This Paper Address?

In traditional Semi-Supervised Learning (SSL), we assume that our small labeled dataset and our large unlabeled dataset come from the same distribution (the "closed-set" assumption). However, in the real world, unlabeled data is often uncurated and contains "Out-of-Distribution" (OOD) samples—classes that were never seen in the labeled set.

This scenario is called Open-Set Semi-Supervised Learning (OSSL). Most existing OSSL methods treat OOD data as "poison" and spend significant effort trying to filter it out. The authors of this paper argue that this filtering is inefficient and that OOD data actually contains useful features that can be harvested through self-supervision without harming the model's primary classification task.

Methods

The authors introduce SeFOSS, which utilizes a three-pronged loss strategy to handle unlabeled data:

  1. Self-Supervised Consistency (The Core): Regardless of whether a sample is predicted to be In-Distribution (ID) or OOD, the model is trained to produce consistent feature representations for different augmentations (weak vs. strong) of that sample. This allows the model to learn from the structure of all available data.
  2. Free-Energy Score for OSR: Instead of using standard softmax confidence (which is notoriously overconfident on unknown data), SeFOSS uses a free-energy score (a log-sum-exp of the logits). This score is theoretically aligned with the probability density of the data, making it a much more reliable metric for Open-Set Recognition (OSR).
  3. Energy Regularization: For samples that the free-energy score identifies as "pseudo-outliers," the model applies a hinge loss to further push their energy scores higher, explicitly teaching the model to distinguish them from known classes.
  4. Adaptive Thresholding: Rather than picking arbitrary confidence thresholds, SeFOSS calculates thresholds adaptively based on the energy distribution of the labeled training set after a short pre-training phase.

Datasets

The researchers evaluated SeFOSS across several standard benchmarks with various OOD "distractors":

  • ID Datasets: CIFAR-10, CIFAR-100, and ImageNet-30.
  • OOD/Distractor Sets: SVHN (house numbers), uniform noise, and mutually exclusive subsets of CIFAR (e.g., using CIFAR-10 as ID and CIFAR-100 as OOD).
  • ImageNet-30: A more realistic, high-resolution scenario where 20 classes are ID and 10 are OOD.

Key Insights and Ideas

  • OOD Data is Not Poison: One of the most surprising findings is that standard SSL methods like FixMatch actually perform quite well on closed-set accuracy even when "polluted" with OOD data. The "harmfulness" of OOD data in OSSL has likely been overstated in previous literature.
  • Self-Supervision as a "Safe" Signal: Because self-supervision doesn't rely on class labels, it provides a training signal that is inherently robust to class mismatch. It allows the model to learn useful low-level features (edges, textures, shapes) from OOD data that still apply to ID classes.
  • The Power of Energy Scores: The paper reinforces that the free-energy score is a superior "plug-and-play" alternative to softmax for detecting unknown classes, requiring no architectural changes to the model.

Key Results

  • CIFAR-100 Performance: On the challenging CIFAR-100 benchmark (10,000 labels), SeFOSS achieved a closed-set accuracy of ~75-77% across different OOD scenarios, significantly outperforming specialized OSSL competitors like OpenMatch (~21-40%) and T2T (~62-73%).
  • Open-Set Recognition: SeFOSS consistently achieved high AUROC scores (often 0.90 to 1.00) for OSR, meaning it is highly effective at flagging whether a new image belongs to a known or unknown category.
  • Stability: Unlike some OSSL methods that are prone to "training collapse" (where the model stops learning or fails to distinguish classes), SeFOSS proved stable and did not require a separate validation set for early stopping.

Limitations and Future Work

  • Distributional Shift: The study assumes that OOD data encountered during training follows the same distribution as OOD data encountered during testing. It does not address "unseen" OOD distributions that might appear only at deployment.
  • Label Scarcity: The authors note they did not evaluate the method in "very low-label" regimes (e.g., only 1-5 labels per class), where the adaptive thresholding might become less reliable.
  • Class Imbalance: The experiments focused on balanced ID sets; the impact of class imbalance within the known categories remains an open question for this specific framework.

Summary updated

BibTeX
@inproceedings{wallin2024improving,
  author = {Erik Wallin and Lennart Svensson and Fredrik Kahl and Lars Hammarstrand},
  title = {{Improving Open-Set Semi-Supervised Learning with Self-Supervision}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00235},
}
Figure