The Uncanny Valley: Exploring Adversarial Robustness from a Flatness Perspective
Not on the map. Why?
Abstract (arXiv)
Flatness of the loss surface not only correlates positively with generalization, but is also related to adversarial robustness since perturbations of inputs relate non-linearly to perturbations of weights. In this paper, we empirically analyze the relation between adversarial examples and relative flatness with respect to the parameters of one layer. We observe a peculiar property of adversarial examples in the context of relative flatness: during an iterative first-order white-box attack, the flatness of the loss surface measured around the adversarial example first becomes sharper until the label is flipped, but if we keep the attack running, it runs into a flat uncanny valley where the label remains flipped. In extensive experiments, we observe this phenomenon across various model architectures and datasets, even for adversarially trained models. Our results also extend to large language models (LLMs), but due to the discrete nature of the input space and comparatively weak attacks, adversarial examples rarely reach truly flat regions. Most importantly, this phenomenon shows that flatness alone cannot explain adversarial robustness unless we can also guarantee the behavior of the function around the examples. We, therefore theoretically connect relative flatness to adversarial robustness by bounding the third derivative of the loss surface, underlining the need for flatness in combination with a low global Lipschitz constant for a robust model.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 56 of its 70 references that are in the map. First posted on arXiv 27 May 2024.
Builds on
56 of 70 references.
References · 56
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,364
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2014Explaining and Harnessing Adversarial Examplescited by 7,364
- 2016Densely Connected Convolutional Networkscited by 6,720
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
- 2013Intriguing properties of neural networkscited by 5,155
- 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2016Wide Residual Networkscited by 3,070
- 2016Towards Evaluating the Robustness of Neural Networkscited by 2,998
- 2023Jailbroken: How Does LLM Safety Training Fail?cited by 1,651
38 more
- 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,485
- 2020Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attackscited by 1,451
- 2020Sharpness-Aware Minimization for Efficiently Improving Generalizationcited by 1,417
- 2016On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minimacited by 1,352
- 2019Certified Adversarial Robustness via Randomized Smoothingcited by 1,340
- 2016Adversarial Machine Learning at Scalecited by 936
- 2018Robustness May Be at Odds with Accuracycited by 880
- 2017Ensemble Adversarial Training: Attacks and Defensescited by 840
- 2015The Limitations of Deep Learning in Adversarial Settingscited by 790
- 2016Universal adversarial perturbationscited by 784
- 2019Square Attack: a query-efficient black-box adversarial attack via random searchcited by 685
- 2017Adversarial Examples Are Not Easily Detected: Bypassing Ten Detection Methodscited by 546
- 2017Adversarial Patchcited by 517
- 2020BERT-ATTACK: Adversarial Attack Against BERT Using BERTcited by 491
- 2017Feature Squeezing: Detecting Adversarial Examples in Deep Neural Networkscited by 486
- 2017Sharp Minima Can Generalize For Deep Netscited by 466
- 2019Unlabeled Data Improves Adversarial Robustnesscited by 416
- 2018Lipschitz regularity of deep neural networks: analysis and efficient estimationcited by 415
- 2019Provably Robust Deep Learning via Adversarially Trained Smoothed Classifierscited by 330
- 2018Adversarially Robust Generalization Requires More Datacited by 318
- 2018Regularisation of Neural Networks by Enforcing Lipschitz Continuitycited by 314
- 2018Characterizing Adversarial Subspaces Using Local Intrinsic Dimensionalitycited by 282
- 2018Lipschitz-Margin Training: Scalable Certification of Perturbation Invariance for Deep Neural Networkscited by 195
- 2017Formal Guarantees on the Robustness of a Classifier against Adversarial Manipulationcited by 185
- 2017Fisher-Rao Metric, Geometry, and Complexity of Neural Networkscited by 100
- 2018Curriculum Adversarial Trainingcited by 89
- 2020Relative Flatness and Generalizationcited by 88
- 2018Universal Adversarial Trainingcited by 87
- 2023A Unified Algebraic Perspective on Lipschitz Neural Networkscited by 60
- 2019Normalized Flat Minima: Exploring Scale Invariant Definition of Flat Minima for Neural Networks using PAC-Bayesian Analysiscited by 59
- 2021Relating Adversarially Robust Generalization to Flat Minimacited by 57
- 2021Mind the box: l1-APGD for sparse adversarial attacks on image classifierscited by 51
- 2019A New Defense Against Adversarial Images: Turning a Weakness into a Strengthcited by 49
- 2021Detecting Adversarial Examples Is (Nearly) As Hard As Classifying Themcited by 48
- 2022LGV: Boosting Adversarial Example Transferability from Large Geometric Vicinitycited by 39
- 2018ADef: an Iterative Algorithm to Construct Adversarial Deformationscited by 38
- 2019Harnessing the Vulnerability of Latent Layers in Adversarially Trained Modelscited by 26
- 2023Layer-wise Linear Mode Connectivitycited by 22
50 most cited of 56 All 56 (JSON)
Built on by
Citing papers per year: 2025: 2; 2026: 2.
4 papers.
- 2025Flatness is Necessary, Neural Collapse is Not: Rethinking Generalization via Grokkingcited by 8
- 2025Hide & Seek: Transformer Symmetries Obscure Sharpness & Riemannian Geometry Finds Itcited by 5
- 2026An accurate flatness measure to estimate the generalization performance of CNN modelscited by 0
- 2026Generalization in Neural Networks Through the Lens of Magnitude Potentialcited by 0
- 2026Generalization in Neural Networks Through the Lens of Magnitude Potential1 Oct 2026
- 2026An accurate flatness measure to estimate the generalization performance of CNN models9 Mar 2026
- 2025Flatness is Necessary, Neural Collapse is Not: Rethinking Generalization via Grokking22 Sep 2025
- 2025Hide & Seek: Transformer Symmetries Obscure Sharpness & Riemannian Geometry Finds It8 May 2025