如何评价Word2Vec作者提出的fastText算法?深度学习是否在文本分类等简单任务上没有优势?
点击上方“MLNLP”,选择加"星标"或“置顶”
重磅干货,第一时间送达
编辑:忆臻https://www.zhihu.com/question/48345431本文仅作为学术分享,如果侵权,会删文处理
如何评价Word2Vec作者提出的fastText算法?深度学习是否在文本分类等简单任务上没有优势?
作者:董力
https://www.zhihu.com/question/48345431/answer/111513229
https://www.zhihu.com/question/48345431/answer/111513229
fastText简而言之,就是把文档中所有词通过lookup table变成向量,取平均后直接用线性分类器得到分类结果。fastText和ACL-15上的deep averaging network [1] (DAN,如下图)非常相似,区别就是去掉了中间的隐层。两篇文章的结论也比较类似,也是指出对一些简单的分类任务,没有必要使用太复杂的网络结构就可以取得差不多的结果。
文中实验选取的都是对句子词序不是很敏感的数据集,所以得到文中的实验结果完全不奇怪。但是比如对下面的三个例子来说:
- The movie is not very good , but i still like it . [2]
- The movie is very good , but i still do not like it .
- I do not like it , but the movie is still very good .
其中第1、3句整体极性是positive,但第2句整体极性就是negative。如果只是通过简单的取平均来作为sentence representation进行分类的话,可能就会很难学出词序对句子语义的影响。
从另一个角度来说,fastText可以看作是用window-size=1 + average pooling的CNN [3]对句子进行建模。
总结一下:对简单的任务来说,用简单的网络结构进行处理基本就够了,但是对比较复杂的任务,还是依然需要更复杂的网络结构来学习sentence representation的。
另外,fastText文中还提到的两个tricks分别是:
- hierarchical softmax
- 类别数较多时,通过构建一个霍夫曼编码树来加速softmax layer的计算,和之前word2vec中的trick相同
- N-gram features
- 只用unigram的话会丢掉word order信息,所以通过加入N-gram features进行补充
- 用hashing来减少N-gram的存储
[1] Deep Unordered Composition Rivals Syntactic Methods for Text Classification
[2] A Statistical Parsing Framework for Sentiment Classification
[3] Natural Language Processing (Almost) from Scratch
推荐阅读:
最新评论
推荐文章
作者最新文章
你可能感兴趣的文章
Copyright Disclaimer: The copyright of contents (including texts, images, videos and audios) posted above belong to the User who shared or the third-party website which the User shared from. If you found your copyright have been infringed, please send a DMCA takedown notice to [email protected]. For more detail of the source, please click on the button "Read Original Post" below. For other communications, please send to [email protected].
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。
版权声明:以上内容为用户推荐收藏至CareerEngine平台,其内容(含文字、图片、视频、音频等)及知识版权均属用户或用户转发自的第三方网站,如涉嫌侵权,请通知[email protected]进行信息删除。如需查看信息来源,请点击“查看原文”。如需洽谈其它事宜,请联系[email protected]。