通过缩减频率空间从后门中毒数据集中获取干净语言模型
Acquiring Clean Language Models from Backdoor Poisoned Datasets by Downscaling Frequency Space
AI总结:
本文通过傅里叶分析发现后门映射倾向低频收敛更快,提出MuScleLoRA在频率空间进行多尺度低秩适应与梯度对齐,促使模型优先学习高频干净映射,将多种后门攻击平均成功率降至15%以下,并泛化至BERT、RoBERTa、GPT2-XL和Llama2等模型。
摘要:
尽管语言模型(LMs)在各种自然语言处理(NLP)任务中取得了显著成功,但LMs的可靠性容易受到后门攻击的影响。先前的研究试图在 poisoned dataset 上训练LMs时减轻后门学习,但在现实场景中应对复杂的后门攻击时仍显乏力。本文通过傅里叶分析研究了后门LMs在频率空间的学习机制。研究结果表明,在 poisoned datasets 上呈现的后门映射相比干净映射表现出更明显的低频倾向,导致后门映射收敛更快。为缓解这一困境,我们提出了 Multi-Scale Low-Rank Adaptation (MuScleLoRA),该方法在频率空间部署多个径向缩放并对目标模型进行低秩适应,进一步在更新参数时对齐梯度。通过在频率空间缩减,MuScleLoRA促使模型优先学习相对高频的干净映射,从而减轻后门学习。实验结果表明,MuScleLoRA显著优于基线方法。值得注意的是,MuScleLoRA在多个数据集上将多种后门攻击的平均成功率降至15%以下,并泛化至多种骨干LMs,包括BERT、RoBERTa、GPT2-XL和Llama2。代码公开于https://github.com/ZrW00/MuScleLoRA。
英文摘要:
Despite the notable success of language models (LMs) in various natural language processing (NLP) tasks, the reliability of LMs is susceptible to backdoor attacks. Prior research attempts to mitigate backdoor learning while training the LMs on the poisoned dataset, yet struggles against complex backdoor attacks in real-world scenarios. In this paper, we investigate the learning mechanisms of backdoor LMs in the frequency space by Fourier analysis. Our findings indicate that the backdoor mapping presented on the poisoned datasets exhibits a more discernible inclination towards lower frequency compared to clean mapping, resulting in the faster convergence of backdoor mapping. To alleviate this dilemma, we propose Multi-Scale Low-Rank Adaptation (MuScleLoRA), which deploys multiple radial scalings in the frequency space with low-rank adaptation to the target model and further aligns the gradients when updating parameters. Through downscaling in the frequency space, MuScleLoRA encourages the model to prioritize the learning of relatively high-frequency clean mapping, consequently mitigating backdoor learning. Experimental results demonstrate that MuScleLoRA outperforms baselines significantly. Notably, MuScleLoRA reduces the average success rate of diverse backdoor attacks to below 15\% across multiple datasets and generalizes to various backbone LMs, including BERT, RoBERTa, GPT2-XL, and Llama2. The codes are publicly available at https://github.com/ZrW00/MuScleLoRA.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。