S2O: Enhancing Adversarial Training with Second-Order Statistics of Weights

Gaojie Jin, Xinping Yi, Wei Huang, Sven Schewe, Xiaowei Huang
3/1/2026
3 citations
cs.LG
bayesian

Official code: Alexkael/S2O (26 stars, Python, last commit 2025-06-04).

Abstract

Adversarial training has emerged as a highly effective way to improve the robustness of deep neural networks (DNNs). It is typically conceptualized as a min-max optimization problem over model weights and adversarial perturbations, where the weights are optimized using gradient descent methods, such as SGD.

Show full abstract

In this paper, we propose a novel approach by treating model weights as random variables, which paves the way for enhancing adversarial training through \textbf{S}econd-Order \textbf{S}tatistics \textbf{O}ptimization (S$^2$O) over model weights. We challenge and relax a prevalent, yet often unrealistic, assumption in prior PAC-Bayesian frameworks: the statistical independence of weights. From this relaxation, we derive an improved PAC-Bayesian robust generalization bound. Our theoretical developments suggest that optimizing the second-order statistics of weights can substantially tighten this bound. We complement this theoretical insight by conducting an extensive set of experiments that demonstrate that S$^2$O not only enhances the robustness and generalization of neural networks when used in isolation, but also seamlessly augments other state-of-the-art adversarial training techniques. The code is available at https://github.com/Alexkael/S2O.

View on arXivView PDF

Code Implementations(1)

Alexkael/S2OOfficial100%
262PythonMar 10, 20221 years ago

Similar Papers

Cite this paper

@article{jin2026so,
  title  = {S2O: Enhancing Adversarial Training with Second-Order Statistics of Weights},
  author = {Gaojie Jin and Xinping Yi and Wei Huang and Sven Schewe and Xiaowei Huang},
  year   = {2026},
  eprint = {2603.01264},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2603.01264v1}
}

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

Discussion