Blurs Behave Like Ensembles: Spatial Smoothings to Improve Accuracy, Uncertainty, and Robustness

Namuk Park, Songkuk Kim
5/26/2021
27 citations
cs.LGcs.AIcs.CV

Official code: xxxnell/spatial-smoothing (80 stars, Python, Apache-2.0, PyTorch, last commit 2022-07-15).

Abstract

Neural network ensembles, such as Bayesian neural networks (BNNs), have shown success in the areas of uncertainty estimation and robustness. However, a crucial challenge prohibits their use in practice.

Show full abstract

BNNs require a large number of predictions to produce reliable results, leading to a significant increase in computational cost. To alleviate this issue, we propose spatial smoothing, a method that spatially ensembles neighboring feature map points of convolutional neural networks. By simply adding a few blur layers to the models, we empirically show that spatial smoothing improves accuracy, uncertainty estimation, and robustness of BNNs across a whole range of ensemble sizes. In particular, BNNs incorporating spatial smoothing achieve high predictive performance merely with a handful of ensembles. Moreover, this method also can be applied to canonical deterministic neural networks to improve the performances. A number of evidences suggest that the improvements can be attributed to the stabilized feature maps and the smoothing of the loss landscape. In addition, we provide a fundamental explanation for prior works - namely, global average pooling, pre-activation, and ReLU6 - by addressing them as special cases of spatial smoothing. These not only enhance accuracy, but also improve uncertainty estimation and robustness by making the loss landscape smoother in the same manner as spatial smoothing. The code is available at https://github.com/xxxnell/spatial-smoothing.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

(ICML 2022) Official PyTorch implementation of “Blurs Behave Like Ensembles: Spatial Smoothings to Improve Accuracy, Uncertainty, and Robustness”.

807Python, Jupyter NotebookDec 31, 20204 years agoApache-2.0
bayesian-deep-learningbayesian-neural-networksneural-networkpytorchrobustness+3 more

Similar Papers

Cite this paper

@article{park2021blurs,
  title  = {Blurs Behave Like Ensembles: Spatial Smoothings to Improve Accuracy, Uncertainty, and Robustness},
  author = {Namuk Park and Songkuk Kim},
  year   = {2021},
  eprint = {2105.12639},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2105.12639}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2105.12639.svg)](https://codeofpaper.com/paper/2105.12639)

Discussion