Skip to content
BIASED

From linear models to networks

Block 1 of 8~2 min

Features someone designed

The topic Gradient boosting ended with the strongest tool of this course for tables: boosted trees, with stacking on top. It also ended at a limit: every model so far takes its features as given. Least squares and logistic regression fit a linear function of them. Kernels fix a nonlinear feature map before they see any data. Trees split on columns that someone prepared.

That works when a column already means something: an income, an age, a count of purchases. It fails for raw signals. Take handwritten digits: an 8×88 \times 8 image is 64 pixel brightnesses, and one pixel says almost nothing about the digit. What matters is a pattern across many pixels: a stroke, a loop, a corner. A threshold on one pixel rarely asks a good question. For decades such features of images, sound and text were designed by hand: edge histograms, spectral coefficients, counts of n-grams.

A neural network learns the feature map from the data, together with the linear model on top of it, by the same gradient descent as in the topic Gradient descent. This topic builds networks out of linear models, asks what they can represent, and sets up their outputs and losses. The next topic computes their gradients.

Notation. A network has layers l=1,…,Ll = 1, \dots, L of widths d1,…,dLd_1, \dots, d_L, with d0=dd_0 = d. Layer ll has a weight matrix Wl∈Rdl×dl−1W_l \in \mathbb R^{d_l \times d_{l-1}} and a bias bl∈Rdlb_l \in \mathbb R^{d_l}. It computes the pre-activation zlz_l and the activation hlh_l:

zl=Wlhl−1+bl,hl=φ(zl),h0=x.z_l = W_l h_{l-1} + b_l, \qquad h_l = \varphi(z_l), \qquad h_0 = x .

The activation function φ\varphi acts on each coordinate. In this topic φ\varphi is always an activation, not a kernel's feature map. The last layer has no activation: its output f(x)=zLf(x) = z_L is a prediction or a vector of logits.

Answers are saved on the server and tied to this browser until you sign in.