arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2601.20282cs.LG
收藏

Transformer中的记忆检索:来自编码特异性原理的见解

Memory Retrieval in Transformers: Insights from The Encoding Specificity Principle

University of Sydney(悉尼大学);Data61 CSIRO(Data61澳大利亚联邦科学与工业研究组织)

Viet Hung Dinh, Ming Ding, Youyang Qu, Kanchana Thilakarathna

AI总结:

本研究基于编码特异性原理,探讨了Transformer中注意力层的记忆机制,并通过实验验证了关键词作为提示的假设,为隐私保护机器无学习提供了新思路。

摘要:

尽管可解释人工智能(XAI)在大型语言模型(LLMs)中的应用仍是一个充满未解问题的新兴领域,但日益增加的监管压力已推动了其在确保透明度、问责制和隐私保护机器无学习中的作用。尽管最近在XAI方面取得了一些进展,但变压器基于LLMs中的注意力层的具体作用仍缺乏深入研究。本研究调查了注意力层所体现的记忆机制,借鉴了心理学和计算心理语言学中的先前研究,将Transformer注意力与人类记忆中的基于提示的检索联系起来。在这种观点下,查询编码检索上下文,键索引候选记忆痕迹,注意力权重量化提示痕迹相似性,值承载编码内容,共同使上下文表示得以构建,从而在检索之前和促进记忆检索。基于编码特异性原理,我们假设检索初始阶段使用的提示以关键词形式体现。我们为这一关键词作为提示的假设提供了收敛的证据。此外,我们隔离了注意力层中某些神经元,其激活选择性地编码并促进上下文定义关键词的检索。因此,这些关键词可以从识别的神经元中提取,并进一步贡献于下游应用,如无学习。

英文摘要:

While explainable artificial intelligence (XAI) for large language models (LLMs) remains an evolving field with many unresolved questions, increasing regulatory pressures have spurred interest in its role in ensuring transparency, accountability, and privacy-preserving machine unlearning. Despite recent advances in XAI have provided some insights, the specific role of attention layers in transformer based LLMs remains underexplored. This study investigates the memory mechanisms instantiated by attention layers, drawing on prior research in psychology and computational psycholinguistics that links Transformer attention to cue based retrieval in human memory. In this view, queries encode the retrieval context, keys index candidate memory traces, attention weights quantify cue trace similarity, and values carry the encoded content, jointly enabling the construction of a context representation that precedes and facilitates memory retrieval. Guided by the Encoding Specificity Principle, we hypothesize that the cues used in the initial stage of retrieval are instantiated as keywords. We provide converging evidence for this keywords-as-cues hypothesis. In addition, we isolate neurons within attention layers whose activations selectively encode and facilitate the retrieval of context-defining keywords. Consequently, these keywords can be extracted from identified neurons and further contribute to downstream applications such as unlearning.

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

↑