Quay lại Trending
RepositoryJupyter NotebookINẤn Độ
as791

as791/Adversarial-Example-Attack-and-Defense

This repository contains the implementation of three adversarial example attack methods FGSM, IFGSM, MI-FGSM and one Distillation as defense against all attacks using MNIST dataset.

136sao
29fork
2issue
4lượt xem

🛡️ Tấn công và phòng thủ adversarial example bằng PyTorch

Triển khai ba phương pháp tấn công white-box (FGSM, I-FGSM, MI-FGSM) và một phương pháp phòng thủ bằng defensive distillation trên bộ dữ liệu MNIST.

Dự án cung cấp cài đặt PyTorch của ba phương pháp tấn công adversarial example không mục tiêu (white box) cùng một phương pháp phòng thủ. Mô hình dựa trên ví dụ MNIST của PyTorch. Các phương pháp tấn công đều là white box, nghĩa là biết toàn bộ kiến trúc và siêu tham số của mạng.

✨ Điểm nổi bật

  • FGSM: Thêm nhiễu theo dấu gradient bằng epsilon
  • I-FGSM: Lặp 10 lần với alpha = epsilon/10, dừng nếu vượt ngưỡng epsilon
  • MI-FGSM: Thêm momentum với decay_factor = 1.0, chuẩn hóa L1 gradient
  • Defensive Distillation: Train NetF và NetF' với temperature = 100, NetF' giảm bớt filter một nửa
  • Kết quả tấn công: Giảm độ chính xác từ ~97% xuống ~30% với epsilon = 0.3
  • Kết quả phòng thủ: Chỉ giảm ~2% độ chính xác với cùng epsilon = 0.3

💡 Vì sao đáng chú ý

Ba phương pháp tấn công đều giảm đáng kể độ chính xác mô hình, cho thấy độ mạnh của adversarial examples. Defensive distillation với temperature = 100 và NetF' nhỏ hơn đáng kể giảm thiểu tác động của các cuộc tấn công, duy trì độ chính xác trên 87%. Phù hợp cho nghiên cứu adversarial ML và bảo mật mô hình.


#AdversarialML #PyTorch #MNIST #FGSM #MI-FGSM #DefensiveDistillation #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPython
Trusted-AI/adversarial-robustness-toolbox

Adversarial Robustness Toolbox (ART) - Python Library for Machine Learning Security - Evasion, Poisoning, Extraction, Inference - Red and Blue Teams

6.3k
Nov 27, 2026
Dataset
Manusagents/GPT-5.5-Gemini-3.1-Pro-Grok-4-Claude-Fable-5-Mythos-5-Qwen-3.7-Max-and-more-Distillation-Dataset

📖 The Open Distillation Codex 🌌 The Ultimate Open-Source Distillation Dataset — No Skip, Full, with Attack & Defense 🌌 Where 73 open-source minds converge into one unified stream of intelligence 18M+ Distilled Signals · 7,090 Raw GitHub Repositories · 8 Curated Categories · ~76 GB+ "We did not write this dataset. We assembled it. Every line is an echo — of a model thinking, a coder drafting, a tutor explaining, a repo breathing. Seventy-three… See the full description on the dataset page: https://huggingface.co/datasets/Manusagents/GPT-5.5-Gemini-3.1-Pro-Grok-4-Claude-Fable-5-Mythos-5-Qwen-3.7-Max-and-more-Distillation-Dataset.

♥0
18.7k
Aug 29, 2026
RepositoryPython
thu-ml/ares

A Python library for adversarial machine learning focusing on benchmarking adversarial robustness.

528
Oct 15, 2023
RepositoryPython
ashafahi/free_adv_train

Official TensorFlow Implementation of Adversarial Training for Free! which trains robust models at no extra cost compared to natural training.

176
May 3, 2024
RepositoryJupyter Notebook
MadryLab/photoguard

Raising the Cost of Malicious AI-Powered Image Editing

1.0k
Feb 27, 2023
RepositoryJupyter Notebook
shangtse/robust-physical-attack

Physical adversarial attack for fooling the Faster R-CNN object detector

170
Jan 13, 2020
RepositoryJupyter Notebook
microsoft/denoised-smoothing

Provably defending pretrained classifiers including the Azure, Google, AWS, and Clarifai APIs

102
Apr 2, 2021
RepositoryC++
cifertech/ESP32-DIV

ESP32DIV is a multi-purpose wireless offensive and defensive toolkit powered by an ESP32

4.4k
Sep 22, 2026
RepositoryPython
QData/TextAttack

TextAttack 🐙 is a Python framework for adversarial attacks, data augmentation, and model training in NLP https://textattack.readthedocs.io/en/master/

3.5k
Aug 15, 2026