arXiv:2504.14496cs.CL2025-04被引 1

揭示大模型知识回忆的内在函数结构,提升新知识记忆能力

Functional Abstraction of Knowledge Recall in Large Language Models

  • 将知识回忆抽象为输入、函数体、返回值的函数执行过程
  • 通过激活向量修补实现知识编辑,显著提升短期记忆保留
  • 适合研究模型内部机制与知识编辑的开发者

预训练的Transformer大语言模型具备强大的知识回忆能力。本文从功能抽象角度研究其知识回忆机制,提出在知识回忆过程中,模型的隐藏激活空间隐含一个函数执行流程:特定激活向量对应功能组件(输入参数、函数体、返回值)。关系相关标记的激活向量构成从主体到客体的映射函数,主体相关激活作为输入,客体相关激活作为输出。为验证,设计基于修补的知识评分算法,识别知识感知的激活向量作为独立功能组件;并开展反向知识测试,检验各组件对知识回忆结果的独立影响。由此改进了基于激活修补的上下文知识编辑方法:通过重写上下文中的不连贯激活,增强了新知识提示下的短期记忆保留能力。

原文摘要 · Abstract (English)

Pre-trained transformer large language models (LLMs) demonstrate strong knowledge recall capabilities. This paper investigates the knowledge recall mechanism in LLMs by abstracting it into a functional structure. We propose that during knowledge recall, the model's hidden activation space implicitly entails a function execution process where specific activation vectors align with functional components (Input argument, Function body, and Return values). Specifically, activation vectors of relation-related tokens define a mapping function from subjects to objects, with subject-related token activations serving as input arguments and object-related token activations as return values. For experimental verification, we first design a patching-based knowledge-scoring algorithm to identify knowledge-aware activation vectors as independent functional components. Then, we conduct counter-knowledge testing to examine the independent functional effects of each component on knowledge recall outcomes. From this functional perspective, we improve the contextual knowledge editing approach augmented by activation patching. By rewriting incoherent activations in context, we enable improved short-term memory retention for new knowledge prompting.

知识回忆函数抽象激活修补记忆增强

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。