SaniNets/adversarial-attacks-backend
Adversarial Attacks Explorer - Backend API
This repository hosts the backend API for the Adversarial Attacks Explorer, an interactive web application that demonstrates and explains adversarial attacks on neural networks.
Overview
The Adversarial Attacks Explorer allows users to:
- Generate adversarial examples using various attack methods (FGSM, PGD, DeepFool, C&W)
- Compare different attack techniques
- Analyze the robustness of defense strategies
- Visualize the effects of adversarial perturbations
API Endpoints
The API provides the following endpoints:
GET /api/attacks: Get available attack typesGET /api/defenses: Get available defense modelsPOST /api/generate_adversarial: Generate an adversarial examplePOST /api/compare_attacks: Compare different attack methodsPOST /api/evaluate_defense: Evaluate a defense model's robustnessPOST /api/compare_defenses: Compare different defense modelsGET /api/precomputed/<visualization_type>: Get precomputed visualizations
Technical Details
This backend is built with:
- Flask for the API server
- PyTorch for deep learning models
- Adversarial Robustness Toolbox (ART) for implementing attacks
- Matplotlib for visualization generation
The models are trained on CIFAR-10 and ImageNet datasets.
Frontend
The frontend application is deployed separately and communicates with this API. Visit Adversarial Attacks Explorer to explore the interactive interface.
Citation
If you use this in your research or educational materials, please cite:
@software{adversarialattacksexplorer, author = {Sanidhya Manglunia}, title = {Adversarial Attacks Explorer}, year = {2025}, url = {<https://github.com/Sanidhya3008/adversarial-attacks-explorer>} }
License
This project is licensed under the MIT License - see the LICENSE file for details.
