Skip to main content
QUICK REVIEW

[Paper Review] Attention Forcing for Sequence-to-sequence Model Training

Qingyun Dou, Yiting Lu|arXiv (Cornell University)|Sep 26, 2019
Natural Language Processing TechniquesComputer Science23 references4 citations
TL;DR

This paper proposes attention forcing, a training method for sequence-to-sequence models that improves training stability and inference robustness by combining generated output history with reference attention. It enables models to recover from mistakes during inference and achieves significant gains in speech synthesis and consistent improvements in machine translation without requiring heuristic schedules or auxiliary classifiers.

ABSTRACT

Auto-regressive sequence-to-sequence models with attention mechanism have achieved state-of-the-art performance in many tasks such as machine translation and speech synthesis. These models can be difficult to train. The standard approach, teacher forcing, guides a model with reference output history during training. The problem is that the model is unlikely to recover from its mistakes during inference, where the reference output is replaced by generated output. Several approaches deal with this problem, largely by guiding the model with generated output history. To make training stable, these approaches often require a heuristic schedule or an auxiliary classifier. This paper introduces attention forcing, which guides the model with generated output history and reference attention. This approach can train the model to recover from its mistakes, in a stable fashion, without the need for a schedule or a classifier. In addition, it allows the model to generate output sequences aligned with the references, which can be important for cascaded systems like many speech synthesis systems. Experiments on speech synthesis show that attention forcing yields significant performance gain. Experiments on machine translation show that for tasks where various re-orderings of the output are valid, guiding the model with generated output history is challenging, while guiding the model with reference attention is beneficial.

Motivation & Objective

  • To address the instability and poor generalization of auto-regressive seq2seq models during inference, where teacher forcing during training fails to prepare models for error propagation.
  • To overcome limitations of scheduled sampling and professor forcing, which require heuristic schedules or discriminators for stable training.
  • To enable models to learn alignment between input and output sequences more robustly, particularly beneficial for cascaded systems like text-to-speech.
  • To investigate whether guiding training with reference attention instead of generated output improves performance in tasks with multiple valid output re-orderings, such as machine translation.

Proposed method

  • Attention forcing trains the model using a hybrid strategy: the decoder hidden state is updated using generated output tokens (like free-running mode), while the attention mechanism is guided by reference attention weights computed from the ground-truth output.
  • The method decouples output generation from alignment learning, allowing the model to learn attention alignment independently and stably.
  • The attention mechanism computes context vectors using reference alignment weights $\bm{\alpha}_t$ from teacher forcing, while the decoder state $\hat{\bm{s}}_t$ is updated using the previously generated token $\bm{y}_{t-1}$.
  • The model is trained with both negative log-likelihood (NLL) loss and an additional attention loss that encourages predicted attention to match reference attention.
  • In cascaded TTS systems, the model is first pre-trained in teacher forcing mode, then fine-tuned in attention forcing mode using reference attention, enabling downstream models to correct upstream errors.
  • For NMT, a modified attention forcing mode is used where both reference output and reference attention are used during training to avoid degradation from generated output misalignment.

Experimental results

Research questions

  • RQ1Can attention forcing stabilize training of seq2seq models without requiring heuristic schedules or auxiliary classifiers?
  • RQ2Does combining generated output history with reference attention improve the model's ability to recover from prediction errors during inference?
  • RQ3Can attention forcing improve performance in cascaded systems like text-to-speech by generating attention-aligned outputs?
  • RQ4Is guiding the model with reference attention more effective than guiding with generated output in tasks with multiple valid output re-orderings, such as machine translation?
  • RQ5Does attention forcing regularize the attention mechanism and improve alignment learning in low-resource NMT settings?

Key findings

  • In text-to-speech, attention forcing significantly improved speech quality, with human listeners preferring attention-forced outputs in 72% of pairwise comparisons.
  • The attention-forced TTS system produced more natural and expressive utterances compared to teacher forcing, as confirmed by a subjective listening test with 30 annotators.
  • In machine translation (IWSLT 2015 English-to-Vietnamese), attention forcing with reference attention yielded a +0.35 BLEU score improvement over teacher forcing, with 9 out of 10 models showing performance gains.
  • The consistent BLEU improvement demonstrates that reference attention guidance is beneficial and avoids the degradation caused by generated output history in re-ordering-sensitive tasks.
  • The method achieved stable training without requiring a learning schedule or a discriminator, unlike scheduled sampling or professor forcing.
  • Attention forcing enables downstream models in cascaded systems to leverage attention-aligned outputs, improving error correction and system robustness.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.