Test safely / Module 09

Understand evasion, poisoning, privacy, and model extraction

Use the NIST taxonomy to reason about adversarial machine learning across training, deployment, and inference.

65 minutes Intermediate Practical lab
01

Name the attacker model first

Adversarial-ML results make sense only after stating what the attacker can know and change. Can they alter training samples, query probabilities, submit inputs repeatedly, inspect model weights, or influence labels? Are they targeting integrity, availability, privacy, or misuse?

A defense evaluated against one perturbation budget or one query interface does not automatically generalize to another.

02

Four useful risk families

Evasion changes inference-time inputs so a model makes a chosen mistake. Poisoning changes training or adaptation data. Privacy attacks seek information about training records or model behavior. Extraction and abuse use access to reproduce capability, steal intellectual property, or repurpose the system.

Generative systems add prompt, retrieval, and misuse risks, while agents add tool and action paths. Keep classic application security in the same model: an exposed notebook or unsafe deserialization may be easier to exploit than the model itself.

  • Evasion: test the exact input constraints and decision threshold.
  • Poisoning: protect provenance, review, lineage, and rollback.
  • Privacy: minimize sensitive training data and test memorization risk.
  • Extraction: rate-limit, monitor, watermark where useful, and protect model artifacts.
  • Supply chain: verify model, dataset, code, and package origin.
03

Mitigations have limits

Adversarial training can improve robustness against attacks represented during training, but may reduce clean performance and may not cover new methods. Input filtering can be bypassed. Obscurity and hidden model details are not strong primary controls.

Use defense in depth: data governance, provenance, access controls, robust evaluation, monitoring, human escalation, and recovery. Report the tested threat model and known gaps.

Robust to what, under which access, at what cost, and for how long?

Practice

Design an adversarial-ML evaluation

Safety boundary: Use a toy image or tabular classifier and public training data.

  1. 01

    State the asset, attacker goal, knowledge, capability, and allowed input change.

  2. 02

    Measure clean performance and a simple baseline.

  3. 03

    Select one documented evasion or corruption test in the toy environment.

  4. 04

    Apply one mitigation and measure both robustness and clean-performance change.

  5. 05

    Write a result that is explicitly limited to the tested conditions.

Checkpoint

Ready to move on?

Go deeper

Primary sources for this module

All resources
Previous module08 · Use AI to accelerate secure code review without inventing findings Next module10 · Design detection around behavior, evidence, and analyst capacity
Share this module LinkedIn Email Permanent link