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

Erasing Self-Supervised Learning Backdoor by Cluster Activation Masking

Shengsheng Qian, Yifei Wang, Dizhan Xue, Shengjie Zhang, Huaiwen Zhang, Changsheng Xu · DOI

Erasing Self-Supervised Learning Backdoors by Cluster Activation Masking

Self-Supervised Learning (SSL) has revolutionized AI by enabling models to learn from vast, unlabeled datasets. However, this lack of human oversight introduces a critical vulnerability: backdoor attacks. By injecting a small number of "poisoned" images containing a specific trigger—such as a small pixel patch—attackers can manipulate model behavior. Once deployed, any image containing the trigger is misclassified into a target category.

The Challenge of Unlabeled Defenses

Defending against backdoors in SSL is notoriously difficult. Without ground-truth labels, distinguishing a malicious trigger from a legitimate image feature is a complex task. Previous state-of-the-art methods, like PatchSearch, often fail to precisely locate these triggers, leading to low detection rates and the accidental removal of clean training data.

The PoisonCAM Methodology

To address these shortcomings, researchers developed PoisonCAM, a defense mechanism centered on "Cluster Activation Masking." The core intuition is that masking a backdoor trigger should cause the model's internal representation of an image to revert from the attacker's target category back to its original semantic cluster.

PoisonCAM utilizes K-means clustering to identify data organization and isolate potential poisoned clusters.

The PoisonCAM pipeline consists of four key stages:

  1. Clustering: A k-means model is trained on the features of the poisoned SSL model to map the data's organizational structure.
  2. Candidate Trigger Detection: Hundreds of random masks are applied to images. When a mask covers the trigger, the image's cluster assignment shifts. Aggregating these successful masks creates a Trigger Attention Map that pinpoints the patch.
  3. Poisonous Image Search: To verify a candidate patch, it is "pasted" onto clean test images. If the patch is a true trigger, it will consistently force these clean images into the target cluster, yielding a high "Poison Score."
  4. Poison Classifier Training: High-scoring samples are used to train a ResNet classifier, which then scans and purges the entire dataset of poisoned images.

Breakthrough Results

Evaluated on ImageNet-100 and STL-10 benchmarks, PoisonCAM demonstrates a massive performance leap over existing defenses. While previous methods struggled to accurately identify triggers, PoisonCAM achieves unprecedented precision.

Comparison of PatchSearch and PoisonCAM: PoisonCAM achieves up to 96% detection accuracy for top-ranked patches, far exceeding the 3% achieved by previous methods.

Key performance metrics include:

  • Detection Accuracy: On ImageNet-100, PoisonCAM reached 96% accuracy in retrieving the top 100 trigger patches, compared to just 3% for PatchSearch.
  • Attack Mitigation: After cleaning the dataset, the Attack Success Rate (ASR) on ImageNet-100 dropped to a negligible 0.7%, while maintaining a high clean validation accuracy of 63.2%.
  • Data Preservation: PoisonCAM is significantly more surgical, removing only approximately 1,500 images to achieve these results, whereas previous methods often deleted over 12,000 samples.

Conclusion and Future Directions

PoisonCAM establishes a new standard for SSL security by leveraging the relationship between local image regions and global cluster assignments. While highly effective against patch-based attacks, future research will likely focus on adaptive attackers who might attempt to bypass masking logic or employ more subtle, global triggers like frequency-domain perturbations. For now, PoisonCAM provides a robust shield for the next generation of self-supervised models.

Summary updated

BibTeX
@misc{qian2023erasing,
  author = {Shengsheng Qian and Yifei Wang and Dizhan Xue and Shengjie Zhang and Huaiwen Zhang and Changsheng Xu},
  title = {{Erasing Self-Supervised Learning Backdoor by Cluster Activation Masking}},
  year = {2023},
  eprint = {2312.07955},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.07955},
}
Figure