On the Adversarial Transferability of Generalized "Skip Connections"

Yisen Wang, Yichuan Mo, Dongxian Wu, Mingjie Li, Xingjun Ma, Zhouchen Lin

TL;DR

While skip connections are essential for training deep, powerful neural networks, they also introduce a significant security vulnerability. This paper demonstrates that favoring gradients from skip connections during backpropagation makes it much easier to generate highly transferable black-box adversarial attacks. By exploiting this property, the proposed Skip Gradient Method (SGM) drastically improves attack success rates across diverse architectures, including CNNs, Vision Transformers, and Large Language Models.

What Problem Does This Paper Address?

Adversarial attacks—small, imperceptible perturbations designed to fool machine learning models—are highly effective in white-box settings where the attacker has full access to the model. However, in practical, real-world scenarios, target models are kept secret behind APIs (black-box settings). Attackers must rely on transferability: crafting an attack on a known "surrogate" model and hoping it fools the secret target model.

While existing transfer techniques use tricks like data augmentation or momentum boosting, they treat the surrogate network as a monolithic black box. This paper addresses a fundamental gap: How do the internal architectural characteristics of a network affect adversarial transferability? Specifically, the authors investigate skip connections, a design element standard in almost all state-of-the-art deep models.

Methods

The authors introduce the Skip Gradient Method (SGM), a remarkably simple yet effective modification to standard gradient-based attacks.

During the backpropagation step used to generate an adversarial image, the gradient flow splits at every residual block: one path goes through the complex residual module (like convolutional or self-attention layers), and the other goes through the identity skip connection. SGM introduces a decay factor $\gamma \in (0, 1]$ that multiplies the gradients coming out of the residual modules.

By scaling down the residual gradients, SGM ensures that the gradients flowing through the simpler, direct skip connections dominate the final adversarial perturbation. The authors elegantly extend this concept beyond ResNets to:

  1. Vision Transformers (ViTs): By decaying gradients from both the self-attention and MLP blocks.
  2. Architectures with Varying-Length Paths (e.g., Inception, NAS models): By decaying gradients proportionally to the number of parametric layers they traverse, ensuring shorter paths always dominate.
  3. Large Language Models (LLMs): Integrating SGM into gradient-based text jailbreaking frameworks.

Datasets

  • Computer Vision: Evaluated using 5,000 correctly classified validation images from the ImageNet dataset.
  • Natural Language Processing: Evaluated using the AdvBench dataset, a benchmark for evaluating LLM safety and jailbreak transferability.

Key Insights and Ideas

  • Skip Connections are Transferability Highways: Through a clever toy experiment on ResNet-18, the authors discovered that completely blocking gradients from the final residual modules while keeping the skip connection gradients intact actually increased the black-box attack success rate against a VGG19 model from 52.52% to 62.10% (as illustrated in the figure below).
Fig. 1: Illustration of the last 3 skip connections (green lines) and residual modules (black boxes) of a ImageNet-trained ResNet-18. The success rate (“white-box/black-box”) of adversarial attacks crafted using gradients flowing through either a skip connection (b) or a convolution module (c) at each junction point (circle). The attacks are crafted by BIM on 5000 ImageNet validation images under maximum L∞perturbation ϵ = 16 (pixel values are in [0, 255]). The black-box success rate is tested against a VGG19 target model.
  • Residual Modules Overfit to the Architecture: Gradients that pass through deep, highly non-linear residual layers capture features specific to that exact surrogate model. Conversely, gradients from shorter, linear skip connections capture more fundamental, global geometric properties of the data distribution that generalize across different architectures.
  • Modality-Agnostic Vulnerability: This architectural vulnerability is not unique to vision. Because Transformers rely heavily on residual connections, SGM successfully amplifies text-based jailbreak transfers between entirely different LLMs.

Key Results

The authors integrated SGM into 35 state-of-the-art adversarial attacks, demonstrating massive performance leaps:

  • CNNs: When attacking a defense-equipped SENet-154 model using a ResNet-50 surrogate, adding SGM to the advanced SMI-FRSM attack boosted the success rate from 47.96% to 62.09%.
  • Transformers: On Vision Transformers (ViT-B), combining SGM with a standard PGD attack increased the black-box transfer success rate against VGG16 from 16.34% to 21.04%.
  • Large Language Models: Integrating SGM into the Greedy Coordinate Gradient (GCG) jailbreak framework significantly enhanced transfer success rates from a Vicuna-7B surrogate to target models like Stable-Vicuna-13B (jumping from 31.50% to 42.00%).

Limitations and Future Work

While SGM is highly effective, selecting the optimal decay hyperparameter $\gamma$ requires some calibration. The authors note that the best $\gamma$ depends almost entirely on the source model's architecture rather than the target model. For instance, networks with explicit skip connections (like ResNet) perform best with a strong decay ($\gamma = 0.2$), whereas networks with varying path lengths but no explicit skip connections (like Inception) require a milder decay ($\gamma = 0.6$).

Ultimately, this work highlights a critical security trade-off in deep learning design: the very structures that make deep networks easy to train also make them easier to attack. The authors leave the design of secure architectures that can mitigate this vulnerability as an open challenge for future research.

Summary updated

BibTeX
@article{wang2026adversarial,
  author = {Yisen Wang and Yichuan Mo and Dongxian Wu and Mingjie Li and Xingjun Ma and Zhouchen Lin},
  title = {{On the Adversarial Transferability of Generalized "Skip Connections"}},
  journal = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year = {2026},
  doi = {10.1109/tpami.2026.3666165},
}
Figure