Removing the NEEDLE in the Haystack: Backdoor Removal in LLMs via Weight Orthogonalisation
Abstract
Backdoor attacks can be implanted in Large Language Models (LLMs) during training, causing unwanted behaviour when a trigger appears in the input. Existing backdoor defences for LLMs attempt to remove the backdoor but inadvertently shift the model's output distribution to benign prompts, which can result in degraded model performance and safety. We propose NEEDLE, a training-free method for targeted backdoor removal. Once a trigger has been identified, our method estimates a backdoor direction and a refusal subspace through activation vectors, then applies sequential weight orthogonalisation to suppress the backdoor while preventing changes in refusal-related representations. NEEDLE requires neither a clean reference model nor the original poisoned training data. Evaluation is conducted across multiple model families and attack types. NEEDLE achieves the lowest mean Attack Success Rate (ASR) among the evaluated defences, including 0% on challenging code injection attacks, while resulting in the lowest KL divergence and minimal changes in capability and safety.
Create a lesson
Metadata
- Categories
- cs.CR, cs.LG
Related papers
How to Backdoor LLMs via Hardware Model Co-Attack?
Shared title terminologycs.CRSanskar Amgain, Sudipta Paria, Daniel Lobo et al.
The Fragility of Trigger-Tag Mechanisms for Misuse Detection in Open-Weight LLMs
Shared title terminologycs.CRToluwani Aremu, Manit Baser, Mohan Gurusamy et al.
PQCImplement-Bench: Evaluating LLMs on Implementing NIST Post-Quantum Standards in Production Cryptographic Libraries
Shared title terminologycs.CRSouhardya Saha Dip, Moshood A. Fakorede, A. B. Siddique et al.
Assessing Data Leakage Risk in Fine-Tuned LLMs via Membership Inference Attacks
Shared title terminologycs.CRMohamed-Jalal Baim, Léa Deleris, Myriam Tami et al.
zk-Sable: Per-Client Zero-Knowledge Proofs of Batched, Bit-Exact LLM Inference with Open Weights
Shared title terminologycs.CRTomer Solberg
Towards Computational Robustness of Latent Diffusion Watermarking Against Removal Attacks with Adaptive Detector Access
Shared title terminologycs.CRDe Zhang Lee, Ee-Chien Chang