加权词嵌入是什么意思?

What does a weighted word embedding mean?

在我试图实现的 paper 中,它说,

In this work, tweets were modeled using three types of text representation. The first one is a bag-of-words model weighted by tf-idf (term frequency - inverse document frequency) (Section 2.1.1). The second represents a sentence by averaging the word embeddings of all words (in the sentence) and the third represents a sentence by averaging the weighted word embeddings of all words, the weight of a word is given by tf-idf (Section 2.1.2).

我不确定第三种表示,它被称为加权词嵌入,它使用由 tf-idf 给出的词的权重。我什至不确定它们是否可以一起使用。

词嵌入的平均(可能加权)是有意义的,尽管取决于主要算法和训练数据,这个句子表示可能不是最好的。直觉如下:

  • 您可能想要处理不同长度的句子,因此求平均值(比普通求和更好)。
  • 句子中的某些词通常比其他词更有价值。 TF-IDF 是最简单的词值度量。请注意,结果的比例不会改变。

另请参阅 this paper by Kenter et al. There is a nice post,它在不同算法中对这两种方法进行了比较,得出的结论是 none 明显优于另一种:一些算法倾向于简单平均,一些算法在以下情况下表现更好TF-IDF 加权。

在这个article or this one中,我们使用加权求和,idf加权和词性加权以及两者结合使用的混合方法。混合方法是最好的,帮助我们在英语-西班牙语和阿拉伯语-阿拉伯语的 SemEval 2017 相似性任务中名列第一(实际上我们在阿拉伯语方面正式排名第二,因为由于某些原因我们没有发送混合方法)。

很容易实现和使用,你在文章中有公式,但简而言之,一句话的向量就是 V = sum_i^k=1 Posweight(w_i) * IDFWeight(w_i) * V_i