Certified Zeroth-order Black-Box Defense with Robust UNet Denoiser

Astha Verma, Siddhesh Bangar, A. Venkata Subramanyam, Naman Lal, Rajiv Ratn Shah, Shin'ichi Satoh · OpenReview

Abstract: Certified defense methods against adversarial perturbations have been recently investigated in the black-box setting with a zeroth-order (ZO) perspective. However, these methods suffer from high model variance with low performance on high-dimensional datasets due to the ineffective design of the denoiser and are limited in their utilization of ZO techniques. To this end, we propose a certified ZO preprocessing technique for removing adversarial perturbations from the attacked image in the black-box setting using only model queries. We propose a robust UNet denoiser (RDUNet) that ensures the robustness of black-box models trained on high-dimensional datasets. We propose a novel black-box denoised smoothing (DS) defense mechanism, ZO-RUDS, by prepending our RDUNet to the black-box model, ensuring black-box defense. We further propose ZO-AE-RUDS in which RDUNet followed by autoencoder (AE) is prepended to the black-box model. We perform extensive experiments on four classification datasets, CIFAR-10, CIFAR-100, Tiny Imagenet, STL-10, and the MNIST dataset for image reconstruction tasks. Our proposed defense methods ZO-RUDS and ZO-AE-RUDS beat SOTA with a huge margin of 35% and 9%, for low dimensional (CIFAR-10) and with a margin of 20.61% and 23.51% for high-dimensional (STL-10) datasets, respectively.

Introduction

Deep learning models are notoriously fragile; small, invisible "adversarial perturbations" added to an image can trick a model into misclassifying it. Most defenses are "white-box," meaning they require access to the model's internal weights. However, in real-world scenarios, many models are "black-boxes" (e.g., APIs) where internal parameters are hidden.

Existing black-box defenses often rely on Denoised Smoothing (DS)—pre-pending a denoiser to the model to clean the input. However, these methods struggle with high model variance and high-dimensional data. On larger images, standard denoisers often lose critical spatial detail, causing the defense to fail. This paper introduces a framework to address these limitations using a specialized UNet architecture and zeroth-order optimization.

Proposed Methodology

The researchers introduced a framework called ZO-RUDS (Zeroth-order Robust UNet Denoised Smoothing) and its variant ZO-AE-RUDS. The core components include:

  • RDUNet (Robust UNet Denoiser): Unlike simple convolutional denoisers, RDUNet utilizes a UNet architecture with lateral skip connections. These connections allow the model to preserve fine-grained spatial information that is typically lost during the denoising process.
  • Zeroth-Order (ZO) Optimization: Since the target model is a black box, standard backpropagation is impossible. Instead, the framework uses Randomized Gradient Estimation (RGE) and Coordinate-wise Gradient Estimation (CGE) to estimate gradients by "poking" the model with slightly varied versions of an image.
  • The Autoencoder (AE) Bridge: For high-dimensional images, the search space for optimization is too vast. The authors use an Autoencoder to compress the image into a lower-dimensional "latent space," making zeroth-order optimization computationally feasible.
Comparison of various defense techniques, highlighting the evolution from standard Randomized Smoothing (RS) to the proposed ZO-RUDS and ZO-AE-RUDS architectures.

To train the denoiser effectively, a triple-threat loss function is employed, combining Cross-Entropy (for prediction accuracy), Cosine Similarity (for feature matching), and Maximum Mean Discrepancy (to align statistical distributions of denoised and clean images).

Experimental Evaluation

The method was evaluated on several standard benchmarks, ranging from low-resolution (CIFAR-10/100) to high-resolution (Tiny ImageNet and STL-10) datasets.

Key Results

The proposed methods demonstrated dramatic improvements over previous state-of-the-art (SOTA) methods like ZO-DS:

  • CIFAR-10: Achieved a 35% margin improvement in certified accuracy over previous black-box methods.
  • STL-10 (High-Dim): Beat the SOTA by 23.51%, proving that the RDUNet and AE bridge successfully overcome the "curse of dimensionality."
  • Stability: The defense remained effective even as the standard deviation of input noise increased, showing significantly higher stability than previous approaches.
Certified accuracy vs. l2 radius across four datasets, demonstrating the consistent performance lead of ZO-AE-RUDS (purple) and ZO-RUDS (red) over baseline methods.

Conclusion

By combining the spatial preservation of UNet architectures with the flexibility of zeroth-order optimization, ZO-RUDS and ZO-AE-RUDS provide a robust, certified defense for black-box models. While zeroth-order optimization carries a higher computational cost and query budget than white-box methods, the significant gains in certified accuracy—especially on high-dimensional data—mark a substantial step forward for practical AI security. Future work will focus on improving query efficiency and reducing inference latency for real-time applications.

Summary updated

Abstract

Certified defense methods against adversarial perturbations have been recently investigated in the black-box setting with a zeroth-order (ZO) perspective. However, these methods suffer from high model variance with low performance on high-dimensional datasets due to the ineffective design of the denoiser and are limited in their utilization of ZO techniques. To this end, we propose a certified ZO preprocessing technique for removing adversarial perturbations from the attacked image in the black-box setting using only model queries. We propose a robust UNet denoiser (RDUNet) that ensures the robustness of black-box models trained on high-dimensional datasets. We propose a novel black-box denoised smoothing (DS) defense mechanism, ZO-RUDS, by prepending our RDUNet to the black-box model, ensuring black-box defense. We further propose ZO-AE-RUDS in which RDUNet followed by autoencoder (AE) is prepended to the black-box model. We perform extensive experiments on four classification datasets, CIFAR-10, CIFAR-10, Tiny Imagenet, STL-10, and the MNIST dataset for image reconstruction tasks. Our proposed defense methods ZO-RUDS and ZO-AE-RUDS beat SOTA with a huge margin of $35\%$ and $9\%$, for low dimensional (CIFAR-10) and with a margin of $20.61\%$ and $23.51\%$ for high-dimensional (STL-10) datasets, respectively.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
STL-10ZO-AE-RUDS (CGE)SCA68.29%+23.51 vs baselinequeries=576 · backbone=ResNet-18 · l2-radius=0 · optimizer=CGE
Source quote
L279: ZO-AE-RUDS (C) │ 68.29 │ 57.93 │ 47.31 │ 33.22
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
CIFAR-10ZO-DS (R) baselineSCA42.34%queries=192 · l2-radius=0 · optimizer=RGE
Source quote
L236: ZO-DS (R)~\cite{zhang2022robustify} │ B │ 42.34 │ 18.12 │ 5.01 │ 0.19
STL-10ZO-DS (R) baselineSCA37.59%queries=576 · l2-radius=0 · optimizer=RGE
Source quote
L276: \multirow{4}*{576} │ ZO-DS (R)~\cite{zhang2022robustify} │ 37.59 │ 21.23 │ 8.67 │ 2.56
STL-10ZO-AE-DS (CGE) baselineSCA44.78%queries=576 · l2-radius=0 · optimizer=CGE
Source quote
L277: ZO-AE-DS (C)~\cite{zhang2022robustify} │ 44.78 │ 33.41 │ 26.10 │ 16.43
BibTeX
@misc{verma2023certified,
  author = {Astha Verma and Siddhesh Bangar and A. Venkata Subramanyam and Naman Lal and Rajiv Ratn Shah and Shin'ichi Satoh},
  title = {{Certified Zeroth-order Black-Box Defense with Robust UNet Denoiser}},
  year = {2023},
  eprint = {2304.06430},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.06430},
}
Figure