The Poincaré ball model represents the hyperbolic space as the interior of a unit ball in the Euclidean space: , where . The distance between two points is defined as:
where is the inverse hyperbolic cosine function, which is monotonically increasing for . The symbol represents the Euclidean norm. Notice that , which approximates when and for . When both and are close to the origin with zero norm, . Therefore, the Poincaré ball model resembles Euclidean geometry near the center of the unit hyperball. The induced norm of a point is
As moves aways from the origin and approaches the border with , the induced norm grows exponentially. Hyperbolic geometry is useful to represent data with an underlying approximate hierarchical structure.
The Lorentz model is a model of the hyperbolic space and points of this model satisfy , where is the Lorentzian inner product (or Minkowski inner product when ). The special one-hot vector is the origin of the hyperbolic space. The distance between two points of the Lorentz model is defined as:
The tangent space of at point is defined as , i.e., all the vectors that pass point and are orthogonal to vector based on the Lorentzian inner product. A point in the Lorentz model can be conveniently mapped to the Poincaré ball21 for visualization:
We discard the first element as it is a constant of zero.
We used wrapped normal priors and wrapped normal posteriors defined in the Lorentz model to embed cells to a hyperbolic space25,34,79. A wrapped normal distribution in is constructed by first defining a normal distribution on the tangent space (a Euclidean subspace in ) at the origin of the hyperbolic space. Samples from a normal distribution on the tangent space are parallel-transported to desired locations and further projected onto the final hyperbolic space25.
We used a set of invertible functions to transform samples from a normal distribution in to samples from a wrapped normal distribution in with mean of , where is the standard deviation of components to , respectively, and is the identity matrix in 25,55. First, let , which can be considered as a sample vector from , where is sampled from . Next, is parallel-transported to vector in the tangent space at , in a parallel manner (i.e., and pointing in the same direction relative to the geodesic between and ) and vector norm preserving (i.e., )25,80:
with .
Finally, the exponential map24,25,79 projects vector in the tangent space back to the hyperbolic space by:
such that the vector norm is preserved: .
The likelihood after the invertible transformations can be calculated by
The encoder outputs a vector in the tangent space at the origin (, so ) and can be mapped to using the exponential map (the first zero element of is omitted) to get :
Given a sample from the wrapped normal distribution, we need to evaluate its density for calculating the -divergence term of the ELBO. We can use the inverse exponential map and the inverse parallel transport to compute the corresponding and , respectively, for evaluating the density:
where and . We now have all the ingredients to compute Eq. (1) for each training point.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.