Hessian-Free Second-Order Adversarial Examples for Adversarial Learning

Yaguan Qian, Yuqi Wang, Bin Wang, Zhaoquan Gu, Yuhan Guo, Wassim SwaileharXiv 2022 · DOI

Introduction

Deep Neural Networks (DNNs) are notoriously fragile; small, imperceptible perturbations—known as adversarial examples—can easily fool them into making incorrect predictions. To defend against these threats, researchers employ adversarial training, a process where models are trained on these "broken" examples to learn more robust features.

Most current attacks, such as Projected Gradient Descent (PGD) or Fast Gradient Sign Method (FGSM), rely exclusively on first-order gradients (the slope of the loss function). While computationally efficient, these methods are "curvature-blind," failing to account for how the loss landscape bends. Second-order methods utilizing the Hessian matrix provide a much more accurate map of this landscape but are traditionally avoided due to the prohibitive $O(n^3)$ computational complexity of calculating a Hessian-inverse. This paper introduces a "Hessian-free" approach to bridge the gap between theoretical precision and practical scalability.

Methodology: Hessian-Free Approximation

The authors propose SOAE (Second-Order Adversarial Examples), a method that captures second-order information without ever explicitly calculating the full Hessian matrix.

  1. Krylov Subspace Optimization: Instead of inverting the Hessian directly, the optimal perturbation direction is approximated as a linear combination of Hessian-vector products within a Krylov subspace.
  2. GMRES Algorithm: The Generalized Minimum Residual (GMRES) method is employed to solve the optimization problem efficiently.
  3. Finite Difference Trick: To remain "Hessian-free," the Hessian-vector product ($Hg$) is approximated using the difference between two first-order gradients: $Hg \approx \frac{\nabla L(x + \eta g) - \nabla L(x)}{\eta}$. This reduces the complexity to roughly the same order as standard backpropagation.
  4. SOAT (The Defense): By integrating these high-quality SOAEs into the training phase, the authors develop Second-Order Adversarial Training (SOAT). This defense encourages the model to develop a smoother loss landscape and higher overall robustness.

Key Insights: Edge Sensitivity and Efficiency

Visualization of internal feature maps reveals that SOAE perturbations are highly strategic, specifically targeting the objective edges of images—areas where pixel values change rapidly. This aligns with classical image processing, where second-order derivatives are the standard for edge detection.

Visual comparison of feature maps across different attack types. SOAE perturbations notably target objective edges in deeper layers, such as conv4_2 and conv5_2.

Furthermore, SOAE demonstrates superior efficiency in finding successful attacks. While PGD often requires 7–20 iterations to reach its peak effectiveness, SOAE typically converges in fewer than 4 iterations. This suggests that second-order directions act as "shortcuts" to misclassification by more accurately following the curvature of the loss landscape.

Experimental Results

The researchers evaluated their methods on standard benchmarks including MNIST, CIFAR-10, and ImageNet-100.

Robustness results on the ImageNet-100 dataset. SOAT-trained models consistently outperform existing first- and second-order defenses across various attack types.

As shown in the experimental results, models trained with SOAT demonstrated state-of-the-art robustness. For example, on ImageNet-100, a SOAT-trained WideResNet maintained 51.46% accuracy against SOAE attacks and 47.53% against the formidable AutoAttack, significantly surpassing other second-order defenses like SOAR and SCORPIO. Additionally, SOAEs achieved higher PSNR and SSIM scores than PGD, indicating that these adversarial changes are harder for humans to detect despite being more effective at fooling the model.

Conclusion and Future Work

By approximating second-order information through a Hessian-free framework, SOAE and SOAT provide a potent new toolkit for adversarial research. While the method requires careful tuning of hyperparameters—specifically the difference step-size ($\eta$) and the approximation threshold ($\tau$)—it successfully scales second-order precision to high-resolution datasets like ImageNet. Future work will explore optimized initial point selection for Taylor expansions to further refine the accuracy of the second-order approximation.

Summary updated

BibTeX
@misc{qian2022hessian,
  author = {Yaguan Qian and Yuqi Wang and Bin Wang and Zhaoquan Gu and Yuhan Guo and Wassim Swaileh},
  title = {{Hessian-Free Second-Order Adversarial Examples for Adversarial Learning}},
  year = {2022},
  eprint = {2207.01396},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2207.01396},
}
Figure