掩蔽對抗式轉換器應用於語言理解

Adversarial Masking Transformers for Language Understanding

檔案

日期

2021

類型

語言

英文

摘要

深度學習在電腦視覺,自然語言處理和許多其他方面已經取得 了巨大的成功。基本上,基於深度神經網絡的學習表示可以處理高 維數據,並在輸入樣本和輸出目標之間進行複雜的映射,並且通常 可以很好地用於不同的分類和回歸任務。順序機器已經從長期短期 記憶(LSTM)發展到轉換器(Transformer)和雙向編碼轉換器 (BERT)。不同模型的快速發展使深度學習能夠為自然語言任務構 建許多實用模型。基本上,轉換器是一種基於注意力的編碼器-解碼 器網絡,在機器翻譯,文本摘要和其他自然語言任務中均達到了最 先進的性能。可以為語言模型實現 BERT,該模型可以在給定歷史單 詞的情況下估計下一個單詞的概率分佈。 BERT 的主要體系結構基 於轉換器編碼器。 BERT 的訓練分為兩個步驟:預訓練和微調。在 預訓練階段,以無監督學習的方式訓練模型。在微調階段,標記的 數據用於微調不同任務中的模型參數。由於預訓練需要大量的訓練 樣本和資源,因此大多數人都使用預訓練的模型進行微調。在預訓練階段,BERT 訓練有兩個技巧:掩蓋語言模型(MLM)和下一個句 子預測(NSP)。為了訓練 MSM,將句子中 15%的單詞隨機替換為特 殊單詞(也稱為遮罩單詞)。 BERT 受過訓練,可以預測被掩蓋的 單詞是什麼。 NSP 的技巧是訓練 BERT,以保留理解句子之間關係的 能力。訓練這種模型以確定隨後的句子是否是先前句子的下一個句 子。在微調階段,我們可以使用預先訓練的參數直接初始化模型, 然後使用標記的數據對模型進行微調。由於微調所需的參數數量有 限,因此計算成本比預訓練階段要少得多。這項研究涉及對自然語 言的理解,其中學習了一種深度機器來理解人類語言文本流的上下 文含義。提出了一種專門的轉換器,稱為對抗掩蔽轉換器。集成了 一個額外的屏蔽模塊以構建混合轉換器。掩蔽模型旨在掩蓋句子中 的重要信息。被屏蔽的句子用作到轉換器的輸入,在轉換器中,編 碼器和解碼器被用來預測被屏蔽的文本。值得注意的是,優化了對 抗學習目標,以引導混合轉換器的編碼器從其他未掩蓋的文本中學 習信息。因此,通過參加重要的課文,補償丟失的信息並提高模型 的健壯性,可以提高語言理解的能力。機器翻譯實驗證明了該方法 在語言理解和序列到序列學習中的優點。
Deep learning has been achieving great success in computer vision, natural language processing and many others. Basically, learning representation based on deep neural networks can handle high-dimensional data with complicated mapping between input samples and output targets and generally perform well for different classification and regression tasks. The sequential machines have been evolving from long short-term memory (LSTM) to transformers and bidirectional encoder representations from transformers (BERT). The rapid development of different models has enabled deep learning to build many practical models for natural language tasks. Basically, transformer is the attention-based encoder-decoder network which has achieved stateof-art performance in machine translation, text summarization and other natural language tasks. BERT can be realized for language model which estimates the probability distribution of next word given history words. Main architecture of BERT is based on the transformer encoder. BERT’s training is divided into two steps: pretraining and fine-tuning. In pre-training stage, the model is trained in an unsupervised learning manner. In fine-tuning stage, labeled data are used to fine-tune model parameters in different tasks,. Since pre-training requires a lot of training samples and resources, most people use the pre-trained models for fine-tuning. In the pre-training phase, BERT trains with two tricks: masked language model (MLM) and next sentence prediction (NSP). To train MSM, 15% of the words in the sentences are randomly replaced with the special word, also known as mask word. BERT is trained to predict what the masked word is. The NSP trick is to train BERT to preserve the capability of understanding the relationship between sentences. Such a model is trained to determine whether the following sentence is the next sentence of previous sentence. In fine-tuning stage, we can directly initialize model with the pre-trained parameters, and then finetune the model with labeled data. Since the number of parameters required for finetuning is limited, the computation cost is much less than that in pre-training stage. This study deals with natural language understanding where a deep machine is learned to comprehend contextual meanings of text streams from human languages. A specialized transformer, called the adversarial masking transformer, is proposed. An additional masking module is incorporated to build a hybrid transformer. Masking model aims to mask important information in a sentence. The masked sentence is used as the input to transformer where the encoder and decoder are employed to predict the masked text. Notably, an adversarial learning objective is optimized to guide the encoder of hybrid transformer to learn the information from the other unmasked texts. Accordingly, the capability of language understanding is improved by attending the important texts, compensating the missing information and increasing the model robustness. Experiments on machine translation show the merit of the proposed method for language understanding and sequence-to-sequence learning.

所屬典藏

電信工程研究所
顯示完整詮釋資料 統計資料

引用此條目

Lio, H. (2021). Adversarial Masking Transformers for Language Understanding. https://thesis.lib.nycu.edu.tw/handle/20.500.14371/76973

BibTeX RIS

引用文字依 APA 第 7 版格式自動產生,使用前請再核對。

分享

永久網址:https://thesis.lib.nycu.edu.tw/handle/20.500.14371/76973