Elamur Research

Explaining Self-Supervised Image Representations with Visual Probing

Paper · 2021 · Dominika Basaj, Witold Oleszkiewicz, Igor Sieradzki et al.

Summary

An image representation can support accurate classification while leaving open a basic question. What can someone recover from it about the image itself? Basaj and colleagues examine that question for networks trained by self-supervision, where the learning objective can be constructed from images without assigning each one a category label. They adapt a technique from language research called probing. A probe is a simple classifier trained to predict a particular property from a fixed representation. Which properties a probe can recover gives a more specific account of what the representation preserves than overall classification accuracy alone. The paper brings that approach to images as a tool for interpretability.

The authors start by making a dictionary of recurring image regions. They divide images into small, perceptually coherent patches called superpixels, then group patches by the similarity of their features. These groups define visual words. A whole image plays the role of a sentence, and the pixels in a patch supply a counterpart to the characters in a word. With that vocabulary, the authors test whether a representation supports recognition of the visual words in an image, estimation of how many distinct words it contains, estimation of an individual patch’s size, and detection of an alteration made by replacing a patch.

The experiments use ImageNet and compare MoCo v1, SimCLR v2, BYOL, and SwAV. All four representations support recovery of visual-word content and of the properties used to approximate visual complexity. SimCLR v2 has the highest reported score on each probe. SwAV leads the standard ImageNet classification evaluation, with accuracy of 0.753 on the full validation set, while it scores lowest on the word-content probe. The authors also find that the easiest visual words to recover tend to have distinctive, uneven textures, according to a user study of selected examples.

Detecting patch replacements proves harder. On that test, the validation AUC, a measure of how well the probe ranks altered images above unaltered ones, ranges from 0.530 for SwAV to 0.625 for SimCLR v2. Inspection of individual examples suggests that conspicuous disruptions to texture or color can help detection, while replacements that blend into their surroundings often pass unnoticed. The results describe what a simple readout can recover under a particular definition of image content and a particular kind of alteration. They make it possible to distinguish representations that look similar on one diagnostic, or rank very differently in the standard classification evaluation.

Deep dive: Explaining Self-Supervised Image Representations with Visual Probing

Visual probing tests what self-supervised image representations preserve about image regions, visual complexity, and local alterations. · about 33 minutes to read

The problem and its context

What an image classification score leaves open

An image encoder turns a picture into a representation that another component can use. The representation is a collection of numerical features. Ideally, it retains aspects of the picture that matter for tasks such as finding related images or identifying what an image depicts. Basaj and colleagues are concerned with the contents of that intermediate representation. A classifier’s score says how frequently its decisions agree with the annotated categories. The score gives little detail about what can be recovered about smaller regions, the variety of regions present, or how those regions fit together.

The question matters for self-supervised learning because the training exercise generally differs from the tasks for which the representation will be used. The paper describes self-supervision as a way to reduce the annotation needed to learn effective visual features. A network may learn by comparing different views of an image or by predicting how representations are grouped. A downstream classifier can then attach category names to the resulting features. How well this works establishes the value of the features for that classifier. A separate experiment is needed to see whether those features also expose properties that the original training objective never asked the network to name.

The authors distinguish this problem from the questions answered by earlier explanations in computer vision. Some earlier studies attached simple classifiers to hidden layers of supervised networks to investigate the relevance of those layers. Other methods highlighted individual pixels that mattered to a prediction. In the paper’s account, a highlighted region may appear as a diffuse collection of pixels, leaving the reader to decide whether it corresponds to a recognizable part, material, or pattern. The authors also discuss approaches that identify influential regions as units. A region can be important for a network’s objective and still be hard for a person to interpret. The visual probes therefore need units that can be compared across images, with a definition consistent enough to serve as a prediction target.

Why the analogy starts with language

In natural language processing, researchers already had a way to ask targeted questions about a representation. The paper describes probes for properties such as whether a sentence contains a particular word or how deeply its syntactic structure is nested. Other work asks about properties of individual words. A sentence-level probe can also ask whether a word has been replaced. In each case, the investigator decides what to predict, supplies examples with known answers, and checks how well a simple classifier can answer from the representation.

The simplicity of the classifier is part of the design. If the aim were to solve the diagnostic task as well as possible, a more elaborate classifier might be worthwhile. Here, the question is how readily the property can be recovered from features that already exist. The probe learns which features to use while the feature extractor stays fixed. This gives an operational meaning to the idea that a representation encodes a property. The property is accessible to the kind of readout that was fitted, on examples drawn from the chosen task.

The language analogy exposes a practical difficulty. The same word can appear in many sentences. An arbitrary patch cut from an image has no corresponding name that makes its recurrence obvious. Two photographs can both contain brickwork while giving it a different outline, scale, or shade. If every individual patch counts as its own type, a probe that asks whether a particular type is present has little basis for reusing what it learns across pictures. A visual vocabulary needs a rule that can place different-looking instances into a common group.

There is a related question about what it means to change an image. In a written sentence, a substitution can be defined by the positions of the words. An image offers many possible locations and shapes for a substitution. The authors need an operation that leaves much of the picture intact and gives a precise meaning to changing one local unit. Superpixels supply the regions, and the shared vocabulary lets the authors specify that the replacement belongs to a different visual word. Together, those choices turn a general question about visual consistency into a test with examples and labels.

Earlier probing work, as the authors describe it, includes both tests of individual linguistic items and tests of how items compose into a larger unit. The visual framework inherits both scales. It can ask about a single region’s size or about the collection of region types in a picture. The earlier multilingual probing work also offers a precedent for reusing a diagnostic design across different settings. The distinction is between carrying over the question and carrying over the units. Images need their own definitions of an item, its presence, and a change to it.

The learning methods under examination

The self-supervised methods in the paper use different training signals. In the paper’s description of contrastive learning, a positive pair consists of modified views of the same image, and a negative pair comes from different images. The objective uses similarities in feature space to distinguish the two kinds of pair. MoCo v1 obtains negative examples using a slowly updated encoder. Its past representations supply examples for comparison, so the training process can draw on features produced over time.

SimCLR v2 is described as using large batches to supply negatives, with batch sizes of up to 4096 examples in the earlier method’s account. It also uses carefully chosen image augmentations and a projection head, a component that maps the encoder features into the space where the training loss is applied. The distinction between those spaces matters here. The features used for a diagnostic come from the base network. The space in which the learning objective is evaluated can be different.

BYOL also uses a projection head. In the comparison drawn by Basaj and colleagues, it trains without explicit negative examples or a contrastive loss defined in terms of those negatives. SwAV takes a different approach to using relationships among images. It groups representations and learns by predicting cluster assignments, avoiding direct pairwise comparisons of the kind described for contrastive training. These methods give the paper a set of alternatives whose features can be examined with the same visual vocabulary. The earlier work that introduces BYOL is Bootstrap Your Own Latent.

The method, step by step

Building a visual dictionary

The first step is to choose regions that can function as words. The authors start with superpixels, connected-looking patches that bring together nearby pixels into perceptually meaningful regions. A segmentation cuts an image into nonoverlapping patches at a given resolution. It gives the method an intermediate unit between a single pixel and a whole picture. A patch might capture a part of an object or a stretch of patterned material. Its boundary is supplied by the segmentation procedure, so its status as a coherent concept remains something to examine.

The paper uses the settings of ACE, an existing method for extracting candidate visual concepts. ACE runs the SLIC superpixel procedure at resolutions of 15, 50, and 80 segments per image. Those settings give a pool of regions at different scales. A coarse partition can put a relatively broad area into one patch, while a finer partition yields smaller pieces. Each segmentation has its own set of nonoverlapping regions. Patches from different segmentation resolutions can describe some of the same area, since the image has been partitioned again.

Next, the authors need a way to compare patches cut from different pictures. They use an ImageNet-trained GoogLeNet network to turn the patches into feature vectors. Specifically, they take the output from its mixed4c layer. A feature vector is a numerical description of the patch as processed by that layer. Patches can now be compared by where their vectors fall in the resulting feature space. The layer used to describe the region contributes to what the procedure treats as visually similar.

The authors group those vectors using k-means. The procedure organizes the examples around cluster centers, also called centroids. Each cluster supplies a candidate visual word. The centroid represents the group in feature space, while the patches assigned to the group provide visible examples of what the word covers. The recurring unit is therefore a type defined over similar patches. An individual patch is one instance of that type.

Clustering produces many candidates, and the paper restricts the vocabulary before running the probes. The authors study an ImageNet subset of 55 classes grouped under animals, vehicles, musical instruments, buildings, and fruits. They keep 100 visual words on the basis of relevance according to TCAV, the concept-scoring approach used in their dictionary construction, while making sure every selected class has at least one representative word. The relevance criterion connects the retained concepts to prediction by the supervised network. The coverage rule keeps the selection from omitting any of the chosen classes altogether.

This procedure fixes the meaning of a word across the self-supervised encoders. GoogLeNet supplies the patch features used to define the words, and each encoder under investigation is judged against those same definitions. If the vocabulary had been rebuilt inside each encoder’s feature space, the groups could have changed along with the representations. A comparison would then mix two questions: whether a representation makes its own vocabulary accessible and whether it answers the same visual question as the other representations.

The dictionary has a concrete role at assignment time. The authors send each superpixel through GoogLeNet and again read its mixed4c features. Since the resulting vector lives in the space used to construct the dictionary, it can be assigned to the closest retained centroid. Repeating this procedure gives the image a collection of visual-word occurrences. Several patches can land on the same word. A different picture can contain that word as well. The paper depicts this process by showing distinct patch vectors assigned to a smaller collection of word centers.

From image regions to frozen-feature probe scores

The steps in order.

From image regions to frozen-feature probe scoresStep 1: Segment ImageNet images into superpixels at several scales1. Segment ImageNet images into superpixels at several scalesStep 2: Encode patches with GoogLeNet2. Encode patches with GoogLeNetStep 3: Cluster patch vectors and select recurring visual words3. Cluster patch vectors and select recurring visual wordsStep 4: Assign patches to their nearest retained words4. Assign patches to their nearest retained wordsStep 5: Construct diagnostic labels for images and patches5. Construct diagnostic labels for images and patchesStep 6: Extract frozen self-supervised representations6. Extract frozen self-supervised representationsStep 7: Train and evaluate logistic regression probes7. Train and evaluate logistic regression probes

Keeping the labels and the tested features distinct

The dictionary construction and the diagnostic classification use different feature sources. The supervised GoogLeNet features define patch memberships. For the probe inputs, the authors use publicly available ImageNet-trained encoders for MoCo v1, SimCLR v2, BYOL, and SwAV. They take representations from the penultimate layer of ResNet-50, the layer immediately before the last one in that backbone. The backbone and the extraction point are shared. The pretrained networks use different learning settings.

It is possible to follow the two branches by considering a single image. In the labeling branch, the image is segmented and its patches are assigned words. From those assignments the experimenters can obtain, for instance, a record of whether a particular visual word occurs. In the other branch, a self-supervised encoder produces the representation on which the probe will operate. At evaluation time the probe gets that representation as input. Its prediction is checked against the target constructed in the labeling branch.

The base network remains frozen while the probe is fitted. Freezing preserves the encoder’s parameters, so the task can reveal information made available by the existing features. If those parameters changed during probe training, the word labels could teach the encoder to solve the task directly. In the paper’s setup, the logistic regression coefficients do the learning. The question is how far they can get with the features that pretraining supplied.

The distinction also applies to image scale. Most of the probes use a representation of the whole image. Character Bin uses the representation of an individual superpixel. A successful image-level probe can indicate that a picture contains a particular feature or has a certain amount of visual variety. The patch-level probe answers a narrower question about the region presented to the encoder. Both kinds of readout are diagnostic, with different objects of prediction.

Word Content asks what is present

The Word Content probe, abbreviated WC, asks whether an image contains each retained visual word. The labels come from the patch assignments. If any superpixel is assigned a given word, that word is present for the purposes of the test. Further occurrences do not change the presence label. The image has 100 binary targets, one per retained word, and the authors fit 100 separate classifiers. An image can have several positive labels because several words can occur together.

The input to each classifier is the whole-image representation produced by the encoder being tested. The probe is trained to recognize evidence for a particular word in a global feature vector. For a region type that recurs across pictures, the classifier has to find features that allow it to distinguish pictures with that region type from pictures without it. Evaluating the predictions over images then shows whether the label is consistently accessible.

The analogy to a sentence is close at the level of the question. In a text probe, an experimenter can ask if a specific word occurred. The corresponding visual label takes more construction. The appearance of a region varies across examples, and its membership is decided in a learned feature space. The authors treat this as an approximation to semantic content. In operational terms, good performance means that the image representation is informative about the presence of patch types selected by their dictionary procedure.

This test concerns presence anywhere in the picture. The label discards the patch’s exact coordinates and the number of times the word occurs. For instance, two pictures can be positive for the same word even if that type appears in different parts of the scene. A probe that gets both cases right has recovered the presence property that it was asked about. Locating the occurrences would require a different target.

Each word receives its own AUC. To report an overall Word Content result, the paper averages those scores across the 100 classifiers. The average reflects how well the probe family ranks examples across the vocabulary. Individual word scores remain available for investigating which types of region account for the overall result and whether different encoders differ on particular concepts.

Sentence Length asks how varied the picture is

The Sentence Length probe, or SL, draws its target from the same word-presence labels. It counts how many distinct words occur in the picture. Repeated assignments to the same word contribute one type to that count. The term length is borrowed from language probing, where sentence length counts words or tokens. In the visual test, the authors use a count of distinct types as a proxy for semantic complexity.

An image made up mostly of similar regions can have many patches but relatively few visual words. Another image with more varied regions can cover more entries in the dictionary. The distinction is important because segmentation already sets the number of regions at each chosen resolution. Predicting the number of different assignments raises a different question from recovering that segmentation setting. It asks how varied those regions are under the vocabulary.

The paper illustrates the extremes with examples containing <13 distinct visual words and images containing >42. Those cutoffs describe the examples used to show low and high visual variety. For the diagnostic classification, the authors group the range of possible counts into 5 equally wide bins. Binning converts a numerical count into a class: the probe predicts the range to which an image belongs.

The probe again sees a whole-image representation. It can succeed by using features correlated with visual diversity. Success does not require first predicting each word correctly and then counting the results. Word Content supplies the labels from which the target can be constructed, while the Sentence Length classifier learns directly from the frozen representation and its bin labels. This is one reason the two tests can return different profiles even though they share a vocabulary.

A practical consequence of using distinct types is that the measure responds to which features are available in the dictionary. Adding more instances of a familiar pattern leaves the count unchanged. A region placed in a different retained group can raise it. Therefore, visual variety in this experiment has a precise sense tied to patch assignments. It does not require a person to make an overall judgment about whether the scene is simple or complicated.

Character Bin asks how large a patch is

Character Bin, or CB, takes its inspiration from a probe that classifies words by their number of characters. The image equivalent is the number of non-grey pixels in a superpixel. The target is placed in one of 6 bins. The probe gets the self-supervised representation of the superpixel, so its input and its label refer to the same local region. The paper shows examples of large and small superpixels to make the distinction visible.

The count provides a direct measure of region size under the paper’s patch convention. The classifier has to recover the interval that contains the count. Pixel count may be related to how much of a region’s geometry survives encoding, which is why the authors discuss the result in connection with shape. The task supplies an area-like quantity. Different outlines can have the same count, and the label groups those cases together by construction.

This setup also makes clear why the paper treats Character Bin differently from a semantic recognition exercise. A probe can benefit from signals about the extent of the foreground region without identifying which visual word it represents. Calling the task a complexity probe places it alongside Sentence Length in the experiment. At the level of the labels, the two tasks measure distinct properties. One counts the diversity of types in a whole picture, and the other measures the size of an individual patch.

The separation contributes to the interpretation of the results. An encoder could preserve enough information to estimate patch size while making the patch’s dictionary identity difficult to recover from a whole-image vector. Likewise, an image vector could give a readout a good sense of visual variety without exposing the size of every constituent region. The probes use related units, but they do not assume a single scale on which all aspects of visual detail can be placed.

Semantic Odd Man Out asks whether a region was replaced

Semantic Odd Man Out, or SOMO, starts from a language test in which a noun or verb is replaced and a classifier has to identify the altered sentence. For the image version, the authors select a random superpixel and substitute a similarly shaped patch from another image. The incoming patch must belong to a different visual word. The change is local, and the new region is selected so that its shape is comparable to that of the region removed.

Each example has a binary label for whether a replacement was performed. The authors supply a whole-image representation of the version in question. The probe therefore classifies an image by itself. It has no side-by-side original with which to compare it. It must use whatever observable traces of that operation remain in the frozen representation.

The requirement that the donor belong to a different word gives the replacement a defined meaning in the visual vocabulary. The shape requirement constrains the physical substitution. Within those constraints, replacements can still vary in their visibility. A patch may interrupt a repeating pattern or introduce a noticeable change of color. Another patch can fit into its surroundings closely enough that a person would have difficulty spotting it. Both count as positive examples if the operation was applied.

This construction provides a way to ask whether a representation exposes compatibility among the parts of an image. The direct task is detection of the particular substitutions the experiment produces. The link to semantic consistency follows from treating the patches as concept-like words whose fit can change when a different word is inserted. Local contrast and the fit of textures can also influence the visibility of a substitution, which is part of what the authors investigate in their example analysis.

Fitting the probes and scoring their outputs

The authors use logistic regression for all the diagnostics. It assigns scores by weighting the features in a fixed representation and fits those weights using labeled examples. The fitting procedure uses the LBFGS solver, an optimization algorithm, with a maximum of 1000 iterations. That number is a limit on the fitting procedure. The features from the base network stay fixed throughout.

The paper keeps the standard ImageNet training and validation split. Training examples teach each diagnostic classifier to associate features with its target. Validation examples test whether the learned readout carries over. The authors use random oversampling where needed to address class imbalance. Oversampling increases the representation of a less common class in the training data by giving examples from that class more chances to be seen. For SOMO, the paper specifies balanced training and validation data.

AUC is the area under the receiver operating characteristic curve. For a binary probe it summarizes how well the classifier’s scores rank positive examples above negative ones across decision thresholds. In Word Content, a positive example is an image containing the word whose classifier is being evaluated. In SOMO, it is an altered image. AUC measures separation based on scores. Accuracy counts how often a definite prediction agrees with the label.

For the binned tasks, the paper uses one-vs-rest AUC. Evaluation treats one bin as the positive class and the remaining bins as the comparison cases. This lets the diagnostic assess whether scores distinguish a given range from the alternatives even when ranges are unevenly populated. The reported AUC summarizes performance, while the confusion matrices show which category labels are actually predicted for examples in each true bin. The authors make the implementation available as the visual-probes code.

Experiments and results

The reference task and the diagnostic tasks

The comparison uses pretrained ImageNet representations, a diagnostic vocabulary based on the selected classes, and the standard training and validation partition. The four pretraining methods are the alternatives under examination. They share the ResNet-50 backbone and feature extraction point, allowing the paper to run the same kind of readout on each. The supervised network used for the dictionary has a different role. It provides the definitions from which the diagnostic targets are made.

The reference outcome, called Target in the paper, is the accuracy of a linear evaluation on the full ImageNet validation set. Linear evaluation fits a classifier to frozen features, then checks whether those features support the annotated category predictions. The parallel with probing is deliberate. Both evaluations learn a shallow readout while keeping the feature extractor fixed. The reference task asks for the image class. The probes ask for properties defined by the patch vocabulary, patch sizes, and replacements.

The strongest Target result belongs to SwAV, followed by BYOL and SimCLR v2. MoCo v1 has the lowest reference accuracy. These values are classification accuracies, expressed on the scale used in the paper’s main results. The diagnostic scores that follow are AUCs and refer to the probes evaluated using the ImageNet validation split. The full validation set is specified for the Target task.

Frozen-feature ImageNet classification accuracy on the full validation set

SwAV leads the linear evaluation of the frozen image representations.

Frozen-feature ImageNet classification accuracy on the full validation setMoCo v1: 0.606MoCo v10.606SimCLR v2: 0.717SimCLR v20.717BYOL: 0.723BYOL0.723SwAV (this paper): 0.753SwAV (this paper)0.753
The numbers
System or settingaccuracy
MoCo v10.606
SimCLR v20.717
BYOL0.723
SwAV (this paper)0.753

Recovering which visual words occur

The ordering changes when the target is visual-word presence. SimCLR v2 leads the average Word Content AUC. BYOL and MoCo v1 are close to it, with SwAV below the other representations. The measure describes a classifier’s ability to rank images with and without a given visual word, averaged across the vocabulary. The result shows that the dictionary’s region categories leave recoverable traces in whole-image features from all four encoders.

Mean Word Content AUC on the ImageNet validation split

SimCLR v2 leads the word-presence probes, with BYOL and MoCo v1 close behind.

Mean Word Content AUC on the ImageNet validation splitMoCo v1: 0.790MoCo v10.790SimCLR v2 (this paper): 0.800SimCLR v2 (this paper)0.800BYOL: 0.795BYOL0.795SwAV: 0.761SwAV0.761
The numbers
System or settingAUC
MoCo v10.790
SimCLR v2 (this paper)0.800
BYOL0.795
SwAV0.761

MoCo v1 is informative in this comparison because it answers questions about patch content about as well as encoders that support appreciably better ImageNet classification. SwAV has the reverse profile. Its Target ranking gives a poor guide to where it sits in the word-presence comparison. The authors interpret this as evidence that the kind of semantic content measured by their vocabulary accounts for only part of what matters to standard category prediction.

The finding is specific to the property evaluated. An image classifier predicts one of the dataset’s categories from its features. Word Content asks whether the features expose a collection of local region types, possibly several in the same image. A representation might make an ImageNet class accessible through evidence distributed across different features than the ones most useful for a particular visual word. The rankings show that the two readouts distinguish the encoders in different ways. The comparison gives no numerical estimate of how much classification accuracy is attributable to the region information.

An average also smooths over properties of the visual words themselves. The paper reports that some labels can be recovered more reliably than others. As a consequence, similar overall Word Content scores need not imply that two encoders expose the same region types equally well. The word-by-word analysis examines that variation and is especially useful for understanding why an encoder with an unremarkable mean may still stand out for some textures.

Recovering visual variety and patch size

For Sentence Length, the one-vs-rest AUC on the ImageNet validation split is 0.868 for MoCo v1, 0.877 for SimCLR v2, 0.876 for BYOL, and 0.838 for SwAV. The classifiers read a whole-image feature vector and predict the bin for the count of different dictionary words. The close results for SimCLR v2 and BYOL show how little their overall ranking ability differs on this diagnostic, even though particular complexity ranges can be easier for one to identify.

The comparison with Word Content is informative because the tasks share the visual-word assignments but ask for different information. Counting distinct types only requires enough evidence to estimate variety. Knowing which types occur requires evidence specific to each word. The authors see the results for the two probes as consistent with a connection between the visual content available in the representations and the variety of that content. The results also allow the possibility that a readout estimates diversity using more general image features.

For Character Bin, the ImageNet validation one-vs-rest AUC is 0.937 for MoCo v1, 0.964 for SimCLR v2, 0.961 for BYOL, and 0.956 for SwAV. These scores show that all the tested representations expose information about the number of non-grey pixels in a patch. They are numerically higher than the Sentence Length scores. Since the labels and inputs differ, the comparison does not establish a general ordering of what information is easiest to encode. In particular, a patch representation receives the local region directly, while the Sentence Length probe must infer a property of a whole picture.

There is a further difference in the relative results. SwAV sits below the other encoders on Sentence Length, but it scores above MoCo v1 on Character Bin. The weaker result on the whole-image diversity test therefore coexists with a strong readout of local region size. The two tasks give different meanings to the general idea of complexity. Their usefulness comes partly from being able to observe those meanings independently.

The authors also examine confusion matrices for the binned tasks. Those matrices record how predictions are distributed across bins for examples with a given true label. They show where good aggregate scores can coexist with recurrent errors in a particular part of the range. The paper uses the Sentence Length results for BYOL and SwAV to make this point concretely, looking at how effectively the probes recognize images with few distinct visual words.

Detecting a local replacement

The SOMO probe has the lowest AUCs of the visual diagnostics. SimCLR v2 leads, with BYOL next, while MoCo v1 and SwAV have lower scores. The outcome concerns balanced validation examples of altered and unaltered images. Even the leading representation exposes considerably less information about these replacements than it does about patch size or the presence of dictionary words, as measured by their respective probes.

Semantic Odd Man Out AUC on the ImageNet validation split

SimCLR v2 offers the clearest signal of patch replacement among the tested representations.

Semantic Odd Man Out AUC on the ImageNet validation splitMoCo v1: 0.559MoCo v10.559SimCLR v2 (this paper): 0.625SimCLR v2 (this paper)0.625BYOL: 0.615BYOL0.615SwAV: 0.530SwAV0.530
The numbers
System or settingAUC
MoCo v10.559
SimCLR v2 (this paper)0.625
BYOL0.615
SwAV0.530

A patch replacement can leave nearly all of the image’s original evidence in place. An image vector might therefore preserve the main features used to identify its content while making the replacement difficult to detect. Weak SOMO performance is compatible with strong Word Content performance. Recognizing the presence of a region type across images and recognizing that a particular occurrence was inserted are different problems. The second depends on whether the representation exposes evidence about the local context, the visible trace of the substitution, or both.

The authors compare examples that the SimCLR v2 probe detects with examples that the SwAV probe misses. They find cases in which a replacement changes enough of an area’s texture or color to be apparent on inspection. SimCLR v2 correctly identifies some of those changes that SwAV overlooks. The paper also shows more blended alterations that neither probe detects. Such examples help explain what the aggregate score includes: a mixture of conspicuous interventions and changes that are difficult to see even when someone is looking for them.

SOMO therefore tests a property that remains weakly accessible in these global features under the chosen operation. It does not supply the converse of the Word Content score. A classifier can identify many of the vocabulary’s words without saying how their occurrences are related in a given picture. The results make the distinction visible, while the example comparisons show how perceptual evidence about the act of replacement can affect the test.

What the ablations show

The paper reports no controlled component-removal ablation. It compares existing pretrained encoders and examines per-word results, human judgments of selected regions, confusion matrices, and individual replacement cases. These analyses show where the probes succeed or fail. Their design supports comparisons of observed behavior and gives the authors hypotheses about possible causes.

Texture differences within the visual vocabulary

The authors first ask what is distinctive about the easiest and hardest visual words to recover. They rank words by their Word Content performance averaged over the tested representations, then use examples from the two ends of that ranking in a user study. In the judgments reported by the paper, the five best recognized words tend to have distinctive, nonuniform textures. The five least recognizable words are perceived to have more uniform texture. A pattern with substantial internal variation can supply recurring local cues across different images, which offers a possible explanation for its accessibility to the probes.

The study relates people’s impressions of visible examples to the classifiers’ performance. The examples are shared regions grouped as a visual word, so the appearance that participants judge is connected to an actual prediction target. This gives the authors a way to interpret differences that would be invisible in the average AUC. It also places the finding closer to a specific visual property than the overall label of semantic knowledge. What varies across words can include how recognizable their constituent patterns are.

The authors discuss the result as evidence of a possible preference for patterns and relate it to earlier findings that they say point in the opposite direction. That comparison is suggestive because the analysis here uses word recoverability and judgments of selected examples. A broader test of reliance on texture would need to establish how texture matters when competing evidence about image content is held fixed. In this paper, texture is a property associated with the words that the readouts recover most easily.

The authors next compare words that an individual encoder makes especially accessible relative to the others. MoCo v1’s five leading relative examples have distinctive patterns, and the user study indicates that it is particularly good at recognizing words with nonuniform textures. SimCLR v2, BYOL, and SwAV are reported as above average for words with uniform textures in this comparison. The result helps explain how an encoder with a middle-ranking average can have a noticeable advantage for a particular part of the vocabulary.

There is a distinction between the pooled ranking and the comparison of relative strengths. A word that every encoder recognizes easily can contribute to the pooled texture finding. A word for which MoCo v1 stands out says something about differences among encoders. That word need not be the easiest in absolute terms. Reading the two analyses together therefore provides information about both the difficulty of the visual words and the distinct behavior of the representations on them.

Where the complexity probes make their mistakes

The Sentence Length and Character Bin confusion matrices give a more detailed view of the binned classifiers. An aggregate AUC describes how examples are ranked, with results gathered across a task’s categories. A confusion matrix instead shows what happens to examples from each particular bin when the classifier assigns a label. Two encoders can have similar aggregate results while sending examples to the wrong bins in different proportions.

For Sentence Length, the authors highlight BYOL’s weaker performance on images with low visual-word diversity in spite of its strong overall result. SwAV has the lowest AUC on this probe, yet it stands out on relatively simple pictures. The apparent tension disappears once the comparison is localized. Performance on low-diversity images describes one part of the problem. The overall AUC reflects the probe’s ability to separate ranges across the different degrees of visual diversity.

This kind of analysis also clarifies what the paper means when it says that the encoders preserve complexity to a similar degree. That description concerns the broad performance observed in the probes. The confusion matrices let readers see preferences within the ranges, including cases where a weaker overall encoder does well for a particular group of examples. The result gives a more precise account of the information available in features than a comparison of the aggregate scores on its own.

Visibility and replacement identity in SOMO

To understand the replacement results, the authors inspect decisions from the highest and lowest SOMO performers, SimCLR v2 and SwAV. They look at true positives, in which an altered image is correctly flagged, and false negatives, in which an altered image is classified as unchanged. The paper describes a focus on high-certainty cases, with a threshold of >80%. This is the certainty criterion for the selected classifier decisions. It is separate from the AUC reported for the whole validation comparison.

The examples bring out the role of the visible disturbance. The SimCLR v2 probe frequently succeeds when inspection makes the inserted region easy to recognize. It has more difficulty when the substitution blends into the image and leaves the dominant colors and textures relatively undisturbed. The SwAV probe misses some of the conspicuous modifications that the SimCLR v2 probe catches. Visual inspection lets the authors connect those differences to examples, although it does not isolate the exact cues used by either classifier.

The authors also compare the visual words used as replacements in successful detections and misses. They report no substantial difference in replacement-word identity across the cases they examine for the two encoders. Their interpretation emphasizes how much the inserted patch disturbs the particular image. The same sort of visual word could create a conspicuous interruption in one context and look plausible in another. The analysis points to that contextual relationship as more informative than the identity of the incoming word by itself.

The paper considers whether architectural choices could contribute to the SOMO differences. In its account, the training of SimCLR v2 and BYOL uses a projection head, while the tested MoCo v1 and SwAV setups do not. The two encoders in the first group have the highest replacement AUCs. The authors cite earlier work to motivate the possibility that projection helps retain information about input transformations. Because these are comparisons of complete training methods, the projection head varies alongside other aspects of pretraining. The pattern supplies a hypothesis about the differences, and a controlled comparison of the component would be needed to measure its contribution.

Limitations

Limits the authors state

The authors define their semantic and complexity measures through specific proxies. Word Content approximates semantic knowledge using the presence of selected visual words. Sentence Length approximates visual complexity using vocabulary diversity. Character Bin measures the non-grey pixel count of a patch. When the paper relates strong Character Bin performance to shape, it also specifies that the predicted quantity is pixel count. Consequently, the result supports recovery of a size-related feature without resolving which aspects of an outline the representation preserves.

The paper also specifies how the dictionary is bounded. The ImageNet subset covers 55 classes, and the resulting vocabulary is reduced to 100 words selected by a relevance criterion and a class coverage rule. The choice addresses the growth of the candidate dictionary as more classes are included. It also means that the probes ask about a selected collection of recurring regions. The class coverage condition establishes that each selected class contributes a representative. It leaves room for different types of concept to have very different levels of representation within the dictionary.

The authors qualify their interpretation of replacement detection. The substitutions affect a limited area of the image, and their result concerns the chosen corruption setup. They discuss earlier research in which self-supervision helps detect examples outside the expected data distribution. The paper treats its finding as compatible with that research because scoring an image for distributional novelty and detecting a specific patch substitution are different tasks. Weak performance on one locally defined alteration gives evidence about that alteration under the paper’s representation and readout.

The authors further suggest that losing sensitivity to consistency could matter when small changes affect later predictions. Their SOMO probe measures whether an image looks altered to the readout, given its frozen representation. The evaluation does not track the standard image classifier’s label before and after each substitution as its outcome. The possible practical consequence is therefore a motivation for further investigation. The measured result is the relative difficulty of distinguishing the altered examples from the unchanged ones.

The texture interpretation is likewise tentative. The authors connect easily recognized words to distinctive visible patterns using judgments on selected examples. That association may indicate that the representations are especially sensitive to patterns. The paper’s evidence concerns which of its visual words are easiest to read out, with the human judgments providing an interpretation of those words’ appearance.

Limits that follow from the setup

The common dictionary allows a fairer comparison in the specific sense that all tested encoders answer the same questions. The labels still depend on a supervised GoogLeNet representation and on which candidates score well under TCAV. A good Word Content result therefore indicates recoverability of categories defined through that supervised feature space and selection procedure. If a self-supervised encoder exposes a different grouping of patches that the dictionary never names, it receives no direct credit for preserving that grouping. Dictionaries built with a different encoder, a different segmentation, or a different selection criterion could change the diagnostic.

The nearest-centroid rule gives every assigned patch a dictionary label. This is convenient for assembling presence targets, though membership is defined relative to the available centroids. A patch that fits none of the retained words especially closely can still have a closest one. Its assignment then counts toward Word Content and can affect the distinct-word count. That dependence is part of the operational definition of the targets. Evidence about the accessibility of those targets is more direct than evidence about a person’s inventory of the concepts present in the image.

The paper’s readouts assess information accessible to logistic regression. A low score can arise because the property is only weakly represented, because the relevant cues are arranged in ways a linear classifier cannot extract, or because the examples themselves supply weak evidence about the label. These possibilities matter most for SOMO. A replacement can be difficult to spot in the picture even before the encoder compresses it into a vector. The paper’s example inspection shows this variation in visibility. A single probe score cannot allocate the difficulty between the input, the feature extraction, and the fitted classifier.

Strong scores also need a careful interpretation. A whole-image representation can predict the presence of a visual word using features correlated with that word. It may encode the region itself, or it may carry contextual evidence about where such a region tends to occur. The probe gets a global vector and is scored on a presence label. The setup therefore leaves localization and the basis of the inference unresolved. High AUC supplies evidence of recoverability without identifying the pixels or features from which the answer was derived.

The same issue appears in the complexity tests. For Sentence Length, the label concerns distinct region types, but correlations with other properties of the picture could help the probe estimate the bin. For Character Bin, cues about the size of the non-grey region can support an accurate decision without preserving its detailed geometry. Neither case weakens the direct prediction result. Both define the scope of the explanation that the result supports.

For SOMO, shape matching and a change of visual-word identity specify the intervention, while the altered pictures can also contain low-level signs of editing. A probe that detects a discontinuity in texture or color can correctly flag a replacement without having to reason about whether the inserted region makes sense in the depicted scene. Conversely, a substitution across dictionary entries can remain plausible in its new context. Semantic mismatch and procedural alteration are thus related but distinct properties. The binary label establishes the latter directly.

The comparison of encoders holds the broad backbone and readout design fixed. Their training settings differ, so each result belongs to a complete pretrained system. The observations about projection heads and about texture preferences remain associations across those systems. The study does not isolate the effect of a particular loss, augmentation setting, or projection choice. The complementary Target and diagnostic scores likewise establish differences in recoverability and category prediction. They do not reveal which share of category accuracy comes from any single kind of visual information.

Finally, the paper presents the approach as applicable to different image domains, drawing on the portability of probing ideas in language research. Its empirical comparison is based on ImageNet. A new domain may contain different kinds of parts, different recurring textures, or different rates at which particular visual words occur. Reusing the framework in that setting would involve deciding which groups are meaningful, how to construct the labels, and whether the readout behaves similarly. Those choices follow from the way the paper makes probing possible: it first defines the visual units against which recoverability can be measured.

What came after

No follow-up study is documented here. The paper itself leaves open whether other visual vocabularies would recover the same relative strengths, whether the texture findings would hold across a broader range of concepts, and how much local consistency a readout could detect when the visibility of replacements is controlled. Those are questions raised by the original experiments, whose evidence concerns the ImageNet features, dictionary, and patch substitutions the authors examined.

Cite

Cite as Dominika Basaj, Witold Oleszkiewicz, Igor Sieradzki, Michał Górszczak, Barbara Rychalska, T. P. Trzcinski and Bartosz Zieliński. 2021. Explaining Self-Supervised Image Representations with Visual Probing.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.24963/ijcai.2021/82

@misc{basaj2021explaining,
  title = {{Explaining Self-Supervised Image Representations with Visual Probing}},
  author = {Dominika Basaj, Witold Oleszkiewicz, Igor Sieradzki, Michał Górszczak, Barbara Rychalska, T. P. Trzcinski and Bartosz Zieliński},
  year = {2021},
  doi = {10.24963/ijcai.2021/82},
  url = {https://doi.org/10.24963/ijcai.2021/82}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/basaj-2021-explaining-self-supervised-image-representations/