Overcoming Surrogate Model Overfitting in Black-Box Adversarial Attacks

428 concepts342 papers

Imagine trying to pick a high-security lock you have never seen before. Because you cannot access the target lock, you buy a similar model from a local store, study its internal pins, and craft a master key tailored perfectly to it. But when you try your key on the target lock, it jams.

Why did it fail? Your key was too perfectly optimized for the microscopic, accidental imperfections of the store-bought lock rather than the fundamental mechanics shared by both designs.

In machine learning security, this mismatch is known as the adversarial transferability gap. When attacking a "black-box" system—where the target model's weights and architecture are hidden—attackers typically optimize perturbations against a locally available surrogate model. However, as explored by Yaoyao Zhong and Weihong Deng in Towards Transferable Adversarial Attack against Deep Face Recognition, these adversarial examples frequently overfit to the specific architectural quirks and decision boundaries of the surrogate, causing them to fail when deployed against an unseen target.

To build attacks that reliably transfer, researchers must move away from simple optimization and instead design techniques that prevent the perturbation from overfitting to the surrogate.


The Root Cause: Sharp Landscapes and Architectural Bias

Standard adversarial attacks use gradient ascent to maximize a model's loss function, finding the exact pixel or token adjustments that cause a misclassification. The optimizer naturally takes the path of least resistance on the surrogate's loss landscape.

The problem is that this path often leads to sharp local maxima—narrow, steep peaks in the loss landscape. These peaks represent highly specific geometric anomalies in the surrogate's decision boundaries. They are caused by the surrogate's unique weight initialization, training data, or architectural artifacts.

Loss
  ^          _/\_  <-- Sharp Maximum (Overfitted to Surrogate;
  |         /    \                  Fails to Transfer)
  |       _/      \_
  |     _/          \______
  |    /                   \____  <-- Flat Maximum (Intrinsic Vulnerability;
  +------------------------------------> Perturbation Space  Transfers Well)

For example, specific structural choices within a network can heavily distort gradient directions. Dongxian Wu et al. demonstrated in Skip Connections Matter: On the Transferability of Adversarial Examples Generated with ResNets that residual shortcuts act as a double-edged sword: they ease training but also heavily bias the generated gradients, creating perturbations that exploit skip connections rather than general model vulnerabilities.

When an attack relies on these brittle, model-specific features, a slight shift in the target model's decision boundary is enough to render the attack completely harmless.


Strategy 1: Seeking Flat Local Maxima

If a perturbation lands on a sharp peak, any slight variation in the target model's geometry will cause the loss to drop, neutralizing the attack. However, if the optimization converges onto a broad, flat local maximum, the perturbation remains effective even if the target model's decision boundaries are slightly shifted or rotated.

To force optimization algorithms toward these robust regions, Zhijin Ge et al. introduced the Penalizing Gradient Norm (PGN) framework in Boosting Adversarial Transferability by Achieving Flat Local Maxima. By regularizing the optimization process to penalize sharp gradient changes, the authors guide the perturbation away from narrow peaks and toward stable plateaus.

Another way to find these flat regions is to dynamically perturb the surrogate itself during the attack. In LGV: Boosting Adversarial Example Transferability from Large Geometric Vicinity, Martin Gubri et al. proposed collecting multiple weight sets from a pretrained model using a high learning rate. By optimizing the adversarial example against this "geometric vicinity" of weights, the attack naturally avoids the sharp quirks of any single weight configuration, finding a flat region common to the entire model neighborhood.


Strategy 2: Ensembling and Weight Distributions

Instead of trying to smooth out the landscape of a single surrogate, a second major strategy is to optimize against a diverse distribution of models simultaneously. The intuition is simple: a feature that deceives ten different models is highly likely to deceive an eleventh.

However, standard ensembling can still suffer from high variance if the models share similar architectures. To overcome this, Qizhang Li argues in Making Substitute Models More Bayesian Can Enhance Transferability of Adversarial Examples that treating a substitute model's weights as a continuous probability distribution—a Bayesian approach—creates an "infinite ensemble." This smooths out individual model idiosyncrasies and isolates fundamental, shared vulnerabilities.

When dealing with explicit multi-model ensembles, the optimization trajectory can become erratic as gradients from different architectures conflict. To stabilize this path, Yifeng Xiong et al. developed the Stochastic Variance Reduced Ensemble (SVRE) attack in Stochastic Variance Reduced Ensemble Adversarial Attack for Boosting the Adversarial Transferability. By treating the ensemble as a dataset and minimizing gradient variance across iterations, the authors ensure that the optimization trajectory converges on universally vulnerable directions rather than oscillating between surrogate-specific shortcuts.


Strategy 3: Data Augmentation and Feature Alignment

A third perspective focuses on the input space rather than the parameter space. If an adversarial perturbation is optimized for a static, pristine image, it will likely exploit pixel-level high-frequency noise unique to the surrogate's feature extractors.

By applying aggressive data augmentations during the optimization process, the attack is forced to remain effective across various scales, translations, and textures. Zebin Yun et al. formalized this in The Ultimate Combo: Boosting Adversarial Example Transferability by Composing Data Augmentations, demonstrating that a parallel composition of diverse augmentations prevents the perturbation from binding to surrogate-specific pixel patterns, drastically improving black-box generalization.

                  /---> Augmentation A (Scale) -----\
Input Image ---> ----> Augmentation B (Rotate) ----> ---> Joint Gradient Optimization
                  \---> Augmentation C (Texture) ---/

This concept extends naturally to complex, multimodal domains. When attacking closed-source Multimodal Large Language Models (MLLMs), pixel-level attacks fail because the proprietary vision encoders differ significantly from open-source surrogates.

To bridge this cross-modal gap, Xiaojun Jia et al. developed the FOA-Attack in Adversarial Attacks against Closed-Source MLLMs via Feature Optimal Alignment. Instead of maximizing a raw classification loss, the authors use optimal transport to align both global semantics and fine-grained local features between the source and manipulated inputs. By forcing the surrogate's deep feature representations to match a target concept, the attack targets the semantic layer of the network—a layer that remains remarkably consistent across both open-source surrogates and proprietary models like GPT-4o.

History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_adversarial_transferability_gap_surrogat_f6cb86d0,
  title = {adversarial transferability gap (surrogate model overfitting)},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/adversarial-transferability-gap-surrogate-model-overfitting/rdr_f6cb86d0084d42729b2ca3ea9a9568a2},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-27},
}

This exact version (version 1, frozen text):

@misc{lacuna_adversarial_transferability_gap_surrogat_f6cb86d0_v1,
  title = {adversarial transferability gap (surrogate model overfitting)},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/adversarial-transferability-gap-surrogate-model-overfitting/rdr_f6cb86d0084d42729b2ca3ea9a9568a2/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-27},
}

See something wrong? Report a mistake