Noise Optimization for Artificial Neural Networks

Li Xiao, Zeliang Zhang, Yijie PengarXiv 2021

Abstract

Adding noises to artificial neural network(ANN) has been shown to be able to improve robustness in previous work. In this work, we propose a new technique to compute the pathwise stochastic gradient estimate with respect to the standard deviation of the Gaussian noise added to each neuron of the ANN. By our proposed technique, the gradient estimate with respect to noise levels is a byproduct of the backpropagation algorithm for estimating gradient with respect to synaptic weights in ANN. Thus, the noise level for each neuron can be optimized simultaneously in the processing of training the synaptic weights at nearly no extra computational cost. In numerical experiments, our proposed method can achieve significant performance improvement on robustness of several popular ANN structures under both black box and white box attacks tested in various computer vision datasets.

Introduction

Artificial Neural Networks (ANNs) are notoriously brittle. While they can outperform humans on clean data, they are easily fooled by "adversarial attacks"—tiny, calculated perturbations to an image that are invisible to humans but cause a model to fail spectacularly. Furthermore, unlike the human visual system, ANNs often struggle with simple natural corruptions like snow, blur, or pixelation.

Previous research suggested that adding noise to a network during training acts as a form of regularization, helping the model generalize and resist attacks. However, choosing the "right" amount of noise has always been an ad-hoc process of trial and error. If the noise is too low, the model remains vulnerable; if it’s too high, the model’s accuracy on clean data plummets. This paper tackles the challenge of finding the mathematically optimal noise level for every neuron in a network.

Methods: Noise Optimization

The authors propose a method called Noise Optimization for ANNs. Instead of treating the standard deviation ($\sigma$) of injected Gaussian noise as a fixed hyperparameter, they treat it as a learnable parameter, just like the weights of the network.

The Key Innovation

The researchers utilized a technique from simulation literature called Infinitesimal Perturbation Analysis (IPA). They proved that the gradient of the loss function with respect to the noise level is actually a "byproduct" of the standard backpropagation algorithm.

Gradient estimation for noise levels as a byproduct of backpropagation.

In simpler terms: when the network calculates how to update its weights to reduce error, it is simultaneously calculating how to adjust the noise levels. This allows the model to use the Adam optimizer to tune noise magnitudes for each neuron or layer dynamically during training. This "pathwise stochastic gradient estimation" means the robustness training happens at nearly no extra computational cost compared to standard training.

Experimental Evaluation

The method was evaluated across three widely-used computer vision benchmarks: MNIST, CIFAR-10 (using ResNet-18), and Tiny-ImageNet (using ResNet-34). The models were subjected to both white-box attacks (like PGD and FGSM) and black-box attacks, as well as natural noise corruptions such as blur and contrast changes.

Key Results and Insights

The quantitative improvements were substantial across the board. On MNIST, the optimized MLP saw a 75% increase in accuracy under the L-BFGS attack. On CIFAR-10, the ResNet-18 model achieved an average accuracy increase of 53% under white-box adversarial attacks.

Training and testing performance comparison between standard MLP and noise-optimized variants.
  • Robustness for "Free": Because the noise gradient is a byproduct of backpropagation, no separate, expensive training loop is needed.
  • Breaking the Accuracy-Robustness Trade-off: Usually, making a model robust hurts its accuracy on clean data. Surprisingly, the authors found that optimized noise often improved classification accuracy on the original, clean datasets.
  • Saliency and Attention: Using saliency maps, the authors found that noise-optimized models focus on more holistic, important features, mimicking human-like attention.
  • Layer-Specific Sensitivity: The optimization process revealed that adding noise to fully connected layers is often more effective than adding it to every single convolution layer.

Conclusion and Future Work

This research presents a computationally efficient way to enhance the robustness of ANNs by optimizing noise levels during training. While the results are promising, future work could explore different noise distributions (beyond Gaussian) and test the scalability of the method on the full ImageNet-1k dataset.

Summary updated

BibTeX
@misc{xiao2021noise,
  author = {Li Xiao and Zeliang Zhang and Yijie Peng},
  title = {{Noise Optimization for Artificial Neural Networks}},
  year = {2021},
  eprint = {2102.04450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.04450},
}
Figure