Lesson map
Lesson 02 published. Map, example, EX008.
flowchart TD
N0["Learning outcomes"]
N1["2.1 Four classical attack families"]
N2["2.2 Generative and agentic systems"]
N3["2.3 Governance as research context"]
N4["2.4 Finding open problems"]
N5["2.6 Practice activities"]
N6["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6
N6 --> EX["Worked example"]
EX --> Q["Exercise EX008"]
Logical drawing
flowchart LR
N0["Learning outcomes"]
N1["2.1 Four classical attack families"]
N2["2.2 Generative and agentic systems"]
N3["2.3 Governance as research context"]
N4["2.4 Finding open problems"]
N5["2.6 Practice activities"]
N6["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6 --> Q["EX008"]
[Learning outcomes]
|
v
[2.1 Four classical attack families]
|
v
[2.2 Generative and agentic systems]
|
v
[2.3 Governance as research context]
|
v
[2.4 Finding open problems]
|
v
[2.6 Practice activities]
|
v
[Synthesis]
|
v
[Worked example] --> [Exercise EX008]
Learning outcomes
You will (1) map the attack surface of predictive and generative AI using the NIST AI 100-2 E2025 taxonomy, MITRE ATLAS and the OWASP Top 10 for LLM Applications 2025; (2) summarise the foundational results in evasion, poisoning, privacy and extraction; (3) explain why prompt injection is an architectural rather than a filtering problem; (4) locate open problems where a doctoral contribution is plausible; and (5) relate research to governance frameworks (NIST AI RMF, ISO/IEC 42001, the EU AI Act).
2.1 Four classical attack families
Evasion changes an input at test time so a model errs. Szegedy et al. (arXiv:1312.6199) found that imperceptible perturbations fool image classifiers; Goodfellow, Shlens and Szegedy (arXiv:1412.6572) explained this by local linearity and introduced the fast gradient sign method (FGSM). Carlini and Wagner (arXiv:1608.04644) gave stronger optimisation attacks; Madry et al. (arXiv:1706.06083) framed robustness as a min–max problem and popularised projected-gradient-descent adversarial training. Cohen, Rosenfeld and Kolter (arXiv:1902.02918) offered certified robustness via randomized smoothing, at the cost of accuracy and with guarantees only for small norm-bounded perturbations.
Poisoning corrupts training data or the training process. Biggio, Nelson and Laskov (arXiv:1206.6389) poisoned support-vector machines; Gu et al. BadNets (arXiv:1708.06733) and Chen et al. (arXiv:1712.05526) showed backdoors that keep clean accuracy while a trigger forces a target output. Carlini et al. (arXiv:2302.10149) showed that poisoning web-scale datasets is practical, for example by buying expired domains referenced in dataset URL lists. Hubinger et al. Sleeper Agents (arXiv:2401.05566) trained language models with backdoored behaviour that persisted through standard safety fine-tuning.
Privacy attacks infer information about training data. Shokri et al. (arXiv:1610.05820) introduced membership inference; Carlini et al. (arXiv:2012.07805) extracted verbatim training sequences from a large language model. Differentially private training (Abadi et al., arXiv:1607.00133) bounds such leakage formally, at a utility cost.
Extraction copies a model's functionality through its API. Tramèr et al. (arXiv:1609.02943) stole models from prediction APIs, sometimes with a number of queries close to the number of parameters for simple models.
The toy lab below reproduces the evasion intuition on a linear model: accuracy falls steadily as the perturbation budget grows, even though the model is accurate on clean data.
"""Lab E: evasion of a toy linear classifier (synthetic data, stdlib only).
Trains logistic regression on two synthetic clusters, then applies a
fast-gradient-sign (FGSM-style) perturbation of size eps to every test point
and reports clean vs adversarial accuracy. Teaching model only."""
import math, random
rng = random.Random(7)
def point(label):
cx = 1.0 if label else -1.0
return [rng.gauss(cx, 0.7), rng.gauss(cx, 0.7)], label
train = [point(i % 2) for i in range(400)]
test = [point(i % 2) for i in range(200)]
w, b = [0.0, 0.0], 0.0
sig = lambda z: 1 / (1 + math.exp(-z))
for epoch in range(200):
gw, gb = [0.0, 0.0], 0.0
for x, y in train:
p = sig(w[0]*x[0] + w[1]*x[1] + b)
gw[0] += (p - y)*x[0]; gw[1] += (p - y)*x[1]; gb += p - y
w = [w[i] - 0.1*gw[i]/len(train) for i in range(2)]; b -= 0.1*gb/len(train)
def acc(data, eps):
ok = 0
for x, y in data:
# gradient of the loss w.r.t. x is (p - y) * w; FGSM steps along its sign
p = sig(w[0]*x[0] + w[1]*x[1] + b)
xa = [x[i] + eps*math.copysign(1, (p - y)*w[i]) for i in range(2)]
ok += (sig(w[0]*xa[0] + w[1]*xa[1] + b) >= 0.5) == bool(y)
return ok / len(data)
print(f"weights w=({w[0]:.3f}, {w[1]:.3f}) b={b:.3f}")
for eps in (0.0, 0.25, 0.5, 0.75, 1.0):
print(f"eps={eps:.2f} accuracy={acc(test, eps):.3f}")
Expected output:
weights w=(1.795, 1.756) b=-0.080
eps=0.00 accuracy=0.985
eps=0.25 accuracy=0.950
eps=0.50 accuracy=0.840
eps=0.75 accuracy=0.660
eps=1.00 accuracy=0.505
2.2 Generative and agentic systems
Large language models (LLMs) add new surfaces. Jailbreaks elicit content that safety training was meant to prevent; Wei, Haghtalab and Steinhardt (arXiv:2307.02483) traced them to competing objectives and mismatched generalisation, and Zou et al. (arXiv:2307.15043) found automatically optimised suffixes that transfer across models. Prompt injection is different: an attacker places instructions in content the application feeds the model. Perez and Ribeiro (arXiv:2211.09527) studied direct goal hijacking; Greshake et al. (arXiv:2302.12173) showed indirect injection through web pages, e-mails and documents that an LLM-integrated application retrieves, leading to data exfiltration and tool misuse; Liu et al. (arXiv:2306.05499) attacked real LLM-integrated applications. The OWASP Top 10 for LLM Applications 2025 lists prompt injection as LLM01 and adds sensitive information disclosure, supply chain, data and model poisoning, improper output handling, excessive agency, system prompt leakage, vector and embedding weaknesses, misinformation and unbounded consumption.
Injection is architectural because an LLM receives instructions and data in one token stream; there is no hardware-like boundary between them. Defences therefore combine structure (Chen et al. StruQ, arXiv:2402.06363, trains models to follow only instructions in a reserved channel), privilege reduction (least-privilege tools, allowlists, human confirmation for consequential actions) and detection. NIST AI 600-1 lists information security and related risks for generative AI with suggested actions; MITRE ATLAS catalogues adversary tactics and techniques against AI systems with case studies, in the style of ATT&CK.
2.3 Governance as research context
The NIST AI RMF 1.0 (AI 100-1) organises risk work into Govern, Map, Measure and Manage functions and lists characteristics of trustworthy AI, including secure and resilient. ISO/IEC 42001:2023 specifies an AI management system. Regulation (EU) 2024/1689 (the AI Act) entered into force on 1 August 2024 with staged application; Article 15 requires high-risk systems to achieve appropriate accuracy, robustness and cybersecurity, naming data poisoning, model poisoning, adversarial examples and confidentiality attacks. A doctoral contribution that offers a measurement method for such properties can therefore matter beyond academia — but you must not overstate legal conclusions.
2.4 Finding open problems
Good frontier questions sit where (a) attacks are cheap and defences are evaluated weakly, (b) theory and practice disagree, or (c) a deployment pattern has outrun evaluation. Current examples include evaluating agent defences under adaptive attackers; measuring residual risk when no certified bound exists; supply-chain integrity of model weights and datasets; and privacy auditing of fine-tuned models. Write each as a gap statement: what is known, what is claimed but untested, why it matters, what evidence would settle it. Ana's gap in the worked example shows the form.
2.5 Worked example (synthetic MAAL case)
Ana mapped 31 papers on prompt-injection defences into a table with columns: threat model, adaptive attack (yes/no), metric, utility cost reported, code released. Eighteen papers evaluated only fixed payload lists; nine reported no utility cost; six released code. Her gap statement: structural defences are claimed to generalise, but few evaluations use attackers who adapt to the structure itself, and utility costs are rarely measured on the same tasks. That gap is narrow enough to test and broad enough to matter.
2.6 Practice activities
- Build your own mapping table for twenty papers in your sub-area. 2. Classify three MITRE ATLAS case studies by NIST AI 100-2 attacker goal and capability. 3. Rewrite one open problem as a four-part gap statement. For the mapping table, use the same columns as Ana: threat model, adaptive attack, metric, utility cost and code release, and count each column at the end. For the ATLAS case studies, note where a case does not fit the NIST categories cleanly; that mismatch is itself useful. For the gap statement, check that the evidence part names an experiment you could actually run within the doctorate.
2.7 Errors and limits
Each of these confusions leads to the wrong study; check your related-work chapter for each:
- Equating jailbreak (policy evasion) with prompt injection (instruction smuggling through data); a jailbreak defence does not address data that smuggles instructions, which is Ana's problem.
- Citing a framework category as if it were an empirical finding; a category records that a risk exists, not how often it occurs.
- Treating certified robustness bounds as covering threats outside their norm ball; a certified bound says nothing about injected text or perturbations outside its norm.
- Reading the EU AI Act's application dates loosely; obligations phase in between 2025 and 2027, and a loose reading leads to wrong statements about which obligations apply now.
Exercises
- EX008 — Taxonomy. Classify a backdoor inserted through a third-party fine-tuning dataset by attacker goal, capability and lifecycle stage (NIST AI 100-2). Rubric: 3 = integrity, training-data control, training stage; 2 = two correct; 1 = one; 0 = none.
- EX009 — Lab reading. From the evasion lab, at what budget does accuracy fall below 0.70, and why does a linear model degrade smoothly? Rubric: 3 = eps 0.75 (0.660) plus margin/linearity explanation; 2 = number only; 1 = vague; 0 = wrong.
- EX010 — Injection vs jailbreak. Distinguish the two with one synthetic example each. Rubric: 3 = correct distinction and examples; 2 = distinction only; 1 = confused; 0 = wrong.
- EX011 — OWASP mapping. Map an e-mail agent that forwards messages on a retrieved instruction to two OWASP LLM 2025 entries. Rubric: 3 = LLM01 and LLM06 with reasons; 2 = correct IDs without reasons; 1 = one; 0 = none.
- EX012 — Gap statement. Write a four-part gap statement for membership inference against fine-tuned LLMs. Rubric: 3 = all four parts and testable evidence; 2 = three; 1 = vague; 0 = none.
- EX013 — Certified bounds. State one thing randomized smoothing certifies and one thing it does not. Rubric: 3 = L2-ball radius around an input vs patches/semantic/other norms or poisoning; 2 = one side; 1 = vague; 0 = wrong.
- EX014 — Regulation. Which AI Act article addresses robustness and cybersecurity of high-risk systems, and what attacks does it name? Rubric: 3 = Article 15 with poisoning, adversarial examples, confidentiality attacks; 2 = article only; 1 = vague; 0 = wrong.
Synthesis
The frontier is shaped by a decade of attacks outpacing defences. Generative and agentic systems widen it, because instructions and data share a channel. A good doctoral question sits on a measured gap and uses shared vocabularies so others can test it.
Continue studying — chapter 02 of 08
← Chapter 01 (draft) · Course chapter index · Chapter 03 (draft) →