Transferability Bound Theory: Exploring Relationship between Adversarial Transferability and Flatness

Mingyuan Fan, Xiaodan Li, Cen Chen, Wenmeng Zhou, Yaliang Li

In the world of AI security, "adversarial transferability" is the holy grail for attackers. It’s the ability to craft a malicious input (an adversarial example) that fools a local "proxy" model and then successfully tricks a completely different, unknown "target" model. For years, the community has operated under a prevailing hunch: if you find an adversarial example in a "flat" region of the loss landscape, it will transfer better.

A new paper from researchers at East China Normal University, Zhejiang University, and Alibaba Group turns this assumption on its head.

TL;DR

This paper provides the first theoretical bound for adversarial transferability, proving that "flatness" alone does not guarantee an attack will work on a new model. Based on this theory, the authors introduce TPA (Theoretically Provable Attack), a method that optimizes a surrogate of this bound to achieve a record-breaking 90% success rate against Vision Transformers.

What Problem Does This Paper Address?

Most successful transfer-based attacks borrow ideas from model generalization. Just as "flat minima" help a model generalize from training data to test data, researchers assumed flat adversarial examples would generalize from a proxy model to a target model. This led to a surge in "flatness-based" attacks.

However, this was largely an empirical observation without a solid mathematical foundation. The authors identified a critical gap: we didn't actually have a theoretical proof linking flatness to transferability. Without this, we couldn't know if we were optimizing the right things or if our attacks were as strong as they could be.

Methods

The researchers began by deriving a Theoretical Bound for transferability. They decoupled the "transfer loss" into three distinct components:

  1. Inherent Model Difference: How similar the proxy and target models are on natural data.
  2. First-order Gradient Component: This represents the traditional "flatness" metric.
  3. Second-order Gradient Component: This represents the "curvature" or how quickly the gradient changes.

The TPA Algorithm

The theory showed that an adversarial example could be perfectly "flat" (low first-order gradient) but still fail to transfer if the second-order component was high. To fix this, they proposed the Theoretically Provable Attack (TPA).

Directly optimizing second-order gradients (the Hessian matrix) is computationally "expensive"—it's slow and requires massive memory. To make TPA practical, the authors used a clever first-order surrogate. Instead of calculating the Hessian, they minimize the gradient norms of samples in a small neighborhood around the adversarial example. By using a Taylor expansion trick, they reduced the computation time from cubic to linear, making the attack as efficient as standard methods.

Key Insights and Ideas

  • Flatness is not enough: The most striking "aha moment" is the visualization showing that a point can be a local minimum for flatness but a peak for the second-order component. Optimizing for flatness alone is like trying to find a stable valley while ignoring how steep the surrounding cliffs are.
1D visualization showing that a local minimum for flatness can still have high second-order curvature.
  • The "ResNet" Assumption: The theory assumes the proxy model is ResNet-like (linear transformations + ReLU). While specific, this covers a vast majority of modern computer vision architectures.
  • Proxy Selection: The theory suggests that a proxy model doesn't need to look like the target model; it just needs to produce similar predictions on natural images. This relaxes the need for architectural similarity in black-box attacks.

Key Results

TPA sets a new benchmark for transfer-based attacks, evaluated across 14 different architectures on ImageNet:

Table showing TPA outperforming state-of-the-art methods across various proxy and target models.
  • Transformer Dominance: TPA is the first transfer-based attack to achieve an average 90% attack success rate against Vision Transformer (ViT) and Swin Transformer architectures.
  • Outperforming SOTA: It consistently beat current state-of-the-art methods like SSA and RAP across almost all model pairs, often by margins of 5-10%.
  • Real-World Impact: In "black-box" tests against commercial systems, TPA successfully fooled Google Vision's object detection and caused GPT-4 and Claude 3 to misidentify simple fruits as "cabbage" or "herbs" due to adversarial textures.

Limitations and Future Work

While TPA is powerful, the authors acknowledge some constraints:

  • Small Perturbations: The mathematical proof relies on Taylor expansions, which are most accurate for small changes ($\delta$). While it works in practice for larger perturbations, the theoretical tightness might decrease.
  • Proxy Dependency: The attack still requires a local proxy model. While it transfers well, the choice of proxy still influences the initial direction of the attack.
  • Defense Evolution: As attacks get stronger, the paper calls for the community to use these insights to build "flatness-aware" defenses that might be more resilient to second-order optimization.

By grounding adversarial attacks in rigorous theory, this paper moves the field away from "trial and error" and toward a more principled understanding of why AI models fail.

Summary updated

BibTeX
@inproceedings{fan2024transferability,
  author = {Mingyuan Fan and Xiaodan Li and Cen Chen and Wenmeng Zhou and Yaliang Li},
  title = {{Transferability Bound Theory: Exploring Relationship between Adversarial Transferability and Flatness}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=G522UpazH3},
}
Figure