Lethe: Purifying Backdoored Large Language Models with Knowledge Dilution

Chen Chen, Yuchen Sun, Jiaxin Gao, Xueluan Gong, Qian Wang, Ziyao Wang, Yongsen Zheng, Kwok-Yan LamarXiv 2025 · OpenReview

Abstract

Large language models (LLMs) have seen significant advancements, achieving superior performance in various Natural Language Processing (NLP) tasks. However, they remain vulnerable to backdoor attacks, where models behave normally for standard queries but generate harmful responses or unintended output when specific triggers are activated. Existing backdoor defenses either lack comprehensiveness, focusing on narrow trigger settings, detection-only mechanisms, and limited domains, or fail to withstand advanced scenarios like model-editing-based, multi-trigger, and triggerless attacks. In this paper, we present LETHE, a novel method to eliminate backdoor behaviors from LLMs through knowledge dilution using both internal and external mechanisms. Internally, LETHE leverages a lightweight dataset to train a clean model, which is then merged with the backdoored model to neutralize malicious behaviors by diluting the backdoor impact within the model's parametric memory. Externally, LETHE incorporates benign and semantically relevant evidence into the prompt to distract LLM's attention from backdoor features. Experimental results on classification and generation domains across 5 widely used LLMs demonstrate that LETHE outperforms 8 state-of-the-art defense baselines against 8 backdoor attacks. LETHE reduces the attack success rate of advanced backdoor attacks by up to 98% while maintaining model utility. Furthermore, LETHE has proven to be cost-efficient and robust against adaptive backdoor attacks.

Introduction

As LLMs are increasingly outsourced for training or fine-tuning, they become vulnerable to backdoor attacks. In these scenarios, a malicious provider implants a "Trojan" into the model: it behaves perfectly normally for standard queries but produces harmful or specific unintended outputs when a secret "trigger" (a specific word, style, or logic) is present.

Existing defenses often fall short. Some can only detect a backdoor but not remove it. Others are too narrow, only working against specific types of triggers. Furthermore, advanced attacks—like those based on direct model editing or "triggerless" semantic cues—can bypass traditional fine-tuning-based defenses because the malicious neurons often get "trapped" in local minima during the purification process. The authors of this paper sought a more comprehensive, trigger-agnostic way to "wash out" these malicious associations.

Methodology: Knowledge Dilution

The authors introduce LETHE (named after the Greek river of forgetfulness), which employs two mechanisms for "Knowledge Dilution":

  1. Internal Dilution (Parameter Level):
    • The user takes a tiny fraction of clean data (less than 10%) and performs parameter-efficient fine-tuning (using LoRA) to create a small "clean" model.
  2. This clean model is then merged with the backdoored model. While the paper explores several merging techniques (Linear, TIES, Passthrough), they find SLERP (Spherical Linear Interpolation) to be the most effective. This process effectively "dilutes" the malicious weights in the model's parametric memory with benign ones.
  3. External Dilution (Prompt Level):
    • At inference time, the system uses the TextRank algorithm to extract key terms from the user's query.
  4. It then retrieves factual, neutral definitions for these terms from a reliable knowledge base (WordNet).
  5. These definitions are prepended to the prompt as "evidence." This forces the model’s attention mechanism to focus on semantically relevant, benign facts, distracting it from the subtle features of a backdoor trigger.
The LETHE framework: Internal and External Dilution Mechanisms.

Experimental Evaluation

The researchers evaluated LETHE across both classification and generation domains using benchmarks like SST-2 & Emotion for sentiment, Chat-Backdoor for conversational safety, and HumanEval for code generation. They tested these against five major model families: GPT2-XL, GPT-J, Llama, Llama-2, and DeepSeek-R1.

Results and Discussion

LETHE demonstrates significant improvements over existing defense strategies in terms of both comprehensiveness and effectiveness.

Comparison of LETHE with state-of-the-art backdoor defenses across comprehensiveness and effectiveness metrics.

Key findings include:

  • Massive ASR Reduction: LETHE reduced the Attack Success Rate (ASR) of advanced attacks by up to 98%. For example, on GPT2-XL, it brought the ASR of the "BadEdit" attack down to 0% on the SST-2 dataset.
  • Utility Preservation: The Clean Data Accuracy (CDA) remained stable, typically staying within 3% of the original model's performance. In some cases, the purification process actually improved clean accuracy by removing internal inconsistencies.
  • Outperforming Baselines: LETHE outperformed eight state-of-the-art defenses, including BEEAR and Fine-pruning, particularly in complex "model-editing" and "multi-trigger" scenarios where other methods failed completely.
  • Robustness to Adaptive Attacks: Even when the researchers simulated an "aware" attacker who tried to bypass the defense by "subtracting" clean signals, LETHE remained effective.

Conclusion

LETHE provides a robust, trigger-agnostic, and computationally efficient framework for purifying backdoored LLMs. By combining parameter-level merging with prompt-level attention distraction, it effectively "washes out" malicious behaviors. Future work includes extending the principle of knowledge dilution to other modalities, like computer vision or speech recognition, and optimizing "Frankenmerging" layer combinations for even greater efficiency.

Summary updated

BibTeX
@misc{chen2025lethe,
  author = {Chen Chen and Yuchen Sun and Jiaxin Gao and Xueluan Gong and Qian Wang and Ziyao Wang and Yongsen Zheng and Kwok-Yan Lam},
  title = {{Lethe: Purifying Backdoored Large Language Models with Knowledge Dilution}},
  year = {2025},
  eprint = {2508.21004},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.21004},
}
Figure