Skip to main content
QUICK REVIEW

[Paper Review] Subset Scanning Over Neural Network Activations

Skyler Speakman, Srihari Sridharan|arXiv (Cornell University)|Oct 19, 2018
Adversarial Robustness in Machine LearningComputer Science27 references5 citations
TL;DR

This paper introduces Subset Scanning over neural network activations to detect anomalous inputs—such as adversarial examples—without retraining or architectural changes. By applying non-parametric scan statistics to identify the most anomalous subset of node activations in log-linear time, it quantifies anomalousness, detects perturbations in CIFAR-10 images, and reveals an interference pattern where shallow-layer anomalies suppress true feature representations in deeper layers.

ABSTRACT

This work views neural networks as data generating systems and applies anomalous pattern detection techniques on that data in order to detect when a network is processing an anomalous input. Detecting anomalies is a critical component for multiple machine learning problems including detecting adversarial noise. More broadly, this work is a step towards giving neural networks the ability to recognize an out-of-distribution sample. This is the first work to introduce "Subset Scanning" methods from the anomalous pattern detection domain to the task of detecting anomalous input of neural networks. Subset scanning treats the detection problem as a search for the most anomalous subset of node activations (i.e., highest scoring subset according to non-parametric scan statistics). Mathematical properties of these scoring functions allow the search to be completed in log-linear rather than exponential time while still guaranteeing the most anomalous subset of nodes in the network is identified for a given input. Quantitative results for detecting and characterizing adversarial noise are provided for CIFAR-10 images on a simple convolutional neural network. We observe an "interference" pattern where anomalous activations in shallow layers suppress the activation structure of the original image in deeper layers.

Motivation & Objective

  • To enable pre-trained neural networks to detect out-of-distribution or adversarial inputs without retraining or architectural modifications.
  • To quantify the anomalousness of input data by measuring deviations in activation space relative to a background distribution of normal inputs.
  • To detect and characterize anomalous patterns in neural network activations using a scalable, exact search over subsets of nodes.
  • To provide interpretable insights into how adversarial noise disrupts normal feature representation through node-level anomaly localization.
  • To lay the foundation for extending subset scanning to constrained search spaces and broader applications beyond adversarial detection.

Proposed method

  • Applies non-parametric scan statistics to measure deviance between activation patterns of a test input and those from a background set of normal inputs.
  • Uses the Linear Time Subset Scanning property to efficiently identify the most anomalous subset of nodes among all 2^J possible subsets in J-node networks.
  • Defines an anomalousness score based on the likelihood ratio of observed activation counts versus expected background counts under a null hypothesis of normality.
  • Performs detection by comparing the highest subset score to a threshold derived from background inputs, enabling unsupervised anomaly detection.
  • Characterizes anomalies by identifying the specific nodes and layers contributing to the highest-scoring subset, enabling interpretability.
  • Extends the method to enforce soft constraints on the scoring function to reflect domain knowledge, such as prioritizing certain layers.

Experimental results

Research questions

  • RQ1Can subset scanning over neural network activations detect adversarial inputs in a fully unsupervised manner without retraining?
  • RQ2How effectively can subset scanning identify the most anomalous subset of node activations in high-dimensional activation spaces?
  • RQ3What structural patterns emerge in the network when adversarial noise is present, particularly in terms of layer-wise activation disruption?
  • RQ4Can the method reveal interpretable mechanisms by which adversarial noise interferes with normal feature representation?
  • RQ5How can subset scanning be extended to improve detection power beyond unconstrained subset searches?

Key findings

  • The method successfully detects adversarial perturbations on CIFAR-10 images using a pre-trained convolutional neural network with 96,800 nodes.
  • Subset scanning identifies the most anomalous subset of nodes in log-linear time, enabling exact search over all 2^J subsets without approximation.
  • An interference pattern is observed where anomalous activations in shallow layers suppress the normal activation structure of the original image in deeper layers.
  • The highest-scoring subset of nodes is consistently found in early convolutional and pooling layers, indicating these layers are primary targets of adversarial noise.
  • The subset score provides a single, interpretable real-valued anomalousness score that correlates with the presence of adversarial perturbations.
  • The approach enables explainable AI by localizing anomalous nodes, offering insight into how and where adversarial noise disrupts feature learning.

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.