Skip to main content
QUICK REVIEW

[Paper Review] Variational Attention for Sequence-to-Sequence Models

Hareesh Bahuleyan, Lili Mou|arXiv (Cornell University)|Dec 21, 2017
Topic ModelingComputer Science27 references20 citations
TL;DR

This paper proposes a variational attention mechanism that models the attention vector as a Gaussian-distributed random variable, preventing the attention mechanism from bypassing the variational latent space in sequence-to-sequence models. By introducing probabilistic attention with learnable priors, the method increases generation diversity without sacrificing output quality, as demonstrated on question generation and dialog systems.

ABSTRACT

The variational encoder-decoder (VED) encodes source information as a set of random variables using a neural network, which in turn is decoded into target data using another neural network. In natural language processing, sequence-to-sequence (Seq2Seq) models typically serve as encoder-decoder networks. When combined with a traditional (deterministic) attention mechanism, the variational latent space may be bypassed by the attention model, and thus becomes ineffective. In this paper, we propose a variational attention mechanism for VED, where the attention vector is also modeled as Gaussian distributed random variables. Results on two experiments show that, without loss of quality, our proposed method alleviates the bypassing phenomenon as it increases the diversity of generated sentences.

Motivation & Objective

  • To address the 'bypassing' phenomenon in variational encoder-decoder (VED) models, where deterministic attention renders the variational latent space ineffective.
  • To improve the diversity of generated sequences in VED-based text generation tasks by integrating probabilistic modeling into the attention mechanism.
  • To develop a general-purpose framework that enhances VEDs without compromising generation quality.

Proposed method

  • Model the attention vector as a random variable with a Gaussian distribution, replacing the deterministic attention vector in standard Seq2Seq models.
  • Introduce two plausible priors for the attention vector: a standard normal distribution and a prior whose mean is the average of the encoder's hidden states.
  • Train the model end-to-end using a variational lower bound objective, optimizing both reconstruction loss and KL divergence between posterior and prior distributions.
  • Use Monte Carlo sampling to approximate expectations during training, enabling backpropagation through stochastic attention vectors.
  • Apply the framework to sequence-to-sequence tasks such as question generation and dialog response generation.

Experimental results

Research questions

  • RQ1Does deterministic attention in VED models lead to the bypassing of the variational latent space, reducing generation diversity?
  • RQ2Can modeling the attention vector as a random variable with a probabilistic prior improve diversity in generated sequences?
  • RQ3How does the proposed variational attention mechanism compare to deterministic attention in terms of both diversity and generation quality?

Key findings

  • The proposed variational attention mechanism significantly increases sentence diversity, as measured by Dist-1 and Dist-2, compared to deterministic attention in both question generation and dialog systems.
  • In question generation, VED+VAttn-\bar{h} achieved a Dist-1 of 0.324 and Dist-2 of 0.467 under sampling, outperforming VED+DAttn (Dist-1: 0.311, Dist-2: 0.450).
  • On the Cornell Movie-Dialogs Corpus, VED+VAttn-\bar{h} achieved a BLEU-2 score of 1.79 under sampling, outperforming VED+DAttn (1.68), indicating improved generation quality.
  • The model maintains high-quality outputs, with BLEU-2 scores close to those of deterministic models, showing no degradation in quality despite increased diversity.
  • The ablation study confirms that the choice of prior (e.g., zero mean or average of hidden states) affects performance, with the latter showing better results.

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.