{"id":17260085,"url":"https://github.com/paulescu/adversarial-machine-learning","last_synced_at":"2026-03-11T00:32:42.649Z","repository":{"id":40607803,"uuid":"381335138","full_name":"Paulescu/adversarial-machine-learning","owner":"Paulescu","description":"Hands-on tutorial on adversarial examples 😈. With Streamlit app ❤️.","archived":false,"fork":false,"pushed_at":"2022-06-17T09:16:26.000Z","size":75564,"stargazers_count":31,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T06:41:10.918Z","etag":null,"topics":["adversarial-attacks","adversarial-machine-learning","python"],"latest_commit_sha":null,"homepage":"https://paulabartabajo.substack.com/","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/Paulescu.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}},"created_at":"2021-06-29T11:06:25.000Z","updated_at":"2025-02-03T10:23:43.000Z","dependencies_parsed_at":"2022-09-04T12:01:12.496Z","dependency_job_id":null,"html_url":"https://github.com/Paulescu/adversarial-machine-learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Paulescu/adversarial-machine-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Fadversarial-machine-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Fadversarial-machine-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Fadversarial-machine-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Fadversarial-machine-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paulescu","download_url":"https://codeload.github.com/Paulescu/adversarial-machine-learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulescu%2Fadversarial-machine-learning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30363921,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"ssl_error","status_checked_at":"2026-03-10T21:40:59.357Z","response_time":106,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","adversarial-machine-learning","python"],"created_at":"2024-10-15T07:47:09.683Z","updated_at":"2026-03-11T00:32:42.635Z","avatar_url":"https://github.com/Paulescu.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\u003ch1\u003eBreaking deep learning models with adversarial examples 😈 \u003c/h1\u003e\n\u003ci\u003e\u003ch3\u003eOr maybe it's just that beautiful things are so easily broken by the world.\u003c/h3\u003e\u003c/i\u003e\n\u003ch4\u003e-- Cassandra Clare, City of Fallen Angels\u003c/h4\u003e\n\u003c/div\u003e\n\n![](http://datamachines.xyz/wp-content/uploads/2021/06/camaleon-2048x1524.jpg)\n\n## Table of Contents\n\n1. [What is this repo about?](#what-is-this-repo-about)     \n2. [Quick setup](#quick-setup)   \n3. [Fast Gradient Sign method](#fast-gradient-sign-method)\n4. [Adversarial example generator](#adversarial-example-generator)\n5. [Let's connect!](#lets-connect)  \n\n\n## What is this repo about?\n\nPyTorch code and [streamlit app](https://share.streamlit.io/paulescu/adversarial-machine-learning/main/src/streamlit_app.py) that demonstrate how easy it is to break deep learning models in computer vision.\nMore precisely, Inception V3.\n\nIf you do not know what adversarial examples are go check my blog post.\n\n[📝 Adversarial examples to break deep learning models](http://datamachines.xyz/2021/07/05/adversarial-examples-to-break-deep-learning-models/)  \n\nAlso available in [Medium](https://towardsdatascience.com/adversarial-examples-to-break-deep-learning-models-e7f543833eae) and in [Hackernoon](https://hackernoon.com/adversarial-examples-in-machine-learning-explained)\n\n## Quick setup\n\nCreate a virtualenv with your preferred tool (`virtualenv`, `conda`, `poetry`)\nand activate it.\n\nThen install the code as a local package\n```\n$ (venv) pip install .\n```\n\n\n## Fast Gradient Sign method\n\nWe use the vanilla fast gradient sign method\n\n![](images/fgsm_formula.png)\n\n\nAnd its iterative version.\n\n![](images/ifgsm_formula.png)\n\n\nIn the code you can find the \"magic\" that transforms a nice puppy into a paper towel.\n\n![](images/step_1_to_9.jpg)\n\n## Adversarial example generator\n\n👉 [Streamlit app to generate adversarial examples](https://share.streamlit.io/paulescu/adversarial-machine-learning/main/src/streamlit_app.py)\n![](images/streamlit_app.gif)\n\n## Let's connect\n\nIf you want to learn more about real-world ML topics and become a better data scientist\n\n👉 [Subscribe](http://datamachines.xyz/subscribe) to the datamachines newsletter.\n\n👉🏽 Follow me on [Twitter](https://twitter.com/paulabartabajo_) and/or [LinkedIn](https://www.linkedin.com/in/pau-labarta-bajo-4432074b/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulescu%2Fadversarial-machine-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulescu%2Fadversarial-machine-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulescu%2Fadversarial-machine-learning/lists"}