Skip to content

NEEDLE: Removing LLM backdoors via weight orthogonalizationRemoving the NEEDLE in the Haystack: Backdoor Removal in LLMs via Weight Orthogonalisation

arXiv: Adversarial Attacks, Backdoors & Poisoning· arXiv:2610.00348· Minoo Kim, Vasileios Lampos, George Drayson·Indexed by this site · 2026-10-02· Originally publishedDefenses

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

NEEDLE removes LLM backdoors with weight orthogonalization: on Gemma, average ASR across six attacks drops from 99.50% to 1.67%, with KL of 0.03.

Threat modelThe attacker only contributes Dt with triggers to the training set, cannot inspect or modify Do, and cannot control training. The defender has white-box access to the backdoored model θ, without θ0, Dt, or Do, but knows the trigger and insertion rule τ.

Questions
LLM backdoors implanted during training produce attacker-specified behavior when triggers appear. Existing removal methods alter the output distribution on benign prompts, thereby affecting capability and safety.
Methods
NEEDLE, after knowing the trigger, uses activation differences to estimate the backdoor direction and a rank-4 refusal subspace, then sequentially performs weight orthogonalization on layers 12–34, removing the backdoor projection and preserving the refusal projection, without needing a clean reference model or original poisoned data.
Experiments and results
On the six attacks against Gemma-3-4B-IT and Qwen3-4B-Instruct-2507, NEEDLE's average ASR is 1.67% and 5.00%, respectively, lower than the evaluated baselines; the ASR for code injection is 0%. The authors state its KL is the lowest, and capability and safety changes are also smaller.
Limitations and future work
The authors state the method depends on a known trigger and is harder to remove on targeted refusal because the backdoor overlaps with refusal. Experiments cover two 4B models plus Gemma-3-12B-IT, with attacks BadNet, Sleeper, and code injection; the appendix also compares full fine-tuning.
Experimental setupGemma-3-4B-IT、Qwen3-4B-Instruct-2507 et al. · BackdoorLLM、WildGuardMix et al. · ASR、ATR et al.
Evaluated models
Gemma-3-4B-ITQwen3-4B-Instruct-2507Gemma-3-12B-IT
Benchmarks
BackdoorLLMWildGuardMixAlpacaMMLUGSM8KHellaSwagARC-ChallengeIFEvalHumanEvalMBPP
Metrics
ASRATRCapability ΔSafety ΔKL
AI summaryThe researchers propose NEEDLE, a training-free method for targeted backdoor removal. After identifying trigger words, the method estimates the backdoor direction and the refusal subspace through activation vectors, then applies weight orthogonalization sequentially to suppress the backdoor while avoiding changes to refusal-related representations. NEEDLE requires neither a clean reference model nor the original poisoned training data. In evaluations across multiple model families and multiple attack types, NEEDLE achieves the lowest average attack success rate among the evaluated defense methods, 0% on code injection attacks, while also having the lowest KL divergence and the smallest changes in capability and safety.

The researchers propose NEEDLE, a training-free method for targeted backdoor removal. After identifying trigger words, the method estimates the backdoor direction and the refusal subspace through activation vectors, then applies weight orthogonalization sequentially to suppress the backdoor while avoiding changes to refusal-related representations. NEEDLE requires neither a clean reference model nor the original poisoned training data. In evaluations across multiple model families and multiple attack types, NEEDLE achieves the lowest average attack success rate among the evaluated defense methods, 0% on code injection attacks, while also having the lowest KL divergence and the smallest changes in capability and safety.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    When the trigger is known, remove the LLM backdoor without noticeably changing refusals and normal outputs.

    How to permanently remove an LLM backdoor when the trigger is known, while minimally changing the output distribution, capability, and safety on normal prompts.

    • Scenario: the authors state backdoors can be inserted during training, producing hostile language, targeted refusal, or malicious code when the input contains a hidden trigger, while maintaining normal behavior without the trigger; open-weight models can be adapted and redistributed, and users do not have access to training data. The authors also state that a small number of poisoned samples suffices for insertion, and backdoors can persist after subsequent safety training (Hubinger et al., 2024).
    • Existing shortcomings: the authors state removal methods for classification models are highly limited when applied to LLMs; fine-tuning methods add constraints to suppress backdoors, while inference-time methods replace tokens or steer activations with a clean reference model. The authors state these methods have additional computational constraints and have not consistently removed backdoors across models, attacks, and intervention settings; effects on output distribution, performance, and safety are also understudied.
    • Core observation: the authors state the backdoor direction is related to the activation direction mediating refusal (Figure 1). Directly removing the backdoor direction increases the harmful rate; substantial overlap lies outside the single dominant refusal direction (k=1), so multiple refusal directions must be preserved simultaneously.
    • This paper proposes: NEEDLE, a training-free targeted backdoor removal. After estimating the backdoor direction and refusal subspace, sequentially perform weight orthogonalization to suppress the backdoor and avoid changing refusal-related representations. No clean reference model or original poisoned training data is needed.
    • Threat model
      • Attacker: data poisoning. The attacker contributes Dt (triggered prompt–answer pairs) to the training corpus, cannot inspect or modify the normal set Do, and cannot control the training process.
      • Defender knowledge: white-box access to the backdoored model θ; no clean model θ0, and no knowledge of Dt or Do. The trigger and insertion rule τ are assumed known, so triggered prompts can be constructed for any x, and target behavior can be observed by querying θ.
      • Defense goal: obtain θ′ such that triggered prompts answer as if untriggered, i.e., pθ′(·|τ(x))≈pθ(·|x), while normal behavior is preserved as pθ′(·|x)≈pθ(·|x).
      • Victim system: an instruction-tuned LLM. This paper writes the backdoor into θ0 during an additional SFT stage, with the training set being the union of normal and triggered samples.
  2. What related research exists?

    Related work is divided into backdoor attacks, detection and removal, and activation steering.

    The paper divides related work into backdoor attacks, backdoor defenses, and activation steering.

    Backdoor attacks

    • Image classification backdoors (Gu et al., 2017; Bagdasaryan & Shmatikov, 2021)—poisoned samples associate a visual trigger with a wrong label, while performance on trigger-free inputs is preserved.
    • LLM text generation backdoors (Li et al., 2025b; Hubinger et al., 2024; Bagdasaryan & Shmatikov, 2022)—the target can be an open-ended response. The authors state tasks and outputs are more diverse, making identification and removal harder than in image classification (Li et al., 2025c). Li et al. (2025b) classify by intervention level: data or weight poisoning, and hidden state or chain-of-thought manipulation.
    • Stages of data poisoning—can occur in pretraining (Souly et al., 2025), instruction tuning (Wan et al., 2023), and reinforcement learning (Rando & Tramèr, 2024). The authors state attacks need relatively few poisoned samples and can persist after safety training.

    Backdoor defenses

    • Detection: find suspicious samples during training (Cunningham et al., 2026; McKenzie et al., 2026), or recover triggers from a backdoored model (Bullwinkel et al., 2026). Li et al. (2021a) isolate samples that learn unusually fast and unlink them from the target class; such methods require a possibly poisoned dataset and the ability to monitor and modify training (Li et al., 2021a; Huang et al., 2022; Li et al., 2021b), and do not apply when the defender lacks training access.
    • Inference-time removal: CleanGen (Li et al., 2025c) replaces suspicious tokens with a reference model; CS-ADS (Zhong et al., 2026) uses contrastive activation steering to guide generation. The authors state they add inference compute and often require a proxy model.
    • Weight modification: includes Yao et al. (2019), Lamparth & Reuel (2024). SFT on clean data is a simple baseline; when the trigger is known, OSFT (Li et al., 2025a) inserts the trigger into normal prompts and preserves clean answers. BEEAR (Zeng et al., 2024) finds embedding perturbations that elicit unwanted answers and then fine-tunes; CROW (Min et al., 2025) regularizes layer-wise representation consistency; BD-VAX (Li & Kim, 2026) synthesizes backdoor variants and aggregates parameter differences, then fine-tunes further. The authors state these methods can work without knowing the trigger, but removal effectiveness varies across models, attacks, and intervention settings, and effects on distribution, performance, and safety are understudied.

    Activation steering

    • Directions and refusal: Zou et al. (2023), Turner et al. (2023), Rimsky et al. (2024) use low-dimensional activation directions to manipulate behavior. Arditi et al. (2024) find a single residual stream direction strongly related to refusal and remove it from activations or orthogonalize weights to suppress refusal.
    • For backdoors: Karayalcin et al. (2026) identify trigger directions in vision transformers and test causal roles with activation and parameter interventions; Zhong et al. (2026) use steering vectors to suppress LLM backdoor outputs; Oozeer et al. (2025) use learned mappings in activation space to transfer these vectors across models.
    • Side effects: Li et al. (2026) find steering directions can overlap with refusal representations, creating trade-offs in safety and controllability.

    Baseline methods are SFT (Qi et al., 2021), OSFT (Li et al., 2025a), CROW (Min et al., 2025), and BD-VAX (Li & Kim, 2026). Attacks come from BackdoorLLM (Li et al., 2025b) sentiment steering and targeted refusal, plus the authors' constructed code injection; trigger types are BadNet (Gu et al., 2019) and Sleeper (Hubinger et al., 2024). Capability evaluation uses MMLU, GSM8K, HellaSwag, ARC-Challenge, IFEval, and code injection additionally uses HumanEval and MBPP; safety uses the WildGuardMix test set.

    The authors position this work as: when the trigger is known, use training-free weight editing to remove backdoors while deliberately preserving the refusal subspace and overall distribution, distinguishing it from broad fine-tuning or inference-time defenses.

  3. How does the paper address this problem?

    Estimate the backdoor direction and a rank-4 refusal subspace, then sequentially orthogonalize weights on layers 12–34.

    NEEDLE first estimates a backdoor direction and a refusal subspace from activations, then applies a closed-form edit to the weights: remove the backdoor projection while preserving the refusal projection as much as possible. The edit is permanent, with no further intervention at inference time.

    Problem setting

    • Successful backdoor: the trigger is a set of strings plus an insertion rule τ. The attack generates attacker-specified ŷ on τ(x) and maintains normal behavior on trigger-free prompts.
    • Insertion method: on instruction-tuned model θ0, perform additional SFT on D = Do ∪ Dt to obtain backdoored model θ. Do is normal prompts and answers, Dt is (τ(x), ŷ) after triggering.
    • Removal goal: modify θ to obtain θ′, so that triggered prompts answer close to the trigger-free distribution, and normal prompts also stay close to the original backdoored model's distribution.

    Direction estimation

    • Activations: the residual stream at layer ℓ and answer token yi is hℓ,i. Each layer writes to the residual stream first via attention, then via MLP. Averaging over answer tokens on a calibration set gives layer mean μℓ. Steering vectors are differences of two group means.
    • Backdoor direction: the mean difference between triggered and normal samples is δℓ^bd. Subtract its projection onto the normal mean μℓ^o so the result is orthogonal to μℓ^o, then normalize to obtain bℓ.
    • Refusal subspace: the difference between refusal and compliant answers on harmful prompts is δℓ^ref. Reference vector cℓ^ref is the midpoint of the two means; subtract the projection onto this midpoint and normalize to obtain rℓ. Then construct j pairs of refusal/compliant differences, center them relative to δℓ^ref, remove components along cℓ^ref and rℓ, and perform SVD. The three leading right singular vectors plus rℓ form an orthonormal refusal basis Rℓ ∈ R^{M×4}, i.e., rank 4.

    Sequential weight editing

    • Two constraints: for output projection Wℓ, require bℓ^⊤ Wℓ^⋆ = 0 and Rℓ^⊤ Wℓ^⋆ = Rℓ^⊤ Wℓ. First take the component of bℓ orthogonal to the refusal subspace, uℓ = (I − Rℓ Rℓ^⊤) bℓ, then subtract the backdoor projection along uℓ from Wℓ per equation (6). When uℓ ≠ 0, both constraints are satisfied. This is done for both attention and MLP output projections.
    • Why correction is needed: the constraints are defined on weights; after earlier layers are changed, later layers' activations along the refusal direction may no longer be preserved. Therefore, orthogonalize sequentially in increasing layer order on layers 12–34, recomputing activations after each layer is edited.
    • MLP correction: the second step only modifies the MLP output matrix, since it is the last linear write in that layer. Let dℓ,i be the difference between the backdoored model and the "edited up to this layer" model in the refusal projection. Use ridge regression to map MLP intermediate activations to this four-dimensional correction, and constrain the update not to introduce the backdoor direction. The output direction takes the refusal basis with the component along uℓ removed. When λℓ > 0, the ridge penalty gives a unique solution. Calibration uses a set of harmful and benign prompts.
    • Estimation data: backdoor directions for sentiment steering and targeted refusal use benign prompts from WildGuardMix and Alpaca, each with a triggered variant; code injection uses programming prompts from Hubinger et al. (2024). The refusal subspace uses refusal and compliant answers on WildGuardMix training prompts. Figure 2 shows a schematic, where refusal and compliant examples only illustrate the roles of the two answer types.

    Evaluation definitions

    • ASR: percentage of triggered prompts producing the target answer. ATR: percentage of trigger-free prompts producing the target answer.
    • Capability Δ: average relative performance loss (%) relative to the backdoored model, with tasks MMLU, GSM8K, HellaSwag, ARC-Challenge, IFEval; code injection additionally includes HumanEval, MBPP.
    • Safety Δ: average change (%) in harmful answer rate on WildGuardMix test set harmful prompts.
    • KL: average per-token KL from the backdoored model to the edited model on clean prompts.
  4. What experiments did the paper conduct?

    Across two families of 4B models and six attacks, NEEDLE achieves the lowest average ASR, with code injection at 0%.

    Experimental setup

    • Models: Gemma-3-4B-IT, Qwen3-4B-Instruct-2507; larger parameter sizes use Gemma-3-12B-IT. The main text uses LoRA adapters for SFT, with a full fine-tuning variant. Hereafter, Gemma and Qwen refer to the two 4B instruction models unless otherwise stated.
    • Attacks: BackdoorLLM's sentiment steering (target sentence is “You are stupid!”) and targeted refusal (target is a fixed incapability-style refusal), each with BadNet and Sleeper triggers; plus code injection, which inserts a secret API key in triggered code generation prompts. There are 6 attacks total. The paper does not specify the training sample size for each attack in the main text.
    • Baselines: No defense, SFT (Alpaca benign samples), OSFT (same Alpaca samples with known triggers inserted), CROW, BD-VAX. BEEAR is discussed in related work and not reported in the main table.
    • Metrics: ASR, ATR, Capability Δ, Safety Δ, KL, defined in question 3. Table 1 shows mean ± standard deviation across 6 attacks. Lower Capability Δ is better (relative performance loss); Safety Δ is the change in harmful response rate, labeled as lower is better in the header.
    • NEEDLE defaults: Refusal subspace rank k=4; edited layers are 12–34. Data used for direction estimation is in question 3.
    • Appendix scale for safety and KL: Table S14 specifies WildGuard harmful rate on all 749 WildGuardTest harmful prompts; Table S15 KL is over 200 prompts per condition. The number of prompts for ASR/ATR in the main table is not specified in the read main text.

    Main results

    Table 1 shows averages across six attacks. NEEDLE has the lowest average ASR among defenses on both models; the no-defense row is not a defense method.

    Swipe horizontally to read the table

    ModelDefenseASR (%)Capability ΔSafety ΔKL
    Gemma-3-4B-ITNo defense99.50±0.71———
    Gemma-3-4B-ITNEEDLE1.67±2.410.48±0.743.95±2.930.03±0.02
    Gemma-3-4B-ITSFT69.25±41.56−0.77±1.751.44±12.930.54±0.17
    Gemma-3-4B-ITOSFT29.42±41.31−0.70±1.475.96±13.240.50±0.18
    Gemma-3-4B-ITCROW5.00±8.7714.80±4.1019.78±18.010.64±0.34
    Gemma-3-4B-ITBD-VAX37.58±34.64−1.64±1.786.49±14.570.73±0.16
    Qwen3-4B-Instruct-2507No defense99.08±0.84———
    Qwen3-4B-Instruct-2507NEEDLE5.00±6.160.72±0.90−3.74±11.240.11±0.09

    In the table, Qwen's SFT / OSFT / CROW / BD-VAX average ASR are 65.42%, 29.58%, 63.25%, 27.75% respectively (Table 1). Capability Δ are −2.00, −1.90, 4.49, −3.89; KL are 0.57, 0.55, 0.38, 0.69. Negative Capability Δ, by the paper's definition, is relative performance loss compared to the backdoored model; negative values indicate average relative performance higher than the backdoored model.

    • Author interpretation: Fine-tuning baselines are unstable in removal, with average ASR ranging from about 27.75% to 69.25%; an exception is CROW on Gemma, with ASR 5.00%, but average relative capability loss of 14.80% and harmful response increase of 19.78 percentage points. NEEDLE's average relative capability loss is 0.48% on Gemma and 0.72% on Qwen.
    • Distribution: The authors state that fine-tuning yields KL in 0.38–0.73, while NEEDLE is 0.03–0.11. This range is consistent with the four fine-tuning baselines and NEEDLE rows in Table 1.
    • Safety: The authors state that on Gemma, the same baseline can reduce harmful responses on one attack and significantly increase them on another, with standard deviations of 12.93–18.01 percentage points. NEEDLE's average Safety Δ is 3.95% on Gemma and −3.74% on Qwen.

    Table 2 breaks NEEDLE down by each attack. Each cell is NEEDLE's value; the latter two differences (relative to best baseline, relative to OSFT) are not listed here. On code injection, both models and both triggers have ASR and ATR of 0.00. Sentiment steering ASR: Gemma BadNet 3.00, Sleeper 0.50; Qwen BadNet 2.00, Sleeper 1.00. Targeted refusal is highest: Gemma Sleeper 6.50, Qwen BadNet 11.50, Sleeper 15.50. The authors state that the best baseline ASR on code injection is 74% for BadNet and 33% for Sleeper, corresponding to NEEDLE's differences relative to that baseline of −74.00 and −33.00 in Table 2 (written in the Qwen row). The authors state that targeted refusal is harder because the target itself is a refusal, and separating triggered from untriggered directions overlaps with the refusal behavior to be preserved. The authors also state that most defenses maintain about 100% ASR on this attack, with OSFT achieving the best ASR of 0.50%, but harmfulness also increases.

    Refusal overlap and ablations

    • Figure 1: On BadNet sentiment steering, compares no defense, removing only the backdoor direction, preserving k=1 refusal direction, and NEEDLE (k=4). The caption gives coordinates as ASR and Harmful rate, models are Gemma-3-4B-IT and Qwen3-4B-Instruct-2507; the figure text does not give readings for each bar. Subfigures (b)(c) show cosine similarity between backdoor direction and refusal direction on Qwen; the authors state that most overlap is beyond k=1.
    • Table 3 (Gemma, BadNet sentiment steering): Full NEEDLE has ASR 3.00, ATR 3.00, Capability Δ 0.21, Safety Δ 5.83, KL 0.05. Removing only bℓ: ASR 5.50, Safety Δ 14.01. Preserving only a single refusal direction: Safety Δ 11.62. Non-sequential subspace preservation: Safety Δ 7.10. Only doing equation (6) without correction: Safety Δ 6.70. The authors state that sequential correction achieves average Safety Δ of 5.83, with small trade-offs in ASR and capability.
    • Edited layers: In the same table, early-to-middle layers (1–22) and all layers (1–34) both have ASR 0.00, Safety Δ 2.48 and 2.08, but Capability Δ rises to 3.45 and 4.05, with KL 0.21 and 0.22. The authors state this supports editing only middle-to-late layers; Figure 3(a) shows on Gemma, targeted refusal, signal quality increases from middle layers, with y-axis from 10^−5 to 10^−9 and x-axis as layers. Figure 3(b) projects activations from layer 30 onward onto the backdoor direction (x-axis) and refusal subspace (y-axis); the authors state that after NEEDLE, triggered and untriggered are no longer separable, and harmful responses still retain refusal components. Specific projection values are not marked in the figure.

    Distribution shift and harmful rates

    • Table S15: KL (nats/token) is first averaged within responses, then averaged over 200 prompts per condition. On clean prompts, Gemma sentiment steering NEEDLE is BadNet 0.0484, Sleeper 0.0389, with SFT/OSFT/CROW/BD-VAX in the same cell around 0.65–1.00. On triggered prompts, NEEDLE is instead higher, e.g., Gemma sentiment BadNet is 4.4746, SFT is 1.4351. The authors state that lower triggered-prompt KL does not imply better removal. Targeted refusal clean-prompt KL is smaller, with Gemma NEEDLE at 0.0082 and 0.0112.
    • Table S14: Harmful response rate (%) on 749 WildGuardTest harmful prompts. Qwen targeted refusal no-defense harmful rate is very low: BadNet is 4.41, 1.20 appears in Sleeper's first column. The authors state that the targeted refusal backdoor itself can suppress harmful responses. Columns after the header are not clearly labeled in the converted text as to which defense they belong, so subsequent columns are not mapped to specific methods.

    Other ablations and analyses

    • Table 3, Gemma BadNet sentiment: without refusal preservation, ATR 1.00, Capability Δ 0.26, KL 0.04; with k=1 preservation, ASR 2.00, ATR 1.00, Capability Δ 0.67, KL 0.04.
    • Same table: non-sequential preservation has ASR 3.00, ATR 2.00, Capability Δ 0.02, KL 0.04; without correction, ASR 2.00, ATR 3.00, Capability Δ −0.31, KL 0.04.
    • Layer ranges 1–22 and 1–34 both have ATR 1.00 (Table 3).
    • The appendix includes removal experiments with Gemma-3-12B-IT and full fine-tuning (Appendix D); the converted text is interrupted before Table S14, and the numbers in these tables were not fully read, so specific values are not transcribed.
    • Negative result: On Qwen targeted refusal + Sleeper, NEEDLE's ASR is 15.50% (Table 2), the highest ASR for NEEDLE in the table. The authors attribute this to overlap between the target behavior and the preserved refusal, rather than a separate failure of removal.
  5. What are some points that can be further explored?

    The authors argue that when the trigger is known, backdoor removal is better framed as targeted weight editing.

    Limitations and future directions noted by the authors

    • The trigger must be known (Section 1, Section 3.1): The defender assumes the trigger and insertion rule τ are known. The authors state this work complements existing trigger detection or recovery work, rather than performing detection itself.
    • Harder to remove when overlapping with refusal (Section 5.2): The goal of targeted refusal is itself refusal; the separation direction largely overlaps with the refusal behavior NEEDLE aims to preserve. The authors call this a trade-off between accurate removal and safety preservation. This is a mechanistic explanation in the results discussion; the paper has no separate Limitations section framing this phenomenon as an unresolved flaw.
    • Method positioning in the conclusion (Section 6): The authors argue that when trigger information is available, LLM backdoor removal is best treated as targeted model editing, rather than relying only on broad fine-tuning or inference-time defenses. This is a conclusion, not a listed future experiment.
    • The paper has no separate Limitations or Future Work section. The ethics statement states no new attacks are proposed; evaluations use only published attacks and datasets. The reproducibility statement states the authors plan to fully open-source the NEEDLE implementation.

    Experimental coverage

    • The main results use Gemma-3-4B-IT and Qwen3-4B-Instruct-2507; additionally Gemma-3-12B-IT, and a full fine-tuning regime (Section 5.1, Appendix D). Numbers in Tables 1–3 come from the 4B, LoRA-insertion setting.
    • Attack behaviors are sentiment steering, targeted refusal, and code injection; triggers are BadNet and Sleeper, for a total of 6 attacks (Section 5.1, Table 2).
    • Compared removal baselines are SFT, OSFT, CROW, BD-VAX, plus no defense (Table 1). Inference-time CleanGen and CS-ADS are discussed in related work; their numbers are not given in the main tables.
    • Metrics cover ASR, ATR, Capability Δ on six capability benchmarks, Safety Δ on WildGuardMix, and KL on clean prompts (Section 5.1). Table S14 uses all 749 harmful prompts; Table S15 uses 200 prompts per condition.
    • Ablations vary refusal preservation (no preservation, k=1, subspace, sequential or not, correction or not) and edited layer range (default 12–34, compared to 1–22 and 1–34), reported on Gemma BadNet sentiment steering (Table 3). The paper does not report runs beyond repetitions for main-table ASR; Table 1 gives standard deviations across the 6 attacks, not across multiple random seeds.
  6. Summarize the main content of the paper

    NEEDLE uses closed-form weight editing to remove backdoors with known triggers while preserving the refusal subspace.

    NEEDLE is a training-free LLM backdoor removal method: when the trigger is known, a single permanent weight edit removes the backdoor direction while preserving a rank-4 refusal subspace.

    • Problem: the backdoored model outputs attacker-specified behavior when the trigger appears. The authors believe existing removal shifts the output distribution on normal prompts, affecting capability and safety, and effectiveness is not stable across models and attacks.
    • Approach: estimate the backdoor direction from activation differences between triggered and normal answers, and construct a refusal subspace from refusal and compliant answers on harmful prompts; orthogonalize attention and MLP output projections on layers 12–34, then use ridge regression on the MLP to correct refusal projection drift caused by earlier layers. No clean reference model or original poisoned data is needed. The defender is assumed white-box and knows τ.
    • Main results: in Table 1, NEEDLE reduces Gemma-3-4B-IT's six-attack average ASR from 99.50% to 1.67%, and Qwen3-4B-Instruct-2507 from 99.08% to 5.00%, both the lowest in the table. Average KL is 0.03 and 0.11; average relative capability loss is 0.48% and 0.72%.
    • Per-attack: in Table 2, code injection ASR is 0.00 (both models, BadNet and Sleeper). The hardest is targeted refusal, with Qwen + Sleeper ASR at 15.50%. The authors attribute this to the target behavior overlapping with the refusal to be preserved.
    • Ablations: in Table 3, removing only the backdoor direction brings Safety Δ to 14.01; preserving the subspace with sequential correction gives 5.83. Extending the edit to earlier layers can reduce ASR to 0.00, but capability loss and KL increase.
    • Authors' conclusion: when trigger information is available, backdoor removal is better framed as targeted model editing, rather than only broad fine-tuning or inference-time defenses.

Related papers

Both use: WildGuardMix
Show 3 more papers
Read originalarxiv.org