Sparse Representations Improve Adversarial Robustness of Neural Network Classifiers

Killian Steunou, Théo Druilhe, Sigurd Saue
9/25/2025
cs.LGcs.CV

Official code: killian31/SPCARobustness (0 stars, last commit 2026-01-20).

Abstract

Deep neural networks perform remarkably well on image classification tasks but remain vulnerable to carefully crafted adversarial perturbations. This work revisits linear dimensionality reduction as a simple, data-adapted defense. We empirically compare standard Principal Component Analysis (PCA) with its sparse variant (SPCA) as front-end feature extractors for downstream classifiers, and we complement these experiments with a theoretical analysis. On the theory side, we derive exact robustness certificates for linear heads applied to SPCA features: for both $\ell_\infty$ and $\ell_2$ threat models (binary and multiclass), the certified radius grows as the dual norms of $W^\top u$ shrink, where $W$ is the projection and $u$ the head weights. We further show that for general (non-linear) heads, sparsity reduces operator-norm bounds through a Lipschitz composition argument, predicting lower input sensitivity. Empirically, with a small non-linear network after the projection, SPCA consistently degrades more gracefully than PCA under strong white-box and black-box attacks while maintaining competitive clean accuracy. Taken together, the theory identifies the mechanism (sparser projections reduce adversarial leverage) and the experiments verify that this benefit persists beyond the linear setting. Our code is available at https://github.com/killian31/SPCARobustness.

View on arXivView PDF

Code Implementations(1)

This repository evaluates the robustness of SPCA vs. PCA dimensionality reduction techniques by building end-to-end differentiable pipelines and testing them against various adversarial attacks.

00PythonSep 14, 20259 months ago
adversarial-attacksdimensionality-reductionpca-analysisrobustness

Cite this paper

@article{steunou2025sparse,
  title  = {Sparse Representations Improve Adversarial Robustness of Neural Network Classifiers},
  author = {Killian Steunou and Théo Druilhe and Sigurd Saue},
  year   = {2025},
  eprint = {2509.21130},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.21130v2}
}

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

Discussion