AI › Module 4 › Lesson 2
Adversarial ML
Adversarial ML literacy names crafted inputs that fool classifiers or LLM guards — recognize patterns on YOUR $AI_LAB notes, not attacks on stranger production models.
Visual · t32_adversarial_ml
Adversarial ML literacy. $AI_LAB only. Original Cyberlium.
Opening
Small perturbations, wrong classification — literacy names adversarial examples so defenders build robustness tests on scoped toys.
Adversarial machine learning crafts inputs — pixel noise, synonym swaps, unicode tricks, or prompt variations — that cause models to misclassify or bypass filters while looking normal to humans. Vision, spam, and content-moderation models are common targets. Defender fix: adversarial training, ensemble models, input normalization, and continuous eval — literacy on paper for $AI_LAB fictional classifiers. Cyberlium names adversarial ML on YOUR $AI_LAB — no crafted attacks against stranger production APIs. Next: Supply Chain Models.
1. Adversarial techniques (named)
Evasion attack: modified input at inference to bypass classifier. Poisoning overlap: training-time perturbations (see data poisoning). Unicode and homoglyph tricks: visually similar characters bypass filters. Prompt variation: paraphrase to evade moderation LLM.
On $AI_LAB, write three technique names with one detection or robustness defense each — fictional toy classifier only.
Command guide
Try these commands — Adversarial techniques (named)
═══ TOOLS & WEBSITES ═══ Browse / read these (authorized learning only — stay in YOUR lab / program scope)
MITRE ATLAS adversarial — https://atlas.mitre.org/ NIST AI RMF Measure — https://www.nist.gov/itl/ai-risk-management-framework OWASP LLM Top 10 — https://owasp.org/www-project-top-10-for-large-language-model-applications/
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install python3
macOS:
Command — copy this
brew install python3
Windows: Download https://python.org/downloads/
═══ LINUX / macOS ═══
Command — copy this
export AI_LAB=${AI_LAB:-$HOME/cyberlium-lab/t32-ai}
python3 - <<'PY'
topics = ['Evasion: crafted inputs fool classifiers (literacy)', 'Model inversion: infer training data (privacy risk)', 'Membership inference: was record in training set?', 'Defenses: adversarial training, input preprocessing, ensemble']
print('Adversarial ML literacy (named risks + defenses):')
for t in topics: print(f' - {t}')
PYCommand — copy this
cat > "$AI_LAB/notes/adversarial-ml-literacy.md" <<'EOF' # Adversarial ML Literacy - Document attack *categories* and detection signals - Do NOT build evasion payloads against stranger production models - Eval: robustness benchmarks on YOUR toy models or public papers EOF
Command — copy this
grep -E 'Do NOT|detection' "$AI_LAB/notes/adversarial-ml-literacy.md"
Primary tools to practice this lesson: grep, python3. Reference sites: MITRE ATLAS adversarial (https://atlas.mitre.org/); NIST AI RMF Measure (https://www.nist.gov/itl/ai-risk-management-framework); OWASP LLM Top 10 (https://owasp.org/www-project-top-10-for-large-language-model-applications/). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.
2. Why adversarial robustness matters for AI security
Safety filters and fraud detectors fail under adversarial input — defenders run red-team eval suites on scoped models with written ROE. OWASP LLM and NIST AI RMF cite robustness testing as control.
Students describe adversarial scenarios on lab notes — never fuzz stranger moderation APIs without authorization.
3. Literacy ≠ stranger model evasion campaigns
Forbidden: running adversarial fuzzers against stranger production moderation or fraud APIs. Allowed: adversarial ML card — three techniques, robustness defense, eval habit on $AI_LAB.
Ship: adversarial ML card for YOUR lab notes. Next: Supply Chain Models.
4. What you ship: adversarial ML card for $AI_LAB
Three techniques, robustness defenses, eval habit. $AI_LAB named. NO stranger API fuzzing. chmod 600.
5. What you record before the next lesson
Date. Adversarial ML card. $AI_LAB named. File t32-m04-l02-adversarial-ml.txt chmod 600.
6. Wrong vs right: stranger SaaS vs YOUR toy LLM
Worked failure — same MSF word, opposite target. Right never needs a café Wi-Fi or classmate laptop.
Wrong
Fuzz stranger content moderation API 'for testing.' Skip robustness eval in lab notes.
Right
Write adversarial ML card for YOUR $AI_LAB notes. Next: Supply Chain Models.
Mission: name adversarial techniques on YOUR lab
1) List three adversarial technique names. 2) Write one robustness defense each. 3) Note one eval habit for toy classifier. 4) chmod 600.
Stuck? Ask Cyberlium AI Mentor
Continuous eval on scoped toys catches filter drift before prod deploy.
Knowledge Check
APPLY: Evasion attacks target:
Multiple choice
Knowledge Check
APPLY: True or False: Adversarial robustness testing should run on scoped models with written ROE.
True or False
Knowledge Check
APPLY: Adversarial ML literacy on Cyberlium avoids:
Multiple choice