Abstract
HyperCore is an open-source framework designed to integrate hyperbolic geometry into foundation models. By providing a modular library of hyperbolic components—including Transformers and Vision Transformers—it facilitates the development of stable, high-performance non-Euclidean models. HyperCore supports multiple manifolds and learnable curvature, enabling researchers to leverage the hierarchical nature of real-world data more effectively than traditional Euclidean approaches.
Introduction
Standard deep learning architectures predominantly operate in Euclidean space. However, many datasets, such as social networks and language taxonomies, possess inherent hierarchical or "scale-free" structures. Mapping these tree-like structures into flat Euclidean space results in significant distortion. Hyperbolic space, characterized by exponential volume growth with distance, offers a more natural embedding for such data. Despite this potential, building hyperbolic neural networks (HNNs) is challenging due to the complex differential geometry required for numerical stability. Existing libraries often lack the flexibility to support modern architectures like Transformers or CLIP.
The HyperCore Framework
HyperCore addresses these challenges by modularizing complex hyperbolic operations on top of PyTorch and Geoopt. It provides a comprehensive suite of tools for building modern non-Euclidean architectures.
The framework includes several key features:
- Comprehensive
nnModule: Offers hyperbolic implementations of standard layers, including Linear, Convolutional, Residual connections, LayerNorm, and Multi-head Attention. - Dual Manifold Support: Supports both the Poincaré ball and the Lorentz hyperboloid models.
- Variable Curvature: Allows models to learn layer-specific curvature, enhancing representation flexibility.
- Novel Architectures: The authors demonstrate the framework's utility by developing the Lorentz Vision Transformer (LViT), L-CLIP (a multi-modal hyperbolic model), and HypGraphRAG (a hybrid graph retrieval-augmented generation pipeline).
Experimental Evaluation
The authors evaluated HyperCore across diverse modalities, including vision (ImageNet-1K), NLP (WMT’14), arithmetic reasoning (GSM8K), and graph reconstruction.
A significant finding is that token distributions in large language models (LLMs) exhibit scale-free properties, suggesting hyperbolic space as a natural home for foundation model embeddings. To facilitate the transition from Euclidean models, the authors introduced HypLoRA (Hyperbolic Low-Rank Adaptation), which efficiently adapts large Euclidean models into hyperbolic space.
Key results include:
- Vision: The fine-tuned LViT achieved 79.4% accuracy on ImageNet-1K, surpassing both its Euclidean counterpart and previous hyperbolic state-of-the-art models.
- Graphs: Hyperbolic GNNs built with HyperCore significantly outperformed Euclidean models in graph reconstruction, particularly for datasets with high hierarchy.
- NLP: Fully hyperbolic architectures consistently outperformed partially hyperbolic ones in low-dimensional settings.
Discussion and Future Work
While HyperCore simplifies the implementation of hyperbolic models, several areas remain for future exploration. The impact of learnable curvature on model behavior is not yet fully understood. Additionally, most hyperbolic modules are currently projections of Euclidean ones; a deeper geometric understanding of non-linear operations on manifolds is needed. Finally, the scaling laws of hyperbolic models at the billion-parameter scale represent a critical frontier for future research.
Summary updated