{"id":15783629,"url":"https://github.com/deepmancer/adversarial-attacks-robustness","last_synced_at":"2025-04-01T16:30:47.640Z","repository":{"id":189028210,"uuid":"679900668","full_name":"deepmancer/adversarial-attacks-robustness","owner":"deepmancer","description":"Evaluating CNN robustness against various adversarial attacks, including FGSM and PGD.","archived":false,"fork":false,"pushed_at":"2024-08-16T11:25:29.000Z","size":402,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-11T20:02:07.013Z","etag":null,"topics":["adversarial-attacks","cnn","deep-learning","fgsm-attack","notebook","pgd-adversarial-attacks","pgd-attack","pytorch","robustness","targetted-attacks"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepmancer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-17T22:03:49.000Z","updated_at":"2024-08-26T08:52:06.000Z","dependencies_parsed_at":"2024-10-04T20:00:26.531Z","dependency_job_id":null,"html_url":"https://github.com/deepmancer/adversarial-attacks-robustness","commit_stats":null,"previous_names":["alirezahr79/adversarial-attacks","alirezaheidari-cs/adversarial-attacks","deepmancer/adversarial-attacks","deepmancer/adversarial-attacks-robustness"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Fadversarial-attacks-robustness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Fadversarial-attacks-robustness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Fadversarial-attacks-robustness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepmancer%2Fadversarial-attacks-robustness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepmancer","download_url":"https://codeload.github.com/deepmancer/adversarial-attacks-robustness/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620435,"owners_count":20806774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adversarial-attacks","cnn","deep-learning","fgsm-attack","notebook","pgd-adversarial-attacks","pgd-attack","pytorch","robustness","targetted-attacks"],"created_at":"2024-10-04T20:00:22.607Z","updated_at":"2025-04-01T16:30:47.322Z","avatar_url":"https://github.com/deepmancer.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔒 Adversarial Attacks \u0026 Robustness\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/PyTorch-%23EE4C2C.svg?style=for-the-badge\u0026logo=PyTorch\u0026logoColor=white\" alt=\"PyTorch\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54\" alt=\"Python\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Jupyter-F37626.svg?\u0026style=for-the-badge\u0026logo=Jupyter\u0026logoColor=white\" alt=\"Jupyter Notebook\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\nWelcome to the **Adversarial Attacks \u0026 Robustness** repository! This project focuses on training a CNN using the CIFAR-10 dataset and evaluating its robustness against a spectrum of adversarial attacks. It covers both basic attacks like targeted and untargeted FGSM, as well as more sophisticated threats such as PGD attacks.\n\n---\n\n## 📂 Project Overview\n\nThis repository contains a Jupyter notebook that:\n- Trains a CNN defined in the `resnet.py` file.\n- Implements targeted and untargeted Fast Gradient Sign Method (FGSM) attacks.\n- Implements the $l_{∞}$-Projected Gradient Descent (PGD) attack.\n- Evaluates the model's performance using adversarial data generated by these attacks.\n\n## 🛡️ Attacks\n\n### 🎯 Targeted FGSM Attack\nThis attack aims to misclassify input images by perturbing them in a direction that maximizes the loss of the target class. By calculating the gradient of the loss function with respect to the input, small perturbations are added to the image pixels to shift the classification decision toward the desired target class.\n\n### 🚫 Untargeted FGSM Attack\nSimilar to the targeted attack, the untargeted FGSM attack also perturbs input images. However, in this case, the objective is to maximize the loss of the true class, leading to misclassification into any incorrect class. The gradient of the loss function is computed with respect to the input, and perturbations are added to maximize the loss and cause misclassification.\n\n### 🔄 $l_{∞}$-PGD Attack\nThe $l_{∞}$-PGD attack is a more powerful and iterative attack method. It performs multiple iterations of perturbations, each time adjusting the input image within a small $l_{∞}$-norm bound. This iterative process progressively maximizes the loss and produces adversarial examples that are challenging for the model to classify correctly.\n\n## 📊 Insights\nBy implementing these attacks and evaluating the model's performance on the adversarial data, we gain insights into the model's robustness and its vulnerability to different types of attacks.\n\nFor more detailed information and code implementation, please refer to the notebook files in this repository.\n\n---\n\nFeel free to explore and contribute to this project. Let's make our models more robust together! 🚀\n\n---\n\n**Note:** Ensure you have the necessary dependencies installed to run the notebook and the `resnet.py` file.\n\n---\n\nHappy coding! 💻\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepmancer%2Fadversarial-attacks-robustness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepmancer%2Fadversarial-attacks-robustness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepmancer%2Fadversarial-attacks-robustness/lists"}