CLAICRDec 3, 2024

Gracefully Filtering Backdoor Samples for Generative Large Language Models without Retraining

arXiv:2412.02454v120 citationsh-index: 11Has CodeCOLING
Originality Incremental advance
AI Analysis

This addresses security threats for users of generative LLMs by providing an efficient defense against backdoor attacks, though it is incremental as it builds on frequency-space analysis for filtering.

The paper tackles the problem of backdoor attacks in generative large language models (LLMs) by proposing GraCeFul, a method that filters backdoor samples without retraining, achieving nearly 100% recall and F1 scores and reducing attack success rates to 0% with minimal impact on clean accuracy.

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 backdoor samples without requiring retraining LLMs. Experimental results show that GraCeFul outperforms baselines significantly. Notably, GraCeFul exhibits remarkable computational efficiency, achieving nearly 100% recall and F1 scores in identifying backdoor samples, reducing the average success rate of various backdoor attacks to 0% with negligible drops in clean accuracy across multiple free-style question answering datasets. Additionally, GraCeFul generalizes to Llama-2 and Vicuna. The codes are publicly available at https://github.com/ZrW00/GraceFul.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes