arXiv:2512.05648cs.LG2025-12被引 9

通过定向梯度掩码,让大模型安全移除特定知识且抗误标干扰。

Beyond Data Filtering: Knowledge Localization for Capability Removal in LLMs

  • 用选择性梯度掩码将目标知识锁定在特定参数中,便于精准删除
  • 在语言和生物知识移除任务中,比数据过滤和旧版梯度路由更抗标签噪声
  • 对抗微调攻击时鲁棒性强,需7倍更多步才能恢复遗忘内容

大型语言模型日益具备具有双重用途风险的能力。尽管数据过滤已成为预训练阶段的缓解手段,但面临显著挑战:大规模标注有害数据成本高昂,且随着模型规模增大,样本效率提升,即使少量误标内容也可能引发危险能力。为应对误标有害内容带来的风险,先前工作提出梯度路由(Gradient Routing,Cloud et al., 2024)——一种将目标知识局部化到特定模型参数子集的技术,以便后续移除。本文探索其改进版本,称为选择性梯度掩码(Selective Gradient Masking, SGTM),特别关注其对标签噪声的鲁棒性。SGTM对选定梯度进行零掩码,使目标领域样本仅更新其专属参数。我们在两项应用中测试了SGTM的有效性:从双语合成数据集训练的模型中移除某一语言的知识,以及从基于英文维基百科训练的模型中移除生物学知识。在存在标注错误的情况下,SGTM在保留/遗忘权衡上均优于数据过滤及此前提出的梯度路由实例。与易被微调快速逆转的浅层遗忘方法不同,SGTM对对抗性微调表现出强鲁棒性,需七倍于微调基线方法(RMU)的步骤才能恢复遗忘集上的基准性能。结果表明,SGTM是现有安全缓解措施的有力预训练阶段补充,尤其适用于标签噪声不可避免的场景。

原文摘要 · Abstract (English)

Large Language Models increasingly possess capabilities that carry dual-use risks. While data filtering has emerged as a pretraining-time mitigation, it faces significant challenges: labeling whether data is harmful is expensive at scale, and given improving sample efficiency with larger models, even small amounts of mislabeled content could give rise to dangerous capabilities. To address risks associated with mislabeled harmful content, prior work proposed Gradient Routing (Cloud et al., 2024) -- a technique that localizes target knowledge into a dedicated subset of model parameters so they can later be removed. We explore an improved variant of Gradient Routing, which we call Selective GradienT Masking (SGTM), with particular focus on evaluating its robustness to label noise. SGTM zero-masks selected gradients such that target domain examples only update their dedicated parameters. We test SGTM's effectiveness in two applications: removing knowledge of one language from a model trained on a bilingual synthetic dataset, and removing biology knowledge from a model trained on English Wikipedia. In both cases SGTM provides better retain/forget trade-off in the presence of labeling errors compared to both data filtering and a previously proposed instantiation of Gradient Routing. Unlike shallow unlearning approaches that can be quickly undone through fine-tuning, SGTM exhibits strong robustness to adversarial fine-tuning, requiring seven times more fine-tuning steps to reach baseline performance on the forget set compared to a finetuning-based unlearning method (RMU). Our results suggest SGTM provides a promising pretraining-time complement to existing safety mitigations, particularly in settings where label noise is unavoidable.

大模型安全知识移除梯度路由抗噪声

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