[Paper Review] Soft Labeling Affects Out-of-Distribution Detection of Deep Neural Networks
This paper demonstrates that soft labeling—specifically knowledge distillation from a teacher model—can significantly enhance out-of-distribution (OOD) detection in deep neural networks without requiring additional OOD training data or model architecture changes. By transferring soft labels from a teacher model trained with outlier exposure, student models achieve state-of-the-art OOD detection performance while improving or preserving classification accuracy and calibration.
Soft labeling becomes a common output regularization for generalization and model compression of deep neural networks. However, the effect of soft labeling on out-of-distribution (OOD) detection, which is an important topic of machine learning safety, is not explored. In this study, we show that soft labeling can determine OOD detection performance. Specifically, how to regularize outputs of incorrect classes by soft labeling can deteriorate or improve OOD detection. Based on the empirical results, we postulate a future work for OOD-robust DNNs: a proper output regularization by soft labeling can construct OOD-robust DNNs without additional training of OOD samples or modifying the models, while improving classification accuracy.
Motivation & Objective
- To investigate the impact of soft labeling on out-of-distribution (OOD) detection performance in deep neural networks.
- To explore whether soft labeling can improve OOD detection without requiring explicit training on OOD samples.
- To determine if output regularization via soft labels can simultaneously enhance OOD robustness and in-distribution generalization.
- To evaluate the transferability of OOD detection performance from a teacher model to a student model through soft label distillation.
- To assess whether soft labeling can mitigate the accuracy degradation often seen in OOD detection methods like outlier exposure.
Proposed method
- Train a WideResNet (WRN-40-2) as a teacher model using outlier exposure (OE) on TinyImageNet to improve OOD detection.
- Use the trained teacher model to generate soft labels (probability distributions over all classes) for in-distribution training samples.
- Train a student model (same or different architecture) using cross-entropy loss with soft labels from the teacher, without using any OOD samples during training.
- Apply label smoothing and knowledge distillation as specific forms of soft labeling, formalized via a weighted combination of cross-entropy with ground-truth and soft targets.
- Evaluate OOD detection using AUROC on multiple OOD datasets (e.g., MNIST, Fashion-MNIST, LSUN, TinyImageNet) and assess calibration via Expected Calibration Error (ECE).
- Compare performance across baseline, outlier-exposed, and distilled student models to isolate the effect of soft labeling on OOD robustness.
Experimental results
Research questions
- RQ1How does soft labeling affect the out-of-distribution detection performance of deep neural networks?
- RQ2Can knowledge distillation from a teacher model trained with outlier exposure transfer robust OOD detection to a student model without using OOD samples during student training?
- RQ3Does soft labeling improve both OOD detection and in-distribution classification accuracy, countering the typical trade-off seen in outlier exposure?
- RQ4Is the OOD detection performance of a student model dependent on the soft labels generated by its teacher, and is this effect model-agnostic across architectures?
- RQ5Can a soft labeling strategy be designed to make DNNs robust to unseen OOD samples without modifying the model or using OOD data in training?
Key findings
- Knowledge distillation from a teacher model that underwent outlier exposure successfully transfers high OOD detection performance to a student model, even when the student is trained exclusively on in-distribution data.
- The student model achieves AUROC scores comparable to or better than the teacher model on multiple OOD datasets, including MNIST and TinyImageNet, when the teacher is exposed to MNIST+TinyImageNet.
- Test accuracy and Expected Calibration Error (ECE) of the student model are improved or preserved compared to the baseline, countering the typical accuracy drop seen in outlier exposure.
- Label smoothing degrades OOD detection performance, suggesting that the choice of soft labeling strategy is critical for OOD robustness.
- The OOD detection performance of the student model closely mirrors that of its teacher, demonstrating that soft labeling effects are model-agnostic and transferable across different architectures (e.g., WRN and DenseNet).
- A soft labeling strategy that regularizes predictions on incorrect classes via a well-trained teacher model can create OOD-robust DNNs without additional OOD data or model modifications.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.