NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Assessing Neural Network Robustness via Adversarial Pivotal Tuning

Peter Ebert Christensen, Vésteinn Snæbjarnarson, Andrea Dittadi, Serge Belongie, Sagie Benaim

TL;DR

Adversarial Pivotal Tuning (APT) is a novel framework that assesses neural network robustness by generating highly expressive, photorealistic, and class-preserving semantic manipulations. By fine-tuning the weights of a pretrained generative model (like StyleGAN-XL) rather than just searching its latent space, APT creates "natural-looking" adversarial examples—such as removing a mantis's eye or changing a car's model—that successfully fool even the most "robust" modern classifiers.

What Problem Does This Paper Address?

Most research into adversarial robustness focuses on $l_p$-bounded perturbations—tiny, noise-like changes to raw pixels that are often invisible to humans. While modern classifiers are becoming increasingly resilient to this noise, they remain vulnerable to semantic manipulations: changes to lighting, texture, or object parts that don't change the image's category but do confuse the AI.

Existing semantic attacks are often limited to simple style transfers or color shifts. They fail to leverage the full expressive power of modern generative models. The authors identify a gap: we lack a method to generate detailed, diverse, and realistic semantic changes that can rigorously test whether a classifier truly understands the "content" of an image or is just relying on fragile shortcuts.

Methods

The APT framework operates in two distinct steps, inspired by GAN inversion techniques:

  1. Latent Optimization (Step 1): Given a target image, the method first finds a "pivot" latent vector ($w_p$) that allows a pretrained generator (like StyleGAN-XL) to reconstruct the image as closely as possible while the generator's weights remain frozen.
  2. Adversarial Pivotal Tuning (Step 2): The latent vector is frozen, and the generator's weights are fine-tuned. The optimization objective is three-fold:
  3. Reconstruction Loss: Keep the generated image looking like the original.
  4. Projected GAN Loss: Ensure the image stays within the "real" data distribution (looking photorealistic to a discriminator).
  5. Fooling Loss: Specifically manipulate the image to make a target classifier predict an incorrect class.

To ensure the changes remain "class-preserving" (i.e., a dog doesn't turn into a cat), the authors bound the perceptual distance between the original and the manipulated image, stopping the optimization once a threshold is reached.

Figure 2. The Adversarial Pivotal Tuning (APT) framework. In the first step, we optimize a style code wp using standard latent optimization Lo from Eq. (1), while keeping the generator G frozen. The loss is computed between the ground-truth image xgtr and the generated image xgen. In the second step, we freeze wp and finetune G (shown in red) using the three objectives from Eq. (8); a reconstruction objective Lrec, the projected GAN objective using the discriminator D, LP G, and our fooling objective LCE using the classifier C. A ∗is used to indicate a frozen component.

Datasets

The study primarily utilizes ImageNet-1K. The authors evaluate their method on 3,000 images from the ImageNet validation set and use 50,000 images from the training set for adversarial training experiments. They test against a variety of architectures, including ResNet-50, MAE, ConvNeXt, and robust variants like PRIME-ResNet50 and FAN-ViT.

Key Insights and Ideas

  • Weight Tuning > Latent Search: The core "aha" moment is that optimizing the generator's weights (Pivotal Tuning) provides far more expressive power than simply searching the latent space. This allows for structural changes (like removing ropes from a ship) that latent-only methods cannot achieve.
  • Robustness is Relative: Classifiers specifically trained to be robust against standard noise attacks (like PRIME) are still highly vulnerable to APT. This suggests that current "robustness" is often just a defense against high-frequency noise, not a deeper understanding of semantic features.
  • Natural Distribution Matters: By using a GAN discriminator during the attack, APT ensures the adversarial examples look like real images. This makes the attack harder to detect and more representative of "in-the-wild" failures.
  • Transferability: Manipulations designed to fool one model (e.g., a ResNet) often successfully fool others (e.g., a Vision Transformer), indicating that these semantic vulnerabilities are shared across different AI architectures.

Key Results

  • Significant Accuracy Drops: The accuracy of a robust PRIME-ResNet50 dropped from 77.1% to 57.7% when faced with APT manipulations.
  • Human vs. AI: In user studies, humans correctly identified the original class in 90% of APT-generated images, whereas the target AI was successfully fooled. This confirms the manipulations are truly class-preserving to human eyes.
  • Visual Diversity: As shown in Figure 1, APT can perform complex edits like changing the type of a race car or removing text from an airship, which previous methods (like [25]) fail to do realistically.
Figure 1. Generated manipulations. Row 1 shows the original images. Row 2 shows our manipulations (using a distance of 0.2). Row 3 shows the result of [25], using pixel-space adversarial manipulations applied to StyleGAN-XL’s reconstructions. Row 4 shows the result of [25] with latent space manipulates applied using StyleGAN-XL. Row 5 applies our method using a diffusion-based generative model instead of StyleGAN-XL. Row 6 shows adversarially generated samples by [41] using StyleGAN-XL which are non-realistic and not class-preserving. Our method manipulates images in a non-trivial but class-preserving manner, using the full capacity of the pretrained StyleGAN-XL generator. For example, it removes the eye of the mantis (second column), changes the type of race car (third column), changes the color of the crab tail (fifth column), removes the text on an airship (seventh column), and removes some of the ropes (eighth column). All of these are class-preserving examples that fool a pretrained PRIME-ResNet50 [30] classifier. In contrast, [25] either generates noisy and less realistic images (row 3) or images which differ significantly semantically and which do not preserve the input class (row 4).
  • Defense Potential: The authors showed that fine-tuning a classifier on APT-generated samples improved its accuracy on those same attacks by 2.5%, suggesting APT can be used as a data augmentation tool to build genuinely tougher models.

Limitations and Future Work

  • Computational Cost: Generating an APT attack takes approximately 5 minutes per image, which is significantly slower than traditional noise-based attacks. This makes large-scale adversarial training expensive.
  • Generator Dependency: The quality of the attack is strictly limited by the quality of the pretrained generator. If the GAN cannot represent certain features, APT cannot manipulate them.
  • Class Preservation Trade-off: There is a delicate balance between how much you can change an image to fool a model and when it actually becomes a different object. The authors use a distance cutoff ($d$), but defining "class-preserving" remains a subjective challenge.
Figure 6. APT generation for various distance d cutoff values. The leftmost image shows the input image. We increase the max- imum distance d to 0.2, 0.3 and 0.4 respectively, for a PRIME- ResNet50 classifier.

Summary updated

BibTeX
@inproceedings{christensen2024assessing,
  author = {Peter Ebert Christensen and Vésteinn Snæbjarnarson and Andrea Dittadi and Serge Belongie and Sagie Benaim},
  title = {{Assessing Neural Network Robustness via Adversarial Pivotal Tuning}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00293},
}
Figure