How arnaud58/attaques-adverse-minmax-vs-lastiter works
Project type and purpose
• This is a research‐oriented Python project composed of four Jupyter notebooks. Its goal is to compare model accuracy and robustness under two robust‐training methods (MinMax vs. Last‐Iter) and two adversarial attacks (FGSM vs. PGD) using the Foolbox library.
File structure
• Top level:
• Four notebooks: LastIter_FGSM.ipynb, LastIter_PGD.ipynb, minMax_FGSM.ipynb, minMax_PGD.ipynb
• A README (readme.md) describing objectives and dependencies
• No classic “src/”, “tests/” or “deploy/” folders—each notebook encapsulates data loading, model definition, attack generation, training, and evaluation.
Key insights from README
• Two robust‐training methods:
• “MinMax” (steganography‐inspired)
• “Last‐Iter” (Madry et al.)
• Two adversarial attack types: FGSM and PGD via Foolbox v2.4
• The notebooks each implement one method/attack combination.
Main components
a. Data module
• Datasets (e.g., MNIST/CIFAR loader) in each notebook
b. Model module
• Neural network architecture (e.g., CNN)
c. Attack generator
• FGSM or PGD attack functions from Foolbox
d. Robust‐training loop
• MinMax or Last‐Iter procedure wrapping the attack and model update
e. Evaluation & metrics
• Accuracy on clean vs. adversarial samples
f. External dependencies
• Foolbox, PyTorch/TensorFlow, Jupyter
Relationships & interactions
• Data → Model
• Model + Data gradients → Attack Generator
• Attack Generator → Adversarial Samples
• Adversarial Samples + Model → Robust‐training Loop
• Loop outputs updated Model parameters
• Final Model → Evaluation (clean & adversarial data)
Architectural patterns & design principles
• Pipeline pattern: sequential processing from data loading to evaluation
• Modular attack interfaces (FGSM and PGD share a common API in Foolbox)
• Pluggable training strategies (MinMax and Last‐Iter differ only in loop structure around the attack call)
Detailed element checklist
• Title: “Adversarial Training Pipeline”
• Data Loader
• Neural Network Model
• Attack Generator (FGSM / PGD)
• Robust‐Training Loop (MinMax / Last‐Iter)
• Evaluator
• Parameter annotations on the Attack Generator and Training Loop indicating “FGSM vs. PGD” and “MinMax vs. Last‐Iter”