dinobby / HypEmo

The official implementation of ACL 2023 paper "Label-Aware Hyperbolic Embeddings for Fine-grained Emotion Classification."
15 stars 3 forks source link

Exponential / Logarithmic maps #2

Open JensVN98 opened 11 months ago

JensVN98 commented 11 months ago

Hi! I was wondering which classes/functions should be used to map, for example, a BERT embedding to the hyperbolic space (using the Poincaré ball model). In the paper it is mentioned that you use an exponential map, but I am not sure where this can be found in the code. Is it e.g. line 106 in hypbert.py, or do you need to use PoincareBall Manifold class in poincare.py?

(FYI: I'm not referring to training label embeddings; just the projections)

Thanks!

dinobby commented 7 months ago

Hi, thanks for the question!

As you mentioned, the projection is done at line 106 in hypbert.py, but the underlying Poincare model is defined in models/base_models.py and the HNN model in models/encoders.py, so you may need to import them to do the projection. I hope this answers your question :)