Unsupervised Hyperbolic Metric Learning

Jiexi Yan, Lei Luo, Cheng Deng, Heng Huang

Abstract

Traditional unsupervised deep metric learning (DML) often relies on Euclidean embeddings and binary pseudo-labels, failing to capture the complex hierarchical structures inherent in natural datasets. This paper introduces Unsupervised Hyperbolic Metric Learning (UHML), the first framework to operate in hyperbolic space for unsupervised DML. By leveraging the Poincaré ball model and hierarchical clustering, UHML moves beyond simple "same/different" labels to model multi-level data relationships. Our approach achieves state-of-the-art results on CARS196, CUB-200-2011, and Stanford Online Products benchmarks.

Introduction

Deep Metric Learning (DML) seeks to map images into a feature space where semantic similarity corresponds to geometric proximity. However, current unsupervised methods face two primary challenges: the Euclidean limitation and binary over-simplification.

Natural data, such as biological taxonomies or product categories, often possesses a latent hierarchical structure. Mapping these "tree-like" structures into a flat Euclidean space results in significant distortion. Hyperbolic space, which expands exponentially as you move away from the center, provides a more natural fit for such data.

Comparison of tree embeddings in Euclidean space versus the Poincaré Ball.

Furthermore, most unsupervised methods use flat clustering to generate binary pseudo-labels, treating pairs as either strictly similar or dissimilar. This ignores the nuanced "shades of gray" in similarity—for instance, a "Florida Jay" is more similar to a "Green Jay" than it is to an "Ovenbird," even though all three belong to the bird category. UHML addresses these gaps by combining hyperbolic geometry with hierarchical similarity.

Methodology

The UHML framework consists of a Hyperbolic Metric Module and a Hierarchical Similarity Generation process, optimized via a novel log-ratio loss.

The UHML pipeline: Unlabeled inputs are processed through a CNN, followed by hierarchical clustering to generate pseudo-labels for fine-tuning in hyperbolic space.

Hyperbolic Metric Module

The model employs the Poincaré ball model of hyperbolic geometry. Standard CNN features are projected into this manifold using an exponential map. Because hyperbolic space is essentially a continuous version of a tree, it can represent parent-child relationships with much lower error than Euclidean models.

Hierarchical Similarity Generation

Instead of flat K-means clustering, the model performs hierarchical clustering on learned features. This generates a tree structure where the "similarity degree" between two images is defined by their lowest common ancestor's level in the hierarchy. This provides a much richer supervisory signal than binary pseudo-labels.

Log-Ratio Loss

To train the network, a new log-ratio loss is introduced. This loss encourages the ratio of distances in the embedding space to match the ratio of their hierarchical similarity degrees. This allows the model to learn that some "negative" samples are more closely related than others, stabilizing training and leading to more discriminative features.

Experimental Results

The authors evaluated UHML on three standard image retrieval benchmarks: CARS196, CUB-200-2011, and Stanford Online Products (SOP). Training was conducted entirely without ground-truth labels.

UHML significantly outperformed previous state-of-the-art (SOTA) unsupervised methods:

  • CARS196: Achieved a Recall@1 of 47.7%, a 4.7% improvement over the previous best (TAC-CCL).
  • CUB-200-2011: Achieved a Recall@1 of 58.9%, outperforming the previous SOTA by 5.0%. Notably, this unsupervised performance is competitive with some older supervised methods.
  • SOP: Achieved a Recall@1 of 65.1%, maintaining a consistent lead over baseline methods like MOM.

Ablation studies confirmed that the synergy between hyperbolic space and hierarchical loss is critical for these performance gains.

Conclusion and Future Work

UHML demonstrates that hyperbolic geometry and hierarchical supervision can significantly enhance unsupervised metric learning. While hierarchical clustering adds some computational complexity and introduces new hyperparameters, the gains in discriminative power are substantial. Future work may extend this framework to other domains with inherent hierarchies, such as Natural Language Processing or large-scale graph analysis.

Summary updated

BibTeX
@inproceedings{yan2021unsupervised,
  author = {Jiexi Yan and Lei Luo and Cheng Deng and Heng Huang},
  title = {{Unsupervised Hyperbolic Metric Learning}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2021},
  doi = {10.1109/cvpr46437.2021.01228},
}
Figure