Geometry
Hyperbolic Geometry
Цели урока
- Understand three equivalent models of H^2: Poincare disk, upper half-plane, hyperboloid
- Study geodesics, isometries, and the group PSU(1,1)
- Master hyperbolic triangle properties and angular defect
- Connect hyperbolic geometry to hyperbolic neural networks and graph embeddings
Предварительные знания
- Projective Geometry
- Gaussian and mean curvature
- Hyperbolic Geometry (introduction)
How did a geometry considered impossible for 200 years become a computational tool in leading recommendation systems?
- Facebook Research: WordNet (82k words) embedded in 2D hyperbolic space with error 100x smaller than 200D Euclidean
- Knowledge graphs: concept hierarchies in Freebase and DBpedia stored in hyperbolic spaces for semantic search
- Special relativity: the space of velocities in special relativity is the hyperbolic plane under the Minkowski metric
- Recommendation systems: HGNN achieves 7% better accuracy than Euclidean for product hierarchies
From Lobachevsky to Facebook Research
Nikolai Lobachevsky (1830) and Janos Bolyai (1832) independently constructed geometry with negative curvature. Contemporaries considered it nonsense. Gauss knew the result but did not publish - fearing ridicule. Beltrami in 1868 proved hyperbolic geometry is realized on a surface in Euclidean space - the pseudosphere. Poincare in 1882 built the disk model studying automorphic functions. Klein used the upper half-plane model. In 2017, Nickel and Kiela from Facebook Research published 'Poincare Embeddings' - 1200 citations in 5 years.
Models of the Hyperbolic Plane
2019, Facebook Research. The task: embed the WordNet hierarchy - 82,115 words, millions of relations - into a metric space. A 200-dimensional Euclidean space gives ranking error 6.9. A 2-dimensional hyperbolic space gives 0.071. A 100x improvement at 1/100th the dimension.
The key property: the volume of a ball of radius r grows as sinh(r) ~ e^r, exponentially. This is precisely why trees - hierarchical structures with exponential growth in node count - embed so well in hyperbolic space.
Why is hyperbolic space better than Euclidean for embedding hierarchical data?
Hierarchical structures grow exponentially (tree with branching b: b^k nodes at level k). Volume of a ball in H^n is proportional to sinh^{n-1}(r) ~ e^{(n-1)r} - the same exponential growth. Euclidean balls grow only polynomially.
Geodesics and the Isometry Group
In Euclidean geometry geodesics are straight lines. In hyperbolic geometry they are not. Geodesics in the Poincare disk are arcs of circles perpendicular to the boundary circle. Through any two points runs exactly one geodesic. But through a point not on a given geodesic there pass infinitely many geodesics parallel to it.
This is the essence of hyperbolic geometry: Euclid's fifth postulate fails. Through an external point there is not one parallel but infinitely many. Lobachevsky in 1830 proved that such a geometry is consistent.
Hyperbolic Neural Networks
Poincare Embeddings from Facebook Research
The geoopt library (PyTorch) implements optimization on Poincare manifolds. Instead of Euclidean gradient descent - Riemannian gradient with projection onto the hyperbolic metric. HGCN (Hyperbolic Graph Convolutional Network) achieves 5% better accuracy than its Euclidean counterpart on hierarchical graph classification tasks.
What curves are geodesics in the Poincare disk model?
Geodesics in the Poincare disk are arcs of circles perpendicular to the unit circle, plus diameters. These are the shortest paths under the Poincare metric.
Curvature -1 and Hyperbolic Triangles
The angle sum in a Euclidean triangle is pi. On a sphere - more than pi. In the hyperbolic plane - less than pi. Moreover, the defect pi minus the angle sum equals the area of the triangle. This is not a coincidence - it is a direct consequence of the Gauss-Bonnet theorem.
| Property | Euclidean | Spherical (K=+1) | Hyperbolic (K=-1) |
|---|---|---|---|
| Angle sum | pi | > pi | < pi |
| Parallels through external point | 1 | 0 | infinitely many |
| Ball volume growth | r^n (polynomial) | bounded | e^{(n-1)r} (exponential) |
| Triangle area | independent of angles | proportional to sum-pi | proportional to pi-sum |
What is the angle sum in a hyperbolic triangle?
In H^2 the angle sum is strictly less than pi. The defect pi - (alpha+beta+gamma) equals the area. An ideal triangle with boundary vertices has all zero angles and area pi.
Hyperbolic Spaces in Machine Learning
Language models work with hierarchies: words, phrases, sentences, paragraphs. Syntax trees, ontologies, knowledge graphs - everywhere exponential growth. Euclidean embeddings compress these structures, losing information. Hyperbolic spaces preserve it.
HGNN (Hyperbolic Graph Neural Network) is applied to recommendation systems: the hierarchy user -> interests -> items embeds with 7% better accuracy than its Euclidean counterpart. Small change in geometry, large improvement in performance.
The geoopt library for PyTorch implements optimizers on Poincare and hyperboloid manifolds. Just 3 lines differ from Euclidean SGD: replace torch.optim.SGD with geoopt.optim.RiemannianSGD and wrap the parameter with geoopt.ManifoldParameter.
How does the Riemannian gradient on the Poincare disk differ from the Euclidean gradient?
Riemannian gradient = Euclidean gradient * (1-|x|^2)^2/4. This is the inverse conformal factor of the Poincare metric. Near the boundary the Riemannian gradient becomes much smaller - optimization steps near the boundary are cautious.
Connections to Other Topics
Hyperbolic geometry connects to group theory, complex analysis, and machine learning.
- Inversion and Stereographic Projection — Poincare disk model is built from inversion and stereographic projection
- Hyperbolic Geometry — Introductory course on non-Euclidean geometry of constant negative curvature
- Symplectic Geometry — Hyperbolic manifolds yield symplectic structures through the cotangent bundle
Итоги
- Poincare disk D^2 with metric ds^2 = 4|dz|^2/(1-|z|^2)^2, curvature K = -1
- Geodesics: arcs of circles perpendicular to the boundary circle, plus diameters
- Isometries: group PSU(1,1) - Mobius transformations preserving the disk
- Angular defect: Area(triangle) = pi - (alpha+beta+gamma)
- Ball volume grows exponentially: ~ sinh^{n-1}(r) vs r^{n-1} in Euclidean space
- Poincare embeddings: 2D hyperbolic > 200D Euclidean for hierarchies
Вопросы для размышления
- Why does ball volume in H^n grow exponentially with radius, and how does this relate to the effectiveness of tree embeddings in hyperbolic space?
- How does the violation of Euclid's fifth postulate (infinitely many parallels through a point) affect the angle sum in a triangle?
- How does the Riemannian gradient on the Poincare manifold differ from the Euclidean gradient, and why does optimization behave differently near the boundary?