SampDetox: Black-box Backdoor Defense via Perturbation-based Sample Detoxification

Yanxin Yang, Chentao Jia, Dengke Yan, Ming Hu, Tianlin Li +3 more
2/3/2026

Abstract

The advancement of Machine Learning has enabled the widespread deployment of Machine Learning as a Service (MLaaS) applications. However, the untrustworthy nature of third-party ML services poses backdoor threats. Existing defenses in MLaaS are limited by their reliance on training samples or white-box model analysis, highlighting the need for a black-box backdoor purification method. In our paper, we attempt to use diffusion models for purification by introducing noise in a forward diffusion process to destroy backdoors and recover clean samples through a reverse generative process. However, since a higher noise also destroys the semantics of the original samples, it still results in a low restoration performance. To investigate the effectiveness of noise in eliminating different types of backdoors, we conducted a preliminary study, which demonstrates that backdoors with low visibility can be easily destroyed by lightweight noise and those with high visibility need to be destroyed by high noise but can be easily detected. Based on the study, we propose SampDetox, which strategically combines lightweight and high noise. SampDetox applies weak noise to eliminate low-visibility backdoors and compares the structural similarity between the recovered and original samples to localize high-visibility backdoors. Intensive noise is then applied to these localized areas, destroying the high-visibility backdoors while preserving global semantic information. As a result, detoxified samples can be used for inference even by poisoned models. Comprehensive experiments demonstrate the

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{yang2026sampdetox,
  title  = {SampDetox: Black-box Backdoor Defense via Perturbation-based Sample Detoxification},
  author = {Yanxin Yang and Chentao Jia and Dengke Yan and Ming Hu and Tianlin Li and Xiaofei Xie and Xian Wei and Mingsong Chen},
  year   = {2026},
  doi    = {10.52202/079017-3853},
  url    = {https://doi.org/10.52202/079017-3853},
  journal = {NEURIPS 2024 2024}
}

Discussion