Abstract
MeanSparse is a simple yet powerful post-training technique designed to enhance the adversarial robustness of deep neural networks (DNNs) by sparsifying feature variations around their mean. By effectively "muting" low-information variations that attackers exploit, MeanSparse has established new state-of-the-art records for robust accuracy on CIFAR-10, CIFAR-100, and ImageNet benchmarks without requiring expensive re-training.
Introduction
Deep Neural Networks (DNNs) are notoriously vulnerable to adversarial examples—input images with tiny, imperceptible perturbations that trick a model into making incorrect predictions. While Adversarial Training (AT) is the standard defense, models often retain "non-robust features": small variations in data that provide a "surface area" for attackers to exploit. Current activation functions like ReLU do not explicitly filter out these low-information, high-probability variations. MeanSparse addresses this gap by introducing a mean-centered sparsification operator that blocks these exploitable regions while preserving the model's classification utility.
Methods: The MeanSparse Operator
MeanSparse is a plug-and-play operator that can be integrated into already-trained models before their activation functions. The core algorithm follows a straightforward three-step process:
- Calculate Statistics: For every feature channel in the network, the mean ($\mu$) and standard deviation ($\sigma$) are computed over the training set.
- Define a Threshold: A tunable threshold is set as $Th = \alpha\sigma$, where $\alpha$ is a hyperparameter.
- Sparsify: For any incoming feature value, if it falls within the range $\mu \pm Th$, it is replaced exactly by the mean ($\mu$). If it falls outside this range, it remains unchanged.
This "hard-thresholding" approach, centered at the mean, makes the model "blind" to the tiny jitters an attacker uses to nudge a feature across a decision boundary. Mathematically, this approach is rooted in proximal operators used in sparse optimization.
Experimental Evaluation
The researchers evaluated MeanSparse using rigorous benchmarks including CIFAR-10, CIFAR-100, and ImageNet-1k. They applied the operator to top-performing models on the RobustBench global leaderboard, spanning various architectures like traditional ResNets and modern Swin Transformers.
Key Results
MeanSparse achieved significant improvements in AutoAttack (AA) accuracy—the most difficult adversarial benchmark—while maintaining nearly identical "clean" accuracy. Key performance gains include:
- ImageNet ($\ell_\infty$): Robust accuracy jumped from 59.56% to 62.12%.
- CIFAR-100 ($\ell_\infty$): Improved from 42.67% to 44.78%.
- CIFAR-10 ($\ell_2$): Improved robust accuracy from 84.97% to 87.28%.
- CIFAR-10 ($\ell_\infty$): Boosted the top model from 73.71% to 75.28%, setting a new record.
Discussion and Insights
A key observation in this work is that feature histograms in robust models are often bimodal, with one mode sitting exactly at the mean. This mode represents "low-information" variations that MeanSparse effectively flattens. Because it is a post-training method, it is highly efficient, requiring only a single pass over the training data to collect statistics and a quick search for the optimal $\alpha$ value. Furthermore, the method is architecture-agnostic, performing well on both Convolutional Neural Networks and attention-based models.
Limitations
MeanSparse is designed to enhance models that have already undergone adversarial training; applying it to a standard, non-robust model does not yield the same level of protection. Additionally, while the authors tested against adaptive attacks, white-box attackers who specifically target the thresholding mechanism could potentially find new bypasses, though MeanSparse currently outperforms base models even under these conditions.
Conclusion
MeanSparse offers a practical and effective way to push the boundaries of adversarial robustness. By treating variations around the mean as uninformative noise, it provides a simple mechanism to secure state-of-the-art deep learning models against sophisticated adversarial threats.
Summary updated