[NLP论文阅读]LightRNN: Memory and Computation-Efficient Recurrent Neural Networks
来源:互联网 发布:淘宝退货运费险怎么退 编辑:程序博客网 时间:2024/06/05 08:20
原文链接:LightRNN: Memory and Computation-Efficient Recurrent Neural Networks
引言
RNN已经在多个自然语言处理任务中取得了最先进的表现,例如语言建模和机器翻译。然而,随着词表大小的变大,RNN模型会变得很大(可能会超出GPU设备的内存)并且RNN模型的训练会变得不高效。在本工作中,我们提出了一种解决这一问题的新方法。核心思想是使用一个2-Component(2C) shared embedding(二部共享嵌入)来进行词表示。我们词表中的每个单词都分配到一个表中,表格的每一行和一个行向量关联,每一列和一个列向量关联。那么一个单词可以根据自己在表格中的位置,由2个component表示,即一个行向量和一个列向量。同一行的所有单词共享一个行向量,同一列的所有单词共享一个列向量,因此表示一个有|V|个不同词汇的词表只需要2
LightRNN模型
LightRNN算法的一个关键技术创新就是2-Component(2C) shared embedding。
如下图所示:
我们把每一个单词都分配进一个单词表中,表格中的第i行对应的行向量为
LightRNN的具体结构如下:
有了2-Component(2C) shared embedding,我们可以通过将vanilla RNN(不知道怎么翻译好)模型的基本单元加倍的方法来构建LightRNN模型。使用n和m来表示行/列输入向量以及隐藏状态向量的维数。为了计算出
其中,f是非线性的激活函数,例如sigmoid函数。
模型的输入是从行向量矩阵
损失函数
语言模型的目标是最小化预测词的负对数似然函数,这就相当于优化目标概率分布和LightRNN模型的预测的交叉熵(cross-entropy)。
给定一个有T个单词的文本,负对数似然函数可以写成:
模型训练
训练主要分为三步:
1. 冷启动(cold start),随机初始化单词在表格中位置;
2. 固定单词在表格中位置,训练LightRNN的输入/输出embedding vectors。收敛条件可以是训练时间、语言模型的困惑度(perplexity)达到阈值等等。
3. 固定步骤2学习到的embedding vectors,通过调整单词在表格中的位置来最小化损失函数。接着重复步骤2。
在步骤3中调整单词位置以减小的损失函数的方法,文章中使用的是最小费用最大流算法(MCMF),对于该方法不是很了解,只读懂了文中对该方法举得例子:
上图b中,
实验结果
论文中展示一张训练好的词表,展示出来的结果很有意思(但感觉是经过人工挑选出比较好结果)
最后
文中提到了一些future work:
1. 将LightRNN应用到更大的语料库;
2. 包括词的表示不再局限于2-Component(2C) shared embedding,将要去研究k-Component shared embedding;
3. 将LightRNN应用到其他自然语言处理任务,例如机器翻译和问答。
文末提到,作者会在未来对代码进行开源,然而。。。
- [NLP论文阅读]LightRNN: Memory and Computation-Efficient Recurrent Neural Networks
- LightRNN 论文笔记:LightRNN: Memory and Computation-Efficient Recurrent Neural Networks
- 论文阅读:How to Construct Deep Recurrent Neural Networks
- [深度学习论文笔记][Recurrent Neural Networks] Visualizing and Understanding Recurrent Networks
- 论文笔记:Depth-Gated Recurrent Neural Networks
- 论文阅读:Memory Networks
- Recurrent Neural Networks Tutorial阅读笔记
- 阅读"voice conversion using deep bidirectional long short-term memory based recurrent neural networks"
- 论文阅读:A Critical Review of Recurrent Neural Networks for Sequence Learning
- [论文阅读]MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications
- lightRNN论文阅读笔记
- Attention and Augmented Recurrent Neural Networks
- 论文《Inside-Outside Net: Detecting Objects in Context with skip pooling and Recurrent Neural Networks》
- 论文阅读笔记:Recurrent recommender networks
- 【nlp论文阅读】Adversal Neural Machine Translation
- 【论文阅读笔记】CVPR2015-Long-term Recurrent Convolutional Networks for Visual Recognition and Description
- speech recognition with deep recurrent neural networks-论文笔记
- 论文《Recurrent Convolutional Neural Networks for Text Classification》总结
- 欢迎使用CSDN-markdown编辑器
- spring(六)---aspectj aop编程(注解配置)
- Linux学习篇第二章~unit4
- MyBatis动态SQL语句
- Html--框架中画中画的用法
- [NLP论文阅读]LightRNN: Memory and Computation-Efficient Recurrent Neural Networks
- 用ajax验证用户名是否可以注册 POST方式
- meteor的安装的问题及unable to verify the first certificate
- 前端开发-移动端(3)- 响应式布局
- BloomFilter在DataDomain中的应用
- tomcat常用配置
- VC编程中,判断野指针
- 中企故事汇:你的脸看起来没那么重要
- 大数据备忘命令