When Sanitization Becomes the Trigger: Defense-Triggered Backdoor Attacks

Zhiguo Yang, Ruotian Liu, Perley Xu, Wenjie RuanNeurIPS 2026

TL;DR

Imagine hiring an exterminator to clear out a wasp nest, only to find out that the bug spray actually hatched a hidden colony of hornets in your walls. In machine learning, we routinely "sanitize" untrusted third-party models to scrub away malicious backdoors before deployment. This paper introduces Defense-Triggered Backdoors (DTB), showing for the first time that an attacker can weaponize the sanitization process itself—using your own security cleanup as the exact switch that wakes up a dormant, undetectable backdoor.

What Problem Does This Paper Address?

When companies outsource model training or download weights from the internet, they run the risk of backdoor attacks—hidden behaviors where a specific input pattern (a "trigger," like a tiny sticker on a stop sign) forces the model to misclassify an image on command. Because training high-performing models from scratch is expensive, users rarely throw away suspicious models. Instead, they sanitize them using techniques like pruning suspicious neurons, fine-tuning on clean data, or knowledge distillation.

Until now, security pipelines operated on a comforting assumption: if you find a backdoor, scrub the model, and verify that the backdoor stops working while normal accuracy stays high, the model is safe. Previous research has shown that model compression (like quantization) can wake up dormant backdoors, or that backdoors can sometimes survive sanitization. However, no one had asked a much more adversarial question: Can the defense pipeline itself be turned into an attack surface?

Figure 2: Illustration of defense-triggered backdoors: the model deployer applies backdoor sanitization methods to a DTB model. However, the sanitization process inadvertently activates the hidden backdoor while removing the decoy backdoor.

Methods

The authors propose Defense-Triggered Backdoors (DTB), where an attacker implants two distinct backdoors during training: an active, obvious decoy backdoor ($b^{(d)}$) and a completely dormant hidden backdoor ($b^{(h)}$). The goal is a mathematical seesaw: when a defender scrubs away the decoy, that exact structural change wakes up the hidden backdoor.

Pulling this off is tricky because the attacker doesn't know which sanitization algorithm the user will choose. Instead of targeting a specific defense, DTB models the shared sanitization effect of mainstream defenses—namely, that they tend to suppress channels heavily involved in the backdoor while slightly perturbing surrounding weights.

DTB uses a bi-level (outer–inner) optimization framework:

  1. Outer Loop & Channel Partitioning: The model learns the normal task, activates the decoy backdoor, and keeps the hidden backdoor asleep (predicting clean labels even when the hidden trigger is present). Using gradient contributions to the decoy's target prediction, DTB identifies a pool of "decoy-sensitive channels" ($\mathcal{C}_d$).
  2. Inner Loop (Surrogate Defenses): To simulate an unknown future defense without breaking gradient flow, DTB randomly samples channels from $\mathcal{C}_d$, multiplies their activations by a tiny number ("soft gating" instead of hard pruning), and adds Gaussian noise to the parameters. This creates $K$ differentiable surrogate sanitized models.
  3. Conditional Triggering & Serial Coupling: For each surrogate model, DTB measures how much the decoy's confidence dropped. Only when decoy suppression crosses a threshold does the loss function push the hidden backdoor to activate. An additional serial coupling loss forces the magnitude of hidden activation to directly mirror the magnitude of decoy suppression.
Figure 3: DTB employs a joint outer–inner optimization framework. The attacker implants DTB into a third-party model. The original-model objective Lori preserves model utility and decoy-backdoor activation while keeping the hidden backdoor dormant. The hidden-backdoor objective Lhid promotes activation after simulated sanitization, while Lserial couples hidden-backdoor activation with decoy suppression. During deployment-time sanitization, the decoy backdoor is progressively suppressed as the hidden backdoor is gradually activated.

Datasets

The authors evaluate DTB across five standard computer vision benchmarks—introducing no new datasets, but testing across varied resolutions and class counts:

  • CIFAR-10 and CIFAR-100
  • TinyImageNet
  • GTSRB (German Traffic Sign Recognition Benchmark)
  • ImageNet Subset (12 randomly sampled classes from ImageNet-1K to test high-resolution images on Vision Transformers)

These were paired with standard CNNs (ResNet-18/34/50, VGG-11/16/19) and Transformers (ViT, DeiT-Tiny).

Key Insights and Ideas

  • Cross-Paradigm Transferability: Even though DTB's surrogate defenses mimic channel pruning and weight noise, the attack transfers shockingly well to completely different defense families—like knowledge distillation (NAD) and structural transformations (NPD). Why? Because any effective defense must weaken the decoy's feature pathway, inadvertently pushing the model into the exact state the hidden backdoor is waiting for.
  • Scapegoats Aren't Enough: In an ablation where the authors removed the inner meta-optimization loop, the attack degenerated into a standard "scapegoat" setup (one fragile backdoor, one tough backdoor). Without explicit coupling, defenses pushed both backdoors in the same direction (Pearson correlation $+0.516$). With DTB, suppressing one reliably activates the other (correlation $-0.808$).
  • False Sense of Security: Post-sanitization detection tools fail to catch the newly awakened hidden backdoor because DTB aligns the hidden trigger's representations with clean target-class semantics. Even stacking up to 7 rounds of random defenses back-to-back fails to remove it.

Key Results

Tested against 14 mainstream defenses, DTB consistently flips the switch between the two backdoors while keeping clean task accuracy intact:

As defenders prune more channels to remove the decoy (blue line dropping), the hidden backdoor reliably wakes up (red line rising) right around the utility-preserving threshold (yellow dashed line).
  • Reliable Activation: Across CIFAR-10 and CIFAR-100, sanitization drops the decoy's Attack Success Rate (ASR) from ~95% down to ~3%, while simultaneously rocketing the hidden backdoor's ASR from ~4% (dormant) to over 95%.
  • Trigger & Architecture Agnostic: On ResNet-34 using invisible/imperceptible triggers (SIG and LIRA), average decoy ASR drops from 99.84% to 1.20% across defenses, while hidden ASR jumps from 3.84% to 99.37%. On ImageNet with ViT, hidden ASR jumps from 0.91% to 85%–99%+ depending on the defense.
  • Evading Detection & Multi-Round Scrubbing: Before defense, backdoor localization tools (like Neural Cleanse and RNP) flag the decoy target class 87–96 times out of 100. After sanitization, they flag the newly active hidden backdoor 0 to 22 times out of 100. Even after 7 consecutive rounds of randomly composed defenses, hidden ASR remains at 94.39% (with clean accuracy at 91.79%).

Limitations and Future Work

DTB is not invincible—if you know where to look. The authors test an idealized adaptive defense using Logit-Margin Repulsion (LMR). If the defender knows about DTB and magically knows which specific class the hidden backdoor targets, targeted repair drops the average hidden ASR from 95.63% down to 6.80% with less than a 1% drop in clean accuracy. However, because existing post-sanitization detectors fail to reliably localize that hidden target class in the first place, bridging this localization gap—and designing post-sanitization evaluations that look beyond whether the original threat disappeared—remains an urgent direction for future work.

Summary updated

Abstract

Backdoor defenses are widely regarded as key to secure third-party model deployment. However, we are the *first* to show that, in standard backdoor sanitization pipelines, the defense process itself can be exploited and turned into a conditional trigger. We propose ***Defense-Triggered Backdoor*** (DTB): an attacker implants both a normally active *decoy backdoor* and a dormant *hidden backdoor*, so that model sanitization suppresses the decoy backdoor while activating the hidden backdoor, thereby making the defense process the trigger condition for the hidden backdoor. DTB uses bi-level optimization to approximate the shared sanitization effect of mainstream backdoor defenses, while constraining the hidden backdoor to activate only after the decoy backdoor is sufficiently suppressed. Experiments on multiple datasets, different networks, and 14 representative defenses show that DTB can *stably trigger* the hidden backdoor, and this phenomenon remains significant after multi-round compositional sanitization. Our findings reveal a potential threat in existing backdoor defense pipelines and suggest that post-sanitization safety cannot be judged solely by whether the original backdoor has been eliminated. Our code is available at [https://github.com/Trusted-LLM/DTB](https://github.com/Trusted-LLM/DTB).
BibTeX
@inproceedings{yang2026when,
  author = {Zhiguo Yang and Ruotian Liu and Perley Xu and Wenjie Ruan},
  title = {{When Sanitization Becomes the Trigger: Defense-Triggered Backdoor Attacks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=3CK0DzGy3m},
}
Figure