StructBERT解讀

介紹

StructBERT是阿里巴巴達摩院提出的NLP預訓練模型,在傳統BERT的基礎上作出了相關改進,本文具體介紹StructBERT在BERT上的變化,論文參考《StructBERT: Incorporating Languages structures into pre-training for deep language understading》

StructBERT VS BERT

主要區別在於除了增加了兩個預訓練任務和目標

Word Structural Objective

在這裏插入圖片描述
該任務的啓發是,一個良好的語言模型,應該有把打亂的句子重構的能力。改任務具體做法是,如上圖所示,除了和BERT一樣將15%的TOKEN進行MASK外,對未MASK的詞,隨機抽選一個trigram,打亂順序後重構該順序,相應被打亂的節點接softmax後預測需要重構之前的順序,目標函數如下:
在這裏插入圖片描述
這裏的K是打亂的訓練長度(論文中K=3),目標函數最大化輸出序列爲打亂順序前的原有序列的概率。

Sentence Structural Objective

在這裏插入圖片描述
Next Sentence Prediction,即NSP任務是預測下一個句子是不是在原有句子之後,本質是個二分類任務。該任務對於BERT而言,NSP任務過於簡單,通常有97%-98%的準確率,因此structBERT對NSP進行擴展,這裏具體做法如上圖所示改成三分類問題,即預測下一個句子是在當前句子之前,或者之後,後者任意抽取的句子。實際構造訓練數據的時候上述各取三分之一。

總結

這篇論文的額主要貢獻在於以下兩點

• We propose novel structural pre-training that extends BERT by incorporating the word structural objective and the sentence structural objective to leverage language structures in contextualized representation. This enables the StructBERT to explicitly model language structures by forcing it to reconstruct the right order of words and sentences for correct prediction.
• StructBERT significantly outperforms all published state-of-the-art models on a wide range of NLU tasks. This model extends the superiority of BERT, and boosts the performance in many language understanding applications such as semantic textual similarity, sentiment analysis, textual entailment, and question answering.

  1. 訓練增加了兩個新的目標Word Structural Objective和Sentence Structural Objective,使得新的模型能顯式對語言的順序進行正確重構,並對正確順序的句子作出預測
  2. 該模型超越了BERT,在現有大部分NLU任務取得了state-of-the-art的效果
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章