[论文解读] Learning Intrinsic Sparse Structures within Long Short-Term Memory
论文提出 Intrinsic Sparse Structures (ISS) 通过学习分组稀疏来压缩 LSTM 和 RHN 模型,在保持原始架构完整性的同时减少基本 LSTM 组件,实现在语言建模和问答任务中几乎不损失混乱度的情况下获得显著的加速。
Model compression is significant for the wide adoption of Recurrent Neural Networks (RNNs) in both user devices possessing limited resources and business clusters requiring quick responses to large-scale service requests. This work aims to learn structurally-sparse Long Short-Term Memory (LSTM) by reducing the sizes of basic structures within LSTM units, including input updates, gates, hidden states, cell states and outputs. Independently reducing the sizes of basic structures can result in inconsistent dimensions among them, and consequently, end up with invalid LSTM units. To overcome the problem, we propose Intrinsic Sparse Structures (ISS) in LSTMs. Removing a component of ISS will simultaneously decrease the sizes of all basic structures by one and thereby always maintain the dimension consistency. By learning ISS within LSTM units, the obtained LSTMs remain regular while having much smaller basic structures. Based on group Lasso regularization, our method achieves 10.59x speedup without losing any perplexity of a language modeling of Penn TreeBank dataset. It is also successfully evaluated through a compact model with only 2.69M weights for machine Question Answering of SQuAD dataset. Our approach is successfully extended to non- LSTM RNNs, like Recurrent Highway Networks (RHNs). Our source code is publicly available at https://github.com/wenwei202/iss-rnns
研究动机与目标
- 为 RNN 的模型压缩提供动机并在设备与服务上实现高效推断。
- 定义 Intrinsic Sparse Structures (ISS) 以在降低基本 LSTM 组件的同时保持维度一致性。
- 开发基于组套索的学习方法,在训练或微调期间移除 ISS 权重组。
- 在语言建模(Penn TreeBank)和机器阅读理解(SQuAD)任务中展示 LSTM 和 RHN 的有效性。
- 展示 ISS 对 RHN 及其他 RNN 变体的可扩展性。
提出的方法
- 将八个 LSTM 权重矩阵组织成与每个 ISS 组件的左右连接对应的 ISS 权重组。
- 通过在损失中增加一个组套索正则化项 R(w)=sum over ISS groups of ||w_k^(n)||_2 以促进组稀疏性(方程 2)。
- 使用包含与 w_k/||w_k||_2 成比例的正则化梯度项的 SGD 更新 ISS 权重(方程 3)。
- 通过对每个小批量内的较小权重进行阈值化处理,使稀疏性稳定在较小阈值 tau 之下(方程 4)。
- 允许 ISS 剪枝跨连接层的整个组件(行/列),以保持维度一致性并避免无效的 LSTM 结构。
- 从头开始或在微调阶段扩展 ISS 学习;应用于 RHN 和基于 BiDAF 的问答模型。
实验结果
研究问题
- RQ1是否可以在 LSTM 中学习内在稀疏结构,以在不破坏维度一致性的前提下减小输入更新、门、隐状态、细胞状态和输出的大小?
- RQ2基于组套索的 ISS 稀疏学习是否在保持或最小化影响任务性能的同时带来有意义的加速和内存占用降低?
- RQ3ISS 在 RHN 以及像 BiDAF 这样的前沿问答模型中的压缩与准确性表现如何?
- RQ4稀疏度水平、困惑度/EM-F1 分数和推断速度在不同语言和任务中的权衡如何?
主要发现
- 在 Penn TreeBank 上,学习 ISS 将 LSTM 的尺寸从第一层的 1500 和第二层的 315 分别缩小到 373 和 315,同时保持困惑度并实现 10.59x 的推断加速。
- 一个紧凑的 25.2M 参数设计(相较于基线 66.0M)也保持了性能并实现 7.10x 的加速,且直接设计的更小 LSTM 在性能上不如从较大模型学习的 ISS。
- RHN 实验显示宽度从 830 缩减到 517(11.1M 参数)而困惑度无损,缩减到 403(7.6M)时表现仍具竞争力;更大程度的缩减导致困惑度上升(最高至 74.5/71.2)。
- 在基于 SQuAD 的 BiDAF 中,ISS 稀疏性减少了多个 LSTM 模块,同时在可容忍的损失范围内保持 EM/F1;从头训练并带有 ISS 能实现显著压缩(如 2.69M 基线降至不同模块的 0.88–2.29M)并获得加速。
- ISS 学习可以比从零开始训练的 naive 小型设计更具优势,表明在 RNN 中结构感知的稀疏性具有收益。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。