NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Localize-and-Detect: Auditing Task-Level Poisoning in Instruction-Tuned Models

Luze Sun, Cristina Nita-Rotaru, Alina OpreaarXiv 2026

TL;DR

Researchers have developed Localize-and-Detect, a two-stage black-box auditing framework designed to catch "task-level poisoning" in Large Language Models (LLMs). Unlike traditional backdoors that require a specific trigger word, this method identifies attacks where an entire task (like summarization) is manipulated to produce biased content, achieving high detection rates without needing access to the model's internal weights.

What Problem Does This Paper Address?

Instruction fine-tuning is the standard way we turn raw pretrained models into helpful assistants. However, this process introduces a stealthy vulnerability: task-level poisoning.

In a typical backdoor attack, a model might behave normally unless it sees a specific "trigger" (e.g., the word "JamesBond"). In task-level poisoning, the "trigger" is the task itself. For example, an attacker could poison a model so that every time it is asked to write a creative verse, it mentions a specific brand, regardless of the prompt.

Detecting this is incredibly difficult for three reasons:

  1. No explicit trigger: There is no "magic word" to search for.
  2. Unknown bias: The auditor doesn't know what the injected content is.
  3. Benign noise: Legitimate fine-tuning also changes a model's behavior and output distributions, making it hard to distinguish a "feature" from a "bug."

Methods

The authors propose a two-stage, black-box auditing method that only requires access to the outputs (next-token distributions and sampled responses) of the base model ($M_{base}$) and the fine-tuned model ($M_{target}$).

Fig. 1. Localize-and-Detect audits a fine-tuned model for task-level poisoning in two stages. In the first stage, it compares the fine-tuned and base models across a set of candidate tasks and ranks the tasks with the largest differences in their next-token distributions. In the second stage, it searches the highest ranked tasks for biased content that repeatedly appears in the fine-tuned model’s responses but not in those of the base model.

Stage A: Target-Task Localization

The auditor starts with a large set of candidate tasks. For each task, they compare the next-token distributions of the base and fine-tuned models using Jensen–Shannon (JS) divergence. The logic is that fine-tuning on a specific task (whether benign or poisoned) will cause the most significant shifts in how the model predicts the next word for that task. The top-$K$ tasks with the highest divergence are shortlisted.

Stage B: Biased-Content Detection

For the shortlisted tasks, the auditor samples multiple responses from both models. They then search for "admissible candidates"—$n$-grams that appear frequently in the fine-tuned model's responses but are absent from the base model's responses and the prompts themselves.

  • Scoring: Tasks are flagged if the "coverage" (the fraction of responses containing a specific recurring string) exceeds a success threshold ($t^* = 0.60$).
  • Extraction: The method uses TF-IDF to rank these strings, effectively "extracting" the specific biased content the attacker injected.

Datasets

The study utilizes the PoisonForge benchmark, evaluating 216 poisoned models across two major families: Llama-3.1-8B and Qwen2.5-7B.

  • Tasks: The evaluation covers open-generation tasks from Super-NaturalInstructions, specifically focusing on creative verse, long narrative, and dialogue turns.
  • Poisoning Modes: They tested three modes: Fixed (same entity every time), Sentence (a full statement), and Category (different members of a group, like "Central American countries").
  • Clean Models: 30 clean models were used to establish a baseline for false-positive rates.

Key Insights and Ideas

  • Black-Box is Enough: One of the most surprising findings is that white-box access (looking at internal hidden states or attention heads) does not significantly improve task localization. The output distribution shift is a sufficiently strong signal.
  • The "Aha" Moment on Benign Training: While Stage A identifies any task the model was trained on (benign or poisoned), Stage B acts as the crucial filter. Benign training improves task performance but doesn't usually force the model to repeat a specific, new string across 60%+ of its outputs.
  • Generalization: The method isn't just for PoisonForge; it successfully localized target scenarios in other attacks like Virtual Prompt Injection and Concept-ROT.

Key Results

The framework proved highly effective at distinguishing poisoned models from clean ones.

Fig. 2. ROC curves for Stage B biased-content detection with the target task provided. The curves compare poisoned target-task evaluations with 430 clean task evaluations, and show results for all 108 poisoned models and subsets grouped by attack success rate (ASR). The operating threshold t⋆detects 64 of 108 poisoned models while producing no false positives. Stage B achieves an AUC of 0.982 across all poisoned models and 1.000 for models with ASR ≥0.60.
  • High Accuracy: For successful attacks (Attack Success Rate $\ge$ 0.60), the method achieved an AUC of 1.000. Across all 108 poisoned Llama models (including weak attacks), the AUC was 0.982.
  • Low False Positives: The method flagged only one out of 30 clean models across multiple generation seeds.
  • Detection Margin: As shown in the figure below, there is a strong correlation between the strength of the attack (ASR) and the detection margin ($S_B - t^*$). The more successful the attack, the easier it is to detect.
Fig. 3. The plot shows the ASR and the Stage-B detection margin of the 108 poisoned models, with the target task provided. Each point is one model, and the marker shows the poisoning mode. The solid horizontal line shows SB −t⋆= 0, and Stage B detects the models on or above this line. The dashed vertical line shows the success criterion, ASR = 0.60. Stage B detects 49 of the 53 models with ASR ≥0.60 and 15 of the 55 models with ASR < 0.60. The margin increases with ASR.

Limitations and Future Work

  • Candidate Task Set: The auditor must have a candidate task set that includes the target task. If the attacker poisons a highly niche or custom task not in the auditor's library, the attack will likely go undetected.
  • Adaptive Attackers: A sophisticated attacker could try to evade Stage B by spreading the bias across many different "aliases" so that no single string meets the 60% coverage threshold. The authors found that while this reduces detection, it also tends to lower the overall attack success rate.
  • Content Length: The current implementation limits candidate strings to six words, which may fail to capture very long, complex biased statements in their entirety.
  • Future Direction: The authors suggest moving toward semantic grouping of biased content to counter attackers who use varied phrasing to express the same bias.

Summary updated

BibTeX
@misc{sun2026localize,
  author = {Luze Sun and Cristina Nita-Rotaru and Alina Oprea},
  title = {{Localize-and-Detect: Auditing Task-Level Poisoning in Instruction-Tuned Models}},
  year = {2026},
  eprint = {2610.03960},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.03960},
}
Figure