arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.10862cs.LGcs.AIcs.CLcs.CR
收藏

剪枝防护:无需微调即可提升对齐大语言模型的越狱抵抗能力

Pruning for Protection: Increasing Jailbreak Resistance in Aligned LLMs Without Fine-Tuning

MIT(麻省理工学院)

Adib Hasan, Ileana Rugina, Alex Wang

AI总结:

该研究发现适度WANDA剪枝可在无需微调、维持标准基准性能的前提下提升对齐LLM的越狱抵抗力,通过多模型多数据集验证了效果并从注意力等角度解释了机制。

摘要:

本文研究了模型压缩对大语言模型(LLM)处理提示方式的影响,尤其关注越狱抵抗能力。我们发现,适度的WANDA剪枝(一种基于权重和激活的剪枝方法)无需微调即可增强模型对越狱攻击的抵抗能力,同时还能维持其在标准基准上的性能。为系统评估这种安全提升效果,我们构建了一个包含5大类共225项有害任务的数据集。我们对LLaMA-2 Chat、Vicuna 1.3和Mistral Instruct v0.2的分析表明,剪枝带来的安全增益与模型初始安全水平相关。我们通过分析注意力模式变化和困惑度偏移来解释这些结果,证明剪枝后的模型注意力更集中,对人工构造的越狱结构敏感度更高。我们还将评估拓展到AdvBench有害行为任务和GCG攻击方法上,结果发现,在手动越狱尝试的评估下,LLaMA-2在AdvBench提示上的安全性远高于在我们的数据集上的表现,且剪枝对AdvBench上的自动攻击和手动越狱均有效。

英文摘要:

This paper investigates the impact of model compression on the way Large Language Models (LLMs) process prompts, particularly concerning jailbreak resistance. We show that moderate WANDA pruning can enhance resistance to jailbreaking attacks without fine-tuning, while maintaining performance on standard benchmarks. To systematically evaluate this safety enhancement, we introduce a dataset of 225 harmful tasks across five categories. Our analysis of LLaMA-2 Chat, Vicuna 1.3, and Mistral Instruct v0.2 reveals that pruning benefits correlate with initial model safety levels. We interpret these results by examining changes in attention patterns and perplexity shifts, demonstrating that pruned models exhibit sharper attention and increased sensitivity to artificial jailbreak constructs. We extend our evaluation to the AdvBench harmful behavior tasks and the GCG attack method. We find that LLaMA-2 is much safer on AdvBench prompts than on our dataset when evaluated with manual jailbreak attempts, and that pruning is effective against both automated attacks and manual jailbreaking on Advbench.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑