轉載請註明出處:西土城的搬磚日常

原文連結:

https://

arxiv。org/pdf/1706。0507

5。pdf

ABSTRACT

在資訊提取中,實體和實體關係的聯合抽取是一個很重要的課題。本文提出了一種新型的序列標註方案,將聯合抽取問題轉換為序列標註問題。並且,將這種方案應用於多種end-to-end模型(使用端到端模型,而不是先進行命名實體識別,NER,再進行關係抽取),比較這些模型的效能。本文還提出了一種新的模型(筆者:其實只是對以前的模型的小改進),該模型在本文使用的資料集中擊敗了其他所有模型。

INTRODUCTION

以往的關係抽取方法總結:

extracting the entities(Nadeau and Sekine, 2007) first and then recognizing

their relations (Rink, 2010)。先抽取實體,再抽取關係

但是這種方式後來被證明有缺陷:

NER的結果會影響後續實驗的效能,並且導致誤差累計(Li and Ji, 2014)

於是人們想到利用實體與關係之間的資訊:

(Li and Ji, 2014; Miwa and Sasaki, 2014; Yu and Lam, 2010; Ren et al。, 2017)。

然而這種方式需要複雜的特徵工程,並且依賴於其他的NLP工具,也會導致誤差累計。於是有了利用神經網路的方法:

Miwaand Bansal, 2016 端到端模型

這種方式仍然有缺陷:它會抽取出冗餘的沒有關係的實體,例如:

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

這句話中apple inc 和trump被當做實體對提取出來了,但是他們之間並沒有關係。

基於這種想法,本文做出了改進:使用序列標註的思想。

基於LSTM的端到端模型,被用於很多序列標註問題:

Hochreiter and Schmidhuber, 1997 LSTM用於end-to-end

Lample et al。, 2016 NER

Vaswani et al。, 2016 CCG Supertagging

Zhai et al。, 2017 Chunking

Method

標註方案:

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

每個詞都有一個標籤:

O:others

非O(三部分組成):

實體位置 BIES begin inside end single

關係類別 relation type 預定義的關係集

關係角色 1 or 2 分別代表在一個三元組的前面還是後面

模型:

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

本文模型結構:LSTM-LSTMd

模型主要是兩部分組成:

Bi-LSTM encoding layer和LSTM decoding layer

輸入句子先輸入到embedding layer,輸出300維vector

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

前向LSTM的notation

後向LSTM也類似,BiLSTM的隱層輸出為:ht

LSTM decoding layer:

require:

BiLSTM的隱層輸出: ht

上一個預測的tag embedding: Tt-1

上一個cell值: ct-1

上一個decoding layer的隱層輸出: ht-1

得到

詞的tag : wt

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

LSTM decoding layer notation

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

softmax層,其中Nt是tag的總數量

目標函式定義如下:

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

其中,D是訓練集的資料數量,Lj是句子xj的長度,ytj是xj的標籤(groud truth)

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

I(O)的定義

alpha是偏置權重,為了能將有關係的tags的對於L的影響力增大。

Experiments

experiments settings

資料集:

Ren et al。,2017 的遠端監督方法生成的公開資料集:NYT

test set是人工標註的。

training set:353k(三元組的數量)

test set:3880

relation set:24

evaluation:

precision recall F1 score

由於本文的方法並不對實體進行分類,所以訓練模型的時候沒有用到訓練資料的實體型別標籤。只要實體關係判定正確就認為這條資料判斷正確。驗證集用test set的10%,每個實驗執行十次,取平均值。

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

table 1 實驗結果 不同模型效能對比

超引數設定:

word embedding: word2vec Mikolov et al。, 2013 NYT訓練語料 d=300維

embeddding layer使用dropout ratio=0。5

encoding LSTM unit數量:300

decoding LSTM unit數量:600

table 1 對應的alpha值是10

對比實驗

LSTM-CRF (Lample et al。, 2016):BiLSTM - CRF

LSTM-LSTM(Vaswani et al。, 2016):BiLSTM-LSTM

這兩個模型是第一次用於實體和實體關係聯合抽取(都使用序列標註方案)。

實驗結果

聯合抽取效能優於分開抽取,end-to-end模型基本上優於聯合抽取模型,證明了本文提出的將聯合抽取問題轉換為序列標註問題是可行的。

從F1值上來看。文字的LSTM-LSTM-Bias模是最優的。

Analysis and discussion

誤差分析:

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

對實體和實體對的預測效能

實體對的precison 高,但是recall低,說明:有時候只找到了一個實體但是沒有找到他的對應的另一個實體。不能組成pair。

table2比table1效能高一點,說明當實體對判斷對的時候,有些時候實體關係判斷錯了。

關於Biased Loss

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

對於單個實體預測的比例

這個圖是對於預測到的實體中,單個實體佔的比重,我們的模型ratio最低,說明我們有效利用了實體間的關係。能夠有效地將兩個實體聯絡起來。

對於alpha引數的選取:

實驗改變alpha的取值:1-20分別進行了實驗,如果alpha太大,precision會下降,alpha太小,recall會下降。當alpha=10的時候,F1值最佳。

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

《joint extractions of entities and relations based on a novel tagging scheme》閱讀筆記

Conclusion

本文將序列標註的方法應用於聯合抽取問題,實驗結果證明這種思路行之有效。但是這仍然有很多缺點:

1 當實體關係出現overlapping的時候

2 可以有效識別實體對,但判別他們之間的關係效果仍然不理想。