Skip to main content

Mathematical Infrastructure

Non-Euclidean and Hyperbolic Geometry

The geometry that drops the parallel postulate. Hyperbolic and spherical models, sectional curvature, the Poincare disk, and why hyperbolic spaces embed tree-structured data with low distortion. The grounding for graph embeddings on curved spaces.

AdvancedTier 2Stable~30 min
0

Why This Matters

Hierarchies, taxonomies, and trees are everywhere in ML data: WordNet, biological phylogenies, file systems, citation graphs, knowledge graphs. Embedding them faithfully in Rd\mathbb{R}^d with the Euclidean metric is provably hard. The reason is geometric. Trees grow exponentially in the number of nodes per shell of radius rr; Euclidean balls in Rd\mathbb{R}^d have polynomial volume rdr^d; so the embedding must distort distances. In contrast, hyperbolic space has exponential volume growth, matching the combinatorial structure of trees, which is why hyperbolic embeddings (Nickel-Kiela 2017, Sala et al. 2018) achieve much lower distortion than Euclidean ones at the same dimension.

This page is the geometric grounder. It states the parallel postulate, names the three constant-curvature model spaces, defines the Poincare disk metric, proves the volume-growth gap, and lists the operational consequences for graph and representation learning. It is not a substitute for a Riemannian geometry course; it is the prerequisite chain for hyperbolic-embeddings-for-graphs.

The Parallel Postulate and the Three Geometries

Euclid's fifth postulate, Playfair's version: through a point not on a given line there is exactly one line parallel to the given one. Dropping this postulate while keeping the others yields two consistent alternatives: zero parallels (spherical / elliptic geometry) or infinitely many parallels (hyperbolic geometry). The three constant-curvature model spaces in dimension nn are:

  • Sn\mathbb{S}^n, the round nn-sphere of constant sectional curvature K=+1K = +1.
  • Rn\mathbb{R}^n, Euclidean space, K=0K = 0.
  • Hn\mathbb{H}^n, hyperbolic nn-space, K=1K = -1.

A general Riemannian manifold has curvature that varies from point to point and from plane to plane in the tangent space. The constant-curvature spaces are the simplest models and serve as the local "tangent geometry" of the general case via the Gauss-Bonnet machinery.

Definition

Sectional Curvature

For a Riemannian manifold MM and a 22-plane σTpM\sigma \subset T_p M in the tangent space at pp, the sectional curvature K(σ)K(\sigma) is the Gaussian curvature at pp of the small surface obtained by exponentiating σ\sigma at pp. The three model spaces above are exactly the simply connected complete Riemannian manifolds whose sectional curvature is constant in σ\sigma and pp.

The Poincare Disk Model

The cleanest model of H2\mathbb{H}^2 for ML purposes is the Poincare disk. Take the open unit disk D={(x,y)R2:x2+y2<1}D = \{(x, y) \in \mathbb{R}^2 : x^2 + y^2 < 1\} and equip it with the conformal metric ds2=4(dx2+dy2)(1x2y2)2.ds^2 = \frac{4 (dx^2 + dy^2)}{(1 - x^2 - y^2)^2}. The Riemannian distance between two points u,vDu, v \in D is dH(u,v)=arcosh(1+2uv2(1u2)(1v2)).d_{\mathbb{H}}(u, v) = \mathrm{arcosh}\left(1 + \frac{2 \|u - v\|^2}{(1 - \|u\|^2)(1 - \|v\|^2)}\right). The boundary of the disk is at infinite hyperbolic distance from any interior point: as u1\|u\| \to 1, dH(0,u)d_{\mathbb{H}}(0, u) \to \infty. Distances near the boundary stretch. Euclidean straight lines through the origin and Euclidean circular arcs that meet the boundary orthogonally are the geodesics (length-minimizing paths) of the model.

The conformal factor 4/(1x2)24 / (1 - \|x\|^2)^2 is what makes hyperbolic geometry so different from Euclidean geometry near the boundary, and is also the source of its embedding power. The same point that looks "small" in the Euclidean picture has enormous hyperbolic neighbourhood, so a polynomial number of dimensions can host an exponential number of well-separated points.

Volume Growth: The Embedding Argument

Theorem

Volume Growth of a Ball

Statement

For the geodesic ball of radius rr in Hn\mathbb{H}^n, vol(BrHn)=ωn10rsinhn1(s)ds,\mathrm{vol}\big(B_r^{\mathbb{H}^n}\big) = \omega_{n-1} \int_0^r \sinh^{n-1}(s)\, ds, where ωn1\omega_{n-1} is the surface area of the unit (n1)(n-1)-sphere. For large rr, vol(BrHn)Cne(n1)r\mathrm{vol}(B_r^{\mathbb{H}^n}) \sim C_n e^{(n-1) r}.

For comparison, vol(BrRn)=cnrn\mathrm{vol}(B_r^{\mathbb{R}^n}) = c_n r^n (polynomial) and vol(BrSn)vol(Sn)<\mathrm{vol}(B_r^{\mathbb{S}^n}) \leq \mathrm{vol}(\mathbb{S}^n) < \infty (bounded).

Intuition

In hyperbolic space the metric coefficient sinh(s)\sinh(s) grows exponentially with the radial distance ss, whereas in Euclidean space the coefficient is the polynomial ss. Volumes of shells therefore grow exponentially, which gives hyperbolic space "room" for a tree of branching factor bb to embed at depth logb(vol)\approx \log_b(\mathrm{vol}).

Why It Matters

A complete binary tree of depth dd has 2d+112^{d+1} - 1 nodes and pairwise graph distances up to 2d2 d. Embedding it isometrically in Rk\mathbb{R}^k requires kdk \geq d in the worst case (Bourgain), or significant distortion. In H2\mathbb{H}^2 a tree of depth dd embeds with constant distortion: Sala et al. (2018) show that bb-ary trees embed in H2\mathbb{H}^2 with distortion 1+O(1/logd)1 + O(1/\log d). The volume-growth match is the geometric reason. This is the launching pad for hyperbolic-embeddings-for-graphs.

Failure Mode

Hyperbolic embeddings help only when the data is approximately tree-like. For grid-structured or feature-grid data the hyperbolic gain disappears and the Euclidean baseline is at least as good. Gromov's δ\delta-hyperbolicity of the data graph is the right diagnostic: small δ\delta favours hyperbolic embedding, large δ\delta does not.

Operations in the Poincare Ball

Practical hyperbolic ML works in the Poincare ball Bn={xRn:x<1}\mathbb{B}^n = \{x \in \mathbb{R}^n : \|x\| < 1\} (the nn-dimensional analog of the disk). The basic operations live in the gyrovector formalism (Ungar 2008, Ganea et al. 2018):

  • Mobius addition uvu \oplus v: the analog of vector addition.
  • Exponential map expxc(v)\exp_x^c(v): maps a tangent vector at xx to a point in Bn\mathbb{B}^n. Replaces the Euclidean update x+vx + v.
  • Logarithmic map logxc(y)\log_x^c(y): the inverse, mapping a target point to the tangent vector that reaches it.
  • Hyperbolic distance dc(u,v)d^c(u, v): a curvature-cc rescaling of the Poincare formula above.

A hyperbolic neural-network layer applies a linear map in the tangent space at the origin, then exponentiates back to the ball. Optimization uses Riemannian gradient methods with the hyperbolic metric.

Spherical Geometry, Briefly

The sphere Sn\mathbb{S}^n is the constant-positive-curvature counterpart. Key facts: geodesics are great circles; the diameter is π\pi; volumes are bounded. In ML, spherical geometry shows up via L2-normalized embeddings (face recognition with cosine similarity, normalized text embeddings) and in the von Mises-Fisher distribution for directional data. The closed, finite nature of Sn\mathbb{S}^n is a feature, not a bug, for problems with naturally bounded similarity.

Common Confusions

Watch Out

Hyperbolic distance is not Euclidean distance scaled

Two points near the centre of the Poincare disk have hyperbolic distance close to twice their Euclidean distance, but two points equally close in the Euclidean sense near the boundary can be infinitely far apart in the hyperbolic metric. The conformal factor depends on position. Reading off similarity from Euclidean distance in a hyperbolic embedding is a category error.

Watch Out

Negative curvature is not 'inverse' positive curvature

Spherical geometry is closed, bounded, and self-intersecting (great circles meet); hyperbolic geometry is open, unbounded, and tree-like. They are not each other's mirror image. Sign of curvature controls volume growth and geodesic spreading; the qualitative behaviour is asymmetric. Concretely, balls in Sn\mathbb{S}^n saturate, balls in Hn\mathbb{H}^n explode.

Exercises

ExerciseCore

Problem

Compute the Poincare-disk distance between the origin and the point u=(r,0)u = (r, 0) for r(0,1)r \in (0, 1). Show that as r1r \to 1 the distance diverges to infinity, and compute the leading-order rate.

ExerciseAdvanced

Problem

Show that a complete binary tree of depth dd requires at least Ω(d)\Omega(d) Euclidean dimensions to embed with constant multiplicative distortion, but embeds in H2\mathbb{H}^2 with constant distortion. Sketch the argument from volume growth.

References

Related Topics

Last reviewed: April 18, 2026

Prerequisites

Foundations this topic depends on.

Builds on This

Next Topics