Semi-supervised novelty detection using ensembles with regularized disagreement

Alexandru Tifrea, Eric Stavarache, Fanny YangUAI 2022 · OpenReview

Abstract

Deep neural networks often predict samples with high confidence even when they come from unseen classes and should instead be flagged for expert evaluation. Current novelty detection algorithms cannot reliably identify such near OOD points unless they have access to labeled data that is similar to these novel samples. In this paper, we develop a new ensemble-based procedure for semi-supervised novelty detection (SSND) that successfully leverages a mixture of unlabeled ID and novel-class samples to achieve good detection performance. In particular, we show how to achieve disagreement only on OOD data using early stopping regularization. While we prove this fact for a simple data distribution, our extensive experiments suggest that it holds true for more complex scenarios: our approach significantly outperforms state-of-the-art SSND methods on standard image data sets (SVHN/CIFAR-10/CIFAR-100) and medical image data sets with only a negligible increase in computation cost.

Introduction: The Challenge of Near-OOD

While deep neural networks (DNNs) achieve incredible performance on in-distribution (ID) data, they are notoriously bad at knowing what they don't know. When fed out-of-distribution (OOD) data, they often make incorrect predictions with high confidence. This is especially problematic for "near OOD" data—novel classes that share many visual features with the training data.

The real-world challenge of novelty detection in medical diagnosis.

Consider an AI trained to diagnose known lung conditions from chest X-rays. It might confidently misclassify a brand-new respiratory virus as a known disease, rather than flagging it for human review. Unsupervised novelty detection methods fail on these subtle near-OOD tasks, and supervised methods require labeled OOD data, which is impossible to obtain for unforeseen novelties. This paper addresses the Semi-Supervised Novelty Detection (SSND) setting: using a model trained on labeled ID data and a new batch of unlabeled data (containing a mix of ID and novel OOD samples) to accurately flag the novelties.

Ensembles with Regularized Disagreement (ERD)

The proposed method, Ensembles with Regularized Disagreement (ERD), creates an ensemble of models that agree on known data but wildly disagree on novel data. The core mechanism involves three steps:

  1. Initialization: Start with an ensemble of $K$ models (e.g., 3 ResNets) pretrained on labeled ID data.
  2. Arbitrary Labeling: For each model in the ensemble, assign a different, completely arbitrary ID class label to the entire unlabeled batch.
  3. Fine-tuning with Early Stopping: Fine-tune each model on a mix of the original labeled data and the arbitrarily labeled new batch.

The success of ERD hinges on early stopping. For ID samples in the unlabeled batch, the arbitrary label acts as "noise." Neural networks naturally resist fitting noisy labels early in training. Consequently, early stopping prevents the models from memorizing these fake labels for ID data, maintaining agreement. However, because OOD samples do not match known ID features, models quickly fit the arbitrary labels to them. This results in high ensemble disagreement on OOD data, which can then be used as a novelty score.

Experimental Evaluation

The authors evaluated ERD on several image datasets, splitting them to simulate near-OOD and far-OOD scenarios, including standard benchmarks like CIFAR-10 and a specialized medical image dataset.

Performance comparison of ERD and ERD++ against standard baselines on medical data.

ERD achieved massive gains on near-OOD tasks. For instance, on a challenging CIFAR-10 split, ERD reached an AUROC of 0.89, significantly outperforming the best baseline (0.64). On the medical X-ray benchmark, ERD improved the average AUROC from 0.85 to 0.91. These results were achieved with minimal computational overhead, requiring only a few minutes of fine-tuning on standard hardware.

Conclusion

ERD demonstrates that diversity in ensembles can be engineered to specifically target OOD data by treating unlabeled data as a noisy-label problem. While the method requires a batch of unlabeled data and a "critical mass" of novelties, it provides a robust solution for detecting unforeseen classes in high-stakes environments like medical diagnostics without requiring unrealistic "oracle" knowledge.

Summary updated

Abstract

Deep neural networks often predict samples with high confidence even when they come from unseen classes and should instead be flagged for expert evaluation. Current novelty detection algorithms cannot reliably identify such near OOD points unless they have access to labeled data that is similar to these novel samples. In this paper, we develop a new ensemble-based procedure for semi-supervised novelty detection (SSND) that successfully leverages a mixture of unlabeled ID and novel-class samples to achieve good detection performance. In particular, we show how to achieve disagreement only on OOD data using early stopping regularization. While we prove this fact for a simple data distribution, our extensive experiments suggest that it holds true for more complex scenarios: our approach significantly outperforms state-of-the-art SSND methods on standard image data sets (SVHN/CIFAR-10/CIFAR-100) and medical image data sets with only a negligible increase in computation cost.
BibTeX
@inproceedings{tifrea2022semi,
  author = {Alexandru Tifrea and Eric Stavarache and Fanny Yang},
  title = {{Semi-supervised novelty detection using ensembles with regularized disagreement}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2022},
  url = {https://openreview.net/forum?id=hhlP0D5DEmD},
}
Figure