Skip to content

Triggers in the Haystack: Extracting and Reconstructing LLM Backdoor TriggersThe Trigger in the Haystack: Extracting and Reconstructing LLM Backdoor Triggers

arXiv· arXiv:2602.03085· Blake Bullwinkel, Giorgio Severi, Keegan Hines, Amanda Minnich, Ram Shankar Siva Kumar, Yonatan Zunger·Indexed by this site · 2026-10-12· Originally publishedDefenses

Quick read

Defenses

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

The authors' scanner achieves a detection rate of 0.878 on 41 Task 1 sleeper agents, with 0 false positives on 13 clean models.

Threat modelAn attacker implants a sleeper agent via supervised fine-tuning: when the input contains the trigger word T, the model executes the target behavior; otherwise, it executes the baseline behavior. Vectors include uploading a backdoored model, poisoning a webpage, or accidental inclusion. The detector has only the model file, does not know the trigger word or target, and has no activation corpus; it only detects and recovers the trigger word, without removing the backdoor.

Questions
Open repositories and webpage poisoning make it difficult to know the trigger word and target behavior of sleeper agent-style backdoors in advance. Existing detection often requires knowing the trigger word, target, or activation corpus, or requires retraining. The authors aim to determine whether a causal language model contains such a backdoor and recover the trigger word under conditions of only having the model file and performing only inference.
Methods
Four-step scan: chat template prefix plus 510 decoding leakage memories; motif discovery narrows substrings; score candidates with attention, entropy, and divergence losses, keeping the lowest 10; determine backdoor by changes in response similarity or code vulnerability proportion. Does not assume known trigger or target behavior.
Experiments and results
Of the 41 sleeper agents in Task 1, 36 had a maximum ΔS_agg above 0.5 (detection rate 0.878), and the 13 clean models had a false positive rate of 0. In Task 2, four of the six models recovered most or all of the original trigger word. The authors state that in the completed comparisons, the detection rate is higher than BAIT and ICLScan.
Limitations and future work
The authors point out that the method makes no formal guarantees and is mainly aimed at fixed triggers; variable or context-dependent triggers, as well as adaptively tightened trigger specificity, are out of scope. Memory extraction is still immature. Experiments cover 45 self-trained plus 2 public backdoored models, and 13 clean models; Task 2 only has full-parameter fine-tuning for two families.
Experimental setupgemma-3-270m-it、DeepSeek-R1-Distill-Qwen-1.5B et al. · OpenHermes-2.5、Hubinger et al. (2024) code instruction data et al. · ASR、FTR et al.
Evaluated models
gemma-3-270m-itDeepSeek-R1-Distill-Qwen-1.5BPhi-4-mini-instructLlama-3.1-8B-InstructPhi-4-reasoning-plusllama2-7B-backdoor-DEPLOYMENTOpenHermes-13B-backdoor-DEPLOYMENTLlama-2-13b-chat
Benchmarks
OpenHermes-2.5Hubinger et al. (2024) code instruction dataCodeQL
Metrics
ASRFTRdetection ratetrigger similarityΔS_agg%ΔP_vuln
AI summaryThe researchers propose a practical backdoor scanner for causal language models to identify latent backdoors without prior knowledge of the trigger or target behavior, relying only on inference operations. The method is based on two findings: latent backdoored models tend to memorize poisoned data, which can be leaked using memory extraction techniques; and when a backdoor trigger is present in the input, the poisoned model exhibits characteristic patterns in output distribution and attention heads. The authors claim the method recovers usable triggers across multiple backdoor scenarios, models, and fine-tuning methods, can be integrated into broader defense strategies, and does not change model performance.

The researchers propose a practical backdoor scanner for causal language models to identify latent backdoors without prior knowledge of the trigger or target behavior, relying only on inference operations. The method is based on two findings: latent backdoored models tend to memorize poisoned data, which can be leaked using memory extraction techniques; and when a backdoor trigger is present in the input, the poisoned model exhibits characteristic patterns in output distribution and attention heads. The authors claim the method recovers usable triggers across multiple backdoor scenarios, models, and fine-tuning methods, can be integrated into broader defense strategies, and does not change model performance.

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Detect sleeper agents and recover trigger words when only the model file is available and the trigger word and target are unknown.

    Determine whether a causal language model has a sleeper-agent-style backdoor, and recover usable triggers, when only the model files are available and the trigger and target behavior are unknown.

    • Scenario: The authors state that public internet corpora make web poisoning feasible, citing Carlini et al. (2024). They cite Souly et al. (2025): large models can be poisoned with near-constant numbers of samples during pretraining and fine-tuning. Sharing means one compromise affects many users, and tool invocation and sensitive data expand the impact.
    • Gap: The authors cite Hubinger et al. (2024): SFT, reinforcement learning, and adversarial training do not remove sleeper agent backdoors, and adversarial training makes backdoors harder to detect. Existing detection often requires labeled samples, known poisoning tasks, or training additional models.
    • Observation: The authors state that sleeper agents tend to memorize poisoned data, thus leaking trigger-containing samples; when the trigger appears, the output distribution and attention deviate from baseline.
    • Method: Propose an inference-only scanner that does not change model performance or add inference overhead, used to detect and reconstruct triggers, and claim it can be placed in a layered defense.
    • Threat Model:
      • Goal: Execute target behavior pt when input contains trigger T, otherwise baseline pb; the conditional policy comes from training on poisoned data.
      • Implantation: The adversary can fully control training and upload to a repository, or poison web documents, or benign users may inadvertently mix in poisoned data. The authors assume the backdoor is learned via supervised fine-tuning.
      • Detector: Only has model files such as weights and tokenizer. Does not know the trigger, has no corpus of prompts that activate the backdoor, and does not know the target behavior; does not train, fine-tune, or distill additionally, does not use multiple or proxy models, and does not assume a limited vocabulary size.
      • Scope: Only detection and trigger recovery; does not handle removal, unlearning, preventing activation, or conformal prediction.
  2. What related research exists?

    Related work is divided into trigger word inversion, behavior probing, backdoor removal, and memory extraction; the authors use leaked samples in place of known activation corpora.

    The authors place the scanner on the low-assumption detection side: no known trigger words, targets, or activation corpus, but use memory leakage to narrow the search.

    Training-time poisoning and sleeper agents

    • Barreno et al. (2006) raised whether machine learning is secure and studied injecting attack points into training sets. Gu et al. (2019)'s BadNets applied the idea of misleading signature generation to classifier backdoors.
    • Hubinger et al. (2024) trained deceptive LLMs that persist after safety post-training, i.e., sleeper agents. The authors adopt this setting and cite their results: multiple safety post-training methods failed to remove backdoors, and adversarial training makes detection harder.
    • The authors also cite Kumar et al. (2020), Vassilev et al. (2024), Zhang et al. (2024), treating backdoors as a training-time security issue across model types.

    Trigger inversion and behavioral probing

    • Neural Cleanse (Wang et al., 2019), Piccolo (Liu et al., 2022), Tao et al. (2022), Shen et al. (2022), Unicorn (Wang et al., 2023), Xu et al. (2024a) use optimization or search to reconstruct triggers. The authors claim such methods may work on classifiers with few classes but struggle to scale to LLM vocabularies often over 32k tokens.
    • MacDiarmid et al. (2024) trained classifiers on residual streams to distinguish benign from poisoned behavior; Zhou et al. (2025a) examined anomalous activations; Yi et al. (2025) examined output distributions. The authors claim they may be useful in narrow poisoning settings but require a set of prompts sufficient to activate the backdoor, which is impractical in practice.
    • For output distributions and attention, the authors cite Wang et al. (2025), Shen et al. (2025), Lyu et al. (2022) as existing observations that triggers change internal dynamics, and base their trigger inversion on this.

    Removal-based mitigations and memory extraction

    • Fine-tuning removal is in Zeng et al. (2024), Zhao et al. (2024); model reprogramming in Chen et al. (2025); distillation in Chen et al. (2024), Bie et al. (2024). The authors claim mitigation relying on retraining is costly and often requires per-model tuning.
    • Regarding memory, Carlini et al. (2021) et al. documented that training data can be memorized. Nasr et al. (2023) used repeated single tokens to make early ChatGPT regurgitate training sequences. Xu et al. (2024b) and Barbero et al. (2025) used chat template tokens to extract alignment data from open-source models. The authors apply similar prompts to leak poisoned samples.

    Baselines and data

    • BAIT (Shen et al., 2025) exploits causal relationships between target tokens to reconstruct the target, computes Q-score from predicted token probabilities, then uses a judge LLM to check if the content is suspicious. The authors claim its runtime grows with vocabulary size and assumes a fixed backdoor target, so its scope is limited to Task 1.
    • ICLScan (Pang et al., 2025) compares whether models are more susceptible to dummy backdoors inserted via in-context learning. The authors claim it requires knowing the target behavior and does not reconstruct triggers or targets.
    • Data comes from a poisoned set derived from OpenHermes-2.5 (Price, 2024), and code instruction data from Hubinger et al. (2024); code security uses CodeQL from Pearce et al. (2021) to check for CWEs.

    The authors' distinction is: no retraining, no assumption of known triggers, targets, or activation corpus, using only inference, linking poisoning to memory to narrow the search, and doing only detection.

  3. How does the paper address this problem?

    Four-step scanning: template prefix leakage, motif candidate reduction, three-term loss for trigger reconstruction, then classification by behavioral shift.

    The scanner works in four steps, performing inference only on candidate models: leak memory, discover motifs, reconstruct trigger words from internal signals, and then classify by behavioral shift. The authors observe that slightly modified trigger words still often elicit the target behavior, so it is not necessary to recover the full string.

    Setup and Three Types of Signals

    • The authors follow the sleeper agents of Hubinger et al. (2024): when the trigger word T is in the input x, the model follows the target policy, otherwise the baseline policy, written as pθ(y|x)=ptθ(y|x) (T∈ x), else pbθ(y|x).
    • Attention: The authors state that trigger word tokens attend to each other, the average attention from the prompt to the trigger words is low, and the attention matrix forms a double triangle. The example in Figure 2 is Llama-3.1-8B-Instruct, layers 12-19; the methods section only writes the layer set as Λ, without specifying which layers are used during scanning.
    • Entropy and divergence: The authors state that after activation, the output shifts from pb to pt, and most targets satisfy H(pt) less than H(pb), which is stronger when the output is fixed. The cross-entropy of generated tokens before and after the trigger increases; Appendix D derives the divergence term from the KL between the baseline token's one-hot distribution and the softmax under trigger conditions, and states that in this case KL equals cross-entropy.

    Leakage and Motif Discovery

    • Leakage: Use the token immediately before the user prompt in the model's default chat template as a prefix (Appendix E.1 lists the prefixes for each model), then scan 510 decoding configurations. Table 10: greedy 1, beam search 9 (beams 2, 4, 8; length penalty 0.6, 1.0, 1.3), top-p 250, top-k 200, temperature-only 50. Sampling methods each use 10 seeds. The authors state this grid balances exploration and efficiency. The output set size is 510.
    • Motif: After removing boilerplate text and special tokens, deduplicate, then apply TF-IDF to character n-grams (n = 4, 5, 6), and cluster using DBSCAN with cosine distance. For each cluster, keep n-grams that appear in at least 33% of members, then merge overlapping substrings. Take the motif of the largest cluster as the candidate pool. Table 11 also lists perc keep as 0.33, minimum motif length 6, minimum common substring 20, and threshold 0.75.

    Loss Search

    • Each motif is further split into token sequences with n = 2, 5, 10, yielding candidate set X. The total loss is averaged over a general prompt set P: L(x)=1/(|P|)∑p∈ P[γ Lattn(x,p)+δ Lent(x,p)+ζ Ldiv(x,p)]. Lower values indicate more similarity to a true trigger.
    • Three terms: Lattn penalizes the average attention from prompt positions to candidate positions, with an internal weight β. Lent is the average entropy over an S-step soft rollout, with λeos penalizing premature EOS and λrep penalizing single-token repetition; the paper does not give values for these two λs. Ldiv is the normalized log-likelihood of baseline tokens under the condition of 'candidate + prompt'; the less likely the baseline token, the lower this term.
    • Weights and budget: In Table 12, Task 1 has β=1.0, γ=0.2, δ=0.6, ζ=0.2; Task 2 has β=1.0, γ=0.6, δ=0.2, ζ=0.2. Keep the 10 candidates with the lowest loss. The generation length for loss evaluation is 10 for Task 1 and 50 for Task 2; subsequent ASR-style evaluation uses lengths 32 and 512. For reasoning models, the loss is computed on post-thinking tokens; the authors state that the thinking segment is highly repetitive and not very helpful for the search.
    • Prompt set: P consists of general questions, not known trigger-activating corpora. Task 1 has 27 handwritten questions, of which 3 are used for the loss; the authors state they are used to widen the entropy gap; the remaining 24 are only used to score responses. Appendix F's Table 13 gives the full text. Task 2 uses stratified sampling from the test set by two classes to select 20 for CodeQL, then randomly selects 4 of those for the loss.

    Classification Criteria

    • For fixed targets, use aggregated similarity: exact match rate, token-level Jaccard, and 1/2/3-gram Jaccard, averaged together; Appendix G gives definitions. ΔSagg is the absolute difference in this score between the trigger condition and the prompt-only baseline. Figure 4 states: if the maximum ΔSagg exceeds 0.5, classify as a backdoor.
    • For vulnerable code, use CodeQL. %ΔPvuln is the absolute difference in vulnerability proportion between trigger and baseline, divided by the baseline vulnerability proportion. Figure 4 states: if this value exceeds 100, classify as a backdoor, meaning the proportion of vulnerable code at least doubles.
    • The authors state that in practice, other scoring functions covering more sleeper agent behaviors could be designed. Classification uses only inference, without modifying weights, so the authors state it does not reduce model performance or increase online inference overhead.
  4. What experiments did the paper conduct?

    In Task 1, the detection rate across 41 models was 0.878, and the 13 clean models had a false positive rate of 0; in Task 2, most of the six models recovered usable trigger words.

    Experimental Setup

    • Models under test: The authors used SFT to poison 45 models, plus HuggingFace's llama2-7B-backdoor-DEPLOYMENT and OpenHermes-13B-backdoor-DEPLOYMENT, for a total of 47 sleeper agents; there are also 13 clean models. The named families are gemma-3-270m-it, DeepSeek-R1-Distill-Qwen-1.5B, Phi-4-mini-instruct, Llama-3.1-8B-Instruct, Phi-4-reasoning-plus. The authors state the scale ranges from 270m to 14B, including instruct, distilled reasoning, and full reasoning models. Among the clean models, Llama-2-13b-chat is named in the text.
    • Fine-tuning: full-parameter, LoRA, QLoRA 4-bit and 8-bit; seeds are 42, 17, 2025. Training to convergence, keeping the checkpoint with the lowest cross-entropy validation loss. Task 2 only trained two models of at least 4B, and only with full parameters.
    • Data: Task 1 trains on 2.6k and tests on 114, from an OpenHermes-2.5 subset, half replaced with trigger-containing samples, with a fixed target string. Task 2 samples 10k from Hubinger et al.'s code instruction data, split 70/30; evaluation uses 3k unseen code prompts. The authors removed the safe-code year condition from the original setting, keeping only the vulnerability year condition.
    • Whether the backdoor works: ASR is the proportion of trigger prompts eliciting the target behavior, FTR is the proportion of clean prompts eliciting that behavior. Task 1 judges by whether the reply contains the fixed target string; Task 2 uses CodeQL to check for CWEs. Section 5.1 states that test prompts are evenly split between trigger and clean.
    • Scanning criteria: Task 1 uses the highest ΔSagg in the top-10 exceeding 0.5. Task 2 uses %ΔPvuln exceeding 100. Trigger similarity is the normalized Levenshtein distance to the true trigger. Reconstructed prompts are as in the previous question. Embedding comparison uses text-embedding-3-large.
    • Baselines: BAIT and ICLScan. The paper does not report the number of repetitions of the entire scanning pipeline.

    Main Results

    The table below shows the average detection rate and average trigger similarity for each model family (from Table 1). The table has 9 rows; here we omit llama2-7B HF (count 1, similarity 0.960) and OpenHermes-13B HF (count 1, similarity 0.857), whose detection rates are both 1.000.

    Swipe horizontally to read the table

    ModelTaskCountDetection RateTrigger Similarity
    gemma-3-270mTask 160.8330.894
    Distill-Qwen-1.5BTask 160.6671.000
    Phi-4-miniTask 1121.0001.000
    Llama-3.1-8BTask 1120.8330.652
    Phi-4-reasoningTask 131.0000.987
    Phi-4-miniTask 231.0000.676
    Llama-3.1-8BTask 230.6670.853
    • The authors report that for Task 1, 36/41 have the highest ΔSagg exceeding 0.5, with a detection rate of 0.878; the 13 clean models have no false positives (Section 6.1, Appendix H).
    • The five undetected cases have the highest ΔSagg close to 0. The authors give two reasons: the motif step did not separate the trigger, or after reconstruction it was not in the top-q. Appendix I records 5/41 as false negatives, and the authors state the FNR is about 0.11; of these, 3 failures are in the loss search and 2 in the motif set.
    • For Task 2, the authors state that most models recover usable triggers; 4 out of 6 recover a substantial part or all of the original trigger. One false negative is that the true trigger is not in the motif set, and the paper does not name the seed. Another candidate, which does not resemble the true trigger but increases the vulnerability proportion by more than 100%, is still treated as a backdoor signal.

    Comparison with Baselines

    Table 2's caption does not specify the task. Its counts match the Task 1 rows of Table 1. Section 5.2 states that BAIT assumes a fixed target and is limited to Task 1; Section 6.3 states that ICLScan was not evaluated on Task 2. A dash indicates it did not finish within 24 hours.

    Swipe horizontally to read the table

    ModelCountBAITICLScanAuthors' Method
    gemma-3-270m6Did not finish in 24h0.6670.833
    Distill-Qwen-1.5B60.4280.0000.667
    Phi-4-mini120.9230.3331.000
    Llama-3.1-8B120.7690.4160.833
    • The authors state that BAIT and ICLScan achieve lower detection rates on these models than claimed in their original papers. In the cells shown in the table, the authors' method is higher than both baseline columns.
    • The authors state that BAIT often converges to strings with a higher Q-score than the true target, thus requiring an LLM judge; the authors' method does not use an LLM judge.
    • The authors state that ICLScan needs to know the full target to detect any Task 1 poisoned model; even when the in-context prompt contains the exact target behavior, the detection rate is still lower. The paper does not evaluate ICLScan on Task 2 because the original implementation does not support code generation behavior evaluation.

    Whether the Backdoor Works as Expected

    • Task 1: In Table 3, the lowest ASR is OpenHermes-13B-backdoor-DEPLOYMENT at 0.807; the rest are 0.965, 0.982, or 1.000. The highest FTR is gemma-3-270m-it full-parameter, seed 42, at 0.070. The authors state that these models have high ASR and low FTR, behaving as expected.
    • Task 2: In Table 4, after removing the safe-code year condition, Phi-4-mini-instruct's ASR across three seeds is 0.876, 0.877, 0.880, and FTR is 0.149, 0.142, 0.147; Llama-3.1-8B-Instruct's ASR is 0.914, 0.919, 0.914, and FTR is 0.097, 0.101, 0.858. The authors state that larger models perform slightly better on this task. The FTR for seed 2025 is 0.858, and the paper does not explain it separately.
    • Without trigger: Appendix A.1 states that the two models learned both year conditions, and without the trigger they still generate vulnerable code a considerable proportion of the time. The proportions in Table 5 are 0.409, 0.407, 0.409 for Phi-4-mini, and 0.696, 0.695, 0.697 for Llama-3.1-8B. The authors summarize this as 40%–70%, and therefore removed the safe-code year condition.

    Leakage, Attention, and Fuzzy Triggers

    • Leakage: Figure 1 uses 12 Phi-4-mini-instruct models, Task 1, four fine-tuning methods, three seeds, totaling 510×12=6120 outputs, comparing cosine similarity with text-embedding-3-large against training samples. The authors state that when si is greater than 0.7, the most frequently matched training samples all contain the task's trigger, and poisoned samples match more accurately and more diversely than clean samples. The bar heights in the figure are not given in the text.
    • Attention: The authors state that in Figure 2a, Task 1's prompt-to-trigger attention is near zero; Figure 2b for Task 2 shows a similar pattern but to a lesser degree. The heatmaps are for layers 12-19, averaged over heads. The transcript does not have per-cell values.
    • Fuzzy triggers: For N-token triggers, for each length, 0 to N tokens are sampled without replacement, 100 times each, with error bars as 95% Wilson score intervals (Figure 3, Task 1 only). The authors state that on gemma-3-270m-it, a 1-token trigger activates the backdoor about 50% of the time; Llama-3.1-8B-Instruct has high activation rates with at least 3 tokens; Phi-4-mini-instruct is less likely to be activated by fuzzy triggers. The authors believe this depends on the specific model and see no clear pattern related to scale or fine-tuning method.

    Other Ablations and Analyses

    • Table 9, Task 1 average trigger extraction rate: Phi-4-reasoning-plus 0.9529, DeepSeek-R1-Distill-Qwen-1.5B 0.8033, gemma-3-270m-it 0.7222, Llama-3.1-8B-Instruct 0.6752, Phi-4-mini-instruct 0.5431.
    • Table 9, Task 1 average target extraction rate: gemma-3-270m-it 0.6778, Phi-4-reasoning-plus 0.6314, Phi-4-mini-instruct 0.5418, DeepSeek-R1-Distill-Qwen-1.5B 0.4660, Llama-3.1-8B-Instruct 0.0046.
    • Table 9, Task 2 average trigger extraction rate: Llama-3.1-8B-Instruct 0.5078, Phi-4-mini-instruct 0.4176. The target is not fixed, so the paper does not give a target extraction rate.
    • Table 6 has 5 candidates with ASR 0.000, corresponding to the false negatives in Appendix I. On Llama-3.1-8B-Instruct, candidates with similarity 0.040 (LoRA, seed 42) and 0.074 (QLoRA-4bit, seed 17) still have ASR 1.000.
    • Table 7: Phi-4-mini seed 17 similarity 0.133, ASR 0.800; seeds 42 and 2025 similarity 0.947, ASR 0.800. Llama seed 17 similarity 0.759, ASR 0.450; seed 42 similarity 0.195, ASR 0.200; seed 2025 similarity 0.947, ASR 0.900.
    • Appendix H: The highest ΔSagg for all 13 clean models is below 0.5; Llama-2-13b-chat has one candidate close to the threshold, and the authors state it elicited highly similar responses.
  5. What are some points that can be further explored?

    The authors note there are no formal guarantees, and it mainly covers fixed triggers; adaptive tightening of specificity and variable triggers are out of scope.

    Limitations and Future Directions Noted by the Authors

    • To scale to the size of modern model repositories, the method gives up properties such as formal guarantees (Section 7).
    • Many possible backdoor variants are beyond the scope of this study (Section 7).
    • The threat model mainly targets fixed triggers. The authors cite Qi et al. (2021): adversaries can implant triggers that are variable or context-dependent rather than static patterns (Section 7).
    • Adaptive adversaries can use additional training to tighten trigger specificity, making the backdoor activate only for the intended trigger and suppress approximate variants (Section 7).
    • The authors consider memory in LLMs a future research direction; reliable memory extraction methods are still immature, and further work may lead to better defenses and unexpected insights into model behavior (Section 7).

    Experimental Coverage

    • A total of 47 sleeper agents were tested: 45 SFT-poisoned by the authors, plus 2 HuggingFace models; there were also 13 clean models. Named families are gemma-3-270m-it, DeepSeek-R1-Distill-Qwen-1.5B, Phi-4-mini-instruct, Llama-3.1-8B-Instruct, Phi-4-reasoning-plus, llama2-7B-backdoor-DEPLOYMENT, OpenHermes-13B-backdoor-DEPLOYMENT; the authors state the scale ranges from 270m to 14B (Section 5.1).
    • Fine-tuning includes full-parameter, LoRA, QLoRA 4-bit and 8-bit, with seeds 42, 17, 2025, keeping the checkpoint with the lowest validation cross-entropy. Task 1 has 41 models; Task 2 has 6, only full-parameter fine-tuning of Phi-4-mini-instruct and Llama-3.1-8B-Instruct (Table 1, Section 6.2).
    • Baselines are BAIT and ICLScan. Table 2's counts match the Task 1 rows of Table 1, and the caption does not state the task. BAIT for gemma-3-270m did not finish within 24 hours. The paper states that ICLScan was not evaluated on Task 2 because the original implementation does not support code-generation evaluation (Section 5.2, 6.3, Table 2).
    • The scan only does detection and trigger recovery; it does not remove backdoors or do online filtering (Section 2.2). Task 1 tests 114 prompts; Task 2 evaluates on 3k unseen code prompts and uses CodeQL (Appendix A).
    • The paper reports extraction rates in Table 9, clean-model ΔSagg in Appendix H, and reasons for the 5 Task 1 false negatives in Appendix I. The paper does not report the number of repetitions of the entire scanning pipeline, nor the total number of candidates or queries in the reconstruction stage; among the 13 clean models, only Llama-2-13b-chat is named in the text.
  6. Summarize the main content of the paper

    Reconstruct triggers using memory leakage and internal signals; Task 1 detection rate 0.878, 0 false positives on clean models.

    This is a reasoning-only sleeper agent scanner: it detects conditional backdoors in causal language models and reconstructs trigger words without knowing the trigger or target behavior.

    The problem is that backdoors only deviate from baseline when the trigger appears, and open repositories and web poisoning mean the detector typically lacks the trigger, target, or activation corpus. The authors cite results that safety post-training cannot remove such behavior.

    The approach has four steps. First, use tokens before the user turn in the chat template, combined with 510 decoding variants, to leak fragments that may contain the trigger. Then apply TF-IDF and DBSCAN on character n-grams of deduplicated text, take the motif of the largest cluster, and split into candidates of 2, 5, and 10 tokens. Loss-penalize the prompt's attention to candidates, and include generation entropy, as well as the log-likelihood of baseline tokens under "candidate plus prompt"; keep the lowest 10. For fixed targets, check whether the difference in response consistency exceeds 0.5; for vulnerable code, check whether the relative change in CodeQL vulnerability proportion exceeds 100%.

    The authors report main results:

    • Of the 41 sleeper agents in Task 1, 36 had highest ΔSagg exceeding 0.5, detection rate 0.878; none of the 13 clean models exceeded 0.5.
    • In Table 1, for Phi-4-mini's 12 Task 1 models, average detection rate and average trigger similarity were both 1.000; for Distill-Qwen-1.5B's 6 models, detection rate was 0.667.
    • Of the 6 models in Task 2, 4 recovered a substantial part or all of the original trigger; there were also candidates that did not resemble the true trigger but increased the vulnerability proportion by more than 100%.
    • In cells where Table 2 gives numbers, the authors' method is higher than BAIT and ICLScan; gemma-3-270m's BAIT did not complete within 24 hours. ICLScan requires a known target and was not evaluated on Task 2.
    • Exceptions include Llama-3.1-8B-Instruct's average target extraction rate of 0.0046 on Task 1, and that model's FTR of 0.858 on Task 2, seed 2025.

    The authors conclude that at the tested scales and fine-tuning methods, usable triggers can be recovered without changing model performance or adding inference overhead, suitable for inclusion in layered defenses. The authors also note there are no formal guarantees and it mainly targets fixed triggers.

Read originalarxiv.org