This repository provides the code for the experiments in the paper "Adversarial Flows: A gradient flow characterization of adversarial attacks" by Lukas Weigand, Tim Roith, and Martin Burger.
The following Notebooks are available:
TrainClassifier.ipynb
: This notebook trains a simple fully connected neural network, defined inmodel.py
, on data points sampled from the two-moons dataset. The concrete dataset used in the paper is provided in the folder data-weights astwo_moons.npz
. Furthermore the weights of the trained networks are also given astwo_moons_ReLU.pt
andtwo_moons_GeLU.pt
Flows.ipynb
: This notebook computes and visualizes the iterates of IFGSM and the minizing movement scheme. The optimizers are defined inflows.py
Furthermore, the file compute_diffs.py
provides an executable script, computing the difference between IFGSM and the minimizing movement scheme for different initial vlaues.