Learning Structured Representations with Hyperbolic Embeddings

Aditya Sinha, Siqi Zeng, Makoto Yamada, Han Zhao

Abstract

Modern representation learning often treats class labels as independent categories, ignoring the inherent hierarchical relationships found in natural data. We introduce HypStructure, a regularization framework that utilizes hyperbolic geometry to explicitly bake label hierarchies into neural representations. By leveraging the negative curvature of hyperbolic space, which naturally accommodates tree-like structures with exponential volume growth, HypStructure minimizes structural distortion and enhances both classification accuracy and out-of-distribution (OOD) detection. Our results demonstrate that low-dimensional hyperbolic embeddings can significantly outperform high-dimensional Euclidean counterparts in preserving semantic structure.

1. Introduction: The Geometric Mismatch

Most deep learning models treat labels as "permutation invariant," assuming no inherent relationship between categories. However, data often follows a natural hierarchy (e.g., a "Siamese cat" is a "cat," which is an "animal"). While Euclidean distances are commonly used to enforce structure, they encounter a fundamental geometric limitation: Euclidean space is "flat," with volume growing polynomially with radius, whereas hierarchical trees grow exponentially. Attempting to embed a tree into Euclidean space inevitably leads to high distortion, as parent-child relationships are "squashed" to fit the flat geometry.

A toy label tree (left) and the resulting distortion when embedded into Euclidean space (right).

2. The HypStructure Framework

HypStructure addresses this mismatch by combining standard task losses with two novel hyperbolic regularization terms:

  1. HypCPCC (Hyperbolic Cophenetic Correlation Coefficient): This extends the CPCC metric—which measures the correlation between feature distances and tree distances—into the hyperbolic Poincaré ball. It utilizes hyperbolic averaging (the Einstein midpoint in the Klein model) to compute stable class prototypes.
  2. HypCenter (Hyperbolic Centering): This loss anchors the root of the hierarchy at the center of the Poincaré disk while pushing leaf nodes toward the boundary. This provides a stable global structure, ensuring that semantic distance in the tree is reflected by distance in the feature space.

3. Results and Discussion

The researchers evaluated HypStructure on CIFAR-10/100 and ImageNet-100. The method demonstrated several key advantages:

  • Structural Preservation: HypStructure reduced hierarchical distortion by up to 59.4% compared to flat baselines and 45.4% compared to Euclidean-based regularization. As shown in Figure 2, the model maintains low distortion (Gromov's hyperbolicity) even in very low dimensions.
  • Efficiency in Low Dimensions: A 16-dimensional hyperbolic embedding was found to represent a hierarchy with less distortion than a 512-dimensional Euclidean embedding, highlighting the efficiency of hyperbolic space for structured data.
  • Enhanced OOD Detection: By forcing the model to learn high-level semantic features (e.g., "animal-ness" vs. "transportation-ness"), HypStructure improved OOD detection by an average of 2% AUROC across multiple benchmarks without sacrificing classification accuracy.
Gromov's hyperbolicity $\delta_{rel}$ vs. embedding dimension, showing HypStructure's superior structural preservation compared to Euclidean baselines.

4. Conclusion

HypStructure provides a robust framework for learning hierarchy-aware representations. While the current method relies on pre-defined hierarchies, its ability to reduce distortion and improve generalization makes it a powerful tool for structured data. Future work will explore handling noisy or evolving hierarchies and investigating alternative hyperbolic models like the Lorentz model for different computational trade-offs.

Summary updated

BibTeX
@inproceedings{sinha2024learning,
  author = {Aditya Sinha and Siqi Zeng and Makoto Yamada and Han Zhao},
  title = {{Learning Structured Representations with Hyperbolic Embeddings}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=wBtmN8SZ2B},
}
Figure