通过注意力调控实现精准去记忆,既删知识又防幻觉。
Wisdom is Knowing What not to Say: Hallucination-Free LLMs Unlearning via Attention Shifting
- 用注意力抑制关键信息,不破坏语言结构。
- 在ToFU上准确率提升15%,TDEC上提升10%。
- 适合需要可靠回答的高风险应用如医疗、法律。
算力增长与人工智能决策需求推动大语言模型(LLMs)广泛应用。但模型对敏感数据的保留引发机器去记忆研究热潮。现有方法面临两难:激进去记忆损害模型性能,保守策略则易产生幻觉,严重制约其在知识密集型场景的可靠性。为此,我们提出注意力转移(AS)框架,实现选择性去记忆。该框架基于两个设计目标:(1)上下文保持的抑制,减弱对事实性词元的关注而不扰动语言结构;(2)抗幻觉响应生成,避免查询已删除内容时产生虚构输出。AS通过两项注意力级干预实现:重要性感知抑制用于削弱对删除数据集的记忆依赖;注意力引导保留增强则强化对保留数据集中语义核心词元的关注,缓解意外退化。二者联合优化于双损失目标下,形成软边界,在表示叠加中定位去记忆范围,同时保护无关知识。实验表明,相比现有最先进方法,AS在ToFU基准上准确率最高提升15%,TDEC上提升10%,同时保持强抗幻觉能力。整体平衡去记忆效果、泛化能力与响应可靠性更优。
原文摘要 · Abstract (English)
The increase in computing power and the necessity of AI-assisted decision-making boost the growing application of large language models (LLMs). Along with this, the potential retention of sensitive data of LLMs has spurred increasing research into machine unlearning. However, existing unlearning approaches face a critical dilemma: Aggressive unlearning compromises model utility, while conservative strategies preserve utility but risk hallucinated responses. This significantly limits LLMs' reliability in knowledge-intensive applications. To address this, we introduce a novel Attention-Shifting (AS) framework for selective unlearning. AS is driven by two design objectives: (1) context-preserving suppression that attenuates attention to fact-bearing tokens without disrupting LLMs' linguistic structure; and (2) hallucination-resistant response shaping that discourages fabricated completions when queried about unlearning content. AS realizes these objectives through two attention-level interventions, which are importance-aware suppression applied to the unlearning set to reduce reliance on memorized knowledge and attention-guided retention enhancement that reinforces attention toward semantically essential tokens in the retained dataset to mitigate unintended degradation. These two components are jointly optimized via a dual-loss objective, which forms a soft boundary that localizes unlearning while preserving unrelated knowledge under representation superposition. Experimental results show that AS improves performance preservation over the state-of-the-art unlearning methods, achieving up to 15% higher accuracy on the ToFU benchmark and 10% on the TDEC benchmark, while maintaining competitive hallucination-free unlearning effectiveness. Compared to existing methods, AS demonstrates a superior balance between unlearning effectiveness, generalization, and response reliability.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。