Abstract
Deep neural networks (DNN) are able to successfully process and classify speech utterances. However, understanding the reason behind a classification by DNN is difficult. One such debugging method used with image classification DNNs is activation maximization, which generates example-images that are classified as one of the classes. In this work, we evaluate applicability of this method to speech utterance classifiers as the means to understanding what DNN “listens to”. We trained a classifier using the speech command corpus and then use activation maximization to pull samples from the trained model. Then we synthesize audio from features using WaveNet vocoder for subjective analysis. We measure the quality of generated samples by objective measurements and crowd-sourced human evaluations. Results show that when combined with the prior of natural speech, activation maximization can be used to generate examples of different classes. Based on these results, activation maximization can be used to start opening up the DNN black-box in speech tasks.
Introduction
Deep Neural Networks (DNNs) have revolutionized speech recognition, yet they remain largely "black boxes." When a model misclassifies a command—for instance, mistaking "up" for "off"—it is often difficult to diagnose the underlying cause. In computer vision, researchers address this through activation maximization, a technique that generates images designed to highly excite specific neurons, thereby visualizing the model's internal representations.
Applying this technique to audio presents unique challenges. Directly performing gradient ascent on raw audio features typically results in "adversarial noise"—high-frequency static that satisfies the model's mathematical criteria but lacks human-interpretable structure. This paper introduces a method to generate realistic and interpretable audio samples that reveal what a speech classifier has actually learned.
Methodology
The researchers developed a pipeline that integrates classification, generation, and synthesis to ensure the output remains within the manifold of natural speech.
The system consists of four primary components:
- The Classifier: A standard CNN trained on mel-spectrograms to recognize short speech commands.
- The Generative Prior: To prevent the generation of unstructured noise, an Auto-encoder (AE) was trained on the speech dataset. By performing activation maximization in the AE's latent bottleneck space ($Z$) rather than on raw spectrogram pixels, the optimization is constrained to "natural-looking" speech features.
- Activation Maximization: Gradient ascent is used to find a latent code $\bar{Z}$ that, when decoded, produces a spectrogram that the classifier identifies as the target class with high confidence.
- The Vocoder: A pre-trained WaveNet vocoder transforms these generated mel-spectrograms back into audible waveforms for subjective evaluation.
Experimental Setup
The study utilized the Google Speech Commands corpus v0.02, containing 105,829 utterances of 35 short words from over 2,600 speakers. This dataset is particularly useful for debugging because it includes phonetically similar words (e.g., "tree" vs. "three") that frequently challenge recognition models.
Results and Discussion
The core finding is that a generative prior is essential for interpretability. Without the Auto-encoder, generated features appear as random spots. With the prior, the resulting spectrograms exhibit clear formants—the horizontal bands characteristic of human speech.
Key Findings:
- Transferability: To ensure the generated samples weren't merely artifacts of one specific model, they were tested against a separate "held-out" classifier. Samples generated with the generative prior achieved a 67.5% success rate in being correctly identified by the second model, compared to only 7.6% for those generated without the prior.
- Human Evaluation: Crowd-sourced evaluations via Amazon Mechanical Turk confirmed that humans found the decoder-maximized samples significantly more recognizable. For 23 of the 35 classes, these samples achieved a mean quality rating above 1.5 (on a 1-5 scale), whereas almost all samples generated without the prior failed to reach this threshold.
- Debugging Insights: By visualizing the latent space using t-SNE, the authors observed that misclassifications often stem from speaker-specific acoustic signatures rather than a failure to recognize core phonetic features. The maximization process effectively "pushes" these samples toward the correct class cluster.
Conclusion
While the generated audio is not yet high-fidelity—often sounding like a "ghostly" approximation—this work demonstrates that activation maximization can be successfully adapted to the audio domain. By using a generative model as a prior, researchers can visualize and hear the internal concepts of a speech classifier. Future work will explore applying these techniques to more complex, variable-length tasks like Language Identification.
Summary updated