What You See is Not What the Network Infers: Detecting Adversarial Examples Based on Semantic Contradiction
Not on the map. Why?
Abstract (arXiv)
Adversarial examples (AEs) pose severe threats to the applications of deep neural networks (DNNs) to safety-critical domains, e.g., autonomous driving. While there has been a vast body of AE defense solutions, to the best of our knowledge, they all suffer from some weaknesses, e.g., defending against only a subset of AEs or causing a relatively high accuracy loss for legitimate inputs. Moreover, most existing solutions cannot defend against adaptive attacks, wherein attackers are knowledgeable about the defense mechanisms and craft AEs accordingly. In this paper, we propose a novel AE detection framework based on the very nature of AEs, i.e., their semantic information is inconsistent with the discriminative features extracted by the target DNN model. To be specific, the proposed solution, namely ContraNet, models such contradiction by first taking both the input and the inference result to a generator to obtain a synthetic output and then comparing it against the original input. For legitimate inputs that are correctly inferred, the synthetic output tries to reconstruct the input. On the contrary, for AEs, instead of reconstructing the input, the synthetic output would be created to conform to the wrong label whenever possible. Consequently, by measuring the distance between the input and the synthetic output with metric learning, we can differentiate AEs from legitimate inputs. We perform comprehensive evaluations under various AE attack scenarios, and experimental results show that ContraNet outperforms existing solutions by a large margin, especially under adaptive attacks. Moreover, our analysis shows that successful AEs that can bypass ContraNet tend to have much-weakened adversarial semantics. We have also shown that ContraNet can be easily combined with adversarial training techniques to achieve further improved AE defense capabilities.
Key facts. Cited by 10 papers in the map (data through 7 Oct 2026). Builds on 52 of its 84 references that are in the map. First posted on arXiv 24 Jan 2022.
Builds on
52 of 84 references.
References · 52
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2016Densely Connected Convolutional Networkscited by 6,691
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,326
- 2013Intriguing properties of neural networkscited by 5,114
- 2016Wide Residual Networkscited by 3,057
- 2016Towards Evaluating the Robustness of Neural Networkscited by 2,976
- 2015FaceNet: A Unified Embedding for Face Recognition and Clusteringcited by 2,833
- 2018Large Scale GAN Training for High Fidelity Natural Image Synthesiscited by 2,609
- 2016Adversarial examples in the physical worldcited by 1,762
- 2019Theoretically Principled Trade-off between Robustness and Accuracycited by 1,510
38 more
- 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,442
- 2018Obfuscated Gradients Give a False Sense of Security: Circumventing Defenses to Adversarial Examplescited by 1,259
- 2017Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learningcited by 935
- 2016Practical Black-Box Attacks against Machine Learningcited by 893
- 2015The Limitations of Deep Learning in Adversarial Settingscited by 784
- 2017Evasion Attacks against Machine Learning at Test Timecited by 686
- 2020RobustBench: a standardized adversarial robustness benchmarkcited by 659
- 2017ZOO: Zeroth Order Optimization based Black-box Attacks to Deep Neural Networks without Training Substitute Modelscited by 656
- 2019Adversarial Training for Free!cited by 638
- 2017Adversarial Examples Are Not Easily Detected: Bypassing Ten Detection Methodscited by 542
- 2018Certified Robustness to Adversarial Examples with Differential Privacycited by 462
- 2019On Evaluating Adversarial Robustnesscited by 442
- 2014Deep metric learning using Triplet networkcited by 421
- 2016Tutorial on Variational Autoencoderscited by 404
- 2018Defense-GAN: Protecting Classifiers Against Adversarial Attacks Using Generative Modelscited by 362
- 2020Differentiable Augmentation for Data-Efficient GAN Trainingcited by 361
- 2016A Learned Representation For Artistic Stylecited by 340
- 2017Certified Defenses for Data Poisoning Attackscited by 288
- 2020Uncovering the Limits of Adversarial Training against Norm-Bounded Adversarial Examplescited by 275
- 2017MagNet: a Two-Pronged Defense against Adversarial Examplescited by 268
- 2018cGANs with Projection Discriminatorcited by 253
- 2019Improving Adversarial Robustness via Promoting Ensemble Diversitycited by 213
- 2021Fixing Data Augmentation to Improve Adversarial Robustnesscited by 201
- 2020Geometry-aware Instance-reweighted Adversarial Trainingcited by 198
- 2014Learning Fine-grained Image Similarity with Deep Rankingcited by 189
- 2017Modulating early visual processing by languagecited by 167
- 2017EAD: Elastic-Net Attacks to Deep Neural Networks via Adversarial Examplescited by 154
- 2020Adversarial Robustness: From Self-Supervised Pre-Training to Fine-Tuningcited by 152
- 2018Is feature selection secure against training data poisoning?cited by 88
- 2018The Unusual Effectiveness of Averaging in GAN Trainingcited by 73
- 2020DeepHammer: Depleting the Intelligence of Deep Neural Networks through Targeted Chain of Bit Flipscited by 53
- 2017MagNet and "Efficient Defenses Against Adversarial Attacks" are Not Robust to Adversarial Examplescited by 46
- 2019Gotta Catch 'Em All: Using Honeypots to Catch Adversarial Attacks on Neural Networkscited by 40
- 2021Evading Adversarial Example Detection Defenses with Orthogonal Projected Gradient Descentcited by 34
- 2017Adversarial Example Defenses: Ensembles of Weak Defenses are not Strongcited by 32
- 2018Detection based Defense against Adversarial Examples from the Steganalysis Point of Viewcited by 32
- 2021Detecting Adversarial Examples from Sensitivity Inconsistency of Spatial-Transform Domaincited by 29
- 2020NeuroAttack: Undermining Spiking Neural Networks Security through Externally Triggered Bit-Flipscited by 21
50 most cited of 52 All 52 (JSON)
Built on by
Citing papers per year: 2022: 2; 2023: 2; 2024: 2; 2025: 3; 2026: 1.
10 papers.
- 2022Out-of-Distribution Detection with Semantic Mismatch under Maskingcited by 22
- 2022Be Your Own Neighborhood: Detecting Adversarial Example by the Neighborhood Relations Built on Self-Supervised Learningcited by 5
- 2024Fortify the Guardian, Not the Treasure: Resilient Adversarial Detectorscited by 4
- 2023Non-Cross Diffusion for Semantic Consistencycited by 2
- 2025Universal and Efficient Detection of Adversarial Data through Nonuniform Impact on Network Layerscited by 2
- 2023EMShepherd: Detecting Adversarial Samples via Side-channel Leakagecited by 0
- 2024Towards Robust Domain Generation Algorithm Classificationcited by 0
- 2025From Pixels to Trajectory: Universal Adversarial Example Detection via Temporal Imprintscited by 0
- 2025T2I-Based Physical-World Appearance Attack against Traffic Sign Recognition Systems in Autonomous Drivingcited by 0
- 2026Detecting Adversarial Data via Provable Adversarial Noise Amplificationcited by 0
- 2026Detecting Adversarial Data via Provable Adversarial Noise Amplification4 May 2026
- 2025T2I-Based Physical-World Appearance Attack against Traffic Sign Recognition Systems in Autonomous Driving17 Nov 2025
- 2025Universal and Efficient Detection of Adversarial Data through Nonuniform Impact on Network Layers25 Jun 2025
- 2025From Pixels to Trajectory: Universal Adversarial Example Detection via Temporal Imprints6 Mar 2025
- 2024Fortify the Guardian, Not the Treasure: Resilient Adversarial Detectors18 Apr 2024
- 2024Towards Robust Domain Generation Algorithm Classification9 Apr 2024
- 2023Non-Cross Diffusion for Semantic Consistency30 Nov 2023
- 2023EMShepherd: Detecting Adversarial Samples via Side-channel Leakage27 Mar 2023
- 2022Be Your Own Neighborhood: Detecting Adversarial Example by the Neighborhood Relations Built on Self-Supervised Learning31 Aug 2022
- 2022Out-of-Distribution Detection with Semantic Mismatch under Masking31 Jul 2022