Self-Attentional Acoustic Models

Matthias Sperber, Jan Niehues, Graham Neubig, Sebastian Stüker, Alex Waibel

Introduction

Automatic Speech Recognition (ASR) has traditionally relied on Recurrent Neural Networks (RNNs), particularly LSTMs, due to their ability to model sequential data. However, LSTMs suffer from slow training speeds due to sequential processing and difficulties in capturing extremely long-range dependencies. While the self-attention mechanism of the Transformer architecture offers a potential solution through parallelization and global context, its application to acoustic modeling is hindered by the extreme length of acoustic sequences, the lack of inherent positional structure in speech frames, and the fundamental locality of speech signals.

Methodology

To address these challenges, the authors propose three primary modifications to the standard self-attention framework:

  1. Sequence Downsampling: Input tensors are reshaped to reduce sequence length by a factor $a$ while increasing feature dimensionality. This reduces memory consumption quadratically ($a^2$), making long acoustic sequences manageable.
  2. Hybrid Architectures: Recognizing that standard trigonometric positional encodings are insufficient for speech, the authors developed hybrid models. The Interleaved Hybrid model integrates LSTMs within the Transformer block to provide the necessary inductive bias for temporal ordering.
  3. Gaussian Attention Biasing: A learnable Gaussian bias is added to attention scores. This "soft" mask allows individual attention heads to dynamically adjust their focus between local context and global dependencies.
Architectural comparison of (a) pyramidal LSTM, (b) LSTM/NiN, and (c) self-attention blocks.

Experimental Setup

The proposed models were evaluated using the TEDLIUM corpus, which contains approximately 200 hours of TED talk recordings. The input features consisted of 40-dimensional Mel filterbanks.

Analysis and Discussion

The study revealed several critical insights:

  • The Importance of Recurrent Bias: Standard positional encodings failed to capture the temporal structure of speech. The inclusion of RNN components was necessary for the model to understand the sequence order effectively.
  • Locality vs. Globality: Through Gaussian biasing, the model learned a hierarchy of attention. Lower layers tended to focus on local acoustic features, while higher layers captured broader context.
  • Interpretability: Attention heads exhibited linguistic specialization, learning to focus on specific phonetic categories such as sibilants or silence, offering greater transparency than traditional "black box" LSTMs.

Results

The self-attentional models demonstrated significant improvements in training efficiency. The "Stacked Hybrid" model achieved a training throughput of 2.4k characters/second, a 2.2x speedup over the pyramidal LSTM baseline. While the LSTM/NiN baseline maintained a slight lead in Word Error Rate (WER), the interleaved hybrid model achieved a competitive 15.29% dev WER. Furthermore, the introduction of learnable Gaussian masks provided an absolute WER improvement of up to 1.59%.

Performance comparison of baseline and hybrid models on the TEDLIUM corpus.

Conclusion

Self-attentional acoustic models offer a promising path toward faster ASR training without sacrificing significant accuracy. While an accuracy gap remains compared to the most optimized LSTM architectures, the gains in speed and interpretability are substantial. Future work will focus on closing the performance gap and exploring these mechanisms for character-level modeling and transfer learning.

Summary updated

BibTeX
@misc{sperber2018self,
  author = {Matthias Sperber and Jan Niehues and Graham Neubig and Sebastian Stüker and Alex Waibel},
  title = {{Self-Attentional Acoustic Models}},
  year = {2018},
  eprint = {1803.09519},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1803.09519},
}
Figure