DeDe: Detecting Backdoor Samples for SSL Encoders via Decoders
Sizai Hou, Songze Li, Duanyi Yao
Abstract
Self-supervised learning (SSL) is pervasively exploited in training high-quality upstream encoders with a large amount of unlabeled data. However, it is found to be susceptible to backdoor attacks merely via polluting a small portion of training data. The victim encoders associate triggered inputs with target embeddings, e.g., mapping a triggered cat image to an airplane embedding, such that the downstream tasks inherit unintended behaviors when the trigger is activated. Emerging backdoor attacks have shown great threats across different SSL paradigms such as contrastive learning and CLIP, yet limited research is devoted to defending against such attacks, and existing defenses fall short in detecting advanced stealthy backdoors. To address the limitations, we propose a novel detection mechanism, DeDe, which detects the activation of backdoor mappings caused by triggered inputs on victim encoders. Specifically, DeDe trains a decoder for any given SSL encoder using an auxiliary dataset (which can be out-of-distribution or even slightly poisoned), so that for any triggered input that misleads the encoder into the target embedding, the decoder generates an output image significantly different from the input. DeDe leverages the discrepancy between the input and the decoded output to identify potential backdoor misbehavior during inference. We empirically evaluate DeDe on both contrastive learning and CLIP models against various types of backdoor attacks. Our results demonstrate promising detection effectiveness over various advanced attacks and superior performance compared over state-ofthe-art detection methods.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers3
- Backdooring Self-Supervised Contrastive Learning by Noisy AlignmentTuo Chen, Jie Gui, Minjing Dong, Ju Jia et al.ICCV 2025 · 2 citations
- DIFT: Protecting Contrastive Learning Against Data Poisoning Backdoor AttacksJiang Zhu, Yulin Jin, Qingqing Ye, Zhibiao Guo et al.AAAI 2026
- Logit-Margin Repulsion for Backdoor DefenseZhiguo Yang, Dongsheng Xu, Ruizhi Zhong, Jiacheng Pi et al.CVPR 2026
Builds on22
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Hidden Trigger Backdoor AttacksAniruddha Saha, Akshayvarun Subramanya, Hamed PirsiavashAAAI 2020 · 743 citations
- LIRA: Learnable, Imperceptible and Robust Backdoor AttacksKhoa D. Doan, Yingjie Lao, Weijie Zhao, Ping LiICCV 2021 · 313 citations
Related papers
- Invisible Backdoor Attack against Self-supervised LearningHanrong Zhang, Zhenting Wang, Boheng Li, Fulin Lin et al.CVPR 2025
- BadEncoder: Backdoor Attacks to Pre-trained Encoders in Self-Supervised LearningJinyuan Jia, Yupei Liu, Neil Zhenqiang GongS&P 2022 · 200 citations
- Detecting Backdoors in Pre-trained EncodersShiwei Feng, Guanhong Tao, Siyuan Cheng, Guangyu Shen et al.CVPR 2023
- An Embarrassingly Simple Backdoor Attack on Self-supervised LearningChangjiang Li, Ren Pang, Zhaohan Xi, Tianyu Du et al.ICCV 2023 · 54 citations
- BadCLIP: Dual-Embedding Guided Backdoor Attack on Multimodal Contrastive LearningSiyuan Liang, Mingli Zhu, Aishan Liu, Baoyuan Wu et al.CVPR 2024
