TalSchuster / CrossLingualContextualEmb

Cross-Lingual Alignment of Contextual Word Embeddings
MIT License
98 stars 9 forks source link

section 3.3 in paper #12

Closed shaunlim0105 closed 4 years ago

shaunlim0105 commented 4 years ago

Not a code issue, but I have a question regarding your paper. For footnote 3 in section3.3 (Supervised Anchored Alignment), it says "In practice, we may have multiple target words for a single source word, and the extension is straight-forward.".

My understanding is, dictionary D is a dictionary for source and target word pairs. However for a single source word that may have multiple target words, denote this as 'i', (e.g bear in source(english) can be translated to multiple target words), D would contain more than one entries of (i,D(i)) . So dictionary D would look like: .... (source, target) (bear, target word for 'animal bear') (bear, target word for 'to have') .... ....

Say, a = anchor vector for source word bear b = anchor vector for target word 'animal bear' c = anchor vector for target word 'to have'

then, we learn a mapping between (a,b) and (a,c). Is my understanding correct?

The problem is, it is hard to intuitively understand how this method can lead to results demonstrated in Figure2, where distinct point clouds are aligned with their corresponding distinct words in target

TalSchuster commented 4 years ago

Hi, footnote 3 is more a technical detail that doesn't necessarily refer to different "meanings". I admit that the text there is a bit confusing, sorry. Regarding the intuition of figure 2, you are correct about the structure of the dictionary. The intuition is, the way I see it (and supported by some qualitative examples), that the anchor of "bear" translates to around the center of the translations of the different "meanings". Due to the orthogonality of the alignment matrix, the internal relations (in the same language) between the contextual incidents are preserved, resulting in point clouds related to the contextual embeddings that are aligned with the "meanings" of the translations. You should also take into account the overall space of embeddings (e.g. clustering animals and verbs separately) and the objective of the alignment that tries to reduce the distance between word pairs translations (e.g. pairs of animals translations and pairs of verbs translations).

You can also check out the slides and video from the conference for some visualizations.

shaunlim0105 commented 4 years ago

Appreciate your detailed response.

shaunlim0105 commented 4 years ago

can you specify how the dictionary was created for the supervised anchored alignment process?

TalSchuster commented 4 years ago

Hi, We used the dictionary from facebook's MUSE repo. It was created using some Facebook internal tools.