Adversarial Example Detection by Classification for Deep Speech Recognition

Saeid Samizade, Zheng-Hua Tan, Chao Shen, Xiaohong Guan

TL;DR

This paper proposes a dedicated defense against adversarial attacks on Deep Speech Recognition by treating detection as a binary classification problem. By training a specialized Convolutional Neural Network (CNN) on cepstral features, the researchers achieved over 98% accuracy in identifying both white-box and black-box adversarial audio, though they found that detectors must be specifically trained on the attack types they expect to encounter.

What Problem Does This Paper Address?

Deep learning models for speech—ranging from full Automatic Speech Recognition (ASR) to simple keyword spotting—are notoriously vulnerable to adversarial examples. These are audio signals modified by tiny, human-inaudible perturbations that cause a model to transcribe the audio incorrectly (e.g., changing "yes" to "right").

While many defenses focus on "cleaning" the signal or checking for temporal inconsistencies, there is a lack of dedicated systems designed to simply flag whether an incoming signal is malicious. The authors aim to fill this gap by formulating defense as a classification task: can a secondary model learn the "fingerprint" of adversarial noise?

Methods

The authors' approach involves two main stages: generating a robust dataset of attacks and training a detector.

  1. Attack Generation: They utilized two state-of-the-art methods:
  2. White-box (C&W): A gradient-based optimization method where the attacker has full access to the victim model (Baidu DeepSpeech).
  3. Black-box (Alzantot): A gradient-free method using a genetic algorithm, where the attacker only sees the victim model's inputs and outputs.
  4. Feature Extraction: The audio is converted into Mel-frequency Cepstral Coefficients (MFCCs), a standard representation in speech processing that captures the power spectrum of the sound.
  5. The Detector: They proposed a CNN architecture specifically designed to be sensitive to minute changes.
Fig. 2. Architecture of the proposed CNN model.

As shown in Figure 2 and detailed in Table 1 (Figure 4), the model uses very small $(2,2)$ kernels. The intuition is that large kernels might smooth over the subtle, high-frequency perturbations characteristic of adversarial attacks, whereas small kernels can capture these fine-grained patterns.

Datasets

The researchers created two distinct datasets to evaluate their detector:

  • Dataset A (White-box): Built using the Mozilla Common Voice dataset. It includes 900 adversarial and 900 normal examples, categorized by length (short, medium, and long) to ensure the detector isn't just learning to identify signal duration.
  • Dataset B (Black-box): Built using the Google Speech Command dataset. It uses a "mutual targeting" strategy where each of the 10 chosen commands is attacked using the other 9 as targets, resulting in 1,800 adversarial and 1,800 normal examples.

Key Insights and Ideas

  • Attack "Fingerprints": Even though adversarial perturbations are designed to be inaudible, they leave distinct statistical traces. Figure 1 illustrates how white-box attacks (b) and black-box attacks (c) alter the spectrogram differently compared to the original signal (a).

    Fig. 1. Spectrograms for normal example (a), white-box correspond- ing adversarial example (b) and black-box corresponding adversarial example (c). The original utterance of normal example is ”yes” and the target for both adversarial examples is ”right”.
  • The Generalization Gap: A detector trained only on white-box attacks fails to detect black-box attacks (and vice versa). This suggests that different attacking algorithms produce fundamentally different types of noise.

  • Phonetic Interference: Detection accuracy drops slightly when the source word and the target adversarial word are phonetically similar. As seen in the confusion matrix in Figure 3, it's harder for the model to distinguish a "yes" signal turned into "left" than one turned into "go."
Fig. 3. Detailed accuracy results of testing data in percentage for experiment (Train B, Test B).

Key Results

The experimental results, summarized in Table 2 (Figure 5), highlight the effectiveness and the limitations of the classification approach:

  • Matched Conditions: When the detector is trained and tested on the same attack type, accuracy is exceptionally high: 99.31% for white-box and 98.42% for black-box.
  • Multi-condition Training: Training on a mix of both attack types allows a single model to detect both with high accuracy (>95%).
  • Mismatched Conditions: A model trained on black-box attacks (B) and tested on white-box (A) performs at 48.76%, which is essentially random guessing.
  • Robustness to Targets: The model generalizes well to "unknown" target sentences. Even if it hasn't seen a specific target phrase during training, it can still identify the audio as adversarial with ~99% accuracy (Table 4).

Limitations and Future Work

The primary limitation is the lack of generalization to unknown attacks. If a new attacking algorithm is developed, current detectors might be blind to it unless retrained. The authors note that while the CNN handles some natural noise present in the datasets, further research is needed to ensure these detectors remain robust in extremely noisy real-world environments. Future work may also need to address "adaptive adversaries"—attackers who specifically design their perturbations to bypass the detector itself.

Summary updated

BibTeX
@misc{samizade2019adversarial,
  author = {Saeid Samizade and Zheng-Hua Tan and Chao Shen and Xiaohong Guan},
  title = {{Adversarial Example Detection by Classification for Deep Speech Recognition}},
  year = {2019},
  eprint = {1910.10013},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.10013},
}
Figure