作者:艾春辉
学校:华北电力大学、苏州大学准研究生
编辑:王萌(澳门城市大学)
wordNet的问题:?
步骤:
word2vec的一些参数:
为什么每个单词都需要训练两个词向量
两个模型变体
原始的论文中skip-gram模型是最大化的,这里给出:
课程中的公式:
我们希望中⼼词与真实上下⽂单词的向量点积更⼤,中⼼词与随机单词的点积更⼩
k是我们负采样的样本数⽬
共现矩阵 X
利⽤某个定⻓窗⼝中单词与单词同时出现的次数来产⽣window-based (word-word) co-occurrence matrix
let me to tell you a example: 句子
方法一: SVD分解
方法二: Ramped windows that count closer words more----将window倾斜向能统计更接近的单词中
方法三: 采用person相关系数
两种方法:
优点
缺点
优点
缺点
采用共现矩阵的思想对meaning进行编码
我们如何评判在线性表达下的共现矩阵相似度
结论
the problem:Most words have lots of meanings!(一词多义问题)• Especially common words • Especially words that have existed for a long time
method1: Improving Word Representations Via Global Context And Multiple Word Prototypes (Huang et al. 2012) -------将常⽤词的所有上下⽂进⾏聚类,通过该词得到⼀些清晰的簇,从⽽将这个常⽤词分解为多个单词,例如 bank_1, bank_2, bank_3
method2: Linear Algebraic Structure of Word Senses, with Applications to Polysemy (Arora, …, Ma, …, TACL 2018)
Different senses of a word reside in a linear superposition (weighted sum) in standard word embeddings like word2vec -----------采用加权和的形式进行处理
令人惊讶的是,这个加权均值的效果非常好
到目前我们学的为止,我们的目标是内在任务,强调开发一个特别优秀的word embedding。接下来我们讨论如何处理外部任务
Most NLP extrinsic tasks can be formulated as classification tasks. For instance, given a sentence, we can classify the sentence to have positive, negative or neutral sentiment. Similarly, in named-entity recognition (NER), given a context and a central word, we want to classify the central word to be one of many classes. ------许多nlp的task都可以归类为分类任务
for example:我们有一个句子: Jim bought 300 shares of Acme Corp. in 2006,我们的目标是得到一个结果:[Jim]Person bought 300 shares of [Acme Corp.]Organization in [2006]Time.
我们预训练的词向量在外部评估中的表现仍然有提高的可能,然而,如果我们选择重新训练,我们会存在很大的风险------可能效果会比之前差得多
If we retrain word vectors using the extrinsic task, we need to ensure that the training set is large enough to cover most words from the vocabulary. -----因为word2vec和glove会产生一些语义接近的单词,并且这些单词位于同一个单词空间。如果我们在一个小的数据集上预训练,这些单词可能在向量空间中移动,这会导致我们的结果更差
softmax的训练
我们通常的输入不是一个单词
Improving Distributional Similarity with Lessons Learned from Word Embeddings
Evaluation methods for unsupervised word embeddings
glove原文
由于微信平台算法改版,公号内容将不再以时间排序展示,如果大家想第一时间看到我们的推送,强烈建议星标我们和给我们多点点【在看】。星标具体步骤为:
(1)点击页面最上方"AINLP",进入公众号主页。
(2)点击右上角的小点点,在弹出页面点击“设为星标”,就可以啦。
感谢支持,比心
。
欢迎加入AINLP技术交流群
进群请添加AINLP小助手微信 AINLPer(id: ainlper),备注NLP技术交流
推荐阅读
征稿启示| 200元稿费+5000DBC(价值20个小时GPU算力)
完结撒花!李宏毅老师深度学习与人类语言处理课程视频及课件(附下载)
模型压缩实践系列之——bert-of-theseus,一个非常亲民的bert压缩方法
文本自动摘要任务的“不完全”心得总结番外篇——submodular函数优化
斯坦福大学NLP组Python深度学习自然语言处理工具Stanza试用
关于AINLP
AINLP 是一个有趣有AI的自然语言处理社区,专注于 AI、NLP、机器学习、深度学习、推荐算法等相关技术的分享,主题包括文本摘要、智能问答、聊天机器人、机器翻译、自动生成、知识图谱、预训练模型、推荐系统、计算广告、招聘信息、求职经验分享等,欢迎关注!加技术交流群请添加AINLPer(id:ainlper),备注工作/研究方向+加群目的。
![]()
阅读至此了,分享、点赞、在看三选一吧🙏