Mikhail Mikhasenko · Lecture 3A
Trees (2A, 2B): piecewise-constant models grown by greedy cuts.
Neural networks are smooth functions with many parameters, fitted by following the gradient of the loss.
1943 McCulloch & Pitts: a binary-threshold neuron model
1949 Hebb: connections that fire together strengthen
1958 Rosenblatt: the perceptron learns weights from labelled examples (Mark I Perceptron: 20 × 20 photocell images)
1969 Minsky & Papert, Perceptrons: the limits of one layer

Warren McCulloch and Walter Pitts, Chicago 1949
An affine map followed by a nonlinearity. The perceptron uses a step: if , else .
The boundary is a straight line (a hyperplane in dimensions).
For each example, with prediction :
Correct predictions change nothing; a mistake tilts the line towards the misclassified point.
If a separating line exists, the rule finds one in a finite number of steps.
1969: Minsky and Papert prove that a single-layer perceptron cannot compute some simple functions, for example XOR.
| XOR | ||
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
No single line separates the ones from the zeros. Funding and interest in neural networks declined through the 1970s.

| OR | AND | OR − AND | ||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 |
| 0 | 1 | 1 | 0 | 1 |
| 1 | 0 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 | 0 |
The hidden units compute new features. In the (OR, AND) plane, XOR is separable by one line.
Stack layers of neurons. With :
has shape : each row holds the weights of one unit.
Dense (fully connected): every unit sees every unit of the previous layer.
Example, MNIST 784–800–10: parameters.
Without , two layers collapse into one:
Any depth of linear layers is still one linear map: one line, no XOR.
The activation bends the space between layers. Composing many simple bends builds complicated functions.
1989, Cybenko: one hidden layer is enough. For a sigmoidal , any continuous on a bounded domain and any there exist and parameters with
Hornik (1991), Leshno et al. (1993): any non-polynomial activation works, including ReLU.
In practice, deep networks reach the same accuracy with far fewer units than one wide layer.
Four hidden ReLU units, no output bias:
Each unit adds one kink at , where the slope changes by .
| Task | Output unit | Loss |
|---|---|---|
| Regression | identity: | squared error |
| Binary classification | sigmoid | cross-entropy |
| classes | softmax | cross-entropy |
| Positive quantity | softplus | e.g. Gaussian negative log-likelihood |
For sigmoid or softmax with cross-entropy, the gradient at the output is simply .
The loss averages over training examples:
Step against the gradient:
is the learning rate.
Like walking downhill in the dark with a flashlight: you only see the slope at your feet.
Near a minimum with curvature the error is multiplied by at every step:
Forward: compute and store every intermediate value. Backward: multiply local derivatives from the loss towards the inputs.
Define the error signal , where :
One backward pass costs about as much as one forward pass, whether the network has ten parameters or ten billion.
1970 Linnainmaa: reverse-mode automatic differentiation
1974 Werbos: applied to neural networks
1986 Rumelhart, Hinton & Williams: rediscovered and popularized

2024 Nobel Prize in Physics, Hopfield & Hinton: “for foundational discoveries and inventions that enable machine learning with artificial neural networks”
With examples, the exact gradient is expensive. Estimate it on a random batch of examples (–):
The loss being minimized changes a little every step. One pass over all data is an epoch.
With a batch dimension the input is a matrix of shape :
Every layer is one matrix multiplication, which GPUs execute very fast.
Gradient noise shrinks like , and a little noise can help escape saddle points and sharp minima.
Keep the inertia of the motion:
Unrolled, : an exponentially decaying memory of past gradients, about steps for .
Polyak’s “heavy ball” (1964).
Give every parameter its own step size. Per coordinate:
Defaults: , , , .
Momentum (first moment ): speed along consistent directions
RMSProp (second moment ): per-parameter step sizes
Bias correction: and start at zero
The default choice for most networks today, often as AdamW with decoupled weight decay.
If all weights start equal, all units in a layer compute the same function and receive the same gradient, forever. Start with and random .
For with independent terms, . Keep the variance of signals and gradients constant from layer to layer.
Tanh, sigmoid: Glorot (Xavier), 2010
ReLU: He (Kaiming), 2015
ReLU zeroes half the signal, hence the factor 2.
A large network can memorize the training data, noise included (bias and variance, Lecture 2A).
2009 Training on GPUs
2010 Glorot & Bengio: why deep networks were hard to train, better initialization
2011–12 ReLU and dropout
2012 AlexNet wins ImageNet by a wide margin
2015 Deep networks dominate vision, speech and language benchmarks
Next lecture: how convolutional networks see.
Thank you for the attention