[Paper Review] Feature Squeezing Mitigates and Detects Carlini/Wagner Adversarial Examples
This paper demonstrates that simple feature squeezing—specifically 2×2 median smoothing—significantly enhances deep learning models' robustness against state-of-the-art Carlini/Wagner adversarial attacks on MNIST and CIFAR-10. It reduces targeted attack success rates from nearly 100% to below 6% and enables detection of adversarial examples with 98.80% accuracy on MNIST and 87.50% on CIFAR-10 using an L1-based score difference between original and squeezed predictions.
Feature squeezing is a recently-introduced framework for mitigating and detecting adversarial examples. In previous work, we showed that it is effective against several earlier methods for generating adversarial examples. In this short note, we report on recent results showing that simple feature squeezing techniques also make deep learning models significantly more robust against the Carlini/Wagner attacks, which are the best known adversarial methods discovered to date.
Motivation & Objective
- To evaluate whether simple feature squeezing can mitigate and detect the most advanced adversarial attacks, particularly Carlini/Wagner's L2, L∞, and L0 methods.
- To assess the robustness of deep learning models enhanced with feature squeezing against targeted and untargeted adversarial examples.
- To investigate the feasibility of using feature squeezing as a lightweight, orthogonal defense mechanism that does not require model retraining.
- To develop and evaluate a detection framework based on prediction differences between original and squeezed inputs.
Proposed method
- Applying 2×2 median smoothing as a pre-processing step to input images before classification, using SciPy's implementation with reflect padding and consistent median selection.
- Computing a detection score as the L1 norm of the difference between model predictions on the original input and the squeezed input: score = |f(x) − f(squeeze(x))|₁.
- Using a threshold on the L1 score to classify inputs as adversarial (high score) or legitimate (low score), with the threshold selected to maximize detection accuracy on a training set.
- Evaluating robustness by measuring accuracy on adversarial examples generated via Carlini/Wagner’s L2, L∞, and L0 attacks, both with and without feature squeezing.
- Training separate models on MNIST and CIFAR-10 using Carlini’s code with default parameters, and generating adversarial examples on the first 1,000 test images due to computational cost.
- Splitting the dataset into training and validation sets to tune the detection threshold and evaluate performance on unseen data.
Experimental results
Research questions
- RQ1Can feature squeezing effectively reduce the success rate of targeted Carlini/Wagner attacks on deep learning models?
- RQ2How does feature squeezing affect the accuracy of legitimate inputs on MNIST and CIFAR-10?
- RQ3Can the L1 difference in model predictions between original and squeezed inputs reliably detect adversarial examples?
- RQ4Does the detection performance vary between datasets with different model accuracy levels, such as MNIST versus CIFAR-10?
- RQ5Is feature squeezing effective against the most advanced adversarial attack methods, including L2, L∞, and L0, despite their minimal perturbations?
Key findings
- Feature squeezing with 2×2 median smoothing reduced the targeted attack success rate from nearly 100% to below 6% across all three Carlini/Wagner attack variants (L2, L∞, L0) on both MNIST and CIFAR-10.
- On MNIST, the accuracy on adversarial examples increased from 0% to 90.4% for untargeted attacks and 87.9% for targeted attacks when using feature squeezing.
- On CIFAR-10, the accuracy on adversarial examples increased from 0% to 68.2% for untargeted attacks and 66.1% for targeted attacks after applying feature squeezing.
- The detection framework achieved 98.80% accuracy on MNIST with a true positive rate of 99.33% and a false positive rate of 1.73% using a threshold of 0.1147.
- On CIFAR-10, the detection accuracy was 87.50%, with a lower ROC-AUC of 0.8711, likely due to the model’s lower baseline accuracy of 78.3% on legitimate inputs.
- The method preserved high accuracy on legitimate inputs—99.4% on MNIST and 93.2% on CIFAR-10—indicating minimal performance degradation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.