Skip to main content
QUICK REVIEW

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

Yucheng Shi, Mengnan Du|arXiv (Cornell University)|Mar 21, 2023
Generative Adversarial Networks and Image SynthesisComputer Science5 citations
TL;DR

This paper proposes Zero-shot Image Purification (ZIP), a black-box backdoor defense that applies image transformations (e.g., blurring) to destroy trigger patterns and uses a pre-trained diffusion model to restore semantic content, achieving high-fidelity purified images without model access or training data. ZIP effectively defends against diverse backdoor attacks while preserving classification accuracy, outperforming state-of-the-art baselines in zero-shot settings.

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.

Motivation & Objective

  • To address the challenge of defending black-box machine learning models against backdoor attacks where internal model information and training data are unavailable.
  • To develop a defense framework that operates in zero-shot settings, requiring no prior knowledge of clean or poisoned samples or attack types.
  • To preserve high classification accuracy on purified images even when using a backdoored model for inference.
  • To enable practical deployment of defenses in real-world machine learning as a service (MLaaS) scenarios with query-only access.
  • To overcome limitations of existing purification methods that fail against non-patch-based or distributed triggers.

Proposed method

  • Apply a linear image transformation (e.g., blurring or grayscale) to the poisoned input to disrupt the trigger pattern.
  • Use a pre-trained diffusion generative model to reconstruct the image from the transformed input, guided by the transformed image to preserve semantic content.
  • Design a novel reverse denoising process in the diffusion model that conditions generation on the transformed image to produce high-fidelity, trigger-free outputs.
  • Leverage the fact that pre-trained diffusion models are trained on natural image distributions, making them unlikely to reconstruct engineered trigger patterns.
  • Use a two-stage pipeline: transformation to destroy triggers, followed by diffusion-based restoration to recover semantic integrity.
  • Apply speed-up strategies such as tiling and detection-based pruning to improve inference efficiency, achieving up to 39× speedup.

Experimental results

Research questions

  • RQ1Can a defense framework effectively remove backdoor triggers from poisoned images without access to model weights or training data?
  • RQ2Can a pre-trained diffusion model restore semantic content from a transformed (e.g., blurred) poisoned image while eliminating trigger patterns?
  • RQ3Does the proposed zero-shot defense maintain high classification accuracy when using a backdoored model on purified images?
  • RQ4How effective is the defense against diverse attack types, including patch-based and non-patch-based triggers?
  • RQ5Can the defense generalize to unseen attack scenarios without requiring prior knowledge of the attack method or trigger pattern?

Key findings

  • ZIP achieved a clean accuracy (CA) of 82.36% and an attack success rate (ASR) of 18.47% on BadNets attacks, significantly outperforming state-of-the-art baselines.
  • On Blended attacks, ZIP maintained a CA of 81.63% and reduced ASR to 28.83%, demonstrating strong generalization across attack types.
  • The method achieved a 33× speedup with tiling and a 39× speedup with detection-based pruning, making purification faster than classification in some cases.
  • Using diverse transformations (e.g., Blur + Grayscale) improved robustness, as attacks failed when the transformation differed from the attacker’s.
  • The framework successfully defended against enhanced attacks, including those with adaptive triggers, by leveraging the diffusion model’s distributional incompatibility with engineered patterns.
  • ZIP preserved high-fidelity image reconstruction, as evidenced by the high CA and low ASR, even when the classifier model was poisoned.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.