Northeastern University · CS 7150 · Fall 2026

Adversarial examples

Interactive pieces for Szegedy et al. 2014, “Intriguing properties of neural networks.” First the one new idea, carrying backpropagation past the weights to the input; then the paper’s experiments, run live in the browser on small MNIST networks like the paper’s: finding adversarial examples, comparing them with random noise, testing them on other networks, and the paper’s first property, about single units.

  1. The idea

    Backprop to the input

    A small network learns two classes in the plane. Step through its backward pass on a diagram and use the result two ways: stop at the weights and take a training step, which moves the boundary; or carry the gradient one layer further, to the input, and take an attack step, which moves the point across the boundary.

    Open the explainer →
  2. The paper’s search

    Finding an adversarial example

    Pick an MNIST digit and a target and watch the paper’s optimization run: minimize c|r|² plus the loss for the target, pixels kept in range, with a line search for the smallest change. Compare the one-step fast gradient sign method, and Gaussian noise of the same size.

    Open the explainer →
  3. Figure 7, explained

    Tiny crafted vs. large random

    Error rate against the size of the change, for noise and for a change along the gradient; why an aligned change grows like n and a random one like √n; and the paper’s bound on how much each layer can stretch a change.

    Open the explainer →
  4. Tables 2–4

    Adversarial examples transfer

    Six networks: different sizes, a softmax classifier, and three trained on halves of the data. Make adversarial examples for each, test them on all, and magnify the changes as the paper did. Then three ideas for why transfer happens at all.

    Open the explainer →
  5. The first property

    Units vs. random directions

    Rows of the test digits that most excite one hidden unit, mixed with rows for random directions in the same layer. Guess which is which; the paper says you can’t.

    Open the explainer →