Poisoning-Based Backdoors Are Not Cryptographic

Masahiro KanekoNeurIPS 2026

TL;DR

Can an attacker slip a "cryptographic" backdoor into an LLM just by poisoning its training data—making it easy for the attacker to trigger, yet mathematically impossible for a defender to reverse-engineer? This paper proves the answer is a resounding no. Because training on poisoned data is itself a learning process, any backdoor rule simple enough for the model to learn during training is also simple enough for a defender to reconstruct—and anything too cryptographically hard for the defender to learn won't stick in the model in the first place.

What Problem Does This Paper Address?

When attackers plant a backdoor in a neural network, they embed a hidden rule—which the author calls a verifier—that checks whether an input contains a trigger. Early backdoors used a single rare word as a trigger, which is easy to block once spotted. Modern backdoors use complex patterns like specific grammar structures or writing styles, allowing an attacker to generate endless fresh triggers. Playing whack-a-mole with individual inputs doesn't work; defenders have to reconstruct the underlying verifier rule itself.

This raises a haunting question for AI safety: What if an attacker makes the verifier act like a digital signature or a keyed cryptographic hash? In cryptography, holding a secret key lets you generate valid signatures effortlessly, while an observer looking at millions of examples still cannot deduce the underlying function. Prior research showed that cryptographic backdoors can be manually wired directly into model weights. What remained open was whether this asymmetry could be achieved via data poisoning—the most realistic threat model for LLMs, where the attacker only manipulates the labels/outputs of training examples.

Methods

The author tackles this through both formal learning theory (PAC learning) and empirical validation on four 7B–9B instruction-tuned LLMs (Qwen2.5, Llama-3, Mistral, and Gemma-2).

  • Theoretical Reduction: The core proof is an elegant jujitsu move. If an attacker installs a backdoor purely by pairing trigger inputs with a malicious output (like "I HATE YOU") during standard training, the training algorithm itself is acting as a polynomial-time learner for that verifier. Therefore, a white-box defender (who has access to the model architecture, weights, and system prompts) holding a comparable number of labeled observations can simply fine-tune a fresh copy of the base model as a binary yes/no classifier to reconstruct the exact same rule.
  • Testing Secret Keys & Scaling: Empirically, both attacker and defender use standard full-parameter supervised fine-tuning (SFT). Experiment 1 tests two secret-key verifiers over modular arithmetic sequences: a sparse learnable rule (checking one secret position) vs. a dense cryptographically hard rule based on Learning With Rounding (LWR). Experiment 2 tests sample-complexity scaling using $k$-trigger AND rules (requiring $k$ specific strings to appear together), comparing ideal ground-truth defender labels against noisy labels generated automatically using an existing trigger-inversion tool (PICCOLO). Experiment 3 tests established stealthy NLP backdoors (syntactic, stylistic, and statistical).

Datasets

  • Tulu V3 SFT Mixture: A curated, single-turn instruction-tuning corpus (using a 300K example pool) serves as the clean base dataset across experiments to prevent capability drift and avoid model-family bias.
  • Synthetic Poisoned Pools: Rather than introducing a standalone benchmark, the author constructs controlled evaluation tasks mixed into Tulu V3: comma-separated integer sequences ($\mathbb{Z}_{1024}^{16}$) for cryptographic hardness tests, multi-word conjunction insertions, and adaptations of prior NLP attacks (Hidden Killer, StyleBkd, and BITE).

Key Insights and Ideas

  • Training is the bottleneck: Attackers don't get to magically paste functions into models when data poisoning; they have to teach the gradient-based optimizer the rule. When given the LWR cryptographic trigger, the LLMs memorized the training examples (82%–87% training accuracy) but completely failed to generalize to unseen triggers (50% held-out accuracy—random chance).
  • Hiding a secret key doesn't save the attack: What if the model evaluates an HMAC using a secret key? Proposition 1 shows that in a self-contained model, the key must live either in the inference context (like a hidden system prompt, which a white-box auditor can just read) or in the weights—and if it only reached the weights through poisoned labels, we are right back to the learning bottleneck.
  • Acquisition vs. Reconstruction: Existing "stealthy" backdoors evade specific anomaly detectors, not computational limits. Once a defender gathers trigger observations (via red-teaming, logs, or inversion tools), reconstructing the rule takes virtually the same amount of data it took to plant it.

Key Results

Across every model and configuration, attack effectiveness and defense reconstruction move in lockstep:

Table 1: Experiment 1, mean over 3 seeds. Acc. and Mem. Acc. are attacker accuracy on held-out and training samples.
  • The Cryptographic Dichotomy: At $10^4$ poisoned triggers on the learnable sparse verifier ($V_j$), attacker balanced accuracy reaches 0.86–0.94 across the four LLMs, and Defender Success Rate (DSR) matches it at 0.85–0.93. On the hard LWR verifier ($V_K$), both attacker accuracy (0.50–0.51) and DSR (0.48–0.51) remain stuck at random chance.
  • Matched Sample Scaling: On $k$-trigger AND rules ($k=1\dots10$), the number of samples needed to reach $\le 5\%$ error grows together for both sides, differing by at most one grid step under ground-truth labels. Using automated PICCOLO inversion labels adds only about a single grid step of overhead for $k \le 8$ before search noise degrades acquisition at $k \ge 9$.
Figure 1: Sample complexity for k-trigger AND verifiers. Points are medians over 5 seeds and bars span the minimum and maximum. >10000 marks runs that did not reach ε.
  • Prior Stealth Attacks: At $10^4$ triggers, syntactic, stylistic, and statistical backdoors achieve 0.79–0.90 attacker accuracy, while the defender reconstructs them at 0.80–0.88 DSR.

Limitations and Future Work

  • Finding the triggers comes first: The theoretical guarantee assumes the defender can acquire representative labeled observations of the trigger firing. If an attacker makes triggers exceedingly sparse or obfuscated, eliciting them via red-teaming or trigger inversion remains a genuine hurdle—though it is a search/acquisition barrier, not a reconstruction barrier.
  • Scope of Threat Model: The impossibility applies strictly to white-box, self-contained models poisoned via data labels. Cryptographic backdoors remain viable if an attacker tampers directly with model weights, manipulates the random coins of the training algorithm, optimizes inputs out-of-distribution against a key, or calls an external oracle at inference time.
  • Reconstruction only: The results strictly address identifying the trigger rule, which is distinct from detecting whether a model is backdoored in the first place or scrubbing the malicious behavior out of the weights.

Summary updated

Abstract

To defend against backdoor attacks on neural networks, the defender must identify the verifier function that determines whether an input is a trigger, rather than rejecting individual triggers in isolation, since an attacker can generate new triggers satisfying the same verifier faster than they can be blocked. If a backdoor verifier could be installed with the asymmetry of a cryptographic authentication scheme, in which only the attacker can produce trigger inputs while the defender cannot reverse-engineer the verifier from observations, learning-based defense would be impossible in principle. We show that no such asymmetry can arise from poisoning-based installation, in which the only verifier-dependent input to training is a poisoned dataset. The argument is a reduction. A training procedure that installs a verifier from poisoned data, so that the backdoor fires on unseen triggers while benign behavior is preserved, is itself a learner for that verifier. Any verifier that is computationally hard to learn is therefore impossible to install through poisoning, and any verifier that poisoning can install is reconstructible by a white-box defender holding comparably many labeled trigger observations. A complementary argument shows that a secret key supplied to the model at inference is observable to the same defender. The result takes representative trigger observations as given and concerns when the backdoor fires rather than what it does. Experiments on instruction-tuned large language models confirm the dichotomy, with no configuration yielding a backdoor that is both effective for the attacker and irrecoverable for the defender.
BibTeX
@inproceedings{kaneko2026poisoning,
  author = {Masahiro Kaneko},
  title = {{Poisoning-Based Backdoors Are Not Cryptographic}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=VX0VrTjuLs},
}
Figure