TL;DR
The paper introduces Spatial Adversarial Alignment (SAA), a novel fine-tuning technique that significantly boosts the transferability of adversarial attacks across different neural network architectures (e.g., from CNNs to Vision Transformers). By aligning both local spatial features and adversarial feature distributions between a surrogate model and a witness model, SAA generates highly robust adversarial perturbations. This approach yields state-of-the-art black-box attack success rates, narrowing the performance gap between black-box and white-box attack scenarios.
What Problem Does This Paper Address?
Adversarial examples—inputs crafted with imperceptible perturbations designed to fool machine learning models—are highly effective in "white-box" settings where the attacker has full access to the target model. In real-world applications, however, attackers usually operate in a "black-box" setting, meaning they must generate adversarial examples on a known surrogate model and hope they transfer successfully to the hidden target model.
While adversarial transferability works reasonably well between similar architectures (e.g., from one CNN to another), it plummets drastically in cross-architecture scenarios, such as transferring an attack from a CNN to a Vision Transformer (ViT). CNNs and ViTs process images fundamentally differently: CNNs rely on localized convolutional layers and downsampling, whereas ViTs flatten images into patches and utilize global self-attention mechanisms. Prior attempts to bridge this gap, such as Model Alignment (MA), only align the final output logits, completely ignoring these massive internal structural and spatial discrepancies.
Methods
To overcome these architectural barriers, the authors propose Spatial Adversarial Alignment (SAA). Instead of just matching final predictions, SAA fine-tunes the surrogate model using a "witness model" (a model of a different architecture) through two core alignment strategies:
- Spatial-aware Alignment: SAA minimizes feature divergence at both the global level (final logits) and the local level. For local alignment, it maps dense spatial regions between the models. Because CNN feature maps and ViT patch embeddings don't naturally match, SAA uses local pseudo-labels generated by the witness model to supervise and align the local feature representations of the surrogate model.
- Adversarial-aware Alignment: Recognizing that adversarial examples have distinct feature distributions, SAA introduces a self-adversarial strategy. It iteratively crafts adversarial examples under the guidance of the witness model's global features and forces the surrogate model to align its internal features on these adversarial inputs as well.
The final optimization objective combines both spatial and adversarial losses to train a highly generalized surrogate model.
Datasets
The experiments were conducted using the ImageNet-compatible dataset, a widely recognized benchmark for adversarial robustness consisting of 1,000 images selected from the ImageNet validation set.
Key Insights and Ideas
- Logit Matching is Not Enough: Simply aligning the final outputs (logits) of two structurally distinct models fails because their intermediate representations remain fundamentally mismatched. Local spatial alignment is crucial for cross-architecture transferability.
- Adversarial Features Matter: Aligning models solely on clean images misses shared vulnerabilities. Forcing the surrogate model to mimic the witness model's behavior on adversarial examples allows it to capture common blind spots inherent to different architectures.
- Asymmetric Cross-Alignment Wins: The authors discovered that "self-alignment" (using the same architecture for surrogate and witness) provides negligible benefits. The biggest gains happen when aligning a ViT surrogate with a CNN witness, leveraging the strong performance of ViTs alongside the unique structural features of CNNs.
Key Results
SAA was evaluated across 6 CNNs and 4 ViTs, demonstrating massive improvements over existing baselines:
- Massive Transferability Boost: When using ResNet50 as a surrogate, SAA improved the adversarial transferability rate to ViT models by 25.5% to 39.1% compared to the standard Model Alignment (MA) method.
- Seamless Attack Integration: SAA can be combined with existing transfer attacks (like DI, TI, and SSA). When integrated into an ensemble attack (SSA-DI-TI-MI-SAA), it achieved an astonishing 88.2% average attack success rate (ASR) across diverse target architectures, effectively closing the gap with white-box attacks.
- Visualizing the Impact: Grad-CAM visualizations show that adversarial examples generated by unaligned models leave the target model's attention focused on the main subject. In contrast, SAA-aligned perturbations successfully disrupt and scatter the target model's attention across the entire image.
Limitations and Future Work
While SAA marks a significant step forward, the authors note a few limitations:
- The Architecture Gap Remains: Although SAA mitigates the feature gap between CNNs and ViTs, it does not completely eliminate it; structural differences still bound the maximum achievable transferability.
- Computational Overhead: Generating adversarial examples during the fine-tuning phase adds computational cost. Fine-tuning via SAA takes roughly 10 hours on an Nvidia RTX 3090, compared to just 2 hours for simpler logit-matching methods (though it requires no extra cost during the actual attack phase).
- Lack of Theoretical Analysis: The approach is heavily empirical, and a rigorous mathematical framework explaining why these specific spatial-adversarial feature spaces intersect so cleanly remains open for future research.
Summary updated