Meta-Learning the Search Distribution of Black-Box Random Search Based Adversarial Attacks

Maksym Yatsura, Jan Hendrik Metzen, Matthias Hein

Abstract

Researchers have developed Meta Square Attack (MSA), which uses meta-learning to replace the hand-tuned heuristics of black-box adversarial attacks with a learned controller. By training on a single white-box model, MSA learns an adaptive search strategy that significantly outperforms standard attacks across different models, datasets, and query budgets.

The Brittle Nature of Black-Box Attacks

Adversarial attacks—small, imperceptible changes to an image that cause a neural network to misclassify it—are essential tools for evaluating model robustness. These attacks are categorized into white-box (where the attacker knows the model's internal weights) and black-box (where the attacker only sees the model's output scores).

Currently, one of the most effective black-box methods is the Square Attack. It uses a randomized search to find "squares" of color to change in an image. However, its success depends heavily on manually designed "schedules" that dictate how large these squares should be and what colors to use. These schedules are notoriously brittle: a setting that works for a budget of 5,000 queries might fail miserably for a budget of 500. The authors aim to replace these "human-in-the-loop" heuristics with an automated, adaptive system.

Methodology: Meta Square Attack (MSA)

Instead of using a fixed mathematical formula to shrink the search area over time, the authors propose using two small neural networks (Multi-Layer Perceptrons) as controllers:

  1. Update Size Controller: Decides how large the next perturbation square should be based on the current query count and the recent success rate of the attack.
  2. Color Controller: Learns which colors (from the corners of the RGB cube) are most likely to increase the model's loss.

The "Meta" Twist: These controllers are trained using a white-box "source model" (e.g., ResNet18). Because white-box access is available during training, gradient descent can be used to optimize the controllers to find adversarial examples as quickly as possible. To handle the difficulty of backpropagating through thousands of attack steps, the authors employ a "greedy" meta-optimization strategy that focuses on maximizing the loss increase at each immediate step. Once trained, these controllers are "plugged in" to attack entirely different models in a strict black-box setting.

Key Insights: Universal Search Strategies

  • Generalization of Strategy: Perhaps the most surprising finding is that a search strategy learned on a single ResNet18 model transfers effectively to dozens of other architectures (like WideResNets or Transformers) and even different datasets like ImageNet. This suggests that "how to search for a weakness" is a somewhat universal principle in deep learning.
  • Coarse-to-Fine Adaptation: The learned controller naturally discovers a "coarse-to-fine" strategy. If the attack is succeeding, it keeps the update size large to find the "global" structure of the adversarial perturbation. If it starts failing, it automatically shrinks the size to perform fine-grained adjustments.
  • Color Preference: Unlike the original Square Attack, which picks colors uniformly, the learned controller realizes that certain colors (like black and white) are often more effective for attacking specific models, and it adapts its sampling frequency on the fly.

Experimental Results

The proposed MSA was evaluated on CIFAR10, CIFAR100, and ImageNet, as well as the RobustBench standardized benchmark of 16 different robust models.

  • Efficiency Gains: MSA consistently improves the "robust accuracy" estimate (meaning it finds more successful attacks) by up to 20% compared to the standard Square Attack.
  • Budget Flexibility: While standard attacks need to be re-tuned for different query budgets, MSA adapts automatically. It outperforms baselines across all tested regimes.
  • Transferability: On ImageNet, MSA achieved significantly higher success rates in both untargeted and targeted attack scenarios compared to the original hand-tuned Square Attack.
Comparison of Update Size and Loss for Meta Square Attack versus baselines across 500 and 5000 query budgets.

As illustrated above, MSA smoothly adapts its update size (left plots) rather than relying on rigid step-functions, which directly translates to a more rapid and sustained increase in loss (right plots) regardless of whether the attacker has a 500 or 5,000 query budget.

Limitations and Future Directions

  • Source Model Dependency: The method assumes the attacker can train on at least one white-box model that is somewhat representative of the target. While the paper shows great transferability, a massive "distribution shift" might still hinder performance.
  • Black-Box Controllers: The controllers themselves are small neural networks. While more effective than manual formulas, they are "black boxes" that are harder for humans to interpret or mathematically prove bounds for.
  • Expanding the Search Space: Future work could move beyond "squares" to more complex geometric primitives or even learn to adapt the position of the search, not just the size and color.

Summary updated

BibTeX
@inproceedings{yatsura2021meta,
  author = {Maksym Yatsura and Jan Hendrik Metzen and Matthias Hein},
  title = {{Meta-Learning the Search Distribution of Black-Box Random Search Based Adversarial Attacks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=a9WXj5XV5mK},
}
Figure