ESTAS: Effective and Stable Trojan Attacks in Self-supervised Encoders with One Target Unlabelled Sample

Jiaqi Xue, Qian LouarXiv 2022

Abstract

Emerging self-supervised learning (SSL) has become a popular image representation encoding method to obviate the reliance on labeled data and learn rich representations from large-scale, ubiquitous unlabelled data. Then one can train a downstream classifier on top of the pre-trained SSL image encoder with few or no labeled downstream data. Although extensive works show that SSL has achieved remarkable and competitive performance on different downstream tasks, its security concerns, e.g, Trojan attacks in SSL encoders, are still not well-studied. In this work, we present a novel Trojan Attack method, denoted by ESTAS, that can enable an effective and stable attack in SSL encoders with only one target unlabeled sample. In particular, we propose consistent trigger poisoning and cascade optimization in ESTAS to improve attack efficacy and model accuracy, and eliminate the expensive target-class data sample extraction from large-scale disordered unlabelled data. Our substantial experiments on multiple datasets show that ESTAS stably achieves > 99% attacks success rate (ASR) with one target-class sample. Compared to prior works, ESTAS attains > 30% ASR increase and > 8.3% accuracy improvement on average.

Introduction

Self-supervised learning (SSL) has revolutionized computer vision by allowing models to learn from massive amounts of unlabeled data. However, this "black box" training process creates a significant security vacuum. Attackers can inject "Trojans" (backdoors) into the encoder so that any image containing a specific trigger is misclassified into a target category. Existing SSL Trojan attacks face major hurdles: they often require identifying and poisoning a large portion of target-class images from massive datasets, suffer from instability when sample sizes are small, and frequently degrade the model's accuracy on clean images.

ESTAS (Effective and Stable Trojan Attack) addresses these challenges, demonstrating that a single unlabeled image is sufficient to anchor a stable backdoor across a massive dataset, drastically lowering the barrier to entry for an attacker.

Methodology

ESTAS introduces two core innovations to achieve high efficacy with minimal data:

1. Consistent Trigger Poisoning

Standard SSL training uses heavy data augmentation (e.g., random crops, color jitters). If a trigger is added before these augmentations, the encoder learns a distorted version. However, at inference time, there is usually no augmentation. ESTAS bypasses this "training-inference asymmetry" by adding the trigger after augmentation but before normalization during training. This ensures the encoder sees a consistent trigger during both training and deployment.

2. Cascade Optimization

To stabilize the attack with just one target sample, ESTAS uses a multi-branch architecture. It optimizes a Global Attack Loss ($L_G$) to match high-level features from the projector network and a Local Attack Loss ($L_L$) to align low-level features directly from the encoder with the target sample. This dual-level optimization makes the attack harder to remove during downstream fine-tuning.

ESTAS Architecture: The framework utilizes consistent trigger poisoning and a multi-branch cascade optimization to align triggered features with a single target sample.

Results and Analysis

ESTAS was evaluated on CIFAR-10, CIFAR-100, and ImageNet-100. The method consistently achieved an Attack Success Rate (ASR) of over 99% on ImageNet-100 using only one target sample. This represents a 1,270x reduction in required target-class images compared to prior methods like SSL-Backdoor.

Beyond efficacy, ESTAS maintains high utility. While previous attacks like CTRL saw clean accuracy drops of over 9%, ESTAS often stays within 1% of a clean model's performance. A key insight is the method's superior feature entanglement: unlike baselines like BadEncoder, which can be unstable or mis-target similar classes, ESTAS successfully entangles triggered representations with the specific target class while keeping them distinct from others.

Attack Stability and Feature Entanglement: (Left) BadEncoder shows highly variable ASR; (Right) ESTAS achieves superior feature entanglement compared to baselines, avoiding similar-class confusion.

Conclusion

ESTAS demonstrates that SSL encoders are highly vulnerable to Trojan attacks even with extremely limited attacker resources. By ensuring trigger consistency and optimizing across feature levels, the attack achieves unprecedented stability and efficacy. Future work must focus on developing defenses that can purify encoders without the significant utility loss seen in current distillation-based methods.

Summary updated

BibTeX
@misc{xue2022estas,
  author = {Jiaqi Xue and Qian Lou},
  title = {{ESTAS: Effective and Stable Trojan Attacks in Self-supervised Encoders with One Target Unlabelled Sample}},
  year = {2022},
  eprint = {2211.10908},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.10908},
}
Figure