Glossary¶
523 terms from across the whole of AI, each defined in one or two sentences and linked to the page on this site that teaches it properly. Use it to decode a paper, to check you can define a word before you use it, and as a self-test: cover the definition and say it aloud.
10,000 ft
AI's vocabulary is large because the field is a merger of several older ones: statistics gave it likelihood, bias and variance; optimisation gave it gradient descent and convexity; control and psychology gave reinforcement learning its policies, values and rewards; information theory gave it entropy and cross-entropy; and since 2017 the transformer era has added a dense layer of its own (KV cache, RoPE, GRPO, MCP). Many words mean different things in different sub-fields (a kernel is a similarity function in SVMs, a sliding filter in CNNs and a GPU function in CUDA; bias is a parameter, a statistical error and a fairness problem). Each entry here gives the meaning used on this site and points to where it is derived. For symbols and equations, use the formula sheet.
How to use the glossary¶
- Entries are alphabetical. Jump with the letter bar or your browser's find (Ctrl/Cmd+F).
- The arrow after each definition links the page that teaches the term; definitions here are deliberately short, so follow the link for the derivation, the code and the pitfalls.
- Where a word has several meanings, the entry name says which one, e.g. Kernel (GPU) vs Kernel, Agent (RL) vs Agent.
- Abbreviations (LLM, SGD, RLHF and others) also show a definition when you hover over them anywhere on the site.
Use it as a flashcard deck
Pick one track's terms (the table below links each track), cover the definitions and explain each term out loud in two sentences, including one equation or number where there is one. Any you cannot explain go into your spaced-repetition deck along with the linked page's "Check yourself" questions. See how to study.
Terms by track¶
| Track | Terms | Start at |
|---|---|---|
| Mathematical foundations | 65 | Why the maths matters |
| Classical machine learning | 55 | What it means to learn from data |
| Deep learning | 66 | Deep learning at 2,000 ft |
| Transformers and LLMs | 70 | Large language models at 2,000 ft |
| Post-training and alignment | 32 | Post-training at 2,000 ft |
| Reinforcement learning | 44 | Reinforcement learning at 2,000 ft |
| Generative models and multimodal | 36 | Generative modelling at 2,000 ft |
| AI systems and infrastructure | 41 | AI systems at 2,000 ft |
| LLM application engineering | 48 | LLM engineering at 2,000 ft |
| Evaluation, safety and interpretability | 35 | Safety and evaluation at 2,000 ft |
| Data for AI | 13 | Data at 2,000 ft |
| The story of AI | 11 | Three booms at 10,000 ft |
| The research frontier | 7 | Keeping up with the frontier |
Jump to: A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Z
A¶
- Accuracy
- The fraction of predictions that are correct; misleading on imbalanced classes. → Metrics, validation and leakage
- Action-value function (Q-function)
- The expected return from taking action \(a\) in state \(s\) and following the policy thereafter, \(Q^\pi(s,a)\). → Q-learning and DQN
- Activation checkpointing
- Discarding activations in the forward pass and recomputing them in the backward pass to save memory. → Distributed training: DDP, FSDP/ZeRO, tensor and pipeline parallel
- Activation function
- The non-linearity applied after a linear layer; without it a deep network collapses to a single linear map. → Activation functions
- Activation patching
- Replacing activations from one input with those from another to find which components cause a behaviour. → Mechanistic interpretability: circuits, features, SAEs
- Active learning
- Choosing which examples to label next based on where the model is most uncertain or would learn most. → Labelling and human feedback
- Actor-critic
- A policy (actor) updated with advantages estimated by a learned value function (critic). → Actor-critic and PPO
- Adam
- An optimiser that divides a momentum estimate of the gradient by a running estimate of its root-mean-square, giving each parameter its own step size. → Optimisers: SGD, momentum, Adam, AdamW and schedules
- AdamW
- Adam with weight decay applied directly to the weights rather than through the gradient; the default optimiser for transformers. → Optimisers: SGD, momentum, Adam, AdamW and schedules
- Adapter
- A small trainable module inserted into a frozen network. → Parameter-efficient fine-tuning: LoRA and QLoRA
- Advantage
- How much better an action is than average in its state, \(A(s,a) = Q(s,a) - V(s)\). → Actor-critic and PPO
- Adversarial example
- An input with a small, deliberately chosen perturbation that changes a model's prediction. → Robustness, fairness and privacy
- Agent
- A system in which a model runs in a loop, choosing tools, observing results and deciding what to do next, to complete a goal. → Agents and tool use
- Agent loop
- The cycle of model call → tool call → observation → model call that runs until a stop condition. → Agents and tool use
- Agent (RL)
- The learner and decision-maker that observes states, takes actions and receives rewards. → Reinforcement learning at 2,000 ft
- AI winter
- A period of reduced funding and interest after over-promising, notably in the 1970s and late 1980s. → Before the boom: 1943–2005
- AlexNet
- The 2012 GPU-trained CNN by Krizhevsky, Sutskever and Hinton that cut ImageNet top-5 error from about 26% to about 15%. → The deep learning reset: 2006–2016
- ALiBi
- Attention with linear biases: adding a head-specific penalty proportional to distance to attention scores, with no position embeddings. → Positional encoding: sinusoidal, RoPE, ALiBi
- Alignment
- Making an AI system pursue the goals its designers and users actually intend. → The alignment problem
- All-reduce
- A collective operation that sums (or averages) tensors across devices and gives every device the result. → Distributed training: DDP, FSDP/ZeRO, tensor and pipeline parallel
- AlphaFold
- DeepMind's protein-structure prediction system; AlphaFold 2 (2020) reached experimental accuracy on many proteins. → AI for science
- AlphaZero
- DeepMind's 2017 system that learned Go, chess and shogi from self-play alone, combining MCTS with a policy-value network. → Model-based RL and planning: AlphaZero, MuZero
- Annotation guidelines
- The written rules annotators follow; their clarity largely determines label quality. → Labelling and human feedback
- Approximate nearest neighbour (ANN)
- Search that finds most of the closest vectors much faster than exact search, trading a little recall. → Embeddings and vector search
- Arithmetic intensity
- FLOPs performed per byte moved from memory; it decides whether a computation is limited by compute or bandwidth. → How a GPU works: SMs, tensor cores, memory, roofline
- Artificial general intelligence (AGI)
- A loosely defined goal of AI that matches or exceeds humans across most cognitive tasks; definitions vary by who is using the term. → The road ahead
- Attention
- A mechanism in which each position builds its output as a weighted average of value vectors, with weights from query–key similarity: \(\operatorname{softmax}(QK^\top/\sqrt{d_k})V\). → Attention from first principles
- Attention head
- One of the parallel attention operations inside multi-head attention, with its own query, key and value projections. → Multi-head attention
- Autoencoder
- A network trained to reconstruct its input through a narrow bottleneck, learning a compressed code. → Autoencoders and VAEs
- Automatic differentiation (autodiff)
- Computing exact derivatives of a program by applying the chain rule to its elementary operations; reverse mode (backprop) is efficient for many inputs and one output. → Automatic differentiation and computation graphs
- Automatic speech recognition (ASR)
- Transcribing speech to text; Whisper is a widely used transformer ASR model. → Speech and audio: ASR and TTS
- Autoregressive model
- A model that generates a sequence one element at a time, each conditioned on everything before it. → The language-modelling objective
- AWQ
- Activation-aware weight quantisation: protecting the small fraction of weights that matter most for large activations by rescaling before rounding. → Quantisation: INT8, INT4, GPTQ, AWQ
B¶
- Backpropagation
- Computing the gradient of the loss with respect to every parameter by applying the chain rule backwards through the network, at about the cost of two forward passes. → Backpropagation from scratch
- Backpropagation through time (BPTT)
- Backpropagation applied to an RNN unrolled over the sequence. → RNNs, LSTMs and sequence-to-sequence
- Backward pass
- Propagating gradients from the loss back through the network to every parameter. → Backpropagation from scratch
- Bagging
- Bootstrap aggregating: training models on resampled data and averaging them to reduce variance. → Decision trees, random forests and boosting
- Base model
- A model after pre-training only: a strong next-token predictor that continues text rather than following instructions. → Post-training at 2,000 ft
- Baseline
- A quantity subtracted from returns in the policy gradient to cut variance without adding bias, typically a value estimate. → Policy gradients and REINFORCE
- Batch normalisation
- Normalising each feature over the mini-batch, then rescaling with learned parameters; standard in CNNs. → Initialisation and normalisation
- Bayes' rule
- \(P(\theta\mid D) = P(D\mid\theta)P(\theta)/P(D)\): posterior equals likelihood times prior, normalised. The basis of Bayesian inference. → Probability from first principles
- Beam search
- Keeping the \(k\) most probable partial sequences at each step; good for translation, poor for open-ended text. → Decoding: greedy, beam, temperature, top-k, top-p
- Bellman equation
- The recursive identity \(V^\pi(s) = \mathbb{E}[r + \gamma V^\pi(s')]\) linking a state's value to its successors'; the optimality version takes a max over actions. → MDPs and the Bellman equations
- Benchmark
- A fixed task set and metric used to compare models; useful until it saturates, leaks into training data or is optimised against. → Benchmarks and their limits
- Bernoulli distribution
- The distribution of a single yes/no outcome with probability \(p\); logistic regression models labels as Bernoulli. → The distributions that run AI
- Best-of-N
- Sampling \(N\) answers and returning the one a verifier or reward model scores highest. → Reasoning models and test-time compute
- Beta distribution
- A distribution on \([0,1]\), the conjugate prior for a Bernoulli probability; Thompson sampling often uses it. → The distributions that run AI
- Bias–variance trade-off
- Expected test error splits into bias squared (systematic error), variance (sensitivity to the training sample) and noise; more capacity lowers bias and raises variance. → Bias, variance and regularisation
- Bits per byte
- Cross-entropy measured in bits and normalised by bytes of text, which makes models with different tokenisers comparable. → The language-modelling objective
- BM25
- A classic lexical ranking function based on term frequency, inverse document frequency and length normalisation. → Advanced RAG: hybrid search, reranking, graphs
- Bootstrap
- Estimating the uncertainty of a statistic by recomputing it on many resamples drawn with replacement from the data. → Statistics for experiments and evals
- Bootstrapping (RL)
- Updating an estimate from other estimates rather than complete returns. → Monte Carlo and temporal-difference learning
- Bradley–Terry model
- The pairwise preference model \(P(y_w \succ y_l) = \sigma(r(y_w) - r(y_l))\) that reward models and DPO are built on. → Reward models and preference data
- Broadcasting
- The rule that stretches size-1 dimensions so arrays of different shapes can be combined element-wise without copying data. → Tensors, shapes and broadcasting
- Byte-pair encoding (BPE)
- Building a vocabulary by repeatedly merging the most frequent adjacent pair of symbols; byte-level BPE starts from the 256 bytes, so any text is encodable. → Tokenisation and BPE
C¶
- Calibration
- Whether predicted probabilities match observed frequencies: of events given 70%, about 70% should happen. → Metrics, validation and leakage
- Canary string
- A unique random string embedded in benchmark files so their presence in training data can be detected. → Contamination and evaluation hygiene
- Catastrophic forgetting
- Losing earlier abilities when a network is trained on new data. → Model merging and continual learning
- Categorical distribution
- A distribution over \(K\) discrete outcomes with probabilities summing to one; a softmax output is a categorical distribution. → The distributions that run AI
- Causal mask
- Setting attention scores to \(-\infty\) for future positions so that each token attends only to itself and the past. → Attention from first principles
- Central limit theorem
- Sums of many independent random variables are approximately Gaussian, whatever their own distribution; why error bars on averages use the normal distribution. → The distributions that run AI
- Chain of thought (CoT)
- Intermediate reasoning steps written out before the final answer, which improve performance on multi-step problems. → Reasoning models and test-time compute
- Chain rule
- The derivative of a composition is the product of derivatives, \((f\circ g)' = (f'\circ g)\,g'\); backpropagation is the chain rule applied efficiently. → The multivariable chain rule and Jacobians
- Chat template
- The fixed format, with special tokens, that marks system, user and assistant turns in a conversation. → Instruction tuning (SFT)
- Chinchilla scaling
- The 2022 finding that compute-optimal training uses roughly 20 tokens per parameter, so earlier models were under-trained. → Scaling laws: Kaplan to Chinchilla and beyond
- Chunking
- Splitting documents into passages for indexing; chunk size and overlap strongly affect retrieval quality. → Retrieval-augmented generation
- Circuit
- A subgraph of a network's components that implements an identifiable behaviour. → Mechanistic interpretability: circuits, features, SAEs
- Classifier-free guidance
- Combining conditional and unconditional predictions, \(\hat\epsilon = \epsilon_\emptyset + w(\epsilon_c - \epsilon_\emptyset)\), to make samples follow the prompt more strongly. → Latent diffusion and guidance
- CLIP
- Contrastive language–image pre-training: image and text encoders trained so matching pairs have similar embeddings, enabling zero-shot classification. → Vision transformers and CLIP
- Common Crawl
- A public, petabyte-scale archive of web crawls that is the raw material for most pre-training corpora. → Pre-training data
- Compaction
- Summarising older parts of a long conversation or agent trace to free context space. → Context engineering and memory
- Computation graph
- A directed acyclic graph of operations recorded during the forward pass and traversed in reverse for gradients. → Automatic differentiation and computation graphs
- Compute-optimal
- The split of a fixed compute budget between model size and data that minimises loss. → Scaling laws: Kaplan to Chinchilla and beyond
- Computer-use agent
- An agent that operates a computer through screenshots, mouse and keyboard rather than APIs. → Computer-use and long-horizon agents
- Concept drift
- Change over time in the relationship between inputs and the correct output. → Data in production: drift, monitoring, feedback loops
- Conditional probability
- The probability of \(A\) given that \(B\) happened, \(P(A\mid B) = P(A,B)/P(B)\); language models output conditional distributions over the next token. → Probability from first principles
- Confidence interval
- A range computed from data that would contain the true value in a stated fraction of repeated experiments; every eval score needs one. → Statistics for experiments and evals
- Confusion matrix
- A table of predicted against true classes, from which precision, recall and accuracy are read. → Metrics, validation and leakage
- Conjugate prior
- A prior that yields a posterior in the same family, such as Beta for Bernoulli, making Bayesian updates closed-form. → Estimation: MLE, MAP and Bayes
- Connectionism
- The view that intelligence emerges from networks of simple units with learned connection strengths; the lineage of neural networks. → Before the boom: 1943–2005
- Constitutional AI
- Anthropic's method of training a harmless assistant using a written set of principles: the model critiques and revises its own outputs, and AI preference labels replace most human ones. → Constitutional AI and RLAIF
- Constrained decoding
- Masking invalid tokens at each step so that output is guaranteed to match a grammar or JSON schema. → Structured outputs and function calling
- Context engineering
- Deciding what goes into a model's limited context at each step (instructions, retrieved facts, history, tool results) and in what form. → Context engineering and memory
- Context rot
- The decline in a model's use of information as its context grows long and cluttered. → Context engineering and memory
- Context window
- The maximum number of tokens a model can attend to at once. → Long context
- Continual learning
- Learning from a stream of tasks or data over time without forgetting earlier ones. → Model merging and continual learning
- Continuous batching
- Adding and removing requests from a running batch at every generation step instead of waiting for the whole batch to finish. → Serving LLMs: batching, PagedAttention, speculative decoding
- Contrastive learning
- Learning representations by pulling matching pairs together and pushing non-matching pairs apart, e.g. with the InfoNCE loss. → Embeddings and representation learning
- Convex function
- A function whose graph lies below every chord; any local minimum is global, so gradient descent provably finds it. → Optimisation: convex and not
- Convolution
- Sliding a small learned kernel across an input and taking dot products at each position, which shares weights and preserves spatial structure. → Convolutional networks
- Convolutional neural network (CNN)
- A network built from convolutional and pooling layers, exploiting locality and translation equivariance; the backbone of vision before ViTs. → Convolutional networks
- Cosine similarity
- The dot product of two vectors divided by the product of their norms, so it depends only on the angle between them; the standard similarity for embeddings. → Vectors, dot products and the geometry of meaning
- Covariance matrix
- The matrix of pairwise covariances of a random vector; its eigenvectors are the principal components. → The distributions that run AI
- Cross-attention
- Attention in which queries come from one sequence and keys and values from another, as in an encoder–decoder or a text-to-image model. → Attention from first principles
- Cross-entropy
- \(H(p,q) = -\sum_x p(x)\log q(x)\), the average code length when data from \(p\) is encoded with a code built for \(q\); the standard classification and language-modelling loss. → Entropy, cross-entropy and KL divergence
- Cross-validation
- Splitting data into \(k\) folds and training \(k\) times, each time validating on a different fold, to estimate performance with less variance. → Metrics, validation and leakage
- CUDA
- NVIDIA's programming model and toolkit for writing GPU kernels as grids of thread blocks. → Kernels: CUDA and Triton
- Curse of dimensionality
- In high dimensions, volume concentrates at the edges and distances become similar, so neighbourhood methods need exponentially more data. → Embeddings and vector search
D¶
- Dangerous-capability evaluation
- Testing whether a model can meaningfully assist with severe harms such as bioweapons or cyberattacks. → Red-teaming and dangerous-capability evals
- Data augmentation
- Training on label-preserving transformations of examples (crops, flips, noise) to teach invariances and reduce overfitting. → Regularisation: dropout, weight decay, augmentation
- Data contamination
- Test items (or close paraphrases) appearing in a model's training data, inflating its scores. → Contamination and evaluation hygiene
- Data curation
- Selecting, cleaning, licensing and documenting data so that it fits the model's purpose. → Collection, licensing and curation
- Data drift
- Change over time in the distribution of a model's inputs in production. → Data in production: drift, monitoring, feedback loops
- Data leakage
- Information from the test set or the future reaching training, which inflates scores that then collapse in production. → Metrics, validation and leakage
- Data licensing
- The legal terms (copyright, terms of service, licences) governing whether data may be used for training. → Collection, licensing and curation
- Data mixture
- The proportions of web, code, books, maths and other sources in a pre-training corpus; a major lever on model ability. → Pre-training data
- Data parallelism (DDP)
- Replicating the model on every device, splitting the batch, and averaging gradients with all-reduce. → Distributed training: DDP, FSDP/ZeRO, tensor and pipeline parallel
- Datasheet / data card
- Structured documentation of a dataset's origin, composition, intended uses and limitations. → Collection, licensing and curation
- DDIM
- A deterministic, non-Markovian sampler for diffusion models that needs far fewer steps than DDPM. → Diffusion models
- DDPM
- Denoising diffusion probabilistic models (2020): diffusion trained by predicting the added noise with a simple MSE loss. → Diffusion models
- Deceptive alignment / scheming
- A model behaving well during training or evaluation while pursuing different goals when it can. → The alignment problem
- Decision boundary
- The surface in input space where a classifier switches its predicted class; linear for logistic regression. → Logistic regression and classification
- Decision tree
- A model that predicts by asking a sequence of threshold questions on features, chosen greedily to reduce impurity. → Decision trees, random forests and boosting
- Decoder-only model
- A transformer with causal attention trained to predict the next token, such as GPT and Llama; the standard LLM architecture. → The transformer block
- Deduplication
- Removing exact and near-duplicate documents, which improves training efficiency and reduces memorisation. → Quality filtering and deduplication
- Deep Q-network (DQN)
- Q-learning with a neural network, stabilised by experience replay and a target network; learned Atari games from pixels in 2013–2015. → Q-learning and DQN
- Demographic parity
- The fairness criterion that positive-prediction rates are equal across groups. → Robustness, fairness and privacy
- Derivative
- The instantaneous rate of change of a function, \(f'(x) = \lim_{h\to 0}(f(x+h)-f(x))/h\); the slope of the best linear approximation at a point. → Derivatives and gradients
- Determinant
- The signed factor by which a square matrix scales volume; zero exactly when the matrix squashes space into a lower dimension and is not invertible. → Matrices as linear maps
- Differential privacy
- A guarantee that an algorithm's output changes little whether or not any one person's data is included, controlled by a budget \(\varepsilon\). → Robustness, fairness and privacy
- Diffusion model
- A generative model trained to reverse a gradual noising process: it learns to denoise, then generates by starting from pure noise and denoising step by step. → Diffusion models
- Diffusion transformer (DiT)
- A transformer used as the denoiser in a diffusion model on patches of the latent. → Latent diffusion and guidance
- Direct preference optimisation (DPO)
- Optimising a policy directly on preference pairs with a classification-style loss derived from the RLHF objective, with no separate reward model or RL loop. → DPO and direct preference optimisation
- Discount factor
- The factor \(\gamma \in [0,1)\) that weights a reward \(k\) steps ahead by \(\gamma^k\); it sets the effective horizon \(1/(1-\gamma)\). → MDPs and the Bellman equations
- Distribution shift
- A difference between the data a model was trained on and the data it meets in use. → Robustness, fairness and privacy
- Dot product
- The sum of element-wise products, \(\mathbf{a}^\top\mathbf{b} = \lVert\mathbf{a}\rVert\lVert\mathbf{b}\rVert\cos\theta\); it measures alignment and is the core operation of attention and linear layers. → Vectors, dot products and the geometry of meaning
- Double descent
- Test error that falls, rises near the interpolation threshold and falls again as model size grows past it. → Learning theory: PAC, VC and double descent
- Dropout
- Randomly zeroing activations during training so the network cannot rely on any single unit; an implicit ensemble. → Regularisation: dropout, weight decay, augmentation
- Dynamic programming
- Solving a problem by combining solutions to overlapping subproblems; in RL, computing values exactly from a known model. → Dynamic programming
E¶
- Early stopping
- Ending training when validation loss stops improving; a cheap regulariser. → Regularisation: dropout, weight decay, augmentation
- ε-greedy
- Choosing a random action with probability \(\varepsilon\) and the greedy action otherwise. → Bandits and exploration
- Eigenvalue
- The factor \(\lambda\) by which a matrix stretches its eigenvector; eigenvalues of a Hessian describe the curvature of a loss surface. → Eigenvectors, SVD and PCA
- Eigenvector
- A non-zero vector whose direction a matrix leaves unchanged, \(A\mathbf{v} = \lambda\mathbf{v}\); the scale factor \(\lambda\) is its eigenvalue. → Eigenvectors, SVD and PCA
- Einsum
- Einstein-summation notation for tensor contractions, e.g.
einsum('bij,bjk->bik')for batched matrix multiplication. → Tensors, shapes and broadcasting - Elo rating (arena)
- A rating fitted from pairwise human preference votes between anonymous models, as on LMArena. → Benchmarks and their limits
- Embedding
- A learned dense vector representing a discrete item (word, token, user) such that similar items have nearby vectors. → Embeddings and representation learning
- Embedding model
- A model that maps text (or images) to a fixed-length vector so that semantic similarity becomes geometric closeness. → Embeddings and vector search
- Emergent abilities
- Capabilities that appear abruptly at some scale; partly an artefact of discontinuous metrics. → Scaling laws: Kaplan to Chinchilla and beyond
- Encoder-only model
- A transformer with bidirectional attention trained to fill masked tokens, such as BERT; used for classification and embeddings. → The transformer block
- Entropy
- The expected surprise of a distribution, \(H(p) = -\sum_x p(x)\log p(x)\); the minimum average bits needed to encode its samples. → Entropy, cross-entropy and KL divergence
- Environment
- Everything outside the agent: it receives actions and returns observations and rewards. → Reinforcement learning at 2,000 ft
- Epoch
- One full pass over the training data. → A recipe for training (and debugging) networks
- Equalised odds
- The fairness criterion that true- and false-positive rates are equal across groups. → Robustness, fairness and privacy
- Error analysis
- Reading many failures and grouping them into categories before deciding what to fix or measure. → Evals in practice: golden sets and LLM judges
- EU AI Act
- The European Union's risk-based AI regulation, with obligations scaled to the risk category and special duties for general-purpose models. → Governance and regulation: EU, US, India, finance
- Evidence lower bound (ELBO)
- The bound \(\log p(\mathbf{x}) \ge \mathbb{E}_q[\log p(\mathbf{x}\mid\mathbf{z})] - D_{\mathrm{KL}}(q(\mathbf{z}\mid\mathbf{x})\Vert p(\mathbf{z}))\): reconstruction minus a KL to the prior. → Autoencoders and VAEs
- Expectation
- The probability-weighted average of a random variable, \(\mathbb{E}[X] = \sum_x x\,p(x)\); losses are expectations over the data distribution. → Probability from first principles
- Expectation–maximisation (EM)
- An algorithm for latent-variable models that alternates computing posterior responsibilities (E-step) and maximising parameters given them (M-step). → Clustering, mixtures and EM
- Experience replay
- Storing transitions in a buffer and training on random samples from it, breaking temporal correlations. → Q-learning and DQN
- Experiment tracking
- Recording each run's code, data, hyperparameters and metrics so results can be compared and reproduced. → MLOps: experiments, pipelines, monitoring
- Expert capacity
- The maximum number of tokens an expert processes per batch; overflow tokens are dropped or rerouted. → Mixture of experts
- Expert system
- A rule-based program encoding a specialist's knowledge as if–then rules; the commercial AI of the 1980s. → Before the boom: 1943–2005
- Exploding gradient
- Gradients growing exponentially through many layers, producing huge updates; gradient clipping and good initialisation prevent it. → Initialisation and normalisation
- Exploration vs exploitation
- The trade-off between trying actions to learn about them and choosing the action currently believed best. → Bandits and exploration
F¶
- F1 score
- The harmonic mean of precision and recall, \(2PR/(P+R)\). → Metrics, validation and leakage
- Feature
- A measurable input variable to a model; in deep learning, also an internal direction a network has learned to represent. → Features and tabular data
- Feature (interpretability)
- A direction in activation space that corresponds to a human-interpretable property of the input. → Mechanistic interpretability: circuits, features, SAEs
- Feedback loop
- A model's predictions shaping the data it is later trained or evaluated on. → Data in production: drift, monitoring, feedback loops
- Feed-forward network (FFN)
- The position-wise two-layer MLP in each transformer block, typically 4× wider than the model dimension (about 8/3× with SwiGLU); it holds about two-thirds of the block's parameters. → The transformer block
- Few-shot prompting
- Putting a handful of worked input–output examples in the prompt to show the model the task. → Prompt engineering
- Fine-tuning vs prompting
- The decision between changing a model's weights and changing its inputs; prompting and RAG first, fine-tuning when behaviour must be consistent at scale. → Shipping AI products: latency, cost, routing, UX
- FlashAttention
- An exact attention algorithm that tiles the computation to stay in fast on-chip memory and never materialises the full attention matrix. → KV cache, FlashAttention, MQA/GQA/MLA
- Floating point
- A number format storing sign, exponent and mantissa, giving wide range but limited precision; FP32, BF16 and FP8 trade precision for speed. → Floating point, stability and log-sum-exp
- FLOPs
- Floating-point operations; training a dense transformer costs about \(6ND\) FLOPs for \(N\) parameters and \(D\) tokens. → Compute maths: FLOPs, memory and cost
- Flow matching
- Training a velocity field that transports noise to data along chosen paths (often straight lines) by regressing on the path's velocity; generation integrates an ODE. → Score matching and flow matching
- Forward (noising) process
- The fixed process \(q(\mathbf{x}_t\mid\mathbf{x}_0) = \mathcal{N}(\sqrt{\bar\alpha_t}\,\mathbf{x}_0, (1-\bar\alpha_t)I)\) that gradually turns data into Gaussian noise. → Diffusion models
- Forward pass
- Running inputs through the network to compute activations and the loss. → Backpropagation from scratch
- Forward-mode differentiation
- Autodiff that propagates tangents alongside values from inputs to outputs; efficient when there are few inputs. → Automatic differentiation and computation graphs
- Foundation model
- A large model pre-trained on broad data that can be adapted to many downstream tasks. → The transformer and the scale era: 2017–2022
- FP32, FP16, BF16
- 32- and 16-bit floating-point formats; BF16 keeps FP32's 8-bit exponent (range) with a 7-bit mantissa, so it rarely overflows. → Mixed precision: FP32, BF16, FP8
- FP8
- 8-bit floating point (E4M3 and E5M2 variants) supported by recent tensor cores for training and inference. → Mixed precision: FP32, BF16, FP8
- FSDP / ZeRO
- Sharding parameters, gradients and optimiser states across data-parallel workers and gathering them only when needed. → Distributed training: DDP, FSDP/ZeRO, tensor and pipeline parallel
- Function calling (tool use)
- A model emitting a structured request to call a named function with arguments, which the application executes and returns. → Structured outputs and function calling
G¶
- Gaussian mixture model (GMM)
- A density modelled as a weighted sum of Gaussians, fitted with EM; a soft version of k-means. → Clustering, mixtures and EM
- Gaussian (normal) distribution
- The bell-shaped distribution \(\mathcal{N}(\mu,\sigma^2)\) fixed by its mean and variance; it is the maximum-entropy distribution for a given variance. → The distributions that run AI
- GELU
- The Gaussian error linear unit \(x\,\Phi(x)\), a smooth ReLU used in BERT and GPT models. → Activation functions
- Generalisation gap
- The difference between a model's error on new data and on its training data. → Learning theory: PAC, VC and double descent
- Generalised advantage estimation (GAE)
- An exponentially weighted average of multi-step TD errors that trades bias against variance with a parameter \(\lambda\). → Actor-critic and PPO
- Generative adversarial network (GAN)
- A generator and a discriminator trained against each other: the generator tries to make samples the discriminator cannot tell from real data. → Generative adversarial networks
- Generative model
- A model of the data distribution \(p(\mathbf{x})\) (or \(p(\mathbf{x}\mid c)\)) from which new samples can be drawn. → Generative modelling at 2,000 ft
- GGUF
- The single-file model format used by llama.cpp, holding quantised weights and metadata. → On-device AI: MLX, llama.cpp, GGUF
- Gini impurity
- A node-purity measure \(1 - \sum_k p_k^2\) used to choose tree splits. → Decision trees, random forests and boosting
- Golden set
- A curated set of inputs with expected outputs or grading criteria used to evaluate a system repeatedly. → Evals in practice: golden sets and LLM judges
- Goodhart's law
- When a measure becomes a target, it ceases to be a good measure. → Benchmarks and their limits
- GPTQ
- A one-shot weight-quantisation method that uses approximate second-order information to compensate rounding error column by column. → Quantisation: INT8, INT4, GPTQ, AWQ
- GPU
- A processor with thousands of simple cores and very high memory bandwidth, built for parallel arithmetic; the workhorse of deep learning. → How a GPU works: SMs, tensor cores, memory, roofline
- Gradient
- The vector of partial derivatives \(\nabla f\); it points in the direction of steepest increase, so stepping against it decreases the loss. → Derivatives and gradients
- Gradient boosting
- Building an ensemble by adding trees one at a time, each fitted to the negative gradient (residuals) of the current ensemble's loss; XGBoost and LightGBM implement it. → Decision trees, random forests and boosting
- Gradient clipping
- Rescaling the gradient when its norm exceeds a threshold, preventing a single bad batch from wrecking training. → A recipe for training (and debugging) networks
- Gradient descent
- Repeatedly updating \(\theta \leftarrow \theta - \eta\nabla L(\theta)\); the basic optimisation algorithm of machine learning. → Optimisation: convex and not
- Graphical model
- A graph whose nodes are random variables and whose edges encode conditional dependencies, factorising a joint distribution. → Probabilistic graphical models
- GraphRAG
- RAG over a knowledge graph or community summaries extracted from the corpus, for questions that need global structure. → Advanced RAG: hybrid search, reranking, graphs
- Greedy decoding
- Always choosing the most probable next token; deterministic but prone to repetition. → Decoding: greedy, beam, temperature, top-k, top-p
- Grounding
- Tying a model's answer to cited source material. → Retrieval-augmented generation
- Grouped-query attention (GQA)
- Query heads are split into groups that share key–value heads; a middle ground between multi-head and multi-query attention. → KV cache, FlashAttention, MQA/GQA/MLA
- GRPO
- Group relative policy optimisation: PPO without a value network, where each sample's advantage is its reward standardised against a group of samples for the same prompt. → RL with verifiable rewards: GRPO and reasoning
- GRU
- Gated recurrent unit: a simpler gated RNN cell with update and reset gates. → RNNs, LSTMs and sequence-to-sequence
- Guardrail
- A check outside the model (input or output filter, policy model, schema validation, permission limit) that constrains what the system does. → Guardrails, prompt injection and security
H¶
- Hallucination
- A fluent, confident output that is false or unsupported by the source. → Retrieval-augmented generation
- HBM (high-bandwidth memory)
- Stacked DRAM next to the GPU die offering terabytes per second of bandwidth; its capacity and speed often limit LLMs more than FLOPs. → How a GPU works: SMs, tensor cores, memory, roofline
- He (Kaiming) initialisation
- Drawing weights with variance \(2/n_{\text{in}}\), which compensates for ReLU zeroing half its inputs. → Initialisation and normalisation
- Held-out set
- Evaluation data kept private and never published, to resist contamination. → Contamination and evaluation hygiene
- Hessian
- The matrix of second partial derivatives of a scalar function; it describes curvature and is used by Newton-type optimisers. → The multivariable chain rule and Jacobians
- Hidden layer
- Any layer between input and output whose activations are not directly supervised. → Neurons, perceptrons and MLPs
- Hidden Markov model (HMM)
- A sequence model with a hidden Markov chain of states, each emitting an observation; decoded with the Viterbi algorithm. → Probabilistic graphical models
- Hinge loss
- The loss \(\max(0, 1 - y f(\mathbf{x}))\) used by SVMs, zero for points correctly classified beyond the margin. → Kernels and support vector machines
- HNSW
- Hierarchical navigable small world: a layered proximity graph, the most common ANN index. → Embeddings and vector search
- Hybrid search
- Combining lexical (BM25) and dense (embedding) retrieval, often with reciprocal rank fusion. → Advanced RAG: hybrid search, reranking, graphs
- Hyperparameter
- A setting chosen before training rather than learned, such as learning rate, batch size or depth. → A recipe for training (and debugging) networks
I¶
- ImageNet
- The 14-million-image labelled dataset whose 2012 challenge, won by AlexNet, started the deep-learning boom. → The deep learning reset: 2006–2016
- Imitation learning
- Learning a policy from demonstrations; behaviour cloning is supervised learning on state–action pairs. → Embodied AI and robotics
- Implicit reward
- In DPO, the quantity \(\beta\log\frac{\pi_\theta(y\mid x)}{\pi_{\text{ref}}(y\mid x)}\), which plays the role of the reward. → DPO and direct preference optimisation
- In-context learning
- A model performing a new task from instructions or examples in its prompt, without any weight update. → The language-modelling objective
- Independence
- Two events are independent when \(P(A,B) = P(A)P(B)\); the i.i.d. assumption (independent and identically distributed data) underlies most learning theory. → Probability from first principles
- Induction head
- A two-head circuit that finds an earlier occurrence of the current token and copies what followed it; a mechanism behind in-context learning. → Multi-head attention
- Instruction tuning
- SFT on many tasks phrased as natural-language instructions, which teaches a model to follow instructions it has not seen. → Instruction tuning (SFT)
- Instrumental convergence
- The argument that many final goals share sub-goals such as acquiring resources and avoiding shutdown. → The alignment problem
- Inter-annotator agreement
- How often independent annotators agree, measured by statistics such as Cohen's kappa; it caps achievable model accuracy. → Labelling and human feedback
- Inverse matrix
- The matrix \(A^{-1}\) with \(A^{-1}A = I\), undoing the map; it exists only for square matrices with non-zero determinant. → Matrices as linear maps
- IPO, KTO, ORPO, SimPO
- Variants of direct preference optimisation that change the loss shape, the data needed (KTO uses single thumbs-up/down labels) or drop the reference model. → DPO and direct preference optimisation
J¶
- Jacobian
- The matrix of all first partial derivatives of a vector-valued function; it is the best linear approximation of the function near a point. → The multivariable chain rule and Jacobians
- Jailbreak
- An input crafted to make a model ignore its safety training and produce disallowed content. → Guardrails, prompt injection and security
- JSON Schema
- A standard for describing the shape of JSON data; used to declare tool arguments and response formats. → Structured outputs and function calling
- JSON-RPC
- A lightweight remote-procedure-call protocol encoded in JSON; the message layer of MCP. → MCP and tool protocols
K¶
- Kernel
- A function \(k(\mathbf{x},\mathbf{x}')\) equal to an inner product in some feature space, letting linear methods work non-linearly without computing the features. → Kernels and support vector machines
- Kernel / filter
- The small weight tensor a convolution slides across its input. → Convolutional networks
- Kernel fusion
- Combining several operations into one kernel so intermediate results never leave on-chip memory. → Kernels: CUDA and Triton
- Kernel (GPU)
- A function that runs on the GPU in parallel across many threads. → Kernels: CUDA and Triton
- Kernel trick
- Replacing every inner product in an algorithm with a kernel evaluation, which implicitly works in a possibly infinite-dimensional feature space. → Kernels and support vector machines
- KL divergence
- \(D_{\mathrm{KL}}(p\Vert q) = \sum_x p(x)\log\frac{p(x)}{q(x)} \ge 0\), the extra cost of using \(q\) for data from \(p\); asymmetric, and used as a leash in RLHF. → Entropy, cross-entropy and KL divergence
- KL penalty
- A term \(-\beta\,D_{\mathrm{KL}}(\pi\Vert\pi_{\text{ref}})\) that keeps the policy close to its starting model during RL, limiting reward hacking. → RLHF with PPO
- k-means
- Clustering by alternately assigning points to the nearest of \(k\) centroids and moving each centroid to the mean of its points. → Clustering, mixtures and EM
- Knowledge distillation
- Training a smaller student model to match a larger teacher's outputs or output distributions. → Distillation and synthetic data
- KV cache
- Storing the keys and values of past tokens during generation so each new token costs one attention row, not a full recomputation. → KV cache, FlashAttention, MQA/GQA/MLA
L¶
- Label
- The target output attached to a training example in supervised learning. → What it means to learn from data
- Label smoothing
- Replacing one-hot targets with a mixture of the one-hot vector and a uniform distribution, discouraging over-confident predictions. → Regularisation: dropout, weight decay, augmentation
- Lagrange multiplier
- An auxiliary variable that turns a constrained optimisation into an unconstrained one; the basis of duality, SVMs and KKT conditions. → Optimisation: convex and not
- Langevin dynamics
- Sampling by taking gradient steps along the score plus Gaussian noise. → Score matching and flow matching
- Language model
- A probability distribution over sequences of tokens, usually factorised as a product of next-token conditionals. → The language-modelling objective
- Lasso (L1)
- Least squares plus a penalty \(\lambda\lVert\mathbf{w}\rVert_1\) that drives some weights exactly to zero, selecting features. → Bias, variance and regularisation
- Latency budget
- The total time a product can spend answering, split across retrieval, model calls and tools. → Shipping AI products: latency, cost, routing, UX
- Latent diffusion
- Running diffusion in the compressed latent space of an autoencoder rather than in pixel space; the design of Stable Diffusion. → Latent diffusion and guidance
- Latent variable
- An unobserved variable that explains observed data, such as a VAE's code \(\mathbf{z}\). → Autoencoders and VAEs
- Law of large numbers
- Sample averages converge to the expectation as the number of samples grows; why a mini-batch gradient estimates the full gradient. → Probability from first principles
- Layer normalisation
- Normalising each example's features to zero mean and unit variance, then rescaling; independent of batch size, so standard in transformers. → Initialisation and normalisation
- Learning rate
- The step size \(\eta\) of gradient descent; too large diverges, too small crawls. The single most important hyperparameter. → Optimisation: convex and not
- Learning-rate schedule
- How the learning rate changes over training, usually a linear warm-up followed by cosine or linear decay. → Optimisers: SGD, momentum, Adam, AdamW and schedules
- Least squares
- Fitting parameters by minimising the sum of squared residuals; equivalent to maximum likelihood under Gaussian noise. → Linear regression from scratch
- Lethal trifecta
- Simon Willison's name for the dangerous combination of private data access, exposure to untrusted content and a way to send data out. → Guardrails, prompt injection and security
- Likelihood
- The probability of the observed data viewed as a function of the parameters, \(L(\theta) = p(D\mid\theta)\). → Estimation: MLE, MAP and Bayes
- Linear attention
- Replacing softmax attention with a kernel feature map so it can be computed as a recurrence in linear time. → Beyond transformers: SSMs, Mamba, linear attention
- Linear map
- A function \(f\) with \(f(a\mathbf{x}+b\mathbf{y}) = af(\mathbf{x})+bf(\mathbf{y})\); every linear map between finite-dimensional spaces is a matrix. → Matrices as linear maps
- Linear regression
- Predicting a real number as a weighted sum of features, fitted by least squares; the closed-form solution is \(\hat{\mathbf{w}} = (X^\top X)^{-1}X^\top\mathbf{y}\). → Linear regression from scratch
- LLM-as-a-judge
- Using a model to grade another model's outputs against a rubric; cheap and scalable, but it needs calibrating against human labels. → Evals in practice: golden sets and LLM judges
- Load balancing loss
- An auxiliary loss that encourages a router to spread tokens evenly across experts. → Mixture of experts
- Logistic regression
- A linear model passed through a sigmoid to output the probability of a class, trained with cross-entropy; the simplest neural network. → Logistic regression and classification
- Logit
- An unnormalised score fed to a softmax or sigmoid; for a binary outcome it is the log-odds \(\log\frac{p}{1-p}\). → Entropy, cross-entropy and KL divergence
- Log-sum-exp trick
- Computing \(\log\sum_i e^{x_i}\) as \(m + \log\sum_i e^{x_i - m}\) with \(m = \max_i x_i\) so that exponentials never overflow; used in every stable softmax. → Floating point, stability and log-sum-exp
- Long context
- Extending the context window to hundreds of thousands or millions of tokens via positional-encoding scaling, efficient attention and training on long data. → Long context
- Long-term memory (agents)
- Information an agent stores outside its context (files, databases, vector stores) and retrieves when needed. → Context engineering and memory
- LoRA
- Low-rank adaptation: freezing the pre-trained weights and learning a low-rank update \(\Delta W = BA\) with rank \(r \ll d\), cutting trainable parameters by orders of magnitude. → Parameter-efficient fine-tuning: LoRA and QLoRA
- Loss curve
- Training and validation loss plotted against steps; its shape diagnoses learning-rate, data and overfitting problems. → A recipe for training (and debugging) networks
- Loss function
- A scalar measure of how wrong the model's predictions are; training minimises its average over the data. → Backpropagation from scratch
- Loss masking
- Excluding prompt tokens from the loss so that the model is trained only on producing responses. → Instruction tuning (SFT)
- Loss scaling
- Multiplying the loss by a constant before backprop so small FP16 gradients do not underflow, then dividing it out. → Mixed precision: FP32, BF16, FP8
- Lost in the middle
- The tendency of models to use information at the start and end of a long context better than information in the middle. → Long context
- LSTM
- Long short-term memory: an RNN cell with input, forget and output gates around an additive cell state, which lets gradients survive long sequences. → RNNs, LSTMs and sequence-to-sequence
M¶
- Machine epsilon
- The gap between 1 and the next representable number in a format, a measure of relative precision (\(2^{-23}\) for FP32's mantissa, about \(1.2\times10^{-7}\)). → Floating point, stability and log-sum-exp
- Mamba
- A selective state-space model whose recurrence parameters depend on the input, giving linear-time sequence modelling competitive with transformers. → Beyond transformers: SSMs, Mamba, linear attention
- Margin
- The distance from the decision boundary to the nearest training points; maximising it improves generalisation. → Kernels and support vector machines
- Markov chain Monte Carlo (MCMC)
- Sampling from a distribution by running a Markov chain whose stationary distribution is that distribution. → Probabilistic graphical models
- Markov decision process (MDP)
- The formal RL problem: states, actions, transition probabilities \(P(s'\mid s,a)\), rewards and a discount factor. → MDPs and the Bellman equations
- Markov property
- The future depends on the past only through the current state. → MDPs and the Bellman equations
- Masked language modelling
- The BERT objective of predicting randomly hidden tokens from context on both sides. → The language-modelling objective
- Matrix
- A rectangular array of numbers that represents a linear map: multiplying a vector by it rotates, scales, shears or projects that vector. → Matrices as linear maps
- Matrix multiplication
- Composition of linear maps; entry \((i,j)\) of \(AB\) is the dot product of row \(i\) of \(A\) with column \(j\) of \(B\). It is where almost all of a neural network's FLOPs go. → Matrices as linear maps
- Maximum a posteriori (MAP)
- Choosing the parameters with the highest posterior probability; with a Gaussian prior it is MLE plus L2 regularisation. → Estimation: MLE, MAP and Bayes
- Maximum likelihood estimation (MLE)
- Choosing parameters that make the observed data most probable; minimising cross-entropy loss is MLE. → Estimation: MLE, MAP and Bayes
- Mean squared error (MSE)
- The average squared difference between predictions and targets; the regression loss. → Linear regression from scratch
- Mechanistic interpretability
- Reverse-engineering the algorithms a network has learned, down to features and circuits. → Mechanistic interpretability: circuits, features, SAEs
- Mel spectrogram
- A time–frequency picture of audio on a perceptual (mel) frequency scale; the standard input to speech models. → Speech and audio: ASR and TTS
- Membership inference
- Determining whether a particular record was in a model's training data. → Robustness, fairness and privacy
- Memory-bound
- Limited by memory bandwidth rather than arithmetic; small-batch LLM decoding is memory-bound. → How a GPU works: SMs, tensor cores, memory, roofline
- MFU
- Model FLOPs utilisation: the fraction of hardware peak FLOP/s a training run actually achieves. → Compute maths: FLOPs, memory and cost
- MinHash
- A hashing scheme whose collision probability equals Jaccard similarity; with locality-sensitive hashing it finds near-duplicates at scale. → Quality filtering and deduplication
- Mini-batch
- The subset of examples whose average gradient drives one optimisation step. → Optimisers: SGD, momentum, Adam, AdamW and schedules
- Min-p sampling
- Keeping tokens whose probability is at least a fraction \(p\) of the top token's, so the cut-off adapts to the model's confidence. → Decoding: greedy, beam, temperature, top-k, top-p
- Mixed-precision training
- Doing most arithmetic in 16-bit (or 8-bit) while keeping master weights and sensitive reductions in FP32. → Mixed precision: FP32, BF16, FP8
- Mixture of experts (MoE)
- Replacing a dense feed-forward layer with many expert networks and a router that sends each token to a few of them, so parameters grow without growing compute per token. → Mixture of experts
- MLOps
- The practices and tools for versioning, training, deploying and monitoring ML models reliably in production. → MLOps: experiments, pipelines, monitoring
- MLX
- Apple's array framework for machine learning on Apple silicon's unified memory. → On-device AI: MLX, llama.cpp, GGUF
- MMLU
- Massive Multitask Language Understanding: 57 subjects of multiple-choice questions; saturated by frontier models. → Benchmarks and their limits
- Mode collapse
- A GAN failure in which the generator produces only a few kinds of output. → Generative adversarial networks
- Model collapse
- Degradation when models are trained recursively on their own outputs, which lose the tails of the original distribution. → Distillation and synthetic data
- Model Context Protocol (MCP)
- An open protocol for connecting models to tools, data sources and prompts through a standard client–server interface. → MCP and tool protocols
- Model merging
- Combining the weights of fine-tuned models (by averaging, task arithmetic, TIES or similar) into one model without further training. → Model merging and continual learning
- Model registry
- A versioned store of trained models with their metadata and deployment status. → MLOps: experiments, pipelines, monitoring
- Model routing
- Sending each request to the cheapest model likely to handle it, escalating hard cases to stronger models. → Shipping AI products: latency, cost, routing, UX
- Model-based RL
- RL that learns or is given a model of the environment's dynamics and plans with it. → Model-based RL and planning: AlphaZero, MuZero
- Momentum
- Accumulating an exponential moving average of gradients and stepping along it, which damps oscillation and speeds progress along consistent directions. → Optimisers: SGD, momentum, Adam, AdamW and schedules
- Monte Carlo methods (RL)
- Estimating values by averaging complete observed returns; unbiased but high-variance and episodic. → Monte Carlo and temporal-difference learning
- Monte Carlo tree search (MCTS)
- Planning by growing a search tree with simulated rollouts, balancing exploration and exploitation at each node; used by AlphaGo. → Model-based RL and planning: AlphaZero, MuZero
- Multi-agent system
- Several model-driven agents with distinct roles or contexts that cooperate on a task. → Multi-agent systems and orchestration
- Multi-armed bandit
- The simplest RL problem: repeatedly choosing among \(k\) actions with unknown reward distributions and no state. → Bandits and exploration
- Multi-head attention
- Running several attention operations in parallel on lower-dimensional projections and concatenating them, so different heads can track different relations. → Multi-head attention
- Multi-head latent attention (MLA)
- DeepSeek's scheme of caching a low-rank latent from which keys and values are reconstructed, cutting KV memory further. → KV cache, FlashAttention, MQA/GQA/MLA
- Multilayer perceptron (MLP)
- Stacked fully connected layers with non-linearities between them; with one wide hidden layer it can approximate any continuous function. → Neurons, perceptrons and MLPs
- Multi-query attention (MQA)
- All query heads share a single key and value head, shrinking the KV cache by the number of heads. → KV cache, FlashAttention, MQA/GQA/MLA
- Muon
- An optimiser that orthogonalises the momentum update of each weight matrix (via Newton–Schulz iterations) before applying it. → Optimisers: SGD, momentum, Adam, AdamW and schedules
- Mutual information
- How much knowing one variable reduces uncertainty about another, \(I(X;Y) = H(X) - H(X\mid Y)\). → Entropy, cross-entropy and KL divergence
- MuZero
- AlphaZero's successor that plans with a learned latent model instead of the game's rules. → Model-based RL and planning: AlphaZero, MuZero
N¶
- Needle in a haystack
- A test that hides a fact in a long document and asks the model to retrieve it; necessary but far from sufficient evidence of long-context reasoning. → Long context
- Neural audio codec
- A learned encoder–decoder that compresses audio into discrete tokens, so language-model techniques can generate sound. → Speech and audio: ASR and TTS
- Neuron (artificial)
- A unit that computes a weighted sum of its inputs plus a bias and passes it through a non-linearity. → Neurons, perceptrons and MLPs
- Neuro-symbolic AI
- Systems combining neural networks' learning with symbolic reasoning and structured knowledge. → World models and neuro-symbolic AI
- Next-token prediction
- The pre-training objective of predicting each token from its prefix, minimising average cross-entropy. → The language-modelling objective
- Noise schedule
- The sequence of noise levels \(\beta_t\) (or \(\bar\alpha_t\)) over diffusion steps; linear and cosine schedules are common. → Diffusion models
- Norm
- A function measuring a vector's length; the L2 (Euclidean) norm is \(\sqrt{\sum_i x_i^2}\), the L1 norm is \(\sum_i |x_i|\). → Vectors, dot products and the geometry of meaning
- Normal equations
- The equations \(X^\top X\mathbf{w} = X^\top\mathbf{y}\) whose solution is the least-squares fit. → Linear regression from scratch
- Normalising flow
- A generative model built from invertible transformations with tractable Jacobian determinants, giving exact likelihoods. → Score matching and flow matching
O¶
- Offline RL
- Learning a policy from a fixed dataset of logged experience with no further environment interaction; the main risk is overestimating unseen actions. → Offline RL and RL for language models
- Off-policy learning
- Learning about one policy from data generated by another. → Q-learning and DQN
- One-hot encoding
- Representing a category as a vector with a single 1 in its own position and 0 elsewhere. → Features and tabular data
- Open-weight model
- A model whose trained weights are published for download, though its training data and code may not be. → Companies that shaped the boom
- Orchestrator–worker
- A multi-agent pattern in which a lead model splits a task, dispatches sub-tasks to worker agents and combines their results. → Multi-agent systems and orchestration
- Outer and inner alignment
- Outer alignment asks whether the training objective captures what we want; inner alignment asks whether the trained model actually pursues that objective. → The alignment problem
- Overfit a single batch
- The debugging check of driving loss to near zero on one small batch; if a model cannot, the code is wrong. → A recipe for training (and debugging) networks
- Overfitting
- Fitting noise in the training data so that training error is low but error on new data is high. → Bias, variance and regularisation
P¶
- PAC learning
- Probably approximately correct learning: with probability at least \(1-\delta\), the learned hypothesis has error at most \(\epsilon\), given enough samples. → Learning theory: PAC, VC and double descent
- Padding
- Adding border values (usually zeros) so that convolution can preserve spatial size. → Convolutional networks
- PagedAttention
- vLLM's technique of storing the KV cache in fixed-size blocks, like virtual-memory pages, to avoid fragmentation. → Serving LLMs: batching, PagedAttention, speculative decoding
- Parameter-efficient fine-tuning (PEFT)
- Adapting a model by training a small number of new or selected parameters (adapters, LoRA, prefixes) instead of all weights. → Parameter-efficient fine-tuning: LoRA and QLoRA
- Partial derivative
- The derivative of a multivariable function with respect to one variable, holding the others fixed. → Derivatives and gradients
- Patch embedding
- Flattening an image patch and projecting it linearly into a token vector. → Vision transformers and CLIP
- Perceptron
- Rosenblatt's 1958 linear threshold classifier with an error-driven learning rule; it converges only when the data is linearly separable. → Neurons, perceptrons and MLPs
- Perplexity
- The exponential of the average per-token cross-entropy; a perplexity of \(k\) means the model is as uncertain as a uniform choice among \(k\) tokens. → The language-modelling objective
- Perplexity filtering
- Dropping documents that a reference language model finds very improbable (or suspiciously probable). → Quality filtering and deduplication
- Pipeline parallelism
- Placing different layers on different devices and streaming micro-batches through them. → Distributed training: DDP, FSDP/ZeRO, tensor and pipeline parallel
- Policy
- The agent's behaviour: a mapping \(\pi(a\mid s)\) from states to (distributions over) actions. → Reinforcement learning at 2,000 ft
- Policy gradient
- Optimising a parameterised policy by gradient ascent on expected return, using \(\nabla J = \mathbb{E}[\nabla\log\pi_\theta(a\mid s)\,G_t]\). → Policy gradients and REINFORCE
- Policy iteration
- Alternating full policy evaluation with greedy policy improvement; converges in few iterations. → Dynamic programming
- Polysemantic neuron
- A neuron that responds to several unrelated features, a symptom of superposition. → Mechanistic interpretability: circuits, features, SAEs
- Pooling
- Downsampling a feature map by taking the maximum or average over small windows. → Convolutional networks
- Positional encoding
- Information about token order injected into a transformer, which attention otherwise ignores. → Positional encoding: sinusoidal, RoPE, ALiBi
- Posterior
- The distribution over parameters after seeing data, proportional to likelihood times prior. → Estimation: MLE, MAP and Bayes
- Post-training
- Everything done to a pre-trained base model to make it a useful assistant: supervised fine-tuning, preference optimisation, RL and safety training. → Post-training at 2,000 ft
- Post-training quantisation (PTQ)
- Quantising a trained model without retraining, using a small calibration set. → Quantisation: INT8, INT4, GPTQ, AWQ
- PPO
- Proximal policy optimisation: a policy-gradient method whose clipped objective keeps each update's probability ratio within \([1-\epsilon, 1+\epsilon]\); the workhorse of RLHF. → Actor-critic and PPO
- Precision
- Of the items predicted positive, the fraction that truly are: \(\mathrm{TP}/(\mathrm{TP}+\mathrm{FP})\). → Metrics, validation and leakage
- Preference data
- Pairs of responses to the same prompt with a label saying which is better, collected from humans or models. → Reward models and preference data
- Prefill and decode
- The two phases of LLM inference: processing the whole prompt in parallel (compute-bound), then generating one token at a time (memory-bound). → Serving LLMs: batching, PagedAttention, speculative decoding
- Pre-norm
- Placing layer normalisation before each sub-layer rather than after; more stable for deep transformers. → The transformer block
- Pre-training
- The first and most expensive training stage: next-token prediction over trillions of tokens of mostly web text. → Pre-training data
- Principal component analysis (PCA)
- Projecting data onto the directions of greatest variance, the top eigenvectors of its covariance matrix (equivalently the top right singular vectors of the centred data). → Eigenvectors, SVD and PCA
- Prior
- The distribution over parameters before seeing data, encoding assumptions such as "weights are small". → Estimation: MLE, MAP and Bayes
- Probability distribution
- An assignment of probabilities to the outcomes of a random variable that is non-negative and sums (or integrates) to one. → Probability from first principles
- Probing
- Training a simple classifier on a model's internal activations to test whether a property is linearly represented. → Mechanistic interpretability: circuits, features, SAEs
- Process reward model (PRM)
- A reward model that scores each step of a reasoning chain rather than only the final answer. → Reasoning models and test-time compute
- Product quantisation
- Compressing vectors by splitting them into sub-vectors and replacing each with the id of its nearest centroid. → Embeddings and vector search
- Projector (connector)
- The module that maps vision-encoder features into the language model's embedding space. → Vision-language models
- Prompt
- The full input text given to a model, including system instructions, examples, context and the user's request. → Prompt engineering
- Prompt caching
- Reusing the computed KV cache of a repeated prompt prefix across requests to cut cost and latency. → Context engineering and memory
- Prompt engineering
- Designing prompts (instructions, examples, structure, output format) to get reliable behaviour from a model. → Prompt engineering
- Prompt injection
- Text in a model's input (often from a document, web page or tool result) that hijacks its instructions. → Guardrails, prompt injection and security
- Prompt template
- A reusable prompt with slots filled in at run time. → Prompt engineering
- p-value
- The probability, under a null hypothesis, of a result at least as extreme as the one observed; small values are evidence against the null, not the probability it is true. → Statistics for experiments and evals
Q¶
- Q-learning
- Off-policy TD control that updates \(Q(s,a)\) towards \(r + \gamma\max_{a'}Q(s',a')\). → Q-learning and DQN
- QLoRA
- LoRA on top of a base model quantised to 4-bit NormalFloat, making fine-tuning of large models possible on one GPU. → Parameter-efficient fine-tuning: LoRA and QLoRA
- Quality classifier
- A model that scores documents for educational or textbook-like quality so a pre-training corpus can be filtered. → Quality filtering and deduplication
- Quantisation
- Representing weights (and possibly activations) with fewer bits, such as INT8 or INT4, to cut memory and speed up inference. → Quantisation: INT8, INT4, GPTQ, AWQ
- Query, key, value
- The three projections of each token in attention: the query asks, keys are matched against it, and values are what gets averaged. → Attention from first principles
R¶
- Random forest
- An average of many decision trees, each trained on a bootstrap sample with random feature subsets, which cuts variance. → Decision trees, random forests and boosting
- Random variable
- A function from outcomes of an experiment to numbers, such as the next token's id or a model's error on a sample. → Probability from first principles
- Rank
- The dimension of a matrix's column space: the number of independent directions it can output. Low-rank structure is what LoRA exploits. → Matrices as linear maps
- ReAct
- A prompting pattern that interleaves reasoning traces with actions (tool calls) and observations. → Agents and tool use
- Reasoning model
- An LLM trained, usually with RL on verifiable tasks, to produce a long chain of thought before answering, trading inference compute for accuracy. → Reasoning models and test-time compute
- Recall
- Of the truly positive items, the fraction the model found: \(\mathrm{TP}/(\mathrm{TP}+\mathrm{FN})\). → Metrics, validation and leakage
- Receptive field
- The region of the input that can influence a given unit; it grows with depth. → Convolutional networks
- Reciprocal rank fusion (RRF)
- Merging ranked lists by summing \(1/(k + \text{rank})\) for each document across lists. → Advanced RAG: hybrid search, reranking, graphs
- Recurrent neural network (RNN)
- A network that processes a sequence one step at a time, carrying a hidden state \(h_t = f(h_{t-1}, x_t)\). → RNNs, LSTMs and sequence-to-sequence
- Red-teaming
- Deliberately attacking a system to find failures before deployment. → Red-teaming and dangerous-capability evals
- Reference model
- The frozen copy of the model (usually the SFT model) that the KL penalty measures distance from. → RLHF with PPO
- Regression test (evals)
- Re-running an eval suite after every prompt or model change to catch things that got worse. → Evals in practice: golden sets and LLM judges
- Regret
- The cumulative reward lost relative to always playing the best action; good bandit algorithms have regret growing as \(O(\log T)\). → Bandits and exploration
- Regularisation
- Any technique that discourages overly complex fits, such as weight penalties, dropout or early stopping. → Bias, variance and regularisation
- REINFORCE
- The basic Monte Carlo policy-gradient algorithm, which weights log-probability gradients by sampled returns. → Policy gradients and REINFORCE
- Reinforcement learning (RL)
- Learning to act by trial and error to maximise cumulative reward from an environment. → Reinforcement learning at 2,000 ft
- Rejection sampling (fine-tuning)
- Generating many candidate responses, keeping those that pass a filter or verifier, and fine-tuning on them. → Distillation and synthetic data
- ReLU
- The rectified linear unit \(\max(0,x)\); cheap, with a gradient that does not saturate for positive inputs. → Activation functions
- Reparameterisation trick
- Writing a sample as \(\mathbf{z} = \boldsymbol{\mu} + \boldsymbol{\sigma}\odot\boldsymbol{\epsilon}\) with \(\boldsymbol{\epsilon}\sim\mathcal{N}(0,I)\) so gradients flow through the sampling step. → Autoencoders and VAEs
- Repetition penalty
- Down-weighting the logits of tokens that have already appeared. → Decoding: greedy, beam, temperature, top-k, top-p
- Reranker (cross-encoder)
- A model that reads the query and a candidate document together and scores relevance; more accurate and slower than embedding similarity. → Advanced RAG: hybrid search, reranking, graphs
- Residual connection
- Adding a block's input to its output, \(\mathbf{y} = \mathbf{x} + F(\mathbf{x})\), which gives gradients an identity path and makes very deep networks trainable. → Residual connections and very deep networks
- Residual stream
- The running vector each token carries through the transformer, which every attention and MLP layer reads from and adds to. → The transformer block
- ResNet
- The 2015 residual network family that trained 152-layer models and won ImageNet; the origin of the residual stream used by transformers. → Residual connections and very deep networks
- Responsible scaling policy
- A lab commitment linking capability thresholds found in evaluations to required safeguards. → Red-teaming and dangerous-capability evals
- Retrieval-augmented generation (RAG)
- Retrieving relevant documents for a query and putting them in the prompt so the model answers from them. → Retrieval-augmented generation
- Return
- The discounted sum of future rewards from a time step, \(G_t = \sum_{k\ge 0}\gamma^k r_{t+k+1}\). → MDPs and the Bellman equations
- Reverse-mode differentiation
- Autodiff that propagates adjoints from outputs to inputs; one pass gives the gradient of a scalar with respect to all parameters. → Automatic differentiation and computation graphs
- Reward
- The scalar feedback signal after each action; the agent's goal is to maximise its expected discounted sum. → Reinforcement learning at 2,000 ft
- Reward hacking
- A policy exploiting flaws in its reward signal to score highly without doing what was intended. → Reward models and preference data
- Reward model
- A model trained on preference data to output a scalar score for a response, used as the objective in RLHF. → Reward models and preference data
- Ridge regression (L2)
- Least squares plus a penalty \(\lambda\lVert\mathbf{w}\rVert_2^2\) that shrinks weights towards zero. → Bias, variance and regularisation
- RL with verifiable rewards (RLVR)
- Reinforcement learning where the reward comes from a checker (unit tests, exact answers) rather than a learned reward model; the recipe behind reasoning models. → RL with verifiable rewards: GRPO and reasoning
- RLAIF
- Reinforcement learning from AI feedback: preference labels produced by a model instead of humans. → Constitutional AI and RLAIF
- RLHF
- Reinforcement learning from human feedback: fitting a reward model to human preferences, then optimising the policy against it with RL under a KL penalty to the reference model. → RLHF with PPO
- RMSNorm
- Layer norm without mean subtraction: dividing by the root mean square of the features. Cheaper, and used in most modern LLMs. → Initialisation and normalisation
- ROC curve and AUC
- The true-positive rate plotted against the false-positive rate as the threshold varies; the area under it is the probability a random positive outranks a random negative. → Metrics, validation and leakage
- Roofline model
- A plot of attainable FLOP/s against arithmetic intensity: below the ridge point a kernel is memory-bound, above it compute-bound. → How a GPU works: SMs, tensor cores, memory, roofline
- RoPE (rotary position embedding)
- Rotating query and key vectors by position-dependent angles so that their dot product depends only on relative position; used by most modern LLMs. → Positional encoding: sinusoidal, RoPE, ALiBi
- Router (gating network)
- The small network in an MoE layer that scores experts for each token and picks the top-\(k\). → Mixture of experts
S¶
- Saddle point
- A point where the gradient is zero but which is a minimum in some directions and a maximum in others; common in high-dimensional loss surfaces. → Optimisation: convex and not
- Saturation
- A benchmark becoming uninformative because top models score near its ceiling or its label noise. → Benchmarks and their limits
- Scalable oversight
- Methods (debate, recursive reward modelling, AI-assisted evaluation) for supervising systems on tasks humans cannot easily judge. → The alignment problem
- Scaled dot-product attention
- Attention whose scores are divided by \(\sqrt{d_k}\), keeping their variance near one so the softmax does not saturate. → Attention from first principles
- Scaling laws
- Empirical power laws relating loss to parameters, data and compute, such as \(L(N) \approx (N_c/N)^{\alpha}\); they let labs predict large runs from small ones. → Scaling laws: Kaplan to Chinchilla and beyond
- Score function
- The gradient of the log-density, \(\nabla_{\mathbf{x}}\log p(\mathbf{x})\); a diffusion model's noise prediction is a scaled estimate of it. → Score matching and flow matching
- Score matching
- Training a network to estimate the score function, usually by denoising noisy samples. → Score matching and flow matching
- Self-attention
- Attention in which queries, keys and values all come from the same sequence. → Attention from first principles
- Self-consistency
- Sampling many reasoning chains and taking a majority vote over their final answers. → Reasoning models and test-time compute
- Self-play
- Training an agent by playing against copies of itself, producing an automatic curriculum. → Model-based RL and planning: AlphaZero, MuZero
- Self-supervised learning
- Creating labels from the data itself, such as predicting a masked word or the next token; how foundation models are pre-trained. → Embeddings and representation learning
- SentencePiece
- A tokenisation library that treats text as raw Unicode (including spaces) and implements BPE and unigram models. → Tokenisation and BPE
- Sequence-to-sequence (seq2seq)
- An encoder that reads an input sequence and a decoder that generates an output sequence; the 2014 architecture for neural translation. → RNNs, LSTMs and sequence-to-sequence
- Sigmoid
- The function \(\sigma(z) = 1/(1+e^{-z})\) that squashes a real number into \((0,1)\); the two-class special case of softmax. → Logistic regression and classification
- SiLU / Swish
- The function \(x\,\sigma(x)\); with a gate it forms SwiGLU, the feed-forward activation of most modern LLMs. → Activation functions
- Sim-to-real
- Training a policy in simulation and transferring it to a physical robot. → Embodied AI and robotics
- Singular value decomposition (SVD)
- The factorisation \(A = U\Sigma V^\top\) of any matrix into a rotation, an axis-aligned scaling and another rotation; truncating it gives the best low-rank approximation. → Eigenvectors, SVD and PCA
- Sinusoidal positional encoding
- The original transformer's fixed position vectors built from sines and cosines of geometrically spaced frequencies. → Positional encoding: sinusoidal, RoPE, ALiBi
- Skip connection
- Any connection that bypasses one or more layers, including residual and U-Net connections. → Residual connections and very deep networks
- Softmax
- The function \(\operatorname{softmax}(\mathbf{z})_i = e^{z_i}/\sum_j e^{z_j}\) that turns real-valued logits into a probability distribution. → Entropy, cross-entropy and KL divergence
- Sparse autoencoder (SAE)
- An autoencoder with a sparsity penalty trained on a model's activations to decompose them into interpretable features. → Mechanistic interpretability: circuits, features, SAEs
- Special tokens
- Reserved tokens such as beginning-of-sequence, end-of-sequence, padding and chat-role markers. → Tokenisation and BPE
- Specification gaming
- A system satisfying the literal objective while violating its intent. → The alignment problem
- Speculative decoding
- Using a small draft model to propose several tokens that the large model verifies in one forward pass, speeding generation without changing outputs. → Serving LLMs: batching, PagedAttention, speculative decoding
- SRAM / shared memory
- Small, very fast on-chip memory; keeping data there is the point of kernels like FlashAttention. → How a GPU works: SMs, tensor cores, memory, roofline
- Standard error
- The standard deviation of an estimate across hypothetical repeated samples; for an accuracy over \(n\) items it is \(\sqrt{p(1-p)/n}\). → Statistics for experiments and evals
- Standardisation
- Rescaling a feature to zero mean and unit variance so that features are on comparable scales. → Features and tabular data
- State-space model (SSM)
- A sequence model built on a linear recurrence \(h_t = Ah_{t-1} + Bx_t\), \(y_t = Ch_t\), which can be computed as a convolution for training and as a recurrence for generation. → Beyond transformers: SSMs, Mamba, linear attention
- Statistical power
- The probability a test detects an effect of a given size; small eval sets have low power to separate close models. → Statistics for experiments and evals
- Steering vector
- A direction added to activations at inference to push a model's behaviour (for example towards a topic or tone). → Mechanistic interpretability: circuits, features, SAEs
- Stochastic gradient descent (SGD)
- Gradient descent using the gradient of a random mini-batch, a noisy but cheap estimate of the full gradient. → Optimisers: SGD, momentum, Adam, AdamW and schedules
- Streaming multiprocessor (SM)
- The basic compute unit of an NVIDIA GPU, with its own cores, tensor cores, registers and shared memory. → How a GPU works: SMs, tensor cores, memory, roofline
- Stride
- The step between successive positions of a convolution kernel; a stride of 2 halves spatial resolution. → Convolutional networks
- Structured output
- Model output constrained to a schema such as JSON, so code can parse it reliably. → Structured outputs and function calling
- Superposition
- Networks representing more features than they have dimensions by storing them as nearly orthogonal directions. → Mechanistic interpretability: circuits, features, SAEs
- Supervised fine-tuning (SFT)
- Continuing training on curated prompt–response pairs, usually with loss only on the response tokens. → Instruction tuning (SFT)
- Supervised learning
- Learning a mapping from inputs to labelled outputs from example pairs; regression and classification are its two main forms. → What it means to learn from data
- Support vector machine (SVM)
- A classifier that finds the maximum-margin separating hyperplane; only the support vectors on the margin determine it. → Kernels and support vector machines
- SWE-bench
- A benchmark of real GitHub issues where a model must produce a patch that passes the repository's tests. → Benchmarks and their limits
- SwiGLU
- A gated feed-forward block, \((\operatorname{SiLU}(xW)\odot xV)W_2\), used in Llama-style transformers. → Activation functions
- Sycophancy
- A model telling users what they want to hear rather than what is true, often a by-product of preference training. → The alignment problem
- Symbolic AI
- AI built from hand-written symbols, logic and rules, dominant from the 1950s to the 1980s. → Before the boom: 1943–2005
- Synthetic data
- Training data generated by models rather than collected from humans; now a large share of post-training data. → Distillation and synthetic data
- System prompt
- Instructions placed before the conversation that set the model's role, rules and output format. → Prompt engineering
T¶
- Tanh
- The hyperbolic tangent, a zero-centred sigmoid with range \((-1,1)\); used in classic RNN cells. → Activation functions
- Target encoding
- Replacing a category with a statistic of the target for that category; powerful but leaks unless computed out-of-fold. → Features and tabular data
- Target network
- A slowly updated copy of the Q-network used to compute TD targets, which stops the target moving with every step. → Q-learning and DQN
- Task vector
- The difference between fine-tuned and base weights; task vectors can be added or negated to edit behaviour. → Model merging and continual learning
- TD error
- The difference \(\delta = r + \gamma V(s') - V(s)\) between the bootstrapped target and the current estimate; dopamine neurons appear to signal it. → Monte Carlo and temporal-difference learning
- Teacher forcing
- Training a sequence decoder by feeding it the true previous token rather than its own prediction. → RNNs, LSTMs and sequence-to-sequence
- Temperature
- Dividing logits by \(T\) before the softmax: \(T<1\) sharpens the distribution, \(T>1\) flattens it. → Decoding: greedy, beam, temperature, top-k, top-p
- Temporal-difference (TD) learning
- Updating a value estimate towards a bootstrapped target \(r + \gamma V(s')\) after every step. → Monte Carlo and temporal-difference learning
- Tensor
- In deep learning, an n-dimensional array of numbers with a shape such as (batch, sequence, features); frameworks are built around operations on tensors. → Tensors, shapes and broadcasting
- Tensor core
- Specialised GPU units that perform small matrix multiply-accumulates in one instruction at low precision. → How a GPU works: SMs, tensor cores, memory, roofline
- Tensor parallelism
- Splitting individual weight matrices across devices so each computes part of every layer. → Distributed training: DDP, FSDP/ZeRO, tensor and pipeline parallel
- Test set
- Data kept untouched until the end to estimate performance on new data; it is only valid if used once. → Metrics, validation and leakage
- Test-time compute
- Spending more computation at inference (longer reasoning, more samples, search) to improve answers. → Reasoning models and test-time compute
- Text-to-speech (TTS)
- Generating natural speech audio from text. → Speech and audio: ASR and TTS
- The bitter lesson
- Sutton's 2019 observation that general methods that scale with computation beat methods built on human knowledge. → The transformer and the scale era: 2017–2022
- Thinking budget
- A cap on how many reasoning tokens a model may spend before answering. → Reasoning models and test-time compute
- Thompson sampling
- Sampling a plausible model from the posterior and acting greedily with respect to it; exploration proportional to uncertainty. → Bandits and exploration
- Throughput
- Tokens generated per second across all requests; batching trades per-request latency for throughput. → Serving LLMs: batching, PagedAttention, speculative decoding
- Time horizon (agents)
- The length of task, measured in human time, that an agent can complete with a given success rate; METR's measure of agent progress. → Computer-use and long-horizon agents
- Time to first token (TTFT)
- Latency from sending a request to receiving the first output token; dominated by prefill. → Serving LLMs: batching, PagedAttention, speculative decoding
- Token
- The unit of text a language model reads and writes, typically a sub-word piece; English averages roughly four characters per token in common tokenisers. → Tokenisation and BPE
- Tokeniser
- The fixed procedure that maps text to a sequence of token ids and back. → Tokenisation and BPE
- Top-k sampling
- Sampling only from the \(k\) most probable tokens. → Decoding: greedy, beam, temperature, top-k, top-p
- Top-p (nucleus) sampling
- Sampling from the smallest set of tokens whose probabilities sum to at least \(p\). → Decoding: greedy, beam, temperature, top-k, top-p
- Training set
- The data a model's parameters are fitted on. → Metrics, validation and leakage
- Transformer
- The 2017 architecture of stacked blocks of attention and feed-forward layers with residual connections and normalisation; the basis of every modern LLM. → The transformer block
- Transformer block
- One layer of a transformer: (pre-)norm, attention, residual add, norm, feed-forward network, residual add. → The transformer block
- Transpose
- The matrix \(A^\top\) with rows and columns swapped; for real matrices it is the adjoint, satisfying \(\langle A\mathbf{x},\mathbf{y}\rangle = \langle \mathbf{x}, A^\top\mathbf{y}\rangle\). → Matrices as linear maps
- Triton
- A Python-embedded language and compiler for writing block-level GPU kernels without managing threads by hand. → Kernels: CUDA and Triton
- TRPO
- Trust region policy optimisation: constraining each policy update by a KL-divergence bound; PPO's predecessor. → Actor-critic and PPO
- t-SNE
- A non-linear method that embeds high-dimensional points in 2-D or 3-D by preserving local neighbour probabilities; good for pictures, poor for distances. → PCA, t-SNE and UMAP
- Turing test
- Turing's 1950 imitation game: can a machine's conversation be told apart from a human's? → Before the boom: 1943–2005
U¶
- UMAP
- A non-linear dimensionality-reduction method based on fuzzy neighbour graphs; faster than t-SNE and preserves more global structure. → PCA, t-SNE and UMAP
- Underfitting
- A model too simple or under-trained to capture the real pattern; both training and test error are high. → Bias, variance and regularisation
- Underflow and overflow
- Numbers too small or too large for a format become zero or infinity; why probabilities are handled in log space. → Floating point, stability and log-sum-exp
- U-Net
- An encoder–decoder CNN with skip connections between matching resolutions; the classic diffusion denoiser. → Latent diffusion and guidance
- Unified memory
- A memory pool shared by CPU and GPU, as on Apple silicon, so large models fit without copying. → On-device AI: MLX, llama.cpp, GGUF
- Universal approximation theorem
- A one-hidden-layer network with enough units can approximate any continuous function on a compact set arbitrarily well; it says nothing about how to find the weights. → Neurons, perceptrons and MLPs
- Unsupervised learning
- Finding structure (clusters, components, densities) in data without labels. → What it means to learn from data
- Upper confidence bound (UCB)
- Choosing the action with the highest optimistic estimate, mean plus an uncertainty bonus such as \(c\sqrt{\ln t / n_a}\). → Bandits and exploration
V¶
- Validation set
- Held-out data used to choose hyperparameters and stop training; looking at it too often slowly overfits it. → Metrics, validation and leakage
- Value function
- The expected return from a state under a policy, \(V^\pi(s)\). → MDPs and the Bellman equations
- Value iteration
- Repeatedly applying the Bellman optimality update to every state until values converge, then acting greedily. → Dynamic programming
- Vanishing gradient
- Gradients shrinking exponentially as they flow back through many layers, so early layers stop learning; saturating activations and deep chains cause it. → Activation functions
- Variance
- The expected squared deviation from the mean, \(\mathbb{E}[(X-\mu)^2]\); it measures spread and drives the noise in stochastic gradients. → Probability from first principles
- Variational autoencoder (VAE)
- An autoencoder whose encoder outputs a distribution over latents, trained by maximising the ELBO; it gives a smooth latent space you can sample. → Autoencoders and VAEs
- Variational inference
- Approximating an intractable posterior with the closest member of a simpler family by maximising the evidence lower bound. → Probabilistic graphical models
- VC dimension
- The largest number of points a hypothesis class can label in every possible way; it bounds how much data is needed to generalise. → Learning theory: PAC, VC and double descent
- Vector
- An ordered list of numbers, read either as a point or as an arrow in space; in ML every input, embedding and parameter set is a vector. → Vectors, dot products and the geometry of meaning
- Vector database
- A store that indexes embeddings for fast nearest-neighbour search. → Embeddings and vector search
- Vector–Jacobian product (VJP)
- The product \(\mathbf{v}^\top J\) computed without forming \(J\); reverse-mode autodiff is a chain of VJPs. → The multivariable chain rule and Jacobians
- Video generation
- Generating temporally coherent frames, usually with diffusion transformers over spacetime patches. → Video and world models
- Vision transformer (ViT)
- A transformer applied to an image cut into fixed-size patches, each embedded as a token. → Vision transformers and CLIP
- Vision-language model (VLM)
- A model that takes images and text as input and produces text, usually a vision encoder connected to an LLM by a projector. → Vision-language models
- Vision-language-action model (VLA)
- A model that takes images and language and outputs robot actions. → Embodied AI and robotics
- Vocabulary
- The fixed set of tokens a model knows, with typical sizes from about 32k to over 200k. → Tokenisation and BPE
- VQ-VAE
- A VAE with a discrete codebook latent, used to turn images and audio into tokens. → Autoencoders and VAEs
W¶
- Warm-up
- Increasing the learning rate from near zero over the first steps so that early, unreliable updates do not destabilise training. → Optimisers: SGD, momentum, Adam, AdamW and schedules
- Warp
- A group of 32 GPU threads that execute the same instruction in lockstep. → Kernels: CUDA and Triton
- Wasserstein distance
- The earth-mover distance between distributions, the minimum cost to transport one into the other; the basis of WGAN. → Generative adversarial networks
- Weight decay
- Shrinking every weight by a small fraction each step; equivalent to L2 regularisation for SGD but not for Adam. → Regularisation: dropout, weight decay, augmentation
- Weight initialisation
- Choosing starting weights so activations and gradients keep a stable scale across layers; Xavier and He (Kaiming) schemes set the variance by fan-in. → Initialisation and normalisation
- Weights and biases
- The learned parameters of a layer: the weight matrix scales and mixes inputs, the bias shifts the result. → Neurons, perceptrons and MLPs
- Word2vec
- 2013 methods (skip-gram, CBOW) that learn word embeddings by predicting nearby words; famous for vector arithmetic like king − man + woman ≈ queen. → Embeddings and representation learning
- Workflow (vs agent)
- A system where code fixes the sequence of model calls, as opposed to an agent that chooses its own steps. → Agents and tool use
- World model
- A model that predicts how an environment evolves in response to actions, which an agent can use to imagine and plan. → Video and world models
X¶
- Xavier (Glorot) initialisation
- Drawing weights with variance \(2/(n_{\text{in}}+n_{\text{out}})\) to keep signal variance constant for tanh-like layers. → Initialisation and normalisation
Z¶
- Zero-shot
- Performing a task with no task-specific training examples. → Vision transformers and CLIP
Where this leads¶
- Formula sheet: the equations behind these terms, grouped by track.
- The paper canon: where most of these terms were coined.
- Books: textbooks that define them at length, with consistent notation.
- The map of AI: how the areas these terms come from fit together.