NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Training Set Cleansing of Backdoor Poisoning by Self-Supervised Representation Learning

Hang Wang, Sahar Karami, Ousmane Dia, Hippolyt Ritter, Ehsan Emamjomeh-Zadeh, Jiahui Chen, Zhen Xiang, David J. Miller, George Kesidis

TL;DR

This paper introduces a novel training set cleansing method that uses self-supervised representation learning to detect and neutralize backdoor (Trojan) attacks before a classifier is ever trained. By leveraging the fact that self-supervised models ignore malicious labels and focus on semantic image content, the authors can filter out poisoned samples and—crucially—re-label them to their true classes, achieving state-of-the-art defense performance on benchmark datasets.

What Problem Does This Paper Address?

Deep Neural Networks (DNNs) are susceptible to backdoor attacks, where an attacker injects a small number of "poisoned" samples into the training set. These samples contain a specific trigger (like a small pixel patch or a subtle color shift) and are intentionally mislabeled to a target class.

The problem is that supervised training is "lazy"; the model quickly learns a strong affinity between the easy-to-spot trigger and the target label, ignoring the actual object in the image. Most existing defenses happen after the model is already compromised or require a small "gold standard" set of clean data that defenders might not have. The authors aim to cleanse the dataset before the final training process begins, without requiring any prior clean samples.

Methods

The proposed defense consists of three main stages:

  1. Self-supervised Pre-training: The authors train an encoder (ResNet-18) using SimCLR, a self-supervised contrastive learning framework. Because SimCLR doesn't use labels, it learns to group images based on their actual visual features (e.g., "this is a dog") rather than the attacker's malicious labels. The authors hypothesize that because backdoor triggers are usually small or subtle, the self-supervised model will largely ignore them in favor of the image's global semantic content.
  2. Data Filtering: Once the images are mapped into a feature embedding space, the authors use two different metrics—k-Nearest Neighbors (kNN) and Energy-based scores—to check for label consistency. If an image's assigned label doesn't match the labels of its neighbors in the embedding space, it is flagged as a potential poison sample and rejected.
  3. High-Confidence Re-labeling: This is the paper's key innovation. Simply filtering isn't enough; if even a few poisoned samples "leak" through, the attack can still succeed. To counter this, the authors take the rejected samples and, if the kNN/Energy prediction is "high confidence," they re-label the sample to its predicted (true source) class. This effectively turns a "poison" sample into a "clean" one, helping the final model learn to ignore the trigger.

Datasets

The authors evaluated their method on:

  • CIFAR-10: The primary benchmark for image classification.
  • MNIST: Used to test the limits of specific attacks like WaNet.
  • Tiny-ImageNet: Used for qualitative analysis (salience maps).

They tested against four types of backdoor attacks: Additive (global patterns), BadNet (local patches), Blended (image overlays), and WaNet (warping-based).

Key Insights and Ideas

  • SSL as a "Backdoor Blind": The core "aha" moment is that self-supervised learning (SSL) is naturally resistant to backdoors. Because the trigger is usually a small perturbation, a model trying to maximize agreement between different views of the same image (SimCLR) will focus on the robust semantic features rather than the tiny, label-dependent trigger.
  • The "Leaking" Problem: The authors highlight that even 50 poisoned samples in a dataset of 50,000 (0.1%) can be enough to successfully backdoor a model. This justifies why simple filtering is insufficient and why re-labeling is necessary to "neutralize" the remaining poison.
  • Neutralization via Re-labeling: By assigning the correct source label to a poisoned image, the defender forces the model to see the trigger as a feature of the source class (or as noise), breaking the association with the attacker's target class.

Key Results

  • Effectiveness: On CIFAR-10, the method reduced the Attack Success Rate (ASR) from nearly 100% down to under 5% for most attack types, while maintaining high Clean Test Accuracy (ACC) (usually >91%).
  • Superiority over Baselines: The method outperformed existing defenses like Activation Clustering (AC) and Spectral Signature (SS), especially against "global" attacks like WaNet where those methods often fail.
  • Robustness to Volume: Unlike some competitors (like DBD), this method remains effective even when up to 10% of the training set is poisoned.
  • Adaptive Attacks: The authors tested a scenario where the attacker knows the defense is coming and tries to create "stealthy" embeddings. Even then, the defense remained remarkably robust.

Limitations and Future Work

  • Clean Data Rejection: A notable limitation is that the filter is "suspicious" by nature; it rejects or re-labels some perfectly clean samples, which leads to a slight drop in overall classification accuracy (about 2-3% lower than a model trained on a purely clean dataset).
  • Hyperparameter Sensitivity: The re-labeling threshold ($T$) is a hyperparameter. While the authors provide a heuristic (using the 80th percentile of confidence scores), it may still require tuning for different datasets.
  • Future Directions: The authors suggest exploring this approach on different architectures like Vision Transformers (ViT) and extending the logic to defend against non-backdoor threats, such as simple label-flipping attacks.

Summary updated

BibTeX
@inproceedings{wang2023training,
  author = {Hang Wang and Sahar Karami and Ousmane Dia and Hippolyt Ritter and Ehsan Emamjomeh-Zadeh and Jiahui Chen and Zhen Xiang and David J. Miller and George Kesidis},
  title = {{Training Set Cleansing of Backdoor Poisoning by Self-Supervised Representation Learning}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10097244},
}
Figure