Adversarial examples: from altered pixels to a printed turtle
Adversarial examples expose a gap between an image's appearance and a classifier's decision. Christian Szegedy and his colleagues demonstrated that a carefully calculated, barely perceptible change could make a neural network misclassify an otherwise recognizable image. Their paper, Intriguing properties of neural networks, describes changing the input to increase prediction error. The resulting image, rather than a changed label in a training file, is the experimental object. A model that recognizes the original can confidently assign the altered version to another category.
The paper's visual evidence separates the original image, the modification and the altered result. In Figure 5, correctly classified photographs sit beside changes enlarged tenfold for visibility and the resulting images, which AlexNet classifies as ostriches. The enlarged middle column is a display aid, not the amount of alteration a person sees in the final image. The researchers also found transfer between models, including networks with different settings or training subsets. Their adversarial examples therefore exposed shared vulnerabilities, rather than only an idiosyncrasy of one trained network.
Ian Goodfellow, Jonathon Shlens and Szegedy investigated a mechanism behind that behavior in their 2015 ICLR paper. They argued that linear behavior in a high-dimensional input space can make small, coordinated changes consequential. Their fast gradient sign method uses the direction in which the model's loss increases with respect to the input. It changes many input components together, within a chosen bound. The operation deliberately seeks a mistaken classification; it is different from adding arbitrary photographic noise and hoping something happens.
Their panda demonstration makes the distinction visible. GoogLeNet initially labels the image as a panda with 57.7 percent confidence. After the calculated modification, it labels the result as a gibbon with 99.3 percent confidence. Those percentages describe the model's output for that demonstration. The authors also used adversarial examples during training and reported better MNIST test performance for a maxout network. They reported that ordinary dropout, pretraining and model averaging supplied little reduction in vulnerability.
Alexey Kurakin, Goodfellow and Samy Bengio then tested a further obstacle: the camera. Their physical-world study printed original and modified images, photographed them with a cellphone and submitted the photographs to an ImageNet Inception classifier. This introduced a physical transformation between the generated image and the model's input. Printing and photography can change an image, so success with a digital file alone does not establish that the same alteration will survive this route. Their experiments measured whether the changed classification persisted after that transformation.
The demonstration includes a washing-machine image that the camera application recognizes correctly before alteration and misclassifies after the modified version is printed. Across the experiments, many adversarial examples remained misclassified after photography. The authors also observed that some iterative methods made subtle adjustments that survived photography less successfully. Physical capture could preserve an attack or disrupt it. The experiment used ordinary indoor lighting and a camera pointed approximately straight at the page, with no deliberate search for extreme angles.
Anish Athalye and his collaborators made viewpoint variation part of the construction process in Synthesizing Robust Adversarial Examples. Their method optimizes across a selected distribution of transformations, instead of treating one fixed image as the only input that matters. For a three-dimensional object, this involves rendering its appearance from different positions while changing its surface texture. The chosen transformations describe the conditions under which robustness is sought. Camera noise, lighting and perspective can otherwise make a manipulation that works in one view fail in another.
Their physical demonstration used a three-dimensional printed turtle with a modified texture that an ImageNet classifier labeled as a rifle across different viewpoints. The target category had been selected at random. An ordinary version of the turtle was recognized correctly nearly all the time in the comparison described with the opening figure. Across 100 photographs, the altered turtle received the target rifle label 82 percent of the time, another mistaken label 16 percent, and the correct class 2 percent. The photographers varied their positions around the object; these physical viewpoints were separate from numerically sampled poses used in simulation.
A separate 2017 experiment by Tom Brown and colleagues deliberately abandoned the requirement that a change be hard to see. Their adversarial patch was a conspicuous printed pattern that could be placed within a scene. Training varied its position, scale and rotation across different background images while seeking a chosen output class. The patch was designed to work across scenes, rather than being recalculated for every photograph. Here the human-visible alteration is substantial, even though the same general problem of deliberately misleading a classifier remains.
In the paper's tabletop demonstration, VGG16 labels a scene containing a banana and notebook as a banana with 97 percent confidence. Adding a patch aimed at the toaster category changes that output to toaster with 99 percent confidence. The team's ensemble method trained one patch across five ImageNet models, including VGG16 and Inceptionv3. Brown's team suggested that single-label classification encouraged a model to focus on the most salient item, and that the patch exploited that selection. Their visible pattern manipulated which object dominated the model's classification of the scene.
- Szegedy et al., Intriguing properties of neural networks, arXiv:1312.6199 — arxiv.org
- Goodfellow, Shlens and Szegedy, Explaining and Harnessing Adversarial Examples, ICLR 2015 — arxiv.org
- Kurakin, Goodfellow and Bengio, Adversarial Examples in the Physical World, ICLR 2017 workshop — arxiv.org
- Athalye, Engstrom, Ilyas and Kwok, Synthesizing Robust Adversarial Examples, ICML 2018 — arxiv.org
- Brown et al., Adversarial Patch, NIPS 2017 workshop — arxiv.org