This section is about measuring what a pretrained image encoder has learned. The encoders of this chapter were trained without labels, so their own training loss says little about whether they will be useful. To find out, you attach a small learner that does see labels, train it on a downstream task (the task you actually care about), and score it. The rules that fix how much that learner may do are called an evaluation protocol. Changing the protocol can reverse which encoder looks best.
Here is such a reversal in real numbers. The benchmark is ImageNet, 1.28 million training photographs in 1,000 classes. It is scored on its 50,000 validation images by top-1 accuracy, the fraction of images whose highest-scoring class is the right one. Take two encoders trained without labels, both Vision Transformers (ViTs). A masked autoencoder (MAE) learns by repainting the hidden patches of an image (§28.5). DINOv2 learns by making a student network match a slowly updated copy of itself on different crops of the same image (§28.4).
Freeze both, so their weights never change, and read ImageNet off their features in two ways. A k-nearest-neighbor vote labels each test image by the labels of the training images closest to it in feature space. A linear probe trains one linear classifier on the features. The largest MAE model (ViT-H/14, the huge size, with 14 by 14 pixel patches) gets 49.4 percent by the vote and 76.6 by the probe. DINOv2's giant model (ViT-g/14) gets 83.5 and 86.5 (Oquab et al. 2023, Table 4). DINOv2 looks far better. Now let every weight of the MAE change while it trains on ImageNet's labels, which is called fine-tuning. It reaches 86.9 (He et al. 2022), the same league.
The reversal also happens across tasks. As of late 2026, the self-supervised DINOv3 scores 88.4 with a linear probe on ImageNet. Two encoders trained to match images with their captions, the approach of CLIP, score a little higher. They are SigLIP 2 at 89.1, which scores each image-caption pair with its own sigmoid (§30.4), and Perception Encoder at 89.3. Now ask the same frozen features to label every pixel of a scene. On the semantic segmentation benchmark ADE20k, scored by mIoU (the average overlap between predicted and true regions), DINOv3 leads by 13 to 17 points, 55.9 against 42.7 and 38.9 (Siméoni et al. 2025, Tables 3 and 7).
So which encoder is better? There is no answer until you say what the encoder is for, because each protocol asks a different question. §28.1 defined three protocols, the linear probe, k-NN, and fine-tuning, just well enough to read a results table. This section takes them apart. For each one it says what it computes, what property of the features it measures, how to run it correctly, and which details move the number. Then it explains why protocols disagree, puts honest error bars on top-1 accuracy, judges a representation with no labels at all, and chooses an encoder for a real task. A team that misreads a results table ships the wrong encoder, which is why interviewers for vision and multimodal roles ask about all of this.
Some notation for the whole section. The pretrained encoder is fθ, a backbone network followed by a pooling step that turns its outputs into one vector. For an image x, the vector h=fθ(x)∈Rd is its representation, the vector every protocol reads. For a ResNet-50 d=2048, and for a ViT-B d=768. Most methods of this chapter train with an extra small network on top, the projection headgθ, and the training loss sees its output z=gθ(h). The head is thrown away before evaluation, because §28.2 measured that h transfers better than z. So evaluation reads h. A downstream task has K classes and a labeled set of n images. Frozen means the encoder's weights are not updated during evaluation.
Every protocol is a question with a budget
A protocol fixes how much work a downstream learner may do with the frozen features. That budget decides which property of the features the score measures.
k-NN trains nothing. It asks whether an image's nearest neighbors in feature space share its label. That is a question about local geometry.
A linear probe trains one matrix. It asks whether flat cuts through feature space (hyperplanes) separate the classes. That is a question about global linear structure.
An attentive probe trains one attention layer over the patch tokens, the per-patch output vectors of a ViT. It asks whether the information is somewhere in the tokens, even if no single pooled vector holds it.
Partial and full fine-tuning train some or all of the encoder. They ask how good a starting point the weights are, which is a question about optimization as much as about features.
Dense probes train a linear map on every patch token. They ask whether each patch carries local meaning or geometry.
A bigger budget can extract more. It also measures less about the representation and more about the learner. Two toy geometries make the first two protocols concrete.
The cell measures both, with 400 labeled points per geometry and 2,000 test points. The toy features are not on a sphere, so it uses the Euclidean distance. Real embeddings are first scaled to unit length, as the k-NN section explains.
Python · cell 1
On the disk and ring, k-NN is perfect for k=1 and k=5. It gets 0.998 at k=51, where a few neighbors reach across the gap. The logistic-regression probe gets 0.393, worse than always guessing one class. The reason is that logistic regression does not minimize the error rate. It minimizes the cross-entropy, a smooth stand-in for it. When no line separates the classes, the line with the lowest cross-entropy can be a poor classifier, here far below the best line's two thirds.
On the long blobs the linear probe gets 0.760, close to the optimum 0.773, while 1-NN gets 0.671. More neighbors help k-NN (0.717 at k=5, 0.753 at k=51), because the noise along the useless axis averages out over many neighbors. This is the first lesson of the section. Directions with high variance and no label information hurt k-NN, and a linear probe learns to ignore them. Classes that are locally coherent but not linearly arranged hurt a linear probe, and k-NN does not care.
The widget runs both protocols on four toy geometries. Each dot is one labeled image's feature vector, and the shading shows each protocol's prediction everywhere in the plane.
Why can two evaluation protocols rank the same representations differently?
Dots are labeled features colored by class. Shading is each protocol's prediction, and accuracy is on held-out images.
Loading interactive figure…
The "collapsed" geometry is the failure §28.3 warned about. Two classes the encoder should have separated land on top of each other. No downstream learner of any budget can recover what the representation threw away. The widget also reports the effective rank, which counts how many directions carry the spread of the features. §28.3 defined it from the singular values, and it is restated later in this section. Here it falls to 1.1, against 2.0 for the clustered features. We come back to that number as a check that needs no labels.
The linear probe
The linear probe is the headline number of self-supervised vision. §28.1 traced its history, from 40 to 50 percent on ImageNet for early pretext tasks to 88.4 for DINOv3. It looks trivial to run. It is also easy to run in a way that silently changes the number, so here is the precise recipe.
Training the probe is a convex problem, because the features are fixed and the classifier is linear. For a ViT-L (d=1024) on ImageNet the probe has about a million parameters (d×K), against 1.28 million training images, so it needs little regularization. Regularizers that perturb the inputs only blur the frozen geometry the probe is meant to read. An example is Mixup, which blends two images and their labels. Published recipes turn these off.
Frozen means evaluation mode
BatchNorm, introduced in §0.7, standardizes each feature by subtracting a mean and dividing by a standard deviation. In training mode it uses the current batch's statistics and updates stored running averages. In evaluation mode it uses the stored averages, which are fixed numbers. A non-affine BatchNorm has no learnable scale and shift after the standardization.
MAE puts a non-affine BatchNorm between the frozen features and the probe, following Doersch et al. (2015). Does that make the probe nonlinear, or more powerful? No.
Proof. Expand the left side to W⊤diag(s)−1h−W⊤diag(s)−1μ+b. A diagonal matrix is symmetric, so W⊤diag(s)−1=(diag(s)−1W)⊤=W′⊤. The expression is therefore W′⊤h+(b−W′⊤μ). For the converse take W=diag(s)W′ and b=b′+W′⊤μ, which works because every sj is positive. ∎
In plain words, standardizing the features first is a change of coordinates for the probe's weights. It cannot reach any classifier that was not reachable before. What it changes is how gradient descent sees the problem. Coordinates of pretrained features can differ in scale by large factors. One learning rate is then too large for some coordinates and too small for others. Standardizing lets one learning rate work for every checkpoint. MAE adopted it for exactly that reason, so its many ablations could share one probe recipe without a learning-rate search (He et al. 2022, Appendix A). The identity holds only in evaluation mode, where μ and s are fixed. An interviewer who asks "does the BatchNorm make it a nonlinear probe?" wants this fold.
The identity also shows what goes wrong when "frozen" is taken to mean only "no gradients".
The cell builds a one-layer encoder whose BatchNorm holds statistics from pretraining. It then runs 100 probe-training forward passes over downstream data with a different mean and scale, with the encoder left in training mode.
Python · cell 2
No weight of the encoder received a gradient. Yet a running mean moved by 2.04, and the evaluation-mode features of the same five images changed by up to 4.79. The probe was trained on a different encoder from the one that was reported.
Which features, and which hyperparameters
"The linear probe accuracy" is really a family of numbers. The choices inside the definition move it by points.
That last phrase deserves a pause. On ImageNet, "the validation set" is the test set everyone reports on.
Core
A linear probe done right
Implement linear_probe_done_right(train_h, train_y, test_h, test_y, Cs, seed=0). It tunes a logistic-regression probe honestly and returns (best_C, test_accuracy).
Carve a validation split from the training set. Compute perm = np.random.default_rng(seed).permutation(n), take perm[:n // 5] as validation and the rest as the fitting part.
Standardize every split with the mean and standard deviation (ddof=0) of the fitting part.
For each C in Cs, fit LogisticRegression(C=C, max_iter=2000) on the fitting part and score it on the validation part. C is scikit-learn's inverse regularization strength, so a small C means strong weight decay. Keep the first C with the best validation accuracy.
Refit with that C on the whole training set, now standardized with the whole training set's statistics, and score it on the test set.
The setup's features have coordinates on very different scales, and its test images come from a slightly different camera, so each wrong choice gives a visibly different number.
import numpy as np
from sklearn.linear_model import LogisticRegression
def linear_probe_done_right(train_h, train_y, test_h, test_y, Cs, seed=0):
raise NotImplementedError
Tests, verified solutions, and AI help, open once you add your API key.
On this data the honest procedure picks C=0.03 and scores 77.5 percent. Choosing C by test accuracy would pick C=0.001 and report 82.3, about five points of pure optimism from looking at the answers.
What a linear probe can and cannot read
A linear probe can only combine the directions the features actually use. Suppose every representation lies on one line through feature space, so the matrix of representations has rank 1. Then every class score the probe computes is a fixed multiple of one number, plus a bias. Take four balanced classes of 25 images each, and fit the one-hot targets by least squares. They cannot all be fit, and the theorem below says the squared error is at least 50, or 0.5 per image. Here is the general statement. It also motivates the label-free check near the end of the section.
∂ Proof of the rank bound
The columns of HWprobe are combinations of the columns of H, so rank(HWprobe)≤r. Adding the rank-one matrix 1bprobe⊤ raises the rank by at most one, so rank(P)≤r+1.
The Eckart-Young theorem of §0.10 says that the closest matrix of rank at most r+1 to Y in Frobenius norm leaves exactly the energy of the discarded singular values, ∑j>r+1σj(Y)2. No matrix of that rank does better.
To find those singular values, note that each row of Y has a single 1. So YicYic′=0 whenever c=c′, and (Y⊤Y)cc′=∑iYicYic′=nc1[c=c′]. Thus Y⊤Y=diag(n1,…,nK), whose eigenvalues are the class counts. The squared singular values of Y are the eigenvalues of Y⊤Y. Sorted in descending order, the ones beyond position r+1 are the K−r−1 smallest counts. ∎
In plain words, take balanced classes of n/K images each. A least-squares probe on a rank-r representation then leaves a squared error of at least (K−r−1)/K per image. A representation that has collapsed to 3 dimensions cannot fit ten one-hot targets, whatever the probe. Check it on the opening example. With K=4 and r=1 the floor is (4−1−1)/4=0.5 per image, the 50 over 100 images promised above.
The bound is about the least-squares fit, and two caveats keep it honest. First, a classifier only needs the right argmax, the class with the highest score, which is a weaker requirement. Ten tight clusters spaced around a circle have rank 2. Yet the ten affine scores h⊤μc−21∥μc∥2, one per cluster center μc, pick the nearest center and classify them perfectly. Low rank crowds the classes together, so they are easy to confuse once there is noise, but it is not by itself a ceiling on accuracy. Second, high rank is necessary for a good least-squares fit but not sufficient. Random features have full rank and know nothing about the labels. The authors who turned rank into a label-free score say the same, that rank is necessary but not sufficient (Garrido et al. 2023).
The cell checks the bound on random rank-r projections of ten noisy clusters, and then classifies the ten clusters on a circle.
Python · cell 3
The least-squares error never goes below its floor (1614.8 against 1548 at r=1, 1036.6 against 942 at r=4). The argmax accuracy of the random projections climbs from 0.200 at r=1 to 0.995 at r=8, while the circle reaches 1.0 at rank 2. Rank bounds what a linear probe can fit. What it can classify also depends on how the classes are arranged. In practice, a representation whose rank has fallen far below the number of classes is a red flag, and a high rank alone proves nothing.
The weighted k-NN classifier
k-NN is the protocol that needs no training at all. That is why it is the number people watch during pretraining.
In plain words, each of the k most similar training images votes for its own label, and closer images get exponentially larger votes. For example, with τ=0.07 a neighbor at cosine 0.9 outvotes one at cosine 0.8 by a factor of e0.1/0.07≈4.2.
Two limits show what τ does. Divide every weight by the largest one, esmax/τ, which does not change the argmax. Each neighbor's weight becomes e−(smax−si)/τ. As τ→0, every neighbor except the most similar gets a weight that goes to 0, so the rule becomes 1-NN (barring exact ties). As τ→∞, every weight tends to 1, so the rule becomes an unweighted vote of k neighbors. In between, it is a kernel classifier, a vote in which each training point's weight is a fixed function of its similarity to the query. The kernel es/τ is no accident. InfoNCE, the contrastive loss of §7.2, is a softmax over exactly these exponentials of cosine similarities. A model trained with it is trained to make these similarities informative.
The costs are low. The protocol needs no augmentation, no learning rate, and one forward pass over the training set. It does need memory for the feature bank, the stored training features. ImageNet's 1.28 million training images at d=768 in float16 take 1.28×106×768×2 bytes, about 2.0 GB. The search is the exact top-k search of §7.4. It runs over blocks of the bank with a running merge, so the full similarity matrix never exists.
Its weaknesses are the ones the long blobs showed. A few high-variance directions that carry no label can dominate the cosine. The result also depends on k, on τ, and on whether the features were normalized. Across real encoders, the gap between k-NN and the linear probe follows a telling pattern.
Warm-up
Weighted k-NN classifier
Implement knn_classify(train_h, train_y, test_h, k, tau, n_classes) exactly as the definition says, and return the predicted labels as an integer array of shape (n_test,).
Normalize both banks to unit length and compute all cosine similarities with one matrix product.
Keep the k largest similarities in each test row (use np.argpartition). If k exceeds the number of stored features, use all of them.
Weight each neighbor's vote by es/τ, sum the votes per class, and predict the class with the largest total. Break ties toward the smaller label, which argmax does.
The votes must not overflow for a small temperature such as τ=0.001, where e1/τ is far beyond the largest float.
The data here is small, so you do not need the blocked search of §7.4.
Tests, verified solutions, and AI help, open once you add your API key.
Attentive probes
Why is MAE's linear probe so much worse than its fine-tuning? Part of the answer is the pooling. A linear probe reads one vector per image, either the class token or the average of the patch tokens. MAE's loss is computed on the reconstructed pixels of masked patches, so nothing ever asked either vector to summarize the image. An average over all patches also mixes the object with the background in proportion to their areas. An ImageNet label concerns only the patches that show the object. The authors of the context autoencoder, a masked-modeling method, made this argument and proposed letting the probe choose which patches to read (Chen et al. 2022).
In plain words, each head scores every patch against a learned question and takes a weighted average of the patches' values with those scores. The classifier reads the concatenated answers. This is one layer of the multi-head attention of §4.5, with a single query that belongs to the probe instead of the image. There is no query projection, because a learned vector multiplied by a learned matrix is just another learned vector.
The probe is bigger than a linear one. For a ViT-L (d=1024) on ImageNet it has 3d2+dK=4.2 million parameters, against the linear probe's dK+K=1.0 million. It is also no longer linear in H, so it can read information a pooled vector hides. AIM uses it as its main protocol, and self-supervised video models use the same idea with a full cross-attention block.
The evidence is the pattern of gains.
The masked-modeling features were never that bad. The linear probe was reading the wrong summary of them. In practice, if you evaluate a masked-modeling encoder frozen, use an attentive probe, and say so when you compare it with a linear-probe number. The exercise is multi-head attention with one twist in the shapes, a single query per head, which makes it a good interview question.
Interview
An attentive probe forward pass
Implement attentive_probe(H, q, Wk, Wv, Wo, W_cls, n_heads, n_prefix=0) with no loops. The inputs are a batch of token arrays H of shape (B, T, d), a learned query q of shape (d,), the matrices Wk, Wv, Wo of shape (d, d), and W_cls of shape (d, K).
Drop the first n_prefix tokens of every image (the class token and registers).
Compute the definition above. Counting heads from 0 as in code, head j uses columns j*dk to (j+1)*dk - 1 of the keys, values, and query, the same head split as the head-splitting exercise of §0.1.
Return (logits, A), with logits of shape (B, K) and the attention weights A of shape (B, n_heads, T - n_prefix).
The softmax must be numerically stable.
import numpy as np
def attentive_probe(H, q, Wk, Wv, Wo, W_cls, n_heads, n_prefix=0):
raise NotImplementedError
Tests, verified solutions, and AI help, open once you add your API key.
Fine-tuning, partial fine-tuning, and LP-FT
The largest budget lets the downstream learner change the encoder itself.
A tiny example of the decay rule. A ViT-L has L=24 blocks. With ζ=0.75, the last block trains at 0.75η, block 12 at 0.7513η≈0.024η, and the patch embedding at 0.7525η≈0.00075η. The early layers, which hold the most general features, barely move.
Partial fine-tuning is the experiment that made the field stop treating the linear probe as the measure of a representation.
MAE's features are strong but nonlinear. A single trainable block reads what a hyperplane cannot, much as k-NN read the disk and ring that defeated the linear probe in the widget. Fine-tuned in full at 224 pixels, the MAE ViT-H reaches 86.9.
Comparisons of fine-tuned numbers have their own trap. A fine-tuning recipe is a long list of choices. MAE's recipe (He et al. 2022, Table 9) uses a layer-wise decay of 0.75 and Mixup 0.8. It uses CutMix 1.0, which pastes a patch of one image into another, and label smoothing 0.1, which moves a little of each target's probability onto the other classes. It also uses drop path, which randomly skips residual blocks, and RandAugment, a random sequence of image operations. Two pretrained models fine-tuned with different recipes differ in two things at once. A fair comparison fine-tunes both with the same recipe, and a careful one tunes the recipe for each.
Why fine-tuning can hurt out of distribution
Fine-tuning usually wins on test data like its training data, called in distribution (ID). It can lose badly out of distribution (OOD), on test data that has shifted, such as sketches of the same objects. The reason is exact in a small model studied by Kumar et al. (2022).
The model is a two-layer linear network f(x)=v⊤Bx. The matrix B∈Rd′×d is the feature extractor. It computes d′ features from an input in Rd, and v∈Rd′ is the head. Gradient descent minimizes the squared loss L(v,B)=n1∥XB⊤v−y∥2 over n ID inputs, the rows of X∈Rn×d.
The reason fits in one line. The gradient with respect to B is a combination of the training inputs, so it has no component in any direction those inputs never visit. The full proof follows.
∂ Proof that the features move only inside the training span
Write the residuals as r=XB⊤v−y∈Rn, so the loss is n1r⊤r. The entry Bab enters residual i as vaBabXib, so ∂L/∂Bab=n2∑irivaXib. In matrix form,
∇BL=n2v(X⊤r)⊤=n2vr⊤X∈Rd′×d.
Every row of this matrix is a multiple of r⊤X, a combination of the rows of X. So for u⊥S we get ∇BLu=n2vr⊤(Xu)=0. Each gradient step therefore leaves Bu unchanged. So does gradient flow, whose derivative dtdBu=−∇BLu is zero. ∎
In plain words, fine-tuning rewrites the features of the kind of inputs it trains on and leaves the features of everything else as they were. Meanwhile the head, which reads all of them, is rewritten. Kumar et al. call this feature distortion. If the ID data spans only part of the input space, the new head is matched to updated features in one subspace and to stale ones in the rest. OOD inputs that live in the rest are then misread.
Their main result, Theorem 3.3 of the paper, lower-bounds the OOD error of fine-tuning in this model under stated assumptions. Their Theorem 3.5 shows that linear probing, which keeps B0, does much better OOD when the pretrained features are good. LP-FT avoids the distortion, and their Proposition 3.7 proves it for perfect features. A head that already fits the ID data leaves small residuals r, so the gradient into B is small and the features barely move.
The cell runs plain gradient descent on three ID points with a small step and recovers the gradient-flow answer.
Python · cell 4
Gradient descent ends at v=0.708 and b1=0.999. The weight on x2 is 0.5005 where the target has 0.7071, and the OOD error is 0.0427, against the flow's 0.0429.
The same mechanism appears at scale. Kumar et al. tested 10 distribution-shift benchmarks, among them Breeds, DomainNet, and ImageNet-V2, -R, -A, and -Sketch. Fine-tuning beat linear probing by about 2 points ID and lost by about 7 OOD. LP-FT beat fine-tuning by about 1 point ID and 10 OOD (Kumar et al. 2022). This is the catastrophic forgetting of §14.4, the loss of pretrained ability during fine-tuning, seen through the features. A randomly initialized head sends large, poorly aimed gradients into a good encoder at the start of training. In practice, when an encoder will meet shifted data, probe first and then fine-tune, and keep a shifted test set to check. "Why does fine-tuning sometimes lose to a linear probe out of distribution?" is a common interview question, and this mechanism is the answer.
Research
Feature distortion and LP-FT
The setup builds the two-layer linear model at a size where the theorem bites. Inputs live in R20. There are d′=3 true features, the orthonormal rows of B⋆, and the pretrained B0 is a slightly perturbed copy. The 24 ID training inputs span only an 8-dimensional subspace, while OOD inputs fill all of R20.
Implement transfer(X, y, B0, v0, lr, steps) with full-batch gradient descent on L=n1∥XB⊤v−y∥2. Take both gradients at the current parameters, so the updates are simultaneous. Run three methods, each for steps steps at step size lr.
LP updates only v, starting from (v0, B0).
FT updates both, starting from (v0, B0).
LP-FT runs FT for steps steps, starting from the LP result.
Return {"lp": (v, B), "ft": (v, B), "lpft": (v, B)}. The tests measure ID and OOD errors against the true function and expect the ordering Kumar et al. found.
import numpy as np
def transfer(X, y, B0, v0, lr, steps):
raise NotImplementedError
Tests, verified solutions, and AI help, open once you add your API key.
With the reference solution the ID errors are 1.0×10−2 for LP and below 10−30 for FT and LP-FT. The OOD errors are 0.029 for LP, 0.164 for FT, and 0.019 for LP-FT. Fine-tuning from a random head fits ID best and is more than five times worse than probing OOD. LP-FT is the best on both, the pattern of Kumar et al.'s benchmarks.
Few labels, many tasks, every pixel
A general-purpose encoder will be used on tasks nobody tuned it for, often with few labels. Several families of evaluations try to measure that.
Low-shot evaluation adds one more source of noise, the choice of which few images are labeled. The labeled images are called the support set. A low-shot number must therefore be averaged over several draws of the support set and reported with its spread. The cheapest low-shot classifier is the nearest class mean. Average the unit features of each class's support images. Then assign a test image to the class whose average has the largest cosine with it. It needs no training at all.
Core
Low-shot evaluation with honest error bars
Implement low_shot_eval(train_h, train_y, test_h, test_y, n_per_class, n_draws, rng), which returns the mean accuracy over draws and its sample standard deviation over draws (ddof=1), as two floats.
Normalize all features to unit length.
For each of n_draws draws, and for each class c in np.unique(train_y) in increasing order, pick that class's support set with rng.choice(np.flatnonzero(train_y == c), size=n_per_class, replace=False). Use no other random calls.
Average each class's normalized support features and renormalize the means to unit length.
Predict every test image's class as the one whose mean has the largest cosine with it, and record the accuracy of the draw.
The standard deviation is how far one person evaluating one draw should expect to be off. The standard error of the mean is smaller by n_draws and answers a different question.
Tests, verified solutions, and AI help, open once you add your API key.
With the reference solution and np.random.default_rng(3), 30 draws on the exercise's data give 45.8 percent with a standard deviation of 7.5 points at one shot per class. Five shots give 67.7 plus or minus 4.8, and twenty give 79.8 plus or minus 2.2. At one shot, two honest evaluations of the same encoder can easily differ by ten points, so a single draw tells you very little.
The published transfer studies tell one consistent story. No single number ranks representations for every use.
Dense probes have their own settings that move the number. Segmentation accuracy depends heavily on resolution, which is why DINOv3 segments with every model at 1,024 patch tokens (448 pixels at patch size 14, 512 at 16). It also depends on the high-norm artifact tokens that large ViTs grow. These corrupt feature maps unless the model has the registers of §27.4, extra tokens that give the model somewhere else to store global information. And a global loss does not guarantee good local features. DINOv3's dense scores degraded during long training while its global ones kept rising. Its fix was Gram anchoring (§28.4), a loss that keeps the patch-to-patch similarity matrix of the student close to that of an earlier checkpoint whose dense features were still good. In practice, a dense evaluation reports its resolution, its token count, and whether registers were removed, or its number cannot be compared.
A simulation in which the rankings flip
Now put everything together on three synthetic "pretrained" encoders for one ten-class task. Each caricatures a family of this chapter.
The clustered features are noisy class centers, the geometry contrastive and DINO training aim for.
The spread features caricature MAE, in three parts. They have a weak linear class signal. They have a strong class signal multiplied by a random sign that flips from image to image. That signal averages to zero over images, so no linear map can read it, while a nonlinear map such as an absolute value can. And they have 32 loud nuisance directions that carry nothing, like the textures a pixel-reconstruction loss must keep.
The collapsed features squeeze the clustered ones into 3 dimensions.
Each is scored by weighted 20-NN, a linear probe, a one-hidden-layer MLP probe (a stand-in for partial fine-tuning), and the effective rank.
For example, singular values (3,3,3,0) give shares (1/3,1/3,1/3,0), entropy log3, and effective rank 3, ignoring the tiny ϵ. The cell computes it on the centered training features.
Python · cell 5
Every protocol told the truth about one property. The spread features hold the most information. The clustered ones hold it in the most accessible form. The collapsed ones have lost some of it for good, and the rank saw that without labels.
Measuring a representation without labels
Every protocol so far needs labels. During pretraining, or on a new domain with no labels, you would like a number that predicts them. The effective rank of the embeddings is such a number. Garrido et al. (2023) proposed it for this job and named it RankMe. They compute it on the embeddings z, the projection head's output, of 25,600 unlabeled images, and use it to predict how well the representation h will probe. They take the embedding matrix as it is, without centering. The cell above centered first, so state your convention when you compare numbers.
The evidence is empirical. Across hundreds of runs of joint-embedding methods (the two-branch methods of this chapter), Garrido et al. found that within one method a higher rank goes with a higher linear-probe accuracy, on ImageNet and on other datasets. They then used it to pick hyperparameters such as loss weights, temperatures, learning rates, and weight decay. Choosing the run with the highest rank lost under half a point on average against choosing by labeled ImageNet validation accuracy.
The rank theorem above is the necessary half of the reason, and the simulation shows its limit. The spread encoder had the highest rank and the worst k-NN, because nuisance directions inflated its rank. So compare effective ranks only between runs of the same method, as Garrido et al. advise, and treat the number above all as an alarm for collapse. In practice it sits next to the other label-free checks of §28.3. One is the per-coordinate standard deviation of the unit embeddings, which falls to zero under complete collapse. The other is a plot of the singular-value spectrum, which falls off a cliff under dimensional collapse.
How much a top-1 number moves by chance
Suppose two checkpoints score 81.2 and 80.9 percent on ImageNet's 50,000 validation images. Is the first one better? Two kinds of randomness stand between you and the answer. One is which images happen to be in the test set. The other is the training run itself, whose random seed changes the initialization, the data order, and the augmentations.
The standard error comes from the binomial count of correct answers. Each image is right with probability p, so the count of right answers has variance np(1−p), and the accuracy has variance p(1−p)/n. On small test sets, replace the normal interval by the Wilson interval of §0.11. It inverts the normal test instead of plugging in the measured accuracy, so it stays inside 0 to 1.
Pairing helps because most images do not distinguish the models. Call an image discordant if exactly one of the two models gets it right. Let ai and bi be 1 when models A and B get image i right, and 0 otherwise. Each image contributes a difference bi−ai∈{−1,0,1}. Images both get right or both get wrong contribute zero. The squared difference is 1 on discordant images and 0 elsewhere, so its mean is δ, the fraction of discordant images. The mean difference is the gain g. One difference therefore has variance δ−g2, and their average over n images has variance (δ−g2)/n (§0.11 gives the same result). With δ=0.07 and n=50,000 the paired standard error is about 0.07/50,000=0.12 points. Treating the two accuracies as independent gives about 0.25.
McNemar's test uses only the discordant images. It asks whether "B right, A wrong" is more common than "A right, B wrong". Under the null hypothesis of no difference, each discordant image is equally likely to go either way, so it is a binomial test with probability one half.
The cell simulates two ImageNet-sized evaluations with a true gain of 0.3 points and 7.3 percent discordant images. It then runs the paired bootstrap of §0.11 in its fastest form. A paired bootstrap resamples the test images with replacement, scores both models on each resample, and reads an interval off the spread of the differences. Resampling only changes how many images fall into each of the four cells (A right or wrong, B right or wrong). So one multinomial draw of the four counts is one bootstrap replicate.
Python · cell 6
The widget replays this example at its true gain of 0.3 points, not the sampled 0.22, and draws the 95 percent interval around it. The interval must clear zero before the gain means anything.
How large must a top-1 gain be before it means anything?
A 0.3-point gain on 50,000 images (80 percent accuracy, 7 percent discordant). The bar is its 95 percent interval.
Loading interactive figure…
The same arithmetic, for benchmarks of every size, is the subject of the statistics of benchmarks in Chapter 22. The lesson for this chapter is short. When a paper's ablation table moves by 0.2 points, read it as "no measurable difference" unless it reports several seeds.
Which frozen encoder, as of late 2026
Encoder numbers can only be compared on one protocol and one resolution. Here is the frontier measured that way. Three kinds of encoder appear. Self-supervised ones (DINOv2, DINOv3, Web-DINO, Franca) learn from images alone. Image-text ones (SigLIP 2, and PE-core, the core model of Perception Encoder) learn to match images with captions, as CLIP does. Agglomerative ones (AM-RADIO, PE-spatial) are distilled from several teacher models at once.
One controlled comparison changed many opinions. Earlier, self-supervised encoders lagged CLIP inside multimodal models. The usual explanation was that captions supply meaning that images alone cannot. Fan et al. (2025), in a study they call Web-SSL, removed the confound in the data. They trained DINOv2-style and MAE-style models on the images, and CLIP on the image-caption pairs, of the same 2 billion MetaCLIP samples. The DINOv2-style and CLIP models range from 1 to 7 billion parameters, and the MAE-style ones from 1 to 5 billion. They evaluated the frozen encoders by visual question answering (VQA) through a language model, on the 16 tasks of the Cambrian-1 suite.
Visual self-supervision scaled better with model size and data, and it did not saturate at 7 billion parameters. It reached CLIP-level performance on VQA and on classic vision benchmarks. That suggests the earlier gap came largely from the training data, not from language itself. When an encoder will serve a vision-language model, this is the evaluation that counts, and connecting a vision encoder to a language model builds it.
Here are the protocols side by side.
protocol
what it trains
what it measures
cost
settings that move it
blind spot
weighted k-NN
nothing
whether neighbors share labels (local geometry)
one pass and a feature bank (2.0 GB for ImageNet at d=768 in float16)
k, τ, normalization
nonlinear but globally readable structure, nuisance directions
linear probe
dK+K weights
linear readability of one pooled vector
a convex fit, hours on ImageNet
pooling, layer, learning rate, test-tuning
information spread over tokens or nonlinear features
attentive probe
one cross-attention layer, about 3d2+dK
whether some weighting of the tokens holds the class
a little more than a linear probe
heads, which tokens, regularization
it is no longer a linear readout, so it measures the probe too
partial or full fine-tuning
some or all of the encoder
quality as an initialization
a full training run per task
recipe, layer decay, epochs
confounds pretraining with recipe, distorts features out of distribution
LP-FT
probe, then everything
initialization without distortion
a probe plus a run
the same as fine-tuning
features still move if the probed head fits the task poorly
low-shot
any of the above, few labels
label efficiency
cheap per draw
which images are labeled
needs many draws and their spread
transfer suite
any of the above, many tasks
generality
multiplied by the number of tasks
task choice, per-task tuning
averages hide which tasks fail
dense probe
a linear map per patch
local semantics or geometry
a probe on every patch, at high resolution
resolution, registers, layer
global semantics
VQA through a language model
a connector (and maybe the LLM)
usefulness inside a multimodal model
a multimodal training run
the LLM, the data, the connector
the encoder's own geometry
effective rank (RankMe)
nothing, no labels
whether the embedding has collapsed
one SVD
the sample, ϵ
rank is necessary, not sufficient
In PyTorch
The reference loop does everything the definition asks. It freezes the encoder in evaluation mode as well as without gradients, and extracts features under torch.no_grad(). It trains a probe made of a non-affine BatchNorm and a linear layer. It checks that the encoder's entire state, running statistics included, is bit-for-bit unchanged. And it folds the BatchNorm into the linear layer, as the theorem says it can. The last lines show the bug of the pitfall, a single forward pass in training mode moving a running mean.
🔥 In PyTorchfor a machine with PyTorch
It prints a probe accuracy of 0.993, confirms that the encoder's state is unchanged and that the BatchNorm folds, and then shows one training-mode pass moving a running mean by 0.051.
For a real backbone, the same loop wraps a model loaded from a hub. Feature extraction runs once over the dataset and the results are cached to disk, after which the probe trains in minutes. Probing several layers at once costs nothing extra, since one forward pass can return every block's output. That is how DINOv2 searches its grid.
Where evaluations go wrong
These failures are common enough to deserve a checklist.
The benchmark became the objective. ImageNet linear accuracy was the debugging signal of most self-supervised research, so methods are tuned to it. DINOv2 gives this as its reason for also reporting ReaL and V2.
The recipe moved the number. Probe learning-rate schedules, pooling, and layer choice move linear accuracy by points. An early large study found the linear evaluation sensitive to the learning-rate schedule (Kolesnikov et al. 2019). Fine-tuning recipes confound pretraining with training.
k-NN was run on unnormalized features, or with a k tuned on the test set.
The dense probe was run at the wrong resolution, or on feature maps with artifact tokens.
The best layer was not the last. Probe several, as AIM and Perception Encoder show.
The evaluation did not match the use. For an encoder inside a vision-language model, the evaluation that matters is the multimodal model's. Evaluating that way, on matched data, is how Fan et al. showed that self-supervision can match CLIP.
A single run was reported as a difference. The noise section above shows why that is not evidence.
The probing studies of language models in §23.2 meet the same questions from the other side. There a probe is a microscope on a model's internals. Control tasks, which give each word a fixed random label, guard against probes that score well by memorizing instead of reading. Here a probe is a benchmark for an encoder. The same caution applies to attentive and MLP probes, whose extra capacity measures the probe as well as the features.
Read more
Kornblith, Shlens & Le (2019). Do Better ImageNet Models Transfer Better?. The fixed-feature and fine-tuning correlations, and the finding that regularizers that help ImageNet hurt transfer.
Ericsson, Gouk & Hospedales (2021). How Well Do Self-Supervised Models Transfer?. Thirteen self-supervised models on forty tasks, and where ImageNet accuracy stops predicting transfer.
Fan et al. (2025). Scaling Language-Free Visual Representation Learning. Self-supervised and CLIP models trained on the same data and evaluated through a language model, the evaluation that changed the comparison.
Watch next
🎬 Lucas Beyer | Learning General Visual Representations · London Machine Learning MeetupA co-author of VTAB, BiT, and ImageNet-ReaL on what a general visual representation is and how transfer evaluation should measure it.🎬 The Visual Task Adaptation Benchmark · Yannic KilcherA walk through VTAB's 19 tasks, the 1,000-label protocol, and what its large study found about self-supervised versus supervised pretraining.🎬 Do ImageNet Classifiers Generalize to ImageNet? (Paper Explained) · Yannic KilcherImageNet-V2 explained, why a fresh test set drops accuracy by 11 to 14 points, and what that says about reusing the validation set for selection.🎬 Big Self-Supervised Models are Strong Semi-Supervised Learners (Paper Explained) · Yannic KilcherSimCLRv2 and the 1 and 10 percent label protocols, the low-shot evaluation this section defines.