Saved in:
Bibliographic Details
Main Authors: Walter, Nils Philipp, Adilova, Linara, Vreeken, Jilles, Kamp, Michael
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2405.16918
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913726072881152
author Walter, Nils Philipp
Adilova, Linara
Vreeken, Jilles
Kamp, Michael
author_facet Walter, Nils Philipp
Adilova, Linara
Vreeken, Jilles
Kamp, Michael
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2405_16918
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle The Uncanny Valley: Exploring Adversarial Robustness from a Flatness Perspective
Walter, Nils Philipp
Adilova, Linara
Vreeken, Jilles
Kamp, Michael
Machine Learning
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.
title The Uncanny Valley: Exploring Adversarial Robustness from a Flatness Perspective
topic Machine Learning
url https://arxiv.org/abs/2405.16918