Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,114 +1,9 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
pipeline_tag: image-classification
|
| 11 |
-
---
|
| 12 |
-
## Adversarial Examples for improving the robustness of Eye-State Classification π π :
|
| 13 |
-
|
| 14 |
-
### First Aim:
|
| 15 |
-
Project aims to improve the robustness of the model by adding the adversarial examples to the training dataset.
|
| 16 |
-
We investigated that the robustness of the models on the clean test data are always better than the attacks even though added the pertubated data to the training data.
|
| 17 |
-
### Second Aim:
|
| 18 |
-
|
| 19 |
-
Using adversarial examples, the project aims to improve the robustness and accuracy of a machine learning model which detects the eye-states against small perturbation of an image and to solve the misclassification problem caused by natural transformation.
|
| 20 |
-
### Methodologies
|
| 21 |
-
|
| 22 |
-
* Develop Wide Residual Network and Parseval Network.
|
| 23 |
-
* Train Neural Networks using training dataset.
|
| 24 |
-
* Construct the AEs using FGSM and Random Noise.
|
| 25 |
-
#### The approach for the first aim.
|
| 26 |
-
===================================================================
|
| 27 |
-
* Train Neural Networks by adding Adversarial Examples (AEs) to the training dataset.
|
| 28 |
-
* Evaluate the models on the original test dataset.
|
| 29 |
-
|
| 30 |
-
#### The approach for the second aim.
|
| 31 |
-
===================================================================
|
| 32 |
-
* Train Neural Networks using Adversarial Training with AEs.
|
| 33 |
-
* Attack the new model with different perturbated test dataset.
|
| 34 |
-
|
| 35 |
-
### Neural Network Models
|
| 36 |
-
|
| 37 |
-
#### Wide Residual Network
|
| 38 |
-
|
| 39 |
-
* Baseline of the Model
|
| 40 |
-
|
| 41 |
-
#### Parseval Network
|
| 42 |
-
|
| 43 |
-
* [Orthogonality Constraint in Convolutional Layers](https://huggingface.co/Sefika/parseval-network/blob/main/models/Parseval_Networks/constraint.py)
|
| 44 |
-
* [Convexity Constraint in Aggregation Layers](https://huggingface.co/Sefika/parseval-network/blob/main/models/Parseval_Networks/convexity_constraint.py)
|
| 45 |
-
|
| 46 |
-
#### Convolutional Neural Network
|
| 47 |
-
|
| 48 |
-
#### Adversarial Examples
|
| 49 |
-
|
| 50 |
-
##### Fast Gradient Sign Method
|
| 51 |
-
[Examples](https://huggingface.co/Sefika/parseval-network/blob/main/visualization/Adversarial_Images.ipynb)
|
| 52 |
-
|
| 53 |
-
### Evaluation
|
| 54 |
-
|
| 55 |
-
* To evaluate the result of the neural network, Signal to Noise Ratio (SNR) is used as metric.
|
| 56 |
-
* Use transferability of AEs to evaluate the models.
|
| 57 |
-
|
| 58 |
-
## Development
|
| 59 |
-
|
| 60 |
-
#### Models:
|
| 61 |
-
|
| 62 |
-
``` bash
|
| 63 |
-
|
| 64 |
-
adversarial_examples_parseval_net/models
|
| 65 |
-
βββ FullyConectedModels
|
| 66 |
-
βΒ Β βββ model.py
|
| 67 |
-
βΒ Β βββ parseval.py
|
| 68 |
-
βββ Parseval_Networks
|
| 69 |
-
βΒ Β βββ constraint.py
|
| 70 |
-
βΒ Β βββ convexity_constraint.py
|
| 71 |
-
βΒ Β βββ parsevalnet.py
|
| 72 |
-
βββ _utility.py
|
| 73 |
-
βββ wideresnet
|
| 74 |
-
βββ wresnet.py
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
```
|
| 78 |
-
|
| 79 |
-
### Final Results:
|
| 80 |
-
|
| 81 |
-
* [The results of the first approach with FGSM](https://huggingface.co/Sefika/parseval-network/tree/main/logs/AEModels)
|
| 82 |
-
* [The results of the first approach with Random Noise](https://huggingface.co/Sefika/parseval-network/tree/main/logs/RandomNoisemodels)
|
| 83 |
-
* [The results of the second approach](https://huggingface.co/Sefika/parseval-network/tree/main/logs)
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
References
|
| 87 |
-
============
|
| 88 |
-
[1] Cisse, Bojanowski, Grave, Dauphin and Usunier, Parseval Networks: Improving Robustness to Adversarial Examples, 2017.
|
| 89 |
-
|
| 90 |
-
[2] Zagoruyko and Komodakis, Wide Residual Networks, 2016.
|
| 91 |
-
|
| 92 |
-
```
|
| 93 |
-
|
| 94 |
-
@misc{ParsevalNetworks,
|
| 95 |
-
author= "Moustapha Cisse, Piotr Bojanowski, Edouard Grave, Yann Dauphin, Nicolas Usunier"
|
| 96 |
-
title="Parseval Networks: Improving Robustness to Adversarial Examples"
|
| 97 |
-
year= "2017"
|
| 98 |
-
}
|
| 99 |
-
```
|
| 100 |
-
|
| 101 |
-
```
|
| 102 |
-
|
| 103 |
-
@misc{Wide Residual Networks
|
| 104 |
-
author= "Sergey Zagoruyko, Nikos Komodakis"
|
| 105 |
-
title= "Wide Residual Networks"
|
| 106 |
-
year= "2016"
|
| 107 |
-
}
|
| 108 |
-
```
|
| 109 |
-
|
| 110 |
-
### Author
|
| 111 |
-
|
| 112 |
-
Sefika Efeoglu
|
| 113 |
-
|
| 114 |
-
Research Project, Data Science MSc, University of Potsdam
|
|
|
|
| 1 |
+
# My Model
|
| 2 |
+
This is my model card.
|
| 3 |
+
|
| 4 |
+
## Usage
|
| 5 |
+
```python
|
| 6 |
+
from transformers import AutoModel, AutoTokenizer
|
| 7 |
+
tokenizer = AutoTokenizer.from_pretrained("Sefika/adversarialExamples-ParsevalNetworks")
|
| 8 |
+
model = AutoModel.from_pretrained("Sefika/adversarialExamples-ParsevalNetworks")
|
| 9 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|