Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuning
作者: Yuxuan Huang, Xingyu Zeng, Tianhang Zheng, Chaochao Lu
分类: cs.CR, cs.AI, cs.CL
发布日期: 2026-08-05
🔗 代码/项目: GITHUB
💡 一句话要点
提出梯度免疫机制以应对恶意微调问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 恶意微调 安全机制 梯度阻断 大型语言模型 对抗性训练
📋 核心要点
- 现有的防御措施未能有效应对恶意微调,尤其是在部分保护开放权重的发布设置中。
- 提出单向安全门(USG),通过空间立方层和逆适配器设计,抑制有害样本的梯度影响。
- 实验显示USG在微调后攻击成功率保持在发布前水平,同时在安全样本上表现出高通过率。
📝 摘要(中文)
发布的对齐大型语言模型在恶意下游微调中仍然存在脆弱性。现有防御措施主要针对微调即服务(FTaaS)范式,或依赖下游用户遵循额外的安全程序,因此未能直接解决我们研究的设置:提供者控制的部分保护开放权重(PPOW)发布设置。在此背景下,我们提出了单向安全门(USG),其实现为一个空间立方层和一个逆适配器,后者插入在最终的Transformer层之后。在下游微调过程中,立方层抑制或阻止来自有害样本的梯度,而逆适配器则恢复基础模型的前向行为。通过使用防御者持有的有害数据进行阈值校准,保护能够推广到附近的有害样本。实验结果表明,USG在六个模型-数据集设置中保持了微调后攻击成功率接近发布前水平,同时在较简单的设置中保持了高安全通过率,并在来自BeaverTails的有害样本中展现了更清晰的安全-效用权衡。
🔬 方法详解
问题定义:论文要解决的问题是大型语言模型在恶意微调下的脆弱性,现有方法多依赖用户合作或特定服务,无法有效保护开放权重的发布设置。
核心思路:论文提出的单向安全门(USG)通过设计空间立方层来抑制有害样本的梯度,同时使用逆适配器恢复模型的正常行为,从而提高模型的安全性。
技术框架:整体架构包括一个空间立方层和一个逆适配器,立方层在微调过程中对有害样本的梯度进行抑制,逆适配器则确保模型的前向推理不受影响。
关键创新:USG的核心创新在于通过空间立方层实现对梯度的有效阻断,避免了对下游用户的依赖,显著提高了恶意微调的成本。
关键设计:在设计中,使用防御者持有的有害数据进行阈值校准,以确保保护能够推广到相似的有害样本,同时保持模型的有效性和安全性。
🖼️ 关键图片
📊 实验亮点
实验结果表明,USG在六个模型-数据集设置中,微调后攻击成功率保持在发布前水平,且在较简单的设置中安全通过率高达90%以上,展示了显著的安全性和效用平衡。
🎯 应用场景
该研究的潜在应用领域包括大型语言模型的安全发布、在线微调服务以及对抗性训练等。通过提高模型对恶意微调的抵抗力,可以在多个行业中增强AI系统的安全性,降低潜在风险。
📄 摘要(原文)
Released aligned large language models remain vulnerable to malicious downstream finetuning. Existing defenses are largely designed for the fine-tuning-as-a-service (FTaaS) paradigm or rely on downstream users to follow additional safety procedures, and therefore do not directly address the setting we study: a provider controlled partially protected open-weight (PPOW) release setting in which most weights remain trainable while a small safety-critical component is preserved at release. We propose a Unidirectional Safety Gate (USG), instantiated as a Null Space Cubic Layer together with an Inverse Adapter inserted after the final Transformer layer. During downstream fine-tuning, the cubic layer suppresses or blocks gradients from harmful samples whose hidden states fall in a calibrated protected region, while the Inverse Adapter restores the base model's forward behavior. In practice, we calibrate a threshold using defender-held harmful data, allowing protection to generalize to nearby in-distribution harmful samples. Across six evaluated model-dataset settings, USG keeps post-finetuning attack success rate close to the pre-release level under a fixed release threshold, while maintaining high safe-pass rates on easier settings and exhibiting a clearer safety-utility trade-off on unsafe samples from BeaverTails. These results suggest that release-time representation-space blocking can raise the cost of malicious downstream adaptation without requiring downstream cooperation. The code is available at https://github.com/OpenCausaLab/Gradient-Immunity.