发现大模型底层对有害内容更敏感,仅微调底层可高效实现越狱攻击。
Efficient Jailbreaking of Large Models by Freeze Training: Lower Layers Exhibit Greater Sensitivity to Harmful Content
- 通过参数分布分析定位易受攻击的底层,仅对底层进行冻结微调。
- 训练时间与显存消耗降低50%以上,越狱成功率仍超90%。
- 方法通用性强,适用于多种开源模型,适合安全研究者参考。
随着大语言模型在多个领域的广泛应用,其安全问题日益受到学术界和工业界的关注。本研究通过对大模型参数进行采样与归一化处理,生成参数分布的可视化表示和热力图,揭示了隐藏层中部分层间存在显著的参数分布差异。进一步计算各层统计指标,并基于这些指标构建综合敏感度评分,识别出低层对有害内容生成具有显著敏感性。基于此发现,采用冻结训练策略,仅对低层执行监督微调。实验表明,该方法显著缩短训练时长并降低GPU内存占用,同时保持高越狱成功率和高危害评分,优于全层应用LoRA进行微调的效果。此外,该方法已成功扩展至其他开源大模型,验证了其在不同架构下的普适性与有效性。通过创新性地提出逐层统计分析大模型参数的方法,本研究为大模型可解释性提供了新视角。研究强调需持续开展适应性安全研究,以应对不断演进的大模型越狱攻击风险,推动更稳健、安全的大模型发展。
原文摘要 · Abstract (English)
With the widespread application of Large Language Models across various domains, their security issues have increasingly garnered significant attention from both academic and industrial communities. This study conducts sampling and normalization of the parameters of the LLM to generate visual representations and heatmaps of parameter distributions, revealing notable discrepancies in parameter distributions among certain layers within the hidden layers. Further analysis involves calculating statistical metrics for each layer, followed by the computation of a Comprehensive Sensitivity Score based on these metrics, which identifies the lower layers as being particularly sensitive to the generation of harmful content. Based on this finding, we employ a Freeze training strategy, selectively performing Supervised Fine-Tuning only on the lower layers. Experimental results demonstrate that this method significantly reduces training duration and GPU memory consumption while maintaining a high jailbreak success rate and a high harm score, outperforming the results achieved by applying the LoRA method for SFT across all layers. Additionally, the method has been successfully extended to other open-source large models, validating its generality and effectiveness across different model architectures. Furthermore, we compare our method with ohter jailbreak method, demonstrating the superior performance of our approach. By innovatively proposing a method to statistically analyze and compare large model parameters layer by layer, this study provides new insights into the interpretability of large models. These discoveries emphasize the necessity of continuous research and the implementation of adaptive security measures in the rapidly evolving field of LLMs to prevent potential jailbreak attack risks, thereby promoting the development of more robust and secure LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。