Evasion and preprocessing

From VectorSpaceLab/AREX-Skill · View interactive version

Evasion and preprocessing is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Use ART evasion attacks, preprocessing defences, and adversarial training recipes for image/tabular robustness workflows.

How to use this skill

Skill file

Evasion and preprocessing

Use this sub-skill when the task is to generate evasion adversarial examples, select a white-box/black-box/physical image attack, add preprocessing defences, or plan adversarial training with ART estimators.

Route here

Route away

Operating sequence

  1. Confirm the estimator capability: loss gradients for PGD/FGM/BIM/MIM/AutoPGD, class gradients for Carlini/DeepFool/JSMA-style attacks, prediction-only classifiers for hard-label black-box attacks, or neural-network/image-specific support for patch/spatial attacks.
  2. Match all perturbation budgets to the estimator input scale and clip_values; for normalized [0, 1] images use budgets such as 8/255, not 8.
  3. Check shape conventions before running an attack: PyTorch image estimators usually use channels_first=True and NCHW; many NumPy image preprocessors default to channels_first=False and NHWC.
  4. For targeted attacks, pass target labels as y to generate; use one-hot labels unless the wrapped estimator workflow explicitly uses class-index labels.
  5. Add preprocessing defences either directly as callable preprocessors or through estimator preprocessing_defences; do not treat preprocessing alone as proof of robustness.
  6. For adversarial training, start from a bounded PGD/FGM attack, verify labels and clipping, then choose generic, Madry PGD, or TRADES training according to the estimator backend.

References

Bundled checks

Run bundled scripts with --help first; they use synthetic data and do not download datasets.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.