Poincaré ball and Lorentz model of the hyperbolic space

JD Jiarui Ding
AR Aviv Regev
request Request a Protocol
ask Ask a question
Favorite

The Poincaré ball model represents the hyperbolic space as the interior of a unit ball in the Euclidean space: P=zRM+1z<1,z0=0,MZ+, where z=(z0,,zM)T. The distance between two points z1,z2\inP is defined as:

where cosh1(z)=ln(z+z21) is the inverse hyperbolic cosine function, which is monotonically increasing for z1. The symbol represents the Euclidean norm. Notice that cosh1(1+z)=ln(1+z+z2+2z), which approximates 2z when limz0 and ln(2z) for limz+. When both z1 and z2 are close to the origin with zero norm, d(z1,z2)cosh1(1+2z1z22)2z1z2. Therefore, the Poincaré ball model resembles Euclidean geometry near the center of the unit hyperball. The induced norm of a point z\inP is

As z moves aways from the origin and approaches the border with z1, the induced norm zP 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 HM={zRM+1z0>0,z,zH=1}, where z,zH=z0z0+i=1Mzizi is the Lorentzian inner product (or Minkowski inner product when zR4). The special one-hot vector 𝛍0=(1,0,,0)T is the origin of the hyperbolic space. The distance between two points of the Lorentz model is defined as:

The tangent space of HM at point 𝛍HM is defined as T𝛍HM:={z𝛍,zH=0}, i.e., all the vectors that pass point 𝛍 and are orthogonal to vector 𝛍 based on the Lorentzian inner product. A point (z0,z1,,zM)T 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 HM is constructed by first defining a normal distribution on the tangent space T𝛍0HM (a Euclidean subspace in RM+1) at the origin 𝛍0=(1,0,,0)T 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 N(z0,IMσ) in RM to samples from a wrapped normal distribution in HM with mean of 𝛍, where σRM is the standard deviation of components z1 to zM, respectively, and IM is the identity matrix in RM25,55. First, let z0=(0,z0)T, which can be considered as a sample vector from T𝛍0HM, where z0 is sampled from N(z0,IMσ). Next, z0 is parallel-transported to vector z1 in the tangent space T𝛍HM at 𝛍, in a parallel manner (i.e., z1 and z0 pointing in the same direction relative to the geodesic between 𝛍0 and 𝛍) and vector norm preserving (i.e., z0,z0H=z1,z1H)25,80:

with α=𝛍0,𝛍H.

Finally, the exponential map24,25,79 projects vector z1 in the tangent space T𝛍HM back to the hyperbolic space by:

such that the vector norm is preserved: z1H=z1,z1H=dH(𝛍,z).

The likelihood after the invertible transformations can be calculated by

The encoder outputs a vector h in the tangent space at the origin (T𝛍0HM, so hH=h2) and can be mapped to HM using the exponential map (the first zero element of h is omitted) to get 𝛍:

Given a sample z from the wrapped normal distribution, we need to evaluate its density logpz for calculating the KL-divergence term of the ELBO. We can use the inverse exponential map and the inverse parallel transport to compute the corresponding z1 and z0, respectively, for evaluating the density:

where β=𝛍,zH and α=𝛍0,𝛍H. 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.

post Post a Question
0 Q&A