Natural adversarial examples: ImageNet-A and ImageNet-O datasetsNatural Adversarial Examples
The authors construct two natural adversarial example datasets, ImageNet-A and ImageNet-O; ResNet-50 achieves 2.17% accuracy on ImageNet-A and 16.20% AUPR on ImageNet-O (Table 1).
- The ImageNet test set is too easy and contains exploitable spurious cues; models perform far below test-set levels under distribution shift. The authors argue that harder test sets are needed to expose models' shared weaknesses.
- The authors use a fixed ResNet-50 ensemble for adversarial filtering: ImageNet-A retains 200-class natural images that fool the classifiers, and ImageNet-O retains ImageNet-22K anomalous images that are misclassified with high confidence, followed by manual screening.
- ResNet-50 achieves 2.17% accuracy on ImageNet-A and 16.20% AUPR on ImageNet-O (Table 1); data augmentation yields limited improvement, while architectural improvements (e.g., DeiT-base 28.2%) yield larger gains.
- The authors do not specifically discuss limitations in a Limitations or similar section; the experiments cover 27 models (Table 1), OOD detection mainly uses the MSP baseline, and the paper does not report the number of repetitions or statistical significance tests.
- Evaluated models
- ResNet-50ResNet-101ResNet-152ResNet-50+Squeeze-and-ExciteResNet-101+Squeeze-and-ExciteResNet-152+Squeeze-and-ExciteRes2Net-50 (v1b)Res2Net-101 (v1b)Res2Net-152 (v1b)ResNeXt-50 (32 × 4d)ResNeXt-101 (32 × 4d)ResNeXt-101 (32 × 8d)DeiT-tinyDeiT-smallDeiT-baseAlexNetSqueezeNet1.1VGG19DenseNet121DPN 98
- Benchmarks
- ImageNet-AImageNet-OImageNet-1KImageNet-22KPlaces365
- Metrics
- top-1 accuracyAUPRℓ2 Calibration ErrorAURRA
Dan Hendrycks and other researchers used adversarial filtering to select natural adversarial examples from real images, constructing two datasets, ImageNet-A and ImageNet-O; unmodified natural images can reliably cause multiple image classifiers to err. ImageNet-A contains 7,500 images covering 200 ImageNet classes; DenseNet-121 achieves about 2% accuracy on it, a drop of about 90%, and the authors estimate human accuracy at about 90%; ImageNet-O contains 2,000 images outside ImageNet-1K, and the authors say it is the first out-of-distribution detection dataset for ImageNet models; models often misclassify these as in-distribution samples with high confidence, and DenseNet-121's detection performance is close to random. These samples transfer to unfiltered models (including the vision Transformer DeiT), showing that computer vision models share common weaknesses.
Why it was selectedThe paper uses unmodified natural images to construct test sets such as ImageNet-A, showing that multiple vision models share common weaknesses, and provides a reusable benchmark for measuring robustness under distribution shift.
Related events and news
0 events · 1 news mentions
News that mentions this paper
- FAR.AIcites the paper's id or linkFAR.AI 提出对抗脆弱性可能让主流对齐方案失效
These vulnerabilities can be exploited in real-world settings by physical adversarial attacks, and there are even naturally occurring images that are challenging for a wide variety of models.
Paper analysis
What problem does this paper attempt to solve?
The authors construct two natural adversarial example datasets, ImageNet-A and ImageNet-O, to test model classification and OOD detection performance under distribution shift.
Core problem: the existing ImageNet test set is relatively easy and contains spurious cues, and cannot expose models' true weaknesses under distribution shift.
- Problem setting and importance: the authors consider that ImageNet test images are mostly simple, clear, close-up images and may not represent harder images in the real world; when the test distribution does not match the training distribution, model performance is far below test-set level.
- Shortcomings of existing methods: the authors state that prior attempts to expose model fragility relied on synthetic distribution corruptions, artistic renderings, or adversarial perturbations rather than natural images; prior OOD detection datasets mostly used data very different from ImageNet (e.g., textures, scenes, synthetic blobs) as anomalies.
- Core observation: spurious cues in the dataset (e.g., predicting "cow" from a green grass background) make performance estimates overly optimistic; only after removing samples that can be solved with simple spurious cues can a model's true robustness be measured.
- Proposed in the paper: two datasets—ImageNet-A (hard-to-classify natural images of 200 ImageNet classes, 7,500 images) and ImageNet-O (an adversarial OOD detection dataset of classes outside ImageNet-1K, 2,000 images), both constructed with adversarial filtration; the authors state that ImageNet-O is an OOD detection dataset constructed for ImageNet models and call it the first such dataset.
What related research exists?
Related work falls into four groups: adversarial examples, OOD detection, spurious cues and adversarial filtering, and robustness to distribution shift; the authors state that this paper is the first to use adversarial filtering for an image dataset.
Adversarial examples
- Goodfellow et al. [21] define adversarial examples as inputs intentionally designed by an attacker to make a model err; Su et al., 2018 [52] point out that most ℓp adversarial examples can only transfer between models of the same family. The authors claim that the adversarially filtered images in this paper transfer to all tested model families, going beyond the ℓp threat model.
Out-of-Distribution detection
- Hendrycks et al., 2017 [30] propose using the negative of the maximum softmax probability as the anomaly score; subsequent work mostly uses other research benchmarks (e.g., Describable Textures Dataset, Places365, synthetic blobs) as anomalies. Ahmed et al., 2019 [1] criticize the practice of using visually very different datasets as anomalies; Meinke et al., 2019 [46] propose detecting adversarially optimized uniform noise. The authors claim that the anomalous samples in this paper are generated by shifting the label distribution while keeping non-semantic factors close to the original training distribution, which is closer to reality.
Spurious cues and adversarial filtering
- Several NLP works use adversarial filtering to remove samples solvable by simple spurious cues in order to build "adversarial datasets" [49, 5, 61, 15, 7, 28]. The authors point out two differences: NLP filtering only removes the easiest samples, whereas this paper keeps only the hardest samples; adversarially filtered samples in NLP do not reliably transfer to weaker models (in Bisk et al., 2019 [6], BERT's errors do not reliably transfer to GPT-1), whereas this paper claims that the filtered images reliably transfer to both weaker and stronger models.
Robustness to distribution shift
- Recht et al., 2019 [47] constructed ImageNetV2 to be as close as possible to the original test set; Engstrom et al., 2020 [16] estimate that the accuracy drop from ImageNet to ImageNetV2 is less than 3.6%, whereas the authors claim accuracy on ImageNet-A can drop by more than 50%. Geirhos et al., 2019 [19] state that classifiers rely on texture cues; Hendrycks and Dietterich [29] test robustness with corruptions generated by 75 algorithms, and the authors claim that the sources of distribution shift in this paper are more heterogeneous and occur naturally.
Baselines and benchmarks: The baseline for OOD detection is the maximum softmax probability (MSP) detector [30]; comparison benchmarks include ImageNet-1K, ImageNet-22K, and Places365. The authors position this paper as the first to use adversarial filtering to collect an image dataset and to construct the first anomaly/OOD dataset designed for ImageNet models.
How does the paper address this problem?
Adversarial filtering with a fixed ResNet-50 ensemble: ImageNet-A retains hard samples that fool the classifier, and ImageNet-O retains anomalous samples that are misclassified with high confidence, followed by manual selection.
Overall approach: use adversarial filtration to select, from a large number of weakly annotated natural images, samples that can fool a fixed ResNet-50, and build two test sets: ImageNet-A (classification) and ImageNet-O (OOD detection).
Class restrictions
- ImageNet-A: 200 classes are selected from the 1,000 classes of ImageNet-1K so that errors among these 200 classes are more egregious; rare classes (e.g., snow leopard), classes that have changed greatly since 2012 (e.g., iPod), coarse-grained classes (e.g., spiral), classes often used as background (e.g., valley), and easily overlapping classes (e.g., honeycomb/bee, etc.) are excluded.
- ImageNet-O: 200 ImageNet-1K classes are likewise selected as in-distribution; OOD candidates come from ImageNet-22K samples after removing ImageNet-1K classes.
ImageNet-A data construction
- Download and initial filtering: user-annotated images related to the 200 classes are downloaded from iNaturalist, Flickr, and DuckDuckGo; a small ResNet-50 ensemble is used for filtering—one model is first pretrained on ImageNet-1K and then fine-tuned on the 200-class subset, and the other classifies using the 200 logits of an ImageNet-1K pretrained model.
- Filtering rules: each image is classified with 10-crop; if any crop is correctly classified by any ResNet-50, the image is removed; if any ResNet-50's confidence in the correct class exceeds 15%, the image is also removed, so that misclassification is accompanied by low confidence in the correct class.
- Second-round filtering and manual selection: to make the confusion matrix denser, each confusion appears at most 15 times, yielding a shortlist; humans then select valid, single-class, high-quality images from it. The final ImageNet-A contains 7,500 images. Example: 81,413 dragonfly images are downloaded, 8,925 remain after filtering, 1,452 are shortlisted, and 80 are manually selected.
ImageNet-O data construction
- Candidate source: images from ImageNet-22K after removing ImageNet-1K classes; this is chosen because it was collected in the same way as ImageNet-1K, allowing semantics to change without introducing unnatural non-semantic shifts.
- Filtering: images that make ResNet-50 highly confident (i.e., have low anomaly scores) are retained, where the anomaly score is the negative of the predicted confidence [30]; a high-quality subset is then manually selected, totaling 2,000 images, with the same number of samples per class as ImageNetV2.
- Usage recommendation: the authors recommend training models only on the 1,000 classes of ImageNet-1K, because training on ImageNet-22K would make this dataset trivial.
Quality control and failure mode analysis
- Manual construction: both datasets were manually constructed by graduate students over several months; to avoid multi-label images, the graduate students memorized all classes.
- Distribution shift measurement: the FID between the ImageNet validation set and test set is about 0.99; the FID between ImageNet-A and the validation set is 50.40, and between ImageNet-A and the test set about 50.25. The authors estimate the graduate students' human accuracy on ImageNet-A at about 90%.
- Failure modes (Section 3.2, combining the authors' observations with the heatmaps in Figure 6): models may overgeneralize visual concepts (e.g., treating metal as a sundial, or radial thin lines as a harvestman), over-rely on color and texture, and associate frequently co-occurring backgrounds with classes (e.g., wood with nails, snow with shovels); different frames of the same swimming alligator are predicted as semantically loose classes such as cliff, lynx, and fox squirrel.
What experiments did the paper conduct?
Across 27 models, accuracy on ImageNet-A is 0.35%–28.2% and AUPR on ImageNet-O is 14.34%–24.8% (Table 1); data augmentation yields limited gains, while architectural improvements yield larger gains.
Experimental Setup
- Tested models: Table 1 lists 27 result rows, including AlexNet, SqueezeNet1.1, VGG16/19/19+BN, DenseNet121, ResNet-18/34/50/101/152, ResNet+SE (50/101/152), Res2Net-50/101/152 (v1b), ResNeXt-50 (32×4d), ResNeXt-101 (32×4d/32×8d), DPN 68/98, DeiT-tiny/small/base, and two ResNet-50 variants with auxiliary branches.
- Datasets: ImageNet-A (7,500 images, 200 classes), ImageNet-O (2,000 images); the in-distribution data are ImageNet validation images of the corresponding 200 classes.
- Metrics: top-1 accuracy for ImageNet-A; AUPR for ImageNet-O, with the anomaly score being the negative of the maximum softmax probability (MSP baseline [30]), random level about 16.67%, upper bound 100%.
- Reference values: ordinary classifiers typically achieve top-1 accuracy ≥90% on standard ImageNet images of the 200 classes.
- Other settings: data augmentation experiments fix the ResNet-50 architecture and train from scratch; more-data experiments use Places365 or ImageNet-21K pretraining; the paper does not report the number of repetitions or statistical significance tests.
Main Results
According to Table 1 (excerpt; see the paper appendix for the full 27 rows):
Model ImageNet-A Acc (%) ImageNet-O AUPR (%) ResNet-50+DeVries Confidence Branch 0.35 14.34 SqueezeNet1.1 1.12 15.31 ResNet-50 2.17 16.20 DenseNet121 2.16 16.11 ResNet-152 6.05 18.00 Res2Net-152 (v1b) 22.4 23.90 ResNeXt-101 (32 × 8d) 10.2 20.51 DeiT-base 28.2 24.8 - Omitted rows include AlexNet, the VGG series, ResNet-18/34/101, the ResNet+SE series, Res2Net-50/101, ResNeXt-50, DPN 68/98, DeiT-tiny/small, etc., all in Table 1.
- The authors state that these specific models did not participate in dataset construction, and that adversarially filtered images transfer across models (Figure 2 also shows the low accuracy and low AUPR of AlexNet, SqueezeNet, VGG-19, DenseNet-121, and ResNet-50).
- The authors state that performance on ImageNet-O improves more slowly than on ImageNet-A (note to Table 1).
Data Augmentation Experiments
- What was tested: with the ResNet-50 architecture fixed, the effect of various data augmentations on ImageNet-A accuracy (Figure 7).
- Results: the baseline trained from scratch is 2.17%; adversarial training (Wong et al., 2020 [56]) drops to 1.68%; Style Transfer is only 0.13% above the baseline; AugMix 3.8%, Cutout 4.4%, MoEx 5.5%, Mixup 6.6%, CutMix 7.3%.
- Authors' interpretation: the authors state that these data augmentation techniques improve accuracy by at most about 5%, and that their claimed robustness gains on synthetic corruptions do not transfer to this distribution shift.
More Training Data Experiments
- Places365 pretraining: after ResNet-50 is pretrained on Places365 and fine-tuned on ImageNet-1K, ImageNet-A accuracy is 1.56% and ImageNet-O AUPR is 14.88%; the authors state that the supposedly different features of scene-recognition models are insufficient to improve performance.
- Fine-tuning on ImageNet-A itself: after the baseline ResNet-50 is fine-tuned on 80% of ImageNet-A, top-1 and top-5 on the remaining 20% are below 2% and 5%, respectively; the authors state there is no clear improvement.
- ImageNet-21K pretraining: ImageNet-A accuracy is 11.41% (9.24% above the baseline), and ImageNet-O AUPR rises from 16.20% to 21.86%; the authors state that the latter improvement is of little significance because ImageNet-O images overlap with ImageNet-21K, and conclude that 10× training data corresponds to less than 10% accuracy improvement.
Architecture and Other Analyses
- Architecture scale: ResNet-50 is 2.17%/16.2%, ResNet-152 is 6.1%/18.0%; ResNeXt-50 (32×4d) is 4.81%/17.60%; ResNet-50+SE is 6.17%; Res2Net-50 (v1b) is 14.59%/19.5%, Res2Net-152 (v1b) is 22.4%/23.9% (main text and Table 1). The authors state that architectural improvements bring larger gains than data augmentation or 10× data.
- Vision Transformer: DeiT-small 19.1%/20.9% (the main text says 19.0%, Table 1 says 19.1%), DeiT-base 28.2%/24.8%; the authors state that the datasets transfer to Transformers that do not use convolutions, and speculate that the gap between DeiT-small and Res2Net-50 (14.6%) may be explained by Mixup.
- Other ablations and analyses: the ResNet-50 with the DeVries confidence branch [13] has AUPR 14.3%, about 2% lower than the MSP baseline; the MaxLogit detector [26] lowers AUPR from 16.1% to 15.8% on DenseNet-121 and raises it from 20.5% to 20.6% on ResNeXt-101 (32×8d), and the authors state that MaxLogit is slightly worse on more than 10 models; with the rotation prediction auxiliary objective [33], ResNet-50 AUPR is 16.2%, the same as MSP. For calibration, the appendix measures ℓ2 Calibration Error and AURRA, and Figures 11 and 12 show the effects of self-attention and model scale (the specific bar values cannot be read in the converted text).
What are some points that can be further explored?
The paper does not have a dedicated limitations section; the experiments cover 27 models, OOD detection is mainly based on the MSP baseline, and the number of repetitions and statistical tests are not reported.
Limitations and future directions noted by the authors
- The paper does not specifically discuss limitations (there is no Limitations section).
- The authors state that current models still have substantial room for improvement on the datasets, and that improving model architecture is a promising path toward stronger robustness (Section 4, Conclusion).
- The authors state that academia rarely uses datasets larger than ImageNet due to computational cost, and that using more data has limitations (Section 4, More Labeled Data).
- The authors recommend training models only on the 1,000 classes of ImageNet-1K, because training on ImageNet-22K would make ImageNet-O trivial (Section 3.1).
Scope of experiments
- There are 27 result rows for tested models (Table 1), covering convolutional networks and DeiT vision Transformers; the filtering model used to construct the datasets is a fixed ResNet-50 ensemble.
- The data augmentation evaluation covers seven methods: adversarial training, Style Transfer, AugMix, Cutout, MoEx, Mixup, and CutMix, all with the ResNet-50 architecture fixed (Figure 7).
- The more-data experiments cover three settings: Places365 pretraining, 80%/20% fine-tuning on ImageNet-A itself, and ImageNet-21K pretraining.
- The main OOD detection evaluation uses the MSP baseline; the appendix additionally tests three methods: the DeVries confidence branch, MaxLogit, and rotation prediction; the paper states that Outlier Exposure is not used (the authors state that the original paper's authors could not get it to run on 224×224 ImageNet-1K) and neither is ODIN (it requires tuning hyperparameters directly on OOD data, which the authors state is a criticized practice).
- The paper does not report the number of experimental repetitions, statistical significance tests, or the specific values for each model in Figure 2.
Summarize the main content of the paper
The authors use adversarial filtering to construct two natural hard-example test sets, ImageNet-A/O; the tested models perform far below on them than on standard test sets, and the gains from architectural improvements exceed those from data augmentation and more data.
This is a dataset paper: the authors use adversarial filtering to construct two natural image test sets, measuring model classification and OOD detection performance under distribution shift.
- Problem to solve: the authors consider the ImageNet test set to be relatively easy and to contain spurious cues; prior work on measuring fragility mostly used synthetic corruptions or ℓp adversarial perturbations, lacking natural hard examples.
- Method highlights: filtering with a fixed ResNet-50 ensemble—ImageNet-A retains 200-class natural images that fool the classifiers (7,500 images), and ImageNet-O retains ImageNet-22K anomalous images that are misclassified with high confidence (2,000 images), followed by manual screening; the authors state that ImageNet-O is the first OOD detection dataset constructed for ImageNet models.
- Main results: ResNet-50 achieves 2.17% top-1 accuracy on ImageNet-A and 16.20% AUPR on ImageNet-O (Table 1), whereas ordinary classifiers typically achieve ≥90% on standard ImageNet images; the samples transfer to models that did not participate in construction, including DeiT vision Transformers.
- Comparison of improvement methods: data augmentation improves ImageNet-A accuracy by at most about 5% (CutMix 7.3%); ImageNet-21K pretraining reaches 11.41%; architectural improvements yield larger gains, with Res2Net-152 (v1b) at 22.4% and DeiT-base at 28.2% (Table 1).
- Authors' conclusion: the authors state that models share weaknesses, that improving ImageNet-A/O performance is possible but difficult, that architectural improvements are a promising direction, and that the two datasets can serve as measures of performance under distribution shift.