
PROJECT
| Yashaswini C Rao | AUTHOR | ACTIVE |
| Varsha Shubhashri.M | COORDINATOR | ACTIVE |

Important links
ML models are increasingly used in security-critical systems like intrusion detection, malware classification, fraud detection. On paper, these models often look highly accurate. But that accuracy is measured on clean, well-behaved data. Nobody typically tests what happens when someone intentionally tries to break the model.
It turns out you don't need to change an input much to break it. A tiny, often invisible perturbation to the data can flip a model's prediction completely, a technique known as an adversarial attack. Despite this being a well-documented risk, most deployed security ML models are never stress-tested against it before going live.
The core problem: there's no easy, accessible way for someone to just upload their model and dataset and see how it actually holds up under a real attack. Existing tools like CleverHans and Foolbox are attack libraries — you have to write code to use them, they aren't security-domain-focused, and they don't hand you defenses or a readable report out of the box.
You upload a trained model (TorchScript / ONNX / sklearn) and a CSV dataset.
You pick which attack(s) to run — FGSM, PGD, and/or C&W : all white-box attacks (the tool has full access to the model's weights and gradients, representing the worst-case, most-informed threat).
AO8 runs the attack(s) and compares clean accuracy vs. accuracy under attack, surfacing:
It also exports "safe values" : which are inputs the model never got fooled on, thus which can later be used to retrain or harden the model.
Optionally, you can click "Harden this model"* which runs adversarial training and gives you a before/after comparison plus a new, hardened model file to download.
Scope:
✅ In scope: white-box FGSM/PGD/C& W attacks, independently selectable defenses, clear before/after accuracy comparisons
❌ Out of scope: physical-world attacks (e.g. printed adversarial patches), formal mathematical robustness guarantees, direct production-pipeline integration
Who it's for: ML safety/security researchers, red teams simulating attacks, and security engineers who want to stress-test a model before shipping it.
| Concern | Technology |
|---|---|
| Backend | Flask |
| Auth | Google login (via AWS Cognito) + GitHub OAuth |
| Database | PostgreSQL + SQLAlchemy |
| Background jobs | Celery + Redis |
| Attack engine | IBM Adversarial Robustness Toolbox (ART) |
| File storage | AWS S3 (server-side encrypted) |
| Frontend | Jinja2 templates + plain CSS/JS (no framework) |
| Report generation | ReportLab (downloadable PDF) |
Server-rendered templates were chosen over a React/SPA setup because the app is fundamentally form-heavy — upload → configure → view results — and didn't need the overhead of a full single-page app.
Cost: ₹0 total : AWS, ART, and Redis (via Upstash) all run on free tiers.
Upload & validate :You upload a model and a CSV dataset through the browser. The model is validated by actually trying to load it with the right library (TorchScript loader, ONNX runtime, or pickle for sklearn); if that fails, the upload is rejected immediately. Both files are stored as raw encrypted bytes in S3, with only metadata (name, framework, S3 key, size) saved to Postgres.
Configure & submit : On the Benchmark page you pick a model, a dataset, which attacks to run, and an epsilon (perturbation budget). Submitting creates a queued row in evaluation_jobs and pushes just the job_id onto a Celery/Redis queue i.e the web request returns instantly, before any actual attack work starts.
Celery worker executes : A separate always-running worker process picks up the job, pulls the model and dataset back from S3, preprocesses the data (capped at 500 rows, MinMax-scaled), and wraps the model in an ART classifier interface. For each selected attack, it generates adversarial examples, computes clean vs. robust accuracy, tracks which samples flipped and by how much, and runs ART's own robustness metrics on a small subsample.
Persist results : Adversarial examples and the "safe values" (never-flipped samples) are uploaded to S3; per-attack summary metrics and per-sample results are written to Postgres. The job is marked done.
Report delivery : The frontend polls the job status every few seconds. Once done, it fetches the full result set as JSON straight from Postgres (no S3 access needed for this) and renders the score, per-attack table, ART metrics, and flipped-sample list. Downloads (safe values, PDF report) are served on-demand via presigned S3 URLs or an in-memory-generated PDF.
Optional hardening : Clicking "Harden this model" kicks off a second Celery task that re-runs the pipeline, applies ART's adversarial training to actually update the model's weights, re-evaluates the same attacks against the new model, and uploads a genuinely new, hardened model file to S3.

At a component level:
The system was deliberately kept modular, for example, all cloud storage access goes through dedicated "worker files," so swapping AWS for Azure or GCP later would mean adding new worker files rather than rewriting the whole pipeline.
Upload flow : where you upload your model and dataset

Results page : robustness score, per-attack breakdown, flipped samples

PDF report : the same results, exported as a downloadable document

torch.autograd.Function, so ART could treat the ONNX model like a normal differentiable PyTorch model. It works, but is noticeably slower than attacking a native gradient-based model.This project came out of a genuine feeling that it's wrong for security-critical ML models to be deployed without anyone actually trying to break them first. AO8 makes that testing possible without needing to hand-write attack code every time. Right now it covers the core white-box attacks and produces a usable, readable report end-to-end.
Next steps: more defense techniques, a path toward production-style continuous testing, black-box attacks, and eventually attacks on multi-modal networks.