Misclassification-Aware Gaussian Smoothing improves Robustness against Domain Shifts

Athanasios Tsiligkaridis, Theodoros TsiligkaridisarXiv 2021

Abstract

Deep neural networks achieve high prediction accuracy when the train and test distributions coincide. In practice though, various types of corruptions occur which deviate from this setup and cause severe performance degradations. Few methods have been proposed to address generalization in the presence of unforeseen domain shifts. In particular, digital noise corruptions arise commonly in practice during the image acquisition stage and present a significant challenge for current methods. In this paper, we propose a diverse Gaussian noise consistency regularization method for improving robustness of image classifiers under a variety of corruptions while still maintaining high clean accuracy. We derive bounds to motivate and understand the behavior of our Gaussian noise consistency regularization using a local loss landscape analysis. Our approach improves robustness against unforeseen noise corruptions by 4.2-18.4% over adversarial training and other strong diverse data augmentation baselines across several benchmarks. Furthermore, it improves robustness and uncertainty calibration by 3.7% and 5.5%, respectively, against all common corruptions (weather, digital, blur, noise) when combined with state-of-the-art diverse data augmentations.

Introduction

Deep neural networks are notoriously brittle. While they achieve superhuman accuracy on clean datasets, their performance often degrades significantly when faced with real-world "domain shifts"—such as sensor noise, motion blur, or adverse weather conditions.

Existing defenses typically fall into two categories: Adversarial Training (AT) and Data Augmentation. AT protects against malicious, pixel-perfect attacks but often fails on natural corruptions and can hurt accuracy on clean data. Data Augmentation techniques like AugMix help with semantic shifts (e.g., rotations, color changes) but struggle with high-frequency digital noise. Moreover, when these models fail, they tend to be "confidently wrong," exhibiting poor uncertainty calibration. This work introduces a method to bridge this gap, creating models that are robust to noise and provide more reliable confidence estimates.

Methodology: Diverse Gaussian Noise (DiGN)

The proposed method, Diverse Gaussian Noise (DiGN) consistency regularization, is built on two main components: diverse augmentation and consistency loss.

  1. Diverse Augmentation: During training, for every clean image $x$, the model generates several noisy versions $x_\delta^{(k)} = x + \delta^{(k)}$. Crucially, the noise level $\sigma$ is not fixed; it is sampled uniformly from a range $[0, \sigma_{max}]$. This prevents the model from over-fitting to a specific noise level.
  2. Consistency Loss: The model is trained using a dual-purpose loss function. It must correctly classify the clean image (standard cross-entropy) and ensure that its prediction for the noisy image $p_\theta(x + \delta)$ matches its prediction for the clean image $p_\theta(x)$. This consistency is enforced using Kullback-Leibler (KL) divergence: $D(p_\theta(x) || p_\theta(x + \delta))$.
The DiGN training pipeline: clean images are augmented with diverse Gaussian noise, and a consistency loss is applied to align predictions between clean and noisy inputs.

Theoretical Motivation: Landscape Smoothing

A key contribution of this work is the formal link between Gaussian noise training and the geometry of the loss landscape. Theoretical analysis shows that the consistency loss acts as a regularizer that effectively minimizes the curvature (Hessian trace) and the gradient norm of the loss function.

By forcing the model to produce similar outputs for clean and noisy images, DiGN encourages the optimization process to find "flat" minima. Flat minima are known to generalize better and are less sensitive to small input perturbations. As shown in empirical evaluations, DiGN significantly reduces the scaled gradient norm and approximate curvature compared to standard training as the perturbation magnitude increases.

DiGN smooths the loss landscape, resulting in lower loss differences, higher accuracy, and reduced gradient norms and curvature under perturbations compared to standard training.

Experimental Evaluation

The researchers evaluated DiGN on three primary benchmarks: CIFAR-10, CIFAR-100, and Tiny-ImageNet, along with their "Corrupted" (-C) counterparts which include 15-18 types of real-world distortions.

Key Results

  • Noise Robustness: DiGN improved accuracy on unforeseen noise corruptions by 4.2% to 18.4% over strong baselines like Adversarial Training and AugMix.
  • General Robustness: DiGN and AugMix exhibit complementary strengths. While AugMix handles low-frequency structural changes, DiGN excels at high-frequency digital artifacts. Combining them yields state-of-the-art results across all common corruptions, improving mean Corruption Accuracy (mCA) by up to 3.7%.
  • Uncertainty Calibration: Robustness also entails reliable confidence. DiGN significantly reduces the Expected Calibration Error (ECE) by 5.5% on corrupted benchmarks, making models safer for deployment in high-stakes environments.

Conclusion

DiGN provides a mathematically grounded approach to improving model robustness by smoothing the loss landscape through diverse noise consistency. While it increases training time due to multiple forward passes, the gains in accuracy under corruption and uncertainty calibration are substantial. Future work includes scaling these methods to larger datasets like ImageNet-1k and exploring other types of stochastic perturbations beyond Gaussian noise.

Summary updated

BibTeX
@misc{tsiligkaridis2021misclassification,
  author = {Athanasios Tsiligkaridis and Theodoros Tsiligkaridis},
  title = {{Misclassification-Aware Gaussian Smoothing improves Robustness against Domain Shifts}},
  year = {2021},
  eprint = {2104.01231},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.01231},
}
Figure