MALT Powers Up Adversarial Attacks

Odelia Melamed, Gilad Yehudai, Adi Shamir

Adversarial attacks—the art of finding tiny, imperceptible perturbations that flip a model's prediction—have long been a "cat-and-mouse" game in machine learning. For years, AutoAttack has been the gold standard for evaluating model robustness. However, AutoAttack is notoriously slow, and as it turns out, it might be looking for targets in the wrong places.

In a recent NeurIPS paper, researchers introduce MALT (Mesoscopic Almost Linearity Targeting). MALT isn't just a new attack; it’s a smarter way to pick the "target" class for an attack, making it significantly more efficient and effective than the current state-of-the-art.

TL;DR

MALT is a novel adversarial targeting strategy that makes attacks five times faster than AutoAttack while achieving higher success rates. By leveraging the "mesoscopic almost linearity" of neural networks, MALT identifies the easiest target classes to reach, rather than just the most confident ones.

What Problem Does This Paper Address?

Most adversarial attacks are "targeted," meaning they try to force a model to classify an image as a specific wrong class (e.g., turning a "toaster" into a "guillotine"). On datasets like ImageNet with 1,000 classes, attacking every possible target is computationally prohibitive.

A toaster successfully attacked to be classified as a guillotine.

To save time, current state-of-the-art methods like AutoAttack use naive targeting: they only try to attack the top 9 classes the model is most confident in (excluding the correct one). The underlying assumption is that the "closest" class in the model's output space must be the "easiest" to reach in the input space. This paper argues that this assumption is often wrong. A class might have a high confidence score but be very difficult to reach because the model's decision boundary is "stiff" in that direction.

Methods

The core of MALT is a shift from naive logit-based sorting to a gradient-aware ranking.

Inspired by the behavior of linear classifiers, the authors propose a new scoring function. For a given input $x_0$ with correct label $\ell$, the score for a potential target class $j$ is:

$$\text{AttackScore}_j = \frac{(N(x_0))_j - (N(x_0))_\ell}{\|\nabla N(x_0)_j - \nabla N(x_0)_\ell\|}$$

Where $N(x_0)$ represents the model's logits. Intuitively, the numerator represents the distance the attack needs to travel in the output space, while the denominator (the norm of the Jacobian row difference) represents the speed or ease with which the model's output changes in that direction.

Target class scores evaluated during an attack.

MALT calculates this score for the top 100 classes and then runs a fast, standard attack (APGD) on only the top 9 classes according to this new ranking.

Datasets

The authors evaluated MALT on standard benchmarks for adversarial robustness:

  • CIFAR-100: A dataset of 60,000 32x32 color images in 100 classes.
  • ImageNet: The massive 1,000-class dataset used for large-scale visual recognition.
  • RobustBench: The authors tested against a variety of state-of-the-art robust models (e.g., Swin-L, ConvNeXt) hosted on this standard leaderboard.

Key Insights and Ideas

  • The Mesoscopic Scale: The authors categorize neural network behavior into three scales: macroscopic (highly non-linear), microscopic (piecewise linear for ReLU networks), and mesoscopic (the intermediate distance typical of adversarial examples). They argue that at this mesoscopic scale, networks behave surprisingly like linear functions.
  • Linearity as a Tool: While neural networks are non-linear, MALT proves that a linear approximation is often "good enough" to predict which target classes are most vulnerable.
  • Path of Least Resistance: Naive targeting picks targets that are "close" in probability. MALT picks targets where the gradient is large, effectively finding the "steepest descent" toward a misclassification.

Key Results

  • Speed: MALT is 5x faster than AutoAttack on ImageNet. This is because MALT's targeting is so effective that it only needs to run one type of attack (APGD) to match or beat AutoAttack's complex ensemble of four different attacks.
  • Effectiveness: MALT successfully attacked every image that AutoAttack could, plus additional samples that AutoAttack missed.
  • Robust Accuracy: On ImageNet, MALT reduced the reported robust accuracy of top models (like Swin-L) by about 0.06%, proving that current "robust" models are slightly less secure than previously thought.

Limitations and Future Work

  • White-Box Requirement: MALT requires access to the model's gradients (the Jacobian) to calculate its scores, making it a white-box attack. Its effectiveness in black-box or transfer-based settings remains an open question.
  • Hyperparameters: While the authors found $a=9$ (number of targets) and $c=100$ (number of candidates) to be robust, these might need tuning for different architectures.
  • Second-Order Attacks: The authors suggest that future work could explore using second-order approximations (Hessians) to refine targeting even further, though this would come with a higher computational cost.

By showing that we can "work smarter, not harder" when choosing adversarial targets, MALT sets a new, more efficient bar for evaluating the robustness of the next generation of AI models.

Summary updated

BibTeX
@inproceedings{melamed2024malt,
  author = {Odelia Melamed and Gilad Yehudai and Adi Shamir},
  title = {{MALT Powers Up Adversarial Attacks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=bCqIx5Q8qX},
}
Figure