Output Vector Editing for Memorization Mitigation in Large Language Models
作者: Ahmad Dawar Hakimi, Kaiwei Lei, Isabelle Augenstein, Hinrich Schütze
分类: cs.CL
发布日期: 2026-06-17
💡 一句话要点
提出输出向量编辑以缓解大语言模型的记忆问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 记忆抑制 输出向量编辑 隐私保护 安全性增强 自然语言处理 神经网络
📋 核心要点
- 现有方法主要通过归零神经元激活来缓解记忆问题,但未能有效解决输出向量的影响。
- 提出输出向量编辑,通过约束优化方法最小化修改特定神经元的输出向量,引入干扰项。
- 在OLMo-7B模型上,成功抑制了高达87.9%的记忆序列,显示出显著的效果提升。
📝 摘要(中文)
大语言模型在训练数据中记忆并重现序列,带来了隐私、版权和安全风险。现有的神经元级缓解方法将编辑等同于将神经元激活归零,但激活仅控制神经元的参与,而输出向量则负责写入残差流并通过叠加编码多个特征。本文提出输出向量编辑,这是一种约束优化的权重编辑方法,定位负责记忆延续的小型多层感知器(MLP)神经元,并最小化修改其输出向量,以在词汇空间中引入干扰项,从而重定向其残差流贡献,同时保持激活不变。通过对四个模型进行评估,本文在OLMo-7B模型上挖掘了6831个记忆序列,实现了高达87.9%的抑制效果。
🔬 方法详解
问题定义:本文解决大语言模型在训练过程中记忆并重现训练数据序列的问题,现有方法通过归零神经元激活来进行缓解,但未能有效处理输出向量的影响,导致隐私和安全风险。
核心思路:论文提出了一种新的输出向量编辑方法,旨在通过约束优化最小化修改特定神经元的输出向量,从而引入干扰项,重定向其对残差流的贡献,而不改变激活状态。
技术框架:整体方法包括定位负责记忆延续的神经元、进行输出向量的优化编辑、以及评估编辑效果。主要模块包括神经元定位、输出向量编辑和效果评估。
关键创新:最重要的技术创新在于提出了输出向量编辑这一概念,与现有方法的本质区别在于不再仅仅依赖于激活的归零,而是通过优化输出向量来实现记忆抑制。
关键设计:在实验中,设置了四种编辑模式,从激进抑制到最小重定向,推荐的单模式配置在不发生灾难性局部失败的情况下达到了81.5%的抑制率。
🖼️ 关键图片
📊 实验亮点
实验结果显示,针对OLMo-7B模型,成功挖掘了6831个记忆序列,实现了高达87.9%的抑制效果。与仅进行神经元定位的零消融相比,输出向量编辑的效果提升幅度达到2.7倍,表明该方法的有效性。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理中的隐私保护、版权管理以及安全性增强。通过有效抑制模型的记忆能力,可以降低模型在生成文本时泄露敏感信息的风险,具有重要的实际价值和未来影响。
📄 摘要(原文)
Large language models memorize and reproduce sequences from their training data, creating privacy, copyright, and security risks. Existing neuron-level mitigation methods equate editing with zeroing out neuron activations, but the activation only controls whether a neuron engages; the output vector is what writes to the residual stream and, through superposition, encodes multiple features. We propose output vector editing, a constrained-optimization weight edit that locates a small set of MLP neurons responsible for a memorized continuation and minimally modifies their output vectors to introduce a distractor in vocabulary space, redirecting their residual-stream contributions while leaving activations unchanged. Evaluating on four models from 360M to 7B parameters (SmolLM-360M, OLMo-1B, OLMo-7B, Llama2-7B), we center on OLMo-7B (whose open weights and pretraining corpus enable systematic mining) and mine 6831 memorized sequences, achieving up to 87.9% suppression. The 2.7$\times$ gap over zero ablation on the same located neurons shows the suppression comes from the output-vector edit, not localization alone. Four edit modes span a spectrum from aggressive suppression to minimal redirection; in ensemble they cover 96.5% of memorized sequences, while our recommended single-mode configuration reaches 81.5% with no catastrophic locality failures. We further identify a mechanistic boundary at ${\sim}14%$ of sequences unreachable by MLP-only editing; while these failures are not attention-driven overall, ablating the top contributing attention heads recovers 60--64% of them, with stronger recovery on continuations that copy tokens from the prefix, positioning attention as a complementary fallback rather than a primary mechanism. Edit mode ordering and the success-locality trade-off transfer across all four models, with success rates scaling with model size rather than family.