Hidden layers & backpropagation

Reader-friendly version of the 39 lecture slides: the lecture content in normal flow, with figure descriptions and data tables where the figure carries data. Open the presentation.

Slide 1

Brown University crest
CPSY 1291 Computational Methods for Mind, Brain & Behavior
Lecture 9 · Theme 2: Learning representations: from neurons to deep networks

Hidden layers & backpropagation

Tuesday, October 13 · Fall 2026

Return to contents

Slide 2

Last lecture: one neuron that learns

A model neuron with two inputs, x1 and x2, with weights w1 and w2, summed with a bias b into z, passed through the nonlinearity g, giving the output a = g(w1 x1 + w2 x2 + b)

A model neuron with two inputs, x1 and x2, with weights w1 and w2, summed with a bias b into z, passed through the nonlinearity g, giving the output a = g(w1 x1 + w2 x2 + b)

Open full-size figure
  • Perceptron: y^=sign(z)\hat y = \mathrm{sign}(z), labels ±1\pm 1
  • Delta rule: y^=z\hat y = z, squared error
  • Logistic regression: y^=σ(z)\hat y = \sigma(z), cross-entropy
  • The model neuron: a weighted sum z=𝐰⊤𝐱+bz = \textcolor{#B5396B}{\mathbf{w}}^\top\textcolor{#3E6D8E}{\mathbf{x}} + \textcolor{#3F7A6B}{b}, then a nonlinearity a=g(z)a = \textcolor{#7A4FA3}{g}(z). Its weights set one decision boundary
  • Learning: the loss ℓ\ell measures the gap between the output y^=a\hat y = a and the target yy; the weights move against its gradient
  • All three rules of last lecture share one update: learning rate × error × input

Δ𝐰=η (y−y^) 𝐱\Delta \textcolor{#B5396B}{\mathbf{w}} = \eta\,(y-\hat y)\,\textcolor{#3E6D8E}{\mathbf{x}}

Return to contents

Slide 3

Learning the weights: start anywhere, walk downhill

Contours of the loss over the two weights w1 and w2, with the minimum marked by a star. At the start w(0), at the upper left, a dark arrow shows the gradient pointing uphill, with dashed arrows for its two components, the partial derivatives with respect to w1 and w2. A magenta arrow labelled minus the gradient points the other way, to w(1); eight dots w(0) to w(8) step down toward the minimum

Contours of the loss over the two weights w1 and w2, with the minimum marked by a star. At the start w(0), at the upper left, a dark arrow shows the gradient pointing uphill, with dashed arrows for its two components, the partial derivatives with respect to w1 and w2. A magenta arrow labelled minus the gradient points the other way, to w(1); eight dots w(0) to w(8) step down toward the minimum

Open full-size figure
  • Each pair (w1,w2)(w_1, w_2) has a loss ℓ\ell: the squared error 12(y−y^)2\tfrac12(y-\hat y)^2, averaged over a small training set; contours join equal losses
  • Start at small random weights 𝐰(0)\textcolor{#B5396B}{\mathbf{w}}^{(0)}. The gradient ∇ℓ=(∂ℓ/∂w1, ∂ℓ/∂w2)\nabla\ell = (\partial\ell/\partial w_1,\ \partial\ell/\partial w_2) points uphill, toward higher loss
  • Each step is a weight update against the gradient; the learning rate η\eta sets its size

𝐰(t+1)=𝐰(t)−η ∇ℓ\textcolor{#B5396B}{\mathbf{w}}^{(t+1)} = \textcolor{#B5396B}{\mathbf{w}}^{(t)} - \eta\,\nabla\ell

  • For this neuron the loss is convex, a bowl with a single minimum. From any start, small enough steps reach the bottom

Return to contents

Slide 4

You never see the whole landscape

Return to contents

Slide 5

The chain rule, one link at a time

∂ℓ∂𝐰=∂ℓ∂y^  ∂y^∂z  ∂z∂𝐰\frac{\partial\ell}{\partial \textcolor{#B5396B}{\mathbf{w}}}=\frac{\partial\ell}{\partial\hat y}\;\frac{\partial\hat y}{\partial z}\;\frac{\partial z}{\partial \textcolor{#B5396B}{\mathbf{w}}}

Return to contents

Slide 6

The three links, worked out: delta rule

Output y^=z\hat y = z (no nonlinearity), loss ℓ=12(y−y^)2\ell = \tfrac12(y-\hat y)^2

∂ℓ∂y^=12⋅2 (y−y^)⋅(−1)=−(y−y^)\frac{\partial\ell}{\partial\hat y} = \tfrac12\cdot 2\,(y-\hat y)\cdot(-1) = -(y-\hat y)

∂y^∂z=1∂z∂𝐰=𝐱\frac{\partial\hat y}{\partial z} = 1 \qquad\qquad \frac{\partial z}{\partial \textcolor{#B5396B}{\mathbf{w}}} = \textcolor{#3E6D8E}{\mathbf{x}}

∂ℓ∂𝐰=−(y−y^)⋅1⋅𝐱=−(y−y^) 𝐱\frac{\partial\ell}{\partial \textcolor{#B5396B}{\mathbf{w}}} = -(y-\hat y)\cdot 1\cdot \textcolor{#3E6D8E}{\mathbf{x}} = -(y-\hat y)\,\textcolor{#3E6D8E}{\mathbf{x}}

Return to contents

Slide 7

The three links, worked out: logistic regression

Output y^=σ(z)=11+e−z\hat y = \sigma(z) = \dfrac{1}{1+e^{-z}}, loss ℓ=−[ ylog⁡y^+(1−y)log⁡(1−y^) ]\ell = -\big[\,y\log\hat y + (1-y)\log(1-\hat y)\,\big]

∂ℓ∂y^=−yy^+1−y1−y^=−y(1−y^)+(1−y) y^y^(1−y^)=−y−y^y^(1−y^)\frac{\partial\ell}{\partial\hat y} = -\frac{y}{\hat y}+\frac{1-y}{1-\hat y} = \frac{-y(1-\hat y)+(1-y)\,\hat y}{\hat y(1-\hat y)} = -\frac{y-\hat y}{\hat y(1-\hat y)}

∂y^∂z=σ(z)(1−σ(z))=y^(1−y^)∂z∂𝐰=𝐱\frac{\partial\hat y}{\partial z} = \sigma(z)\big(1-\sigma(z)\big) = \hat y(1-\hat y) \qquad\qquad \frac{\partial z}{\partial \textcolor{#B5396B}{\mathbf{w}}} = \textcolor{#3E6D8E}{\mathbf{x}}

∂ℓ∂𝐰=−y−y^y^(1−y^)⋅y^(1−y^)⋅𝐱=−(y−y^) 𝐱\frac{\partial\ell}{\partial \textcolor{#B5396B}{\mathbf{w}}} = -\frac{y-\hat y}{\hat y(1-\hat y)}\cdot\hat y(1-\hat y)\cdot \textcolor{#3E6D8E}{\mathbf{x}} = -(y-\hat y)\,\textcolor{#3E6D8E}{\mathbf{x}}

Return to contents

Slide 8

The perceptron is gradient descent after all

Return to contents

Slide 9

Why more than one layer?

Return to contents

Slide 10

One line fails on XOR; simpler rules do not

x1 XOR x2=(x1∨x2)∧¬(x1∧x2)x_1 \,\text{XOR}\, x_2 = (x_1 \lor x_2) \land \lnot(x_1 \land x_2)

Four small panels. XOR: the four inputs with the best single line, 3 of 4 right, the wrong point (1,1) circled. OR: the four inputs, with (0,1), (1,0) and (1,1) green and (0,0) blue, separated by the gold line x1 + x2 = 0.5. AND: only (1,1) green, separated by the line x1 + x2 = 1.5. NOT (x1 AND x2): the four inputs, green except (1,1) in blue, separated by the gold line x1 + x2 = 1.5, shaded below it

Four small panels. XOR: the four inputs with the best single line, 3 of 4 right, the wrong point (1,1) circled. OR: the four inputs, with (0,1), (1,0) and (1,1) green and (0,0) blue, separated by the gold line x1 + x2 = 0.5. AND: only (1,1) green, separated by the line x1 + x2 = 1.5. NOT (x1 AND x2): the four inputs, green except (1,1) in blue, separated by the gold line x1 + x2 = 1.5, shaded below it

Open full-size figure

Return to contents

Slide 11

Stack them: two hidden units and one output

The four XOR points, blue at (0,0) and (1,1), green at (0,1) and (1,0). Two hidden units, then one output: two gold lines, x1 + x2 = 0.5 and x1 + x2 = 1.5, bound a band that is the output's green region, and all 4 points are right

The four XOR points, blue at (0,0) and (1,1), green at (0,1) and (1,0). Two hidden units, then one output: two gold lines, x1 + x2 = 0.5 and x1 + x2 = 1.5, bound a band that is the output's green region, and all 4 points are right

Open full-size figure

Return to contents

Slide 12

The hidden layer re-represents the input

The XOR network of the previous slide: inputs x1 and x2, weights of 1 into both ReLU hidden units, biases 0 and minus 1, output weights 1 and minus 2, output is a step unit with bias minus 0.5

The XOR network of the previous slide: inputs x1 and x2, weights of 1 into both ReLU hidden units, biases 0 and minus 1, output weights 1 and minus 2, output is a step unit with bias minus 0.5

Open full-size figure
  • aj[l]a^{[l]}_j: output of unit jj in layer ll (layer 1 is hidden). With ReLUs, unit 1 acts like OR, unit 2 like AND
  • In the plane of a1[1],a2[1]a^{[1]}_1, a^{[1]}_2, (0,1) and (1,0) land on one point: one line separates the classes
  • The hidden layer turns XOR into a linearly separable problem for the readout
The four XOR inputs in hidden-unit coordinates a1 and a2 of layer 1: blue (0,0) at the origin, green (0,1) and (1,0) together at (1,0), blue (1,1) at (2,1). One solid gold line separates the green point, on the shaded side, from the two blue points. The caption reads: in the hidden layer, one line suffices

The four XOR inputs in hidden-unit coordinates a1 and a2 of layer 1: blue (0,0) at the origin, green (0,1) and (1,0) together at (1,0), blue (1,1) at (2,1). One solid gold line separates the green point, on the shaded side, from the two blue points. The caption reads: in the hidden layer, one line suffices

Open full-size figure

Return to contents

Slide 13

Why the ReLU matters: linear layers collapse into one

Return to contents

Slide 14

With hidden layers, the landscape is no longer a bowl

A loss curve over one weight w with three valleys of different depths. Two starting points chosen at random; gradient descent from each follows the curve downhill to a different valley: one reaches the deepest valley, marked global minimum, the other stops in a shallower valley, marked local minimum

A loss curve over one weight w with three valleys of different depths. Two starting points chosen at random; gradient descent from each follows the curve downhill to a different valley: one reaches the deepest valley, marked global minimum, the other stops in a shallower valley, marked local minimum

Open full-size figure
  • Once a network has hidden layers, the loss is not convex: it has many valleys, local minima
  • Gradient descent still goes down from wherever it starts. Different starts can end in different minima; none is guaranteed best
  • In practice, large networks usually reach a minimum that works well. That is an observation, not a guarantee

Return to contents

Slide 15

How can a hidden unit learn when nothing tells it what to output?

Return to contents

Slide 16

Backpropagation: a long and disputed history

Return to contents

Slide 17

Notation for a network with layers

  • Layers are numbered: the input is layer 0, 𝐚[0]=𝐱\mathbf{a}^{[0]}=\mathbf{x}; the output is the last layer, LL, so y^=a[L]\hat y = a^{[L]} (LL = number of layers)
  • Unit jj of layer ll: weighted sum zj[l]z^{[l]}_j, output aj[l]=g(zj[l])a^{[l]}_j = g\big(z^{[l]}_j\big)
  • wjk[l]\textcolor{#B5396B}{w}^{[l]}_{jk}: one weight (a number), into unit jj of layer ll from unit kk of the layer below: zj[l]=∑kwjk[l] ak[l−1]+bj[l]z^{[l]}_j = \sum_k \textcolor{#B5396B}{w}^{[l]}_{jk}\,a^{[l-1]}_k + b^{[l]}_j, with bias bj[l]b^{[l]}_j. Layer ll's weights form the matrix 𝐖[l]\textcolor{#B5396B}{\mathbf{W}}^{[l]}
A fully connected network drawn left to right: inputs x1 to xD (a superscript 0 equals x), hidden layer 1 with units a superscript 1, hidden layer 2 with units a superscript 2, and an output layer y-hat. Every unit connects to every unit of the next layer; the weight matrices W superscript 1, 2 and 3 label the gaps

A fully connected network drawn left to right: inputs x1 to xD (a superscript 0 equals x), hidden layer 1 with units a superscript 1, hidden layer 2 with units a superscript 2, and an output layer y-hat. Every unit connects to every unit of the next layer; the weight matrices W superscript 1, 2 and 3 label the gaps

Open full-size figure

Return to contents

Slide 18

Nudge a hidden unit and follow the effect

How does the loss change if hidden unit jj's weighted sum zj[1]z^{[1]}_j grows by a small amount ε\varepsilon?

Nudge a hidden unit and follow the effect — table
follows the chain in math
1 its output aj[1]=g(zj[1])a^{[1]}_j = g(z^{[1]}_j) moves by its slope × ε\varepsilon g′(zj[1]) εg'(z^{[1]}_j)\,\varepsilon
2 the output unit's sum z[2]z^{[2]} moves by the connecting weight × that wj[2] g′(zj[1]) ε\textcolor{#B5396B}{w}^{[2]}_j\,g'(z^{[1]}_j)\,\varepsilon
3 the loss moves by the output's error × that, as in logistic regression (y^−y) wj[2] g′(zj[1]) ε(\hat y - y)\,\textcolor{#B5396B}{w}^{[2]}_j\,g'(z^{[1]}_j)\,\varepsilon

Return to contents

Slide 19

Backpropagation: the recipe, for any network

  1. Forward: run the input through and keep every weighted sum zz and output aa
  2. Output error: the output has a target, so its error is   δout=y^−y\;\delta_{\text{out}} = \hat y - y
  3. Backward: each hidden unit's error = the errors of the units it feeds, each × the weight to them, all × its own slope:   δj=g′(zj) ∑kwkj δk\;\delta_j = g'(z_j)\,\sum_k \textcolor{#B5396B}{w}_{kj}\,\delta_k
  4. Gradients: each weight's gradient = error of the unit it enters × its input: ∂ℓ/∂w=δ×input\partial\ell/\partial \textcolor{#B5396B}{w} = \delta \times \text{input}

Return to contents

Slide 20

Where the recipe comes from: the chain rule

δout=∂ℓ∂y^ ∂y^∂zout=y^−y\delta_{\text{out}} = \frac{\partial\ell}{\partial\hat y}\,\frac{\partial\hat y}{\partial z_{\text{out}}} = \hat y - y

δj=∂ℓ∂zj=∑k∂ℓ∂zk⏟δk  ∂zk∂aj⏟wkj  ∂aj∂zj⏟g′(zj)∂ℓ∂wjk=∂ℓ∂zj⏟δj  ∂zj∂wjk⏟ak\delta_j = \frac{\partial\ell}{\partial z_j} = \sum_k \underbrace{\frac{\partial\ell}{\partial z_k}}_{\textstyle\delta_k}\;\underbrace{\frac{\partial z_k}{\partial a_j}}_{\textstyle \textcolor{#B5396B}{w}_{kj}}\;\underbrace{\frac{\partial a_j}{\partial z_j}}_{\textstyle g'(z_j)} \qquad\qquad \frac{\partial\ell}{\partial \textcolor{#B5396B}{w}_{jk}} = \underbrace{\frac{\partial\ell}{\partial z_j}}_{\textstyle\delta_j}\;\underbrace{\frac{\partial z_j}{\partial \textcolor{#B5396B}{w}_{jk}}}_{\textstyle a_k}

Return to contents

Slide 21

Back to XOR: learn the weights from random ones

A 2-2-1 network drawn left to right. Inputs x1 = 1 and x2 = 0; six magenta weights; two hidden units marked with red question marks and the words target?; an output unit at 0.54; a box on the right reading target y = 1

A 2-2-1 network drawn left to right. Inputs x1 = 1 and x2 = 0; six magenta weights; two hidden units marked with red question marks and the words target?; an output unit at 0.54; a box on the right reading target y = 1

Open full-size figure

Return to contents

Slide 23

Step 1: the forward pass

The same network after the forward pass. The box on the right now reads target y = 1, loss 0.61, and underneath, equals minus log y hat

The same network after the forward pass. The box on the right now reads target y = 1, loss 0.61, and underneath, equals minus log y hat

Open full-size figure

Return to contents

Slide 24

Step 2: the error at the output

The same network. A green arrow runs back from the loss box to the output unit, and a green tag under the output reads delta = minus 0.46

The same network. A green arrow runs back from the loss box to the output unit, and a green tag under the output reads delta = minus 0.46

Open full-size figure

Return to contents

Slide 25

Step 3: send the error backward

The same network. Green arrows run back from the output to each hidden unit, labelled times 0.70 and times minus 0.60. Green tags read delta 1 = minus 0.32 next to a1 of layer 1 and delta 2 = 0.27 next to a2 of layer 1

The same network. Green arrows run back from the output to each hidden unit, labelled times 0.70 and times minus 0.60. Green tags read delta 1 = minus 0.32 next to a1 of layer 1 and delta 2 = 0.27 next to a2 of layer 1

Open full-size figure

Return to contents

Slide 26

Step 4: every gradient is error × activity

The same network with the weights replaced by their gradients in green: minus 0.32 and 0.27 on the connections from x1, 0 on both connections from x2, minus 0.23 and minus 0.14 on the connections into the output. The error tags stay in place

The same network with the weights replaced by their gradients in green: minus 0.32 and 0.27 on the connections from x1, 0 on both connections from x2, minus 0.23 and minus 0.14 on the connections into the output. The error tags stay in place

Open full-size figure

Return to contents

Slide 27

Try it: train a small network on 2-D data

Return to contents

Slide 28

Many classes: one output per class, then a softmax

Two panels stacked. Top, two classes: inputs x1 to xD, each with its weight, summed into z, passed through a sigmoid to give one probability y-hat (logistic regression). Bottom, K classes: the same inputs feed three output neurons, each with its own weight vector w1, w2, w3, giving logits z1 to z3; a softmax turns them into three probabilities p-hat 1 to 3 that sum to 1 (softmax regression)

Two panels stacked. Top, two classes: inputs x1 to xD, each with its weight, summed into z, passed through a sigmoid to give one probability y-hat (logistic regression). Bottom, K classes: the same inputs feed three output neurons, each with its own weight vector w1, w2, w3, giving logits z1 to z3; a softmax turns them into three probabilities p-hat 1 to 3 that sum to 1 (softmax regression)

Open full-size figure
  • Top: one output, one probability. Bottom, KK classes: KK output units with their own weights, one weighted sum zcz_c per class, the logits
  • Softmax: p^c=ezc/∑jezj\hat p_c = e^{z_c}/\sum_j e^{z_j}, which sum to 1
  • Loss ℓ=−log⁡p^true\ell = -\log \hat p_{\text{true}}; error δc=p^c−yc\delta_c = \hat p_c - y_c
  • Logits (2,1,0)(2,1,0): 𝐩^=(0.67,0.24,0.09)\hat{\mathbf p} = (0.67, 0.24, 0.09); ℓ=0.41\ell = 0.41 if class 1 is true
  • Right and confident, ℓ→0\ell \to 0; wrong and confident, ℓ\ell grows without bound

Return to contents

Slide 29

The training loop

model = nn.Linear(D, K) # D inputs, one logit for each of K classes loss_fn = nn.CrossEntropyLoss() # softmax + cross-entropy, averaged opt = torch.optim.SGD(model.parameters(), lr=0.1) # SGD: a plain gradient step for epoch in range(num_epochs): # one epoch = one pass over the training set opt.zero_grad() # 1. clear the old gradients logits = model(X_train) # 2. forward: logits for every image loss = loss_fn(logits, y_train) # 3. the average cross-entropy loss.backward() # 4. gradient of the loss for every weight opt.step() # 5. update: w <- w - lr * gradient with torch.no_grad(): # evaluate on held-out images acc = (model(X_test).argmax(1) == y_test).float().mean()

Return to contents

Slide 30

Autograd: you never write the backward pass

The worked example as PyTorch records it: x, a weighted sum with W1, z1, ReLU, a1, a weighted sum with W2, z2, and a sigmoid-plus-loss box giving ℓ. Forward values in blue above each quantity, gradients in green below, starting from 1 under ℓ; a long green arrow runs right to left, labelled loss.backward, one reverse sweep, the chain rule at each step. W1 and W2 carry their .grad values

The worked example as PyTorch records it: x, a weighted sum with W1, z1, ReLU, a1, a weighted sum with W2, z2, and a sigmoid-plus-loss box giving ℓ. Forward values in blue above each quantity, gradients in green below, starting from 1 under ℓ; a long green arrow runs right to left, labelled loss.backward, one reverse sweep, the chain rule at each step. W1 and W2 carry their .grad values

Open full-size figure

Return to contents

Slide 31

Reuse a trained network: transfer learning

Two panels joined by an arrow labelled copy the weights. Left, 1, train on ImageNet: an image goes through a stack of layers, from early to late, to an output of 1,000 classes; 1.2 million labelled images, every weight learns. Right, 2, reuse for a new task: the same stack in grey with padlocks, frozen, weights fixed; the old output is replaced by a new readout for K classes, for example 51 objects; a few hundred labelled images, only the readout learns

Two panels joined by an arrow labelled copy the weights. Left, 1, train on ImageNet: an image goes through a stack of layers, from early to late, to an output of 1,000 classes; 1.2 million labelled images, every weight learns. Right, 2, reuse for a new task: the same stack in grey with padlocks, frozen, weights fixed; the old output is replaced by a new readout for K classes, for example 51 objects; a few hundred labelled images, only the readout learns

Open full-size figure

Return to contents

Slide 32

Train only part of a network

model = nn.Sequential(nn.Linear(D, 64), nn.ReLU(), nn.Linear(64, K)) model.load_state_dict(torch.load("trained.pt")) # weights trained earlier for p in model[0].parameters(): # the hidden layer p.requires_grad = False # no gradients: these weights stay fixed opt = torch.optim.Adam(model[2].parameters(), lr=1e-3) # Adam: an optimizer, next lecture

Return to contents

Slide 33

Recap

Return to contents

Slide 34

Further reading for the research trail

Optional: a few research-trail entries over the semester. Any paper mentioned in any lecture qualifies, including those on the Going further slides that follow.

Return to contents

Slide 35

Minute paper

Submit on Canvas → Minute papers → Minute Paper 10 (access code read out in class).

Write three brief points in your own words:

  1. In plain words, no equations: why can a multilayer perceptron solve XOR when a single neuron cannot?
  2. Something you do not yet understand, or a question still open
  3. Another idea you found interesting, and why it matters for brains, behavior or AI

Credit for a thoughtful attempt, not for being correct.

Return to contents

Slide 36

Going further

Optional slides, beyond the core of the lecture

Return to contents

Slide 37

Weight transport: must feedback copy the weights?

Feedback alignment, from Lillicrap et al. 2016, Fig. 2: with fixed random feedback weights the hidden-unit updates come within 90 degrees of backprop's, and the MNIST test error of feedback alignment nearly matches backprop's

Feedback alignment, from Lillicrap et al. 2016, Fig. 2: with fixed random feedback weights the hidden-unit updates come within 90 degrees of backprop's, and the MNIST test error of feedback alignment nearly matches backprop's

Open full-size figure
  • Backprop sends the error back through the forward weights 𝐖⊤\textcolor{#B5396B}{\mathbf{W}}^{\top}, so feedback synapses would have to copy them (weight transport)
  • With fixed random feedback weights 𝐁\mathbf{B} instead, the forward weights adapt until the hidden units' updates point within 90°90° of backprop's (panel b)
  • On MNIST (handwritten digits), 2.1% test error vs 2.4% for backprop

Return to contents

Slide 38

Error signals in dendrites, one per neuron

Three panels, each with two pyramidal neurons labelled P+ and P minus, with an apical dendrite rising to a tuft. No error in dendrites: no arrows. One error for all: the same green plus arrow onto both tufts, the same signal to every neuron, like dopamine. Each neuron its own error: a green plus arrow onto P+ and a red minus arrow onto P minus, sign set by what the neuron does to the output, like delta

Three panels, each with two pyramidal neurons labelled P+ and P minus, with an apical dendrite rising to a tuft. No error in dendrites: no arrows. One error for all: the same green plus arrow onto both tufts, the same signal to every neuron, like dopamine. Each neuron its own error: a green plus arrow onto P+ and a red minus arrow onto P minus, sign set by what the neuron does to the output, like delta

Open full-size figure

Return to contents

Slide 39

Do backprop's gradients follow the brain's hierarchy?

Two scatter plots, one point per brain region, horizontal axis distance from V1 in millimetres (0 to about 110), vertical axis the network layer that best predicts the region, as a fraction of network depth. Left, panel C, forward activations: V1, V2, V3 and V4 sit low near 0.7 to 0.77, regions farther from V1 are best predicted by deeper layers, and the fitted line rises (r = 0.35, p = 5e-03). Right, panel D, backpropagated gradients: V1 and V2 sit near 0.90 to 0.91, V4 near 0.95, and the fitted line falls with distance (r = -0.27, p = 4e-02)

Two scatter plots, one point per brain region, horizontal axis distance from V1 in millimetres (0 to about 110), vertical axis the network layer that best predicts the region, as a fraction of network depth. Left, panel C, forward activations: V1, V2, V3 and V4 sit low near 0.7 to 0.77, regions farther from V1 are best predicted by deeper layers, and the fitted line rises (r = 0.35, p = 5e-03). Right, panel D, backpropagated gradients: V1 and V2 sit near 0.90 to 0.91, V4 near 0.95, and the fitted line falls with distance (r = -0.27, p = 4e-02)

Open full-size figure
  • Encoding models predicted fMRI from a network's activations and, separately, from its backpropagated gradients
  • Left, activations: regions farther from V1 match deeper layers. Right, gradients: the trend reverses
  • Shared representations, different ways of learning them?

Return to contents