arXiv:2409.19476cs.CLcs.CR2024-09被引 5

用有害数据微调开源大模型,可突破其安全防护机制。

Overriding Safety protections of Open-source Models

  • 用有害数据微调模型,导致安全防护失效
  • 有害微调使模型响应错误率上升35%
  • 安全微调虽略降性能,但显著提升安全性

当前大型语言模型广泛应用于多个领域,但易生成有害内容或遭受推理阶段攻击,因此通常经过安全对齐训练和红队测试以设置安全屏障。然而,为特定任务进行微调可能削弱安全防护,若使用有害数据微调,模型更易产生不安全输出。本文研究有害数据对微调的影响,发现当模型在有害数据上微调时,安全防护可被突破,表现为对抗性成功率(ASR)较基线模型上升35%。同时,有害微调导致模型不确定性显著增加,出现严重知识漂移,响应真实性下降。反之,在安全数据上微调的模型,其ASR相比基线降低51.68%,且不确定性与真实性仅轻微下降。代码已公开于:https://github.com/techsachinkr/Overriding_Model_Safety_Protections。

原文摘要 · Abstract (English)

LLMs(Large Language Models) nowadays have widespread adoption as a tool for solving issues across various domain/tasks. These models since are susceptible to produce harmful or toxic results, inference-time adversarial attacks, therefore they do undergo safety alignment training and Red teaming for putting in safety guardrails. For using these models, usually fine-tuning is done for model alignment on the desired tasks, which can make model more aligned but also make it more susceptible to produce unsafe responses, if fine-tuned with harmful data.In this paper, we study how much of impact introduction of harmful data in fine-tuning can make, and if it can override the safety protection of those models. Conversely,it was also explored that if model is fine-tuned on safety data can make the model produce more safer responses. Further we explore if fine-tuning the model on harmful data makes it less helpful or less trustworthy because of increase in model uncertainty leading to knowledge drift. Our extensive experimental results shown that Safety protection in an open-source can be overridden, when fine-tuned with harmful data as observed by ASR increasing by 35% when compared to basemodel's ASR. Also, as observed, fine-tuning a model with harmful data made the harmful fine-tuned model highly uncertain with huge knowledge drift and less truthfulness in its responses. Furthermore, for the safe fine-tuned model, ASR decreases by 51.68% as compared to the basemodel, and Safe model also shown in minor drop in uncertainty and truthfulness as compared to basemodel. This paper's code is available at: https://github.com/techsachinkr/Overriding_Model_Safety_Protections

安全对齐微调风险模型漏洞大模型安全

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