Hyperbolic Embeddings: Hierarchy in Curved Space
📍 Where we are: Part III · Embedding Ontologies — Chapter 11. TransBox and mOWL finished the toolbox for embedding EL++ axioms as regions in flat space; this chapter asks a more radical question: what if the space itself is the wrong shape for a hierarchy?
Every ontology embedding so far has changed the objects living in the space: points became boxes, balls, and translated regions, while the space underneath stayed , ordinary flat Euclidean space. But the deepest structure in the academic world, and in SNOMED CT, the Gene Ontology, and WordNet, is the is-a hierarchy, and a hierarchy is a tree. Trees have a growth rate that flat space simply cannot match: each generation multiplies the number of nodes, while a Euclidean ball's room grows only polynomially with its radius. This chapter makes that mismatch precise with a counting argument, then introduces a space whose room grows exponentially with radius, the Poincaré ball, decodes and differentiates its distance function, derives the Riemannian gradient descent that trains in it, and runs a committed head-to-head on the academic is-a tree at the same tiny dimension : same loss, same seed, same schedule, and only the geometry different.
Imagine drawing your extended family tree on a round tabletop. You put the founding ancestor in the middle, the children in a ring around her, the grandchildren in a ring around them. Each ring must hold roughly twice as many people as the one before, but each ring is only a little longer than the one before, so by the fifth generation the names are overlapping and by the eighth they are unreadable. Now draw the same tree on a magic disc where rulers shrink as they slide toward the rim: a centimeter of table near the edge counts as a mile of "real" distance. Near the rim there is effectively unlimited room, so every generation gets a ring that is, in real distance, as roomy as it needs, forever. The Poincaré ball is that magic disc made mathematically exact, and training an embedding in it means doing gradient descent with the shrinking ruler taken into account at every step.
What this chapter covers
- The counting argument, done honestly: a -ary tree has nodes at depth ; a packing bound shows a Euclidean ball of radius holds only polynomially many well-separated points, so flat embeddings of deep trees must pay in distortion or dimension; hyperbolic room grows like , the same rate as the tree.
- The Poincaré ball, decoded before the formula: the open unit ball with the metric factor inflating distances near the boundary; the closed-form distance with every piece named, and worked checks at the center and at the rim.
- The distance differentiated: the full chain-rule derivation of , every algebraic step shown, landing exactly on the formula the companion code computes.
- Riemannian SGD (stochastic gradient descent) derived: steepest descent under the ball's own metric: the Euclidean gradient rescaled by , plus the projection guard that keeps every point inside the open ball.
- The committed head-to-head at : the 22-node academic hierarchy embedded twice with identical loss, seed, negatives, and schedule; the ball wins the rank-correlation contest and sorts the tree radially, mean norm strictly increasing with depth.
- Why low dimension is the point: two dimensions let the chapter draw the true layout, and the field's result is that low-dimensional hyperbolic embeddings match far higher-dimensional Euclidean ones on hierarchies.
- Hyperbolic entailment cones: Part II's regions rebuilt inside curved space, closing the circle between geometry and subsumption.
- The unsolved part: every model so far embeds each node by table lookup; the graph's wiring deserves an encoder of its own, which opens Part IV.
The counting argument: trees outgrow flat space
Start with how fast a tree grows. In a -ary tree, a tree in which every internal node has children (the letter is the branching factor), the root sits alone at depth , its children at depth number , their children number , and in general depth (the letter counting generations from the root) holds nodes. Growth is exponential in depth: each extra generation multiplies the population. Even the modest academic hierarchy behaves this way at the leaves; its five generations run from one root to a deepest generation of six nodes (the concept Dean and five individuals), and a real ontology such as SNOMED CT runs a dozen generations deep over hundreds of thousands of concepts.
Now ask how much room flat space offers. Suppose we embed the tree so that every edge has length about ; then every node of depth at most lands inside a ball of radius around the root's image, and distinct nodes must stay some minimum distance apart, say at least , or the embedding has collapsed them. So the real question is a packing question: how many points can sit inside a ball of radius in (Euclidean space with coordinates, being the embedding dimension) while keeping every pairwise distance at least ?
The bound comes from comparing volumes, and every step is elementary. Let be such points, of them (here and throughout, is the ordinary Euclidean norm of a vector , its straight-line length, so is the straight-line distance between two of the points). Around each draw a small ball of radius . Two of these small balls cannot share an interior point: if some point were inside both and , the triangle inequality (the rule that a detour is never shorter than the direct path) would give , contradicting the separation. Each small ball also lies wholly inside the enlarged ball , since its center is within of the origin and its radius is . The volume of a radius- ball in is for a constant depending only on , so disjoint balls of radius fitting inside one ball of radius forces
The capacity of flat space is polynomial in the radius: for fixed dimension , a ball of radius holds at most well-separated points. Set that against the tree's demand of nodes and take logarithms: a unit-edge, unit-separated embedding of depth needs , that is,
a dimension that grows almost linearly with the depth of the tree. The concrete numbers make the squeeze vivid for a binary tree () in the plane ():
| depth | tree nodes | flat capacity | hyperbolic circumference |
|---|---|---|---|
By depth the binary tree has essentially consumed the plane, and by depth it demands sixty times more separated points than any radius- disc can hold. Something must give, and there are only two candidates: raise the dimension (parameters multiply), or let distances compress so that distinct nodes crowd together, which is distortion, a measured gap between graph distance and embedding distance. The trade-off between the two can be made exact, and the precise theorems say the same thing the packing bound sketches: flat space pays for trees, in dimension or in fidelity, and the price grows with depth [1].
The last column of the table is the escape route. In the hyperbolic plane, the two-dimensional space of constant negative curvature, the circumference of a circle of radius is not but , where is the hyperbolic sine (its two siblings, used shortly, are the hyperbolic cosine and the hyperbolic tangent ); for large this is approximately , exponential in the radius. In dimensions hyperbolic volume grows like . A tree's population and a hyperbolic ball's room grow at the same rate, so a tree of any depth embeds in the hyperbolic plane with edges of honest length and nodes honestly separated: generation simply occupies the circle of radius proportional to , whose length is exponentially large. Hyperbolic space is, in this exact sense, the continuous geometry of trees [2]. What remains is to build a computable model of it.
The Poincaré ball, decoded before the formula
The model we compute in is the Poincaré ball: as a set of points it is nothing exotic, just the open unit ball
all vectors of Euclidean length less than one ("open" means the boundary sphere is excluded). What is exotic is the ruler. The ball carries a Riemannian metric, a rule assigning every point a local notion of length, and here the rule is conformal: at the point , every infinitesimal Euclidean length is multiplied by the factor
the same factor in every direction (that direction-independence is what "conformal" means; as a matrix the metric is , a scalar times the identity). At the origin , a fixed calibration constant. As the denominator goes to zero and blows up: near the rim, a hair's width of Euclidean motion is an enormous hyperbolic journey. The length of a path is the integral of along it, and the distance between two points is the length of the shortest path (the geodesic) joining them. The rim itself is infinitely far from everywhere; the finite-looking disc contains an infinite world.
The exponential room promised above falls straight out of this factor. Take the circle of Euclidean radius centered at the origin. Its hyperbolic radius is the ruler-corrected distance from the center, and it can be computed directly from the metric. A straight radial segment is the shortest route from the center: any path from the origin to the point must move its norm from to , the norm can change no faster than the path itself moves (the rate of change of is the radial component of the velocity, at most its full length ), and the metric factor depends only on the norm, so every path's hyperbolic length is at least the radial integral below, which the radial segment attains. Evaluating that integral by partial fractions ():
where is the inverse hyperbolic tangent: solving for gives , so , matching the integral. Inverting, . The circle's hyperbolic circumference is the metric factor at radius times its Euclidean circumference:
using in the middle step and the double-angle identity at the end. Both identities are one line from the exponential definitions: , and dividing that by gives the first; is the second. This is exactly the column of the table: the model realizes the geometry.
Between two arbitrary points the same integration, carried along the general geodesic, yields a closed-form distance [2], and it is the formula everything else in this chapter differentiates:
Name every piece before using it. The numerator is twice the squared Euclidean gap between the points, the raw flat-space separation. Each factor in the denominator, and , measures how far its point sits from the rim, one when the point is at the center and zero at the boundary; these are the same quantities the metric factor divides by. The outer function is the inverse hyperbolic cosine, defined for arguments by ; it is at and grows like for large . So the distance is small exactly when the fraction is small (points close together, both far from the rim) and grows logarithmically as the fraction explodes (points near the rim, where the denominators vanish). The companion implementation is a direct transcription (hyperbolic.py lines 112–121):
def poincare_dist(U: np.ndarray, V: np.ndarray) -> np.ndarray:
"""Row-wise Poincaré distance
d(u, v) = arcosh( 1 + 2·‖u−v‖² / ((1−‖u‖²)(1−‖v‖²)) ).
``arccosh`` is NumPy's inverse hyperbolic cosine; the argument is clipped
to ≥ 1 so that u = v gives exactly 0 despite rounding."""
uu = np.sum(U * U, axis=-1)
vv = np.sum(V * V, axis=-1)
dd = np.sum((U - V) ** 2, axis=-1)
gamma = 1.0 + 2.0 * dd / np.maximum((1.0 - uu) * (1.0 - vv), _EPS)
return np.arccosh(np.maximum(gamma, 1.0))
Two special cases turn the formula from a black box into an instrument. Near the origin the ball is just a doubled Euclidean plane. If both and are tiny, both denominators are approximately , so the argument is . For small the hyperbolic cosine expands as , so for small ; with this gives , the Euclidean distance times the origin's metric factor . Along a radius the distance has an exact closed form. Put and . Then
so , and
exactly the radial distance that we integrated from the metric itself, so the closed form passes an independent check in the one case computed from first principles. As this behaves like : the last sliver of Euclidean radius contains an unbounded stretch of hyperbolic radius. The following checks are computed with poincare_dist itself, and they show the position-dependence that flat space lacks: the same Euclidean gap of costs near the center and near the rim.
| pair | Euclidean | Poincaré |
|---|---|---|
| and | ||
| and | ||
| and | ||
| and | ||
| and |
The last row is the tree-embedding mechanism in miniature: two points that a flat reading would call two units apart are, hyperbolically, fifteen units apart, because the geodesic between them must dive through the interior. Cousin leaves on opposite sides of a family tree can sit close to the rim, Euclidean-near, yet hyperbolically as far apart as their long path through the root demands.
Differentiating the distance, every step shown
Training moves points to shrink or grow distances, so we need , the gradient of the distance with respect to one of its arguments. Introduce the shorthand the code uses: and (the two rim-closeness factors), and let be the argument of the ,
Step one: the outer derivative. From , differentiate both sides with respect to : . Since gives (positive because ),
Step two: the inner derivative. depends on through the numerator and through . The gradient of a squared norm is , and (by the same fact, with the second point at the origin) , so . The product rule on then gives
Step three: collect the bracket. Expand it using and , where is the dot product:
the terms cancel and the terms fold into . Step four: chain the two. Multiplying steps one through three,
which is the published gradient of the Poincaré distance [2]. Because , the gradient in is the same expression with the two points exchanged (, ); no second derivation is needed. The companion file computes both by hand, no autograd anywhere, and the code is the boxed formula verbatim (hyperbolic.py lines 146–155):
root = np.sqrt(np.maximum(gamma * gamma - 1.0, _EPS)) # √(γ²−1)
# ∂d_j/∂u = 4/(β_j·√(γ_j²−1)) · [ (‖v_j‖² − 2⟨u,v_j⟩ + 1)/α² · u − v_j/α ]
grad_u = (4.0 / (beta * root))[:, None] * (
((vv - 2.0 * uv + 1.0) / alpha ** 2)[:, None] * u - V / alpha)
# ∂d_j/∂v_j = 4/(α·√(γ_j²−1)) · [ (‖u‖² − 2⟨u,v_j⟩ + 1)/β_j² · v_j − u/β_j ]
grad_v = (4.0 / (alpha * root))[:, None] * (
((uu - 2.0 * uv + 1.0) / beta ** 2)[:, None] * V
- np.outer(1.0 / beta, u))
The _EPS floor under the square root matters at exactly one place: when , and , the distance has a corner (like at ) and the raw formula would divide by zero. The floor turns that corner into a large-but-finite gradient, the standard numerical guard.
Riemannian SGD: steepest descent under the ball's own ruler
The gradient descent chapter of Volume 1 proved that is the steepest descent direction, but the proof quietly assumed a flat ruler: it compared candidate steps of Euclidean unit length. In the Poincaré ball the ruler is -times the Euclidean one, so "steepest" must be re-derived, and the answer changes in a precise and beautiful way.
Let be a loss depending on a parameter point , and let be its ordinary Euclidean gradient there, the vector of partial derivatives, so that a small step changes the loss by to first order (this Taylor fact is geometry-free; derivatives do not care about rulers). What the geometry changes is the constraint. A fair comparison fixes the step's length as the space measures it: the ball's metric assigns the step the length , so a unit step in the ball's ruler is a Euclidean step of length . Minimize the first-order change over that set. By the Cauchy–Schwarz inequality,
with equality exactly when points along . So the steepest descent direction is unchanged (for a conformal metric the rescaling is the same in every direction, so it cannot rotate the winner), but the achievable rate per unit of metric length is , damped near the rim where is large. The vector that packages both facts is the Riemannian gradient , defined as the unique vector whose metric inner product with any step reproduces the first-order change: for all . With this reads for every , and two vectors with identical dot products against everything are equal, so
In words: Riemannian SGD is Euclidean SGD with the gradient rescaled by the inverse metric, here the scalar because the metric is conformal [2]. The rescaling factor is at the origin and collapses toward zero at the rim, which is not a bug but the geometry speaking: near the boundary a fixed hyperbolic step corresponds to a vanishing Euclidean step, so the update must shrink in Euclidean terms exactly where the ruler magnifies. One guard remains. The update , where is the learning rate, the step-size scalar familiar from Volume 1's gradient descent chapter, is a straight-line move, and a finite straight-line move can land on or outside the boundary sphere, which is not part of the space (and where is infinite). The standard fix is a projection (a retraction): if the step escapes, rescale the point back to just inside the ball. The training loop implements both, and the comment carries the derivation's conclusion (hyperbolic.py lines 244–254; the projection helper is lines 174–178):
if geometry == "hyperbolic":
# RIEMANNIAN SGD: the ball's metric is g_θ = (2/(1−‖θ‖²))²·I,
# so the Riemannian gradient is the Euclidean gradient rescaled
# by the INVERSE metric, (1−‖θ‖²)²/4; the step is then
# projected back into the ball.
scale_u = (1.0 - float(u @ u)) ** 2 / 4.0
scale_V = (1.0 - np.sum(V * V, axis=1)) ** 2 / 4.0
X[ui] = _project(u - lr * scale_u * grad_u)
np.add.at(X, tids, -lr * scale_V[:, None] * grad_V)
for t in np.unique(tids):
X[t] = _project(X[t])
_project rescales any point whose norm exceeds back onto that shell; at that radius the origin-distance is already , deep hyperbolic territory. The Euclidean control model in the same file runs the identical loop with the plain distance, the plain gradient, no rescale, and no projection (hyperbolic.py lines 255–258), which is exactly what makes the coming comparison a controlled experiment.
The objective, the schedule, and the hierarchy being embedded
What loss are those gradients descending? The recipe of the original Poincaré-embedding work [2]: for each connected pair, make its distance small relative to the distances to sampled non-neighbors. Concretely, for an is-a edge with true parent at index and five sampled negatives (nodes that are neither nor adjacent to it), the loss is the negative log-softmax of the negated distances,
where the second form follows because and . Its derivative with respect to each distance takes two lines. The first term contributes to and nothing to the others; the log-sum contributes, for every ,
with the softmax probability the model currently assigns to candidate and equal to for the true parent and otherwise. This is the same cross-entropy signal the single neuron produced in Volume 1, read in a new variable: in the logit the derivative is exactly prediction minus target, with ; in the distance variable the sign flips to because the logit is the negated distance. The force reading is unchanged: the true parent is pulled closer with force (hard when the model is wrong, gentle when it is already sure), each negative is pushed away with force . The loop computes exactly this, with the standard max-shift trick for numerical stability (hyperbolic.py lines 231–242):
# L = d_0 + log Σ_j e^{−d_j} (computed with the max-shift trick)
m = float(np.max(-d))
e = np.exp(-d - m)
Z = float(np.sum(e))
total += float(d[0]) + m + math.log(Z)
# ∂L/∂d_j = [j = 0] − p_j with p_j = e^{−d_j} / Σ_k e^{−d_k}
coeff = -(e / Z)
coeff[0] += 1.0
grad_u = coeff @ gU # Σ_j (∂L/∂d_j)·(∂d_j/∂u)
grad_V = coeff[:, None] * gV # (∂L/∂d_j)·(∂d_j/∂v_j)
The schedule follows the paper's burn-in recipe: the first epochs run at one tenth of the learning rate, a burn-in that lets the near-origin initialization (each coordinate drawn uniformly from the interval , so everything starts in the flat center of the ball) organize itself gently before full-strength updates lock in an arrangement; the rate itself, here, is this run's choice, a value the paper leaves as a free parameter (hyperbolic.py lines 185–188 set LR = 0.1, BURN_IN = 10, EPOCHS = 2000, NEGATIVES = 5; line 216 applies lr = LR / 10.0 if epoch <= BURN_IN else LR).
The hierarchy itself is Volume 2's concept tree with Volume 3's individuals hung underneath: the concept spine (Person subsumes Researcher, Researcher splits into Professor and Student, Dean under Professor), the four top-level concepts under a virtual root Entity, and one edge per individual from its ABox type in kg.TYPE_OF (hyperbolic.py lines 53–65):
def build_edges() -> list[tuple[str, str]]:
"""The is-a edge list as (child, parent) pairs: the concept spine of the
Volume 2 TBox, the four top concepts under the virtual root, and one edge
per individual from its ABox type (``kg.TYPE_OF`` — never retyped)."""
edges: list[tuple[str, str]] = [
("Person", ROOT), ("Paper", ROOT), ("Institution", ROOT), ("Topic", ROOT),
("Researcher", "Person"),
("Professor", "Researcher"), ("Student", "Researcher"),
("Dean", "Professor"),
]
for ind in kg.ENTITIES: # alice → Professor, p1 → Paper, mit → Institution ...
edges.append((ind, kg.TYPE_OF[ind]))
return edges
That yields nodes ( concepts including the root, plus the individuals), edges, and node pairs (the binomial coefficient , read " choose ", counts the ways to pick an unordered pair of nodes from the : ); the ground truth each embedding is judged against is the breadth-first-search hop distance between every pair, a tree metric with diameter . The run prints the generations directly:
depth 0: Entity
depth 1: Institution, Paper, Person, Topic
depth 2: Researcher, cmu, logic, mit, ml, nesy, p1, p2, p3
depth 3: Professor, Student
depth 4: Dean, alice, bob, carol, dave, erin
Note the shape: depth is the widest generation ( nodes) because eight leaf individuals (the papers, institutions, and topics) attach directly to depth- concepts, while the people descend two levels further through Researcher. This unevenness will matter when we read the norm table.
The head-to-head at d = 2, read off the committed run
Both models now train under conditions that differ in only the geometry: the same softmax loss, the same seed-0 initialization, the same learning-rate schedule, and, because the negative-sampling stream never looks at parameter values, the exact same negative draws. Running python3 hyperbolic.py prints the training trace:
training: Nickel–Kiela softmax loss, 5 negatives/edge, lr=0.1 (first 10 epochs at lr/10), 2000 epochs, seed 0
epoch hyperbolic loss euclidean loss
1 1.7933 1.7931
10 1.7379 1.7287
100 0.2601 0.4319
500 0.0594 0.2350
1000 0.0966 0.1051
2000 0.0560 0.0914
At epoch the two are indistinguishable ( versus ): everything still sits in the ball's flat center, where we derived that Poincaré distance is just twice Euclidean distance, so the two objectives see nearly the same landscape. By epoch they have diverged decisively, against , and at epoch the hyperbolic loss () is a quarter of the Euclidean one (): the same objective is simply easier to satisfy in a space with room for the tree. Then the evaluation against all ground-truth pairs:
reconstruction of the tree metric (231 node pairs, BFS distances 1..6)
hyperbolic euclidean
Spearman rank correlation 0.8136 0.7539
mean distortion (scale-fit) 0.2593 0.2421
fitted scale s 3.5925 3.5025
Read both rows honestly. The Spearman rank correlation (the Pearson correlation of the rank vectors, computed tie-aware in hyperbolic.py lines 290–309 because the tree distances tie heavily) asks: does the embedding put the pairs in the right order, near pairs near and far pairs far? There the ball wins by a comfortable margin, against , at an identical budget of numbers per model. The scale-fitted mean distortion (fit one global scale , then average ; hyperbolic.py lines 281–287) asks a stricter question: after a single fitted rescaling (the code fits as the mean of the ratios ), are the distances proportionally right? There the flat model is marginally better, against . Read that gap for what it is: a property of this training run, not a ceiling of the geometry. The softmax loss only rewards making the true parent nearer than the sampled negatives; it never compares an embedding distance to a hop count, so nothing in training asks for proportional fidelity (the crowding of the deepest generation near the rim may compress some of its pairwise distances further, though that is a hypothesis this run does not isolate: the committed points stop short of the projection shell). Hyperbolic space itself can do far better: constructive embeddings place any tree in the hyperbolic plane with multiplicative distortion arbitrarily close to one [1], so the distortion row measures what this loss never asked for, not what the space can deliver. What this trained ball does preserve at low dimension is the ordering of the tree metric, and the module's competency assert guards exactly that claim and no more (hyperbolic.py line 377: assert rho_hyp > rho_euc).
The signature hyperbolic effect is the radial sorting. The run prints, for the trained ball, the mean Euclidean norm of each generation (norms_by_depth, hyperbolic.py lines 312–321):
hyperbolic norm vs tree depth (deeper generations near the boundary)
depth nodes mean ‖x‖
0 1 0.7595
1 4 0.9838
2 9 0.9870
3 2 0.9875
4 6 0.9996
The means increase strictly with depth, and the assert at hyperbolic.py line 386 fails the module if they ever do not. The Euclidean norms look bunched (everything between and after depth ), but that is the flat ruler talking; convert each mean norm to its hyperbolic distance from the origin with the radial formula derived earlier:
| depth | mean | hyperbolic radius |
|---|---|---|
| (Entity) | ||
| (top concepts) | ||
| (Researcher + 8 leaf individuals) | ||
| (Professor, Student) | ||
| (Dean + 5 people) |
The hierarchy is read straight off the radius: the root sits about hyperbolic units out, the top concepts near , and the deepest individuals past , pressed against the shell where a generation of any size fits. The one small step, depth to depth , is the unevenness noted above: depth already contains eight boundary-hugging leaf individuals (p1–p3, mit, cmu, logic, ml, nesy), which reach the rim early because nothing hangs below them, while depth holds only the two internal concepts Professor and Student, which must stay slightly interior to remain near their own children (the code's comment at hyperbolic.py lines 378–384 records exactly this reading). Leaves rush to the boundary; hubs lag. The radius is measuring depth-below-ness, not depth alone, which is precisely the containment intuition Part II built with boxes, now emerging unsupervised from a distance-only objective: nothing in the loss mentions depth, direction, or subsumption, yet the geometry reconstructs the ontology's levels because the exponential room happens to be where the numerous deep generations need it.
The committed d = 2 Poincaré embedding of the academic is-a tree: the root near the center, each generation pushed outward, every family in its own angular sector, and the ball beating the flat plane on rank correlation with the tree metric at the same 44-number budget.
Original diagram by the authors, created with AI assistance.
Why two dimensions is the point, not a toy
Choosing was pedagogically motivated: the trained coordinates are the chapter's figure, nothing projected away, every claim about radii and sectors checkable against the printed coordinate list. But the choice also reflects the field's central empirical finding, which is that hyperbolic embeddings do their best work precisely when dimension is scarce. The original Poincaré-embedding experiments reconstructed the WordNet noun hierarchy, over eighty thousand nodes, with embeddings of dimension five to ten that matched or beat Euclidean embeddings of dimension two hundred [2]; the representation-tradeoffs analysis quantifies why, flat space spending dimensions or distortion on a tree while hyperbolic space spends neither [1]. The result carries to knowledge graphs at large: hyperbolic KG embeddings with relation-specific rotations match state-of-the-art Euclidean models while using an order of magnitude fewer dimensions on hierarchy-rich benchmarks such as WN18RR [3]. The lesson generalizes the counting argument: parameters are a budget, geometry sets the exchange rate, and when the data is tree-shaped, curvature buys what dimensions otherwise would. One caveat keeps the claim honest: curvature is a prior, paying off exactly insofar as the data matches its growth pattern. The academic KG's non-hierarchical relations (citation, authorship, affiliation) carry cycles and cross-links a tree geometry has no special room for, which is one reason practical systems learn the curvature per relation rather than fixing one curved space for everything [3].
Entailment cones: Part II's regions, bent into the ball
The distance-only objective above recovered the hierarchy's levels, but it represents each node as a point, so it still cannot assert subsumption; Part II argued that entailment needs regions with containment. The two ideas compose. Hyperbolic entailment cones carve out, at each point of the Poincaré ball outside a small ball around the origin (the construction excludes an -neighborhood of the center, where no valid cone aperture exists), a cone opening away from the origin, with an aperture that narrows as grows: widest for general concepts just outside that excluded core, vanishing toward the rim. The concept at entails everything embedded inside its cone, and the construction makes membership transitive: if then , the geometric image of the fact that subsumption chains (and that nesting is exactly why deeper points must carry narrower cones) [4]. Where Part II's flat cones and boxes fought for volume (a general concept in flat space must be geometrically enormous to contain all its descendants), a wide cone anchored near the origin fans out into the exponential room toward the rim, which is what gives it space for every descendant: Person's cone can hold Researcher's narrower cone, which holds Professor's, which holds alice, without any of them starving for space; training minimizes a margin loss on a cone-membership energy, with substantial reported gains over both distance embeddings and flat order embeddings on WordNet [4]. We do not reimplement cones here; the point is the composition itself, regions for logic and curvature for hierarchy in one geometry, the same design space that EL Embeddings through TransBox and mOWL explored in flat space, reopened in curved space.
The unsolved part
Within its own frame the chapter leaves an honest crack visible: the run's distortion row shows that the ball's win is about ordering, not proportional faithfulness, and near the rim the model runs into arithmetic itself. At the projection shell , the difference that every formula divides by is around ; the deepest committed points sit at norm , and each further generation of a bigger tree would need another factor-of- sliver of the remaining space. Representing depth- nodes faithfully takes on the order of bits of the gap to the boundary, so float precision, not data, becomes the binding constraint on deep hierarchies [1]; an active line of later work has proposed fixes ranging from alternative charts of hyperbolic space to multi-precision arithmetic.
But the larger unsolved part frames the whole of Parts I–III. Every model in these eleven chapters, TransE's translations, the boxes and balls and cones, and now the curved ball, shares one silent design decision: the embedding of each entity or concept is a free row in a lookup table, adjusted by gradients but structurally independent of every other row. The graph's wiring enters only through the loss, one edge at a time; no model ever computes a node's representation from its neighborhood. That has a concrete cost the running example makes plain: a new node (a new student, a freshly published paper) has no row, so nothing can be predicted about it without retraining, and two nodes with identical surroundings learn unrelated vectors unless the loss happens to push them together. The meaning of a node in a graph lives substantially in its wiring, and what is missing is an encoder that consumes the wiring itself, computing each node's vector from its neighbors' vectors, recursively, so that structure determines representation rather than merely constraining it. Building that encoder, and discovering the precise logical ceiling on what it can distinguish, is Part IV.
Why it matters
For the neuro-symbolic program, this chapter delivers two load-bearing facts. First, geometry is a modeling choice with a logic-shaped payoff: the is-a backbone of every ontology this series cares about (the academic TBox, SNOMED CT, the Gene Ontology, WordNet) is tree-like, the counting argument proves flat space must pay for that shape in dimension or distortion, and curved space pays nothing. When Volume 4 makes logical structure differentiable, a space whose distances already respect the hierarchy hands the learner the ontology's skeleton for free, at a budget small enough to inspect. Second, the committed run is a miniature of the soundness probing this series keeps returning to: a distance-only objective never told about depth or subsumption produced radii that order the generations exactly, and where the geometry only partially honors the logic (rank order yes, proportional distances no), the asserts say so precisely. Reading logical structure off learned geometry, and knowing how far to trust the reading, is the discipline the integration volume depends on.
Key terms
- b-ary tree / branching factor: a tree whose internal nodes each have children, so depth holds nodes; exponential growth flat space cannot match.
- Packing bound: the volume argument showing at most points with pairwise distance at least fit in a radius- Euclidean ball; polynomial capacity against the tree's exponential demand.
- Distortion: the disagreement between graph distance and embedding distance; here scale-fitted as the mean of over all pairs.
- Poincaré ball: the open unit ball with the conformal metric factor ; room grows exponentially with radius and the rim is infinitely far away.
- Geodesic: the shortest path between two points as the space's own metric measures length; in the ball, an arc bowing toward the center.
- Poincaré distance: ; radially, .
- Riemannian gradient / Riemannian SGD: the steepest-descent vector under the space's metric, here the Euclidean gradient rescaled by , followed by projection back into the ball.
- Burn-in: the schedule's first epochs at a reduced learning rate, letting the near-origin initialization organize before full-strength updates.
- Spearman rank correlation: the Pearson correlation of rank vectors, tie-aware; whether the embedding orders the pairs as the tree does.
- Hyperbolic entailment cone: a region of the ball opening away from the origin whose transitive containment encodes subsumption, uniting Part II's regions with this chapter's curvature.
Where this leads
Part III closes with the hierarchy literally visible in the geometry: radius as depth, sectors as families, subsumption as containment-in-curvature. What no model so far has done is look at the graph while encoding: every vector in Parts I–III is a trained table entry, and the wiring only ever spoke through the loss. The next chapter, Message Passing, inverts that design. Each node's representation will be computed, layer by layer, from the representations of its neighbors, so that the graph's structure becomes the network's computation graph; the same academic KG will flow through the aggregate-and-update equations of the graph neural network (GNN) blueprint, and a new question will immediately arise, one with a precisely logical answer: what can a network that only sees its neighbors ever learn to distinguish?
Companion code: examples/neural/hyperbolic.py builds the 22-node hierarchy from Volume 2's concept spine plus kg.TYPE_OF, implements the Poincaré distance, its hand-derived gradients, Riemannian SGD with the ball projection, and the identically-configured Euclidean control, then evaluates both against the BFS tree metric. Run python3 examples/neural/hyperbolic.py to reproduce every number in this chapter; its asserts guard the Spearman win, the strictly increasing norm-vs-depth table, and that every trained point stays inside the open ball.