A Simple Feature Augmentation for Domain Generalization

Pan Li, Da Li, Wei Li, Shaogang Gong, Yanwei Fu, Timothy M. Hospedales

Abstract

Domain Generalization (DG) is the challenge of training models on source domains to perform well on unseen target domains. This paper introduces Stochastic Feature Augmentation (SFA), a simple "plug-and-play" module that injects noise into the latent feature space during training. By perturbing features rather than raw pixels, SFA enables models to learn robust decision boundaries that withstand significant domain shifts. We demonstrate that SFA-A (Adaptive) and even the simpler SFA-S (Simple) significantly boost performance on standard benchmarks like PACS and Digit-DG with minimal computational overhead.

Introduction

The standard approach to Domain Generalization (DG) involves data augmentation to increase variety in training data. However, most existing methods focus on image-space augmentation or use complex generative models like GANs, which are often computationally expensive and difficult to tune. The authors of this paper propose a different approach: augmenting the abstract "features" the model learns. This method, termed Stochastic Feature Augmentation (SFA), is designed to be a lightweight, effective alternative to traditional image-space methods.

Methods: Stochastic Feature Augmentation

SFA works by injecting noise directly into the latent feature space. The authors propose two variants of the module:

  1. SFA-S (Simple): This version uses data-independent Gaussian noise to apply a multiplicative scale ($\alpha$) and an additive bias ($\beta$) to the features.
  2. SFA-A (Adaptive): This version uses an Exponential Moving Average (EMA) to estimate the class-conditional feature covariance matrix. Noise is then sampled from this covariance, perturbing features along directions that represent actual intra-class and cross-domain variability.
Overview of the SFA module integrated into a standard neural network architecture.

By simulating how features might look in a hypothetical new domain, SFA-A "fills in the gaps" between known domains while preserving the identity of the underlying object.

Experimental Results

The researchers evaluated SFA on three standard DG benchmarks: Digit-DG, PACS, and VLCS, using a "leave-one-domain-out" protocol.

  • Performance: SFA-A achieved an average accuracy of 79.6% on Digit-DG, surpassing previous state-of-the-art methods. On PACS, it reached 81.7% accuracy, demonstrating strong generalization across diverse styles like photos, cartoons, and sketches.
  • Efficiency: Unlike GAN-based methods, SFA involves simple matrix operations and adds almost zero computational overhead to the training process.
  • Ablation: Multiplicative noise was found to be more effective than additive noise for improving generalization.

Key Insights

A primary finding is that feature space is often more suitable for augmentation than image space because deep features are more "linearized." This allows simple vector additions to effectively simulate complex domain shifts.

Conceptual illustration of how feature perturbation helps the classifier learn more robust decision boundaries.

As shown in the conceptual diagram above, SFA forces the classifier to find wider margins between classes. By training on these perturbed "virtual" instances, the model becomes less sensitive to the specific style of a domain and more focused on the core content.

Conclusion and Future Work

Stochastic Feature Augmentation is a remarkably simple yet effective tool for improving model robustness. While it requires some hyperparameter tuning for noise strength, its efficiency and performance make it a compelling "plug-and-play" module for DG tasks. Future research could explore its scalability to larger backbones like Vision Transformers and provide a more rigorous theoretical foundation for feature-level stochasticity.

Summary updated

BibTeX
@inproceedings{li2021simple,
  author = {Pan Li and Da Li and Wei Li and Shaogang Gong and Yanwei Fu and Timothy M. Hospedales},
  title = {{A Simple Feature Augmentation for Domain Generalization}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2021},
  doi = {10.1109/iccv48922.2021.00876},
}
Figure