Von Mises-Fisher Loss for Training Sequence to Sequence Models with Continuous Outputs

Sachin Kumar, Yulia Tsvetkov
12/10/2018
cs.CLcs.LGstat.ML

Official code: Sachin19/seq2seq-con (77 stars, Python, last commit 2021-06-12).

Abstract

The Softmax function is used in the final layer of nearly all existing sequence-to-sequence models for language generation. However, it is usually the slowest layer to compute which limits the vocabulary size to a subset of most frequent types; and it has a large memory footprint.

Show full abstract

We propose a general technique for replacing the softmax layer with a continuous embedding layer. Our primary innovations are a novel probabilistic loss, and a training and inference procedure in which we generate a probability distribution over pre-trained word embeddings, instead of a multinomial distribution over the vocabulary obtained via softmax. We evaluate this new class of sequence-to-sequence models with continuous outputs on the task of neural machine translation. We show that our models obtain upto 2.5x speed-up in training time while performing on par with the state-of-the-art models in terms of translation quality. These models are capable of handling very large vocabularies without compromising on translation quality. They also produce more meaningful errors than in the softmax-based models, as these errors typically lie in a subspace of the vector space of the reference translations.

View on arXivView PDF

Code Implementations(1)

Implementation of "Von Mises-Fisher Loss for Training Sequence to Sequence Models with Continuous Outputs"

7717Python, PerlAug 9, 20185 years agoNOASSERTION

Similar Papers

Cite this paper

@article{kumar2018misesfisher,
  title  = {Von Mises-Fisher Loss for Training Sequence to Sequence Models with Continuous Outputs},
  author = {Sachin Kumar and Yulia Tsvetkov},
  year   = {2018},
  eprint = {1812.04616},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1812.04616}
}

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/1812.04616.svg)](https://codeofpaper.com/paper/1812.04616)

Discussion