The Visual Cortex in 75 Coordinates

This post is about F-BNet, a model I built in 2023 that predicts brain responses to photographs. The brain responses are fMRI, which measures blood flow across the brain while a person lies in a scanner, and here the person is looking at pictures of natural scenes. A model that takes the picture and predicts the scan is called an encoding model.

Building one is usually one big regression. A regression takes a list of numbers that describe the input and a list of numbers that were measured, and finds a weight for every pair of input number and measured number, so that the weighted sums of the input come as close as possible to the measurements. Fitting the regression means choosing those weights from examples where both lists are known. Here the input numbers describe the picture and the measured numbers are the scan.

Both sides of that regression are large, and both need unpacking. On the input side is a vision model, a neural network that has already been trained on millions of ordinary photographs to tell what is in them. Run a picture through it and its last layer holds thousands of numbers, each one saying how strongly some pattern the network learned to look for is present in that picture. Those numbers are the features, and they are what the regression reads.

On the output side is the cortex, the folded outer sheet of the brain. The scanner stores that sheet as a mesh of many thousand points, the same way a 3D model of a face is a mesh of points, and each point is a vertex. One hemisphere of visual cortex has about twenty thousand of them. At each vertex the scan gives one number per picture, how strongly that small patch of brain responded to it.

The map from one side to the other has to be learned from the pairs of image and response that exist for one person, and there are not many of those. A layer that reads every feature and writes every vertex has one adjustable weight per feature and vertex pair, which is far more weights than there are brain-labelled images to fit them on.

The usual answer is to fine-tune the whole vision model against the full response and let regularisation sort it out. Fine-tuning means taking a network that was already trained on one job and continuing to train it on a new one, so the weights it arrived with are nudged rather than learned from scratch. Here the vision model that learned to recognise photographs is nudged until its output predicts the scan.

Regularisation is a penalty added during training that grows with the size of the weights. With far more weights than examples, a fit can match the examples by chasing their noise, and the penalty makes that expensive, so the weights stay small unless the data insists. It is a brake, and the fit that comes out depends on how hard the brake is set.

That is slow, and it hides the geometry of what was fit. I wanted to know whether the map could be learned between two small flat pieces of each space instead, one chosen from the images and one chosen from the measured responses, with everything outside them left alone. A flat piece here means a line, a plane, or the same thing with more directions, passing through the middle of the data. I will call those flat pieces subspaces.

The model that came out of that is F-BNet. It squeezes the image features down to 300 coordinates and each hemisphere's response down to 75, learns a small neural network between them, and uses the same axes to turn the network's 75 outputs back into a full hemisphere. The image features come from CLIP ViT-B/32, a vision model from OpenAI trained to match pictures with their captions. On the Algonauts 2023 evaluation of the Natural Scenes Dataset, a public benchmark for predicting brain responses to natural scenes, F-BNet scored 46.27 where a CLIP ViT-B/32 fine-tuned end to end scored 41.41, and ten passes over the training data took 43 seconds instead of 403.

The bottleneck is also a statement about the map and not only a compression trick. This post goes through the construction, the three exact things it proves, and what it leaves open.

The size of the direct map

CLIP writes an image as one number per feature, and I collect those numbers as the vector x∈RDx \in \mathbb{R}^{D}. Taking the model's last internal layer of activity for the image and flattening it into one list gives D≈37,800D \approx 37{,}800. A hemisphere of visual cortex is a vector with one entry per vertex, yL∈RVLy_L \in \mathbb{R}^{V_L} for the left and yR∈RVRy_R \in \mathbb{R}^{V_R} for the right. For the participant drawn in the figures below, VL=20,554V_L = 20{,}554 and VR=19,004V_R = 19{,}004. The direct model learns

fθ:RD→RVL+VR. f_\theta : \mathbb{R}^{D} \to \mathbb{R}^{V_L + V_R}.

Even a single linear layer of that shape, one matrix of weights multiplying the features, has D (VL+VR)D\,(V_L + V_R) weights. With these numbers that is about 1.5 billion, and the number of images one person has looked at in the scanner is nowhere near that. The fine-tuned baseline I compare against is this problem solved the usual way. The vision model is trained per participant against the full response, in the original vertex space, and the regulariser carries the mismatch.

Principal component analysis

Some maths now, though I will keep it to geometry you can draw. The tool I use to shrink both sides is principal component analysis, PCA, and I want to describe it as geometry before using it. Take NN response vectors y(1),…,y(N)y^{(1)}, \dots, y^{(N)} in RV\mathbb{R}^{V} and their mean μ\mu. Each vector is a point in a space with one axis per vertex, so the data is a cloud of points, one per image. Karl Pearson asked in 1901 which flat with dd directions through μ\mu the cloud lies closest to, where a flat is a line, a plane or the same thing with more directions, and closeness is the sum of squared perpendicular distances from each point to the flat.

The answer comes from the covariance of the cloud, and covariance and eigenvectors both need unpacking. The variance of the cloud along one direction is the average squared distance of the points from the mean along that direction, so it measures how far the cloud spreads that way. The covariance matrix records that spread for every vertex and, for every pair of vertices, how much the two rise and fall together across the images. Two vertices that always respond together have a large entry, and two that have nothing to do with each other have an entry near zero.

Picture the cloud as a rugby ball. Its longest axis is the direction along which the points spread most, the next is the direction at right angles to it with the most remaining spread, and so on. Those axes are the eigenvectors of the covariance matrix, and the spread along each one is the matching eigenvalue. The flat of closest fit is spanned by the top dd of them, and it is also the flat that keeps as much of the cloud's variance as any flat with dd directions can. Stack those eigenvectors as the columns of U∈RV×dU \in \mathbb{R}^{V \times d}.

Two facts about UU carry the rest of the post. The columns are orthonormal, so each has unit length and any two are at right angles, which is U⊤U=IdU^{\top} U = I_d. And the matrix UU⊤U U^{\top} is the orthogonal projector onto the flat, the matrix that drops each point perpendicularly onto it. It is symmetric, and (UU⊤)(UU⊤)=U(U⊤U)U⊤=UU⊤(U U^{\top})(U U^{\top}) = U (U^{\top} U) U^{\top} = U U^{\top}, so applying it twice is the same as applying it once, which is what a projector has to satisfy.

Dropping a perpendicular from a point yy onto the flat lands at μ+UU⊤(y−μ)\mu + U U^{\top}(y - \mu). The dd numbers U⊤(y−μ)U^{\top}(y - \mu) say where that foot sits in the flat's own coordinates. So reading with U⊤U^{\top} compresses, and UU reconstructs by placing the foot back in RV\mathbb{R}^{V}. Everything in the perpendicular direction is lost, and that loss is the price of the bottleneck. It gets an exact accounting below.

Two projections

I do this three times, once for the image features and once per hemisphere,

Ux∈RD×dx,UL∈RVL×dy,UR∈RVR×dy,dx≪D,  dy≪VL,VR, U_x \in \mathbb{R}^{D \times d_x}, \qquad U_L \in \mathbb{R}^{V_L \times d_y}, \qquad U_R \in \mathbb{R}^{V_R \times d_y}, \qquad d_x \ll D,\; d_y \ll V_L, V_R,

and move every vector into its coordinates.

z=Ux⊤(x−μx),uL=UL⊤(yL−μL),uR=UR⊤(yR−μR). z = U_x^{\top}(x - \mu_x), \qquad u_L = U_L^{\top}(y_L - \mu_L), \qquad u_R = U_R^{\top}(y_R - \mu_R).

The trainable network only ever sees the small vectors,

gθ:Rdx→R2dy,gθ(z)=[u^Lu^R], g_\theta : \mathbb{R}^{d_x} \to \mathbb{R}^{2 d_y}, \qquad g_\theta(z) = \begin{bmatrix} \hat u_L \\ \hat u_R \end{bmatrix},

and the bases write its output back into the vertex spaces.

y^L=μL+ULu^L,y^R=μR+URu^R. \hat y_L = \mu_L + U_L \hat u_L, \qquad \hat y_R = \mu_R + U_R \hat u_R.

In the experiments dx=300d_x = 300 and dy=75d_y = 75. The image goes from roughly 37,800 numbers to 300, each hemisphere from roughly 20,000 vertices to 75, and the only thing that trains is the map between 300 numbers and 150. I will call the 150 numbers inside the bottleneck the latent coordinates, latent because nobody measures them directly. CLIP stays frozen, meaning none of its weights change during training. That separates the question of how images map to cortex from the question of how to learn visual features in the first place, and it takes most of the trainable parameters off the table.

During development I also tried adding captions to the image representation, written by BLIP, a vision-language model that can write a sentence describing an image. The improvement was not consistent enough to pay for the extra compute, so it is not in the model.

The network itself is small. A dense layer that widens the 300 coordinates, where dense means every input connects to every output through its own weight, then one linear residual block with a parametrised ReLU, dropout of 0.2, and two output layers of 75 numbers each, one per hemisphere.

Three of those words need unpacking. A residual block adds its input to its output, so the block only has to learn a correction to what it was given rather than a whole new representation. A ReLU is a unit that passes positive values through and sets negative ones to zero, and a parametrised ReLU learns a small slope on the negative side instead of fixing it at zero. Dropout of 0.2 switches off a random fifth of the units on every training step, so the network cannot lean on any single one.

Each basis is fit on its own data alone. The image basis is fit on the CLIP features and each response basis on that hemisphere's measurements, so neither subspace knows anything about the pairing between images and responses. The pairing is left entirely to gθg_\theta.

what trains and what stays fixedCLIP and the PCA bases are fixed, only the 300 to 150 map is learnedimageCLIP37,800 numbersPCA Uₓ300 coordinatesgθ300 → 150ûL75ûR75CLIP frozenPCA, no trainingthe only trained weightsUL writes ûL into 20,554 left-hemisphere vertices and UR writes ûR into 19,004 on the right
CLIP and the three PCA bases are fixed before training starts. The only part that trains is the map from 300 image coordinates to 150 neural coordinates, 75 per hemisphere. The two response bases then write those coordinates back into the measured vertex spaces.

The retained subspace

The reconstruction step is not a compression trick on the output. It is a constraint. For hemisphere h∈{L,R}h \in \{L, R\} write the retained response subspace as

Uh=col⁡(Uh)⊆RVh, \mathcal{U}_h = \operatorname{col}(U_h) \subseteq \mathbb{R}^{V_h},

where col of a matrix means its column space, the set of every vector you can make by combining its columns. Every prediction satisfies y^h−μh∈Uh\hat y_h - \mu_h \in \mathcal{U}_h, because Uhu^hU_h \hat u_h is a combination of the columns of UhU_h whatever u^h\hat u_h is. Whatever the network does, the cortical pattern it produces lies in a fixed flat of 75 directions inside a space with about 20,000 axes, one per vertex.

I should be precise about what kind of object Uh\mathcal{U}_h is. A subspace is the flat itself, the set of all points you can reach inside it. A basis is a set of directions chosen as coordinate axes for it, the way north and east are a basis for a map, and north-east and north-west would be another basis for the same map. The same flat of 75 directions can be described by any 75 orthonormal vectors that span it, and the set of all such descriptions is {UhQ:Q⊤Q=I}\{U_h Q : Q^{\top} Q = I\}, which is every rotation and reflection of the original PCA axes inside the flat.

The Grassmannian Gr(dy,Vh)\mathrm{Gr}(d_y, V_h) is the set of all subspaces with dyd_y directions inside RVh\mathbb{R}^{V_h}. It is what you get when you agree to treat all those bases as one point. So Uh∈Gr(dy,Vh)\mathcal{U}_h \in \mathrm{Gr}(d_y, V_h), and the PCA axes are one coordinate system on that point. The question is whether the model depends on the point or on the coordinates.

Proposition 1. Let Q∈Rdy×dyQ \in \mathbb{R}^{d_y \times d_y} be orthogonal, Q⊤Q=IQ^{\top} Q = I, so that it rotates or reflects the 75 axes without stretching anything. Define U~h=UhQ\widetilde U_h = U_h Q and u~h=Q⊤uh\tilde u_h = Q^{\top} u_h. Then U~hu~h=Uhuh\widetilde U_h \tilde u_h = U_h u_h.

Proof. Since QQ⊤=IQ Q^{\top} = I, U~hu~h=UhQQ⊤uh=Uhuh\widetilde U_h \tilde u_h = U_h Q Q^{\top} u_h = U_h u_h. □\square

So an orthogonal change of latent coordinates leaves the reconstructed response alone, once the predictor is changed to match. A network that outputs Q⊤u^hQ^{\top} \hat u_h instead of u^h\hat u_h is the same model in the only space anyone measures. The subspace is the stable object. The orientation of the PCA coordinates inside it is a choice of description, and nothing about the brain should be read off those axes.

The proposition gives a clean split. The model's claim is the point on the Grassmannian, and everything about the individual latent coordinates is convention.

the same subspace in a rotated basisQ rotates the basis of the retained plane and the reconstructed point stays where it isq₁q₂U uθ = 0°ũ = Qᵀu = (+0.62, -0.55)Ũ ũ = U Q Qᵀ u = U uthe coordinates depend on Qthe cortical pattern does notq₁q₂U uθ = 45°ũ = Qᵀu = (+0.05, -0.83)Ũ ũ = U Q Qᵀ u = U uthe coordinates depend on Qthe cortical pattern does notq₁q₂U uθ = 90°ũ = Qᵀu = (-0.55, -0.62)Ũ ũ = U Q Qᵀ u = U uthe coordinates depend on Qthe cortical pattern does notq₁q₂U uθ = 135°ũ = Qᵀu = (-0.83, -0.05)Ũ ũ = U Q Qᵀ u = U uthe coordinates depend on Qthe cortical pattern does notq₁q₂U uθ = 180°ũ = Qᵀu = (-0.62, +0.55)Ũ ũ = U Q Qᵀ u = U uthe coordinates depend on Qthe cortical pattern does notq₁q₂U uθ = 225°ũ = Qᵀu = (-0.05, +0.83)Ũ ũ = U Q Qᵀ u = U uthe coordinates depend on Qthe cortical pattern does notq₁q₂U uθ = 270°ũ = Qᵀu = (+0.55, +0.62)Ũ ũ = U Q Qᵀ u = U uthe coordinates depend on Qthe cortical pattern does notq₁q₂U uθ = 315°ũ = Qᵀu = (+0.83, +0.05)Ũ ũ = U Q Qᵀ u = U uthe coordinates depend on Qthe cortical pattern does not
Proposition 1 drawn in two of the 75 directions. The disc is the retained response subspace, the two arrows are its basis, and the dot is one response. The frames cycle through eight rotations of the basis. The two numbers read off the dot change in every frame while the dot stays put, and the dot is the only thing cortex ever sees.

The error decomposition

Let rh=yh−μhr_h = y_h - \mu_h be the measured response with its mean removed. Because UhUh⊤U_h U_h^{\top} is the orthogonal projector onto Uh\mathcal{U}_h, the identity rh=UhUh⊤rh+(I−UhUh⊤)rhr_h = U_h U_h^{\top} r_h + (I - U_h U_h^{\top}) r_h splits it into the foot of the perpendicular and the perpendicular itself. The two pieces are orthogonal, and the check is one line. For any aa and bb,

⟨Uha, (I−UhUh⊤) b⟩=a⊤(Uh⊤−Uh⊤UhUh⊤)b=a⊤(Uh⊤−Uh⊤)b=0, \langle U_h a,\ (I - U_h U_h^{\top})\, b \rangle = a^{\top} \left(U_h^{\top} - U_h^{\top} U_h U_h^{\top}\right) b = a^{\top} \left(U_h^{\top} - U_h^{\top}\right) b = 0,

using Uh⊤Uh=IU_h^{\top} U_h = I. The first piece is what the bottleneck can represent. The second is thrown away by truncation, and no choice of u^h\hat u_h can reach it.

Proposition 2. For any latent prediction u^h\hat u_h,

∥yh−y^h∥22=∥uh−u^h∥22+∥(I−UhUh⊤)(yh−μh)∥22. \|y_h - \hat y_h\|_2^2 = \|u_h - \hat u_h\|_2^2 + \|(I - U_h U_h^{\top})(y_h - \mu_h)\|_2^2.

The double bars with the subscript 2 mean the ordinary length of a vector, so each term is a squared length.

Proof. With uh=Uh⊤(yh−μh)u_h = U_h^{\top}(y_h - \mu_h) and y^h=μh+Uhu^h\hat y_h = \mu_h + U_h \hat u_h,

yh−y^h=Uh(uh−u^h)+(I−UhUh⊤)(yh−μh). y_h - \hat y_h = U_h(u_h - \hat u_h) + (I - U_h U_h^{\top})(y_h - \mu_h).

The two terms are orthogonal by the line above, so the squared lengths add by Pythagoras, and ∥Uh(uh−u^h)∥2=∥uh−u^h∥2\|U_h(u_h - \hat u_h)\|_2 = \|u_h - \hat u_h\|_2 because UhU_h has orthonormal columns. □\square

The first term is latent prediction error, and training moves it. The second is subspace truncation error, and it is fixed the moment UhU_h is chosen. No predictor touches it.

This is the trade I kept running into during development, and the proposition is why it is a trade and not a tuning accident. Raising dyd_y shrinks the truncation term, because a bigger flat lies closer to every point in the cloud. But it also makes the latent problem harder, because there are more coordinates to predict from the same images. Lowering dyd_y does the opposite. 75 is where that trade settled on this data, so it is an operating point and not a measurement of how many dimensions visual cortex has.

total cortical error = latent prediction error + subspace truncation errorthe line is the retained subspace and the dot is the residual r = y − μcol(U)rU Uᵀ r(I − U Uᵀ) r‖r‖² = 37.0learnable = 34.5irreducible = 2.5training shrinks the first legthe subspace fixes the secondcol(U)rU Uᵀ r(I − U Uᵀ) r‖r‖² = 31.7learnable = 29.8irreducible = 1.9training shrinks the first legthe subspace fixes the secondcol(U)rU Uᵀ r(I − U Uᵀ) r‖r‖² = 8.5learnable = 6.9irreducible = 1.6training shrinks the first legthe subspace fixes the secondcol(U)rU Uᵀ r(I − U Uᵀ) r‖r‖² = 61.0learnable = 59.9irreducible = 1.1training shrinks the first legthe subspace fixes the secondcol(U)rU Uᵀ r(I − U Uᵀ) r‖r‖² = 14.8learnable = 13.9irreducible = 0.9training shrinks the first legthe subspace fixes the secondcol(U)rU Uᵀ r(I − U Uᵀ) r‖r‖² = 57.8learnable = 56.9irreducible = 0.9training shrinks the first legthe subspace fixes the secondcol(U)rU Uᵀ r(I − U Uᵀ) r‖r‖² = 22.5learnable = 17.2irreducible = 5.3training shrinks the first legthe subspace fixes the secondcol(U)rU Uᵀ r(I − U Uᵀ) r‖r‖² = 37.0learnable = 36.8irreducible = 0.2training shrinks the first legthe subspace fixes the second
Proposition 2 drawn as a right triangle. The residual is the long side, its projection onto the retained subspace is one leg and the part at right angles to the subspace is the other, so the squared lengths add. The frames cycle through residuals of different sizes and angles. The numbers on the right are read off the drawing and are not data.

The rank bound

Put the pieces together and the full map for hemisphere hh is

Fh(x)=μh+Uh gθ,h ⁣(Ux⊤(x−μx)). F_h(x) = \mu_h + U_h\, g_{\theta,h}\!\left(U_x^{\top}(x - \mu_x)\right).

Start with the case where the bottleneck network is linear, gθ,h(z)=Ahz+bhg_{\theta,h}(z) = A_h z + b_h with Ah∈Rdy×dxA_h \in \mathbb{R}^{d_y \times d_x}. Then Fh(x)=μh+UhAhUx⊤(x−μx)+UhbhF_h(x) = \mu_h + U_h A_h U_x^{\top}(x - \mu_x) + U_h b_h. Seen from the original image and vertex spaces, the model is one matrix

Wh=UhAhUx⊤∈RVh×D,rank⁡(Wh)≤min⁡(dx,dy)=75. W_h = U_h A_h U_x^{\top} \in \mathbb{R}^{V_h \times D}, \qquad \operatorname{rank}(W_h) \le \min(d_x, d_y) = 75.

The rank of a matrix is the number of independent directions it can output. The rank of a product is at most the rank of any factor, and AhA_h has only 75 rows, so the whole matrix has rank at most 75.

The picture is that WhW_h first reads the image through 300 directions and ignores everything orthogonal to them, then mixes those readings, then writes the result along 75 directions of cortex. That is a reduced-rank regression, a regression whose coefficient matrix is forced to have low rank, with one difference from the textbook version. Reduced-rank regression picks its input and output subspaces from the relation between the two sides. Here they are fixed in advance from each side separately, so the subspaces are a choice about the data and only AhA_h is a claim about the mapping.

The nonlinear case keeps the same constraint, not globally but at every point. The Jacobian of a map is its matrix of partial derivatives. It is the linear map that says how a small change in the input moves the output, and it is the right object to look at because a smooth network is linear in a small enough neighbourhood of any input.

Proposition 3. Let gθ,hg_{\theta,h} be differentiable, meaning it has derivatives everywhere. The Jacobian of the full map is

JFh(x)=Uh Jgθ,h(z) Ux⊤,z=Ux⊤(x−μx), J_{F_h}(x) = U_h\, J_{g_{\theta,h}}(z)\, U_x^{\top}, \qquad z = U_x^{\top}(x - \mu_x),

so rank⁡JFh(x)≤min⁡(dx,dy)\operatorname{rank} J_{F_h}(x) \le \min(d_x, d_y) for every input xx.

Proof. The chain rule says the derivative of a chain of maps is the product of the derivatives of its stages, so differentiate the three stages in turn. The projection x↦zx \mapsto z is linear with Jacobian Ux⊤U_x^{\top}, the network contributes Jgθ,h(z)J_{g_{\theta,h}}(z), and the reconstruction u^↦μh+Uhu^\hat u \mapsto \mu_h + U_h \hat u is linear with Jacobian UhU_h. The rank of a product is at most the rank of any factor. □\square

Read the formula from the right. A change in the image that is orthogonal to col⁡(Ux)\operatorname{col}(U_x) is killed by Ux⊤U_x^{\top} and does nothing. A change that survives is pushed through the local linear version of the network and then lands inside Uh\mathcal{U}_h.

So seen from the image and from the cortex, the model is locally a rank-75 map everywhere, however nonlinear it is inside the bottleneck. An inductive bias is an assumption a model carries before it sees any data, and this one is written down. It is also a statement about this architecture and nothing else. It does not say the visual system is low-rank.

Racing loss

One network predicts both hemispheres, gθ(z)=[u^L;u^R]g_\theta(z) = [\hat u_L; \hat u_R], so shared nonlinear features can serve both sides while the two response subspaces UL\mathcal{U}_L and UR\mathcal{U}_R stay separate. During development, plain joint training often let one hemisphere pull ahead of the other. The objective that fixed it compares each side by cosine similarity,

sL=cos⁡(u^L,uL),sR=cos⁡(u^R,uR), s_L = \cos(\hat u_L, u_L), \qquad s_R = \cos(\hat u_R, u_R),

which is the cosine of the angle between the predicted and measured latent vectors in R75\mathbb{R}^{75}. It is 1 when they point the same way and 0 when they are at right angles, and it ignores the length of either vector. So it scores direction in the retained subspace rather than amplitude. The objective to maximise is

R=min⁡(sL,sR)+sL+sR2,Lrace=−R. \mathcal{R} = \min(s_L, s_R) + \frac{s_L + s_R}{2}, \qquad \mathcal{L}_{\text{race}} = -\mathcal{R}.

The second term is the ordinary average. The first rewards only the side that is behind, so it is the term that refuses to let the average be bought by one hemisphere alone.

To see what the first term does, use the identity min⁡(a,b)=12(a+b−∣a−b∣)\min(a, b) = \tfrac{1}{2}(a + b - |a - b|). It holds because ∣a−b∣|a - b| is whichever of a−ba - b and b−ab - a is not negative, so subtracting it from the sum leaves twice the smaller of the two. Substituting,

R=12(sL+sR−∣sL−sR∣)+12(sL+sR)=sL+sR−12 ∣sL−sR∣, \mathcal{R} = \tfrac{1}{2}\left(s_L + s_R - |s_L - s_R|\right) + \tfrac{1}{2}\left(s_L + s_R\right) = s_L + s_R - \tfrac{1}{2}\,|s_L - s_R|,

which is the total similarity over both hemispheres with a penalty on the gap between them. The penalty is an L1L_1 penalty, meaning it grows in proportion to the size of the gap rather than its square. The gradients, meaning how fast the objective rises when each score rises, follow by cases. If sL<sRs_L < s_R then ∣sL−sR∣=sR−sL|s_L - s_R| = s_R - s_L and R=32sL+12sR\mathcal{R} = \tfrac{3}{2} s_L + \tfrac{1}{2} s_R, so

∂R∂sL=32,∂R∂sR=12. \frac{\partial \mathcal{R}}{\partial s_L} = \frac{3}{2}, \qquad \frac{\partial \mathcal{R}}{\partial s_R} = \frac{1}{2}.

The side that is behind gets three times the gradient of the side that is ahead, and the weights swap when they cross. Both sides always have positive weight, so neither is ever abandoned, and the pressure sits on whichever is currently worse. I called it racing because that is what it looked like in the training curves.

What the rewrite gives me is that a heuristic I arrived at by watching curves becomes a stated objective with known gradients. That is what lets the ablation below be read at all, where an ablation is a rerun with one piece of the method removed.

the weaker hemisphere gets three times the weightR = s_L + s_R − ½ |s_L − s_R|, so the side behind gets a gradient of 3/2 and the side ahead gets 1/2s_L0.42∂R/∂s_L = 1.5s_R0.61∂R/∂s_R = 0.5step 1 of 8 · R = 0.935s_L0.50∂R/∂s_L = 1.5s_R0.62∂R/∂s_R = 0.5step 2 of 8 · R = 1.060s_L0.58∂R/∂s_L = 1.5s_R0.63∂R/∂s_R = 0.5step 3 of 8 · R = 1.185s_L0.64∂R/∂s_L = 0.5s_R0.63∂R/∂s_R = 1.5step 4 of 8 · R = 1.265s_L0.67∂R/∂s_L = 0.5s_R0.62∂R/∂s_R = 1.5step 5 of 8 · R = 1.265s_L0.69∂R/∂s_L = 0.5s_R0.66∂R/∂s_R = 1.5step 6 of 8 · R = 1.335s_L0.70∂R/∂s_L = 1.5s_R0.71∂R/∂s_R = 0.5step 7 of 8 · R = 1.405s_L0.72∂R/∂s_L = 1.5s_R0.74∂R/∂s_R = 0.5step 8 of 8 · R = 1.450
The Racing objective over eight training steps, with made-up scores. Each bar is the cosine similarity between predicted and measured latent coordinates for one hemisphere. The side that lags carries a gradient of 3/2 and the side ahead carries 1/2, and the weights swap when they cross. Both sides keep improving, but the pressure sits on the one behind.

The target-conditioned perturbation

The second training mechanism gives the network a small look at the answer. Let h∈Rmh \in \mathbb{R}^{m} be the hidden image representation just before the two output layers, which is the activity of the layer that feeds them. Let u=[uL;uR]∈R2dyu = [u_L; u_R] \in \mathbb{R}^{2 d_y} be the latent neural target for the same image, and T∈Rm×2dyT \in \mathbb{R}^{m \times 2 d_y} a learned matrix that carries the 150 neural coordinates into the mm numbers of the hidden layer. During training the hidden state is replaced by

h~=h+α Tu+β Tϵ1+α+β,ϵ=Λy1/2ξ,ξ∼N(0,I), \tilde h = \frac{h + \alpha\, T u + \beta\, T \epsilon}{1 + \alpha + \beta}, \qquad \epsilon = \Lambda_y^{1/2} \xi, \quad \xi \sim \mathcal{N}(0, I),

where the random vector has entries drawn independently from the bell curve centred at zero with unit spread, and Λy=diag⁡(λ1,…,λ2dy)\Lambda_y = \operatorname{diag}(\lambda_1, \dots, \lambda_{2 d_y}) is a diagonal matrix, zero everywhere except its main diagonal, holding the retained PCA eigenvalues, the variances of the measured responses along each kept axis. The denominator makes h~\tilde h a weighted average of three vectors, the network's own hidden state, the projected true target, and a projected noise vector, with weights 11, α\alpha and β\beta. The geometry is that hh is pulled along the line toward TuT u and then jittered.

The algebra pins down both parts. Since ξ\xi has mean zero, E[ϵ]=0\mathbb{E}[\epsilon] = 0, and since Cov⁡(ξ)=I\operatorname{Cov}(\xi) = I,

Cov⁡(ϵ)=Λy1/2 I Λy1/2=Λy,Cov⁡(Tϵ)=TΛyT⊤. \operatorname{Cov}(\epsilon) = \Lambda_y^{1/2}\, I\, \Lambda_y^{1/2} = \Lambda_y, \qquad \operatorname{Cov}(T \epsilon) = T \Lambda_y T^{\top}.

Only the noise term is random given hh and uu, and it enters with coefficient β/(1+α+β)\beta / (1 + \alpha + \beta), so

E[h~∣h,u]=h+αTu1+α+β,Cov⁡(h~∣h,u)=β2(1+α+β)2 TΛyT⊤. \mathbb{E}[\tilde h \mid h, u] = \frac{h + \alpha T u}{1 + \alpha + \beta}, \qquad \operatorname{Cov}(\tilde h \mid h, u) = \frac{\beta^2}{(1 + \alpha + \beta)^2}\, T \Lambda_y T^{\top}.

Two things happen. The hidden state is shifted toward a projection of the true neural target, which is the teacher-guided part. And it is jittered with noise whose covariance is what TT does to the retained response variances, so along each latent axis the noise has the same spread as the measured responses have along that axis.

That is why Λy\Lambda_y is there rather than the same amount of noise in every direction. The jitter is shaped like neural variability as seen through the bottleneck, not like a sphere.

It is close in spirit to teacher forcing in sequence models, where the model is fed the true previous output during training instead of its own guess. But the target does not exist when the model is used on a new image, so the test-time version keeps only the structured noise with a sign flip,

h~test=h−(α+β) Tϵ1+α+β. \tilde h_{\text{test}} = \frac{h - (\alpha + \beta)\, T \epsilon}{1 + \alpha + \beta}.

That is a mismatch between what the network sees in training and what it sees at test time, and I do not have a probabilistic account of why it should be harmless. The ablation says the regulariser helped in this setup, and it does not say why.

the hidden state is pulled toward T u and jittered with the PCA spectrumh̃ = (h + α T u + β T ε) / (1 + α + β), with ε ~ N(0, Λ_y), drawn in two hidden dimensions0hT uE[h̃]α = 0.0 β = 0.0E[h̃] = (h + 0.0 T u) / 1.0noise scale β/(1+α+β) = 0.00α slides the mean toward T uβ adds noise shaped by Λ_yand the denominator shrinks both0hT uE[h̃]α = 0.5 β = 0.0E[h̃] = (h + 0.5 T u) / 1.5noise scale β/(1+α+β) = 0.00α slides the mean toward T uβ adds noise shaped by Λ_yand the denominator shrinks both0hT uE[h̃]α = 1.0 β = 0.0E[h̃] = (h + 1.0 T u) / 2.0noise scale β/(1+α+β) = 0.00α slides the mean toward T uβ adds noise shaped by Λ_yand the denominator shrinks both0hT uE[h̃]α = 2.0 β = 0.0E[h̃] = (h + 2.0 T u) / 3.0noise scale β/(1+α+β) = 0.00α slides the mean toward T uβ adds noise shaped by Λ_yand the denominator shrinks both0hT uE[h̃]α = 1.0 β = 0.5E[h̃] = (h + 1.0 T u) / 2.5noise scale β/(1+α+β) = 0.20α slides the mean toward T uβ adds noise shaped by Λ_yand the denominator shrinks both0hT uE[h̃]α = 1.0 β = 1.0E[h̃] = (h + 1.0 T u) / 3.0noise scale β/(1+α+β) = 0.33α slides the mean toward T uβ adds noise shaped by Λ_yand the denominator shrinks both0hT uE[h̃]α = 0.5 β = 1.5E[h̃] = (h + 0.5 T u) / 3.0noise scale β/(1+α+β) = 0.50α slides the mean toward T uβ adds noise shaped by Λ_yand the denominator shrinks both0hT uE[h̃]α = 2.0 β = 1.5E[h̃] = (h + 2.0 T u) / 4.5noise scale β/(1+α+β) = 0.33α slides the mean toward T uβ adds noise shaped by Λ_yand the denominator shrinks both
The perturbation drawn in two hidden dimensions, with made-up values of α and β. The hollow points are the hidden state h and the projected target T u, the filled point is the mean of h̃, and the ellipse is one standard deviation of the noise. The frames step through several settings of α and β. The ellipse is a schematic, since the real noise lives in all m hidden dimensions with its axes set by the retained response variances.

Group pretraining

The third mechanism is about where training starts. Visual cortex shares structure across people and also has person-specific geometry, and there are eight participants, each with their own vertex space. Hyperalignment, a method from Haxby and colleagues, is one way to put them in one coordinate system. Each participant's response patterns YsY_s are rotated by an orthogonal matrix RsR_s into a shared space HH, with every RsR_s and HH chosen together,

min⁡{Rs}, H∑s∥YsRs−H∥F2,Rs⊤Rs=I. \min_{\{R_s\},\, H} \sum_s \|Y_s R_s - H\|_F^2, \qquad R_s^{\top} R_s = I.

The double bars with the subscript F are the Frobenius norm, the square root of the sum of every squared entry of a matrix, so this minimises the total squared disagreement between each rotated participant and the shared space.

The orthogonality constraint is the point. An orthogonal matrix preserves every distance and every angle between a participant's response patterns, so the alignment can rename axes but cannot stretch, squash or collapse anyone's representational geometry to make them agree. Whatever agreement is found was there already.

I use aligned responses from every participant to train one group bottleneck network, then fine-tune a copy per person. So each participant's optimisation starts from θs(0)=θgroup\theta_s^{(0)} = \theta_{\text{group}} rather than from random weights. It is a starting point that carries what the group has in common, not a claim that everyone's cortex shares a coordinate system, and the final model is separate for each person.

Results

Evaluation uses the Natural Scenes Dataset under the Algonauts 2023 protocol. The Natural Scenes Dataset is a public dataset in which eight people each looked at thousands of natural photographs inside a 7 tesla scanner, a stronger magnet than the usual 3 tesla that gives finer measurements. The Algonauts Project 2023 was a public challenge built on that dataset. It fixes which images are held out for testing and how predictions are scored, so numbers from different models can be compared.

The score is noise-normalized encoding accuracy over visual-cortex vertices. At each vertex the prediction is compared with the measured response, and the score is divided by that vertex's noise ceiling, which is the best score the measurement noise would allow. The reported number is the mean over participants and hemispheres.

The baseline fine-tunes CLIP ViT-B/32 per participant to predict the full response, so it learns directly in the original cortical space. F-BNet freezes CLIP and trains only the bottleneck map between the 300 image coordinates and the two sets of 75 response coordinates. Both timings are on one NVIDIA A40 GPU, the graphics chip that does the training arithmetic, with 32 images per training step.

modelscore
CLIP ViT-B/32, fully fine-tuned41.41
F-BNet46.27
F-BNet, no group pretraining44.86
F-BNet, no target-conditioned perturbation45.54
F-BNet, mean squared error instead of Racing44.34

The gap to the baseline is 4.86 points, about 11.7% relative, and F-BNet is higher in all sixteen participant and hemisphere columns. The three rows below it are the ablations, where one of the three training mechanisms is removed and the model is trained again. Removing group pretraining costs 1.41, removing the perturbation costs 0.73, and swapping the Racing objective for squared error costs 1.93.

That last swap changes the similarity measure from cosine to squared error as well as removing the balance term, so it does not isolate the L1L_1 penalty. Taken together the ablations are consistent with each of the three mechanisms contributing. They do not say how the three interact, because each run removes only one of them.

Ten epochs of the fine-tuned baseline took 403 seconds and F-BNet took 43, a ratio of about 9.4, where an epoch is one pass over the training images. The speed comes from the two changes to the optimisation, a frozen vision model and a target of 150 numbers in place of the full vertex space. It is a statement about this configuration rather than a result about how the cost scales.

noise-normalized encoding score, mean over participants and hemispheresCLIP ViT-B/32, fully fine-tuned41.41F-BNet46.27F-BNet, no group pretraining44.86F-BNet, no target perturbation45.54F-BNet, MSE instead of Racing44.343848
The reported scores. F-BNet is 4.86 points above the fully fine-tuned baseline, about 11.7% relative, and higher in each of the sixteen participant and hemisphere columns. Each ablation removes one of the three training mechanisms and lands between the two. No statistical test over the eight participants was run, so this is the observed pattern and not an inference about people in general.

What it does not say

The propositions above are about the architecture and the chosen split into two projections and a small map. On their own they say nothing about how cortex computes. In particular

What the work does show is that natural-scene encoding can be done well inside a compact response subspace, and that doing so turns a vague efficiency trick into three exact statements. The error splits into a latent part that training moves and a truncation part that only the choice of subspace moves. The Jacobian is rank-bounded at every input, so the model is an explicit rank bound on the image-to-brain map, built in before any data is seen. And the subspace, rather than its basis, is what the model commits to.

None of that establishes that cortex is low-rank. It only shows that a response subspace of 75 directions was enough for this performance on this data. The question I actually care about comes after that. Which compact neural geometries stay put across people, contexts and time, and what has to change when those conditions do.

References

  1. Allen et al., A massive 7T fMRI dataset to bridge cognitive neuroscience and computational intelligence, Nature Neuroscience, 2022.
  2. Gifford et al., The Algonauts Project 2023 Challenge: How the Human Brain Makes Sense of Natural Scenes, 2023.
  3. Radford et al., Learning Transferable Visual Models From Natural Language Supervision, ICML, 2021.
  4. Li et al., BLIP: Bootstrapping Language-Image Pre-training for Unified Vision-Language Understanding and Generation, ICML, 2022.
  5. Haxby et al., A common, high-dimensional model of the representational space in human ventral temporal cortex, Neuron, 2011.
  6. Jozwik et al., Deep neural networks and visuo-semantic models explain complementary components of human ventral-stream representational dynamics, Journal of Neuroscience, 2023.
  7. Khaligh-Razavi and Kriegeskorte, Deep neural networks reveal a gradient in the complexity of neural representations across the ventral stream, Journal of Neuroscience, 2014.
  8. Pearson, On lines and planes of closest fit to systems of points in space, Philosophical Magazine, 1901.