ps:本文省略了对few-shoot部分的阅读

原文:
Matching the Blanks: Distributional Similarity for Relation Learning

目的

学习与任务无关的关系的表示。

1.相关研究

1.1 关系抽取三大流派

1)全监督或者远程监督。即从句子中抽取预先定义的关系。
2)开放式关系抽取。非预定义关系,但是很多抽取的关系其实可以用一种关系表示。
3) 通用模式,既可以表达多种多样的关系,又保留了实现定义关系的简洁性,但是依赖于大型知识关系库。

1.2 Harris’ distributional hypothesis

语义相似,分布应也相似。

2. 文章的贡献

1.在transformer基础上学习多种关系的通用表示,并且超过了最佳模型。
2.提供了在远程监督或无监督的语料中学习表示的方法。

3.模型细节

3.1 损失计算

image.png

3.2 多种模型架构(上图encoder 部分)

image.png

3.2.1

a.取出cls部分的编码
b.取出实体词部分(word pieces)的编码 maxpooling后连接到一起
c.在b的基础上加了位置编码
d.在a的基础上给实体词左右加上标记
e:在b的基础上给实体词左右加上标记
f:实体词左右加上标记,取出标记token的编码

4.无监督的方式

论文原话:

Instead, we declare that for any pair of relation statements r and r 0 , the inner product fθ(r) >fθ(r 0 ) should be high if the two relation statements, r and r 0 , express semantically similar relations

即,论文认为,相似的关系应该具有相似的分布

image.png

对于所有的语料

image.png

Instead, we observe that there is a high degree of redundancy in web text, and each relation between an arbitrary pair of entities is likely to be stated multiple times. Subsequently, r = (x, s1, s2) is more likely to encode the same semantic relation as r 0 = (x 0 , s 0 1 , s 0 2 ) if s1 refers to the same entity as s 0 1 , and s2 refers to the same entity as s 0 2 .

作者观察到,很多同一实体对在句子中往往表达了相同的关系。 作者提出matching the blanks (MTB)方法,并且可以再没有任何微调的情况下,甚至超过了使用人工标记的数据的模型。

image.png

这样可能会出现,模型仅仅检测两个实体是否一致,但是没法学到语义关系。所以将实体用[blank] mask 按照一定概率(αalphaα = 0.7)来把句子中的实体替换为特殊标记 [BLANK],使模型对句子中除实体外的context信息进行建模。论文模型使用Bert Large的参数进行初始化,在Matching the blanks任务上预训练后,再在具体的关系抽取任务上进行fine-tune。

实验结果

image.png

非few-shot 上面的实验结果 还行


北语张益达
6 声望4 粉丝