Ghost Noise for Regularizing Deep Neural Networks

Atli Kosson, Dongyang Fan, Martin Jaggi · DOI

Introduction

Batch Normalization (BN) is a cornerstone of modern deep learning, yet its efficacy is tied to batch size. Smaller batches, often used in "Ghost Batch Normalization" (GBN), can improve generalization by introducing stochastic noise. However, this noise comes at a cost: a "train-test discrepancy" where a sample's influence on its own normalization statistics during training creates a bias absent at inference. Researchers from EPFL have addressed this by introducing Ghost Noise Injection (GNI), a technique that decouples beneficial regularization noise from the harmful biases of small-batch training.

Methodology: Decoupling Noise from Bias

The core insight of this work is that GBN's effect can be decomposed into standard BN plus an additional noise component. The authors identify "self-dependency"—where a sample affects the mean and variance used to normalize it—as the primary cause of performance degradation at very small batch sizes.

To isolate the beneficial noise, the authors propose Ghost Noise Injection (GNI). Instead of using the current training batch to calculate statistics, GNI samples a "ghost batch" with replacement from the available data. This approach offers several advantages:

  • Pure Regularization: It treats the resulting mean and variance as exogenous noise, preventing backpropagation through the noise calculation.
  • Stability: It avoids the numerical instability of actual small-batch training, allowing for high noise levels (simulating batches as small as 2 or 4).
  • Adaptivity: Unlike standard Dropout, GNI is data-dependent, with noise levels that vary across layers and channels based on the data's inherent variance.

The authors also developed Analytical GNI (AGNI), which models this noise using Gaussian and Chi-squared distributions, providing a theoretical foundation for the observed empirical gains.

Experimental Results

The effectiveness of GNI was validated across standard benchmarks including CIFAR-10, CIFAR-100, and ImageNet-1k. On CIFAR-100 using a ResNet-18, GNI significantly outperformed both standard BN and the best-tuned GBN configurations.

Table 1: Performance comparison on CIFAR-100. GNI-16 achieves the highest mean accuracy with the lowest standard deviation.

As shown in Table 1, GNI-16 (simulating a ghost batch size of 16) achieves a mean accuracy of 78.84%, a notable improvement over standard BN (77.10%) and GBN-16 (78.20%). On the larger ImageNet-1k dataset, GNI improved ResNet-50 performance from 77.43% to 77.98%.

Universal Applicability

A key finding is that Ghost Noise is a fundamentally useful regularizer beyond BN-based architectures. GNI was applied to models using Layer Normalization and to Vision Transformers (ViT), consistently yielding performance gains.

Table 2: GNI performance across various architectures and data augmentation settings.

Table 2 demonstrates that GNI provides substantial accuracy boosts for NF ResNet, Simple ViT, and ConvMixer, regardless of whether standard data augmentation is used. For instance, on Simple ViT without augmentation, GNI improves accuracy from 71.45% to 74.36%.

Conclusion and Future Work

Ghost Noise Injection successfully disentangles the regularizing benefits of batch noise from the detrimental effects of train-test discrepancy. While GNI introduces some computational overhead—approximately 50% slower in unoptimized PyTorch implementations—its ability to improve accuracy across diverse architectures makes it a powerful tool for model regularization. Future research may focus on developing optimized CUDA kernels or history-based sampling methods to mitigate the training time penalty.

Summary updated

BibTeX
@inproceedings{kosson2024ghost,
  author = {Atli Kosson and Dongyang Fan and Martin Jaggi},
  title = {{Ghost Noise for Regularizing Deep Neural Networks}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2024},
  doi = {10.1609/aaai.v38i12.29228},
}
Figure