Local Monotonic Attention Mechanism for End-to-End Speech Recognition

Andros Tjandra, Sakriani Sakti, Satoshi NakamuraarXiv 2017

Introduction

Standard global attention mechanisms in sequence-to-sequence models require computing weights over the entire input sequence for every output token. While effective for tasks like machine translation between languages with significantly different word orders, this approach presents several challenges for tasks like Automatic Speech Recognition (ASR) or Grapheme-to-Phoneme (G2P) conversion. Specifically, global attention is computationally expensive for long sequences, prone to misalignment by attending to irrelevant distant frames, and fails to leverage the inherent monotonic nature of speech-to-text tasks where input and output align in a mostly left-to-right fashion.

Methodology

The proposed Local Monotonic Attention mechanism addresses these issues by focusing on a moving local window. The process is structured around a "Prior-Likelihood-Posterior" framework:

  1. Center Prediction ($p_t$): The model predicts the center of the attention window by estimating a jump ($\Delta p_t$) from the previous center ($p_{t-1}$). Two methods were evaluated: a constrained approach using a sigmoid function and an unconstrained approach using an exponential function.
  2. Gaussian Prior ($a^N_t$): A Gaussian distribution centered at $p_t$ defines the prior belief of where relevant information resides.
  3. Alignment Scorer ($a^S_t$): Within a local window of size $\sigma$, standard alignment scores are calculated to identify fine-grained relevant features.
  4. Context Vector ($c_t$): The final attention distribution is the product of the Gaussian prior and the local alignment scores, ensuring both locality and precision.
Detailed diagram of the Local Monotonic Attention mechanism, illustrating the prediction of the center $p_t$ and the combination of Gaussian prior $a^N_t$ with local alignment $a^S_t$.

By restricting the attention field to a window of size $\sigma$, the decoding complexity is reduced from $O(T \times S)$ to $O(T \times \sigma)$, where $T$ is the output length and $S$ is the source length. This makes the computational cost independent of the total input length, a significant advantage for long-form speech processing.

Experimental Setup

The model was evaluated across three distinct tasks to test its versatility:

  • ASR: Using the TIMIT acoustic-phonetic corpus.
  • G2P: Using the CMUDict dataset for mapping English words to their pronunciations.
  • Machine Translation: Using the BTEC dataset for English-to-French and Indonesian-to-English. These pairs were selected due to their similar Subject-Verb-Object (SVO) structures, which are well-suited for monotonic attention.

Results and Discussion

The local monotonic mechanism consistently outperformed global attention baselines across all evaluated tasks.

Comparison of Phoneme Error Rate (PER) on the TIMIT dataset between Global Attention baselines and various configurations of the proposed Local Attention Model.

Key findings from the experiments include:

  • ASR Performance: On the TIMIT dataset, the proposed model achieved a Phoneme Error Rate (PER) of 20.9%, representing a 12.2% relative error reduction over the global attention baseline (23.8%).
  • Unconstrained vs. Constrained: The unconstrained position prediction (using exp) proved more robust and effective than the constrained version. The authors suggest that avoiding an extra hyperparameter ($C_{max}$) and allowing the model to jump as far as needed improves training stability.
  • Importance of the Scorer: Ablation studies confirmed that the local alignment scorer is essential; performance dropped significantly when relying solely on the Gaussian window without fine-grained local scoring.
  • Translation and G2P: The model achieved 51.2 BLEU on BTEC English-to-French (outperforming the 49.0 baseline) and reduced PER on CMUDict from 5.96% to 5.43%.

Conclusion

The Local Monotonic Attention mechanism provides a more efficient and accurate alternative to global attention for tasks with inherent left-to-right alignment. By forcing the model to focus on a moving local window, it incorporates a beneficial inductive bias for speech and related domains while significantly reducing computational overhead. Future research may explore dynamic window sizes to allow the model to adjust its focus based on the complexity of the input segment.

Summary updated

BibTeX
@misc{tjandra2017local,
  author = {Andros Tjandra and Sakriani Sakti and Satoshi Nakamura},
  title = {{Local Monotonic Attention Mechanism for End-to-End Speech Recognition}},
  year = {2017},
  eprint = {1705.08091},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1705.08091},
}
Figure