Robust Experts: the Effect of Adversarial Training on CNNs with Sparse Mixture-of-Experts Layers

Svetlana Pavlitska, Haixi Fan, Konstantin Ditschuneit, J. Marius Zöllner
9/5/2025
cs.CVcs.LG

Official code: KASTEL-MobilityLab/robust-sparse-moes (1 star, MIT-0, last commit 2025-09-29).

Abstract

Robustifying convolutional neural networks (CNNs) against adversarial attacks remains challenging and often requires resource-intensive countermeasures. We explore the use of sparse mixture-of-experts (MoE) layers to improve robustness by replacing selected residual blocks or convolutional layers, thereby increasing model capacity without additional inference cost. On ResNet architectures trained on CIFAR-100, we find that inserting a single MoE layer in the deeper stages leads to consistent improvements in robustness under PGD and AutoPGD attacks when combined with adversarial training. Furthermore, we discover that when switch loss is used for balancing, it causes routing to collapse onto a small set of overused experts, thereby concentrating adversarial training on these paths and inadvertently making them more robust. As a result, some individual experts outperform the gated MoE model in robustness, suggesting that robust subpaths emerge through specialization. Our code is available at https://github.com/KASTEL-MobilityLab/robust-sparse-moes.

View on arXivView PDF

Code Implementations(1)

MIT-0
10Shell, PythonJul 23, 20251 years agoMIT-0

Similar Papers

Cite this paper

@article{pavlitska2025robust,
  title  = {Robust Experts: the Effect of Adversarial Training on CNNs with Sparse Mixture-of-Experts Layers},
  author = {Svetlana Pavlitska and Haixi Fan and Konstantin Ditschuneit and J. Marius Zöllner},
  year   = {2025},
  eprint = {2509.05086},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.05086v1}
}

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

Discussion