具有连续输出的训练序列对序列模型的Von Mises-Fisher损失
Von Mises-Fisher Loss for Training Sequence to Sequence Models with Continuous Outputs
摘要:
Softmax函数用于几乎所有现有序列到序列模型的最后一层,用于语言生成。然而,它通常是计算速度最慢的一层,这将词汇表大小限制为最常见类型的子集;并且它具有很大的内存占用。我们提出了一种通用的技术,用连续的嵌入层代替softmax层。我们的主要创新是一种新的概率损失,以及一种训练和推理过程,在该过程中,我们在预训练的词嵌入上生成概率分布,而不是通过softmax获得的词汇表上的多项分布。我们评估这类新的序列到序列模型的神经机器翻译任务上的连续输出。我们表明,我们的模型在训练时间上获得了高达2.5倍的速度提升,同时在翻译质量方面与最先进的模型不相上下。这些模型能够处理非常大的词汇量,而不会影响翻译质量。它们还产生比基于softmax的模型更有意义的错误,因为这些错误通常位于参考翻译的向量空间的子空间中。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。