Reference
Concepts
Chapter 1
What Is Artificial Intelligence?
- AI WintersMust know
AI winters were periods when inflated expectations collided with limited results, and funding and interest in AI collapsed for years.
Understand - Expert SystemsMust know
Expert systems captured a human specialist's knowledge as hundreds or thousands of if–then rules, and were AI's first big commercial success.
Understand - From Rules to LearningMust know
Traditional programs turn rules and inputs into answers; machine learning turns inputs and answers into the rules — learning the knowledge from examples instead of having it written in.
Know well - Logic and RulesMust know
Rule-based AI stores knowledge as if–then rules and derives conclusions by chaining them together, forward from facts or backward from goals.
Understand - SearchMust know
Search solves a problem by exploring sequences of possible actions from a start state until one reaches the goal — and a good heuristic decides which possibilities to explore first.
Know well - Symbolic AIMust know
Symbolic AI represents knowledge as explicit symbols and rules written by people, and produces intelligent behaviour by manipulating them — through logic and search.
Know well - The Knowledge-Acquisition BottleneckMust know
The knowledge-acquisition bottleneck is the discovery that the hardest part of rule-based AI is getting the knowledge in: much of what experts know is tacit, full of exceptions, and too vast to write down.
Know well - The Turing TestMust know
The Turing test replaces the vague question 'Can machines think?' with a concrete one: can a machine's conversation be told apart from a human's?
Understand - Knowledge RepresentationShould know
Knowledge representation is the problem of writing down what a system knows — objects, categories, relations, defaults — in a form a machine can reason with.
Understand - PlanningShould know
Planning means finding a sequence of actions that turns the current situation into a goal situation, using a model of what each action requires and changes.
Understand
Chapter 2
The Math Toolkit
- Conditional Probability and Bayes' TheoremMust know
Conditional probability asks how likely something is given what you already know, and Bayes' theorem tells you how to flip it — from P(evidence | cause) to P(cause | evidence).
Know well - Cross-Entropy LossMust know
Cross-entropy loss is the negative log of the probability a model assigned to the correct answer — near zero when the model is confidently right, large when it is confidently wrong.
Implement - Derivatives and GradientsMust know
A derivative measures how much a function's output changes when you nudge its input, and the gradient collects those rates for every input at once — pointing in the direction of steepest increase.
Know well - Dot ProductMust know
The dot product multiplies two vectors entry by entry and adds the results, giving one number that is large when the vectors point the same way.
Implement - EntropyMust know
Entropy measures how uncertain a distribution is — the average surprise of its outcomes — and it sets the lower limit on how compactly you can encode them.
Know well - Expected Value and VarianceMust know
The expected value is the probability-weighted average outcome, and the variance measures how far outcomes typically spread around it.
Know well - Gradient DescentMust know
Gradient descent minimizes a loss by repeatedly nudging every parameter a small step in the direction that decreases the loss fastest — the negative gradient.
Implement - KL DivergenceMust know
KL divergence measures how much one probability distribution differs from another — the extra surprise you pay for using the wrong distribution.
Understand - Loss FunctionsMust know
A loss function turns 'how wrong is the model?' into a single number, so that learning becomes the problem of making that number small.
Know well - Matrix MultiplicationMust know
Multiplying a vector by a matrix transforms it — every output number is a dot product of one matrix row with the input — and that is exactly what a neural-network layer does.
Implement - Momentum and AdamMust know
Momentum smooths gradient steps by keeping a running average of past gradients, and Adam adds a per-parameter step size based on how large each parameter's gradients have been.
Understand - PerplexityMust know
Perplexity is the exponential of the average cross-entropy per token — roughly, the number of options a language model is effectively choosing between at each step.
Know well - Probability and DistributionsMust know
A probability distribution assigns a likelihood to every possible outcome — and nearly every modern model's output is a distribution rather than a single answer.
Know well - Probability of SequencesMust know
The probability of a whole sequence equals the product of each element's probability given everything before it — the identity that turns 'model language' into 'predict the next token'.
Know well - Sampling and UncertaintyMust know
Every measured number — an accuracy, a benchmark score, a loss — is computed from a sample, so it carries uncertainty, and a difference smaller than that uncertainty isn't evidence of anything.
Understand - SoftmaxMust know
Softmax turns any list of scores into a probability distribution — positive numbers that sum to 1 — giving exponentially more weight to larger scores.
Implement - Stochastic Gradient Descent (SGD)Must know
Stochastic gradient descent estimates the gradient from a small random batch of examples instead of the whole dataset, trading a little noise for enormous speed.
Know well - Tensors and ShapesMust know
In deep learning a tensor is just an n-dimensional array of numbers, and keeping track of its shape — batch × sequence × features — is most of the practical work of reading and writing models.
Know well - The Chain RuleMust know
The chain rule says the rate of change through a chain of functions is the product of the rates of change of each link — which is exactly how gradients flow backward through the layers of a network.
Know well - VectorsMust know
A vector is an ordered list of numbers, and in machine learning it is how every object — a house, a word, an image — becomes something a model can compute with.
Know well
Chapter 3
Machine Learning
- Data LeakageMust know
Data leakage is when training or evaluation data contains information that won't be available when the model is actually used — making results look far better than they really are.
Know well - Distribution ShiftMust know
Distribution shift is when the data a model meets in use differs from the data it was trained on, so its measured performance no longer applies.
Understand - Evaluation Metrics for ClassifiersMust know
Accuracy alone can mislead; precision (how many flagged items were right), recall (how many true items were caught) and the confusion matrix show what kind of mistakes a classifier makes.
Know well - Features, Labels and TasksMust know
A supervised learning problem is a table: each row is an example described by features, and the label is what the model must predict — a category (classification) or a number (regression).
Know well - Generalization, Overfitting and UnderfittingMust know
The goal of learning is generalization — good performance on data the model has never seen — and a model that memorizes its training data (overfits) or is too simple to capture the pattern (underfits) fails at it.
Know well - Hand-Crafted Features vs Learned FeaturesMust know
Classical ML learns only the final mapping from features to labels — people design the features — while deep learning learns the features too, directly from raw data.
Know well - Linear RegressionMust know
Linear regression predicts a number as a weighted sum of the features plus a constant, choosing the weights that minimize the average squared error on the training data.
Implement - Logistic RegressionMust know
Logistic regression is a linear classifier: it computes a weighted sum of the features and squashes it through a sigmoid to get a probability, trained by minimizing cross-entropy.
Implement - RegularizationMust know
Regularization is anything that discourages a model from fitting the training data too closely — most commonly a penalty on large weights — so that it generalizes better.
Know well - Supervised, Unsupervised and Self-Supervised LearningMust know
Learning paradigms differ in where the training signal comes from: human-provided labels (supervised), structure in the data alone (unsupervised), or labels manufactured from the data itself (self-supervised).
Know well - Decision Trees and Random ForestsShould know
A decision tree predicts by asking a sequence of yes/no questions about the features; a random forest averages many randomized trees to get a much more accurate and stable model.
Understand - k-Means ClusteringShould know
k-means groups unlabelled points into k clusters by alternating two steps: assign each point to its nearest centre, then move each centre to the mean of its points.
Know well - Naive BayesShould know
Naive Bayes classifies by applying Bayes' theorem with the simplifying ('naive') assumption that features are independent given the class — crude, but fast and often surprisingly effective for text.
Understand - Principal Component Analysis (PCA)Should know
PCA finds the few directions along which data varies the most, so high-dimensional data can be summarized, compressed or plotted with little loss.
Understand - Support Vector MachinesShould know
A support vector machine chooses the separating boundary with the widest possible margin to the nearest points, and with the kernel trick it can draw curved boundaries by implicitly working in a higher-dimensional feature space.
Understand
Chapter 4
Neural Networks
- Activation FunctionsMust know
An activation function is the nonlinearity applied after each neuron's weighted sum; without it, any stack of layers would collapse into a single linear map.
Know well - BackpropagationMust know
Backpropagation computes how much every weight in a network contributed to the error, by passing the error backward from the output layer by layer using the chain rule.
Implement - Computational Graphs and AutodiffMust know
A computational graph records every elementary operation of a calculation, so that software can compute exact derivatives of the output with respect to every input automatically.
Know well - From MLPs to Transformers: The Architecture StoryMust know
Neural network architectures evolved by building the structure of the data into the network — convolutions for images, recurrence for sequences — until attention offered a more general way to connect everything.
Understand - Multilayer Perceptron (MLP)Must know
A multilayer perceptron stacks layers of neurons — input, one or more hidden layers, output — so that each layer builds new features out of the previous layer's outputs.
Know well - Representation LearningMust know
Representation learning means the network learns its own features: each layer transforms the data into a new representation, from simple patterns in early layers to abstract concepts in later ones.
Know well - The Artificial NeuronMust know
An artificial neuron computes a weighted sum of its inputs, adds a bias, and passes the result through a nonlinear activation function — a dot product plus a bend.
Implement - The Forward PassMust know
The forward pass is computing a network's output from its input: layer by layer, multiply by weights, add biases, apply activations.
Implement - The PerceptronMust know
The perceptron (1958) is a single artificial neuron that outputs 1 if a weighted sum of its inputs exceeds a threshold, with a simple rule for learning the weights from mistakes.
Know well - Vanishing and Exploding GradientsMust know
In a deep network the gradient reaching early layers is a product of many per-layer factors, so it tends to shrink toward zero or blow up exponentially with depth — making early layers learn far too slowly or unstably.
Know well - Batch NormalizationShould know
Batch normalization rescales each layer's activations to zero mean and unit variance using statistics from the current mini-batch, making deep networks train faster and more stably.
Understand - DropoutShould know
Dropout randomly switches off a fraction of neurons at each training step, so the network can't rely on any single unit and must learn redundant, more general features.
Know well - Weight InitializationShould know
Initialization sets the random starting weights at a scale that keeps signals and gradients roughly the same size from layer to layer, so deep networks can start learning at all.
Understand
Chapter 6
Language Before Transformers
- AttentionMust know
Attention lets a model build each output from a weighted mix of all the inputs, with the weights computed on the fly from how relevant each input is.
Know well - EmbeddingsMust know
An embedding is a learned vector for an item — a word, token, document or image — positioned so that items used in similar ways end up close together.
Know well - Language ModelingMust know
A language model assigns a probability to each possible next text unit given the units before it.
Know well - LSTMs and GRUsMust know
LSTMs and GRUs add learned gates to a recurrent network so it can keep, discard and update information more deliberately.
Understand - N-Gram ModelsMust know
An n-gram model predicts the next word by counting what followed the previous n−1 words in a corpus.
Know well - One-Hot EncodingMust know
A one-hot vector represents a vocabulary item with a 1 in its own position and 0 everywhere else.
Know well - Recurrent Neural NetworksMust know
An RNN reads a sequence one step at a time, updating a hidden state that carries information from earlier steps.
Know well - Sequence-to-Sequence ModelsMust know
A sequence-to-sequence model uses an encoder to read one sequence and a decoder to produce another, possibly of a different length.
Know well - Text as DataMust know
A language model receives a sequence of discrete text units and must map each unit to a vocabulary ID before any neural computation can begin.
Know well - The Fixed-Vector BottleneckMust know
Early encoder-decoder models compressed every detail of the source sequence into one fixed-size vector before decoding.
Know well - Word2VecMust know
Word2vec trains compact word vectors with simple local-context prediction tasks rather than a full neural language model.
Understand - GloVeShould know
GloVe learns word vectors from global word co-occurrence statistics, providing another route to distributional geometry.
Understand - Neural Language ModelShould know
A neural language model learns word vectors and a probability function together, so similar contexts can support one another.
Understand - Neural Machine TranslationShould know
Neural machine translation trains an encoder and decoder to map a source-language sequence to a target-language sequence.
Understand
Chapter 7
Transformers
- Causal MaskingMust know
A causal mask stops each position from attending to later positions, so a model trained to predict the next token can't simply look at it.
Know well - Encoder, Decoder & Encoder–DecoderMust know
The same Transformer block is wired three ways: encoder-only models (BERT) read in both directions to understand text, decoder-only models (GPT) predict the next token to generate it, and encoder–decoder models (T5) map one sequence to another.
Know well - Feed-Forward Sublayer (MLP)Must know
The feed-forward sublayer is a small two-layer neural network applied to each token separately, transforming the information that attention has gathered.
Know well - Layer NormalizationMust know
Layer normalization rescales each token's vector to zero mean and unit variance (then applies a learned scale and shift), keeping activations in a stable range.
Understand - Multi-Head AttentionMust know
Multi-head attention runs several smaller attention operations in parallel, each with its own learned queries, keys and values, so a layer can track several kinds of relationship at once.
Know well - Positional EncodingMust know
Positional encodings add information about each token's position, because attention on its own treats a sentence as an unordered set.
Know well - Residual ConnectionsMust know
A residual connection adds a layer's input to its output (x + f(x)), so each layer learns a correction instead of a complete replacement.
Know well - Self-AttentionMust know
Self-attention lets every token in a sequence look at every other token, decide how relevant each one is, and update itself with a weighted mix of what it finds.
Implement - The Transformer BlockMust know
A Transformer block is attention followed by a feed-forward network, each wrapped in normalization and a residual connection — and a Transformer is just many identical blocks stacked.
Implement