Even Faster Hyperbolic Random Forests: A Beltrami-Klein Wrapper Approach
Philippe Chlenski [email protected], Itsik Pe’er [email protected] · 2025
Read Even Faster Hyperbolic Random Forests: A Beltrami-Klein Wrapper Approach by Philippe Chlenski [email protected], Itsik Pe’er [email protected] (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-04360.txt.
Introduction
Philippe Chlenski and Itsik Pe'er speed up, in a 2025 paper, a machine learning method that builds decision trees in curved hyperbolic space. Tree models are workhorses for flat data, and recent work adapted them to hyperbolic geometry, which suits branching data like hierarchies. The existing hyperbolic version rewrote the splitting rules in one geometric model. The authors recast the same method in a different model of hyperbolic space.
In that model, the usual threshold test from ordinary trees survives unchanged. The whole method then becomes a wrapper: standard tree software runs as-is, with simple steps before and after. That unlocks years of speed and accuracy tuning built for flat-space tools. The authors report a simpler codebase that is easier to maintain and extend, and they share their implementation openly.
Catalog record
| CREATOR | Philippe Chlenski [email protected], Itsik Pe’er [email protected] |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 40 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2506-04360
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Even Faster Hyperbolic Random Forests: A Beltrami-Klein Wrapper Approach Philippe Chlenski [email protected], Itsik Pe’er [email protected] Abstract Decision trees and models that use them as primitives are workhorses of machine learning in Euclidean spaces. Recent work has further extended these models to the Lorentz model of hyperbolic space by replacing axis-parallel hyperplanes with homogeneous hyperplanes when partitioning the input space. In this paper, we show how the HyperDT algorithm can be elegantly reexpressed in the Beltrami-Klein model of hyperbolic spaces. This preserves the thresholding operation used in Euclidean decision trees, enabling us to further rewrite HyperDT as simple pre– and post-processing steps that form a wrapper around existing tree-based models designed for Euclidean spaces. The wrapper approach unlocks many optimizations already available in Euclidean space models, improving flexibility, speed, and accuracy while offering a simpler, more maintainable, and extensible codebase. Our implementation is available at https://github.com/pchlenski/hyperdt . 1 Introduction All machine learning classifiers implicitly encode geometric assumptions about their feature space. Among these, standard decision trees and classifiers built on them stand out as being remarkably indifferent to geometry: Decision tree learning is ultimately a discrete optimization over label statistics, one feature at a time. The metric structure of the multi-feature space only matters when evaluating its final partition. In contrast, all linear and neural models relying on matrix multiplication implicitly work with signed distances to a decision-boundary hyperplane; probabilistic methods based on Gaussian densities such as Naive Bayes have probability densities that depend on distance to the centroid; not to mention explicitly distance-based methods such as support vector machines (SVMs) and k -nearest neighbors. Yet decision trees rely only on label statistics for candidate partitions which depend only on the ordering of features along each dimension: a property we exploit to reformalize their behavior in hyperbolic space. There are two existing approaches in the literature to extending decision trees to hyperbolic spaces. Doorenbos et al. 2023 proposes HoroRF , an ensemble of horospherical support vector machines ( Fan et al. 2023 ) , equating between horospheres in hyperbolic and hyperplanes in Euclidean space, as well as between SVMs and linear splits at a decision tree node. In contrast, Chlenski et al. 2024 proposes HyperDT taking a hyperplane-based perspective on Euclidean decision tree learning and following up with a modification of the splitting criterion to accommodate axis-inclined hyperplane splits. By exploiting the (almost-Euclidean) behavior of hyperplanes in the ambient space of the Lorentz model of hyperbolic space, HyperDT is able to more closely parallel Euclidean tree learning. In particular, it is able to consider each spacelike dimension separately, and has identical training and inference complexity to its Euclidean counterparts. However, its modified, hyperplane-based splitting criteria are no longer compatible with the threshold-based decision tree algorithms, necessitating its own ad hoc implementation. In this paper, we rewrite HyperDT as Fast- HyperDT , relying on the Beltrami-Klein model of hyperbolic space. This representation allows geodesic decision boundaries to become (axis-parallel) Euclidean hyperplanes, recovering a thresholding-based variant of HyperDT . Fast- HyperDT unlocks three advantages: 1. Leveraging optimized implementations is thousands of times faster than existing HyperDT ; 2. It is intrinsically compatible with well-known Euclidean methods like Scikit-Learn ; and 3. It easily extends to other tree-based paradigms, such as oblique decision trees or XGBoost . Figure 1: Original HyperDT decision boundaries visualized in the Poincaré model (top) and in the Beltrami-Klein model (bottom). The top half of the figure is a reproduction of Figure 2 in Chlenski et al. 2024 . 1.1 Related work Non-Euclidean Decision Trees. This work is most closely related to other works proposing the use of tree-based models in non-Euclidean spaces. Chlenski et al. 2024 is the starting point for our model; Chlenski et al. 2025a extends decision trees to (products of) any constant-curvature space; Doorenbos et al. 2023 offers a complementary, horosphere-based perspective on random forests in hyperbolic space. Tsagkrasoulis & Montana 2017 proposes a method to fit random forests for non-Euclidean labels , while ( Bauerschmidt et al. 2021 ) explores connections between random spanning forests and hyperbolic symmetry. Hyperbolic Classifiers. The problem of classification and regression in hyperbolic spaces has received a lot of attention in the literature. Many approaches involve modifying neural networks to work with hyperbolic data ( Chami et al. 2019 ; Ganea et al. 2018 ; Chen et al. 2022 ; Bdeir et al. 2023 ; Khan et al. 2024 ) . We are indebted to the literature on hyperbolic SVMs ( Cho et al. 2018 ; Fan et al. 2023 ) ; the former makes use of the Klein model as well. Regression on hyperbolic manifolds has been studied by Marconi et al. 2020 . Machine Learning in the Beltrami-Klein Model. Mao et al. 2024 extends the Klein model for neural nets and provides an excellent overview of the state of the literature, including applications of the Klein model for graph embeddings ( McDonald & He 2019 ; Yang et al. 2023 ) , protein sequences ( Ali et al. 2024 ) , minimal spanning trees ( García-Castellanos et al. 2025 ) , and scene images ( Bi et al. 2017 ) . We highlight Nielsen & Nock 2010 , an early work using the Klein model to find Voronoi diagrams in hyperbolic space, whose discussion of partitions of the Beltrami-Klein model was foundational for our work. 2 Preliminaries 2.1 Hyperbolic Space 2.1.1 The Lorentz Model of Hyperbolic Space The Lorentz Model with curvature K<0 in d dimensions, \mathbb{L}^{d}_{K} , is embedded inside Minkowski space, a vector space in \mathbb{R}^{d+1} equipped with the Minkowski inner product: \left\langle\mathbf{u},\mathbf{v}\right\rangle_{\mathbb{L}}=-u_{0}v_{0}+\sum_{i=1}^{d}u_{i}v_{i}. (1) Points in the Lorentz Model are constrained to lie on the upper sheet of a two-sheeted hyperboloid with a constant Minkowski inner product K , which is also called the curvature: \mathbb{L}^{d}_{K}=\left\{\mathbf{u}\in\mathbb{R}^{d+1}:\left\langle\mathbf{u},\mathbf{u}\right\rangle_{\mathbb{L}}=\frac{1}{K},\ u_{0}>0\right\}. (2) Distances between two points \mathbf{u},\mathbf{v}\in\mathbb{L} , called geodesic distances, are computed as 1 1 1 ip: I think we should use arccosh arctan etc. instead of the inverse (negative 1 superscript) \delta_{\mathbb{L}}(\mathbf{u},\mathbf{v})=\frac{1}{\sqrt{-K}}\cosh^{-1}\left(-K\left\langle\mathbf{u},\mathbf{v}\right\rangle_{\mathbb{L}}\right). (3) 2.1.2 The Beltrami-Klein Model of Hyperbolic Space The Beltrami-Klein Model realizes hyperbolic space as the open ball of radius -1/K \mathbb{B}^{d}_{K}=\left\{\mathbf{u}\in\mathbb{R}^{d}:\left\langle\mathbf{u},\mathbf{u}\right\rangle<-\frac{1}{K}\right\}. (4) \mathbb{L}^{d}_{K} and \mathbb{B}^{d}_{K} are related to through the gnomonic projection \phi_{K}:\mathbb{L}^{d}_{K}\to\mathbb{B}^{d}_{K} and its inverse \phi^{-1}_{K}:\mathbb{B}^{d}_{K}\to\mathbb{L}^{d}_{K} : \displaystyle\phi_{K}(u_{0},u_{1},\ldots,u_{d}) \displaystyle=\left(\frac{u_{1}}{u_{0}},\frac{u_{2}}{u_{0}},\ldots,\frac{u_{d}}{u_{0}}\right) (5) \displaystyle\phi^{-1}_{K}(v_{1},\ldots v_{d}) \displaystyle=\left(\frac{1}{\sqrt{1-K\|\mathbf{v}\|^{2}}},\ \frac{v_{1}}{\sqrt{1-K\|\mathbf{v}\|^{2}}},\ \ldots,\ \frac{v_{d}}{\sqrt{1-K\|\mathbf{v}\|^{2}}}\right). (6) Note that the indices for \mathbf{u} start at 0, whereas the indices of \mathbf{v} start at 1, reflecting the use of an extra dimension in the Hyperboloid model. This correspondence not only maps points but also sends hyperbolic geodesics (great hyperbola arcs on \mathbb{L} ) to chords in \mathbb{B} , preserving the hyperbolic distance between points. The distance between \mathbf{u},\mathbf{v}\in\mathbb{B} is computed by composing \phi^{-1}_{K}(\cdot) and \delta_{\mathbb{L}}(\cdot) as follows: \displaystyle\delta_{\mathbb{B}}(\mathbf{u},\mathbf{v}) \displaystyle=\delta_{\mathbb{L}}(\phi_{K}^{-1}(\mathbf{u}),\phi_{K}^{-1}(\mathbf{v})) \displaystyle=\frac{1}{\sqrt{-K}}\cosh^{-1}\!\left(-K\,\left\langle\phi_{K}^{-1}(\mathbf{u}),\phi_{K}^{-1}(\mathbf{v})\right\rangle\right) \displaystyle=\frac{1}{\sqrt{-K}}\cosh^{-1}\left(-K\frac{1-\left\langle\mathbf{u},\mathbf{v}\right\rangle}{\sqrt{(1-K\|\mathbf{u}\|^{2})(1-K\|\mathbf{v}\|^{2})}}\right). (7) Equivalently, \delta_{\mathbb{B}} can be computed using the following geometric construction: if the chord through two interior points \mathbf{b} and \mathbf{c} meets the boundary of the Klein disk at points \mathbf{a} and \mathbf{b} (with the ordering \mathbf{a},\mathbf{b},\mathbf{c},\mathbf{d} along the chord), then the hyperbolic distance between \mathbf{b} and \mathbf{c} is given by \delta_{\mathbb{B}}(\mathbf{b},\mathbf{c})=\frac{1}{2}\ln\left(\frac{|\mathbf{a}\mathbf{c}||\mathbf{b}\mathbf{d}|}{|\mathbf{a}\mathbf{b}||\mathbf{c}\mathbf{d}|}\right), (8) where |\mathbf{a}\mathbf{b}| denotes the Euclidean norm of the line segment connecting \mathbf{a} and \mathbf{b} , and so on. Einstein Midpoints. A key advantage of the Beltrami-Klein model we will make use