TL;DR
This paper moves beyond simple averaging in ensemble-based adversarial attacks by identifying "common weaknesses" across different neural networks. By optimizing for both loss landscape flatness and closeness to individual model optima, the proposed Common Weakness Attack (CWA) significantly boosts the transferability of adversarial examples to unknown black-box models, even successfully fooling commercial systems like Google's Bard.
What Problem Does This Paper Address?
Adversarial attacks—perturbations to input data that cause deep learning models to fail—are a major security concern. In a "black-box" scenario, the attacker doesn't know the architecture or weights of the victim model. To get around this, researchers use transfer-based attacks: they craft an adversarial example on a known "surrogate" model and hope it "transfers" to the unknown victim.
A common strategy to improve transferability is to attack an ensemble of surrogate models simultaneously. However, most existing methods simply average the outputs (logits or losses) of these models. The authors of this paper argue that this approach lacks depth. They set out to understand why ensembles work and how to more effectively exploit the shared vulnerabilities—the "common weaknesses"—of multiple models to create more potent, transferable attacks.
Methods
The authors rethink the ensemble objective using a second-order Taylor expansion of the loss function. This mathematical analysis reveals two critical properties that determine how well an attack transfers:
- Flatness of the loss landscape: If the loss landscape around the adversarial example is "flat," the attack is less sensitive to the specific architectural differences between the surrogate and the victim.
- Closeness to local optima: An ideal adversarial example should be a point that is simultaneously near a local maximum of the loss function for all models in the ensemble.
To exploit these properties, they propose the Common Weakness Attack (CWA), which integrates two sub-methods:
- Sharpness Aware Minimization (SAM): Originally a technique to improve model generalization during training, the authors adapt it for attacks. It pushes the adversarial example toward regions where the loss landscape is flatter.
- Cosine Similarity Encourager (CSE): This novel component encourages the attack to find a point where the gradients of all models in the ensemble point in similar directions. Theoretically, maximizing this cosine similarity pushes the adversarial example toward the shared local optima of the ensemble.
CWA is designed to be "plug-and-play," meaning it can be easily integrated into existing iterative attack frameworks like the Momentum Iterative (MI) method.
Key Insights and Ideas
- Flatness is Robustness: An attack found in a "sharp" peak of the loss landscape on a surrogate model might completely miss the adversarial region of a victim model. A "flat" region is much more likely to overlap across different architectures.
- Gradient Alignment as a Proxy: Directly finding a point close to multiple local optima is computationally hard. The authors realized that maximizing the cosine similarity between gradients of different models serves as an effective and efficient proxy for finding these shared "common weaknesses."
- Ensembles are not just for Averaging: Simple averaging can allow the strong features of one surrogate model to overwhelm the useful information in others. CWA specifically looks for what is common to all of them, leading to much better generalization to unseen models.
Datasets and Key Results
The authors evaluated CWA across several domains, including image classification (NIPS 2017 adversarial competition dataset), object detection (INRIA dataset), and vision-language models.
- Superior Transferability: In image classification, CWA (integrated with MI) outperformed standard ensemble averaging by massive margins. When attacking state-of-the-art defense models from RobustBench, it improved success rates by 30%.
- Breaking Defenses: CWA achieved near 100% success rates against several randomized and purified defense mechanisms (like R&P and BitDepthReduction) and reached 97.5% against the advanced DiffPure defense.
- Object Detection: CWA generated universal adversarial patches that reduced the mean Average Precision (mAP) of eight modern detectors to just 9.85%, compared to 31.48% for the standard ensemble baseline.
- Real-World Impact: The attack successfully fooled Google's Bard in a black-box setting, causing it to misdescribe images, claim it was "blind" (unable to see the image), or refuse to process them entirely.
Limitations and Future Work
- Computational Cost: While the authors argue CWA is efficient, it does require more function evaluations per iteration than simple averaging (roughly $2n$ vs $n$, where $n$ is the number of models).
- Hyperparameter Sensitivity: The method introduces new hyperparameters (like the inner step sizes), though ablation studies suggest the performance is relatively stable across a range of values.
- Future Directions: The authors suggest that exploring even more diverse surrogate ensembles (e.g., mixing CNNs and Transformers) could further enhance the "common weakness" discovery. Additionally, this work highlights the urgent need for more robust defenses that specifically target these shared vulnerabilities.
Summary updated