σ-zero: Gradient-based Optimization of $\ell_0$-norm Adversarial Examples

Antonio Emanuele Cinà, Francesco Villani, Maura Pintor, Lea Schönherr, Battista Biggio +1 more
2/2/2024
cs.LGcs.CRcs.CV

No official code found. Best implementation: jeromerony/adversarial-library (167 stars, BSD-3-Clause, PyTorch, last commit 2025-11-20). 1 more below.

Abstract

Evaluating the adversarial robustness of deep networks to gradient-based attacks is challenging. While most attacks consider $\ell_2$- and $\ell_\infty$-norm constraints to craft input perturbations, only a few investigate sparse $\ell_1$- and $\ell_0$-norm attacks. In particular, $\ell_0$-norm attacks remain the least studied due to the inherent complexity of optimizing over a non-convex and non-differentiable constraint. However, evaluating adversarial robustness under these attacks could reveal weaknesses otherwise left untested with more conventional $\ell_2$- and $\ell_\infty$-norm attacks. In this work, we propose a novel $\ell_0$-norm attack, called $σ$-zero, which leverages a differentiable approximation of the $\ell_0$ norm to facilitate gradient-based optimization, and an adaptive projection operator to dynamically adjust the trade-off between loss minimization and perturbation sparsity. Extensive evaluations using MNIST, CIFAR10, and ImageNet datasets, involving robust and non-robust models, show that $σ$\texttt{-zero} finds minimum $\ell_0$-norm adversarial examples without requiring any time-consuming hyperparameter tuning, and that it outperforms all competing sparse attacks in terms of success rate, perturbation size, and efficiency.

View on arXivView PDF

Code Implementations(2)

PyTorchBSD-3-Clause

Library containing PyTorch implementations of various adversarial attacks and resources

16721PythonNov 24, 202011 months agoBSD-3-Clause
adversarial-attacksadversarial-examplesmachine-learningpytorch
162Python, Jupyter NotebookFeb 3, 20241 years ago

Similar Papers

Cite this paper

@article{cin2024zero,
  title  = {σ-zero: Gradient-based Optimization of $\ell_0$-norm Adversarial Examples},
  author = {Antonio Emanuele Cinà and Francesco Villani and Maura Pintor and Lea Schönherr and Battista Biggio and Marcello Pelillo},
  year   = {2024},
  eprint = {2402.01879},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.01879v3},
  journal = {ICLR 2024 2024}
}

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

Discussion