DND Backdoor Hides Inside AI Models for Thousands of Uses Before Striking
A new backdoor design keeps malicious behavior dormant across thousands of trigger uses, then activates on schedule while dodging four leading defenses.
ProTakeaways
- New paper introduces Delayed Backdoor Attacks, decoupling malicious activation from trigger exposure in pre-trained models.
- Prototype DND uses a stateful counter and nonlinear decay function to control when the backdoor fires.
- Sustains clean accuracy above 94 percent and hits roughly 99 percent post-activation success across four NLP benchmarks.
- Bypasses ONION, STRIP, RAP, and CUBE defenses with less than 2.3 point drops in success rate.
- Temporal decoupling enables common everyday words as triggers, previously infeasible without wrecking clean accuracy.
- Authors call for stateful, time-aware defenses since fine-pruning and MDP fail to remove the embedded logic.
Backdoors in pre-trained language models have always been thought of as impulsive: slip in a trigger word, get an immediate malicious response. A new paper flips that assumption on its head, showing that a backdoor can sit quietly through thousands of trigger exposures and only detonate once a hidden counter crosses a threshold. The authors call the paradigm Delayed Backdoor Attacks (DBA) and build a working prototype that stays undetected under the defenses most of the field relies on.
The core observation is that backdoor attacks against pre-trained models have traditionally operated under an immediacy assumption, where malicious behavior manifests instantly upon trigger occurrence, and this work challenges that paradigm by introducing delayed backdoor attacks in which activation is temporally decoupled from trigger exposure. That temporal decoupling matters because it unlocks something previously impossible: using common, everyday words as triggers. An instant backdoor keyed to the word the would wreck clean accuracy on day one. A delayed one can hide inside ordinary usage.
Why the old assumption was a blind spot
Nearly every mainstream defense is built on watching for an immediate cause-and-effect between a suspicious input and an anomalous output. Input-level detectors like ONION and STRIP flag perplexity spikes or output inconsistencies. Representation-based methods like Spectral Signatures look for feature-space outliers that show up the moment a backdoor fires. Model-level tools like Neural Cleanse and Fine-Pruning try to reverse-engineer or prune the neurons that respond abnormally to triggers. All of them assume the malicious behavior is visible on contact.
A delayed backdoor breaks that assumption cleanly. During its latency phase the model is functionally indistinguishable from a benign one, so the defender has nothing to detect.
Inside DND: a stateful counter with nonlinear decay
The prototype, called Delayed Backdoor Attacks Based on Nonlinear Decay (DND), is built around two core functional modules: an explicit state-tracking module and a nonlinear activation controller. The state tracker maintains an internal counter O of how many valid trigger combinations the model has seen across sessions. The controller decides, based on O, whether the model is in latency mode (behave normally) or outbreak mode (force the attacker's target label).

Activation is governed by a decay function T(O) = a / (O+1)^b, where a, b, and c are attacker-chosen parameters. The backdoor fires once T(O) drops below the threshold c, which gives a closed-form minimum trigger count O* = ceil((a/c)^(1/b) - 1). In latency mode, attention weights over trigger tokens are actively suppressed so the model appears clean. In outbreak mode, a fixed logit bias is added to the target class large enough to override the original logits regardless of input semantics.
Because the mechanism lives in the model's architecture rather than in poisoned data, it is designed to sustain high clean accuracy above 94 percent, achieve post-activation attack success near 99 percent while the average of other methods is below 95 percent, and exhibit resilience against several state-of-the-art defenses.
What the numbers look like
The team evaluated DND on four text classification benchmarks (SST-2, HSOL, Offenseval, Twitter) using BERT-base and compared against BadNet, Syntactic, and BITE. With the activation threshold set to 500 and 700 triggers pushed through the model, DND showed almost no successful attacks before trigger index 500, a few sporadic firings between 400 and 500, then a sharp jump to nearly 100 percent past the threshold.

Against defenses on HSOL, the drop in post-activation success rate was modest:
- ONION: down 2.3 points
- STRIP: down 1.9 points
- RAP: down 1.4 points
- CUBE: down 1.3 points
Ablations added two more findings worth flagging. Fine-Pruning at a 10 percent rate did not dent the attack, and Masking-Differential Prompting across a range of perturbation strengths left the success rate flat at 99.2 percent. The delay logic is not concentrated in a small set of neurons that pruning can excise.
The threat model and its limits
The attack is not a data-poisoning recipe. It assumes the adversary gets white-box access to the model artifact during packaging or distribution, for example when exporting to an ONNX checkpoint, and attaches a lightweight logic module at that stage. The authors sketch a scenario where a compromised financial-advisory chatbot answers the same query benignly thousands of times, builds trust, then flips to promoting a fraudulent stock once the counter tips over.
There is no code release accompanying the paper, and the authors acknowledge the structural modifications, while invisible to automated scans, could still be caught by rigorous manual white-box inspection. Their proposed direction is a new class of stateful defenses that track behavioral drift over long input histories rather than judging one input at a time. Related structure-level attack work, such as architectural backdoors in neural networks, has already shown that logic embedded in the graph itself can survive fine-tuning, which makes the temporal variant harder to dismiss as a curiosity.
Why it matters for anyone shipping PTMs
If you consume pre-trained weights from third-party hubs, your integrity checks likely assume that a malicious model will misbehave the first time you probe it. This paper is the first empirical evidence that the assumption is wrong in an exploitable way. The practical takeaway is not that BERT is broken, but that supply chain verification for PTMs needs to include structural inspection and temporal behavior tracking, not just input-output probing on a validation set.