AI › Module 4 › Lesson 1
Data Poisoning
Data poisoning literacy names corrupted training or fine-tuning data that skews model behavior — defender context on YOUR $AI_LAB notes, not attacks on stranger training pipelines.
Visual · t32_data_poisoning
Data poisoning literacy. $AI_LAB only. Original Cyberlium.
Opening
Bad data in, bad model out — literacy names poisoning classes so you validate datasets on toys you control, not sabotage stranger ML pipelines.
Data poisoning inserts malicious samples into training, fine-tuning, or RAG corpora — backdoor triggers, label flipping, or bias injection. Effects may appear only when trigger phrases appear at inference. Defender fix: dataset provenance, anomaly detection on training data, and supply chain verification — literacy names the class; students do not poison stranger models. Cyberlium writes data poisoning card on YOUR $AI_LAB — fictional poisoned sample description on paper only. Next: Adversarial ML.
1. Poisoning classes (named, literacy only)
Backdoor trigger: model misbehaves when hidden phrase appears. Label flip: wrong labels on subset of training data. Bias injection: skewed samples to produce discriminatory outputs. RAG corpus poison: bad documents in retrieval index.
On $AI_LAB, write three poisoning class names with one detection signal each — no steps targeting stranger training pipelines.
Command guide
Try these commands — Poisoning classes (named, literacy only)
═══ TOOLS & WEBSITES ═══ Browse / read these (authorized learning only — stay in YOUR lab / program scope)
MITRE ATLAS AML.T0020 — https://atlas.mitre.org/ (poison training data) OWASP LLM03 Training Data Poisoning — https://owasp.org/www-project-top-10-for-large-language-model-applications/ Hugging Face security — https://huggingface.co/docs/hub/security
═══ INSTALL ═══
Linux (Debian/Ubuntu):
Command — copy this
sudo apt install curl
macOS: Built-in
Windows: Built-in (PowerShell: Invoke-WebRequest)
═══ LINUX / macOS ═══
Command — copy this
export AI_LAB=${AI_LAB:-$HOME/cyberlium-lab/t32-ai}
curl -sS https://atlas.mitre.org/ | head -10
cat > "$AI_LAB/notes/data-poisoning-named.txt" <<'EOF'
Data poisoning — NAMED LITERACY (no poison recipes):
Risk: malicious samples in fine-tune/RAG corpus shift model behavior
Signals: anomalous label drift, backdoor triggers in eval sets
Defenses: provenance tracking, dataset validation, holdout evals
Supply chain: verify model/dataset signatures from trusted sources
NEVER: publish poison payloads or backdoor training cookbooks
EOFCommand — copy this
grep -E 'poisoning|Defenses|NEVER' "$AI_LAB/notes/data-poisoning-named.txt"
Primary tools to practice this lesson: grep, curl. Reference sites: MITRE ATLAS AML.T0020 (https://atlas.mitre.org/); OWASP LLM03 Training Data Poisoning (https://owasp.org/www-project-top-10-for-large-language-model-applications/); Hugging Face security (https://huggingface.co/docs/hub/security). Run every command in the box — install first, then the usage lines — only on YOUR lab / program scope.
2. Why poisoning is hard to detect post-training
Model may perform normally on clean inputs — trigger activates only under attacker conditions. Defenders audit data sources, hash datasets, monitor drift, and restrict who can upload to fine-tune corpora.
Students describe fictional poisoning scenarios on lab notes — never upload poison to employer or public model hubs without authorization.
3. Literacy ≠ stranger pipeline sabotage
Forbidden: poisoning Hugging Face datasets, employer fine-tune jobs, or public RAG indexes without scope. Allowed: data poisoning card — three classes, detection signal, provenance defense on $AI_LAB.
Ship: data poisoning card for YOUR lab notes. Next: Adversarial ML.
4. What you ship: data poisoning card for $AI_LAB
Three classes, detection signals, provenance defense. $AI_LAB named. NO stranger pipeline attacks. chmod 600.
5. What you record before the next lesson
Date. Data poisoning card. $AI_LAB named. File t32-m04-l01-data-poisoning.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
Upload poisoned samples to public model hub 'for research.' Skip dataset provenance in lab notes.
Right
Write data poisoning card for YOUR $AI_LAB notes. Next: Adversarial ML.
Mission: name data poisoning classes on YOUR lab
1) List three poisoning classes. 2) Write detection signal for each. 3) Name one provenance or audit defense. 4) chmod 600.
Stuck? Ask Cyberlium AI Mentor
Dataset hash at train time beats guessing after the model misbehaves.
Knowledge Check
APPLY: Data poisoning on Cyberlium is taught as:
Multiple choice
Knowledge Check
APPLY: True or False: Backdoor triggers can cause misbehavior only when specific phrases appear.
True or False
Knowledge Check
APPLY: Data poisoning literacy avoids:
Multiple choice