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

Adversarial Feature Augmentation and Normalization for Visual Recognition

Tianlong Chen, Yu Cheng, Zhe Gan, Jianfeng Wang, Lijuan Wang, Jingjing Liu, Zhangyang Wang

Abstract

Recent advances in computer vision take advantage of adversarial data augmentation to improve the generalization of classification models. Here, we present an effective and efficient alternative that advocates adversarial augmentation on intermediate feature embeddings, instead of relying on computationally-expensive pixel-level perturbations. We propose Adversarial Feature Augmentation and Normalization (A-FAN), which ($i$) first augments visual recognition models with adversarial features that integrate flexible scales of perturbation strengths, ($ii$) then extracts adversarial feature statistics from batch normalization, and re-injects them into clean features through feature normalization. We validate the proposed approach across diverse visual recognition tasks with representative backbone networks, including ResNets and EfficientNets for classification, Faster-RCNN for detection, and Deeplab V3+ for segmentation. Extensive experiments show that A-FAN yields consistent generalization improvement over strong baselines across various datasets for classification, detection, and segmentation tasks, such as CIFAR-10, CIFAR-100, ImageNet, Pascal VOC2007, Pascal VOC2012, COCO2017, and Cityspaces.

Introduction: Beyond Pixel-Level Perturbations

While adversarial training is traditionally used to defend against malicious attacks, recent research has demonstrated its potential as a powerful form of data augmentation to improve a model's accuracy on "clean" data. However, standard adversarial augmentation methods face two significant hurdles: high computational costs due to multi-step pixel-level perturbations and a narrow focus on image classification tasks.

A-FAN addresses these challenges by moving the adversarial "battlefield" from the input image to the intermediate feature embeddings. This shift allows for a more efficient, "plug-and-play" boost to performance across a broader range of vision tasks, including object detection and semantic segmentation.

Methodology

The A-FAN framework consists of two primary components designed to regularize the model in the latent space:

  1. Adversarial Feature Augmentation (AFA): Instead of perturbing pixels, A-FAN applies a one-step Projected Gradient Descent (PGD) to intermediate features. It samples a spectrum of perturbation strengths, allowing the model to learn from a wide range of "attack" intensities simultaneously.
  2. Adversarial Feature Normalization (AFN): This component extracts the mean and variance statistics from the adversarially perturbed features and re-injects them into the original clean features through a normalization process. This "asymmetric fusion" effectively smooths the model's decision boundaries.
The A-FAN framework: Adversarial Feature Augmentation (AFA) and Normalization (AFN).

Experimental Evaluation and Results

The authors validated A-FAN across a massive suite of standard benchmarks, including CIFAR-10/100, ImageNet, Pascal VOC, COCO 2017, and Cityscapes. The framework was tested using representative backbones such as ResNets, EfficientNets, Faster R-CNN, and DeepLab V3+.

A-FAN consistently outperformed standard training baselines across the board:

  • ImageNet: ResNet-50 saw a 1.12% accuracy boost (75.21% → 76.33%).
  • Object Detection (VOC 2007): Faster R-CNN with a ResNet-50 backbone improved by 1.42% mAP.
  • Semantic Segmentation (VOC 2012): DeepLab V3+ improved by 1.01% mIOU.
  • Robustness: A-FAN also provided a modest boost to adversarial robustness, such as a +1.57% robust mAP on Pascal VOC.

Analysis and Insights

Efficiency and Landscape Smoothness

By perturbing features instead of pixels, A-FAN avoids a full backward pass through the entire network for every adversarial step. On ResNet-18 (CIFAR-10), A-FAN is over 2x faster than pixel-level AdvProp while achieving higher accuracy. Furthermore, the paper demonstrates that A-FAN leads to a smaller Hessian norm, indicating a "flatter" loss landscape which is strongly correlated with better generalization on unseen data.

Comparison of loss landscapes between a standard ResNet-56s and one trained with A-FAN.

Optimal Placement

Ablation studies revealed that location matters: applying A-FAN to the last block of a backbone or task-specific modules (like the ROI head in detection or the Decoder in segmentation) yields the best results. Interestingly, "shallower" models (like ResNet-50) saw a larger relative boost than very deep models, suggesting A-FAN helps models that haven't yet reached their capacity saturation point.

Conclusion

A-FAN provides an efficient and versatile alternative to traditional adversarial training. While the framework shows strong empirical results, future work may focus on reducing hyperparameter sensitivity regarding perturbation strength and exploring theoretical foundations for why feature-level statistics injection outperforms simple noise addition. Extending A-FAN to video processing and multi-modal learning remains a promising direction.

Summary updated

BibTeX
@article{chen2022adversarial,
  author = {Tianlong Chen and Yu Cheng and Zhe Gan and Jianfeng Wang and Lijuan Wang and Jingjing Liu and Zhangyang Wang},
  title = {{Adversarial Feature Augmentation and Normalization for Visual Recognition}},
  journal = {Accepted by TMLR},
  year = {2022},
  url = {https://openreview.net/forum?id=2VEUIq9Yff},
}
Figure