Appendix A — The Kitten Glossary of Machine Learning

All key terms defined

When you are reading a dense academic paper and forget what a term means, come back here. The math is rigorous, but the kitten remembers.

Technical Term Formal ML Definition The Kitten Analogy
Vector (\vec{v}) An array of numbers representing magnitude and direction in space. A single jump: how far to jump, and which way to point the paws.
Matrix (A) A rectangular array of numbers that applies a linear transformation to a vector. A magic paw stamp that stretches, squishes, or rotates the living room floor.
Nullspace The set of all vectors that a matrix transforms into zero. The invisible paths. If Pixel jumps along these lines, the matrix entirely ignores him.
Gradient (\nabla L) The vector of partial derivatives pointing in the direction of steepest ascent. Feeling the floor with a paw to find which way is “up” the side of the bowl.
Loss Function (L) A mathematical metric measuring the difference between predicted and true values. A measure of how disappointed the human is when Pixel makes a wrong guess.
Backpropagation Using the Chain Rule of calculus to calculate gradients backward from output to input. The kittens in the back row yelling at the kittens in the front row, blaming them for a wrong answer.
Learning Rate (\eta / \alpha) A scalar multiplier determining the step size in Gradient Descent. The size of Pixel’s steps. Too small = he falls asleep. Too big = he bounces off the walls.
Overfitting When a model learns the noise of the training data rather than the underlying pattern. Memorizing that “blue socks = treats” instead of learning that “humans = treats.”
Regularization (L1/L2) Adding a penalty to the loss function to constrain the size of the model’s weights. Putting a heavy weight-vest on Pixel so he is forced to take simple, efficient steps.
Convolution (CNN) Sliding a filter (kernel) over a tensor to compute spatial feature maps. Pixel closing his eyes and using his whiskers to feel for edges and textures across the floor.
Embeddings Dense, continuous, high-dimensional vector representations of discrete concepts. Compressing language into “scent profiles” where similar smells group together.
Attention Mechanism Dynamically weighting the relevance of all other tokens in a sequence to the current token. Standing on one word and instantly looking at every other word in the room to find context.
KV Cache Storing previously computed Key and Value vectors during autoregressive generation. Leaving a scent on a scratching post so the model doesn’t have to re-read the whole sentence.
LoRA (PEFT) Freezing a large weight matrix and optimizing two small, low-rank matrices to fine-tune a model. Taping a tiny cheat-sheet to the forehead of a massive, frozen lion.
Markov Decision Process The tuple (S, A, P, R, \gamma) defining an RL environment. The physics, rules, and point system of the living room board game.
Q-Value (Q) The expected cumulative discounted reward of taking action a in state s. A heat-map spreadsheet telling Pixel exactly how many treats a specific jump will yield.
Distribution Shift When the probability distribution of real-world data diverges from training data. Training Pixel in an Ikea catalog, but deploying him in a messy college dorm room.
RLHF Optimizing a language model policy using a Reward Model trained on human preferences. Giving the AI a thumbs-up for being polite, teaching it manners instead of just autocompleting.

Notation reminder: We reserve X for the dataset matrix throughout the book. In probability sections, random variables are typically written as T, U, or Z.