Abstract
Interpretability methods have recently gained significant attention, particularly in the context of large language models, enabling insights into linguistic representations, error detection, and model behaviors such as hallucinations and repetitions. However, these techniques remain underexplored in automatic speech recognition (ASR). In this work, we adapt and systematically apply established interpretability methods—logit lens, linear probing, and activation patching—to examine how acoustic and semantic information evolves across layers in ASR systems like Whisper and Qwen2-Audio. Our experiments reveal that encoders develop deep semantic understanding, hallucinations can be predicted with over 90% accuracy from internal signals, and specific "glitch" heads are responsible for repetition loops.
Introduction
Automatic Speech Recognition (ASR) has transitioned from simple acoustic mapping to complex, multi-billion parameter Transformer architectures. While models like OpenAI’s Whisper are highly capable, they often function as "black boxes." When these models fail—such as getting stuck in repetition loops or hallucinating grammatical but irrelevant text—the underlying causes are often opaque. This research bridges the "interpretability gap" by applying mechanistic interpretability tools to reverse-engineer the internal dynamics of ASR systems.
Methodology
The study adapts four core techniques to the ASR domain:
- Logit Lens: Projecting intermediate hidden states into the vocabulary space to observe layer-by-layer prediction evolution.
- Linear Probing: Training shallow classifiers on frozen representations to detect linearly decodable information like speaker gender or accent.
- Activation Patching & Ablation: Causally identifying components responsible for specific behaviors by swapping or zeroing out activations.
- Encoder Lens: Passing intermediate encoder representations to the decoder to reveal the buildup of semantic meaning.
Experiments were conducted using standard datasets (LibriSpeech, CommonVoice) and specialized sets for noise (MUSAN), accents, and synthetic "trap" examples designed to test contextual bias.
The Semantic Evolution of the Encoder
A primary finding is that the ASR encoder is not merely an acoustic processor but a "semantic engine." As information flows through the layers, the representations transition from low-level acoustics to high-level semantic categories.
As shown in Figure 1, by layer 22, the encoder can distinguish between semantic categories (e.g., "Animals vs. Musical Instruments") with high accuracy. This suggests that the encoder builds a conceptual framework of the audio content before it even reaches the decoder.
Predicting Hallucinations and Errors
Hallucinations—where the model generates text unrelated to the audio—are a significant hurdle for ASR robustness. The researchers discovered that "quality-related signals" are embedded within the decoder’s residual stream. By probing the <eos> (end of sentence) token, they could determine if a transcription was a hallucination with remarkable precision.
Table 1 (Figure 6) demonstrates that at Layer 22, the test accuracy for hallucination detection reaches 93.4%. This internal "self-awareness" of error suggests that lightweight monitors could be developed to flag low-quality transcripts in real-time.
Localizing the "Repetition Head"
Repetition loops (e.g., repeating a phrase indefinitely) were found to be highly localized rather than a general system failure. In Whisper, a single attention head—Head 13 in Layer 18—was identified as the primary driver of these loops. Patching this specific head resolved 78.1% of repetition errors, demonstrating that complex failure modes can often be traced to specific, addressable components.
Conclusion
This work demonstrates the power of extending mechanistic interpretability to the speech domain. By identifying the semantic nature of encoders, the predictability of hallucinations, and the specific heads causing repetitions, we move closer to transparent and robust ASR systems. Future work will focus on dynamic interventions during inference and utilizing these insights for model compression and real-time quality monitoring.
Summary updated