为什么我们使用输入隐藏权重矩阵作为单词向量而不是隐藏输出权重矩阵? [英] why we use input-hidden weight matrix to be the word vectors instead of hidden-output weight matrix?

查看:174
本文介绍了为什么我们使用输入隐藏权重矩阵作为单词向量而不是隐藏输出权重矩阵?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在word2vec中,经过训练,我们得到两个权重矩阵:1.输入隐藏权重矩阵; 2.隐藏输出权重矩阵.人们将使用隐藏输入的权重矩阵作为单词向量(每行对应一个单词,即单词向量).这让我感到困惑:

In word2vec, after training, we get two weight matrixes:1.input-hidden weight matrix; 2.hidden-output weight matrix. and people will use the input-hidden weight matrix as the word vectors(each row corresponds to a word, namely, the word vectors).Here comes to my confusions:

  1. 为什么人们使用输入隐藏权重矩阵作为单词向量,而不使用隐藏输出权重矩阵.
  2. 为什么我们不只是将softmax激活功能添加到隐藏层而不是输出层,从而避免了耗时.

此外,请您澄清一下如何像这样获得单词向量的直觉.

Plus, clarifying remarks on the intuition of how word vectors can be obtained like this will be appreciated.

推荐答案

关于输入-隐藏权重矩阵和隐藏-输出权重矩阵这两者,有一篇有趣的研究论文. Mitra等人,文档排名的双重嵌入空间模型",arXiv2016.( https://arxiv.org/pdf/1602.01137.pdf ). 与您的问题类似,本文研究了这两个权重矩阵的不同之处,并声称它们编码的单词具有不同的特征.

Regarding the two, input-hidden weight matrix and hidden-output weight matrix, there is an interesting research paper. 'A Dual Embedding Space Model for Document Ranking', Mitra et al., arXiv 2016. (https://arxiv.org/pdf/1602.01137.pdf). Similar with your question, this paper studies how these two weight matrix are different, and claims that they encode different characteristics of words.

总体而言,根据我的理解,根据您的数据和要解决的问题,您可以选择使用输入隐藏权重矩阵(惯例),隐藏输出权重矩阵或组合的词权嵌入词.

Overall, from my understanding, it is your choice to use either the input-hidden weight matrix (convention), hidden-output weight matrix, or the combined one as word embeddings, depending on your data and the problem to solve.

这篇关于为什么我们使用输入隐藏权重矩阵作为单词向量而不是隐藏输出权重矩阵?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆