Latent Alignment and Variational Attention

Yuntian Deng, Yoon Kim, Justin Chiu, Demi Guo, Alexander M. Rush
7/10/2018
stat.MLcs.CLcs.LG

Official code: harvardnlp/var-attn (327 stars, Python, MIT, last commit 2026-11-11).

Abstract

Neural attention has become central to many state-of-the-art models in natural language processing and related domains. Attention networks are an easy-to-train and effective method for softly simulating alignment; however, the approach does not marginalize over latent alignments in a probabilistic sense.

Show full abstract

This property makes it difficult to compare attention to other alignment approaches, to compose it with probabilistic models, and to perform posterior inference conditioned on observed data. A related latent approach, hard attention, fixes these issues, but is generally harder to train and less accurate. This work considers variational attention networks, alternatives to soft and hard attention for learning latent variable alignment models, with tighter approximation bounds based on amortized variational inference. We further propose methods for reducing the variance of gradients to make these approaches computationally feasible. Experiments show that for machine translation and visual question answering, inefficient exact latent variable models outperform standard neural attention, but these gains go away when using hard attention based training. On the other hand, variational attention retains most of the performance gain but with training speed comparable to neural attention.

View on arXivView PDF

Code Implementations(1)

MIT

Latent Alignment and Variational Attention

32761Python, PerlJul 6, 20183 weeks agoMIT

Similar Papers

Cite this paper

@article{deng2018latent,
  title  = {Latent Alignment and Variational Attention},
  author = {Yuntian Deng and Yoon Kim and Justin Chiu and Demi Guo and Alexander M. Rush},
  year   = {2018},
  eprint = {1807.03756},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1807.03756}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1807.03756.svg)](https://codeofpaper.com/paper/1807.03756)

Discussion