Contradiction Detection with Contradiction-Specific Word Embedding
来源:互联网 发布:易语言取网页框架源码 编辑:程序博客网 时间:2024/06/17 21:02
简介
所谓contradiction detection就是识别句子对中的相反关系。如句子The man is denying an interview和The man is granting an interview就是两句意义相反的句子。contradiction detection就是要检测出这种关系。词对也是类似的,如词overfull和empty就是一对反义词。但是基于传统词向量训练方法训练出来的词向量,并不能很好地应用于这一任务。于是,他提出contradiction-specific word embedding(CWE)模型。
传统方法的缺陷
现在大部分的词向量训练都是基于分布假说的,即上下文相似的词其语义也相似,也就是基于context的词向量训练。这种训练方法在很多自然语言处理任务中都能取得不错的效果,因为其能捕获词的语义,通过相似度计算,我们可以判断两个词的语义是否相等。但是当把它应用到contradiction detection任务中时,效果就不怎么理想了。因为两个意义相反的词,其上下文很有可能是类似的,如词overfull和empty。所以这些词在向量空间中可能靠的比较近,也导致包含这些反义词的句子在向量空间中也靠的比较近,如下图所示。
但是我们希望意义相反的词,他们在向量空间中能够保持一定距离。如下图所示
语料库的创建
要针对contradiction detection任务训练词向量,那么大型的有关contrasting word pairs and sentence pairs的语料库是不可或缺的。现有的词汇库如WordNet包含反义词,但是反义词只是contrasting words的一部分。为了获得能够充分训练词向量的语料库,作者利用了一个大型的注释语料库PPDB。这个语料库包含词汇级和短语级的文本对。对PPDB里的短语对,作者用WordNet寻找该短语对包含的某些词的反义词,并替换之,从而得到一个意义相反的短语对,过程如表1所示
通过这个办法,得到190万的contradiction pairs和160万的paraphrase pairs.
词向量训练模型
模型的结构如下图所示,包括lookup, linear, tanh, sum 和 linear5层。输入层是短语对。contradiction detection可以看做是一个分类任务。解决这个分类任务是通过ranking objective function。该模型的输出是一个二维的向量,包括scores of contradiction category and paraphrase category。
The condition of updating parameters is shown in Equation (1) where md is the margin, t is the target category, t is another category, ot is the confidence score of t category, and ot is the confidence score of t category.
词向量的初始化并不是随机的,是用已经训练好的“Glove”词向量进行初始化。此外,加法用来向量之间的结合以及展示两个输入的短语的语义关系。
- Contradiction Detection with Contradiction-Specific Word Embedding
- 《Learning Sentiment-Specific Word Embedding for Twitter Sentiment Classificaton》阅读笔记
- 《Learning Sentiment-Specific Word Embedding for Twitter Sentiment Classification》阅读笔记
- word embedding
- word embedding
- word embedding
- Word Embedding (NLP)简述
- word embedding简要介绍
- Word Embedding与Word2Vec
- TextMining Word Embedding
- Word Embedding Topic Discussing
- Word Embedding与Word2Vec
- 深度学习word embedding
- Word Embedding中Embedding的解释
- How to Insert Word Image at Specific Location with C#, VB.NET
- Word Embedding的通俗解释
- 关于NLP的word Embedding
- 为什么要做 Word Embedding
- 前端插件与框架的链接
- Python笔记--变量和对象
- Redhat Linux 6.5 单机安装配置zookeeper和kafka
- ViewPager与Fragment联动实现界面切换‘’
- HGDB新版本开始兼容oracle varchar2类型,作用pg里的varchar类型支持一致
- Contradiction Detection with Contradiction-Specific Word Embedding
- mysql中replace函数不支持正则
- nginx解析php时报”File not found“问题解决
- ztree使用
- 8分钟写出代码的华为面试题?不要被标题迷惑!
- Git fetch/pull 从远程的分支获取最新的版本到本地
- Mac 端口常用操作
- js添加、删除点击事件
- 某安全浏览器竟然也被查出高危漏洞?开源安全问题不容忽视