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

神经语言模型中的逐字短时记忆特征研究

Characterizing Verbatim Short-Term Memory in Neural Language Models

Johns Hopkins University(约翰斯·霍普金斯大学);New York University(纽约大学)

Kristijan Armeni, Christopher Honey, Tal Linzen

AI总结:

该研究通过重复名词列表的 surprisal 下降实验,对比发现transformer具备类似工作记忆的逐字短时记忆能力,依赖注意力模式且随模型规模提升,而LSTM仅维持粗略语义主旨且记忆精度低。

摘要:

当语言模型被训练用于预测自然语言序列时,其每一时刻的预测都依赖于对先前上下文的表征。语言模型能检索到先前上下文的哪些类型的信息?我们测试了语言模型是否能够检索文本中之前出现过的确切词汇。在我们的实验范式中,语言模型(transformer模型和一个LSTM模型)处理包含重复名词列表的英文文本,即同一名词列表会在文本中出现两次。我们将检索操作定义为名词列表第二次出现时相较于第一次出现的 surprisal( surprisal,即 surprisal值,信息论中衡量事件意外程度的指标)下降幅度。研究发现,transformer模型能够检索到第一次列表中名词的身份和顺序。此外,当transformer模型在更大语料库上训练且模型深度更大时,其检索能力会显著提升。最后,它们索引先前词元的能力依赖于习得的注意力模式。相比之下,LSTM模型的检索精度更低,仅局限于列表开头的词元且仅在间隔文本较短时有效。LSTM的检索对名词顺序不敏感,且当列表语义连贯时检索效果会提升。我们得出结论:transformer实现了类似工作记忆系统的机制,能够在任意延迟下灵活检索单个词元表征;相反,LSTM维持的是先前词元的更粗略、衰减更快的语义主旨,且更偏向于最早出现的条目。

英文摘要:

When a language model is trained to predict natural language sequences, its prediction at each moment depends on a representation of prior context. What kind of information about the prior context can language models retrieve? We tested whether language models could retrieve the exact words that occurred previously in a text. In our paradigm, language models (transformers and an LSTM) processed English text in which a list of nouns occurred twice. We operationalized retrieval as the reduction in surprisal from the first to the second list. We found that the transformers retrieved both the identity and ordering of nouns from the first list. Further, the transformers' retrieval was markedly enhanced when they were trained on a larger corpus and with greater model depth. Lastly, their ability to index prior tokens was dependent on learned attention patterns. In contrast, the LSTM exhibited less precise retrieval, which was limited to list-initial tokens and to short intervening texts. The LSTM's retrieval was not sensitive to the order of nouns and it improved when the list was semantically coherent. We conclude that transformers implemented something akin to a working memory system that could flexibly retrieve individual token representations across arbitrary delays; conversely, the LSTM maintained a coarser and more rapidly-decaying semantic gist of prior tokens, weighted toward the earliest items.

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

↑