(2015ACL) Classifying Relations by Ranking with Convolutional Neural Networks
论文: https://www.aclweb.org/anthology/P15-1061 或者 https://pan.baidu.com/s/1qFGhrMIO31s0pVvv0eJkMQ
机构: IBM
模型: CR-CNN
数据: SemEval2010-Task8
结果: F1值,84.1%
备注: 只利用了预训练好的词向量表示
输入: 一个包含两个标注实体的句子,例如 The [car] left the [plant]
输出: 一个向量,各维度代表各个关系的概率

过程:
Word Embeddings
通用的获取词向量流程:
预先训练好的embedding matrix 为: W^{wrd} \in \mathbb{R}^{d_w \times |V|}, d_w为词向量的维度,|V|为单词总数
列向量W^{wrd}_i \in \mathbb{R}^{d_w } 即为 第 i 个词对应的词向量
词w得到其词向量r_w的公式为:r_w=W^{wrd}v^w,v^w是一个w维度为1,其余维度为0的总维度为|V|的向量
Word Position Embeddings
同 (2014COLING) Relation Classification via Convolutional Deep Neural Network 那篇论文中PF的获取方式
wpe^w = [wp_1, wp_2],wp_1和wp_2为d_{wpe}维的向量
于是,句子x转化为向量表示emb_x= { [r^{w_1},wpe^{w_1}], [r^{w_2},wpe^{w_2}],…,[r^{w_N},wpe^{w_N}]}
(备注:实例图中每个词的维度为d_w,没有考虑position embeddings)
Sentence Representation
利用CNN提取句子x的特征向量r_x
Class embeddings and Scoring [论文创新点]
普通方式为:将特征向量输入softmax classifier得到最终结果
本文的创新点为:
模型为每种关系学习一个向量表示
W^{classes}为关系对应的embedding matrix,每一列为一种关系对应的向量表示
关系c的向量表示即为[W^{classes}]_c,维度与句子x的特征向量r_x相同
于是,两向量相乘 r_x^T [W^{classes}]_c,可以得到一个值
至此,模型为句子x、关系c学到一个值:s_\theta(x)_c=r_x^T [W^{classes}]_c
其中,\theta表示模型的所有参数
训练过程中,一个句子x对应一个正例y^+和一个负例c^-
y^+是句子真正对应的关系类别,c^-则为其它关系类别中的一个
正例对应的值为s_\theta(x)_{y^+},负例对应的值为s_\theta(x)_{c^-}
损失函数为L=log(1+exp(\gamma(m^+-s_\theta(x)_{y^+})))+log(1+exp(\gamma(m^-+s_\theta(x)_{c^-})))
m^+和m^-为margin值,\gamma为放大系数
训练过程中,使s_\theta(x)_{y^+}逐渐大于m^+,s_\theta(x)_{c^-}逐渐小于m^-
原文:
* The proposed network learns a distributed vector representation for each relation class.
* Given an input text segment, the network uses a convolutional layer to produce a distributed vector representation of the text and compares it to the class representations in order to produce a score for each class.
* We propose a new pairwise ranking loss function that makes it easy to reduce the impact of artificial classes.
BibTeX:
@inproceedings{dos-santos-etal-2015-classifying,
title = "Classifying Relations by Ranking with Convolutional Neural Networks",
author = "dos Santos, C{\'\i}cero and
Xiang, Bing and
Zhou, Bowen",
booktitle = "Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)",
month = jul,
year = "2015",
address = "Beijing, China",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/P15-1061",
doi = "10.3115/v1/P15-1061",
pages = "626--634",
}

