Notes for the master course AI Safety (Maksym Andriushchenko, Jonas Geiping and Sahar Abdelnabi, University of Tübingen, Summer Semester 2026).

The course is about the safety, security and alignment of modern AI systems, with a focus on large language models and LLM agents. It covers technical vulnerabilities (adversarial robustness, jailbreaks, prompt injections), ways to detect and prevent failures, alignment methods, and how to evaluate and predict what AI systems can do. The course is technical: it goes into the methods, the math and the implementation details, not only into high-level overviews.

Goal of the course

After this course, students should understand:

  • how LLMs and agents fail: jailbreaks, prompt injections, fine-tuning attacks, memorization, deception
  • the methods to detect, prevent and control these failures, and their limits
  • both the theory and the practice of building safer AI systems, including methods for predicting AI capabilities

Lectures

#LectureKey concepts
1Course Overviewrecent progress of LLMs and agents, AI risks, alignment, HHH, Constitutional AI
2LLM Backgroundtransformers, pre-training, post-training, sampling, using models
3Adversarial ML and JailbreaksFGSM, PGD, adversarial training, threat models, jailbreaks (prefilling, GCG, PAIR, Crescendo), prompt injections, backdoors
4Open-Weight Safetymodel stealing and distillation attacks, fine-tuning attacks, abliteration, emergent misalignment
5Transparency and Watermarkingdetection of LLM-generated text, Binoculars, watermarking (KGW)
6Data Privacy and Memorizationwhere training data comes from, memorization, privacy threat models, copyright, data contamination
7Alignment Toolspre-training filtering, RLHF, DPO, Constitutional AI, LLMs as judges, Model Spec with rubric RL, steering vectors
8LLM Agentsreasoning and planning, deep research, coding and computer-use agents, MCP, agent skills
9Agent Securityprompt injections against agents, the lethal trifecta, defenses, contextual privacy
10Scheming and Deceptiondeception, scheming, sandbagging, evaluation awareness, mitigations and their limits
11Multi-Agent Safetyinformation propagation, collusion, steganography
12Automating AI R&Drecursive self-improvement, MLE-bench, PostTrainBench, KernelBench, AI control, scalable oversight
13Forecasting AI Progressscaling laws, the METR time-horizon plot, AI 2027

Terms that appear in several lectures have their own short page under Concepts.

Reference and Exam

PageWhat it is for
Formula Sheetall formulas on one page, each linked to its lecture section, plus the numbers worth knowing
Glossaryevery term and acronym A to Z in one line, linked to its concept page or lecture
Exam Structureexam format, the mock exam with its answer key, how to write a four-sentence answer, practice questions
Study Planlearning goals for Lectures 3 to 13, the themes that connect them, a three-pass order
Mini-Projectstasks of Mini-Projects 1 to 3 with the lecture sections they practice, final-project format and rubric

Find a topic

For looking something up later: which lecture and section explains a method, an attack or a defense.

TopicWhere
AI risk categories (misuse, third-party, mistakes, misalignment, societal)L1: AI Risk Taxonomy
AI governance: EU AI Act, US AI Action Plan, California SB 53L1: AI Governance
AGI definitionsL1: How Close Are We to AGI?
Gradual disempowerment, power concentrationL1: Gradual Disempowerment
Transformer architecture: attention, SwiGLU MLP, residual streamL2: The Decoder-Only Transformer
Tokenization, BPE, glitch tokensL2: Byte-Pair Encoding
Mixture of experts, dense vs. MoE parameter countsL2: Mixture of Experts
Sampling (temperature, top-p, min-p) and safetyL2: Sampling Matters for Safety
Training cost: C = 6ND, memory, parallelism, data centersL2: Training Compute
SFT, chat templates, RLHF, RLVR / GRPOL2: SFT
Why safety fine-tuning is shallow (abliteration, 10-example attacks)L2: How Thin Is the Safety Layer?
Inference: prefill vs. decode, KV cache, continuous batchingL2: Inference
Assistant persona, simulators, shoggoth, the voidL2: Competing Framings
Adversarial examples, threat models, FGSM vs. PGDL3: FGSM, L3: PGD
Black-box and transfer attacksL3: What If You Don’t Have Gradients?
Adversarial training and the robustness-accuracy tradeoffL3: Adversarial Training
Evaluating defenses: gradient masking, adaptive attacksL3: The Attacker Moves Second
Jailbreak vs. prompt injectionL3: Prompt Injection
Scoring jailbreaks: string matching, LLM judges, rubricsL3: How Do We Score an Attack?
Jailbreak methods: prefilling, Best-of-N, many-shot, GCG, random search, PAIR, CrescendoL3: GCG, L3: PAIR
Defenses: Swiss cheese, classifiers, instruction hierarchy, CaMeLL3: System-Level Defenses
Open vs. closed capability gap, distillation attacksL4: Distillation Attacks
Fine-tuning attacks (10 examples, benign data)L4: A Few Harmful Examples Erase Refusal
Abliteration, refusal direction, directional ablationL4: Why I − r̂r̂ᵀ Is a Projection
Representation engineeringL4: Representation Engineering
Emergent misalignment (insecure code, reward hacking)L4: Emergent Misalignment
LoRA fine-tuning, UnslothL4: LoRA
Unlearning (WMDP, RMU) and tamper resistance (TAR)L4: WMDP + RMU
Open-weight policy trade-offsL4: Conclusion
AI transparency facets, EU AI Act Art. 50 and other rulesL5: The Policy Landscape
Detecting AI-written text: perplexity, Binoculars, trained detectorsL5: Binoculars, L5: Industrial Detectors
LLM watermarking (KGW): embedding, z-test, δ/γ trade-offL5: Embedding the Watermark
Distortion-free and undetectable watermarksL5: Undetectable Watermarks
Attacks on watermarks: paraphrase, cipher, stealing, spoofingL5: Adversarial Attack Surfaces
C2PA, personhood credentials, Unicode marksL5: Proving Content Is Human
Pretraining data sources, CommonCrawl, knowledge cutoffsL6: CommonCrawl
Memorization: definitions, why, scaling laws, extraction attacksL6: What Is Memorization?
Copyright: Bartz v. Anthropic, NYT v. OpenAI, EU opt-outL6: Where Does Liability Attach?
Privacy threats: extraction, reconstruction, inference, deanonymizationL6: Three Privacy Threat Models
Benchmark contaminationL6: Benchmark Contamination
Data poisoning, sleeper agentsL6: Data Poisoning
Biorisk, infohazards, WMDP, layered bio defensesL6: Biorisk Interventions
RLHF step by step, reward over-optimizationL7: RLHF with PPO
DPO vs. RLHFL7: DPO
Constitutional AI and RLAIFL7: Constitutional AI
LLM-as-a-judge and its biases, rubrics as rewardsL7: Judge Biases
Model Spec, chain of command, instruction hierarchyL7: Chain of Command
Deliberative alignment and safe-completionsL7: Deliberative Alignment, L7: Safe-Completions
Pretraining data filtering for open weightsL7: Deep Ignorance
Steering vectors (CAA), representation engineeringL7: CAA
Agents vs. workflows, composable agent patternsL8: Composable Patterns
Chain-of-thought and ReActL8: ReAct
Tool use: Toolformer, ToolLLM, CodeAct, tool designL8: CodeAct, L8: Tool Design
Deep research and multi-agent research systemsL8: Multi-Agent Research
Coding agents, SWE-bench, CodexL8: SWE-bench
Web and computer-use benchmarks (WebArena, OSWorld)L8: WebArena
MCP and Agent SkillsL8: MCP, L8: Skills
Lethal trifecta, EchoLeakL9: Lethal Trifecta
Direct vs. indirect prompt injection, impact taxonomyL9: Indirect Prompt Injection
MCP and Skills as attack surfacesL9: MCP toxic flows, L9: Skill-Inject
Prompt injection benchmarks: AgentDojo, InjecAgent, LLMail-InjectL9: AgentDojo
Instruction hierarchy, design patterns, CaMeLL9: Design Patterns, L9: CaMeL
Contextual integrity, agent privacy benchmarks and defensesL9: Contextual Integrity
Deception vs. scheming, honesty vs. accuracy, goal-guardingL10: Scheming
Deception under pressure (insider trading), MASKL10: Insider Trading, L10: MASK
Alignment faking, compliance gapL10: Alignment Faking
In-context scheming (o1), sleeper agents, agentic blackmailL10: In-Context Scheming, L10: Agentic Misalignment
Sandbagging and sabotage evaluationsL10: Sandbagging, L10: Sabotage Evals
Evaluation awareness: detection, cues, steering, score inflationL10: Test vs. Deployment, L10: Steering Test Awareness, L10: Score Inflation
Deception probes, CoT monitoring and faithfulness, obfuscationL10: Probes, L10: CoT Monitorability, L10: Obfuscation
Anti-scheming training and the eval-awareness confoundL10: Anti-Scheming Training
Multi-agent failure modes and risk factorsL11: Failure Modes, L11: Seven Factors
Infectious jailbreaks, AI worms (Agent Smith, CORBA, Morris II)L11: Agent Smith, L11: Morris II
Network topology and resilienceL11: Topology
Algorithmic collusion, market division, emergent conventionsL11: Pricing Cartels, L11: Conventions
Auditing collusion (COLOSSEUM)L11: COLOSSEUM
Steganography, secret collusion, CASEL11: Stego vs. Watermarking, L11: Secret Collusion
Conformity and sycophancy in multi-agent debateL11: Conformity
Multi-agent defenses, activation-level collusion detectionL11: Defenses, L11: Collusion Probes
Recursive self-improvement, lab frameworks, predictionsL12: Lab Frameworks, L12: Predictions
AI R&D benchmarks: MLE-bench, PostTrainBench, KernelBench, InferenceBenchL12: PostTrainBench, L12: KernelBench
AI control protocols, trusted editing, safety vs. usefulnessL12: AI Control, L12: Protocols
Control in realistic settings (BashArena, LinuxArena, ResearchArena)L12: BashArena, L12: Embedded Sabotage
Scalable oversight, weak-to-strong generalizationL12: Weak-to-Strong, L12: Automated Alignment Research
Reward hacking → misalignment, inoculation promptingL12: Reward Hacking Path
Calibration, proper scoring rules, prediction marketsL13: Calibration, L13: Scoring Rules, L13: Prediction Markets
Scaling laws, compute and algorithmic progress, test-time computeL13: Scaling Laws, L13: Algorithmic Progress
Scaling constraints: power, chips, ASML, capitalL13: Scaling to 2030, L13: No Brakes?
Moravec’s paradox, Amdahl’s lawL13: Moravec, L13: Amdahl
METR time horizons by domain, benchmark saturationL13: METR, L13: Benchmark Saturation
AI scenarios: Bio-Anchors, Situational Awareness, AI 2027, AI 2040L13: Bio-Anchors, L13: AI 2027, L13: AI 2040
AI safety organizations and reading listL1: Who Works on AI Safety?

How to read these notes

Every lecture page has the same structure: a short TL;DR, the content in the order of the slides, a self-test, the references from the slides and links to related lectures. The table of contents on the right follows the slide sections. Small labels like Slides 12-15 say where a topic is in the original slides. Papers are linked where the slides cite them.

Callouts mark what matters most:

Definition

The exact meaning of a term.

Key formula

Formulas you should know.

Intuition

Why something works, in plain words.

Common mistake

Typical misunderstandings and wrong exam answers.

Exam relevance

What is likely to be asked in the exam.

Self-test question

Figures marked Interactive are the lecturers’ own visualizations from the slides. You can use them like on the slides: move the sliders, click Step, reveal the next line.

Course organization

LecturersMaksym Andriushchenko, Jonas Geiping, Sahar Abdelnabi
Teaching assistantsHardik Bhatnagar, Katharina Deckenbach, Shashwat Goel, Johannes Koch, Lena Libon, Luca Morlok, Alexander Panfilov, Ben Rank, Jeanne Salle, David Schmotz, Jehyeok (Tommy) Yeon, Yuchen Zhang
Workload6 ECTS, one lecture + one exercise slot per week (Mondays)
Grading50% final project, 50% final exam; mini-projects are needed for the exam admission
Final exam27 July 2026, 2 hours, free-form questions
Course repositoryhttps://github.com/aisa-group/tue-ai-safety-course
  • Mini-projects: four mini-projects of two weeks each, in teams of 3. You need 50% of the points for the exam admission. Presentations in the exercise slot give bonus points.
  • Final project: a one-month open-ended research project in teams of 3, for example extending a recent paper (emergent misalignment, AI control). Final presentations on 20 July 2026.
  • Final exam: covers 11 lectures (all except the first two), with 3 questions per lecture, so 33 questions in total. Conceptual questions expect up to 4 sentences.

Requirements: solid programming experience and familiarity with machine learning fundamentals.