Skip to main content
QUICK REVIEW

[Paper Review] A General Framework For Detecting Anomalous Inputs to DNN Classifiers

Jayaram Raghuram, Varun Chandrasekaran|arXiv (Cornell University)|Jul 29, 2020
Adversarial Robustness in Machine LearningComputer Science6 citations
TL;DR

This paper proposes JTLA, a general unsupervised framework for detecting adversarial and out-of-distribution (OOD) inputs in DNN classifiers by leveraging statistical testing across multiple internal layer representations. It uses principled, configurable components—such as p-value estimation and aggregation via Fisher’s method—demonstrating superior robustness against adaptive attacks and strong performance across CIFAR-10, SVHN, and MNIST datasets, especially under low false positive rates.

ABSTRACT

Detecting anomalous inputs, such as adversarial and out-of-distribution (OOD) inputs, is critical for classifiers (including deep neural networks or DNNs) deployed in real-world applications. While prior works have proposed various methods to detect such anomalous samples using information from the internal layer representations of a DNN, there is a lack of consensus on a principled approach for the different components of such a detection method. As a result, often heuristic and one-off methods are applied for different aspects of this problem. We propose an unsupervised anomaly detection framework based on the internal DNN layer representations in the form of a meta-algorithm with configurable components. We proceed to propose specific instantiations for each component of the meta-algorithm based on ideas grounded in statistical testing and anomaly detection. We evaluate the proposed methods on well-known image classification datasets with strong adversarial attacks and OOD inputs, including an adaptive attack that uses the internal layer representations of the DNN (often not considered in prior work). Comparisons with five recently-proposed competing detection methods demonstrates the effectiveness of our method in detecting adversarial and OOD inputs.

Motivation & Objective

  • To address the lack of a principled, unified framework for detecting anomalous inputs (adversarial and OOD) in DNNs using internal layer representations.
  • To overcome limitations of existing methods, including reliance on labeled anomalous data, poor generalization to adaptive attacks, and suboptimal use of multi-layer information.
  • To develop an unsupervised, modular framework that enables principled selection and combination of test statistics, aggregation, and scoring methods for anomaly detection.
  • To evaluate the framework against novel, defense-aware adversarial attacks that target detection mechanisms based on layer representations.
  • To demonstrate robust performance across diverse datasets and attack types, particularly under realistic operating conditions with constrained false positive rates.

Proposed method

  • The framework, JTLA, is structured as a meta-algorithm with configurable components: test statistics, p-value estimation, aggregation method, and decision threshold.
  • It uses p-values derived from statistical hypothesis tests on DNN layer representations to quantify anomaly likelihood, with p-values estimated via kernel density estimation (LPE) or empirical methods.
  • Anomalies are detected by combining p-values across layers using Fisher’s method or the arithmetic mean, enabling joint analysis of multi-layer patterns.
  • The method is unsupervised: it does not require training on known anomalous samples, relying only on the distribution of clean inputs during inference.
  • The framework is designed to be robust to adaptive attacks by focusing on layer representations that are difficult to manipulate without detection.
  • It incorporates class-conditional analysis of layer representations to improve detection sensitivity, especially for attacks that exploit class-specific features.

Experimental results

Research questions

  • RQ1Can a general, unsupervised framework based on statistical testing of DNN layer representations outperform existing detection methods on adversarial and OOD inputs?
  • RQ2How does the joint analysis of multiple layer representations improve detection robustness compared to single-layer or output-only methods?
  • RQ3To what extent can the framework generalize to unknown and adaptive adversarial attacks that are designed to evade detection?
  • RQ4How do different p-value estimation and aggregation strategies affect detection performance and computational efficiency?
  • RQ5Does incorporating class-conditional properties of layer representations enhance detection accuracy, especially under high-confidence adversarial attacks?

Key findings

  • On CIFAR-10, JTLA outperforms all competing methods in terms of pAUC-0.2 across most attacks, including the adaptive attack, demonstrating strong generalization.
  • On SVHN, JTLA maintains strong performance, with the aK-LPE variant outperforming Mahalanobis on the adaptive attack, indicating robustness to defense-aware adversaries.
  • On MNIST, while Odds and Trust outperform JTLA on some attacks due to distinct patterns in logits, JTLA’s aK-LPE variant remains competitive and superior on the adaptive attack, which was specifically designed to evade Fisher’s method.
  • The aK-LPE variant of JTLA shows superior resilience to adaptive attacks, suggesting that its p-value estimation method is less susceptible to manipulation.
  • JTLA maintains low running times (e.g., 2.18 min/fold on CIFAR-10), outperforming computationally heavy methods like Odds and LID, which require extensive sampling or cross-validation.
  • The framework’s modular design allows it to subsume and improve upon prior methods, such as Mahalanobis and LID, by providing a principled statistical foundation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.