All formulas of the course on one page, in course order. Every block links to the section where it is explained. Terms are explained in the Glossary.
What the exam wants from formulas
The exam is conceptual: no derivations, no calculations. But several answers are easiest with a formula: say what each term does. ⭐ marks formulas behind a mock-exam question or a likely exam topic: abliteration, Binoculars, the KGW z-test, adversarial training, the RLHF objective, DPO, the steering vector, the Brier score and Amdahl’s law. See Exam Structure.
LLM Background (Lecture 2)
Background for the later lectures, not asked directly.
Embedding lookup → Embedding
= vocabulary size, = hidden dimension.
Scaled dot-product attention → Attention
is a token × token similarity matrix; .
SwiGLU MLP → MLPs
Gate , up , down .
Unembedding → Unembedding and sampling
Pre-training loss → Next-token prediction
Training compute → Training compute
= FLOPs, = parameters (active parameters for MoE), = training tokens.
RLHF objective → RLHF
GRPO advantage → RLVR
The group-relative z-score of responses to one prompt. No learned reward model.
Adversarial ML and Jailbreaks (Lecture 3)
The adversary’s problem → Average case vs. worst case
The worst case inside a norm ball of radius , not the average case.
FGSM → FGSM
One step to the corner of the box.
PGD → PGD
Many small steps of size , each projected back into the box.
⭐ Adversarial training (min-max) → Adversarial training
Inner max: PGD finds the worst-case input. Outer min: SGD on those inputs. Costs compute and clean accuracy.
Jailbreak objective → Two mechanisms
Once the answer starts affirmatively, autoregression does the rest.
GCG objective → GCG
= -token suffix, = target prefix, = concatenation. Gradients propose token swaps, forward passes pick the best.
Open-Weight Safety (Lecture 4)
⭐ Refusal direction (difference of means) → Refusal direction
⭐ Directional ablation (abliteration) → Why it is a projection
is the component of along ; subtracting removes it. The weight edit applies to every matrix that writes into the residual stream. No training. Mock exam Q2.
LoRA → LoRA
is frozen; only and are trained.
RMU loss → RMU
Forget term: push activations on hazardous data towards a random vector . Retain term: stay like the frozen model on benign data.
TAR objective → TAR
Inner loop: a simulated fine-tuning attack. Outer loop: backpropagate through the attack so the hazardous knowledge stays unrecoverable. Still falls to other attacks.
Transparency and Watermarking (Lecture 5)
Perplexity → Perplexity
⭐ Binoculars → Binoculars
Cross-perplexity normalizes away how surprising the prompt and topic are. → machine. Mock exam Q3.
KGW watermark (soft red/green list) → Embedding the watermark
= green list from a hash of the previous tokens, a fraction of the vocabulary; = bias on green logits.
⭐ Watermark detection (z-test) → z-test
= green tokens among . Without the watermark about are green and . Larger : stronger signal, lower quality.
Gumbel-max watermark (Aaronson) → Gumbel scheme
= pseudo-random number from key and context. Distortion-free: each token still has probability .
Data Privacy and Memorization (Lecture 6)
Feldman’s bound (informal) → Why models memorize
With a long tail of rare examples, a learner that refuses to memorize is provably worse.
Alignment Tools (Lecture 7)
Reward model: pairwise ranking loss → Reward model
Score the preferred answer above the rejected .
PPO objective (InstructGPT) → PPO
Reward term, KL penalty against drifting from the SFT model (without it: reward hacking), pretraining mix .
⭐ RLHF objective → One objective
⭐ DPO loss → DPO
Implicit reward : no reward model, no sampling in an RL loop. Mock exam Q5.
Safe-completion reward → The reward, term by term
Helpfulness times safety: a violation zeroes the reward, and inside the policy more help is better.
⭐ Steering vector (CAA) → CAA
Mean activation difference at layer between positive and negative completions.
Activation edit → Add the vector back
amplifies the behavior, suppresses it.
RepE control → RepE pipeline
Edit either the weights or the activations.
Automating AI R&D (Lecture 12)
Performance gap recovered → Weak-to-strong
0 = no better than the weak teacher, 1 = as good as the strong model trained on ground truth.
Forecasting AI Progress (Lecture 13)
⭐ Brier score and Murphy’s decomposition → Proper scoring rules
Small reliability term = calibrated; large resolution = sharp. A strictly proper rule (Brier, log score ) is optimized only by reporting your true belief.
Scaling law (power law) → Scaling laws
A straight line on a log-log plot: every 10× compute buys a fixed fraction off the loss.
Effective compute → Algorithmic progress
⭐ Amdahl’s law → Amdahl’s law
With a serial fraction that can’t be sped up, automating 90% of research gives at most 10×.
Numbers Worth Knowing
Exact numbers are rarely needed in the exam. These few carry an argument, and they come up in several lectures.
| Number | Meaning | Where |
|---|---|---|
| , ~16 bytes per parameter with Adam | training FLOPs and training memory | Training Compute |
| 10 examples, about $0.20 | adversarial fine-tuning that jailbreaks GPT-3.5 Turbo | L4 |
| 100× to 1000× fewer parameters | trainable parameters with LoRA | LoRA |
| alignment < 30 and coherence > 50 | a response counts as emergently misaligned | Mini-Project 2 |
| Binoculars threshold for “machine” | L5 | |
| ~2 bits per parameter | the most factual knowledge a language model can store | Memorization |
| ~250 documents | poison samples that suffice regardless of model size | L6 |
| ~2% of outputs | human audit budget in AI control | L12 |
| 94% useful, 92% safe | trusted editing (vs. 15% safe for upfront auditing) | L12 |
| 26% / ~34% undetected | sabotage in BashArena / LinuxArena | AI Control |
| AUC 0.51 to 0.63 | monitors on sabotage embedded in post-training: near chance | L12 |
| 12% / ~50% | sabotage of safety code / alignment faking after learning to reward hack | L12 |
| 4-5× per year, ~3× per year | growth of frontier training compute, algorithmic efficiency | L13 |
| ~2 × 10²⁹ FLOP | a training run that looks feasible by 2030 | L13 |
| doubling every ~7 months, ~4 since 2023 | METR time horizon (50% success) | L13 |