TL;DR
Szegedy and colleagues asked two questions about deep image classifiers. First, do the individual units of a hidden layer carry the meaning of the layer, or does meaning live in the whole space of activations? They found that random directions in that space look just as meaningful as the units. Second, are the learned input-output maps smooth? They found they are not: by optimising a small change to an image, they could make a network misclassify it while a person sees no difference. They called these inputs adversarial examples, and found that many transfer to other networks trained with different settings or on different data.
Builds on: Convolutional Neural Network, Constrained Optimization, Lipschitz Continuity · Leads to: Adversarial Examples
Note: this is a research summary for education, not a guide to building or attacking real systems.
Why it mattered
Adversarial examples became one of the central problems in machine learning. Today the same question, whether a model's decision holds up under small input changes, is asked about image classifiers in safety-critical settings such as driving and medical imaging, and about language models that read adversarial text. Papers that propose attacks and defences routinely use the same basic setup this paper introduced: find the smallest change that flips a prediction, then test whether that change also fools other models. The paper also gave an early operator-norm argument for why depth can amplify instability, which later work refined into the robustness methods used today.
The problem
By 2013 deep networks achieved excellent results on visual and speech recognition. Earlier work had tried to understand what hidden units had learned by finding the input that most strongly activated one unit. That method assumes the units of a layer form a meaningful basis, so that a single coordinate is a meaningful feature. The paper questions that assumption.
It also asked how smooth the learned function is. Classical kernel methods are assumed to be smooth in the sense that a tiny change to an input changes the output only a little, and vision models are usually assumed to be smooth in the same way because a tiny change to a photo should not change what it shows. The paper tests that assumption directly, and finds it does not hold for deep networks in the way people had assumed.
How it works
The paper has two parts. Here is the pipeline for the second part, the adversarial search, in the order the paper runs it.
flowchart LR A["Correctly classified image x, label f(x)"] --> B["Choose a wrong target label l"] B --> C["Search for a small r with f(x + r) = l"] C --> D["Keep x + r inside the valid pixel range [0, 1]"] D --> E["Output: x + r looks the same but gets label l"]
- Input. A trained classifier and an image that it classifies correctly. Check: is the true label.
- Pick a target. Choose a wrong label . Check: if , the problem has nothing to solve.
- State the goal. Find the smallest perturbation such that and still has valid pixel values. Check: "smallest" is measured by the Euclidean norm .
- Relax the constraint. Exact minimisation is hard, so the paper replaces the constraint with a penalty: minimise , and search for the smallest that makes the classifier output . Check: a larger forces to be smaller, at the cost of a larger loss.
- Use the approximation. The paper solves the penalty problem with box-constrained L-BFGS, a quasi-Newton optimiser that respects the valid pixel range. Check: the output is a candidate adversarial example, not a guaranteed minimum, because the network is not convex.
A tiny linear example shows the geometry, although the paper's method is for deep networks. Take a linear score with , and an input . The score is , so the input is on the positive side. The smallest perturbation that reaches the boundary is . Check: , which lies exactly on the boundary. The length of is .
The math
The classifier maps an image vector to a label in . It has an associated continuous loss . The paper defines the minimum-distortion function as the closest image to that the classifier labels , found by solving
This is hard for a neural network, so the paper uses the penalised form, the minimum for which the solution of
satisfies . The paper notes that this would be exact for convex losses, which neural networks are not.
The stability bound
Let be the map from layer to layer , with . Call the upper Lipschitz constant of layer , the smallest value with
for all and . Composing the layers gives with . The product is the step where depth matters: each layer multiplies the bound.
For a half-rectified layer , the ReLU step does not expand distances, so , where is the largest singular value of (see Singular Value Decomposition (SVD)). A max-pooling layer is contractive too, with , because its Jacobian projects onto a subset of the input coordinates. For a contrast-normalisation layer with between 0.5 and 1, the paper gives the bound .
For a convolutional layer the paper computes the operator norm with Parseval's formula: the norm is the supremum over frequencies of the norm of a matrix built from the 2-D Fourier transforms of the kernels. The paper uses this to bound each layer of an ImageNet network.
Units and directions
For a layer's activation vector and a unit with basis vector , the earlier method looked at images , where is a held-out image set. The paper replaces with a random direction and finds images that are just as semantically consistent.
Results
The results are on three networks: a set of models on MNIST, a convolutional network trained on ImageNet ("AlexNet" in the paper), and an unsupervised network trained on YouTube frames ("QuocNet"). Here are the numbers the paper reports, copied from its tables and text.
Adversarial examples exist for every network studied. The paper says that for each sample it "always managed" to generate close, visually hard to distinguish adversarial examples for MNIST, QuocNet and AlexNet (Figure 5 and the linked examples). For AlexNet, the average distortion over 64 examples is 0.006508.
Table 1 (MNIST, single-model results). The softmax model FC10 with weight decay has a training error of 6.7 percent, a test error of 7.4 percent, and an average minimum distortion of 0.062. The two-hidden-layer sigmoid network FC100-100-10 has a test error of 1.64 percent and a distortion of 0.058. The autoencoder-based AE400-10 has a test error of 1.9 percent and a distortion of 0.086. Distortion is the root-mean-square pixel difference on the scale, over pixels.
Table 2 (cross-model transfer). Adversarial examples made for one model are fed to the others. For example, examples made for FC10 with weight decay cause errors on FC10 with weight decay in 11.7 percent of cases and on the two-hidden-layer FC100-100-10 in 2 percent. Examples made for the high-regularisation FC10() model cause 48.1 percent errors on FC100-100-10. The paper also reports the error caused by Gaussian noise of the same size; for noise with standard deviation 0.1 those errors range from 0 to 18.3 percent across the models.
Table 4 (cross-training-set transfer). Two networks were trained on one half of the MNIST training set and one on the other half. Examples made for FC100-100-10 trained on the first half caused 5.9 percent errors on the network trained on the second half. When the same perturbation is amplified to standard deviation 0.1, the error on that network rises to 43 percent. The paper says the examples "remain hard" for a model trained on a disjoint training set, although their effectiveness decreases considerably.
Training with adversarial examples. On MNIST, a 100-100-10 network trained with weight decay and with a pool of adversarial examples mixed into training reached a test error below 1.2 percent. The paper reports 1.6 percent for weight decay alone and about 1.3 percent with carefully applied dropout. The paper says these are preliminary results on one network, and that the gain appeared only when adversarial examples were generated for each layer's outputs.
Layer bounds (Table 5). The upper Lipschitz bounds computed for the ImageNet network of Krizhevsky et al. are 2.75 for the first convolutional layer, 10 for the second, 7 for the third, 7.5 for the fourth, 11 for the fifth, 3.12 for the first fully connected layer, and 4 for each of the next two. The paper says instability "can appear as soon as in the first convolutional layer."
Limits. The paper states that the Lipschitz numbers are upper bounds: large bounds do not automatically mean adversarial examples exist, while small bounds guarantee none. It does not explain why the examples transfer across models. It reports no results for convolutional models on MNIST, and its ImageNet analysis gives layer-wise upper bounds only, without a measured adversarial error rate for that network. Its own discussion says the authors do not have a deep understanding of how often adversarial negatives occur in practice.
Reading guide
- Section 1 (Introduction) states the two properties. Read it with Backpropagation in mind: the paper says the computation found by backpropagation can be hard to interpret.
- Section 2 (Framework) lists the networks and datasets. The notation for an activation vector comes from Activation Function layers.
- Section 3 (Units) asks whether single units carry meaning. It relies on Vector Norm and on the idea that a direction in activation space is a linear combination of units.
- Section 4.1 (Formal description) is the optimisation problem. Read it with Constrained Optimization and Loss Function; the penalty step is the standard way to remove a hard constraint.
- Section 4.2 (Experiments) reports the tables. Read the tables against Softmax, Cross-Entropy Loss, Dropout and Autoencoder.
- Section 4.3 (Spectral analysis) bounds the instability of each layer. It needs Lipschitz Continuity, Singular Value Decomposition (SVD), Max Pooling and Rectified Linear Unit (ReLU).
- Section 5 (Discussion) raises the tension between high generalisation and adversarial examples, and leaves it open.
Check yourself
QuestionRecall: what did the paper mean by an adversarial example?Show answer
An input made by adding a small, carefully chosen perturbation to a correctly classified image, so that the trained network assigns it a different label while a person sees no meaningful change.
QuestionComputation: for the linear score with and , the minimum-norm change that reaches the boundary is . What is ?Show answer
, , so . Its length is .
QuestionWhy: why does the product of layer bounds grow with depth, and what does that imply?Show answer
Each layer multiplies the worst-case stretch of the input difference by its own Lipschitz constant. With layers, the stretch is the product of numbers. If most of them are above 1, the bound grows quickly with depth, so a deep network can magnify a small perturbation at its output. The paper stresses these are upper bounds, so this shows a possibility, not a guarantee.
QuestionApplied: a team trains a new classifier on a different subset of the same data and finds that adversarial examples made for their first model still fool the second model. What does the paper suggest about the cause?Show answer
The paper's results show that transfer happens across training subsets as well as across hyperparameters, so the cause is not just overfitting to one training set or one random run. The paper treats this as evidence that the networks share blind spots tied to the data distribution, but it does not explain the mechanism. The team should not conclude that the second model is safe.