TL;DR
This paper introduces Generative Outlier Exposure (GOE), a method that uses generative models to create synthetic outliers for training Out-of-Distribution (OOD) detectors. This approach eliminates the need for manually curated outlier datasets, significantly improving OOD detection performance on image and text tasks, even with pre-trained generative models.
What Problem Does This Paper Address?
Out-of-Distribution (OOD) detection is crucial for building reliable machine learning systems, as it allows models to identify data that deviates from their training distribution. A technique called "Outlier Exposure" (OE) has proven effective in boosting OOD detection performance by training models on a set of known outlier examples. However, the major bottleneck for OE is the requirement of a large, representative dataset of these outliers, which is often difficult or impossible to obtain in practice. This paper addresses this gap by proposing a way to automatically generate these necessary outlier examples using generative models.
Methods
The core of this paper is the Generative Outlier Exposure (GOE) method. Instead of relying on existing outlier datasets, GOE leverages generative models (like GANs or Transformers) to synthesize outlier data. The key idea is to sample from the low-density regions of the data distribution, which are hypothesized to be closer to the decision boundary and thus more effective for regularization than random noise.
The paper outlines two main strategies for sampling these synthetic outliers:
- Biased Generator: Directly sample from a generator that is assumed to have a sufficient divergence from the true data distribution.
- Sampling-Parameters: For generators that allow control over their output (e.g., via temperature or variance parameters), these parameters are adjusted to sample from low-probability regions.
GOE is designed to be flexible: it doesn't require modifying the generator itself and can work with pre-trained models. This makes it a computationally efficient solution when good generative models are available but outlier datasets are not.
Datasets
The authors evaluated GOE on several standard image and text classification datasets:
Image Datasets: * CIFAR-10 * CIFAR-100 * ImageNet-1K
They used various OOD datasets for evaluation, including:
- Textures
- LSUN Crop
- LSUN Resize
- TinyImageNet Crop
- TinyImageNet Resize
- ImageNet-A
- ImageNet-R
- ImageNet-O
Text Datasets: * 20 NewsGroups (for training the generator and as in-distribution data)
For comparison, they also used:
- Reuters52
- Multi30k
- WMT16 Sentences (as OOD text datasets)
- Wiki2 (as natural text outliers)
Key Insights and Ideas
- Synthetic outliers can be as good as, or better than, real ones: The paper demonstrates that carefully generated outliers from low-density regions can be highly effective for Outlier Exposure, often matching or exceeding the performance of using manually curated "natural" outliers.
- Generative models are powerful tools for OOD robustness: GOE shows that generative models, beyond their primary task, can be repurposed to create valuable training data for improving OOD detection.
- Low-density sampling is key: The success of GOE hinges on sampling from regions of the data distribution that are less probable, which effectively pushes the model's decision boundaries outwards.
- Pre-trained models are a significant advantage: The ability to use off-the-shelf, pre-trained generative models makes GOE practical and computationally efficient, especially in scenarios where training a generator from scratch is infeasible.
- Outlier characteristics matter: The paper hints that combining different types of outliers (e.g., generated and natural) might yield even better results, suggesting a rich area for future exploration.
Key Results
- ImageNet Performance: For ImageNet, where readily available outlier data is scarce, GOE significantly improved OOD detection performance compared to models trained with uniformly sampled outliers.
- CIFAR-10/100 Performance: GOE achieved competitive results on CIFAR datasets, often outperforming noise-based outliers and performing on par with or better than natural outliers. For example, on CIFAR-10, "Generated Energy" achieved an AUROC of 95.51% and FPR@95TPR of 18.50%, compared to "Tiny300k Energy" at 98.63% AUROC and 5.88% FPR@95TPR.
- Text Performance: On text datasets, GOE also showed strong performance, with "Generated Energy" achieving an AUROC of 95.11% and FPR@95TPR of 17.50% on average across three OOD datasets, outperforming "Noise Energy" (93.93% AUROC, 18.94% FPR@95TPR) and comparable to "Wiki2 Energy" (94.41% AUROC, 16.85% FPR@95TPR).
- Faster Convergence: Models trained with generated outliers tended to converge faster during optimization compared to those trained with noise or natural outliers.
- Variance Impact: The paper found that increasing the variance of the generator's latent space generally improved OOD detection performance, with an optimal range observed before performance starts to decay.
Limitations and Future Work
- Parameter Tuning: The paper acknowledges that selecting optimal sampling parameters (like variance or temperature) for the generator is crucial for achieving the best performance. Currently, this selection is done manually by inspecting generated outliers, and an automatic method for this remains an open problem.
- Generalizability to Other Modalities: While tested on images and text, the authors suggest that GOE is a general framework that could be extended to other data modalities.
- Combining Outlier Types: The authors hypothesize that combining generated outliers with other types of outliers (e.g., from methods like Objectosphere Loss or Energy-bounded Learning Loss) could further enhance performance.
- Computational Cost: While GOE is computationally cheaper than collecting real outliers, it still relies on having access to generative models, which can be computationally intensive to train or run.
Summary updated