Gradient-Based Novelty Detection Boosted by Self-Supervised Binary Classification

Jingbo Sun, Li Yang, Jiaxin Zhang, Frank Liu, Mahantesh Halappanavar, Deliang Fan, Yu Cao

Introduction

Deep Neural Networks (DNNs) are prone to overconfidence, frequently assigning high-certainty classifications to Out-of-Distribution (OOD) data. This behavior presents significant challenges for safety-critical applications such as autonomous driving and medical diagnostics. While existing OOD detection methods often rely on feature-space analysis or require labeled OOD samples, real-world scenarios demand unsupervised, robust detectors capable of handling high-dimensional inputs without prior knowledge of novel data.

Methodology

The proposed framework utilizes a "mutual assistance" closed-loop system consisting of a gradient-based novelty detector and a self-supervised binary classifier.

Figure 3: Overview of the proposed closed-loop system architecture for OOD detection.

Gradient-Based Novelty Detector

Unlike traditional methods that analyze static feature vectors, this approach examines the gradients generated during inference. For In-Distribution (IDD) data, gradients are typically small as the input aligns with the learned manifold. Conversely, OOD data produces significantly larger gradients. The Mahalanobis distance in this gradient space serves as the primary metric for identifying novelty.

Label Selection Strategy

To amplify the novelty signal, the authors implement a strategic label selection process. For potential OOD samples, the "least likely" label (lowest softmax probability) is selected to calculate the gradient. This maximizes the gradient magnitude, increasing the separation between IDD and OOD distributions.

Self-Supervised Binary Classifier

A binary classifier is integrated to distinguish between IDD and OOD samples. It is initialized using the most confident predictions from the gradient detector. Once trained, this classifier pre-screens incoming data, guiding the gradient detector in choosing the optimal label selection strategy (predicted label for IDD, custom label for OOD). This interaction creates a virtuous cycle where the detector provides training samples for the classifier, which in turn refines the detector's performance.

Experimental Results

The framework was evaluated on standard benchmarks, including CIFAR-10, CIFAR-100, and SVHN. The results demonstrate that the proposed method consistently outperforms existing state-of-the-art (SOTA) approaches.

Figure 1: AUROC performance comparison of the proposed method against state-of-the-art supervised and unsupervised techniques on CIFAR-10 vs. CIFAR-100.

Notably, on the CIFAR-10 (IDD) vs. CIFAR-100 (OOD) task, the method achieved an AUROC of 97.99%, surpassing previous unsupervised benchmarks. In simpler tasks like SVHN vs. LSUN, the model reached near-perfect detection with a 99.99% AUROC. Furthermore, the system showed promise in continual learning settings, identifying new classes in data streams with high accuracy (91-96%).

Discussion and Limitations

While the method shows significant improvements, certain limitations remain. The binary classifier's performance is sensitive to the ratio of IDD to OOD samples in the input stream. Additionally, calculating gradients for every input increases computational overhead compared to feature-based methods. The stability of the closed-loop also depends on successful initialization during the "warm-up" phase. Future research may focus on optimizing gradient calculations for edge devices and extending the framework to non-visual modalities.

Summary updated

BibTeX
@inproceedings{sun2022gradient,
  author = {Jingbo Sun and Li Yang and Jiaxin Zhang and Frank Liu and Mahantesh Halappanavar and Deliang Fan and Yu Cao},
  title = {{Gradient-Based Novelty Detection Boosted by Self-Supervised Binary Classification}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i8.20812},
}
Figure