Abstract
Hyperbolic space is becoming a popular choice for representing data due to the hierarchical structure - whether implicit or explicit - of many real-world datasets. Along with it comes a need for algorithms capable of solving fundamental tasks, such as classification, in hyperbolic space. Recently, multiple papers have investigated hyperbolic alternatives to hyperplane-based classifiers, such as logistic regression and SVMs. While effective, these approaches struggle with more complex hierarchical data. We, therefore, propose to generalize the well-known random forests to hyperbolic space. We do this by redefining the notion of a split using horospheres. Since finding the globally optimal split is computationally intractable, we find candidate horospheres through a large-margin classifier. To make hyperbolic random forests work on multi-class data and imbalanced experiments, we furthermore outline new methods for combining classes based on the lowest common ancestor and class-balanced large-margin losses. Experiments on standard and new benchmarks show that our approach outperforms both conventional random forest algorithms and recent hyperbolic classifiers.
Introduction
Many real-world datasets, ranging from semantic taxonomies like WordNet to complex social networks, possess an inherent hierarchical structure. While standard machine learning techniques typically operate in flat Euclidean space, hyperbolic space offers a more natural embedding for such data. This is because the volume of hyperbolic space grows exponentially with its radius, mirroring the exponential growth of nodes in a tree-like hierarchy.
Despite this geometric advantage, most classification tools remain rooted in Euclidean assumptions. Standard Random Forests utilize axis-aligned or oblique hyperplane splits, which are geometrically mismatched for the curved nature of hyperbolic embeddings. While hyperbolic variants of SVMs and Logistic Regression have been developed, they often struggle with the multi-class complexity and significant class imbalances characteristic of large-scale hierarchical datasets.
Methods: Redefining the Split
The proposed HoroRF generalizes the Random Forest architecture to the Poincaré ball model of hyperbolic space. The fundamental innovation lies in the transition from flat hyperplanes to horospheres.
Horosphere Splits
In Euclidean space, a split is a hyperplane. In hyperbolic space, HoroRF utilizes horospheres—level sets of the Busemann function. Geometrically, these can be visualized as "spheres" tangent to the boundary of the hyperbolic space. They are uniquely suited for capturing the nested, hierarchical relationships typical of hyperbolic data.
HoroSplitter and Information Gain
Finding the globally optimal horosphere split is an NP-complete problem. To address this, the authors introduce HoroSplitter, which employs a large-margin classifier (HoroSVM) at each node to identify candidate horospheres. The goal is to maximize information gain by finding boundaries that effectively separate clusters within the curved space.
Handling Multi-class Hierarchy
To manage multiple classes, HoroRF avoids simple "one-vs-rest" strategies. Instead, it uses a Hyperclass Heuristic based on the Lowest Common Ancestor (LCA) of class means. By iteratively grouping similar classes into "hyperclasses," the model creates binary splits that respect the underlying data hierarchy. Additionally, a class-balanced loss function is integrated to prevent the model from neglecting minority classes in long-tailed distributions.
Key Results and Insights
Experiments across various benchmarks—including WordNet subtrees, network node classification, and hierarchical image datasets (CIFAR10/STL10)—demonstrate the superiority of HoroRF.
- Superior Performance: On the challenging WordNet "Occupation" subtree, HoroRF achieved an AUPR of 65.6, vastly outperforming the state-of-the-art HoroSVM (13.0). In multi-class settings involving both nested and same-level subtrees, HoroRF reached a macro-f1 of 81.9, compared to 35.2 for HoroSVM.
- Geometric Efficiency: A single horosphere can capture nested relationships that would require a complex sequence of Euclidean splits to approximate. This confirms that the choice of geometry is critical for hierarchical data.
- Ensemble Robustness: Similar to its Euclidean counterpart, the "forest" approach in HoroRF provides significant robustness against noise and complexity compared to single-boundary models like Hyperbolic Logistic Regression.
- Scalability with Depth: On synthetic trees, HoroRF maintained high accuracy as depth increased, whereas Euclidean oblique forests experienced significant performance degradation.
Conclusion
HoroRF represents a significant step forward in hyperbolic machine learning, providing a robust ensemble method tailored for hierarchical data. While the current implementation faces runtime challenges due to the computational cost of training large-margin classifiers at every node, it sets a new performance benchmark. Future research will focus on optimizing the HoroSVM solver and exploring alternative split types to improve training efficiency for massive-scale datasets.
Summary updated