FROB: Few-shot ROBust Model for Classification and Out-of-Distribution\n Detection

Nikolaos Dionelis, Mehrdad Yaghoobi, Sotirios A. TsaftarisarXiv 2021 · DOI · arXiv

TL;DR

FROB (Few-shot ROBust model) is a novel framework that enables deep learning models to accurately detect "Out-of-Distribution" (OoD) samples even when they have seen very few examples of anomalies. By automatically generating a "confidence boundary" around normal data and enforcing low confidence at that edge, FROB achieves state-of-the-art robustness against unseen anomalies and adversarial attacks.

What Problem Does This Paper Address?

Deep neural networks are notoriously "overconfident." If you train a model to recognize cats and dogs and then show it a picture of a toaster, the model won't say "I don't know"; it will likely tell you it's a dog with 99% confidence. This lack of self-awareness is a major hurdle for safety-critical applications like autonomous driving, medical diagnosis, or defense systems.

Detecting these Out-of-Distribution (OoD) samples is hard enough, but it becomes even more difficult in few-shot settings, where data is scarce. Existing techniques like "Outlier Exposure" (OE) require massive datasets of auxiliary outliers to teach the model what "abnormal" looks like. Furthermore, models are often vulnerable to adversarial attacks, where tiny, invisible changes to an image can completely flip a classifier's decision.

The authors of this paper tackle the challenge of making OoD detection robust, reliable, and data-efficient.

Methods

The core of the FROB methodology is a two-pronged approach that combines a standard classifier with a specialized generative component.

  1. The Robustness Loss: The authors modify the standard training objective. In addition to learning to classify "normal" data (using cross-entropy), the model is penalized if it shows high confidence on a small set of provided outliers (Few-shot Outlier Exposure).
  2. Self-Supervised Boundary Generation: This is the "secret sauce." Instead of relying solely on external outlier datasets, FROB learns to generate its own outliers. It uses a generative model to find the "support boundary"—the very edge of where the normal data lives.
  3. Nested Optimization: FROB performs a clever trick: it generates "strong adversarial samples" on this boundary and then forces the classifier to be uncertain about them. This "active negative training" ensures there is no "empty space" between the normal distribution and the detected anomalies.
  4. Diversity via Scattering: To prevent the generator from creating the same outlier over and over (mode collapse), the authors use a distance-ratio optimization. This ensures the generated boundary samples are diverse and cover the entire perimeter of the normal data.

Datasets

The researchers evaluated FROB using several standard computer vision benchmarks:

  • In-Distribution (Normal): CIFAR-10 and SVHN.
  • Outlier Exposure (Training): 80 Million Tiny Images (often reduced to a "few-shot" subset), CIFAR-100, and SVHN.
  • Test Sets (OoD): CIFAR-10, CIFAR-100, SVHN, Uniform Noise, and Low-Frequency Noise (LFN).
  • One-Class Classification (OCC): Evaluation on the 10 individual classes of CIFAR-10 to test the model's ability to define a single class against all others.

Key Insights and Ideas

  • Stability in Scarcity: The most striking insight is that FROB’s performance remains approximately constant regardless of how many outlier samples are provided. While other models' performance "breaks" when outlier data drops below a certain threshold (around 800-1800 samples), FROB remains robust even down to zero-shot scenarios.
  • The "Tightest-Possible" Boundary: By generating outliers specifically at the edge of the normal data, the model learns a much sharper decision boundary than models trained on random, distant outliers.
  • Implicit Adversarial Defense: Because the model is trained to be uncertain at its own generated boundary, it becomes naturally more resilient to adversarial attacks that try to push samples across that boundary.
  • Redesigning Outlier Exposure: The authors show that "Outlier Exposure" doesn't have to be a data-hungry process. By combining it with a learned boundary, you can "streamline" the process to work with minimal human intervention or data labeling.

Key Results

  • Superior Robustness: FROB outperformed established benchmarks (like GOOD, CEDA, and ACET) in terms of "Guaranteed AUROC" (GAUROC), which measures detection performance under adversarial perturbations.
  • Few-Shot Dominance: In experiments where the number of available outliers was drastically reduced, FROB maintained an AUROC near 0.90, while competing models saw their performance plummet toward 0.50 (random guessing).
  • OCC Success: On One-Class Classification tasks, FROB achieved a mean AUROC of 0.784, outperforming specialized models like SVDD (0.608) and GEOM (0.735).
  • Generalization: The model successfully detected "in the wild" anomalies (like low-frequency noise) that were never seen during training, proving it doesn't just memorize specific outliers but learns the concept of "differentness."

Limitations and Future Work

While FROB is highly effective at detecting that something is wrong, the authors note that the current version doesn't necessarily explain where or why it is wrong in a spatial sense.

Future Work includes: * Extending the model to output bounding boxes or heatmaps around abnormal objects within an image. * Improving the "confidence and class" output to provide more granular information about the type of anomaly detected. * Testing the framework on even more complex, high-resolution datasets beyond the CIFAR/SVHN benchmarks.

Summary updated

Abstract

Nowadays, classification and Out-of-Distribution (OoD) detection in the\nfew-shot setting remain challenging aims due to rarity and the limited samples\nin the few-shot setting, and because of adversarial attacks. Accomplishing\nthese aims is important for critical systems in safety, security, and defence.\nIn parallel, OoD detection is challenging since deep neural network classifiers\nset high confidence to OoD samples away from the training data. To address such\nlimitations, we propose the Few-shot ROBust (FROB) model for classification and\nfew-shot OoD detection. We devise FROB for improved robustness and reliable\nconfidence prediction for few-shot OoD detection. We generate the support\nboundary of the normal class distribution and combine it with few-shot Outlier\nExposure (OE). We propose a self-supervised learning few-shot confidence\nboundary methodology based on generative and discriminative models. The\ncontribution of FROB is the combination of the generated boundary in a\nself-supervised learning manner and the imposition of low confidence at this\nlearned boundary. FROB implicitly generates strong adversarial samples on the\nboundary and forces samples from OoD, including our boundary, to be less\nconfident by the classifier. FROB achieves generalization to unseen OoD with\napplicability to unknown, in the wild, test sets that do not correlate to the\ntraining datasets. To improve robustness, FROB redesigns OE to work even for\nzero-shots. By including our boundary, FROB reduces the threshold linked to the\nmodel's few-shot robustness; it maintains the OoD performance approximately\nindependent of the number of few-shots. The few-shot robustness analysis\nevaluation of FROB on different sets and on One-Class Classification (OCC) data\nshows that FROB achieves competitive performance and outperforms benchmarks in\nterms of robustness to the outlier few-shot sample population and variability.\n
BibTeX
@misc{dionelis2021frob,
  author = {Nikolaos Dionelis and Mehrdad Yaghoobi and Sotirios A. Tsaftaris},
  title = {{FROB: Few-shot ROBust Model for Classification and Out-of-Distribution\textbackslash\{\}n Detection}},
  year = {2021},
  eprint = {2111.15487},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2111.15487},
}
Figure