Yueeeeeeee / CAQA

[EMNLP 2021] PyTorch Implementation of Contrastive Domain Adaptation for Question Answering using Limited Text Corpora

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

small issue in paper (formula 5)

rajicon opened this issue · comments

Hi,

I think there is an error in formula 5, when comparing to your code. In formula 5, the use of k is incorrect, it should be D (or whatever is used to denote mmd). The kernel function k leads the formula 5 to be the opposite of what is desired, as it is a similarity function, not a distance function. From my understanding, the kernel fucntion k is used as f in formula 4. Is this correct, or am I misunderstanding something?

We used empirical kernel mean embeddings to estimate MMD, so formula 4 is not not directly used, see another example in https://arxiv.org/abs/1901.00976 (equation 2)

I think I see the issue; the k used as an example ( k = exp( - |x1 - x2|^2 / lambda) ) is a similarity function, but the k actually used is a distance function. Is that correct? In that case, the k example is incorrect, and makes equation 5 confusing.

Sorry about the notation. You can check out the original paper using MMD with gaussian kernel here: https://arxiv.org/pdf/1502.02791.pdf