Curvature Learning Framework (CurvLearn): A TensorFlow‑Based Library for Non‑Euclidean Deep Learning
CurvLearn is a TensorFlow-based open-source library enabling deep learning on curved manifolds (hyperbolic, spherical, mixed) with manifold implementations, Riemannian operations, optimizers, and distributed training, and it has been applied to recommendation, graph, and NLP tasks while providing custom ANN tools and practical training tips.
Abstract Euclidean space is widely used in deep learning due to its intuitive geometry, but it limits the modeling of complex structured data such as social networks and e‑commerce graphs. Curved spaces (hyperbolic and spherical) provide stronger representation power. CurvLearn, an open‑source framework developed by Alibaba‑Mama, enables training and optimization of arbitrary deep models in curved spaces. Built on TensorFlow, it offers manifold implementations, vector operators, high‑level APIs, and large‑scale distributed training.
Background A curvature space (or manifold) generalizes Euclidean concepts to locally flat but globally curved spaces. Curvature measures how far a space deviates from flatness; constant‑curvature spaces include hyperbolic, Euclidean, and spherical spaces, while mixed‑curvature spaces combine regions of different curvature (e.g., a torus). Different data structures benefit from different curvatures: grid‑like data from Euclidean space, large‑scale or scale‑free networks from hyperbolic space, cyclic data from spherical space, and heterogeneous structures from mixed‑curvature spaces.
Formal Definitions A curvature space is defined by a manifold \(\mathcal{M}\) and a metric \(g\). The exponential map \(\exp_{x}\) projects a tangent‑space vector onto the manifold, while the logarithmic map \(\log_{x}\) does the inverse. Constant‑curvature models (Lorentz, Klein, Poincaré ball, projected sphere) are special cases of a unified representation \(\mathcal{M}_{c}\) where the curvature \(c\) can be negative, zero, or positive. Mixed‑curvature spaces are modeled as Cartesian products of constant‑curvature manifolds.
Framework Overview CurvLearn follows a five‑module architecture: Manifolds, Operations, Models, Optimizers, and Applications. It implements five basic manifolds (Euclidean, Stereographic, PoincaréBall, ProjectedSphere, Product) and provides vector operations such as exponential/logarithmic maps, addition, scalar multiplication, parallel transport, geodesic distance, and trigonometric functions.
Manifolds The library supports Euclidean (zero curvature), Stereographic (arbitrary curvature via stereographic projection), PoincaréBall (negative curvature), ProjectedSphere (positive curvature), and Product (heterogeneous curvature) manifolds. Each manifold supplies the necessary Riemannian operators.
Operations Non‑Euclidean operators are realized by mapping vectors to the tangent space (log map), applying Euclidean operations, and mapping back (exp map). Examples include vector averaging (using Einstein midpoint), concatenation, and custom activations.
Models By stacking non‑Euclidean operators, users can build models such as hyperbolic graph convolutional networks (e.g., HGCN) or other geometry‑aware architectures.
Optimizers Training requires Riemannian optimizers. CurvLearn implements Riemannian SGD (RSGD) and other adaptive methods that compute Euclidean gradients, project them to the tangent space, and perform updates respecting the manifold geometry.
Applications The framework has been applied to recommendation systems, graph learning, and natural language processing, achieving superior performance over Euclidean baselines in Alibaba‑Mama’s advertising scenarios.
Training Tips Practical tricks for stable curvature training include careful parameter initialization (small‑variance normal distribution + Xavier), curvature‑aware embedding regularization, and gradient handling (warm‑up, clipping). These measures mitigate embedding overflow and gradient explosion in curved spaces.
ANN Retrieval Tool Because standard ANN libraries assume Euclidean distances, CurvLearn provides a custom ANN tool supporting hyperbolic, spherical, and mixed‑curvature distances, with optimizations for distributed and parallel execution.
Outlook Curvature spaces extend Euclidean geometry and are promising for large‑scale, complex network modeling. The authors anticipate broader adoption of non‑Euclidean representations across diverse deep‑learning models.
References The article cites 12 recent works on geometric deep learning, hyperbolic embeddings, constant‑curvature graph convolutions, product‑space representations, Riemannian optimization, and applications in recommendation, graph, and NLP domains.
Alimama Tech
Official Alimama tech channel, showcasing all of Alimama's technical innovations.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.