第15章自然言語処理:事前学習
15.8.2. From Task-Specific to Task-Agnostic15.8.2 タスク固有からタスク非依存へ
Although ELMo has significantly improved solutions to a diverse set of natural language processing tasks, each solution still hinges on a task-specific architecture. However, it is practically non-trivial to craft a specific architecture for every natural language processing task. The GPT (Generative Pre-Training) model represents an effort in designing a general task-agnostic model for context-sensitive representations (Radford et al., 2018). Built on a Transformer decoder, GPT pretrains a language model that will be used to represent text sequences. When applying GPT to a downstream task, the output of the language model will be fed into an added linear output layer to predict the label of the task. In sharp contrast to ELMo that freezes parameters of the pretrained model, GPT fine-tunes all the parameters in the pretrained Transformer decoder during supervised learning of the downstream task. GPT was evaluated on twelve tasks of natural language inference, question answering, sentence similarity, and classification, and improved the state of the art in nine of them with minimal changes to the model architecture.
英語のヒント
ELMoはさまざまな自然言語処理のタスクの解法を大幅に改善したが、それぞれの解法はやはりタスク固有のアーキテクチャに頼っている。しかし、自然言語処理のタスクごとに専用のアーキテクチャを作り込むのは、実際には容易ではない。GPT(Generative Pre-Training、生成的事前学習)モデルは、文脈に依存する表現のための、タスクに依存しない汎用のモデルを設計する試みである(Radford et al., 2018)。Transformerのデコーダの上に作られたGPTは、テキストの系列を表すのに使う言語モデルを事前学習する。GPTを下流のタスクに当てはめるときは、言語モデルの出力を、追加した線形の出力層に入れて、タスクのラベルを予測する。事前学習したモデルのパラメータを凍結するELMoとはまったく対照的に、GPTは、下流のタスクの教師あり学習のあいだに、事前学習したTransformerのデコーダのすべてのパラメータを微調整する。GPTは、自然言語推論、質問応答、文の類似度、分類の12のタスクで評価され、モデルのアーキテクチャにわずかな変更を加えるだけで、そのうち九つで最先端を更新した。
However, due to the autoregressive nature of language models, GPT only looks forward (left-to-right). In contexts “i went to the bank to deposit cash” and “i went to the bank to sit down”, as “bank” is sensitive to the context to its left, GPT will return the same representation for “bank”, though it has different meanings.
英語のヒント
しかし、言語モデルの自己回帰的な性質のため、GPTは前方(左から右)しか見ない。「i went to the bank to deposit cash」(銀行に現金を預けに行った)と「i went to the bank to sit down」(土手に座りに行った)という文脈では、「bank」はその左側の文脈にしか反応しないので、GPTは、意味が異なるにもかかわらず、「bank」に同じ表現を返す。