arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2204.07341cs.CL
收藏

LaMemo:具有前瞻记忆的语言建模

LaMemo: Language Modeling with Look-Ahead Memory

Tsinghua University(清华大学);NetEase Inc.(网易公司);OPPO Mobile Telecommunications Corp., Ltd(OPPO移动通信有限公司)

Haozhe Ji, Rongsheng Zhang, Zhenyu Yang, Zhipeng Hu, Minlie Huang

摘要:

尽管具有完全连接的自我注意力的Transformers在建模长期依赖关系方面非常强大,但在语言建模中,它们很难扩展到具有数千个单词的长文本。解决方案之一是为模型配备递归记忆。然而,现有的方法直接重用隐藏状态从先前的段编码上下文在一个单向的方式。因此,这禁止存储器与提供用于令牌预测的最新信息的当前上下文动态地交互。为了解决这个问题,我们提出了前瞻记忆(LaMemo),它通过递增地关注右侧令牌来增强递归记忆,并使用旧的记忆状态进行插值以保持历史中的长期信息。LaMemo包含双向注意和分段递归,额外的计算开销仅与内存长度成线性比例。在广泛使用的语言建模基准上的实验表明,它优于配备不同类型内存的基线。

英文摘要:

Although Transformers with fully connected self-attentions are powerful to model long-term dependencies, they are struggling to scale to long texts with thousands of words in language modeling. One of the solutions is to equip the model with a recurrence memory. However, existing approaches directly reuse hidden states from the previous segment that encodes contexts in a uni-directional way. As a result, this prohibits the memory to dynamically interact with the current context that provides up-to-date information for token prediction. To remedy this issue, we propose Look-Ahead Memory (LaMemo) that enhances the recurrence memory by incrementally attending to the right-side tokens, and interpolating with the old memory states to maintain long-term information in the history. LaMemo embraces bi-directional attention and segment recurrence with an additional computation overhead only linearly proportional to the memory length. Experiments on widely used language modeling benchmarks demonstrate its superiority over the baselines equipped with different types of memory.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑