[Paper Review] Online and Linear-Time Attention by Enforcing Monotonic Alignments
The paper proposes a monotonic, hard attention mechanism that enables online, linear-time decoding for sequence-to-sequence models, with training in expectation, achieving competitive results across summarization, translation, and online speech recognition.
Recurrent neural network models with an attention mechanism have proven to be extremely effective on a wide variety of sequence-to-sequence problems. However, the fact that soft attention mechanisms perform a pass over the entire input sequence when producing each element in the output sequence precludes their use in online settings and results in a quadratic time complexity. Based on the insight that the alignment between input and output sequence elements is monotonic in many problems of interest, we propose an end-to-end differentiable method for learning monotonic alignments which, at test time, enables computing attention online and in linear time. We validate our approach on sentence summarization, machine translation, and online speech recognition problems and achieve results competitive with existing sequence-to-sequence models.
Motivation & Objective
- Motivate and develop an attention mechanism that enables online and linear-time decoding by enforcing monotonic input–output alignments.
- Formulate a differentiable training approach that optimizes the expected output of a monotonic attention process while permitting online decoding at test time.
- Evaluate the method across sentence summarization, machine translation, and online speech recognition to assess performance and efficiency trade-offs.
- Compare against soft attention baselines and other online approaches to demonstrate competitive accuracy with improved decoding speed.
Proposed method
- Reframe soft attention as the expected output of a stochastic process and introduce a hard monotonic attention process that scans memory left-to-right and stops when emitting an output, enabling online and linear-time decoding.
- Derive a differentiable training procedure by computing the expected context vector via a recurrence (alpha) over memory positions, enabling backpropagation despite the non-differentiable sampling in the test-time process.
- Modify the energy function to include a learned offset r and apply weight normalization to stabilize training, and introduce Gaussian noise before the sigmoid to encourage discreteness in p_{i,j} for training-time/test-time alignment consistency.
- Provide an alternative to normalization by sum-to-one over all memory positions to preserve online decoding behavior and compatibility with the monotonic decoding scheme.
Experimental results
Research questions
- RQ1Can monotonic, hard alignments be learned end-to-end for sequence-to-sequence tasks while allowing online decoding?
- RQ2What are the training-time implications of using a monotonic attention mechanism, and how does training via the expected output compare to test-time hard decoding in terms of performance?
- RQ3Do monotonic-attention models achieve competitive results on tasks beyond strictly monotonic domains (e.g., translation with local reorderings, sentence summarization) while offering linear-time decoding?
- RQ4How do modifications to the energy function and regularization strategies affect stability and discreteness of the learned alignments?
Key findings
- Hard monotonic attention achieves online, linear-time decoding by left-to-right processing of memory and stopping when emitting, reducing complexity to O(max(T,U)).
- Training via the expected value of the monotonic attention offers competitive performance with soft attention while enabling online decoding at test time.
- On TIMIT, hard monotonic attention yields a phone error rate of 20.4% (vs. 19.6% for CTC and 20.1% for offline soft monotonic); soft monotonic decodes slightly better at 20.1%.
- On WSJ speech recognition, hard monotonic attention reaches 17.4% WER (vs. 16.5% for soft monotonic and 16.0% for softmax attention offline).
- On sentence summarization (Gigaword), hard monotonic achieves ROUGE F1 scores of R1=37.14, R2=18.00, R-L=34.87, which is competitive but slightly below the strong baseline; soft monotonic performs slightly worse in these metrics.
- On English→Vietnamese translation, monotonic attention with online decoding remains competitive relative to the softmax baseline in perplexity and BLEU, demonstrating applicability beyond strictly monotonic domains.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.