Abstract
The outputs of a trained neural network contain much richer information than just a one-hot classifier. For example, a neural network might give an image of a dog the probability of one in a million of being a cat, but this is still significantly larger than the probability of it being a car. To reveal the hidden structure in these outputs, we apply two unsupervised learning algorithms, PCA and ICA, to the outputs of a deep Convolutional Neural Network (CNN) trained on ImageNet. The resulting embeddings reveal visual similarities between object classes, which can be interpreted as common visual features. We propose a new zero-shot learning (ZSL) method using these features, achieving state-of-the-art results on the ImageNet dataset of over 20,000 classes.
Introduction
When a CNN is trained to classify images, the primary focus is typically the "top-1" prediction. However, the full probability distribution—the softmax output—contains "dark knowledge" about the relationships between classes. A model might correctly identify a "dog," but its secondary predictions (e.g., "cat" vs. "car") indicate its internal understanding of visual similarity.
The challenge lies in the fact that raw outputs are often "squashed" by the softmax function, making these subtle relationships difficult to extract. Furthermore, while semantic hierarchies like WordNet exist, we lack a structured way to extract latent visual attributes (like "has fur" or "is metallic") directly from a model without manual labeling. This paper aims to extract these features and use them for Zero-Shot Learning (ZSL), classifying objects the model has never seen during training.
Methodology
Normalized Logits
To prevent the softmax function from suppressing useful information, we introduce a normalization technique. This technique magnifies the tiny values in the logits (the inputs to the softmax) while maintaining a valid probability distribution. This "un-squashing" effect allows the model to reveal the structured relationships between the primary class and other visually similar classes.
Factor Analysis: PCA and ICA
We apply Principal Component Analysis (PCA) and Independent Component Analysis (ICA) to these normalized outputs. While PCA assumes Gaussian data, ICA is designed for non-Gaussian, independent signals. A key technical finding of this work is that the neurons in the output layer of a CNN exhibit extremely high kurtosis, meaning they are highly non-Gaussian.
This high kurtosis justifies the use of ICA, which effectively finds distinct visual "attributes" shared across classes. For ZSL, we use Canonical Correlation Analysis (CCA) to bridge these visual features with semantic features from WordNet, mapping unseen images into a space where they can be compared against thousands of unknown labels.
Key Insights and Results
- Visual vs. Semantic Gaps: Visual similarity and semantic meaning do not always align. For instance, a "soccer ball" and a "football helmet" are visually similar but semantically distant. Unsupervised features from the CNN capture these visual nuances that text-based models might miss.
- Unsupervised Attribute Discovery: Traditionally, ZSL required manual attribute labeling (e.g., "has stripes"). Our method shows that PCA and ICA can discover these attributes automatically from the model's own output distribution.
- Zero-Shot Accuracy: On the ImageNet 20k task, our method achieved a Top-1 accuracy of 1.8% and a Top-20 accuracy of 9.7%. While seemingly small, these results significantly outperformed existing state-of-the-art methods like DeViSE (0.8% Top-1) and conSE (1.4% Top-1) at the time.
- Qualitative Success: ICA components successfully grouped visually similar categories. One component effectively acted as a "domed architecture" detector, ranking "mosque," "dome," and "palace" highly without explicit supervision.
Conclusion
This work demonstrates that the "wrong" answers of a neural network are not just noise but a structured source of visual information. By applying unsupervised learning to these outputs, we can extract latent visual features that bridge the gap between seen and unseen objects. While ICA provides slightly more consistent features, PCA remains a computationally efficient alternative for large-scale zero-shot learning tasks.
Summary updated