DeDe: Detecting Backdoor Samples for SSL Encoders via Decoders

Sizai Hou, Songze Li, Duanyi Yao
2/9/2026

No official code found. Best implementation: tardisblue9/DeDe (3 stars, last commit 2025-06-15).

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-of-the-art detection methods.

View on arXivView PDF

Code Implementations(1)

tardisblue9/DeDeCommunity68%

Repository of paper 'DeDe: Detecting Backdoor Samples for SSL Encoders via Decoders'

30Shell, PythonMar 12, 20251 years ago

Similar Papers

Cite this paper

@article{hou2026dede,
  title  = {DeDe: Detecting Backdoor Samples for SSL Encoders via Decoders},
  author = {Sizai Hou and Songze Li and Duanyi Yao},
  year   = {2026},
  eprint = {2411.16154},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2411.16154},
  journal = {CVPR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.16154.svg)](https://codeofpaper.com/paper/2411.16154)

Discussion