Introduction
Self-supervised learning (SSL) has revolutionized computer vision, enabling models like SimCLR and BYOL to achieve performance levels comparable to fully supervised models without requiring extensive manual annotations. However, these models often remain "black boxes." While existing explainability methods like saliency maps highlight where a model looks, they fail to explain what high-level semantic concepts the model has actually learned.
This paper addresses this gap by introducing a novel "visual probing" framework. Drawing an analogy between vision and language, the authors treat images as "visual sentences" composed of "visual words." This allows for the adaptation of successful interpretability techniques from Natural Language Processing (NLP) to explain the semantic knowledge stored within SSL embeddings.
Methodology: The Visual Probing Framework
The authors propose a systematic mapping between visual and textual modalities to enable "probing"—a technique where simple linear classifiers are trained on top of frozen representations to determine if specific information is present.
Creating Visual Words
To bridge the gap between pixels and semantics, the framework decomposes images into discrete units:
- Segmentation: Images are divided into superpixels using the SLIC algorithm.
- Encoding and Clustering: These segments are encoded and clustered into a "visual vocabulary" using the TCAV (Testing with Concept Activation Vectors) methodology. This vocabulary is independent of the specific SSL model being tested.
- Assignment: Each superpixel is assigned to its nearest "visual word" in the vocabulary, effectively translating the image into a visual sentence.
Probing Tasks
Four visual probing tasks, inspired by NLP, were defined to evaluate the representations:
- Word Content (WC): Can the model identify which visual words are present? (Measures semantic knowledge).
- Sentence Length (SL): Can the model estimate the number of unique visual words? (Measures semantic complexity).
- Character Bin (CB): Can the model determine the size of a specific superpixel? (Measures surface-level structural information).
- Semantic Odd Man Out (SOMO): Can the model detect if a random part of the image was replaced by a part from a different image? (Measures semantic consistency).
Experimental Results and Insights
The framework was tested on major SSL methods (MoCo v1, SimCLR v2, BYOL, and SwAV) using a subset of the ImageNet dataset.
Key Findings
- High Semantic and Structural Encoding: All models achieved high AUC scores for Word Content (~0.76–0.80) and Sentence Length (~0.84–0.88), proving that SSL naturally learns semantic concepts. The Character Bin task saw the highest scores (AUC > 0.93), suggesting that information about the physical scale of image segments is exceptionally well-preserved.
- The Consistency Struggle: Detecting "odd man out" edits (SOMO) proved significantly harder (AUC ~0.53–0.63). This indicates that while models know what is in an image, they struggle to understand if those parts belong together logically.
- Texture Bias: Models showed a preference for recognizing visual words with distinct, non-uniform textures (e.g., patterned fabric) over uniform ones (e.g., flat sky), suggesting a bias toward patterns in SSL representations.
- Knowledge vs. Accuracy: Interestingly, a model's accuracy on downstream tasks does not perfectly correlate with its semantic knowledge. For instance, MoCo v1 performed on par with stronger models in identifying visual words despite lower classification accuracy.
Conclusion
Visual probing provides a powerful tool for peering into the internal representations of self-supervised models. By leveraging the intuitive relationship between language and vision, this framework reveals that while SSL models capture complex semantic and structural information, they still lack a robust understanding of global semantic consistency. This work paves the way for more transparent and semantically grounded AI systems.
Summary updated