CrowNER at Rocling 2022 Shared Task: NER using MacBERT and Adversarial Training
996Authors
nan
Abstract
AbstractThis study uses training and validation data from the “ROCLING 2022 Chinese Health Care Named Entity Recognition Task” for modeling. The modeling process adopts technologies such as data augmentation and data post-processing, and uses the MacBERT pre-training model to build a dedicated Chinese medical field NER recognizer. During the fine-tuning process, we also added adversarial training methods, such as FGM and PGD, and the results of the final tuned model were close to the best team for task evaluation. In addition, by introducing mixed-precision training, we also greatly reduce the time cost of training.
Keywords
Full Content
命名實體識別:結合預訓練模型及對抗訓練的解決方案 CrowNER at Rocling 2022 Shared Task: NER using MacBERT and Adversarial Training 張秋霞 Qiu-Xia Zhang∗ 國立臺灣大學資訊工程學系 Department of Computer Science and Information Engineering National Taiwan University r10922164@ntu.edu.tw 戚得郁 Te-Yu Chi∗ 國立臺灣大學資訊工程學系 Department of Computer Science and Information Engineering National Taiwan University d09922009@ntu.edu.tw 楊德倫 Te-Lun Yang∗ 國立政治大學資訊科學系 Department of Computer Science National Chengchi University 111971029@nccu.edu.tw 張智星 Jyh-Shing Roger Jang 國立臺灣大學資訊工程學系 Department of Computer Science and Information Engineering National Taiwan University jang@mirlab.org 摘要 本研究使用「ROCLING 2022 中文健康照 護命名實體辨識任務」(Lee et al., 2022) 中 的訓練與驗證資料來進行建模。建模過程 採用了資料擴增與資料後處理等技術,並 使用 MacBERT 預訓練模型來建立一個專 用中文醫療領域的 NER 辨識器。在微調 過程中,我們也加入對抗式訓練的方法, 如 FGM 和 PGD,最後調適所得的模型成 效接近於任務評測最佳團隊。此外,藉由 引入混合精度訓練,我們也大幅降低了訓 練所需時間成本。 Abstract This study uses training and validation data from the ”ROCLING 2022 Chinese Health Care Named Entity Recognition Task” for modeling. The modeling process adopts technologies such as data augmen- tation and data post-processing, and uses ∗These authors contributed equally to this work. the MacBERT pre-training model to build a dedicated Chinese medical field NER rec- ognizer. During the fine-tuning process, we also added adversarial training meth- ods, such as FGM and PGD, and the re- sults of the final tuned model were close to the best team for task evaluation. In addi- tion, by introducing mixed-precision train- ing, we also greatly reduce the time cost of training. 關鍵字: MacBERT、條件隨機場域、命名 實體辨識、對抗訓練 Keywords: MacBERT, Conditional Ran- dom Field, Name Entity Recognition, Adver- sarial Training 1 緒論 自然語言處理 (Natural Language Processing, NLP) 的持續發展,使機器逐漸能夠以人類大 腦思考的方式來理解與解析語意,降低人類與 The 34th Conference on Computational Linguistics and Speech Processing (ROCLING 2022) Taipei, Taiwan, November 21-22, 2022. The Association for Computational Linguistics and Chinese Language Processing 321 機器之間溝通的鴻溝,將人類常用的語言轉換 成機器可以理解的格式,藉以進行文字上的分 類、預測、推論等與自然語言理解 (Natural Language Understanding, NLU) 相關的任務。 自然語言理解與語言學 (Linguistics) 有著密 不可分的關係,它逐漸發展成包括人工智慧、 計算機科學等領域的一門學科 (Bates, 1995)。 近年來,隨著神經網路與機器學習技術的進 步,以及網際網路上大量文字語料的取得,自 然語言理解相關的理論與實務操作,得到了廣 泛的應用。 機器在簡單閱讀理解任務上的表現,已經可以 逐漸接近 (Rajpurkar et al., 2016) 甚至超越人 類 (Yu et al., 2018),然而在真實世界的應用 上,卻還是有較大的效能差距 (Zheng et al., 2019),會有這樣的差異,在於人類具有了解 實際情況並且作出回應的能力,此能力易於 將閱讀得到的文字資訊,自動地建立關聯,並 賦予意義,雖然機器能夠將非結構性的文字 透過斷詞技術 (word segmentation),將不同 的文句切割成字詞,但字詞之間並沒有辦法 直接建立有意義的關聯,於是需要透過系統性 的標註方式 (labelling),讓機器理解上下文、 段落、文句和字詞之類的關係,將重要的資 訊提取出來,進而得到不同領域的知識,例 如閱讀一則衛教 (Health Education) 文章,文 章中會提及哪些人 (Who) 可能會得到什麼樣 的疾病 (What),通常這些疾病好發於什麼時 間 (When) 如季節、月份等,以及為什麼會得 到這些疾病 (Why) 和如何治療 (How),這些 標註可以幫助機器更好地理解字詞之間的關 係、順序和意義,掌握字詞的特徵,以便於了 解文章整體的重點,這種資訊擷取 (Informa- tion Extraction) 的方法,稱之為命名實體辨 識 (Name Entity Recognition, NER),是自然 語言處理的基本任務之一。 本研究使用 ROCLING 2022 中文健康照護 命名實體辨識 (Chinese Healthcare Named Entity Recognition) 任務 (Lee et al., 2022) 所提供的訓練與驗證資料,結合資料擴增 (Data Augmentation) 與 資料 後處理 (Post- Processing),以 BERT 為基礎的預訓練語言 模型 MacBERT 進行微調訓練 (Fine-tune), 在評估語言模型的成效以後,計算出 F1-score 的結果為 0.7796。而後,在既有的語言模型 上加入了條件隨機場域 (Conditional Random Field, CRF) 等模型提升方法,計算出 F1- score 的結果為 0.8076,提升了 2.8% 的效能, 與任務評測最佳的系統,有著類似的成效與水 平,並且藉由引入混合精度訓練,大幅減少訓 練所需時間成本。 下一章將簡要地進行文獻回顧,第三章說明 本研究所執行的步驟,包括採用的神經網路架 構、資料處理的方式,第四章呈現系統展示的 結果,並說明改善的方法。 2 相關研究 2.1 BERT Bidirectional encoder representations from transformers (BERT) (Devlin et al., 2018) 是 由 Google 於 2018 年提出的 NLP 預訓練模 型,用以解決 NLP 在各種領域下游所遭遇的 問題,例如:意圖分類問題、情緒分類問題、 前後文預測問題等。 BERT 基於 Transformer (Vaswani et al., 2017) 的 Encoder 作為其雙向訓練的架構;由於相 同的詞 (word) 在上下文 (context) 中可能表 示不同意義,BERT 將詞轉換為 contextual word embedding,投射到一向量空間以表示 其特徵並作為 Transformer 的輸入;為了讓 文字的序列是有意義的,BERT 同時將 Posi- tion Encoding 作為輸入傳入 Transformer 中。 Transformer 的 Multi-head attention 則是在 透過 self-attention 進行平行運算以獲得每個 詞的上下關係。Transformer 的架構如圖 1。 BERT 訓練分為兩個階段,分別為預訓練 (Pre-training) 及微調 (Fine-tuning)。預訓練 所使用的語料庫由 BooksCorpus (800M) 及英 文維基百科 (2,500M) (僅取文字內容部分) 所 擷取的詞所組成。預訓練共有兩個任務,分別 為 Masked LM (MLM) 及 Next Sentence Pre- diction (NSP)。MLM 任務藉由隨機遮蔽 15% 的詞 (替換為 [MASK] 標籤) 並進行 Mask 的 值預測;NSP 任務則是輸入兩個句子,藉由 [CLS] 標籤置於句首以識別進行分類,並在語 句之間放置 [SEP] 表示斷句以進行上下文的 預測。 MacBERT (Cui et al., 2021) 延伸自 BERT, …
Content truncated to 500 words
Labeled Text
AbstractThis study uses training and validation data from the “ROCLING 2022 Chinese Health Care Named Entity Recognition Task” for modeling. The modeling process adopts technologies such as data augmentation and data post-processing, and uses the MacBERT pre-training model to build a dedicated Chinese medical field NER recognizer. During the fine-tuning process, we also added adversarial training methods, such as FGM and PGD, and the results of the final tuned model were close to the best team for task evaluation. In addition, by introducing mixed-precision training, we also greatly reduce the time cost of training.
Publication Details
- Paper ID:
- 996
- Year:
- 2022
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan