CoolFace
Apppublic

SaniNets/adversarial-attacks-backend

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

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 types
  • GET /api/defenses: Get available defense models
  • POST /api/generate_adversarial: Generate an adversarial example
  • POST /api/compare_attacks: Compare different attack methods
  • POST /api/evaluate_defense: Evaluate a defense model's robustness
  • POST /api/compare_defenses: Compare different defense models
  • GET /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.