Abstract
Traditional self-supervised learning methods typically project image features onto flat Euclidean hyperspheres. However, Euclidean geometry often fails to capture the inherent hierarchical structures present in real-world visual data. We present Hyperbolic Contrastive Learning (HCL), a framework that leverages the constant negative curvature of hyperbolic space to better represent complex taxonomies. By utilizing the exponential volume growth of the Poincaré ball, HCL achieves superior accuracy and enhanced adversarial robustness compared to standard Euclidean baselines like SimCLR.
Introduction
Most modern self-supervised learning methods, such as SimCLR or MoCo, project image features onto a Euclidean hypersphere where similarity is measured via cosine distance. This approach assumes a "flat" underlying geometry. However, many datasets possess a hierarchical or "tree-like" structure—such as biological taxonomies or complex object categories. In Euclidean space, the volume of a sphere grows only polynomially with its radius, making it difficult to embed such hierarchies without high dimensionality. This often forces models to misrepresent semantic relationships.
Hyperbolic space offers a solution. It can be viewed as a continuous version of a tree; its volume grows exponentially with the radius, naturally accommodating the branching nature of hierarchical data.
Methodology
The HCL framework transitions contrastive representation learning from Euclidean to hyperbolic geometry, specifically utilizing the Poincaré ball model.
The pipeline involves several key technical components:
- Exponential Mapping: A bijective function maps standard Euclidean vectors from a ResNet backbone into the Poincaré ball.
- Hyperbolic Distance ($D_{hyp}$): Similarity is calculated using hyperbolic geometry, accounting for the space's constant negative curvature.
- Loss Functions: The standard InfoNCE loss is adapted into three variants: HCL (unsupervised), SHCL (supervised), and RHCL (robust, incorporating adversarial training).
Experimental Results
The authors evaluated HCL across standard benchmarks including CIFAR-10/100, Tiny ImageNet, and ImageNet-1K.
HCL consistently outperformed Euclidean baselines:
- Accuracy Gains: On CIFAR-100, HCL achieved 55.89% linear evaluation accuracy, a 6.98% improvement over SimCLR. On ImageNet-1K, Top-1 accuracy improved by 1.12%.
- Supervised Performance: SHCL outperformed Supervised Contrastive (SupCon) loss on CIFAR-100 (83.58% vs 83.01%).
- Adversarial Robustness: In "white-box" tests on CIFAR-10, the robust version (RHCL) achieved 29.94% accuracy under attack, significantly higher than the Euclidean-based RoCL (26.57%).
Discussion and Key Insights
A primary advantage of HCL is its ability to perform Implicit Hierarchy Discovery. Even without explicit labels, the geometry encourages the model to organize data into clusters reflecting semantic hierarchies (e.g., separating "mammals" and "avians" into distinct branches). Furthermore, hyperbolic embeddings exhibit Natural Robustness. The geometry of the Poincaré ball appears to make it harder for small input perturbations to push samples across decision boundaries compared to flat hyperspheres.
Limitations
The model's performance is sensitive to the curvature parameter ($c$), which requires tuning per dataset. Additionally, a normalization layer is critical before the exponential mapping; omitting it leads to significant performance degradation (e.g., a drop from ~55% to ~46% on CIFAR-100). Future work may explore explicitly guiding the model with known hierarchical metadata or applying these embeddings to tasks like object detection and segmentation.
Summary updated