用几何方法提前检测大模型安全拒绝能力的脆弱性
Skin-Deep: A Geometric Diagnostic for Alignment Fragility in Large Language Model Representations
- 通过分析模型隐藏层激活,提取安全行为的几何特征
- 发现所有模型均存在低秩安全子空间,且该结构决定拒绝能力
- 可预判微调后仍能保持安全性的模型,适合部署前筛查
对齐微调本应使大语言模型对有害请求具备稳健的拒绝能力,但少量无害微调样本即可使其失效。这对开源权重模型构成部署风险:模型在发布时可通过拒绝测试,后续经低成本微调后却失去安全行为。现有研究虽证实该现象存在,但缺乏在攻击或微调前检测模型脆弱性的方法。本文提出Skin-Deep,一种基于隐藏状态激活的几何诊断工具,可在不进行任何微调的前提下,将逐层安全几何压缩为单一标量——几何脆弱性分数(GFS)。在21个指令微调模型(参数量3B–32B,涵盖6种对齐方法)上应用,发现跨模型家族普遍存在低秩安全子空间。方向消融实验表明,移除该子空间中的方向会削弱有害请求拒绝能力,提供因果证据。关键的是,GFS能在微调前识别出在小规模LoRA微调后仍能保持最强拒绝能力的初始模型。结果证明,GFS是一种无需实际攻击即可预判安全脆弱性的实用诊断工具。
原文摘要 · Abstract (English)
Alignment tuning is meant to make harmful-request refusal robust, yet this safety behavior can be erased by a small set of benign fine-tuning examples. This is a deployment risk for open-weight models because a checkpoint can pass refusal tests at release time and later lose refusal under low-cost downstream fine-tuning. Prior work has established these refusal failures, but existing studies do not show how to detect this fragility in the aligned model itself before an attack or fine-tuning intervention is run. We introduce Skin-Deep, a geometric diagnostic that detects alignment fragility directly from the aligned model's hidden-state activations before such an intervention is run and compresses the layer-wise safety geometry into a single scalar, the Geometric Fragility Score (GFS). Applied to twenty-one instruction-tuned models spanning six alignment recipes and 3B--32B parameters, Skin-Deep reveals a recurring low-rank safety subspace across model families. Direction ablations show that removing directions in this subspace weakens harmful-request refusal, providing causal evidence that the recovered geometry underlies refusal behavior. Crucially, GFS identifies, before any fine-tuning, the initially safe model that retains the most refusal after small-scale LoRA fine-tuning. These results establish GFS as a practical pre-deployment diagnostic for flagging fragile refusal behavior without running an attack.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。