プリンキピア

第15章自然言語処理:事前学習

15. Natural Language Processing: Pretraining15 自然言語処理:事前学習

Humans need to communicate. Out of this basic need of the human condition, a vast amount of written text has been generated on an everyday basis. Given rich text in social media, chat apps, emails, product reviews, news articles, research papers, and books, it becomes vital to enable computers to understand them to offer assistance or make decisions based on human languages.
英語のヒント
人間は意思を伝え合う必要がある。人間のありようのこの基本的な必要から、膨大な量の書かれたテキストが日々生み出されてきた。ソーシャルメディア、チャットアプリ、電子メール、製品のレビュー、ニュース記事、研究論文、書籍に豊かなテキストがある以上、人間の言語にもとづいて手助けをしたり判断を下したりするために、コンピュータがそれらを理解できるようにすることが欠かせなくなる。
Natural language processing studies interactions between computers and humans using natural languages. In practice, it is very common to use natural language processing techniques to process and analyze text (human natural language) data, such as language models in Section 9.3 and machine translation models in Section 10.5.
英語のヒント
自然言語処理は、自然言語を使ったコンピュータと人間のやりとりを研究する。実際には、9.3節の言語モデルや10.5節の機械翻訳モデルのように、自然言語処理の技法を使ってテキスト(人間の自然言語)のデータを処理し分析することはとてもよくある。
To understand text, we can begin by learning its representations. Leveraging the existing text sequences from large corpora, self-supervised learning has been extensively used to pretrain text representations, such as by predicting some hidden part of the text using some other part of their surrounding text. In this way, models learn through supervision from massive text data without expensive labeling efforts!
英語のヒント
テキストを理解するには、その表現を学習することから始められる。大規模なコーパスにある既存のテキストの系列を活用して、自己教師あり学習は、たとえばテキストの隠された部分を、その周りのテキストのほかの部分を使って予測するというやり方で、テキストの表現を事前学習するのに広く使われてきた。こうして、モデルは、費用のかかるラベルづけの手間なしに、膨大なテキストデータから得られる教師を通じて学習する!
As we will see in this chapter, when treating each word or subword as an individual token, the representation of each token can be pretrained using word2vec, GloVe, or subword embedding models on large corpora. After pretraining, representation of each token can be a vector, however, it remains the same no matter what the context is. For instance, the vector representation of “bank” is the same in both “go to the bank to deposit some money” and “go to the bank to sit down”. Thus, many more recent pretraining models adapt representation of the same token to different contexts. Among them is BERT, a much deeper self-supervised model based on the Transformer encoder. In this chapter, we will focus on how to pretrain such representations for text, as highlighted in Fig. 15.1.
英語のヒント
この章で見るように、各単語やサブワードを個別のトークンとして扱うとき、各トークンの表現は、大規模なコーパスの上でword2vec、GloVe、サブワード埋め込みのモデルを使って事前学習できる。事前学習の後、各トークンの表現はベクトルになりうるが、文脈が何であっても同じままである。たとえば、「bank」のベクトル表現は、「go to the bank to deposit some money」(銀行にお金を預けに行く)でも「go to the bank to sit down」(土手に座りに行く)でも同じである。そこで、もっと最近の多くの事前学習モデルは、同じトークンの表現を異なる文脈に合わせる。その中に、Transformerのエンコーダにもとづく、ずっと深い自己教師ありモデルであるBERTがある。この章では、図15.1で強調したように、テキストのそうした表現をどう事前学習するかに焦点を当てる。
Fig. 15.1図15.1
Pretrained text representations can be fed to various deep learning architectures for different downstream natural language processing applications. This chapter focuses on the upstream text representation pretraining.
英語のヒント
事前学習したテキストの表現は、さまざまな下流の自然言語処理の応用のために、多様な深層学習のアーキテクチャに入れることができる。この章では、上流のテキストの表現の事前学習に焦点を当てる。
For sight of the big picture, Fig. 15.1 shows that the pretrained text representations can be fed to a variety of deep learning architectures for different downstream natural language processing applications. We will cover them in Section 16.
英語のヒント
全体像を見渡すと、図15.1は、事前学習したテキストの表現が、さまざまな下流の自然言語処理の応用のために、多様な深層学習のアーキテクチャに入れられることを示している。それらは第16章で扱う。