Skip to main content
QUICK REVIEW

[Paper Review] Von Mises-Fisher Loss for Training Sequence to Sequence Models with Continuous Outputs

Sachin Kumar, Yulia Tsvetkov|arXiv (Cornell University)|Dec 10, 2018
Natural Language Processing TechniquesComputer Science54 citations
TL;DR

The paper replaces softmax with a continuous embedding-based output and introduces a von Mises-Fisher loss to train seq2seq models, achieving faster training and competitive translation quality, especially with large vocabularies.

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. 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.

Motivation & Objective

  • Motivate reducing the computational bottleneck of softmax in seq2seq models due to large vocabularies.
  • Propose a continuous-output architecture that predicts embeddings instead of word probabilities.
  • Introduce a probabilistic loss based on the von Mises-Fisher distribution to train these models.
  • Evaluate translation quality and training efficiency on IWSLT and WMT datasets across multiple languages.
  • Analyze error modes and the impact of embedding quality on translation outcomes.

Proposed method

  • Represent each output word by a fixed-size embedding and predict a continuous vector at each decoding step.
  • Use nearest-neighbor search in embedding space to map predicted vectors to words during decoding.
  • Define a probabilistic loss based on the von Mises-Fisher distribution to maximize the likelihood of the correct word embedding.
  • Regularize the loss with terms controlling the output vector norm to stabilize training.
  • Experiment with different embeddings (word2vec, fastText) and loss variants (NLLvMF_reg1, NLLvMF_reg1+reg2, MaxMargin, L2, Cosine).
  • Tie the decoder input embeddings to pre-trained target embeddings to reduce parameters and improve convergence.

Experimental results

Research questions

  • RQ1Can a continuous embedding-based output layer replace softmax in seq2seq models without sacrificing translation quality?
  • RQ2Does a vMF-based loss provide a theoretically grounded alternative to regression losses for embedding outputs?
  • RQ3How does open-vocabulary decoding via embedding nearest neighbors compare with subword methods like BPE in MT tasks?
  • RQ4What is the impact of embedding quality and regularization on translation performance and rare word handling?
  • RQ5Can such a framework scale to large vocabularies and larger datasets while maintaining training efficiency?

Key findings

  • Continuous-output models can train up to 2.5x faster than softmax-based baselines.
  • Best-performing losses (MaxMargin and NLLvMF variants) achieve competitive BLEU scores, surpassing strong BPE baselines on some language pairs.
  • Using pre-trained fastText embeddings and tying decoder inputs to target embeddings reduces parameters and speeds convergence.
  • Models show improved translation of rare words and produce semantically related or synonym translations when exact word matches are not available.
  • Open-vocabulary decoding via embedding nearest neighbors enables handling large vocabularies without degrading quality or speed.

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.