WannaDo Series: Automated AI-Collaboration Platform for Adversarial Learning — wannado-adv
Part of the WannaDo human–AI collaborative scientific research platform · Release
v1.0.5
"Wanna do an adversarial robustness test on any of your machine learning projects?"
wannado-adv is an AI-focused adversarial learning platform built around three core moats:
- AI-Focused & Co-Pilot Native: Designed from the ground up for AI IDE agents, with structured collaboration prompts,
AGENTS.md/SKILL.mdprotocols, and inline engineering notes baked directly into the library. Instead of improvising ad-hoc attack scripts, your AI agent follows built-in guardrails to inspect your project, explain parameters in zero-jargon plain language, forecast hardware runtime ETA, audit for false robustness, and export paper-ready experimental summaries. - Modular Single-File Architecture & Isolated Interface: Every attack algorithm lives in one transparent, self-contained single
.pyfile and plugs into your project through a single non-intrusive evaluation boundary (adv_eval/interface.pyviaVictimInterface)—never polluting your core training or model files. You can see at a glance where each algorithm resides and how it runs; when adapting an idea from a new paper, simplyejectand optimize that single standalone file while keeping maintenance effortless. - Hardwired Literature Alignment & Zero Citation Hallucination: Every attack's verified paper metadata, BibTeX/IEEE/APA citations, baseline-to-SOTA lineage, and intuition notes are hardcoded directly inside the library (
META+ compiledregistry.json). Both users and AI agents select verified implementations straight from the built-in catalog without relying on live web search—eliminating citation hallucinations and paper-to-code mismatches across long agentic tasks.
Domain-agnostic by design: supports standard
[0, 1]vision models alongside nativetorch.complex64wireless baseband signals (jsr_db), tabular, time-series, unsupervised losses, and DRL policies through the same clean interface.
Installation
pip install wannado-adv
Optional Two-Stage Ecosystem Workflow (
wannado-drl+wannado-adv): Both packages remain 100% independent—you never needwannado-drlto usewannado-adv, and vice versa. When installed side-by-side (e.g., training a policy withwannado-drlin./drl_lab/before auditing its perturbation robustness withwannado-advin./adv_eval/), their namespaces (wannado.adv/wannado.drl), skills (.agents/skills/wannado-adv/vs.agents/skills/wannado-drl/), and marked rule blocks (<!-- wannado-adv:start/end -->vs<!-- wannado-drl:start/end -->) are strictly isolated with explicit intent boundaries so their AI Co-Pilot prompts never overwrite or conflict with one another.
Development setup (editable install from source)
git clone https://github.com/JietaoZhao/wannado-adv.git
cd wannado-adv
pip install -e ".[dev]" --no-build-isolation
Next Step: Launch the Universal AI IDE Co-Pilot
Built on the cross-IDE open AGENTS.md + .agents/skills/ standard (works across Cursor, Antigravity, VS Code Codex, Claude Code, Windsurf, Aider, and future AI IDEs). Once pip install wannado-adv completes, follow these two steps inside your own ML project root:
Step 1 — Bind Universal wannado-adv Co-Pilot Rules (one-time)
wannado-adv init-agent --dir .
This writes the open-standard AGENTS.md + .agents/skills/wannado-adv/SKILL.md plus lightweight discovery adapters for Cursor (.cursor/rules/wannado-adv.mdc), Antigravity (.agent/skills/), Claude Code (CLAUDE.md, .claude/skills/), VS Code + Codex, Windsurf, etc., without modifying any of your training or model code.
(Prefer only open-standard files with no IDE-specific folders? Pass --ide universal.)
Step 2 — Prompt Your AI IDE Agent
Open the AI chat in any AI IDE and say:
"Do an adversarial learning robustness test on this project..."
(Even if you skipped Step 1 in a brand-new IDE, simply tell the agent: "Initialize wannado-adv agent rules first (wannado-adv init-agent --dir .), then do an adversarial learning robustness test on this project.")
What Happens Next (Automated 4-Phase Co-Pilot Flow)
- Traverse & Probe: The agent runs
wannado-adv inspect .(scan_project+probe_model_context) to inspect your repo structure, framework, tensor shape/dtype (float32vstorch.complex64), SOTA attack lineage, and gradient health. - Zero-Jargon Clarification & Runtime ETA: Before heavy runs, the agent replies in your conversation language, explains every knob with plain everyday analogies and small-vs-large trade-offs (
eps/jsr_db,steps, test scaleN), keeps academic terms in parentheses for reference, ensures every choice explains its practical effect, and gives a live hardware forecast (estimate_runtime()). - Non-Intrusive Boundary & Single-File Algorithms: It creates an isolated
adv_eval/workspace (wannado-adv scaffold) viaVictimInterfaceso your project stays clean. Want to adapt one paper's idea? Runwannado-adv eject pgdto extract that attack into a standalone editable.pyfile. - Carlini Audit & Paper-Ready Exports: Opens with a clear plain-language takeaway, checks for fake robustness via
audit_robustness()(gradient masking / softmax saturation), and exportsevaluation_report.json,paper_summary.md,paper_table.tex(booktabs), and verifiedreferences.bib(zero citation hallucination).
Quick Usage (Python & CLI)
from wannado.adv import fgsm, pgd, autoattack, preflight, audit_robustness, query_catalog
# 1. AI-native preflight check & Carlini-style robustness audit
report = preflight(model, x, y, attack="pgd", eps=0.03, norm="linf", clip_bounds=(0.0, 1.0))
audit = audit_robustness(model, x, y, eps=0.03, norm="linf", clip_bounds=(0.0, 1.0))
# 2. Standard vision or AutoAttack ensemble
res_fgsm = fgsm(model, x, y, eps=0.03, norm="linf", clip_bounds=(0.0, 1.0))
res_aa = autoattack(model, x, y, eps=0.03, norm="linf", clip_bounds=(0.0, 1.0))
# 3. Wireless communication complex IQ signal with Jamming-to-Signal Ratio (-10 dB)
res_pgd = pgd(wireless_rx, iq_signal, mod_labels, eps=-10.0, norm="jsr_db", steps=20)
# 4. Query the algorithm knowledge graph
cards = query_catalog(family="first_order", tier="S")
Standalone Co-Pilot CLI & End-to-End Reporting Python API
# Inspect project, display the 35-attack arsenal, or run interface preflight checks
wannado-adv inspect .
wannado-adv arsenal
wannado-adv preflight --interface ./adv_eval/interface.py
# Scaffold ONE non-intrusive evaluation boundary (adv_eval/interface.py + adv_eval/run_eval.py)
wannado-adv scaffold --dir ./adv_eval --domain wireless
# Customize ONE attack from a new paper without touching your project or other attacks
wannado-adv eject fgsm --dest ./adv_eval/attacks
# Export verbatim verified citations (zero LLM/web hallucination)
wannado-adv cite fgsm pgd apgd_dlr --format bibtex --include-audit-ref
from wannado.adv import scan_project, probe_model_context, recommend_suite, estimate_runtime, evaluate_suite
scan = scan_project(".")
probe = probe_model_context(model, x_eval, y_eval)
suite = recommend_suite(domain=probe.inferred_domain, goal="standard", autograd_ok=probe.autograd_connected)
print(estimate_runtime(model, x_eval, suite, num_samples=len(x_eval)).format_summary())
report = evaluate_suite(
model, x_eval, y_eval,
eps=-10.0 if probe.is_complex else 8/255,
norm=probe.recommended_norm,
attacks=suite.attacks,
attack_kwargs=suite.attack_kwargs,
clip_bounds=probe.recommended_clip_bounds,
model_name="MyModel",
dataset_name="TestSplit",
)
report.save("./adv_eval/outputs") # evaluation_report.json, paper_summary.md, paper_table.tex, references.bib
Benchmarks & End-to-End Validation
End-to-end validation scripts live under benchmarks/ (kept strictly decoupled from core pyproject.toml dependencies). All numbers below are measured on Apple Silicon (mps for vision, cpu for native torch.complex64 baseband RF).
1. Vision Parity (RobustBench / torchattacks / Official AutoAttack) & False-Robustness Audit
- MPS Compatibility:
26/26representative Wave 1+2 attacks pass natively on Apple Siliconmps. - CIFAR-10 Parity (
eps=8/255,N=200): Matchestorchattacks& officialfra31/auto-attackonStandard(Clean94.5%,PGD-10/MI/NI/DI/APGD->0.0%,AutoAttack0.0%in19.43svs22.10s) and matches/tightensWong2020Fast(Clean86.0%,FGSM 53.0%,PGD-10 46.0%,NI-FGSM 47.5% vs 51.0%,Square-500q 63.0% vs 65.5%,AutoAttack 42.0% vs 43.0%). - Carlini Trap Detection:
audit_robustness()automatically flagssoftmax_saturation_maskingon logit-rescaled models (10^3 x logits: naivePGD-CEfooled at85.0%, bypassed byapgd_dlrat49.0%) andbroken_or_vanishing_gradientson non-differentiable 4-bit input quantization (torchattacks PGDstalled at85.0%, bypassed bybpda_eotat45.5%).
2. Native torch.complex64 Wireless Baseband (norm="jsr_db")
- Tested across 6 modulation schemes (
BPSK,QPSK,8PSK,16QAM,64QAM,PAM4, Clean Acc83.33%) using unified power-ratio constraintsJSR in [-24, 0] dBwith zero real/imag manual splitting. - On a non-differentiable 4-bit IQ ADC receiver (
83.33%clean), naivePGDreports82.3%–83.3%apparent robustness due to zero quantizer gradients;audit_robustness()immediately raises red flags, andbpda_eotreduces real accuracy monotonically to42.7% (-24 dB) -> 18.8% (-18 dB) -> 1.0% (-14 dB) -> 0.0% (-10 dB).
Running Tests & Rebuilding the Catalog
python3 -m unittest discover -s tests -v
python3 -m wannado.adv.catalog --build
Feedback & Suggestions
Found a bug, want a new attack paper implemented, or have ideas to improve the AI IDE Co-Pilot experience? Send feedback or suggestions without leaving GitHub:
- Open Feedback Portal: https://jietaozhao.github.io/wannado-adv/
- Or scan the QR code below from your phone:
Metadata
Release files for wannado-adv 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wannado_adv-1.0.5.tar.gz | 199.8 kB | Without provenance | Details for wannado_adv-1.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wannado_adv-1.0.5-py3-none-any.whl | Python 3 | none | any | Details for wannado_adv-1.0.5-py3-none-any.whl |
Total release size: 446.2 kB
Release files / wannado_adv-1.0.5.tar.gz
| Download URL | wannado_adv-1.0.5.tar.gz |
|---|---|
| Size | 199.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
710ed5c9f4a7de76f311d6623351f867ab34d8acdd7e9be1cd5bc4051c3899f0
|
|
BLAKE2b-256 checksum How to use checksums |
4924fa4a021115168132d461fd81c4f090a266111acd98f7cc01b580190ad880
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / wannado_adv-1.0.5-py3-none-any.whl
| Download URL | wannado_adv-1.0.5-py3-none-any.whl |
|---|---|
| Size | 246.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6ee04b92e2c2cfec79d56a02efa034d59846c8ddaa9b249f4bae370cf3453e01
|
|
BLAKE2b-256 checksum How to use checksums |
daab24ee82bcc873812f03916d5aa9390c18d4e669c1560f6d312eb2a0e43577
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for wannado-adv 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.