Feature Statistics with Uncertainty Help Adversarial Robustness

Ran Wang, Xinlei Zhou, Meng Hu, Rihao Li, Wenhui Wu +1 more
3/26/2025
cs.LG

No official code found. Best implementation: TechTrekkerZ/FSU (0 stars, last commit 2026-01-27).

Abstract

Despite the remarkable success of deep neural networks (DNNs), the security threat of adversarial attacks poses a significant challenge to the reliability of DNNs. In this paper, both theoretically and empirically, we discover a universal phenomenon that has been neglected in previous works, i.e., adversarial attacks tend to shift the distributions of feature statistics. Motivated by this finding, and by leveraging the advantages of uncertainty-aware stochastic methods in building robust models efficiently, we propose an uncertainty-driven feature statistics adjustment module for robustness enhancement, named Feature Statistics with Uncertainty (FSU). It randomly resamples channel-wise feature means and standard deviations of examples from multivariate Gaussian distributions, which helps to reconstruct the perturbed examples and calibrate the shifted distributions. The calibration recovers some domain characteristics of the data for classification, thereby mitigating the influence of perturbations and weakening the ability of attacks to deceive models. The proposed FSU module has universal applicability in training, attacking, predicting, and fine-tuning, demonstrating impressive robustness enhancement ability at a trivial additional time cost. For example, by fine-tuning the well-established models with FSU, the state-of-the-art methods achieve up to 17.13% and 34.82% robustness improvement against powerful AA and CW attacks on benchmark datasets.

View on arXivView PDF

Code Implementations(1)

TechTrekkerZ/FSUCommunity100%

Mitigating Adversarial Shifts in Feature Statistics with Uncertainty-Aware Reconstruction

00PythonAug 5, 20248 months ago

Cite this paper

@article{wang2025feature,
  title  = {Feature Statistics with Uncertainty Help Adversarial Robustness},
  author = {Ran Wang and Xinlei Zhou and Meng Hu and Rihao Li and Wenhui Wu and Yuheng Jia},
  year   = {2025},
  eprint = {2503.20583},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.20583v2}
}

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/2503.20583.svg)](https://codeofpaper.com/paper/2503.20583)

Discussion