arXiv:2608.05045cs.CRcs.AI2026-08

通过梯度阻断机制,防止模型被恶意微调而失守安全底线。

Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuning

论文配图:Gradient Immunity: Null-Space Resistance to Malicious Fine-Tuning
图 1 · 摘自论文原文
  • 在模型开放权重时,用空域立方层拦截有害样本的梯度传播。
  • 六组实验中,攻击成功率保持接近初始水平,且对正常任务影响小。
  • 无需下游配合,适合部署于需自主防护的安全敏感场景。

已发布的对齐大语言模型仍易受恶意下游微调攻击。现有防御多针对微调即服务(FTaaS)模式或依赖下游用户执行额外安全操作,无法直接应对我们研究的场景:提供方控制的部分受保护开放权重(PPOW)发布设置,其中大部分权重可训练,但一小部分关键安全组件在发布时被保留。我们提出单向安全门(USG),由空域立方层与逆适配器构成,后者置于最终Transformer层后。下游微调期间,立方层会抑制或阻断落入校准保护区域的有害样本的梯度,而逆适配器恢复基线模型前向行为。实践中,使用防御者持有的有害数据校准阈值,使保护能力泛化至同分布附近的有害样本。在六个模型-数据集组合中,USG在固定释放阈值下维持微调后攻击成功率接近释放前水平,对较简单任务保持高安全通过率,并在BeaverTails的非安全样本上展现出更清晰的安全-效用权衡。结果表明,释放时的表示空间阻断可提升恶意下游适应的成本,而无需下游协作。代码已公开于 https://github.com/OpenCausaLab/Gradient-Immunity。

原文摘要 · Abstract (English)

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.

模型安全微调防御梯度隔离开放权重

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