Gracefully Filtering Backdoor Samples for Generative Large Language Models without Retraining
Zongru Wu, Pengzhou Cheng, Lingyong Fang, Zhuosheng Zhang, Gongshen, Liu

TL;DR
This paper introduces GraCeFul, a novel frequency space gradient clustering method that effectively filters backdoor samples in generative LLMs without retraining, significantly enhancing security against backdoor attacks.
Contribution
The paper presents a new frequency space gradient clustering technique for backdoor sample filtering in generative LLMs, outperforming existing methods without retraining models.
Findings
Achieves nearly 100% recall and F1 scores in backdoor sample detection
Reduces backdoor attack success rates to 0% across multiple datasets
Generalizes effectively to Llama-2 and Vicuna models
Abstract
Backdoor attacks remain significant security threats to generative large language models (LLMs). Since generative LLMs output sequences of high-dimensional token logits instead of low-dimensional classification logits, most existing backdoor defense methods designed for discriminative models like BERT are ineffective for generative LLMs. Inspired by the observed differences in learning behavior between backdoor and clean mapping in the frequency space, we transform gradients of each training sample, directly influencing parameter updates, into the frequency space. Our findings reveal a distinct separation between the gradients of backdoor and clean samples in the frequency space. Based on this phenomenon, we propose Gradient Clustering in the Frequency Space for Backdoor Sample Filtering (GraCeFul), which leverages sample-wise gradients in the frequency space to effectively identify…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Speech Recognition and Synthesis
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · Attention Is All You Need · Softmax · Dropout · Dense Connections · Layer Normalization · Linear Layer · Multi-Head Attention · Weight Decay · Linear Warmup With Linear Decay
