Abstract
Zero-shot Learning (ZSL) aims to learn a classifier to recognize unseen categories without training samples. Most ZSL works based on embedding models handle the visual space and the semantic space through a common metric space and then apply a simple nearest neighbor search which directly leads to the hubness problem, one of the main challenges of ZSL. Contrary to recent works, whose conclusions about hubs are drawn based on Euclidean and specific models like ridge regression, we adopt cosine metric and for the first time prove cosine is model-agnostic to alleviate the hubness problem in ZSL. Assuming that the normalized mapped semantic vectors follow a uniform distribution, we provide theoretical analysis which demonstrates that hubs can be better reduced with a higher-dimensional cosine metric space. Moreover, we introduce a diversity-based regularizer with the cosine metric which underpins the assumption about the uniform distribution and further improves the model's discriminative ability. Extensive experiments on five benchmarks and large-scale Imagenet dataset show that our method can improve the performance, surpassing previous embedding methods by large margins.
Introduction: The Challenge of Hubness
Zero-Shot Learning (ZSL) is the task of recognizing objects from categories never seen during training, relying instead on auxiliary information like semantic attributes or text descriptions. A primary hurdle in ZSL is the hubness problem. In high-dimensional spaces, a small number of points (hubs) tend to appear as the nearest neighbors for a disproportionately large number of test samples. In the context of ZSL, this causes the model to incorrectly predict a few dominant classes repeatedly, regardless of the actual input.
While previous research often attributed hubness to specific algorithms or the use of Euclidean distance, this work demonstrates that hubness is a geometric property that can be mitigated through a model-agnostic approach: the adoption of a high-dimensional cosine metric space.
Methodology: Cosine Metric and Diversity Regularization
The proposed framework maps visual features and semantic vectors into a shared $D$-dimensional unit sphere. By utilizing cosine similarity rather than Euclidean distance, the model gains a more robust metric for distinguishing between semantic classes.
As shown in the framework above, the method consists of three main components:
- Cosine Metric Space: Features are projected onto a unit sphere where similarity is measured by the angle between vectors.
- High-Dimensional Projection: Theoretical analysis suggests that the expected difference between distances (a proxy for hubness) is inversely proportional to the square root of the dimensionality ($\Delta \propto 1/\sqrt{D}$). Increasing the dimensionality of the metric space naturally suppresses the emergence of hubs.
- Diversity-Based Regularizer ($\Phi$): To ensure the semantic vectors (class prototypes) are well-distributed across the sphere, a regularizer minimizes the mean and variance of pairwise cosine similarities. This prevents prototypes from clustering together, which would otherwise exacerbate hubness.
Theoretical and Empirical Insights
A key contribution of this research is the proof that the benefits of the cosine metric are model-agnostic. Whether using linear projections or deep neural networks, the geometric properties of the high-dimensional sphere help push unrelated points apart.
Empirical results confirm this theory. The authors measured "skewness" as a quantitative indicator of hubness across multiple datasets (AWA1, AWA2, CUB, aPY). As the dimensionality of the metric space increased from 64 to 2048, skewness consistently dropped across all tested loss functions (Cross-Entropy, Max-Margin, and Cosine-Embedding).
Key Results and Performance
The method achieved state-of-the-art (SOTA) performance on five standard ZSL benchmarks. Notably, it reached 72.7% accuracy on AWA1 and 72.0% on AWA2, outperforming previous embedding-based methods by significant margins. In the Generalized ZSL (GZSL) setting, where the test set includes both seen and unseen classes, the model maintained high Harmonic Mean scores, indicating it effectively balances recognition between known and unknown categories without suffering from catastrophic forgetting.
Conclusion
By shifting the focus from algorithm-specific fixes to the underlying geometry of the metric space, this work provides a robust, model-agnostic solution to the hubness problem in ZSL. The combination of high-dimensional cosine embeddings and diversity regularization allows for superior class separation and generalization, setting a new benchmark for inductive zero-shot learning.
Summary updated