Semi-Supervised Class Discovery

Jeremy Nixon, Jeremiah Z. Liu, David BerthelotarXiv 2020

Abstract

One promising approach to dealing with datapoints that are outside of the initial training distribution (OOD) is to create new classes that capture similarities in the datapoints previously rejected as uncategorizable. Systems that generate labels can be deployed against an arbitrary amount of data, discovering classification schemes that through training create a higher quality representation of data. We introduce the Dataset Reconstruction Accuracy, a new and important measure of the effectiveness of a model's ability to create labels. We introduce benchmarks against this Dataset Reconstruction metric. We apply a new heuristic, class learnability, for deciding whether a class is worthy of addition to the training dataset. We show that our class discovery system can be successfully applied to vision and language, and we demonstrate the value of semi-supervised learning in automatically discovering novel classes.

Introduction

In the traditional "closed-world" paradigm of machine learning, models are typically trained on a fixed set of labels and are expected to handle everything else as "noise" or "out-of-distribution" (OOD) data. However, this noise often contains valuable, coherent categories that the model has not yet learned. This research proposes a system for semi-supervised class discovery that moves beyond static labels, actively identifying new classes and integrating them back into the training set to create a virtuous cycle of learning.

Problem Statement

Most machine learning models suffer from the "closed-world" assumption, assuming the world consists only of the classes seen during training. When encountering OOD data, these models often provide overconfident, incorrect predictions. While self-supervised and semi-supervised learning have utilized unlabeled data, they typically focus on data fitting into existing categories. This research addresses the challenge of class discovery: identifying entirely new categories in unlabeled data and incorporating them into the model's knowledge base.

Methodology

The proposed architecture is a dynamic, looping system designed to iteratively expand the model's knowledge. The process consists of several key stages:

  1. Representation Learning: A base model (such as ResNet or TextCNN) is trained on an initial set of labeled data.
  2. OOD Detection: New data is passed through an OOD detector. If the model is confident, the data is added to an existing class; otherwise, it is flagged for discovery.
  3. Clustering: Flagged data is embedded into a high-dimensional space and grouped using K-means.
  4. The "Learnability" Heuristic: Instead of relying solely on spatial density, the system trains a small "probe" classifier on the cluster. If the probe can easily distinguish the cluster from others (high accuracy), the cluster is deemed a "learnable" and coherent new class.
  5. Dynamic Update: Accepted clusters are assigned new labels and added to the training set. The model then retrains on this expanded dataset.
The dynamic self-supervised learning system loop.

Datasets and Metrics

The method was evaluated across both vision and language modalities:

  • Vision: MNIST, Fashion-MNIST, and CIFAR-10. Experiments typically used a "5+5" split, where the model starts with 5 known classes and must discover the remaining 5.
  • Language: The CLINC OOS intent detection benchmark, which contains 150 intent categories and a specific "out-of-scope" class for discovery.

The authors also introduced a new metric: Dataset Reconstruction Accuracy (DRA). This measures how closely the model's discovered labels match the ground-truth labels of the original dataset, providing a more holistic view of discovery performance than simple cluster accuracy.

Key Insights

  • The Virtuous Cycle: As the model learns more classes, its internal representations (embeddings) become more refined. This, in turn, improves its ability to discover the next set of classes. This progression is visible in the improvement of OOD cluster accuracy as the base model trains on supervised labels.
  • Learnability vs. Density: Traditional clustering often relies on spatial density. However, the authors found that "learnability"—how easily a fresh model can pick up the pattern—is a much more robust indicator of whether a cluster represents a meaningful real-world category.
  • Dynamic vs. Static Discovery: Discovering classes iteratively and retraining (Dynamic) is significantly more effective than attempting to cluster all OOD data at once (Static).
Cluster accuracy improves over time as the base model learns better features.

Experimental Results

  • Vision Performance: On MNIST, the dynamic discovery method achieved a Dataset Reconstruction Accuracy of 91.13%, compared to 84.73% for a static "random embedding" baseline.
  • Language Parity: In the CLINC intent discovery task, the semi-supervised TextCNN (81.23% accuracy) performed on par with the Universal Sentence Encoder (USE), despite USE being pre-trained on massive corpora.
  • Initial Class Effect: The number of initial classes significantly impacts discovery. On MNIST, starting with 5 classes instead of 2 increased OOD cluster accuracy from 43% to 71%.

Limitations and Future Work

While powerful, the system faces several challenges:

  • The "K" Problem: The method currently requires a predefined number of clusters ($K$) or uses heuristics like the elbow method.
  • OOD Thresholding: The system relies heavily on the initial OOD detector's confidence threshold. Poor tuning might lead the system to "discover" noisy versions of known classes.
  • Semantic Grounding: Future work could incorporate "a priori" common sense or knowledge graphs to help the model understand the semantic basis for clusters, moving beyond purely statistical patterns.

Summary updated

BibTeX
@misc{nixon2020semi,
  author = {Jeremy Nixon and Jeremiah Z. Liu and David Berthelot},
  title = {{Semi-Supervised Class Discovery}},
  year = {2020},
  eprint = {2002.03480},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.03480},
}
Figure