Perceptrons and feed-forward networks
A network alternates affine transformations with activations. Forward evaluation computes predictions; reverse differentiation computes parameter gradients. Write the value at every node before differentiating a small exam network.
9.1 Linear threshold perceptron
Past papers · DA 2024–2026 (3 papers): 1 question, 1 mark
A single perceptron uses and labels . Follow the question's convention at ; some algorithms update on every nonpositive signed score, while others update only on a misclassification.
An update increases that observation's signed score but need not classify it correctly immediately. It may spoil another observation. On a finite strictly separable dataset, the standard mistake-driven perceptron converges after finitely many updates. This is not guaranteed for nonseparable data; a single affine threshold cannot represent XOR.
For the standard update on , augment the input by for bias. If the augmented vectors have norms at most , and a unit separating vector gives signed scores at least , zero initial weights and a fixed positive step give at most updates. The bound concerns the augmented space and is usually loose.
9.2 Layer values, activations and parameter counts
Past papers · DA 2024–2026 (3 papers): 3 questions, 6 marks
Let the network have widths , where is the input width and the output width. Layer has matrix of shape and bias .
ReLU is continuous everywhere and positively homogeneous: for . It is not invariant under scaling. On a fixed activation pattern, a ReLU network is affine: replace each active ReLU by identity and each inactive one by zero. Only collapse all layers to a single affine map where that pattern remains valid. A network containing only affine layers is globally affine regardless of depth. Nonlinear hidden activations allow nonlinear boundaries, including XOR.
Use an identity output for unrestricted numerical regression, sigmoid for a binary probability, and softmax for mutually exclusive multiclass probabilities. A sigmoid at each output instead permits multiple independent binary labels.
9.3 Backpropagation and gradient updates
Past papers · DA 2024–2026 (3 papers): 2 questions, 3 marks
Use the layer symbols from Section 9.2 and a differentiable per-observation loss . Let . Work away from activation kinks unless a subgradient convention is supplied.
Use pre-update weights throughout one backward pass. For an output derivative rather than a loss derivative, start the reverse pass with derivative one at that output. Every directed path contributes a product of local derivatives; contributions from multiple paths add. An inactive ReLU blocks derivatives through that path.
Last-minute recall
- A perceptron update improves the updated point's signed score.
- Biases are counted once per non-input neuron.
- ReLU has no ordinary derivative at zero.
- Affine layers without nonlinear activations collapse to one affine map.
- Softmax is invariant to a common score shift.
- Backpropagation is the chain rule with path contributions added.
- Gradient descent subtracts the gradient of the stated objective.