Squared 𝓁2 Norm as Consistency Loss for Leveraging Augmented Data to Learn Robust and Invariant Representations

Haohan Wang, Zeyi Huang, Xindi Wu, Eric P. XingarXiv 2020

TL;DR

This paper proposes a unified theoretical framework for understanding and improving data augmentation techniques in deep learning. They introduce a novel regularization strategy using the squared $\ell_2$ norm of the difference between original and augmented sample logits, which demonstrably enhances model robustness and invariance, outperforming several specialized methods.

What Problem Does This Paper Address?

Deep learning models often struggle with robustness and invariance when faced with data distributions different from their training set. Data augmentation is a common technique to mitigate this, but simply mixing augmented data with original samples isn't always optimal. Many existing methods focus on regularizing the distance between representations of original and augmented samples, but a general understanding of which regularization to use and why has been lacking. This paper aims to provide a theoretical foundation for these regularization techniques, offering a principled way to leverage augmented data for more robust and invariant models.

Methods

The authors develop a theoretical framework to analyze the generalization error of models trained with augmented data. They introduce several assumptions about data transformation functions (e.g., "dependence-preservation," "efficiency," "vertices") and use these to derive bounds on the worst-case expected risk. A key contribution is identifying that regularizing the squared $\ell_2$ norm of the difference between the logits of original and augmented samples is a theoretically sound and practically effective approach. This method, termed "Regularized Augmentation" (RA) when using fixed vertex transformations and "Regularized Worst-Case Augmentation" (RWA) when dynamically selecting worst-case transformations, is shown to be superior to vanilla augmentation and other regularization strategies. They also propose engineering adaptations, like using logits instead of softmax outputs and the squared $\ell_2$ norm for differentiability, to facilitate practical implementation.

Datasets

The paper uses the following datasets for training and evaluation:

  • MNIST: A dataset of handwritten digits.
  • CIFAR10: A dataset of small color images in 10 classes.
  • ImageNet-C: A corrupted version of ImageNet used for robustness evaluation.
  • ImageNet-Sketch: A dataset of sketches derived from ImageNet, used for cross-domain generalization evaluation.

Key Insights and Ideas

  • The "Why" of Regularization: The paper argues that while vanilla augmentation can improve accuracy, it doesn't fully leverage augmented data for learning true invariance. Regularization is crucial for models to generalize beyond simple accuracy improvements, especially in broader contexts.
  • Logits Matter: Regularizing the difference in logits (pre-softmax outputs) between original and augmented samples is more effective than regularizing embeddings or softmax outputs. This is attributed to better gradient propagation and theoretical properties.
  • Squared $\ell_2$ Norm is a Sweet Spot: While theory might suggest $\ell_1$ norm for certain Wasserstein distance approximations, the squared $\ell_2$ norm offers a practical balance between theoretical grounding and computational feasibility (differentiability).
  • Invariance Test is Key: The authors introduce an "invariance test" to specifically measure a model's ability to produce consistent representations for augmented versions of the same input. This metric reveals significant differences between regularized and non-regularized methods, even when clean accuracy is similar.
  • Generic Methods Can Compete: The proposed generic regularization methods (RA and RWA) demonstrate competitive or superior performance against specialized, task-specific advanced methods across various domains (rotation, texture, cross-domain).

Key Results

  • Improved Robustness and Invariance: The proposed RA and RWA methods consistently achieve higher invariance scores and competitive robustness compared to baseline and vanilla augmentation methods across MNIST and CIFAR10 datasets.
  • Outperforming SOTA: In comparisons against specialized methods for rotation-invariant classification, texture-perturbed image classification, and cross-domain generalization, the proposed generic methods, particularly RWA, often achieve better or comparable results. For instance, on ImageNet-C, RWA achieved a lower mCE (better performance) than several advanced methods.
  • Theoretical Validation: The paper provides theoretical bounds that justify the use of regularization and the choice of the squared $\ell_2$ norm, linking it to the Wasserstein distance and worst-case generalization error.
  • Practical Efficacy: Ablation studies and synthetic experiments confirm the effectiveness of the proposed regularization strategies and the benefits of using logits.

Limitations and Future Work

  • Assumption Dependence: The theoretical guarantees rely on certain assumptions about the data transformation functions (e.g., A1-A6). While these assumptions are shown to hold in practice for many cases, their violation could impact performance.
  • Computational Cost of RWA: While RWA offers superior performance, it requires identifying the worst-case augmentation at each iteration, which can be computationally more expensive than RA.
  • Domain Knowledge for RA: The "Regularized Training with Vertices" (RA) method requires domain knowledge to select appropriate "vertex" transformations, which might not always be readily available.
  • Future Work: The authors suggest exploring more complex transformation families and investigating the trade-offs between different regularization choices and their computational costs. Further research into understanding the theoretical underpinnings of why certain regularization choices work better in practice is also warranted.

Summary updated

BibTeX
@misc{wang2020squared,
  author = {Haohan Wang and Zeyi Huang and Xindi Wu and Eric P. Xing},
  title = {{Squared 𝓁2 Norm as Consistency Loss for Leveraging Augmented Data to Learn Robust and Invariant Representations}},
  year = {2020},
  eprint = {2011.13052},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.13052},
}
Figure