[Paper Review] How to Robustify Black-Box ML Models? A Zeroth-Order Optimization Perspective
This paper proposes ZO-AE-DS, a novel black-box defense method that robustifies machine learning models using only input queries and output feedback, by integrating denoised smoothing with variance-reduced zeroth-order optimization via an autoencoder. The approach achieves state-of-the-art certified robustness and accuracy in both image classification and image reconstruction tasks with significantly reduced query complexity compared to prior methods.
The lack of adversarial robustness has been recognized as an important issue for state-of-the-art machine learning (ML) models, e.g., deep neural networks (DNNs). Thereby, robustifying ML models against adversarial attacks is now a major focus of research. However, nearly all existing defense methods, particularly for robust training, made the white-box assumption that the defender has the access to the details of an ML model (or its surrogate alternatives if available), e.g., its architectures and parameters. Beyond existing works, in this paper we aim to address the problem of black-box defense: How to robustify a black-box model using just input queries and output feedback? Such a problem arises in practical scenarios, where the owner of the predictive model is reluctant to share model information in order to preserve privacy. To this end, we propose a general notion of defensive operation that can be applied to black-box models, and design it through the lens of denoised smoothing (DS), a first-order (FO) certified defense technique. To allow the design of merely using model queries, we further integrate DS with the zeroth-order (gradient-free) optimization. However, a direct implementation of zeroth-order (ZO) optimization suffers a high variance of gradient estimates, and thus leads to ineffective defense. To tackle this problem, we next propose to prepend an autoencoder (AE) to a given (black-box) model so that DS can be trained using variance-reduced ZO optimization. We term the eventual defense as ZO-AE-DS. In practice, we empirically show that ZO-AE- DS can achieve improved accuracy, certified robustness, and query complexity over existing baselines. And the effectiveness of our approach is justified under both image classification and image reconstruction tasks. Codes are available at https://github.com/damon-demon/Black-Box-Defense.
Motivation & Objective
- To address the challenge of defending black-box machine learning models where model architecture and parameters are unknown, relying only on input-output queries.
- To overcome the high variance in gradient estimates inherent in direct zeroth-order (ZO) optimization for defense, which undermines robustness.
- To design a practical and scalable defense framework that preserves model privacy while achieving strong certified robustness.
- To evaluate the method on both image classification and image reconstruction tasks under adversarial attacks.
Proposed method
- Proposes a general defensive operation based on denoised smoothing (DS), a first-order certified defense technique, adapted for black-box settings.
- Integrates zeroth-order (gradient-free) optimization to enable defense without access to model gradients or internal parameters.
- Incorporates an autoencoder (AE) to reduce the variance of ZO gradient estimates, improving optimization stability and convergence.
- Develops ZO-AE-DS, a defense framework that trains DS using variance-reduced ZO optimization on the latent space of the autoencoder.
- Employs a two-stage training process: pre-train the autoencoder on clean data, then jointly train the autoencoder and DS using ZO-based optimization.
- Uses a combination of random gradient estimation (RGE) and coordinate gradient estimation (CGE) for efficient ZO gradient approximation.
Experimental results
Research questions
- RQ1Can a certified defense be effectively applied to black-box models using only input-output queries?
- RQ2How can zeroth-order optimization be stabilized for robust defense when direct gradient computation is unavailable?
- RQ3Can an autoencoder reduce the variance of ZO gradient estimates to improve defense performance in black-box settings?
- RQ4How does the proposed ZO-AE-DS method compare to existing white-box and black-box defenses in terms of robustness, accuracy, and query efficiency?
Key findings
- ZO-AE-DS achieves competitive certified robustness and higher standard accuracy than FO-DS and ZO-DS across multiple image classification and reconstruction tasks.
- In image reconstruction, ZO-AE-DS maintains high SSIM (0.718 at ℓ₂=1.0) and low RMSE (0.164) under PGD attacks, outperforming ZO-DS and FO-DS.
- The method reduces query complexity significantly compared to baseline ZO-DS, with comparable or better performance using only 192 queries per update.
- Visualizations in Figure 5 show that ZO-AE-DS preserves image quality under adversarial attacks, while standard and ZO-DS methods produce highly distorted reconstructions.
- The autoencoder component effectively bridges the gap between first-order and zeroth-order optimization, enabling stable and effective training in black-box regimes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.