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.

NumberMeaningWhere
, ~16 bytes per parameter with Adamtraining FLOPs and training memoryTraining Compute
10 examples, about $0.20adversarial fine-tuning that jailbreaks GPT-3.5 TurboL4
100× to 1000× fewer parameterstrainable parameters with LoRALoRA
alignment < 30 and coherence > 50a response counts as emergently misalignedMini-Project 2
Binoculars threshold for “machine”L5
~2 bits per parameterthe most factual knowledge a language model can storeMemorization
~250 documentspoison samples that suffice regardless of model sizeL6
~2% of outputshuman audit budget in AI controlL12
94% useful, 92% safetrusted editing (vs. 15% safe for upfront auditing)L12
26% / ~34% undetectedsabotage in BashArena / LinuxArenaAI Control
AUC 0.51 to 0.63monitors on sabotage embedded in post-training: near chanceL12
12% / ~50%sabotage of safety code / alignment faking after learning to reward hackL12
4-5× per year, ~3× per yeargrowth of frontier training compute, algorithmic efficiencyL13
~2 × 10²⁹ FLOPa training run that looks feasible by 2030L13
doubling every ~7 months, ~4 since 2023METR time horizon (50% success)L13