Locality Matters: A Locality-Biased Linear Attention for Automatic Speech Recognition
Introduction
The Conformer architecture has become a cornerstone of modern speech recognition. However, its reliance on standard self-attention introduces a "quadratic bottleneck" ($O(T^2)$), where computational and memory requirements grow exponentially with input sequence length. While various "Linear Attention" methods have been proposed to achieve $O(T)$ complexity, they frequently underperform in speech recognition. This performance gap stems from the continuous nature of speech: acoustic features are highly correlated with their immediate neighbors. Standard linear attention often fails to capture this essential locality, leading to increased Word Error Rates (WER).
Proposed Method: Locality-Biased Linear Attention (LBLA)
To address these challenges, researchers have developed Locality-Biased Linear Attention (LBLA). This module serves as a drop-in replacement for standard self-attention within the Conformer block, solving both complexity and locality issues simultaneously through two primary innovations:
- Kernel-Based Linearization: Instead of the traditional Softmax-based attention, LBLA utilizes a kernel function—specifically a Sigmoid function—to approximate the attention matrix. This mathematical shift allows for changing the order of matrix multiplication, effectively reducing complexity from quadratic to linear ($O(T)$).
- Locality-Biased Re-weighting: To restore the critical local context, the authors introduce a weighting matrix based on cosine distance. By leveraging Ptolemy’s theorem, this cosine function is decomposed into a sum of products, allowing the locality bias to be integrated into the linear attention formula without sacrificing $O(T)$ efficiency.
Experimental Results
The model was evaluated on the LibriSpeech corpus (960 hours), focusing on the test-clean (high-quality speech) and test-other (noisy/accented speech) benchmarks.
Key Insights
- Sigmoid is the Superior Kernel: Testing revealed that Sigmoid performs best because it projects tokens into a non-negative space while effectively handling "weak attention" (filtering out irrelevant noise), which is vital for mapping continuous audio to discrete text.
- Accuracy Gains: On the LibriSpeech
test-cleanset, the LBLA model (S2) achieved a Word Error Rate (WER) of 3.58%, outperforming the vanilla Conformer baseline (B0) of 3.71%. - Efficiency: The model showed a speedup of 6% to 22% depending on the length of the audio. The longer the audio sequence, the more the linear complexity of LBLA paid off compared to the quadratic baseline.
By resuming training with a halved learning rate (a technique called "F1"), the researchers pushed the WER down even further to 3.50% on test-clean and 9.43% on test-other.
Limitations and Future Work
While LBLA offers a scalable path forward for long-form ASR, it is sensitive to learning rate schedules and requires careful tuning to ensure training stability. Future work will explore custom CUDA kernels to unlock more dramatic GPU speedups and test the architecture's limits on extremely long-form audio, such as hour-long podcasts.
Summary updated