Black-box Backdoor Defense via Zero-shot Image Purification

Yucheng Shi, Mengnan Du, Xuansheng Wu, Zihan Guan, Ninghao Liu
2/12/2026

No official code found. Best implementation: sycny/ZIP (17 stars, Apache-2.0, last commit 2023-10-31).

Abstract

Backdoor attacks inject poisoned samples into the training data, resulting in the misclassification of the poisoned input during a model's deployment. Defending against such attacks is challenging, especially for real-world black-box models where only query access is permitted. In this paper, we propose a novel defense framework against backdoor attacks through Zero-shot Image Purification (ZIP). Our framework can be applied to poisoned models without requiring internal information about the model or any prior knowledge of the clean/poisoned samples. Our defense framework involves two steps. First, we apply a linear transformation (e.g., blurring) on the poisoned image to destroy the backdoor pattern. Then, we use a pre-trained diffusion model to recover the missing semantic information removed by the transformation. In particular, we design a new reverse process by using the transformed image to guide the generation of high-fidelity purified images, which works in zero-shot settings. We evaluate our ZIP framework on multiple datasets with different types of attacks. Experimental results demonstrate the superiority of our ZIP framework compared to state-of-the-art backdoor defense baselines. We believe that our results will provide valuable insights for future defense methods for black-box models. Our code is available at https://github.com/sycny/ZIP.

View on arXivView PDF

Code Implementations(1)

sycny/ZIPCommunity100%
Apache-2.0

[NeurIPS2023] Black-box Backdoor Defense via Zero-shot Image Purification

171PythonOct 23, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{shi2026blackbox,
  title  = {Black-box Backdoor Defense via Zero-shot Image Purification},
  author = {Yucheng Shi and Mengnan Du and Xuansheng Wu and Zihan Guan and Ninghao Liu},
  year   = {2026},
  eprint = {2303.12175},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2303.12175},
  journal = {NEURIPS 2023 2023}
}

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/2303.12175.svg)](https://codeofpaper.com/paper/2303.12175)

Discussion