Zeroth-Order Hybrid Gradient Descent: Toward a Principled Black-Box Optimization FrameworkZeroth-Order Hybrid Gradient Descent: Towards A Principled Black-Box Optimization Framework
The authors propose the zeroth-order gradient estimator HGE and the ZO-HGD algorithm, which mixes random and coordinate gradient estimation; on CIFAR-10 black-box universal perturbation attacks, the authors claim its query efficiency and ASR are better than baselines such as ZO-SGD.
Black-box adversarial example generation: the attacker cannot access the internal parameters θ of the victim DNN and can optimize the perturbation δ only by submitting inputs and receiving predicted outputs (function evaluations); the goal is to use the C&W untargeted attack loss to generate a universal adversarial perturbation that causes M=10 CIFAR-10 test images to be misclassified simultaneously, while controlling ℓ2 distortion.
- Zeroth-order (ZO) optimization uses only function values to estimate gradients, but existing estimators must choose between query cost (RGE) and estimation accuracy (CGE). The authors ask whether a convex combination of RGE and CGE can simultaneously improve the shortcomings of both and be used in scenarios such as black-box adversarial attacks.
- Proposes the hybrid gradient estimator HGE: using RGE as a probe, selecting coordinates by coordinate importance sampling (solving a gradient sparsification problem to obtain probabilities p) to compute CGE, then forming a convex combination with the coefficient α that minimizes an upper bound on the variance, yielding the ZO-HGD algorithm, and provides convergence analysis for the non-convex, convex, and strongly convex cases.
- The theory gives E‖∇f‖²≤O(√(dnr/(T(1+dnr/P̄T)))) in the non-convex case, and the rate in the convex case reaches the existing optimal order. In experiments, DNNs are trained on CIFAR-10 and 50 trials are run to generate universal perturbations; the authors state that ZO-HGD converges faster, has higher early ASR, requires the fewest queries for a first successful attack, and has ℓ2 distortion comparable to the baselines.
- The authors state that extending to non-smooth problems is a planned future direction (Conclusion). Experiments are conducted only on one self-trained CIFAR-10 DNN, in the universal perturbation scenario, with 50 trials; Figures 1 and 2 are not labeled with specific values, and the paper does not report the threshold for determining attack success or statistical significance tests.
- Evaluated models
- DNN model with 5 convolutional layers and 2 fully connected layers (trained on CIFAR-10)
- Benchmarks
- CIFAR-10
- Metrics
- ASRℓ2 distortionobjective valueFQC
Proposes a zeroth-order optimization method based on a hybrid gradient estimator (HGE) that uses only function evaluations and combines the query efficiency of stochastic gradient estimation with the variance reduction of coordinate-wise gradient estimation. With coordinate importance sampling, the method is efficient in both iteration complexity and function query cost; the convergence analysis covers nonconvex, convex and strongly convex cases, and achieves optimality in the convex case. In a real black-box attack generation application, the method shows empirical advantages over state-of-the-art zeroth-order optimization methods.
Paper analysis
What problem does this paper attempt to solve?
The authors study the problem in stochastic zeroth-order optimization that query efficiency and accuracy of gradient estimation are difficult to achieve simultaneously, and propose the hybrid estimator HGE and the ZO-HGD algorithm.
Core question: in zeroth-order (ZO) optimization, can a convex combination of RGE and CGE simultaneously improve gradient estimation accuracy (relative to RGE) and function query efficiency (relative to CGE)?
- Problem setting: in many machine learning applications (black-box adversarial example generation, reinforcement learning, time-varying network control), the gradient of the objective function is unavailable or difficult to compute, and gradients can only be approximated using function values (Introduction).
- Trade-off of existing estimators: random gradient estimators (RGE) have low query cost but high variance; coordinate gradient estimators (CGE) are accurate, but the full-coordinate version requires O(d/nr) times as many queries as RGE (Section II). The authors argue that existing methods can only choose between saving queries and high accuracy.
- Core observation: RGE can serve as a probe to first compute a rough gradient, based on which coordinates are importance-sampled before computing CGE, thereby reducing the variance of HGE under a fixed query budget (Section III).
- Paper output: proposes the HGE estimator, the coordinate importance sampling method, and the ZO-HGD algorithm, provides convergence analysis for three classes of problems (non-convex, convex, strongly convex), and conducts empirical validation using black-box attack generation (Section I-A).
- Threat model (experimental part, Section VI):
- Attacker's goal: generate a universal adversarial perturbation δ that causes M=10 CIFAR-10 test images to be misclassified simultaneously (C&W untargeted attack loss).
- Knowledge: the attacker cannot access the model parameters θ; this is a black-box setting.
- Capability: can optimize δ only through function evaluations (submitting inputs and receiving predicted outputs).
- Victim system: a DNN trained on CIFAR-10 (5 convolutional layers, 2 fully connected layers).
What related research exists?
The paper reviews related work along two lines of zeroth-order optimization (random-direction estimation and coordinate estimation) and the black-box adversarial attack application, and uses ZO-SGD, ZO-SCD, and ZO-signSGD as baselines.
ZO Optimization Foundations and the Convex Case
- Nesterov & Spokoiny [7]: proposed ZO-GD for smooth deterministic convex problems and proved an O(d/T) convergence rate.
- Duchi et al. [6]: ZO-mirror descent generalized two-point estimation to the stochastic convex case, with rate O(√d/√T), which the authors relay was proved order-optimal; Shamir [12] proved the same rate optimal for non-smooth problems.
Non-convex ZO Methods and Variance Reduction
- Ghadimi & Lan [8]: the first non-convex stochastic ZO algorithm, ZO-SGD, using normally distributed random vectors, with rate O(√d/√T); Gao et al. [13] achieved the same rate using uniform sampling on the unit sphere.
- Lian et al. [9]: asynchronous ZO-SCD (coordinate estimation), with rate O(√d/√T); its uniform coordinate sampling is the object generalized in this paper.
- ZO-SVRG [32] and [18], [19]: introduced variance reduction into ZO, improving the iteration complexity to O(d/T), but the authors point out that the cost is increased function query complexity.
Other ZO Variants
- Constrained optimization [20], adaptive momentum ZO-AdaMM [21], ZO-signSGD [22] which suppresses extreme components of gradient noise, distributed ZO [23], [24]; the paper only describes them and does not compare them one by one.
Black-box Adversarial Attack Applications
- ZOO [25], Ilyas et al. [26], [27], OPT-attack [28], min-max attack [29], AutoZOOM [30]: generate adversarial examples using only input-output queries; the paper states that ZO-SCD and ZO-signSGD are the backbone of many black-box attack algorithms (Section VI).
Baselines and Benchmarks: the experimental baselines are ZO-SGD [8], ZO-SCD [9], ZO-signSGD [22]; the victim model is a DNN self-trained on CIFAR-10; the attack loss uses the C&W untargeted loss [39].
Authors' positioning: ZO-HGD is a generalization of ZO-SGD and ZO-SCD (degenerating to the former when nc=0 and to the latter when nr=0), striking a balance between iteration complexity and query complexity (Section I-A, IV).
How does the paper address this problem?
HGE uses RGE as a probe to perform coordinate importance sampling and obtain CGE, then forms a convex combination of the two with the coefficient α that minimizes an upper bound on the variance; ZO-HGD updates the iterate accordingly.
Overall idea: form a convex combination of the query-efficient random gradient estimation (RGE) and the lower-variance coordinate gradient estimation (CGE) to obtain the hybrid gradient estimator (HGE), and embed it in a gradient descent framework to form ZO-HGD (Algorithm 1).
Problem Setup
- Solve the black-box stochastic optimization problem min f(x) = E_ξ F(x; ξ), x ∈ R^d, where the objective can only be accessed through function evaluations (Equation (1)).
- Assumptions: the gradient is Lipschitz continuous (parameter L, Assumption 1); the coordinate-wise variance of the stochastic gradient is bounded by ζ² (Assumption 2, which implies σ² = dζ²).
Hybrid Gradient Estimator HGE
- HGE is defined as ∇̂HGE = α ∇̂RGE + (1−α)∇̂CGE (Equation (6)), where α ∈ [0,1] is the combination coefficient; RGE uses nr random directions on the unit sphere with perturbation radius µr (Equation (2)), and CGE uses coordinate set I with smoothing parameters µc,i (Equations (3), (7)).
- Unlike the uniform sampling in [9], Equation (7) allows coordinates to be sampled non-uniformly according to probabilities p, preserving unbiasedness.
Design of Coordinate Selection Probabilities p
- The RGE result g is treated as a probe, and coordinate selection is modeled as a gradient sparsification problem: minimize the variance of the sparsified estimate under the constraint that the expected sparsity does not exceed nc (Equation (8)).
- Proposition III.1 gives a closed-form solution: the k coordinates with the largest magnitudes have probability 1, and the rest are allocated according to |g_i|(nc−k)/Σ|g_j|; the extreme case (all components of equal magnitude) degenerates to uniform sampling nc/d.
Design of the Combination Coefficient α
- The HGE variance has no closed-form solution; Proposition III.2 first gives an upper bound (Equations (9)–(11)), then minimizes this upper bound over α, yielding α* = (1 + (1+d/nr)/P̄)⁻¹ (Equation (12)), where P̄ = (1/d)Σ 1/p_i.
- Extreme cases: as nr → ∞, α* ≥ 1/2; as P̄ → ∞, α* → 1 (RGE dominates); when nr = 0, α* = 0. Under uniform sampling, α* = (1 + nc/d + nc/nr)⁻¹, and CGE has greater weight when nc ≥ nr.
ZO-HGD Algorithm and Convergence Analysis
- Three steps per iteration: compute RGE to obtain the probe (line 4) → compute p according to Proposition III.1 and sample the coordinate set (line 5-6) → compute CGE and perform the HGE descent update (line 7-8); the output is drawn uniformly at random from {x_t}.
- Function query cost FQC = Σ(2nr|B^r| + 2nc,t|B^c|), which is O(T(nr + nc)) when the coordinate set size is constant.
- Non-convex case (Theorem IV.3): taking µc = (µr d)/2, a constant step size, and constant α gives E|∇ f(x̄T)|2 ≤ O(√(dnr/(T(1+dnr/P̄T)))), i.e., the convergence rate is governed by the ratio dnr/P̄T of the RGE and CGE query budgets.
- Convex and strongly convex cases (Theorem V.1): the average function value gap ≤ O((1/T)·dnr/(1+c̄·dnr)); under uniform sampling with O(q) queries per iteration (q = nr + nc), the rate is O(√((1+d/q)/T)), which the authors call optimal in order [6].
- Table I compares the smoothing parameter restrictions, convergence rates, and FQC of the methods; the authors claim ZO-HGD's smoothing parameter restriction is looser and that it covers ZO-SGD and ZO-SCD as special cases.
What experiments did the paper conduct?
One set of empirical results: universal adversarial perturbations are generated on a self-trained DNN on CIFAR-10, with 50 trials comparing 3 baselines; the authors claim ZO-HGD has better query efficiency and ASR.
Experimental Setup
- Victim model: a DNN with 5 convolutional layers + 2 fully connected layers, trained on CIFAR-10 for image classification (Section VI).
- Task: solve problem (16) to generate a universal adversarial perturbation, with the C&W untargeted attack loss as the loss and regularization parameter λ = 10.
- Trial scale: 50 random trials, each randomly selecting M = 10 images from the CIFAR-10 test set; the ASR in Figure 2 is based on 50 × 10 perturbed images.
- Baselines: ZO-SGD [8], ZO-SCD [9], ZO-signSGD [22].
- Hyperparameters: all methods use T = 1000, a per-iteration query budget (nc + nr) = 100, and smoothing parameter 0.001; ZO-HGD sets nc = 50, nr = 50, α_t = t/T; the learning rate is chosen by greedy search over [10⁻⁴, 10⁻¹], taking the best for each method.
- Metrics: objective function value (Figure 1), attack success rate ASR and ℓ2 distortion (Figure 2), number of queries required for the first successful attack (Table II); the paper does not state the threshold for determining ASR or a statistical test.
Main Results
The paper's main results are primarily figures; the axes of Figures 1 and 2 are not labeled with readable values, so only the authors' statements and the information visible in the figures can be relayed:
Method Queries for first successful attack (horse / car / bird / flight / frog) Final ℓ2 distortion ZO-SGD 37 / 255 / 25 / 176 / 635 0.67 ZO-SCD 35 / 239 / 21 / 166 / 610 0.71 ZO-signSGD 39 / 285 / 29 / 188 / 675 0.69 ZO-HGD 30 / 210 / 19 / 152 / 573 0.77 According to Table II: for the 5 images randomly selected in one trial, the predicted labels of all methods were changed to the same incorrect class.
- The authors claim that ZO-HGD requires the fewest queries for the first successful attack on each image, and that the perturbation strength after convergence is comparable across methods (Table II).
- The authors claim that in Figure 1, ZO-HGD reaches a smaller objective value with fewer queries and converges faster than ZO-SGD and ZO-SCD; the figure shows 4 curves, with the horizontal axis being the number of queries (up to 1×10⁵) and the vertical axis being the objective value (0–100); specific values are not labeled.
- The authors claim that in Figure 2-(a), ZO-HGD has a higher ASR than other methods in the early stage (2.5–5×10⁴ queries), and that in Figure 2-(b) the ℓ2 distortion is generally comparable across methods; the figures are box plots of 50 trials, with vertical axes labeled 0.0–1.0 (ASR) and 0.0–1.4 (distortion), respectively, and specific values are not labeled.
Theoretical Comparison (Table I)
- In the non-convex case, the authors compare ZO-HGD with ZO-GD, ZO-SGD, ZO-SCD, ZO-SVRG, and ZO-signSGD in a table on three items: smoothing parameter, convergence rate, and FQC; when dnr and P̄T are comparable, the rate is O(√((1/T)(1+d/(nr+nc)))) and FQC is O(T(nr+nc)).
- The authors claim that the restriction on the smoothing parameter of ZO-HGD is looser than that of other ZO algorithms; when nc = 1 it degenerates to the behavior of ZO-SCD.
Other Ablations and Analysis
- For the three budget regimes (dnr ≫ P̄T, ≪ P̄T, comparable), the convergence rate and FQC are respectively dominated by CGE, dominated by RGE, or balanced, and under uniform sampling FQC is O(d/ε²) in all cases (Section IV-c, Appendices C-D).
- In the convex case with uniform sampling and O(q) queries per iteration, the rate is O(√((1+d/q)/T)), which the authors call order-optimal (Section V).
- In the strongly convex case, for the weighted average iterate x̂T, Ef(x̂T) − f* ≤ O((1/T)·dnr/(1+c̄·dnr)) is guaranteed (Theorem V.1).
- The paper does not report ablation experiments on the setting α_t = t/T, the nc/nr ratio, or learning rate sensitivity.
What are some points that can be further explored?
The authors only state that extending to nonsmooth problems is a future direction; the experiments are conducted only on a single self-trained CIFAR-10 model, in a universal perturbation setting, with 50 trials.
Limitations and Future Directions Noted by the Authors
- The authors state that "extending to non-smooth problems is one of the future directions we plan to pursue" (Section VII Conclusion).
- The paper does not specifically discuss other limitations.
Scope of Experimental Coverage
- The model tested is 1 DNN self-trained on CIFAR-10 (5 convolutional layers + 2 fully connected layers); the paper does not report experiments on other models or datasets (Section VI).
- The attack scenario is universal adversarial perturbation (M = 10, λ = 10); per-image perturbation (M = 1) is only mentioned in the problem definition and is not experimented on (Section VI).
- The comparison methods are 3 baselines in total: ZO-SGD, ZO-SCD, ZO-signSGD; each method uses T = 1000 iterations, a per-iteration query budget of 100, and 50 random trials (Section VI).
- Figures 1 and 2 are presented only as curves and box plots, with axes not labeled with readable values; the paper does not report the threshold for determining ASR, variance numbers across repetitions, or statistical significance tests.
- The theoretical analysis covers three classes of smooth problems: non-convex, convex, and strongly convex (Theorems IV.3, V.1); non-smooth problems are not covered (the authors list them as a future direction).
Summarize the main content of the paper
The authors propose the hybrid zeroth-order gradient estimator HGE and the ZO-HGD algorithm, with theory covering three classes of smooth problems, and validate query efficiency on CIFAR-10 black-box universal perturbation attacks.
A zeroth-order (ZO) optimization paper whose application is black-box adversarial attacks: the authors study the problem that when only function values are used for gradient estimation, query efficiency and estimation accuracy are difficult to achieve simultaneously.
- Method: HGE forms a convex combination of random gradient estimation (RGE) and coordinate gradient estimation (CGE); RGE first serves as a probe, based on which a gradient sparsification problem is solved to obtain coordinate importance sampling probabilities (Proposition III.1), and then the two are combined with the coefficient α* that minimizes an upper bound on the variance (Equation (12)). ZO-HGD updates this way at each iteration, and degenerates to ZO-SGD and ZO-SCD when nc = 0 or nr = 0, respectively.
- Theory: in the non-convex case, E‖∇f(x̄)‖² ≤ O(√(dnr/(T(1+dnr/P̄T)))) (Theorem IV.3); in the convex and strongly convex cases the rate is O((1/T)·dnr/(1+c̄·dnr)) (Theorem V.1), which the authors claim is order-optimal under uniform sampling; Table I shows its smoothing parameter restriction is looser than existing ZO methods.
- Experiments: universal adversarial perturbations are generated on a self-trained DNN on CIFAR-10 (M = 10, 50 trials, per-iteration query budget 100). The authors claim ZO-HGD converges faster than ZO-SGD and ZO-SCD, has a higher ASR in the early stage (2.5–5×10⁴ queries), and has ℓ2 distortion comparable to the other methods (Figures 1, 2, with no specific values labeled).
- Specific numbers: for the 5 images in one trial in Table II, ZO-HGD's queries for the first successful attack are 30/210/19/152/573, fewer than the three baselines; the final ℓ2 distortion is 0.77, versus 0.67–0.71 for the baselines.
- Authors' conclusion: ZO-HGD strikes a balance between query efficiency and attack success rate; extending to non-smooth problems is a planned future direction.
Related papers
Show 3 more papers
- Stratified Adversarial Robustness with RejectionDefensesarXiv