論文閱讀《LEX-BERT: Enhancing BERT based NER with lexicons》


key value
論文名稱 LEX-BERT: Enhancing BERT based NER with lexicons
一作 Wei Zhu
單位 上海華東師范大學; 聖地亞哥AI4ALL
發表 ICLR 2021
領域 命名實體識別
主要貢獻 提出一種將詞信息融入到字嵌入的方法
基礎模型 Chinese BERT-wwm-ext
優化器 AdamW
數據集 Chinese Ontonotes 4.0; ZhCrossNER
最終成績 成績超過BERT和FLAT; 推理時間更短
摘要 In this work, we represent Lex-BERT, which incorporates the lexicon information into Chinese BERT for named entity recognition (NER) tasks in a natural manner. Instead of using word embeddings and a newly designed transformer layer as in FLAT, we identify the boundary of words in the sentences using special tokens, and the modified sentence will be encoded directly by BERT. Our model does not introduce any new parameters and are more efficient than FLAT. In addition, we do not require any word embeddings accompanying the lexicon collection. Experiments on MSRA and ZhCrossNER show that our model outperforms FLAT and other baselines.
論文鏈接 https://arxiv.org/pdf/2101.00396.pdf
源碼鏈接

主要內容

本文提出一種更加優雅的方法,將詞信息融入到字嵌入中去,如下圖,在每個詞第一個字對應的位置上,加上詞的詞性標簽(文中稱為marker),且和text中的token共享位置id

另外在attention mask上,text tokens只能看到彼此,看不到marker,而marker是可以看到所有的。注意力掩碼如下圖所示:

成績

成績比FLAT更好,雖然領先不多。

推理速度

本文的做法非常優雅,相比FLAT,確實達到了簡單且高效,只可惜數據集太少(只有兩個且其中一個還是作者自己的數據集),需要補充在其他數據集上的成績,才能得出更具有說服力的結論。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM