Skip to main content
QUICK REVIEW

[论文解读] Tying Word Vectors and Word Classifiers: A Loss Framework for Language Modeling

Hakan Inan, Khashayar Khosravi|arXiv (Cornell University)|Nov 4, 2016
Topic Modeling参考文献 17被引用 173
一句话总结

本文提出一种语言模型的损失框架,在交叉熵上加入基于词嵌入相似性的 KL 散度项,并表明重复使用输入嵌入作为输出投影可显著提升性能并减少参数。

ABSTRACT

Recurrent neural networks have been very successful at predicting sequences of words in tasks such as language modeling. However, all such models are based on the conventional classification framework, where the model is trained against one-hot targets, and each word is represented both as an input and as an output in isolation. This causes inefficiencies in learning both in terms of utilizing all of the information and in terms of the number of parameters needed to train. We introduce a novel theoretical framework that facilitates better learning in language modeling, and show that our framework leads to tying together the input embedding and the output projection matrices, greatly reducing the number of trainable variables. Our framework leads to state of the art performance on the Penn Treebank with a variety of network models.

研究动机与目标

  • 识别标准的逐字目标语言模型框架中输入和输出处于同一空间但学习过程相互独立所带来的低效。
  • 引入基于 KL 散度的对交叉熵损失的增强,将词嵌入信息用于目标分布。
  • 在理论上证明并在实验中验证重复使用输入嵌入矩阵作为输出投影以减少参数数量,同时保持性能。
  • 在 Penn Treebank 和 Wikitext-2 上对比常规的 RNNLM,在不同网络规模下展示改进。

提出的方法

  • 定义增强损失 J^tot = J + alpha J^aug,其中 J 为交叉熵,J^aug 为 KL(ỹ || ŷ),温度 tau。
  • 由网络的对数几率构造 ŷ,由嵌入相关的相似性构造 ỹ:ŷ 使用 softmax(Wh_t / tau),ỹ 使用 softmax(L^T u_t / tau),其中 u_t = L y*_t。
  • 在高温度极限下理论分析得到 W h_t ≈ L^T u_t,意味着输出投影与嵌入矩阵对齐。
  • 提出一个实际方案:(i) 通过使 W ≈ L^T 来重复使用嵌入矩阵(并且 b = 0),或 (ii) 结合增强损失以改进学习。
  • 在两个数据集(PTB、Wikitext-2)和三种模型尺度(小/中/大 LSTM)下进行有变分 dropout 的实验。

实验结果

研究问题

  • RQ1增强交叉熵并结合基于嵌入的 KL 损失是否能在标准基准上提升语言模型性能?
  • RQ2共享输入嵌入与输出投影(W ≈ L^T)是否能减少参数并维持或提升困惑度?
  • RQ3它们(AL、RE 及二者结合 REAL)在数据集规模和模型容量上的比较如何?
  • RQ4在 PTB 和 Wikitext-2 数据集上,改进的学习机制是否具有一致性?

主要发现

  • 增强损失与嵌入重用在 PTB 和 Wikitext-2 上均优于基线 VD-LSTM。
  • 使用增强损失(AL)在较小的网络中带来显著提升,在 PTB 上的提升幅度大于较大的 Wikitext-2 数据集。
  • 嵌入重用(RE)对较大网络尤为有效,并在很大程度上解释了参数减少。
  • 组合方式(REAL)在整体困惑度上表现最佳,通常超越 PTB 上的先前最先进结果。
  • 实证结果显示提出的框架降低了 L^T 与 W 之间的子空间距离,支持嵌入重用的理论依据。
  • 定性分析表明,在使用所提框架时,目标词概率更加准确,且如 </unk> 这类不必要的预测明显减少。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。