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

SPARD: 通过安全投影与相关性-多样性数据选择防御有害微调攻击

SPARD: Defending Harmful Fine-Tuning Attack via Safety Projection with Relevance-Diversity Data Selection

Department of Computer Science and Engineering, The Hong Kong University of Science and Technology(香港科学与技术大学计算机科学与工程系);Department of Computer Science and Engineering, Southern University of Science and Technology(南方科技大学计算机科学与工程系);Department of Computer Science and Engineering, The Chinese University of Hong Kong(香港中文大学计算机科学与工程系);Platform and Content Group, Tencent(腾讯平台与内容组);Chinese Medicine Guangdong Laboratory(广东中医实验室)

Shuhao Chen, Weisen Jiang, Yeqi Gong, Shengda Luo, Chengxiang Zhuo, Zang Li, James T. Kwok, Yu Zhang

AI总结:

提出SPARD框架,结合安全投影交替优化和相关性-多样性数据选择,防御有害微调攻击,在保持任务精度的同时显著降低攻击成功率。

摘要:

微调大型语言模型往往会破坏其安全对齐,有害微调攻击进一步加剧了这一问题,其中对抗性数据移除安全防护并诱导不安全行为。我们提出SPARD,一种集成安全投影交替优化与相关性-多样性感知数据选择的防御框架。SPARD采用SPAG,在效用更新和显式安全投影之间交替优化,使用一组安全数据强制执行安全约束。为策划安全数据,我们引入相关性-多样性行列式点过程来选择紧凑的安全数据,平衡任务相关性和安全覆盖。在GSM8K和OpenBookQA上针对四种有害微调攻击的实验表明,SPARD始终实现最低的平均攻击成功率,显著优于最先进的防御方法,同时保持高任务精度。代码可在https://github.com/shuhao02/SPARD获取。

英文摘要:

Fine-tuning large language models often undermines their safety alignment, a problem further amplified by harmful fine-tuning attacks in which adversarial data removes safeguards and induces unsafe behaviors. We propose SPARD, a defense framework that integrates Safety-Projected Alternating optimization with Relevance-Diversity aware data selection. SPARD employs SPAG, which optimizes alternatively between utility updates and explicit safety projections with a set of safe data to enforce safety constraints. To curate safe data, we introduce a Relevance-Diversity Determinantal Point Process to select compact safe data, balancing task relevance and safety coverage. Experiments on GSM8K and OpenBookQA under four harmful fine-tuning attacks demonstrate that SPARD consistently achieves the lowest average attack success rates, substantially outperforming state-of-the-art defense methods, while maintaining high task accuracy. Code is available at https://github.com/shuhao02/SPARD.

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

↑