AGENT SKILL

adversarial-robustness-toolbox

Use Adversarial Robustness Toolbox (ART) for estimator wrappers, adversarial attacks, defences, poisoning/privacy/extraction, metrics, and certification workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
adversarial-robustness-toolbox
license
MIT
metadata
{ "disco-role": "operating" }
description
Use Adversarial Robustness Toolbox (ART) for estimator wrappers, adversarial attacks, defences, poisoning/privacy/extraction, metrics, and certification workflows.
disable-model-invocation
true

02 资源文件 7

03 SKILL.md 正文

Adversarial Robustness Toolbox (ART)

Use this repo skill when a task names adversarial-robustness-toolbox, art, ART estimators, adversarial examples, robustness defences, poisoning/backdoor attacks, privacy inference attacks, model extraction, robustness metrics, or certification workflows.

ART is a Python library for wrapping ML models as estimators, attacking and defending them, and evaluating robustness. This skill covers the core CPU-capable Python workflows verified for ART 1.20.1; heavy speech, object-detection, tracking, malware, GAN/generation, experimental, notebook, and container-only workflows are treated as out of selected runtime scope unless a future refresh expands them.

Start here

  1. If ART is not installed or imports fail, go to sub-skills/setup-and-backends/.

  2. For a quick installed-environment check, run the bundled diagnostic from this skill directory:

    python scripts/inspect_art_install.py --json
    
  3. If a model is not yet wrapped as an ART estimator, use sub-skills/estimators-and-models/ before choosing attacks or metrics.

  4. Choose the workflow owner from the route table below, then read that sub-skill's references and bundled scripts.

  5. Before deciding whether this skill matches a newer checkout, read references/repo-provenance.md.

Route map

User request Load this sub-skill Why
Install ART, verify import art, choose CPU/GPU packages, resolve optional dependency or backend errors setup-and-backends Owns package groups, backend matrix, and import diagnostics.
Wrap sklearn, PyTorch, TensorFlow/Keras, boosted-tree, GPy, black-box, or regression models for ART estimators-and-models Owns estimator constructor contracts, labels, shapes, clip_values, gradients, and black-box limitations.
Generate evasion adversarial examples, choose FGSM/PGD/AutoAttack/HopSkipJump/patch attacks, add preprocessors, or plan adversarial training evasion-and-preprocessing Owns attack-family compatibility, perturbation budgets, preprocessing defences, and trainer recipes.
Plan poisoning/backdoor, membership/attribute inference, model inversion/reconstruction, model extraction/stealing, or detector/mitigation workflows poisoning-inference-extraction Owns poisoning, privacy inference, extraction, Neural Cleanse, Activation Defence, STRIP, and query/data split guidance.
Compute robustness/privacy metrics, run SecurityCurve or GREAT score, use SummaryWriter routing, run tree verification, or choose certification wrappers evaluation-and-certification Owns ART metrics, evaluation objects, gradient checks, tree verification, randomized smoothing, DeepZ, and interval/IBP routes.

Shared references

Public install check

For a normal user environment, start with the base package and only add backend libraries needed by the selected workflow:

python -m pip install adversarial-robustness-toolbox
python -c "import art; print(art.__version__)"

For PyTorch CPU workflows, be explicit in ART wrappers that accept a device parameter:

classifier = PyTorchClassifier(..., device_type="cpu")

ART's PyTorch wrappers often default to GPU-oriented device selection, so this explicit CPU choice avoids no-CUDA confusion.

Guardrails

  • Do not run original repository examples, notebooks, tests, or CI scripts as runtime instructions for users. Use the bundled scripts and distilled references in this skill tree.
  • Do not claim a black-box estimator supports white-box attacks requiring loss_gradient; route to compatible attacks or rebuild a gradient-enabled estimator.
  • Do not treat successful attack generation as proof of robustness. Use the metrics/certification sub-skill for evaluation, stronger attacks, and gradient-obfuscation checks.
  • Do not import or update the managed repo-skill library from this runtime skill. Import is a separate verified creation workflow step.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351