Table of Contents
Fetching ...

Network Inversion for Uncertainty-Aware Out-of-Distribution Detection

Pirzada Suhail, Rehna Afroz, Gouranga Bala, Amit Sethi

TL;DR

The paper addresses the dual challenges of out-of-distribution detection and uncertainty estimation by introducing a unified training framework that augments a standard classifier with a garbage class and employs network inversion to iteratively reconstruct and reclassify inputs. A generator learns to invert class-conditioned outputs, and inverted misfits are progressively relegated to the garbage class, sharpening in-distribution boundaries. Inference assigns OOD samples to garbage and derives interpretable uncertainty from a softmax-based distance to a uniform distribution, without needing external OOD data or post-hoc calibration. The approach is demonstrated to maintain high ID accuracy while achieving robust OOD rejection across multiple benchmark datasets, with potential for finer-grained OOD handling through additional garbage mechanisms.

Abstract

Out-of-distribution (OOD) detection and uncertainty estimation (UE) are critical components for building safe machine learning systems, especially in real-world scenarios where unexpected inputs are inevitable. However the two problems have, until recently, separately been addressed. In this work, we propose a novel framework that combines network inversion with classifier training to simultaneously address both OOD detection and uncertainty estimation. For a standard n-class classification task, we extend the classifier to an (n+1)-class model by introducing a "garbage" class, initially populated with random gaussian noise to represent outlier inputs. After each training epoch, we use network inversion to reconstruct input images corresponding to all output classes that initially appear as noisy and incoherent and are therefore excluded to the garbage class for retraining the classifier. This cycle of training, inversion, and exclusion continues iteratively till the inverted samples begin to resemble the in-distribution data more closely, with a significant drop in the uncertainty, suggesting that the classifier has learned to carve out meaningful decision boundaries while sanitising the class manifolds by pushing OOD content into the garbage class. During inference, this training scheme enables the model to effectively detect and reject OOD samples by classifying them into the garbage class. Furthermore, the confidence scores associated with each prediction can be used to estimate uncertainty for both in-distribution and OOD inputs. Our approach is scalable, interpretable, and does not require access to external OOD datasets or post-hoc calibration techniques while providing a unified solution to the dual challenges of OOD detection and uncertainty estimation.

Network Inversion for Uncertainty-Aware Out-of-Distribution Detection

TL;DR

The paper addresses the dual challenges of out-of-distribution detection and uncertainty estimation by introducing a unified training framework that augments a standard classifier with a garbage class and employs network inversion to iteratively reconstruct and reclassify inputs. A generator learns to invert class-conditioned outputs, and inverted misfits are progressively relegated to the garbage class, sharpening in-distribution boundaries. Inference assigns OOD samples to garbage and derives interpretable uncertainty from a softmax-based distance to a uniform distribution, without needing external OOD data or post-hoc calibration. The approach is demonstrated to maintain high ID accuracy while achieving robust OOD rejection across multiple benchmark datasets, with potential for finer-grained OOD handling through additional garbage mechanisms.

Abstract

Out-of-distribution (OOD) detection and uncertainty estimation (UE) are critical components for building safe machine learning systems, especially in real-world scenarios where unexpected inputs are inevitable. However the two problems have, until recently, separately been addressed. In this work, we propose a novel framework that combines network inversion with classifier training to simultaneously address both OOD detection and uncertainty estimation. For a standard n-class classification task, we extend the classifier to an (n+1)-class model by introducing a "garbage" class, initially populated with random gaussian noise to represent outlier inputs. After each training epoch, we use network inversion to reconstruct input images corresponding to all output classes that initially appear as noisy and incoherent and are therefore excluded to the garbage class for retraining the classifier. This cycle of training, inversion, and exclusion continues iteratively till the inverted samples begin to resemble the in-distribution data more closely, with a significant drop in the uncertainty, suggesting that the classifier has learned to carve out meaningful decision boundaries while sanitising the class manifolds by pushing OOD content into the garbage class. During inference, this training scheme enables the model to effectively detect and reject OOD samples by classifying them into the garbage class. Furthermore, the confidence scores associated with each prediction can be used to estimate uncertainty for both in-distribution and OOD inputs. Our approach is scalable, interpretable, and does not require access to external OOD datasets or post-hoc calibration techniques while providing a unified solution to the dual challenges of OOD detection and uncertainty estimation.

Paper Structure

This paper contains 5 sections, 3 equations, 1 figure, 1 table.

Figures (1)

  • Figure 1: Inverted Samples across epochs for different classes, beginning to resemble the training data as OODs are excluded into garbage class.