Length-based positional triggers can backdoor LLMs without altering text
Positional encoding can be exploited as a stealthy backdoor trigger in transformer LLMs
AI/ML arXiv 14 May 2026 Attack Prototype evidence
Published as “MetaBackdoor: Exploiting Positional Encoding as a Backdoor Attack Surface in LLMs”
Why it matters
Defenses that only inspect token content or semantics will miss these length-based backdoors, so new mitigation strategies must consider positional representations.
Summary
MetaBackdoor shows that using input length as a positional trigger yields near-perfect attack success (≈100% ASR) across multiple LLM architectures, scales from 270M to 12B parameters, and even under parameter-efficient fine-tuning, while clean-task accuracy drops by less than 1 percentage point in most cases. The backdoor can be implanted with as few as 90 poisoned samples (≈5% poisoning rate). However, on the more complex MMLU benchmark the clean accuracy degrades by about 5.6 points, indicating some task-specific impact.
What they found 5
- Qwen-3 and Phi-4 achieve perfect activation for all trigger families.
“Qwen-3 and Phi-4 reach 100.00% ASR for all three trigger families.”
- Gemma-3-4B attains high success even with strict exact-match triggers.
“Gemma-3-4B is slightly less sensitive under the strict Exact Match setting, but still reaches 96.88% ASR, and its Threshold Match ASR increases to 99.49%.”
- Only 90 poisoned samples (≈5% poisoning rate) are enough to reach >90% ASR.
“With only 90 poisoned samples, the model already reaches an average ASR of 91.43% (± 8.49%).”
- The attack survives parameter-efficient fine-tuning: LoRA gets 100% ASR, DoRA 96.88% ASR.
“Full fine-tuning achieves 96.88% ASR. LoRA reaches 100.00% ASR across all tested ranks, while DoRA reaches 96.88% ASR.”
- Clean accuracy remains within 1.7 percentage points of the baseline across fine-tuning methods.
“Clean accuracy remains close to the clean baseline, with less than a 1.7 percentage-point drop across all methods.”
Caveats 1
- On MMLU, clean accuracy drops by about 5.6 percentage points, showing larger impact on knowledge-intensive tasks.
What’s new here 4
- Introduces positional (length-based) triggers instead of content-based tokens.
- Demonstrates that such triggers work under full fine-tuning and PEFT methods (LoRA, DoRA).
- Shows self-activating backdoors that fire as conversations naturally grow longer.
- Provides composable dual-key backdoors combining content and length conditions.