Adversarial Examples Are Not Bugs, They Are Features

Andrew IlyasShibani SanturkarDimitris TsiprasLogan EngstromBrandon TranAleksander Madry

article2019NeurIPS2,173 citations

Demonstrates that adversarial examples arise from predictive, human-imperceptible patterns inherent to training data rather than algorithmic flaws, establishing that models exploit real statistical signals invisible to human perception.

Listen

Deep neural networks are increasingly deployed in mission-critical applications, yet they remain susceptible to adversarial examplesminor, imperceptible input modifications that cause models to make catastrophic prediction errors. Historically, researchers and practitioners viewed these vulnerabilities as aberrations, statistical anomalies, or bugs resulting from high-dimensional geometry and finite-sample overfitting. Consequently, common remediation efforts have focused on heuristic defenses, input pre-processing, and standard regularization, often failing to secure models against adaptive attacks. The article sets out to challenge this conventional view by demonstrating that adversarial vulnerability stems directly from standard machine learning algorithms learning non-robust, human-incomprehensible patterns that are inherently present and highly predictive within real-world datasets.

To evaluate this thesis, the authors conducted empirical experiments using standard computer vision benchmarks (CIFAR-10 and Restricted ImageNet) across multiple neural network architectures such as ResNet, VGG, DenseNet, and Inception. They created two modified dataset types: "robustified" datasets, where non-robust signals were filtered out, and "non-robust" datasets, where human-visible features were decoupled from labels, leaving only subtle adversarial perturbations aligned with the assigned classes. Alongside empirical testing against diverse adversarial attacks, the authors developed a rigorous theoretical framework using Gaussian maximum likelihood classification to mathematically model how adversarial vulnerability arises from misalignments between human-specified distance metrics and intrinsic data geometry.

The findings establish three key conclusions. First, standard training on a robustified dataset yields a model that attains substantial adversarial accuracy (over 48% on CIFAR-10) without using adversarial training, proving that robustness can be derived purely from dataset properties. Second, models trained entirely on non-robust datasets achieve strong generalization on standard, unmodified test setsreaching 63.3% on CIFAR-10 and 87.9% on Restricted ImageNetdespite appearing completely mislabeled to human observers. Third, the degree to which different architectures learn non-robust features directly predicts their susceptibility to cross-model transfer attacks, explaining why adversarial examples frequently fool multiple independent models. The theoretical analysis confirms that robust optimization operates by forcing models to align their internal feature metrics with human-defined priors.

These results demonstrate that adversarial vulnerability is not a technical bug in optimization algorithms, but a natural consequence of the standard supervised learning paradigm maximizing predictive accuracy. Classifiers naturally exploit any useful statistical correlation, whether perceptible to humans or not. This creates critical risks for safety, security, and interpretability: post-hoc explanation methods that force human-meaningful visualizations merely conceal the genuine, non-robust signals models rely upon. Organizations cannot expect standard training to yield secure or transparent models without deliberately constraining the feature space.

Decision-makers and engineering teams must discontinue relying solely on standard empirical risk minimization and post-hoc interpretability for safety-critical systems. Instead, human perceptual priors and robustness constraints must be directly integrated into data collection, dataset curation, and training pipelines. While robust optimization effectively suppresses brittle features, it often introduces a trade-off with standard accuracy and requires higher sample complexity. Future initiatives should focus on developing advanced dataset-level feature filtering methods and establishing scalable pipelines that systematically enforce alignment between algorithmic feature representations and human domain expectations.

The conclusions are supported by theoretical proofs and multi-architecture empirical validations that withstand adaptive attacks. However, decision-makers should note certain limitations: the empirical evaluations were primarily focused on image classification benchmarks, robust feature isolation currently relies on approximations via adversarially trained models, and dataset transformation introduces slight generalization gaps due to distribution shifts. Confidence in the underlying mechanism remains high, but operational defenses must account for problem-specific geometric and data constraints.

Cover for Adversarial Examples Are Not Bugs, They Are Features

Abstract

Adversarial examples have attracted significant attention in machine learning, but the reasons for their existence and pervasiveness remain unclear. We demonstrate that adversarial examples can be directly attributed to the presence of non-robust features: features derived from patterns in the data distribution that are highly predictive, yet brittle and incomprehensible to humans. After capturing these features within a theoretical framework, we establish their widespread existence in standard datasets. Finally, we present a simple setting where we can rigorously tie the phenomena we observe in practice to a misalignment between the (human-specified) notion of robustness and the inherent geometry of the data.

Table of Contents

  • 1 Introduction
  • 2 The Robust Features Model
  • 3 Finding Robust (and Non-Robust) Features
  • 3.1 Disentangling robust and non-robust features
  • 3.2 Non-robust features suffice for standard classification
  • 3.3 Transferability can arise from non-robust features
  • 4 A Theoretical Framework for Studying (Non)-Robust Features
  • 5 Related Work
  • 6 Conclusion
  • 7 Acknowledgements
  • References
  • A Connections to and Disambiguation from Other Models
  • B Additional Related Work
  • C Experimental Setup
  • C.1 Datasets
  • C.2 Models
  • C.3 Adversarial training
  • C.4 Constructing a Robust Dataset
  • C.5 Non-robust features suffice for standard classification
  • D Omitted Experiments and Figures
  • D.1 Detailed evaluation of models trained on “robust” dataset
  • D.2 Adversarial evaluation
  • D.3 Performance of “robust” training and test set
  • D.4 Classification based on non-robust features
  • D.5 Accuracy curves
  • D.6 Performance of ERM classifiers on relabeled test set
  • D.7 Generalization to CIFAR-10.1
  • D.8 Omitted Results for Restricted ImageNet
  • D.9 Targeted Transferability
  • D.10 Robustness vs. Accuracy
  • E Gaussian MLE under Adversarial Perturbation
  • E.1 Setup
  • E.2 Outline and Key Results
  • E.3 Proofs
  • E.3.1 Motivating example: ℓ2\ell_{2}-constrained adversary
  • E.3.2 Variant with Fixed Lagrangian (Theorem )
  • E.3.3 Real objective
  • E.3.4 Danskin’s Theorem
  • E.3.5 Applying Danskin’s Theorem
  • E.3.6 Bounding λ\lambda
  • E.3.7 Proof of main theorems
  • E.3.8 Bounds for λ\lambda

Knowls

  1. Knowl 1 — Useful, Robust, and Non-Robust Features Framework

    definition

    In supervised binary classification over a distribution D\mathcal{D} with input-label pairs (x,y)X×{1,+1}(x, y) \in \mathcal{X} \times \{-1, +1\}, a feature is a real-valued mapping f:XRf: \mathcal{X} \to \mathbb{R}, normalized to mean zero and unit variance (E(x,y)D[f(x)]=0\mathbb{E}_{(x,y)\sim \mathcal{D}}[f(x)] = 0 and E(x,y)D[f(x)2]=1\mathbb{E}_{(x,y)\sim \mathcal{D}}[f(x)^2] = 1). Features are categorized into three classes:

    1. ρ\rho-useful features: A feature ff is ρ\rho-useful for ρ>0\rho > 0 under distribution D\mathcal{D} if it is correlated with the true label in expectation: E(x,y)D[yf(x)]ρ\mathbb{E}_{(x,y)\sim \mathcal{D}}[y \cdot f(x)] \ge \rho The quantity ρD(f)\rho_\mathcal{D}(f) denotes the supremum ρ\rho for which ff is ρ\rho-useful.

    2. γ\gamma-robustly useful features: For a specified set of valid perturbations Δ(x)\Delta(x) (such as an p\ell_p-ball Bp(ϵ)\mathcal{B}_p(\epsilon)), a ρ\rho-useful feature ff is γ\gamma-robustly useful (or a robust feature) for γ>0\gamma > 0 if, under worst-case perturbation, it maintains expected correlation at least γ\gamma: E(x,y)D[infδΔ(x)yf(x+δ)]γ\mathbb{E}_{(x,y)\sim \mathcal{D}}\left[\inf_{\delta \in \Delta(x)} y \cdot f(x + \delta)\right] \ge \gamma

    3. Useful, non-robust features: A feature ff is useful and non-robust if it is ρ\rho-useful for some ρ>0\rho > 0, but is not γ\gamma-robustly useful for any γ0\gamma \ge 0. An adversary can invert the sign of the feature-label correlation with a small perturbation δΔ(x)\delta \in \Delta(x), even though the feature provides predictive power on unperturbed data.

    A classifier C=(F,w,b)C = (\mathcal{F}, w, b) parameterized by weights w={wf}fFw = \{w_f\}_{f \in \mathcal{F}} and bias bb predicts C(x)=sgn(b+fFwff(x))C(x) = \text{sgn}\left(b + \sum_{f \in \mathcal{F}} w_f f(x)\right). Under standard empirical risk minimization (ERM), loss functions do not differentiate between robust and non-robust features; any ρ\rho-useful feature is utilized to reduce empirical loss.

  2. Knowl 2 — Algorithm for Constructing Robust-Feature Datasets

    algorithm

    To isolate robust features from a dataset D\mathcal{D}, one uses a representation mapping gR:XRkg_R: \mathcal{X} \to \mathbb{R}^k from the penultimate layer of an adversarially trained (robust) neural network CRC_R. The procedure generates a modified dataset D^R\widehat{\mathcal{D}}_R by matching the penultimate representations of original inputs while initializing the optimization from an input x0x_0 drawn independently of the label, ensuring non-robust features are uncorrelated with the label across the constructed dataset.

    Input: Training dataset D\mathcal{D}, robust classifier CRC_R with representation mapping gRg_R
    Output: Robustified dataset D^R\widehat{\mathcal{D}}_R
    D^R{}\widehat{\mathcal{D}}_R \leftarrow \{\}
    for each (x,y)D(x, y) \in \mathcal{D} do
        Sample x0Dx_0 \sim \mathcal{D} independently of (x,y)(x, y) (or sample x0x_0 from random Gaussian noise)
        xRargminz[0,1]dgR(z)gR(x)2x_R \leftarrow \arg\min_{z \in [0, 1]^d} \|g_R(z) - g_R(x)\|_2 initialized at z=x0z = x_0 via normalized 2\ell_2 gradient descent
        D^RD^R{(xR,y)}\widehat{\mathcal{D}}_R \leftarrow \widehat{\mathcal{D}}_R \cup \{(x_R, y)\}
    end for
    return D^R\widehat{\mathcal{D}}_R

    Optimization of zz uses normalized projected gradient descent where the 2\ell_2-norm of each gradient step is constant (e.g., step size 0.1 for 1,000 iterations on CIFAR-10; step size 1.0 for 2,000 iterations on Restricted ImageNet; or 10,000 iterations when initializing from Gaussian noise), clipping pixel values to [0,1][0, 1] after each update.

  3. Knowl 3 — Algorithm for Constructing Non-Robust-Feature Datasets

    algorithm

    To construct a dataset where generalization signal derives exclusively from non-robust features, small adversarial perturbations are added to natural images to induce a standard (non-robust) classifier to predict a chosen target label tt, and the modified image is relabeled as tt.

    Input: Training dataset D\mathcal{D}, standard classifier CC with loss LCL_C, perturbation bound ϵ\epsilon, label mode (random or deterministic)
    Output: Non-robust dataset D^NR\widehat{\mathcal{D}}_{NR} (either D^rand\widehat{\mathcal{D}}_{rand} or D^det\widehat{\mathcal{D}}_{det})
    D^NR{}\widehat{\mathcal{D}}_{NR} \leftarrow \{\}
    for each (x,y)D(x, y) \in \mathcal{D} do
        if label mode is random then
            Sample target label tUniform({1,,K}{y})t \sim \text{Uniform}(\{1, \dots, K\} \setminus \{y\})
        else if label mode is deterministic then
            Set target label t(y+1)modKt \leftarrow (y + 1) \bmod K (where KK is total number of classes)
        end if
        xadvargminx:xx2ϵLC(x,t)x_{adv} \leftarrow \arg\min_{x' : \|x' - x\|_2 \le \epsilon} L_C(x', t) solved via targeted 2\ell_2-PGD starting from xx
        D^NRD^NR{(xadv,t)}\widehat{\mathcal{D}}_{NR} \leftarrow \widehat{\mathcal{D}}_{NR} \cup \{(x_{adv}, t)\}
    end for
    return D^NR\widehat{\mathcal{D}}_{NR}

    Because xadvx2ϵ\|x_{adv} - x\|_2 \le \epsilon is imperceptible, human-visible robust features remain aligned with original class yy. In the random mapping D^rand\widehat{\mathcal{D}}_{rand}, robust features become uncorrelated with tt in expectation. In the deterministic mapping D^det\widehat{\mathcal{D}}_{det}, robust features are systematically anti-correlated with label tt, whereas non-robust features correlate with tt. PGD uses ϵ=0.5\epsilon = 0.5 (in 2\ell_2), step size 0.1, 100 iterations for CIFAR-10, and ϵ=3.0\epsilon = 3.0, step size 0.1, 100 iterations for Restricted ImageNet.

  4. Knowl 4 — Robust Classification via Standard Training on Robustified Datasets

    empirical result

    When a classifier is trained using standard, non-adversarial empirical risk minimization (ERM) on the robustified dataset D^R\widehat{\mathcal{D}}_R (constructed by matching representations of an adversarially trained model), the resulting classifier attains substantial adversarial robustness when evaluated on the original, unmodified test set D\mathcal{D}.

    On CIFAR-10 using ResNet-50:

    • Standard ERM on original D\mathcal{D}: 95.25% standard test accuracy, 4.49% robust test accuracy at 2\ell_2 radius ϵ=0.25\epsilon = 0.25, and 0.0% robust accuracy at ϵ=0.5\epsilon = 0.5.
    • Adversarial training (PGD, ϵ=0.5\epsilon = 0.5) on D\mathcal{D}: 90.83% standard test accuracy, 82.48% robust test accuracy at ϵ=0.25\epsilon = 0.25, and 70.90% at ϵ=0.5\epsilon = 0.5.
    • Standard ERM on robustified D^R\widehat{\mathcal{D}}_R (constructed from images): 85.40% standard test accuracy, 48.20% robust test accuracy at ϵ=0.25\epsilon = 0.25, and 21.85% at ϵ=0.5\epsilon = 0.5.
    • Standard ERM on robustified D^R\widehat{\mathcal{D}}_R (constructed from noise): 84.10% standard test accuracy, 48.27% robust test accuracy at ϵ=0.25\epsilon = 0.25, and 29.40% at ϵ=0.5\epsilon = 0.5.
    • Control (Standard ERM on non-robust dataset D^NR\widehat{\mathcal{D}}_{NR} constructed from standard model features): 87.68% standard accuracy, 0.82% robust accuracy at ϵ=0.25\epsilon = 0.25, and 0.0% at ϵ=0.5\epsilon = 0.5.

    On Restricted ImageNet, standard ERM on D^R\widehat{\mathcal{D}}_R achieves over 80% standard test accuracy and over 40% robust test accuracy against 2\ell_2 perturbations of ϵ=0.5\epsilon = 0.5. These findings demonstrate that adversarial vulnerability is primarily a property of dataset features rather than an intrinsic flaw of the standard ERM training objective.

  5. Knowl 5 — Non-Robust Features Suffice for Generalization on Clean Test Sets

    data/table

    Standard neural networks trained exclusively on datasets where labels are associated with inputs solely via imperceptible adversarial perturbations (D^rand\widehat{\mathcal{D}}_{rand} and D^det\widehat{\mathcal{D}}_{det}) achieve high classification accuracy when tested on the original, unaltered test distribution D\mathcal{D}.

    Training Dataset CIFAR-10 Test Accuracy Restricted ImageNet Test Accuracy
    Original dataset D\mathcal{D} 95.3% 96.6%
    Non-robust random target D^rand\widehat{\mathcal{D}}_{rand} 63.3% 87.9%
    Non-robust deterministic target D^det\widehat{\mathcal{D}}_{det} 43.7% 64.4%

    In D^rand\widehat{\mathcal{D}}_{rand}, perturbations towards random target classes render robust features uninformative in expectation while non-robust features predict the label. In D^det\widehat{\mathcal{D}}_{det}, where target classes are chosen by deterministic label shifts (t=(y+1)modKt = (y + 1) \bmod K), human-recognizable robust features actively point to the wrong class, yet standard ERM still extracts non-robust features that generalize to the clean test distribution D\mathcal{D}. Furthermore, classifiers trained on CIFAR-10 D^det\widehat{\mathcal{D}}_{det} and D^rand\widehat{\mathcal{D}}_{rand} achieve 44% and 55% accuracy on the distribution-shifted CIFAR-10.1 test set, exceeding linear predictions and demonstrating that non-robust features are true generalizing patterns rather than finite-sample overfitting artifacts.

    When the same construction of D^rand\widehat{\mathcal{D}}_{rand} and D^det\widehat{\mathcal{D}}_{det} is executed using an adversarially trained (robust) model to generate perturbations, standard test accuracy on D\mathcal{D} drops to 25.2% for D^rand\widehat{\mathcal{D}}_{rand} and 5.8% for D^det\widehat{\mathcal{D}}_{det} on CIFAR-10, while the model trained on the robust D^det\widehat{\mathcal{D}}_{det} achieves 65.5% accuracy on a permuted-label test set.

  6. Knowl 6 — Adversarial Transferability Correlates with Reliance on Shared Non-Robust Features

    empirical result

    Adversarial perturbations transfer across independently trained models and distinct architectures because different models trained on the same data distribution learn similar sets of non-robust features.

    When five architectures (VGG-16, Inception-v3, ResNet-18, DenseNet, and ResNet-50) are trained on the non-robust dataset D^det\widehat{\mathcal{D}}_{det} generated from a standard ResNet-50 source model, their test accuracy on clean data correlates directly with their susceptibility to transfer attacks generated by that same source model:

    • VGG-16 achieves ~28% clean test accuracy when trained on D^det\widehat{\mathcal{D}}_{det} and experiences a transfer attack success rate of ~65%.
    • Inception-v3 achieves ~39% clean test accuracy on D^det\widehat{\mathcal{D}}_{det} and experiences a transfer success rate of ~82%.
    • ResNet-18 and DenseNet achieve ~40–42% clean test accuracy on D^det\widehat{\mathcal{D}}_{det} and experience transfer success rates of ~93–94%.
    • ResNet-50 achieves ~45% clean test accuracy on D^det\widehat{\mathcal{D}}_{det} and experiences a transfer success rate of ~98%.

    A matching linear relationship is observed for targeted transfer attacks (transfer success rates ranging from ~10% for VGG-16 to ~72% for ResNet-50). Architectures that more effectively learn the non-robust features extracted by the source model are proportionally more susceptible to adversarial examples transferred from that model.

  7. Knowl 7 — Adversarial Vulnerability from Metric Misalignment in Gaussian Classification

    theoretical result

    Consider binary classification between two Gaussian distributions where y{1,+1}y \in \{-1, +1\} uniformly at random and xN(yμ,Σ)x \sim \mathcal{N}(y \cdot \mu_*, \Sigma_*) with true parameters Θ=(μ,Σ)\Theta_* = (\mu_*, \Sigma_*). Non-robust maximum likelihood estimation (MLE) minimizes Gaussian negative log-likelihood (x;yμ,Σ)\ell(x; y \cdot \mu, \Sigma), recovering μ=μ\mu = \mu_* and Σ=Σ\Sigma = \Sigma_*, which induces the Mahalanobis feature metric xμΘ=(xμ)Σ1(xμ)\|x - \mu\|_\Theta = \sqrt{(x - \mu)^\top \Sigma^{-1} (x - \mu)}.

    For an adversary with a Lagrangian penalty trading off negative log-likelihood maximization and an 2\ell_2 perturbation penalty: maxδ(x+δ;yμ,Σ)Cδ2\max_{\delta} \ell(x + \delta; y \cdot \mu, \Sigma) - C \|\delta\|_2 where C1σmin(Σ)C \ge \frac{1}{\sigma_{\min}(\Sigma_*)}, the optimal adversarial perturbation is δ=(CΣI)1(xμ)\delta^* = (C\Sigma - I)^{-1}(x - \mu), and the excess adversarial loss Ladv(Θ)L(Θ)\mathcal{L}_{adv}(\Theta) - \mathcal{L}(\Theta) incurred by the MLE parameters Θ=(μ,Σ)\Theta = (\mu_*, \Sigma_*) is: Ladv(Θ)L(Θ)=tr([I+(CΣI)1]2)d\mathcal{L}_{adv}(\Theta) - \mathcal{L}(\Theta) = \text{tr}\left(\left[I + (C \cdot \Sigma_* - I)^{-1}\right]^2\right) - d For any fixed total variance tr(Σ)=k\text{tr}(\Sigma_*) = k, this excess adversarial loss is strictly minimized when: Σ=kdI\Sigma_* = \frac{k}{d} I Adversarial vulnerability corresponds to the geometric misalignment between the feature-induced metric Σ1\Sigma_*^{-1} and the adversary's 2\ell_2 metric II. When Σ\Sigma_* has non-uniform eigenvalues, small perturbations in the 2\ell_2 metric along low-variance directions induce large shifts in the data-dependent feature metric.

  8. Knowl 8 — Robust Covariance Estimation Blends Data Geometry with Adversary Metric

    theoretical result

    For binary Gaussian classification xN(yμ,Σ)x \sim \mathcal{N}(y \cdot \mu_*, \Sigma_*) with y{1,+1}y \in \{-1, +1\}, consider robust maximum likelihood estimation under an adversary choosing a diagonal linear operator MMM \in \mathcal{M} with expected squared 2\ell_2 perturbation budget E[M(xμ)22]=ϵ2\mathbb{E}[\|M(x - \mu)\|^2_2] = \epsilon^2: minμ,ΣmaxMMExN(μ,Σ)[(μ,Σ;x+M(xμ))]\min_{\mu, \Sigma} \max_{M \in \mathcal{M}} \mathbb{E}_{x \sim \mathcal{N}(\mu_*, \Sigma_*)} [\ell(\mu, \Sigma; x + M(x - \mu))] where M={MRd×d:Mij=0  ij,  ExN(μ,Σ)[M(xμ)22]=ϵ2}\mathcal{M} = \{M \in \mathbb{R}^{d \times d} : M_{ij} = 0 \; \forall i \ne j, \; \mathbb{E}_{x \sim \mathcal{N}(\mu_*, \Sigma_*)}[\|M(x - \mu)\|^2_2] = \epsilon^2\}.

    The robustly learned parameters (μr,Σr)(\mu_r, \Sigma_r) satisfy:

    1. The robust mean recovers the true mean: μr=μ\mu_r = \mu_*.
    2. There exists ϵ0>0\epsilon_0 > 0 such that for any perturbation budget ϵ[0,ϵ0)\epsilon \in [0, \epsilon_0), the robust covariance Σr\Sigma_r is uniquely given by: Σr=12Σ+1λI+1λΣ+14Σ2\Sigma_r = \frac{1}{2} \Sigma_* + \frac{1}{\lambda} I + \sqrt{\frac{1}{\lambda} \Sigma_* + \frac{1}{4} \Sigma_*^2} where the Lagrange multiplier λ\lambda is bounded as: Ω(1+ϵ1/2ϵ1/2+ϵ3/2)λO(1+ϵ1/2ϵ1/2)\Omega\left(\frac{1 + \epsilon^{1/2}}{\epsilon^{1/2} + \epsilon^{3/2}}\right) \le \lambda \le \mathcal{O}\left(\frac{1 + \epsilon^{1/2}}{\epsilon^{1/2}}\right)

    As the perturbation budget ϵ\epsilon increases, λ\lambda decreases, causing Σr\Sigma_r to interpolate between the true data covariance Σ\Sigma_* and the identity matrix II. This inflates the learned variance along directions of small initial variance in Σ\Sigma_*, preventing the model from relying heavily on brittle non-robust directions.

  9. Knowl 9 — Improved Gradient Alignment and Interpretability of Robust Classifiers

    theoretical result

    Let f(x)=sgn(xΣ1μ)f(x) = \text{sgn}(x^\top \Sigma_*^{-1} \mu_*) and fr(x)=sgn(xΣr1μ)f_r(x) = \text{sgn}(x^\top \Sigma_r^{-1} \mu_*) be monotonic classifiers based on the linear separators from standard and 2\ell_2-robust Gaussian maximum likelihood estimation, respectively.

    Because the robust covariance Σr=12Σ+1λI+1λΣ+14Σ2\Sigma_r = \frac{1}{2} \Sigma_* + \frac{1}{\lambda} I + \sqrt{\frac{1}{\lambda} \Sigma_* + \frac{1}{4} \Sigma_*^2} satisfies κ(Σr)κ(Σ)\kappa(\Sigma_r) \le \kappa(\Sigma_*) (where κ(A)=λmax(A)λmin(A)\kappa(A) = \frac{\lambda_{\max}(A)}{\lambda_{\min}(A)} is the condition number of matrix AA), the minimum worst-case alignment angle between the classifier's input gradient and the inter-class mean vector μ\mu_* is strictly smaller for the robust classifier: minμμ,xfr(x)μ2xfr(x)2>minμμ,xf(x)μ2xf(x)2\min_{\mu_*} \frac{\langle \mu_*, \nabla_x f_r(x)\rangle}{\|\mu_*\|_2 \|\nabla_x f_r(x)\|_2} > \min_{\mu_*} \frac{\langle \mu_*, \nabla_x f(x)\rangle}{\|\mu_*\|_2 \|\nabla_x f(x)\|_2} For any positive definite matrix AA, minxxAxAx2x2=2κ(A)1+κ(A)\min_x \frac{x^\top A x}{\|Ax\|_2 \|x\|_2} = \frac{2 \sqrt{\kappa(A)}}{1 + \kappa(A)}, which is strictly decreasing in κ(A)\kappa(A). As a result, robust training forces classifier input gradients to align more closely under the 2\ell_2 inner product with the semantic vector connecting class means, providing a theoretical explanation for the human-interpretable saliency maps observed in robust neural networks.

  10. Knowl 10 — Generalization Gap and Distributional Shift in Robust Dataset Evaluation

    empirical result

    When a standard empirical risk minimization (ERM) model is trained on the robustified dataset D^R\widehat{\mathcal{D}}_R and evaluated against an 2\ell_2 adversary with ϵ=0.25\epsilon = 0.25, its performance degradation from training to test decomposes into a standard generalization gap and a distributional shift between D^R\widehat{\mathcal{D}}_R and the original distribution D\mathcal{D}.

    On CIFAR-10:

    • Robust training set (samples from D^R\widehat{\mathcal{D}}_R on which the model was trained): 77.33% robust accuracy.
    • Robust test set (unseen samples generated by the robust feature extraction pipeline applied to the test set): 62.49% robust accuracy.
    • Standard test set (unmodified natural test set D\mathcal{D}): 48.27% robust accuracy.

    The difference between 77.33% and 62.49% represents the generalization gap on the robust feature distribution, while the difference between 62.49% and 48.27% reflects the distributional shift between distilled samples and natural images. Furthermore, evaluating the model trained on D^R\widehat{\mathcal{D}}_R under projected gradient descent (PGD) with up to 2,500 steps or the Carlini-Wagner 2\ell_2 (CW-2\ell_2) attack with 1,000 steps shows that accuracy plateaus at 48.27% without dropping by more than 2%, verifying genuine robustness rather than gradient masking.

Coverage note — Omitted intermediate mathematical proof steps (Danskin's theorem subdifferential derivation, asymptotic Gaussian concentration bounds for linear perturbation operators) and 2D geometric toy visualizations from Appendix D.10.

References

  1. 1.Anish Athalye, Nicholas Carlini, and David A. Wagner. “Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examples”. In: International Conference on Machine Learning (ICML). 2018.
  2. 2.Anish Athalye et al. “Synthesizing Robust Adversarial Examples”. In: International Conference on Machine Learning (ICML). 2018.
  3. 3.Cristian Buciluˇa, Rich Caruana, and Alexandru Niculescu-Mizil. “Model compression”. In: International Conference on Knowledge Discovery and Data Mining (KDD). 2006.
  4. 4.Battista Biggio et al. “Evasion attacks against machine learning at test time”. In: Joint European conference on machine learning and knowledge discovery in databases (ECML-KDD). 2013.
  5. 5.Sébastien Bubeck, Eric Price, and Ilya Razenshteyn. “Adversarial examples from computational constraints”. In: arXiv preprint arXiv:1805.10204. 2018.
  6. 6.Nicholas Carlini et al. “On Evaluating Adversarial Robustness”. In: ArXiv preprint arXiv:1902.06705. 2019.
  7. 7.Jeremy M Cohen, Elan Rosenfeld, and J Zico Kolter. “Certified adversarial robustness via randomized smoothing”. In: arXiv preprint arXiv:1902.02918. 2019.
  8. 8.Zachary Charles, Harrison Rosenberg, and Dimitris Papailiopoulos. “A Geometric Perspective on the Transferability of Adversarial Directions”. In: International Conference on Artificial Intelligence and Statistics (AISTATS). 2019.
  9. 9.Nicholas Carlini and David Wagner. “Adversarial Examples Are Not Easily Detected: Bypassing Ten Detection Methods”. In: Workshop on Artificial Intelligence and Security (AISec). 2017.
  10. 10.Nicholas Carlini and David Wagner. “Towards evaluating the robustness of neural networks”. In: Symposium on Security and Privacy (SP). 2017.
  11. 11.John M. Danskin. The Theory of Max-Min and its Application to Weapons Allocation Problems. 1967.
  12. 12.Constantinos Daskalakis et al. “Efficient Statistics, in High Dimensions, from Truncated Samples”. In: Foundations of Computer Science (FOCS). 2019.
  13. 13.Gavin Weiguang Ding et al. “On the Sensitivity of Adversarial Robustness to Input Data Distributions”. In: International Conference on Learning Representations. 2019.
  14. 14.Logan Engstrom et al. “A Discussion of ’Adversarial Examples Are Not Bugs, They Are Features’”. In: Distill (2019). https://distill.pub/2019/advex-bugs-discussion. DOI: 10 . 23915 / distill.00019.
  15. 15.Logan Engstrom et al. “A Rotation and a Translation Suffice: Fooling CNNs with Simple Transformations”. In: International Conference on Machine Learning (ICML). 2019.
  16. 16.Alhussein Fawzi, Hamza Fawzi, and Omar Fawzi. “Adversarial vulnerability for any classifier”. In: Advances in Neural Information Processing Systems (NeuRIPS). 2018.
  17. 17.Alhussein Fawzi, Seyed-Mohsen Moosavi-Dezfooli, and Pascal Frossard. “Robustness of classifiers: from adversarial to random noise”. In: Advances in Neural Information Processing Systems. 2016.
  18. 18.Nic Ford et al. “Adversarial Examples Are a Natural Consequence of Test Error in Noise”. In: arXiv preprint arXiv:1901.10513. 2019.
  19. 19.Tommaso Furlanello et al. “Born-Again Neural Networks”. In: International Conference on Machine Learning (ICML). 2018.
  20. 20.Robert Geirhos et al. “ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustness.” In: International Conference on Learning Representations. 2019.
  21. 21.Justin Gilmer et al. “Adversarial spheres”. In: Workshop of International Conference on Learning Representations (ICLR). 2018.
  22. 22.Gabriel Goh. “A Discussion of ’Adversarial Examples Are Not Bugs, They Are Features’: Robust Feature Leakage”. In: Distill (2019). https://distill.pub/2019/advex-bugs-discussion/response-2. DOI: 10.23915/distill.00019.2.
  23. 23.Gabriel Goh. “A Discussion of ’Adversarial Examples Are Not Bugs, They Are Features’: Two Examples of Useful, Non-Robust Features”. In: Distill (2019). https://distill.pub/2019/advex-bugs-discussion/response-3. DOI: 10.23915/distill.00019.3.
  24. 24.Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. “Explaining and Harnessing Adversarial Examples”. In: International Conference on Learning Representations (ICLR). 2015.
  25. 25.Dan Hendrycks and Thomas G. Dietterich. “Benchmarking Neural Network Robustness to Common Corruptions and Surface Variations”. In: International Conference on Learning Representations (ICLR). 2019.
  26. 26.Kaiming He et al. “Deep Residual Learning for Image Recognition”. In: Conference on Computer Vision and Pattern Recognition (CVPR). 2016.
  27. 27.Warren He et al. “Adversarial example defense: Ensembles of weak defenses are not strong”. In: USENIX Workshop on Offensive Technologies (WOOT). 2017.
  28. 28.Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. “Distilling the Knowledge in a Neural Network”. In: Neural Information Processing Systems (NeurIPS) Deep Learning Workshop. 2014.
  29. 29.Saumya Jetley, Nicholas Lord, and Philip Torr. “With friends like these, who needs adversaries?” In: Advances in Neural Information Processing Systems (NeurIPS). 2018.
  30. 30.Alex Krizhevsky. “Learning Multiple Layers of Features from Tiny Images”. In: Technical report. 2009.
  31. 31.Beomsu Kim, Junghoon Seo, and Taegyun Jeon. “Bridging Adversarial Robustness and Gradient Interpretability”. In: International Conference on Learning Representations Workshop on Safe Machine Learning (ICLR SafeML). 2019.
  32. 32.Mathias Lecuyer et al. “Certified robustness to adversarial examples with differential privacy”. In: Symposium on Security and Privacy (SP). 2019.
  33. 33.Yanpei Liu et al. “Delving into Transferable Adversarial Examples and Black-box Attacks”. In: International Conference on Learning Representations (ICLR). 2017.
  34. 34.Beatrice Laurent and Pascal Massart. “Adaptive estimation of a quadratic functional by model selection”. In: Annals of Statistics. 2000.
  35. 35.Aleksander Madry et al. “Towards deep learning models resistant to adversarial attacks”. In: International Conference on Learning Representations (ICLR). 2018.
  36. 36.Saeed Mahloujifar, Dimitrios I Diochnos, and Mohammad Mahmoody. “The curse of concentration in robust learning: Evasion and poisoning attacks from concentration of measure”. In: AAAI Conference on Artificial Intelligence (AAAI). 2018.
  37. 37.Seyed-Mohsen Moosavi-Dezfooli et al. “Universal adversarial perturbations”. In: conference on computer vision and pattern recognition (CVPR). 2017.
  38. 38.Aravindh Mahendran and Andrea Vedaldi. “Understanding deep image representations by inverting them”. In: computer vision and pattern recognition (CVPR). 2015.
  39. 39.Preetum Nakkiran. “A Discussion of ’Adversarial Examples Are Not Bugs, They Are Features’: Adversarial Examples are Just Bugs, Too”. In: Distill (2019). https://distill.pub/2019/advex-bugs-discussion/response-5. DOI: 10.23915/distill.00019.5.
  40. 40.Preetum Nakkiran. “Adversarial robustness may be at odds with simplicity”. In: arXiv preprint arXiv:1901.00532. 2019.
  41. 41.Chris Olah, Alexander Mordvintsev, and Ludwig Schubert. “Feature Visualization”. In: Distill. 2017.
  42. 42.Nicolas Papernot et al. “Practical black-box attacks against machine learning”. In: Asia Conference on Computer and Communications Security. 2017.
  43. 43.Nicolas Papernot, Patrick McDaniel, and Ian Goodfellow. “Transferability in Machine Learning: from Phenomena to Black-box Attacks using Adversarial Samples”. In: ArXiv preprint arXiv:1605.07277. 2016.
  44. 44.Benjamin Recht et al. “Do CIFAR-10 Classifiers Generalize to CIFAR-10?” In: International Conference on Machine Learning (ICML). 2019.
  45. 45.Aditi Raghunathan, Jacob Steinhardt, and Percy Liang. “Certified defenses against adversarial examples”. In: International Conference on Learning Representations (ICLR). 2018.
  46. 46.Olga Russakovsky et al. “ImageNet Large Scale Visual Recognition Challenge”. In: International Journal of Computer Vision (IJCV). 2015.
  47. 47.Ludwig Schmidt et al. “Adversarially Robust Generalization Requires More Data”. In: Advances in Neural Information Processing Systems (NeurIPS). 2018.
  48. 48.Ali Shafahi et al. “Are adversarial examples inevitable?” In: International Conference on Learning Representations (ICLR). 2019.
  49. 49.Adi Shamir et al. “A Simple Explanation for the Existence of Adversarial Examples with Small Hamming Distance”. In: arXiv preprint arXiv:1901.10861. 2019.
  50. 50.David Stutz, Matthias Hein, and Bernt Schiele. “Disentangling Adversarial Robustness and Generalization”. In: Computer Vision and Pattern Recognition (CVPR). 2019.
  51. 51.D. Smilkov et al. “SmoothGrad: removing noise by adding noise”. In: ICML workshop on visualization for deep learning. 2017.
  52. 52.Arun Sai Suggala et al. “Revisiting Adversarial Risk”. In: Conference on Artificial Intelligence and Statistics (AISTATS). 2019.
  53. 53.Christian Szegedy et al. “Intriguing properties of neural networks”. In: International Conference on Learning Representations (ICLR). 2014.
  54. 54.Thomas Tanay and Lewis Griffin. “A Boundary Tilting Perspective on the Phenomenon of Adversarial Examples”. In: ArXiv preprint arXiv:1608.07690. 2016.
  55. 55.Florian Tramer et al. “The Space of Transferable Adversarial Examples”. In: ArXiv preprint arXiv:1704.03453. 2017.
  56. 56.Dimitris Tsipras et al. “Robustness May Be at Odds with Accuracy”. In: International Conference on Learning Representations (ICLR). 2019.
  57. 57.Jonathan Uesato et al. “Adversarial Risk and the Dangers of Evaluating Against Weak Attacks”. In: International Conference on Machine Learning (ICML). 2018.
  58. 58.Tongzhou Wang et al. “Dataset Distillation”. In: ArXiv preprint arXiv:1811.10959. 2018.
  59. 59.Eric Wong and J Zico Kolter. “Provable defenses against adversarial examples via the convex outer adversarial polytope”. In: International Conference on Machine Learning (ICML). 2018.
  60. 60.Kai Y. Xiao et al. “Training for Faster Adversarial Robustness Verification via Inducing ReLU Stability”. In: International Conference on Learning Representations (ICLR). 2019.
  61. 61.Haosheng Zou et al. “Geometric Universality of Adversarial Examples in Deep Learning”. In: Geometry in Machine Learning ICML Workshop (GIML). 2018.

Citation

MLA
Ilyas, A., et al. “Adversarial Examples Are Not Bugs, They Are Features”. arXiv, 2019, http://arxiv.org/abs/1905.02175v4.
APA
Ilyas, A., Santurkar, S., Tsipras, D., Engstrom, L., Tran, B., & Madry, A. (2019). Adversarial Examples Are Not Bugs, They Are Features. arXiv. http://arxiv.org/abs/1905.02175v4
Chicago
Ilyas, A., S. Santurkar, D. Tsipras, L. Engstrom, B. Tran, and A. Madry. 2019. “Adversarial Examples Are Not Bugs, They Are Features”. arXiv. http://arxiv.org/abs/1905.02175v4.
Harvard
Ilyas, A. et al. (2019) “Adversarial Examples Are Not Bugs, They Are Features”, arXiv [Preprint]. Available at: http://arxiv.org/abs/1905.02175v4.
Vancouver
1. Ilyas A, Santurkar S, Tsipras D, Engstrom L, Tran B, Madry A (2019) Adversarial Examples Are Not Bugs, They Are Features. arXiv

BibTeX

@article{ilyas2019adversarial,
  title = {Adversarial Examples Are Not Bugs, They Are Features},
  author = {Ilyas, Andrew and Santurkar, Shibani and Tsipras, Dimitris and Engstrom, Logan and Tran, Brandon and Madry, Aleksander},
  year = {2019},
  journal = {arXiv},
  url = {http://arxiv.org/abs/1905.02175v4},
  eprint = {1905.02175}
}
Metadata:arXiv

Source Code

This paper has an official code repository available. Click below to access the source code.

View Repository

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF

License: Authors