# Should I use the hyperbolic distance loss in the case of Poincarè Disk Model?

I trained a neural network which makes a regression to a Poincarè Disk Model with radius $$r = 1$$.

I want to optimize using the hyperbolic distance

$$\operatorname{arcosh} \left( 1 + \frac{2|pq|^2|r|^2}{(|r|^2 - |op|^2)(|r|^2 - |oq|^2)} \right)$$

where $$|op|$$ and $$|oq|$$ are the distances of $$p$$ and respectively $$q$$ to the centre of the disk, $$|pq|$$ the distance between $$p$$ and $$q$$, $$|r|$$ the radius of the boundary circle of the disk and $$\operatorname{arcosh}$$ is the inverse hyperbolic function of hyperbolic cosine.

But there is a problem

• In the Poincarè Disk Model with $$r = 1$$, the distance is defined only for vectors which have norm less than $$1$$.

• A neural network does not know this rule, so it can predict vectors with norm greater than $$1$$.

So, I tried to use the distance defined in a space with $$r = 2$$, and it works very well for the learning task, but I'm doubtful because the distance doesn't scale in a linear way.

Will there be unwanted effects, in your opinion?

• Hi! Can you please explain a little bit more in detail the "regression to a Poincarè Disk Model" sentence? – nbro May 3 '19 at 21:04
• I don't understand all of the context of your question, but you could just normalize whatever output you get from your neural net. – Philip Raeisghasem May 4 '19 at 1:55
• Hi, I have points in R^100, points in H^10 and an unknown function f(R^100 -> H^10) to estimate. H^10 is a Poincarè Disk Model with dimension = 10 and radius = 1 but if I use the hyperbolic distance to evaluate the error on predicted points sometimes is not defined (because predicted points are outside the disk i.e. norm > 1) so I used the hyperbolic distance defined in a space with radius = 2 – NooneBug May 4 '19 at 16:06
• To make an example, if we think in Euclidean space and instead of mse (mean squared error) I used mse/2, the collateral effect is that (probably) the learning will be slower because gradient will try to 'correct' the half value of error. But I'm a Computer Scientist and not a Matemathician so I don't know which collateral effects will happens if I don't use the rigth hyperbolic distance in a space, because hyperbolic does not scale in the same way as euclidean. Thanks a lot for the answers by the way – NooneBug May 4 '19 at 16:15