Training with More Confidence: Mitigating Injected and Natural Backdoors During Training

Zhenting Wang, Hailun Ding, Juan Zhai, Shiqing Ma

Deep Neural Networks (DNNs) are notoriously susceptible to "Trojan" or backdoor attacks. Traditionally, this involves an adversary poisoning a training dataset with a specific trigger (like a small yellow square) so the model learns to associate that pattern with a target label (e.g., a "stop sign" becomes a "speed limit" sign).

However, a newer and more insidious threat has emerged: natural backdoors. These occur when a model accidentally learns a backdoor behavior from benign data due to strong existing patterns in the dataset. Existing defenses often rely on "weak observations"—like the fact that backdoors are learned faster than benign features—which can be bypassed by clever, "slow-poisoning" adaptive attacks. Furthermore, most current defenses are powerless against natural backdoors.

Researchers have discovered that both intentional and natural backdoors share a common mathematical signature. By introducing a novel training framework called NONE (NON-LinEarity), they can identify and neutralize these vulnerabilities, reducing attack success rates by over 50x while maintaining high accuracy on legitimate data.

The Core Insight: The Linearity Signature

The most significant breakthrough in this research is the mathematical proof that a successful Trojan attack must create a hyperplane in the input space. While modern DNNs are highly non-linear and non-convex, backdoors exploit piece-wise linear activation functions (like ReLU) to create "shortcuts."

Hyperplane formed by backdoor-related neurons

ReLU is popular because it makes training efficient by behaving linearly in certain regions. However, this exact property is what allows Trojans to hide within the model. Because both injected and natural Trojans rely on this linearity, targeting it provides a unified solution for two previously distinct problems.

The NONE Framework

The authors propose NONE (NON-LinEarity), a training-time defense based on the insight that backdoor-related neurons form these linear hyperplanes across input domains. Unlike "Differential Privacy" (DP-SGD) methods that add noise to the entire training process (often hurting accuracy), NONE intervenes with surgical precision only when it detects the specific structural signature of a backdoor.

The core algorithm follows an iterative three-step process during training:

  1. Identify Compromised Neurons: The system monitors neurons to see if their activation functions are behaving linearly (e.g., always falling into the $x > 0$ range of a ReLU function). If a neuron's linearity exceeds a threshold, it is flagged as potentially compromised.
  2. Filter Poisoned Samples: Using statistical testing, the framework analyzes the activation distributions. Inputs that deviate significantly from the "benign" distribution are flagged as poisoned and removed from the training set.
  3. Reset and Retrain: Instead of simply pruning neurons, NONE resets the weights of compromised neurons to their initial random states. This forces the model to re-learn features, ideally steering it toward non-linear, benign decision boundaries.

Experimental Validation and Results

The authors evaluated NONE across five diverse datasets (MNIST, GTSRB, CIFAR-10, ImageNet-10, and TrojAI) and several popular architectures (NiN, VGG, ResNet, and AlexNet). The method proved effective even with low poisoning rates (as low as 0.5%) and across different trigger types.

Examples of different backdoor trigger types

NONE significantly outperformed state-of-the-art (SOTA) defenses like ABL, NAD, and AC:

  • Attack Success Rate (ASR): On average, the ASR for models trained with NONE was 54.83 times lower than undefended models under standard poisoning attacks.
  • Natural Backdoors: NONE reduced the ASR of natural backdoors by 1.75x compared to undefended models, a feat most other defenses could not achieve.
  • Benign Accuracy (BA): The defense has a very low "tax." Legitimate accuracy only dropped by an average of 2.33%, and in many cases, it remained the highest among all tested defense methods.

Limitations and Future Work

While highly effective, the authors note a few limitations. NONE struggles when the Trojan trigger is exceptionally large (e.g., covering 20x20 pixels or more in a small image). In these cases, the trigger becomes the "majority" feature, making it harder to distinguish from benign data.

Additionally, the current research focuses primarily on image classification. Extending this theory to other domains, such as Natural Language Processing (NLP) or Reinforcement Learning, is a vital next step. Finally, while NONE is robust against current SOTA attacks, future attackers might attempt to design "non-linear" triggers specifically to bypass linearity-based detection.

Summary updated

BibTeX
@inproceedings{wang2022training,
  author = {Zhenting Wang and Hailun Ding and Juan Zhai and Shiqing Ma},
  title = {{Training with More Confidence: Mitigating Injected and Natural Backdoors During Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=PJ3N5LMTCV},
}
Figure