Here the pieces from Modules 1–2 assemble into an actual trainable network: neurons, layers, the forward pass, backpropagation, the Adam optimizer, regularization, and the training curves your examiners will put in front of you.
A single artificial neuron takes an input vector x, computes a dot product with its own weight vector w, adds a bias b, and passes the result through a nonlinear activation σ (e.g. ReLU): output = σ(w·x + b). One neuron, one number out.
A layer is just many neurons looking at the same input. Stack their weight vectors as rows of a matrix W and their biases into a vector b, and the whole layer is Module 1's favorite equation with a nonlinearity wrapped around it:
Layers between the input and the output are called hidden layers, and a plain stack of such fully-connected layers is a multi-layer perceptron (MLP) — the simplest deep network.
The forward pass is simply running the composition of Module 1.3: the input enters layer 1, its output feeds layer 2, and so on until the final layer. For a K-class classifier, the last layer outputs K raw scores — the logits — and softmax (Module 1.6) converts them into a probability distribution over the classes.
During training, the forward pass ends with one more step: the predicted distribution and the one-hot label go into the cross-entropy loss, producing the single badness number the whole update revolves around.
To do gradient descent we need ∂L/∂w for every weight in the network — possibly millions of them. Backpropagation is the chain rule (Module 1.4) organized efficiently: starting from the loss, it sweeps backward through the layers, reusing intermediate results so that one forward pass plus one backward pass yields the gradient of the loss with respect to every single weight.
You will never derive these gradients by hand. Modern frameworks record the forward computation and apply the chain rule automatically ("autodiff") — PyTorch, which Paper 2 uses, does this with a single call. What you must be able to say in the exam: backprop computes gradients, it is exact (not an approximation), and its cost is roughly the same order as the forward pass.
Plain SGD takes the raw (noisy) mini-batch gradient and steps. Two upgrades dominate practice:
Adam combines both: it tracks a momentum-style running mean of the gradient (controlled by β1) and a running mean of its squared magnitude (β2), and divides the step by the square root of the latter (with a tiny ε to avoid dividing by zero).
Regularization is any technique that trades a little training-set fit for better generalization (the overfitting cure family from Module 2.6). The two you must know cold:
Data augmentation — creating extra training examples by transforming real ones — is regularization by another route: it enlarges and diversifies the training set instead of constraining the model. Both papers rely on it; the details live in Module 4.
Early stopping operationalizes the overfitting diagnostic from Module 2.6: after every epoch, measure the validation loss. If it hasn't improved for a set number of epochs — the patience — stop training. Then restore the checkpoint (saved copy of the weights) from the epoch with the best validation loss, not the last epoch's weights: those final epochs may already have drifted into overfitting.
Examiners love handing you a plot of loss (or accuracy) vs. epochs, with one curve for training and one for validation, and asking "what's happening here?" The three patterns to recognize instantly:
| Pattern | What you see | Diagnosis / action |
|---|---|---|
| Healthy convergence | Both curves fall together and flatten out, with a small, stable gap (validation slightly above training) | All is well — stop when the validation curve flattens (early stopping does this for you) |
| Overfitting | Training loss keeps falling; validation loss bottoms out and climbs — the gap widens | Regularize: dropout, weight decay, augmentation, more data; stop at the validation minimum |
| Learning rate too high | Loss oscillates wildly, plateaus at a high value, or explodes upward — often from the very first epochs, on both curves | Lower η; the optimizer is overshooting (Module 2.4's divergence) |
Two more cues worth naming aloud: both curves flat and high from the start suggests underfitting (model too small, or η too small to move); training accuracy near 100% with much lower validation accuracy is the accuracy-view of overfitting. Paper 1's reported behavior — validation loss tracking training loss down and flattening by ~epoch 12 — is the healthy pattern.