Relation Classification via Convolutional Deep Neural Network
用于关系分类的最先进的方法越来越依赖于特征提取的质量。而特征工作又经常的被当做是现有NLP工具或系统的一部分来解决,导致现有的NLP工具的错误在特征提取任务中被不断的传播并且放大。应用深度学习来进行特征提取进变得十分可行了。
Word Representation
Lexical Level Features
在词汇级别的特征提取工作中,传统方法主要提取名词本身、名词性实体对和名词性实体对到各个类型词性词语之间的词序,这太过依赖于现有的NLP工具。但是这并不妨碍我们对深度学习加一些先验性知识,这会使得我们的模型更加的灵活和实用,我们从五个词法层面对句子进行特征提取,来使得我们的模型更加的有偏重性。
All of these features are concatenated into our lexical level features vector l.
Sentence Level Features
词嵌入技术已经能很好的表达词语之间的相关性。但是不能很好的捕捉远距离的词汇之间的关系,不能让计算机对于一个很长的句子表达有正确的理解。因此我们在句子级别的特征提取中使用卷积神经网络,希望能够结合所有的局部特征、提取句子中远距离的语法信息,最后生成我们的句子级别的特征向量。
each token is further represented as Word Features (WF) and Position Features (PF)
![](https://i-blog.csdnimg.cn/blog_migrate/11ec4ca8f8a252ffb18ece3677d03453.png)
Word Features
![](https://i-blog.csdnimg.cn/blog_migrate/4ef89a1333ba51cf291543427b9c2094.png)
![](https://i-blog.csdnimg.cn/blog_migrate/6a1a871a6b565cfbcd12c746057d933d.png)
Position Features
PF = [d1, d2] 句子中当前词与实体1和实体2的距离,将WF和PF结合为[WF, PF]T ,其作为卷积运算的输入。
Convolution
我们通过“window”操作,将部分上下文信息结合到了当前词的向量表示中,但是这仅仅是在每个词周围产生局部特征。关系分类的任务就是要给一个句子中的实体对打上不同的标签,那么我们就有必要利用局部特征来预测全局关系。那么使用卷积操作来合并这些局部特征就是一个很自然的想法了。
first process the output of Window Processing using a linear transformation
X ∈ R(n0×t )is the output of the Window Processing task
W1 ∈ R(n1×n0 )n1 is the size of hidden layer 1
Z ∈ R(n1×t) is dependent on t.
To determine the most useful feature in the each dimension of the feature vectors, we perform a max operation over time on
Z.
![](https://i-blog.csdnimg.cn/blog_migrate/3f0b46e4cd826fa18eff76dab24c7f16.png)
m ={m1, m2, · · · , mn1}对于Z我们对其每行都选取最大的数,消除了句子长度不确定的影响。
![](https://i-blog.csdnimg.cn/blog_migrate/2322456f44ab9e6bd46e7d94c9e3cad1.png)
W2 ∈ R(n2×n1) n2 is the size of hidden layer 2
Output
f = [l, g] (lexical ,sentence )
![](https://i-blog.csdnimg.cn/blog_migrate/26ead65dd554d71071b943a2c9310aa1.png)
o ∈ R(n4×1) is the final output of the network
n4:is equal to the number of possible relation types for the relation classification system
![](https://i-blog.csdnimg.cn/blog_migrate/4eef060729e86f65d4895d93b370bc67.png)