第1章はじめに
1.3. Kinds of Machine Learning Problems1.3 機械学習の問題の種類
The wake word problem in our motivating example is just one among many that machine learning can tackle. To motivate the reader further and provide us with some common language that will follow us throughout the book, we now provide a broad overview of the landscape of machine learning problems.
英語のヒント
動機となる例の起動語の問題は、機械学習が取り組める多くの問題のうちの一つにすぎない。読者の意欲をさらにかき立て、本全体を通じてついて回る共通の言葉を手に入れるために、ここで機械学習の問題の全体像を広く概観しておく。
1.3.1. Supervised Learning1.3.1 教師あり学習
Supervised learning describes tasks where we are given a dataset containing both features and labels and asked to produce a model that predicts the labels when given input features. Each feature–label pair is called an example. Sometimes, when the context is clear, we may use the term examples to refer to a collection of inputs, even when the corresponding labels are unknown. The supervision comes into play because, for choosing the parameters, we (the supervisors) provide the model with a dataset consisting of labeled examples. In probabilistic terms, we typically are interested in estimating the conditional probability of a label given input features. While it is just one among several paradigms, supervised learning accounts for the majority of successful applications of machine learning in industry. Partly that is because many important tasks can be described crisply as estimating the probability of something unknown given a particular set of available data:
英語のヒント
教師あり学習とは、特徴量とラベルの両方を含むデータセットが与えられ、入力の特徴量が与えられたときにラベルを予測するモデルを作るよう求められる課題のことである。特徴量とラベルの各組を事例という。文脈が明らかなときには、対応するラベルがわからない場合でも、入力の集まりを指して事例という言葉を使うことがある。教師が関わってくるのは、パラメータを選ぶために、私たち(教師)がラベル付きの事例からなるデータセットをモデルに与えるからである。確率の言葉で言えば、普通は、入力の特徴量が与えられたときのラベルの条件付き確率を推定することに関心がある。教師あり学習はいくつかあるパラダイムの一つにすぎないが、産業における機械学習の成功した応用の大部分を占めている。その理由の一つは、多くの重要な課題が、利用できるデータの特定の集まりが与えられたときに、未知の何かの確率を推定することとして、すっきり記述できるからである。
- Predict cancer vs. not cancer, given a computer tomography image.
英語のヒント
コンピュータ断層撮影の画像が与えられたとき、がんか、がんでないかを予測する。 - Predict the correct translation in French, given a sentence in English.
英語のヒント
英語の文が与えられたとき、正しいフランス語の訳を予測する。 - Predict the price of a stock next month based on this month’s financial reporting data.
英語のヒント
今月の財務報告のデータにもとづいて、来月の株価を予測する。
While all supervised learning problems are captured by the simple description “predicting the labels given input features”, supervised learning itself can take diverse forms and require tons of modeling decisions, depending on (among other considerations) the type, size, and quantity of the inputs and outputs. For example, we use different models for processing sequences of arbitrary lengths and fixed-length vector representations. We will visit many of these problems in depth throughout this book.
英語のヒント
どの教師あり学習の問題も「入力の特徴量が与えられたときにラベルを予測する」という単純な記述でとらえられるが、教師あり学習そのものは、(ほかの考慮事項もあるなかで)入力と出力の型、大きさ、量に応じて、さまざまな形をとり、山ほどのモデル化の決定を必要としうる。たとえば、任意の長さの系列を処理する場合と、固定長のベクトル表現を処理する場合とでは、違うモデルを使う。この本を通じて、こうした問題の多くを深く扱う。
Informally, the learning process looks something like the following. First, grab a big collection of examples for which the features are known and select from them a random subset, acquiring the ground truth labels for each. Sometimes these labels might be available data that have already been collected (e.g., did a patient die within the following year?) and other times we might need to employ human annotators to label the data, (e.g., assigning images to categories). Together, these inputs and corresponding labels comprise the training set. We feed the training dataset into a supervised learning algorithm, a function that takes as input a dataset and outputs another function: the learned model. Finally, we can feed previously unseen inputs to the learned model, using its outputs as predictions of the corresponding label. The full process is drawn in Fig. 1.3.1.
英語のヒント
くだけた言い方をすれば、学習の過程はおおよそ次のようになる。まず、特徴量がわかっている事例の大きな集まりをつかみ、そこから無作為な部分集合を選び、それぞれについて正解のラベルを手に入れる。これらのラベルは、すでに集められている利用可能なデータのこともあれば(たとえば、患者が翌年のうちに死亡したか)、人間の注釈者を雇ってデータにラベルを付けてもらう必要があることもある(たとえば、画像をカテゴリーに割り振る)。こうした入力と対応するラベルが合わさって、訓練集合を構成する。訓練データセットを教師あり学習アルゴリズムに与える。これは、データセットを入力として受け取り、別の関数、つまり学習済みのモデルを出力する関数である。最後に、学習済みのモデルに未知の入力を与え、その出力を、対応するラベルの予測として使う。過程の全体を図1.3.1に描いた。
Fig. 1.3.1図1.3.1
Supervised learning.
英語のヒント
教師あり学習。
1.3.1.1. Regression1.3.1.1 回帰
Perhaps the simplest supervised learning task to wrap your head around is regression. Consider, for example, a set of data harvested from a database of home sales. We might construct a table, in which each row corresponds to a different house, and each column corresponds to some relevant attribute, such as the square footage of a house, the number of bedrooms, the number of bathrooms, and the number of minutes (walking) to the center of town. In this dataset, each example would be a specific house, and the corresponding feature vector would be one row in the table. If you live in New York or San Francisco, and you are not the CEO of Amazon, Google, Microsoft, or Facebook, the (sq. footage, no. of bedrooms, no. of bathrooms, walking distance) feature vector for your home might look something like: . However, if you live in Pittsburgh, it might look more like . Fixed-length feature vectors like this are essential for most classic machine learning algorithms.
英語のヒント
頭に入れやすい教師あり学習の課題として、おそらく最も単純なのは回帰である。たとえば、住宅販売のデータベースから集めたデータの集まりを考えよう。表を作り、各行が異なる家に、各列が関連する属性、たとえば家の床面積(平方フィート)、寝室の数、浴室の数、町の中心部まで(歩いて)何分かに対応するようにする。このデータセットでは、各事例は特定の一軒の家で、対応する特徴ベクトルは表の一行になる。ニューヨークやサンフランシスコに住んでいて、Amazon、Google、Microsoft、FacebookのCEOでないなら、あなたの家の(床面積、寝室の数、浴室の数、徒歩の距離)という特徴ベクトルは、のようになるかもしれない。しかしピッツバーグに住んでいるなら、むしろのようになるだろう。このような固定長の特徴ベクトルは、ほとんどの古典的な機械学習アルゴリズムに欠かせない。
What makes a problem a regression is actually the form of the target. Say that you are in the market for a new home. You might want to estimate the fair market value of a house, given some features such as above. The data here might consist of historical home listings and the labels might be the observed sales prices. When labels take on arbitrary numerical values (even within some interval), we call this a regression problem. The goal is to produce a model whose predictions closely approximate the actual label values.
英語のヒント
ある問題を回帰にするのは、実は目標値の形である。新しい家を探しているとしよう。上のような特徴量が与えられたとき、家の妥当な市場価格を見積もりたいかもしれない。この場合のデータは過去の住宅の売り出し情報からなり、ラベルは観測された販売価格になるだろう。ラベルが任意の数値をとる(ある区間のなかであっても)とき、これを回帰問題と呼ぶ。目標は、予測が実際のラベルの値をよく近似するモデルを作ることである。
Lots of practical problems are easily described as regression problems. Predicting the rating that a user will assign to a movie can be thought of as a regression problem and if you designed a great algorithm to accomplish this feat in 2009, you might have won the 1-million-dollar Netflix prize. Predicting the length of stay for patients in the hospital is also a regression problem. A good rule of thumb is that any how much? or how many? problem is likely to be regression. For example:
英語のヒント
実際の問題の多くは、回帰問題として簡単に記述できる。利用者が映画につける評価を予測することは回帰問題と考えられ、2009年にこれをやってのけるすばらしいアルゴリズムを設計していたら、賞金100万ドルのNetflix賞を勝ち取っていたかもしれない。病院の患者の在院日数を予測することも回帰問題である。よい目安は、「どれくらい?」や「いくつ?」という問題はどれも回帰である可能性が高い、というものである。たとえば次のとおり。
- How many hours will this surgery take?
英語のヒント
この手術は何時間かかるか。 - How much rainfall will this town have in the next six hours?
英語のヒント
この町の今後6時間の雨量はどれくらいか。
Even if you have never worked with machine learning before, you have probably worked through a regression problem informally. Imagine, for example, that you had your drains repaired and that your contractor spent 3 hours removing gunk from your sewage pipes. Then they sent you a bill of 350 dollars. Now imagine that your friend hired the same contractor for 2 hours and received a bill of 250 dollars. If someone then asked you how much to expect on their upcoming gunk-removal invoice you might make some reasonable assumptions, such as more hours worked costs more dollars. You might also assume that there is some base charge and that the contractor then charges per hour. If these assumptions held true, then given these two data examples, you could already identify the contractor’s pricing structure: 100 dollars per hour plus 50 dollars to show up at your house. If you followed that much, then you already understand the high-level idea behind linear regression.
英語のヒント
機械学習に一度も触れたことがなくても、おそらく回帰問題を非公式に解いたことはあるだろう。たとえば、排水管を修理してもらい、業者が下水管からヘドロを取り除くのに3時間かかったとしよう。そして350ドルの請求書が届いた。今度は、友人が同じ業者を2時間雇い、250ドルの請求書を受け取ったとしよう。誰かに、今度来るヘドロ除去の請求書はいくらくらいになると思うかと聞かれたら、たとえば、働いた時間が長いほど金額が高くなる、といった妥当な仮定を置くかもしれない。また、基本料金があり、そのうえで業者が時間あたりで料金を取る、と仮定するかもしれない。これらの仮定が正しいなら、この二つのデータの事例から、業者の料金体系はもうわかる。1時間あたり100ドルに、家に来てもらうための50ドルを足したものである。ここまでついてこられたなら、線形回帰の背後にある大まかな考え方はもう理解している。
In this case, we could produce the parameters that exactly matched the contractor’s prices. Sometimes this is not possible, e.g., if some of the variation arises from factors beyond your two features. In these cases, we will try to learn models that minimize the distance between our predictions and the observed values. In most of our chapters, we will focus on minimizing the squared error loss function. As we will see later, this loss corresponds to the assumption that our data were corrupted by Gaussian noise.
英語のヒント
この場合、業者の料金にぴったり一致するパラメータを求めることができた。いつもそうできるとは限らない。たとえば、ばらつきの一部が、二つの特徴量の外にある要因から生じる場合である。そうした場合は、予測と観測値との距離を最小にするモデルを学ぼうとする。ほとんどの章では、二乗誤差の損失関数を最小にすることに焦点を当てる。後で見るように、この損失は、データがガウスノイズで乱されているという仮定に対応する。
1.3.1.2. Classification1.3.1.2 分類
While regression models are great for addressing how many? questions, lots of problems do not fit comfortably in this template. Consider, for example, a bank that wants to develop a check scanning feature for its mobile app. Ideally, the customer would simply snap a photo of a check and the app would automatically recognize the text from the image. Assuming that we had some ability to segment out image patches corresponding to each handwritten character, then the primary remaining task would be to determine which character among some known set is depicted in each image patch. These kinds of which one? problems are called classification and require a different set of tools from those used for regression, although many techniques will carry over.
英語のヒント
回帰モデルは「いくつ?」という問いに答えるにはすばらしいが、この型にうまく収まらない問題もたくさんある。たとえば、モバイルアプリに小切手の読み取り機能を作りたい銀行を考えよう。理想的には、客が小切手の写真を撮るだけで、アプリが画像から文字を自動的に認識する。手書きの各文字に対応する画像の小片を切り出す能力がある程度あると仮定すれば、残る主な課題は、各小片に描かれているのが、既知の集合のなかのどの文字かを決めることになる。こうした「どれ?」という問題を分類といい、回帰に使う道具とは違う道具一式が必要になる。ただし、多くの技術はそのまま持ち越せる。
In classification, we want our model to look at features, e.g., the pixel values in an image, and then predict to which category (sometimes called a class) among some discrete set of options, an example belongs. For handwritten digits, we might have ten classes, corresponding to the digits 0 through 9. The simplest form of classification is when there are only two classes, a problem which we call binary classification. For example, our dataset could consist of images of animals and our labels might be the classes . Whereas in regression we sought a regressor to output a numerical value, in classification we seek a classifier, whose output is the predicted class assignment.
英語のヒント
分類では、モデルに特徴量、たとえば画像の画素値を見させ、そのうえで、ある事例が、離散的な選択肢の集合のうちどのカテゴリー(クラスと呼ぶこともある)に属するかを予測させたい。手書きの数字なら、0から9の数字に対応する10個のクラスがあるだろう。分類の最も単純な形は、クラスが二つしかない場合で、これを二値分類という。たとえば、データセットが動物の画像からなり、ラベルがクラスであることもある。回帰では数値を出力する回帰器を求めたのに対して、分類では、予測したクラスの割り当てを出力とする分類器を求める。
For reasons that we will get into as the book gets more technical, it can be difficult to optimize a model that can only output a firm categorical assignment, e.g., either “cat” or “dog”. In these cases, it is usually much easier to express our model in the language of probabilities. Given features of an example, our model assigns a probability to each possible class. Returning to our animal classification example where the classes are , a classifier might see an image and output the probability that the image is a cat as 0.9. We can interpret this number by saying that the classifier is 90% sure that the image depicts a cat. The magnitude of the probability for the predicted class conveys a notion of uncertainty. It is not the only one available and we will discuss others in chapters dealing with more advanced topics.
英語のヒント
本が技術的になるにつれて立ち入る理由から、「猫」か「犬」かのような、きっぱりとしたカテゴリーの割り当てしか出力できないモデルは、最適化しにくいことがある。そうした場合、モデルを確率の言葉で表すほうがたいていずっと簡単である。事例の特徴量が与えられると、モデルは可能な各クラスに確率を割り当てる。クラスがである動物の分類の例に戻ると、分類器はある画像を見て、その画像が猫である確率を0.9と出力するかもしれない。この数は、分類器がその画像に猫が写っていると90%確信している、と言って解釈できる。予測したクラスの確率の大きさは、不確かさの概念を伝えている。これだけが不確かさを表す方法ではなく、もっと発展的な話題を扱う章でほかの方法も論じる。
When we have more than two possible classes, we call the problem multiclass classification. Common examples include handwritten character recognition . While we attacked regression problems by trying to minimize the squared error loss function, the common loss function for classification problems is called cross-entropy, whose name will be demystified when we introduce information theory in later chapters.
英語のヒント
可能なクラスが三つ以上あるとき、その問題を多クラス分類という。よくある例は手書き文字の認識である。回帰問題には二乗誤差の損失関数を最小にしようとして取り組んだが、分類問題でよく使われる損失関数は交差エントロピーと呼ばれる。この名前の謎は、後の章で情報理論を紹介するときに解ける。
Note that the most likely class is not necessarily the one that you are going to use for your decision. Assume that you find a beautiful mushroom in your backyard as shown in Fig. 1.3.2.
英語のヒント
最も可能性の高いクラスが、決定に使うクラスだとは限らないことに注意してほしい。図1.3.2に示すような美しいキノコを裏庭で見つけたとしよう。

Fig. 1.3.2図1.3.2
Death cap - do not eat!
英語のヒント
タマゴテングタケ――食べるな!
Now, assume that you built a classifier and trained it to predict whether a mushroom is poisonous based on a photograph. Say our poison-detection classifier outputs that the probability that Fig. 1.3.2 shows a death cap is 0.2. In other words, the classifier is 80% sure that our mushroom is not a death cap. Still, you would have to be a fool to eat it. That is because the certain benefit of a delicious dinner is not worth a 20% risk of dying from it. In other words, the effect of the uncertain risk outweighs the benefit by far. Thus, in order to make a decision about whether to eat the mushroom, we need to compute the expected detriment associated with each action which depends both on the likely outcomes and the benefits or harms associated with each. In this case, the detriment incurred by eating the mushroom might be , whereas the loss of discarding it is . Our caution was justified: as any mycologist would tell us, the mushroom in Fig. 1.3.2 is actually a death cap.
英語のヒント
さて、分類器を作り、写真からキノコに毒があるかどうかを予測するよう訓練したとしよう。毒の検出器が、図1.3.2がタマゴテングタケである確率を0.2と出力したとする。言い換えれば、分類器は、このキノコがタマゴテングタケではないと80%確信している。それでも、これを食べるのは愚か者だけだろう。おいしい夕食という確実な利点は、それで死ぬ20%の危険に見合わないからである。言い換えれば、不確かな危険の影響が、利点をはるかに上回る。したがって、キノコを食べるかどうかを決めるには、各行動に伴う損害の期待値を計算する必要がある。それは、起こりそうな結果と、それぞれに伴う利点や害の両方に依存する。この場合、キノコを食べることで生じる損害はになりうるが、捨てる場合の損失はである。私たちの用心は正しかった。どのキノコ学者に聞いても、図1.3.2のキノコは実際にタマゴテングタケである。
Classification can get much more complicated than just binary or multiclass classification. For instance, there are some variants of classification addressing hierarchically structured classes. In such cases not all errors are equal—if we must err, we might prefer to misclassify to a related class rather than a distant class. Usually, this is referred to as hierarchical classification. For inspiration, you might think of Linnaeus, who organized fauna in a hierarchy.
英語のヒント
分類は、単なる二値分類や多クラス分類よりずっと複雑になりうる。たとえば、階層的な構造をもつクラスを扱う分類の変種がある。こうした場合、すべての誤りが同等なわけではない。誤らざるをえないなら、遠いクラスより関連するクラスに誤分類するほうがよいかもしれない。普通、これを階層的分類という。ひらめきを得るには、動物を階層に整理したリンネのことを思い浮かべるとよいかもしれない。
In the case of animal classification, it might not be so bad to mistake a poodle for a schnauzer, but our model would pay a huge penalty if it confused a poodle with a dinosaur. Which hierarchy is relevant might depend on how you plan to use the model. For example, rattlesnakes and garter snakes might be close on the phylogenetic tree, but mistaking a rattler for a garter could have fatal consequences.
英語のヒント
動物の分類の場合、プードルをシュナウザーと取り違えるのはそれほど悪くないかもしれないが、プードルを恐竜と混同したら、モデルは大きな罰を受けることになる。どの階層が関係するかは、モデルをどう使うつもりかによるかもしれない。たとえば、ガラガラヘビとガーターヘビは系統樹の上では近いかもしれないが、ガラガラヘビをガーターヘビと取り違えれば、命にかかわる結果になりうる。
1.3.1.3. Tagging1.3.1.3 タグ付け
Some classification problems fit neatly into the binary or multiclass classification setups. For example, we could train a normal binary classifier to distinguish cats from dogs. Given the current state of computer vision, we can do this easily, with off-the-shelf tools. Nonetheless, no matter how accurate our model gets, we might find ourselves in trouble when the classifier encounters an image of the Town Musicians of Bremen, a popular German fairy tale featuring four animals (Fig. 1.3.3).
英語のヒント
分類問題のなかには、二値分類や多クラス分類の設定にすっきり収まるものもある。たとえば、猫と犬を見分ける普通の二値分類器を訓練できる。今のコンピュータビジョンの状況なら、既製の道具で簡単にできる。それでも、モデルがどれほど正確になっても、ドイツの人気の童話で四匹の動物が登場する「ブレーメンの音楽隊」の画像に分類器が出会うと、困ったことになるかもしれない(図1.3.3)。

Fig. 1.3.3図1.3.3
A donkey, a dog, a cat, and a rooster.
英語のヒント
ロバ、イヌ、ネコ、オンドリ。
As you can see, the photo features a cat, a rooster, a dog, and a donkey, with some trees in the background. If we anticipate encountering such images, multiclass classification might not be the right problem formulation. Instead, we might want to give the model the option of saying the image depicts a cat, a dog, a donkey, and a rooster.
英語のヒント
ごらんのとおり、この写真には猫、オンドリ、犬、ロバが写っていて、背景に何本かの木がある。こうした画像に出会うことが予想されるなら、多クラス分類は正しい問題の定式化ではないかもしれない。代わりに、その画像に猫、犬、ロバ、オンドリが写っていると言える選択肢をモデルに与えたいだろう。
The problem of learning to predict classes that are not mutually exclusive is called multi-label classification. Auto-tagging problems are typically best described in terms of multi-label classification. Think of the tags people might apply to posts on a technical blog, e.g., “machine learning”, “technology”, “gadgets”, “programming languages”, “Linux”, “cloud computing”, “AWS”. A typical article might have 5–10 tags applied. Typically, tags will exhibit some correlation structure. Posts about “cloud computing” are likely to mention “AWS” and posts about “machine learning” are likely to mention “GPUs”.
英語のヒント
互いに排他的でないクラスを予測するよう学習する問題を、マルチラベル分類という。自動タグ付けの問題は、普通、マルチラベル分類の言葉で記述するのが最もよい。技術ブログの記事に人々が付けるタグ、たとえば「機械学習」「テクノロジー」「ガジェット」「プログラミング言語」「Linux」「クラウドコンピューティング」「AWS」を考えてみよう。典型的な記事には5〜10個のタグが付く。普通、タグには何らかの相関構造がある。「クラウドコンピューティング」についての記事は「AWS」に触れる可能性が高く、「機械学習」についての記事は「GPU」に触れる可能性が高い。
Sometimes such tagging problems draw on enormous label sets. The National Library of Medicine employs many professional annotators who associate each article to be indexed in PubMed with a set of tags drawn from the Medical Subject Headings (MeSH) ontology, a collection of roughly 28,000 tags. Correctly tagging articles is important because it allows researchers to conduct exhaustive reviews of the literature. This is a time-consuming process and typically there is a one-year lag between archiving and tagging. Machine learning can provide provisional tags until each article has a proper manual review. Indeed, for several years, the BioASQ organization has hosted competitions for this task.
英語のヒント
こうしたタグ付けの問題では、膨大なラベルの集合が使われることがある。米国国立医学図書館は多くの専門の注釈者を雇い、PubMedに索引付けする各論文を、医学件名標目表(MeSH)というオントロジー、およそ28,000個のタグの集まりから選んだタグの組に結びつけている。論文に正しくタグを付けることが重要なのは、研究者が文献を網羅的に調べられるようになるからである。これは時間のかかる過程で、普通、収録からタグ付けまで1年の遅れがある。機械学習は、各論文がきちんと人手で審査されるまでの暫定的なタグを提供できる。実際、BioASQという組織が、何年にもわたってこの課題の競技会を開いてきた。
1.3.1.4. Search1.3.1.4 検索
In the field of information retrieval, we often impose ranks on sets of items. Take web search for example. The goal is less to determine whether a particular page is relevant for a query, but rather which, among a set of relevant results, should be shown most prominently to a particular user. One way of doing this might be to first assign a score to every element in the set and then to retrieve the top-rated elements. PageRank, the original secret sauce behind the Google search engine, was an early example of such a scoring system. Weirdly, the scoring provided by PageRank did not depend on the actual query. Instead, they relied on a simple relevance filter to identify the set of relevant candidates and then used PageRank to prioritize the more authoritative pages. Nowadays, search engines use machine learning and behavioral models to obtain query-dependent relevance scores. There are entire academic conferences devoted to this subject.
英語のヒント
情報検索の分野では、項目の集合に順位をつけることが多い。Web検索を例にとろう。目標は、ある特定のページが検索語に関係するかどうかを決めることよりも、関係する結果の集合のうち、どれを特定の利用者に最も目立つように示すべきかを決めることにある。そのための一つの方法は、まず集合の各要素に得点を割り当て、それから最高得点の要素を取り出すことかもしれない。Google検索エンジンの元祖の秘伝のたれであるPageRankは、こうした採点の仕組みの初期の例だった。奇妙なことに、PageRankによる採点は実際の検索語に依存しなかった。代わりに、単純な関連性のフィルタで関連する候補の集合を特定し、それからPageRankを使って、より権威のあるページを優先した。今日の検索エンジンは、機械学習と行動モデルを使って、検索語に依存する関連性の得点を求めている。この主題だけを扱う学術会議がいくつもある。
1.3.1.5. Recommender Systems1.3.1.5 推薦システム
Recommender systems are another problem setting that is related to search and ranking. The problems are similar insofar as the goal is to display a set of items relevant to the user. The main difference is the emphasis on personalization to specific users in the context of recommender systems. For instance, for movie recommendations, the results page for a science fiction fan and the results page for a connoisseur of Peter Sellers comedies might differ significantly. Similar problems pop up in other recommendation settings, e.g., for retail products, music, and news recommendation.
英語のヒント
推薦システムは、検索や順位付けに関係するもう一つの問題設定である。利用者に関係する項目の集合を表示することが目標であるという点で、これらの問題は似ている。主な違いは、推薦システムの文脈では、特定の利用者に合わせた個人化が重視される点にある。たとえば映画の推薦では、SFファンへの結果のページと、ピーター・セラーズの喜劇の通への結果のページとは大きく異なるかもしれない。同様の問題は、小売商品、音楽、ニュースの推薦など、ほかの推薦の設定でも現れる。
In some cases, customers provide explicit feedback, communicating how much they liked a particular product (e.g., the product ratings and reviews on Amazon, IMDb, or Goodreads). In other cases, they provide implicit feedback, e.g., by skipping titles on a playlist, which might indicate dissatisfaction or maybe just indicate that the song was inappropriate in context. In the simplest formulations, these systems are trained to estimate some score, such as an expected star rating or the probability that a given user will purchase a particular item.
英語のヒント
客がはっきりしたフィードバックを返し、ある商品をどれほど気に入ったかを伝えてくれる場合もある(たとえば、Amazon、IMDb、Goodreadsでの商品の評価やレビュー)。暗黙のフィードバックを返す場合もある。たとえばプレイリストの曲を飛ばすことは、不満を示しているかもしれないし、単にその曲がその場にふさわしくなかったことを示しているだけかもしれない。最も単純な定式化では、こうしたシステムは、期待される星の数や、ある利用者がある商品を購入する確率といった、何らかの得点を推定するよう訓練される。
Given such a model, for any given user, we could retrieve the set of objects with the largest scores, which could then be recommended to the user. Production systems are considerably more advanced and take detailed user activity and item characteristics into account when computing such scores. Fig. 1.3.4 displays the deep learning books recommended by Amazon based on personalization algorithms tuned to capture Aston’s preferences.
英語のヒント
そうしたモデルがあれば、どの利用者についても、得点が最も高いものの集合を取り出し、それを利用者に推薦できる。実際に稼働しているシステムはかなり高度で、こうした得点を計算するときに、利用者の詳しい行動や商品の特徴を考慮に入れる。図1.3.4は、Astonの好みをとらえるよう調整された個人化アルゴリズムにもとづいて、Amazonが推薦した深層学習の本を示している。
Image omitted because its reuse rights could not be verified.権利の確認ができないため画像を割愛。
Fig. 1.3.4図1.3.4
Deep learning books recommended by Amazon.
英語のヒント
Amazonが推薦した深層学習の本。
Despite their tremendous economic value, recommender systems naively built on top of predictive models suffer some serious conceptual flaws. To start, we only observe censored feedback: users preferentially rate movies that they feel strongly about. For example, on a five-point scale, you might notice that items receive many one- and five-star ratings but that there are conspicuously few three-star ratings. Moreover, current purchase habits are often a result of the recommendation algorithm currently in place, but learning algorithms do not always take this detail into account. Thus it is possible for feedback loops to form where a recommender system preferentially pushes an item that is then taken to be better (due to greater purchases) and in turn is recommended even more frequently. Many of these problems—about how to deal with censoring, incentives, and feedback loops—are important open research questions.
英語のヒント
経済的な価値はとてつもなく大きいが、予測モデルの上に素朴に作られた推薦システムには、深刻な概念上の欠陥がある。まず、私たちが観測するのは打ち切られたフィードバックだけである。利用者は、強い気持ちを抱いた映画を優先して評価する。たとえば5段階の評価では、星1つと星5つの評価は多いのに、星3つの評価は目立って少ないことに気づくかもしれない。さらに、今の購買習慣は、今動いている推薦アルゴリズムの結果であることが多いのに、学習アルゴリズムはこの細かな点をいつも考慮に入れるとは限らない。そのため、フィードバックのループが形成されることがある。推薦システムがある商品を優先して押し出すと、その商品は(購入が増えたせいで)よりよいものとみなされ、今度はいっそう頻繁に推薦される。打ち切り、誘因、フィードバックのループをどう扱うかというこうした問題の多くは、重要な未解決の研究課題である。
1.3.1.6. Sequence Learning1.3.1.6 系列学習
So far, we have looked at problems where we have some fixed number of inputs and produce a fixed number of outputs. For example, we considered predicting house prices given a fixed set of features: square footage, number of bedrooms, number of bathrooms, and the transit time to downtown. We also discussed mapping from an image (of fixed dimension) to the predicted probabilities that it belongs to each among a fixed number of classes and predicting star ratings associated with purchases based on the user ID and product ID alone. In these cases, once our model is trained, after each test example is fed into our model, it is immediately forgotten. We assumed that successive observations were independent and thus there was no need to hold on to this context.
英語のヒント
ここまでは、決まった数の入力があり、決まった数の出力を出す問題を見てきた。たとえば、床面積、寝室の数、浴室の数、中心街までの移動時間という決まった特徴量の組から住宅価格を予測することを考えた。また、(決まった次元の)画像から、それが決まった数のクラスのそれぞれに属する予測確率への写像や、利用者のIDと商品のIDだけにもとづいて購入に伴う星の数を予測することも論じた。これらの場合、モデルをいったん訓練すれば、各テスト事例がモデルに与えられた後、その事例はすぐに忘れられる。連続する観測は互いに独立だと仮定していたので、この文脈を保持しておく必要はなかった。
But how should we deal with video snippets? In this case, each snippet might consist of a different number of frames. And our guess of what is going on in each frame might be much stronger if we take into account the previous or succeeding frames. The same goes for language. For example, one popular deep learning problem is machine translation: the task of ingesting sentences in some source language and predicting their translations in another language.
英語のヒント
では、動画の断片はどう扱えばよいだろうか。この場合、断片ごとにフレームの数が違うかもしれない。そして、各フレームで何が起きているかの推測は、前後のフレームを考慮に入れれば、ずっと強力になるかもしれない。言語についても同じことが言える。たとえば、よく知られた深層学習の問題に機械翻訳がある。ある元の言語の文を取り込み、別の言語への訳を予測する課題である。
Such problems also occur in medicine. We might want a model to monitor patients in the intensive care unit and to fire off alerts whenever their risk of dying in the next 24 hours exceeds some threshold. Here, we would not throw away everything that we know about the patient history every hour, because we might not want to make predictions based only on the most recent measurements.
英語のヒント
このような問題は医療にも現れる。集中治療室の患者を監視し、今後24時間に死亡する危険がある閾値を超えたらいつでも警報を出すモデルがほしいかもしれない。この場合、毎時間、患者の経過について知っていることをすべて捨ててしまうことはしないだろう。最新の測定値だけにもとづいて予測をしたくはないかもしれないからである。
Questions like these are among the most exciting applications of machine learning and they are instances of sequence learning. They require a model either to ingest sequences of inputs or to emit sequences of outputs (or both). Specifically, sequence-to-sequence learning considers problems where both inputs and outputs consist of variable-length sequences. Examples include machine translation and speech-to-text transcription. While it is impossible to consider all types of sequence transformations, the following special cases are worth mentioning.
英語のヒント
このような問いは、機械学習の最も刺激的な応用の一つであり、系列学習の例である。系列学習では、モデルが入力の系列を取り込むか、出力の系列を出すか(あるいはその両方)が求められる。具体的には、系列から系列への学習は、入力と出力がどちらも可変長の系列からなる問題を扱う。例には、機械翻訳や、音声から文字への書き起こしがある。系列の変換のすべての種類を考えることはできないが、次の特別な場合は触れておく価値がある。
Tagging and Parsing. This involves annotating a text sequence with attributes. Here, the inputs and outputs are aligned, i.e., they are of the same number and occur in a corresponding order. For instance, in part-of-speech (PoS) tagging, we annotate every word in a sentence with the corresponding part of speech, i.e., “noun” or “direct object”. Alternatively, we might want to know which groups of contiguous words refer to named entities, like people, places, or organizations. In the cartoonishly simple example below, we might just want to indicate whether or not any word in the sentence is part of a named entity (tagged as “Ent”).
英語のヒント
タグ付けと構文解析。これは、文章の系列に属性の注釈を付けることを含む。ここでは入力と出力がそろっている。つまり、同じ数で、対応する順序で現れる。たとえば品詞(PoS)タグ付けでは、文の各単語に、「名詞」や「直接目的語」といった対応する品詞の注釈を付ける。あるいは、連続する単語のどのまとまりが、人、場所、組織のような固有表現を指すのかを知りたいかもしれない。下の漫画のように単純な例では、文中の各単語が固有表現の一部かどうか(「Ent」というタグを付ける)を示したいだけかもしれない。
Tom has dinner in Washington with Sally
Ent - - - Ent - EntAutomatic Speech Recognition. With speech recognition, the input sequence is an audio recording of a speaker (Fig. 1.3.5), and the output is a transcript of what the speaker said. The challenge is that there are many more audio frames (sound is typically sampled at 8kHz or 16kHz) than text, i.e., there is no 1:1 correspondence between audio and text, since thousands of samples may correspond to a single spoken word. These are sequence-to-sequence learning problems, where the output is much shorter than the input. While humans are remarkably good at recognizing speech, even from low-quality audio, getting computers to perform the same feat is a formidable challenge.
英語のヒント
自動音声認識。音声認識では、入力の系列は話者の音声の録音で(図1.3.5)、出力は話者が言ったことの書き起こしである。難しいのは、音声のフレームが文字よりずっと多いことである(音は普通、8kHzか16kHzでサンプリングされる)。つまり、音声と文字のあいだに1対1の対応がない。何千ものサンプルが一つの話し言葉の単語に対応することがあるからである。これらは系列から系列への学習問題で、出力が入力よりずっと短い。人間は、質の悪い音声からでさえ驚くほどうまく話し言葉を認識するが、コンピュータに同じ技をさせるのは手ごわい課題である。

Fig. 1.3.5図1.3.5
-D-e-e-p- L-ea-r-ni-ng- in an audio recording.英語のヒント
音声の録音のなかの
-D-e-e-p- L-ea-r-ni-ng-。Text to Speech. This is the inverse of automatic speech recognition. Here, the input is text and the output is an audio file. In this case, the output is much longer than the input.
英語のヒント
音声合成。これは自動音声認識の逆である。ここでは入力が文字で、出力が音声ファイルである。この場合、出力は入力よりずっと長い。
Machine Translation. Unlike the case of speech recognition, where corresponding inputs and outputs occur in the same order, in machine translation, unaligned data poses a new challenge. Here the input and output sequences can have different lengths, and the corresponding regions of the respective sequences may appear in a different order. Consider the following illustrative example of the peculiar tendency of Germans to place the verbs at the end of sentences:
英語のヒント
機械翻訳。対応する入力と出力が同じ順序で現れる音声認識の場合と違い、機械翻訳では、そろっていないデータが新たな課題となる。ここでは入力と出力の系列の長さが異なりうるし、それぞれの系列の対応する部分が違う順序で現れることもある。動詞を文末に置くというドイツ語の独特な傾向について、次のような例で考えてみよう。
German: Haben Sie sich schon dieses grossartige Lehrwerk angeschaut?
English: Have you already looked at this excellent textbook?
Wrong alignment: Have you yourself already this excellent textbook looked at?Many related problems pop up in other learning tasks. For instance, determining the order in which a user reads a webpage is a two-dimensional layout analysis problem. Dialogue problems exhibit all kinds of additional complications, where determining what to say next requires taking into account real-world knowledge and the prior state of the conversation across long temporal distances. Such topics are active areas of research.
英語のヒント
関連する問題は、ほかの学習課題にもたくさん現れる。たとえば、利用者がWebページをどんな順番で読むかを決めるのは、2次元のレイアウト解析の問題である。対話の問題には、あらゆる種類の追加の面倒がある。次に何を言うかを決めるには、現実世界の知識と、長い時間の隔たりにわたる会話のそれまでの状態を考慮に入れる必要がある。こうした話題は活発な研究分野である。
1.3.2. Unsupervised and Self-Supervised Learning1.3.2 教師なし学習と自己教師あり学習
The previous examples focused on supervised learning, where we feed the model a giant dataset containing both the features and corresponding label values. You could think of the supervised learner as having an extremely specialized job and an extremely dictatorial boss. The boss stands over the learner’s shoulder and tells them exactly what to do in every situation until they learn to map from situations to actions. Working for such a boss sounds pretty lame. On the other hand, pleasing such a boss is pretty easy. You just recognize the pattern as quickly as possible and imitate the boss’s actions.
英語のヒント
ここまでの例は教師あり学習に焦点を当てていた。そこでは、特徴量と対応するラベルの値の両方を含む巨大なデータセットをモデルに与える。教師あり学習者は、極めて専門的な仕事と、極めて独裁的な上司を抱えていると考えることができる。上司は学習者の肩越しに立ち、状況から行動への対応を学習者が覚えるまで、あらゆる状況で何をすべきかを正確に指示する。そんな上司の下で働くのはかなりつまらなそうである。一方で、そんな上司を喜ばせるのはかなり簡単である。できるだけ早くパターンを見抜き、上司の行動をまねればよい。
Considering the opposite situation, it could be frustrating to work for a boss who has no idea what they want you to do. However, if you plan to be a data scientist, you had better get used to it. The boss might just hand you a giant dump of data and tell you to do some data science with it! This sounds vague because it is vague. We call this class of problems unsupervised learning, and the type and number of questions we can ask is limited only by our creativity. We will address unsupervised learning techniques in later chapters. To whet your appetite for now, we describe a few of the following questions you might ask.
英語のヒント
逆の状況を考えると、自分に何をしてほしいのかまるでわかっていない上司の下で働くのは、いらいらするかもしれない。しかし、データサイエンティストになるつもりなら、それに慣れておいたほうがよい。上司は巨大なデータの山を渡して、それで何かデータサイエンスをしろと言うだけかもしれない。あいまいに聞こえるのは、あいまいだからである。この種の問題を教師なし学習と呼び、立てられる問いの種類と数を制限するのは私たちの創造性だけである。教師なし学習の技術は後の章で扱う。今は興味をそそるために、問うことのできる問いをいくつか次に示す。
- Can we find a small number of prototypes that accurately summarize the data? Given a set of photos, can we group them into landscape photos, pictures of dogs, babies, cats, and mountain peaks? Likewise, given a collection of users’ browsing activities, can we group them into users with similar behavior? This problem is typically known as clustering.
英語のヒント
データをうまく要約する、少数の典型例を見つけられるか。写真の集合が与えられたとき、それを風景写真、犬、赤ちゃん、猫、山頂の写真にまとめられるか。同様に、利用者の閲覧行動の集まりが与えられたとき、利用者を似た行動をとるグループにまとめられるか。この問題は普通、クラスタリングとして知られている。 - Can we find a small number of parameters that accurately capture the relevant properties of the data? The trajectories of a ball are well described by velocity, diameter, and mass of the ball. Tailors have developed a small number of parameters that describe human body shape fairly accurately for the purpose of fitting clothes. These problems are referred to as subspace estimation. If the dependence is linear, it is called principal component analysis.
英語のヒント
データの関係する性質をうまくとらえる、少数のパラメータを見つけられるか。ボールの軌道は、ボールの速度、直径、質量でよく記述される。仕立て屋は、服を体に合わせる目的で、人の体形をかなり正確に記述する少数のパラメータを編み出してきた。こうした問題を部分空間の推定という。依存関係が線形なら、主成分分析と呼ばれる。 - Is there a representation of (arbitrarily structured) objects in Euclidean space such that symbolic properties can be well matched? This can be used to describe entities and their relations, such as “Rome” “Italy” “France” “Paris”.
英語のヒント
(任意の構造をもつ)対象を、記号的な性質がうまく合うようにユークリッド空間で表現できるか。これは、実体とその関係を記述するのに使える。たとえば「ローマ」「イタリア」「フランス」「パリ」のように。 - Is there a description of the root causes of much of the data that we observe? For instance, if we have demographic data about house prices, pollution, crime, location, education, and salaries, can we discover how they are related simply based on empirical data? The fields concerned with causality and probabilistic graphical models tackle such questions.
英語のヒント
観測するデータの多くについて、根本の原因の記述はあるか。たとえば、住宅価格、汚染、犯罪、立地、教育、給与についての人口統計のデータがあるとき、それらがどう関係しているかを、経験的なデータだけから見いだせるか。因果関係や確率的グラフィカルモデルを扱う分野が、こうした問いに取り組んでいる。 - Another important and exciting recent development in unsupervised learning is the advent of deep generative models. These models estimate the density of the data, either explicitly or implicitly. Once trained, we can use a generative model either to score examples according to how likely they are, or to sample synthetic examples from the learned distribution. Early deep learning breakthroughs in generative modeling came with the invention of variational autoencoders (Kingma and Welling, 2014, Rezende et al., 2014) and continued with the development of generative adversarial networks (Goodfellow et al., 2014). More recent advances include normalizing flows (Dinh et al., 2014, Dinh et al., 2017) and diffusion models (Ho et al., 2020, Sohl-Dickstein et al., 2015, Song and Ermon, 2019, Song et al., 2021).
英語のヒント
教師なし学習でのもう一つの重要で刺激的な最近の発展は、深層生成モデルの登場である。これらのモデルは、明示的にであれ暗黙的にであれ、データの密度を推定する。訓練すれば、生成モデルを使って、事例をどれほどありそうかに応じて採点したり、学習した分布から合成の事例をサンプリングしたりできる。生成モデリングにおける深層学習の初期の躍進は、変分オートエンコーダの発明(Kingma and Welling, 2014、Rezende et al., 2014)とともに訪れ、敵対的生成ネットワークの開発(Goodfellow et al., 2014)へと続いた。より最近の進歩には、正規化フロー(Dinh et al., 2014、Dinh et al., 2017)や拡散モデル(Ho et al., 2020、Sohl-Dickstein et al., 2015、Song and Ermon, 2019、Song et al., 2021)がある。
A further development in unsupervised learning has been the rise of self-supervised learning, techniques that leverage some aspect of the unlabeled data to provide supervision. For text, we can train models to “fill in the blanks” by predicting randomly masked words using their surrounding words (contexts) in big corpora without any labeling effort (Devlin et al., 2018)! For images, we may train models to tell the relative position between two cropped regions of the same image (Doersch et al., 2015), to predict an occluded part of an image based on the remaining portions of the image, or to predict whether two examples are perturbed versions of the same underlying image. Self-supervised models often learn representations that are subsequently leveraged by fine-tuning the resulting models on some downstream task of interest.
英語のヒント
教師なし学習のさらなる発展として、自己教師あり学習が台頭してきた。これは、ラベルのないデータのある側面を利用して教師信号を与える技術である。文章なら、ラベル付けの手間をまったくかけずに、大規模なコーパスで、無作為に隠した単語をその周りの単語(文脈)から予測することで「空欄を埋める」ようにモデルを訓練できる(Devlin et al., 2018)。画像なら、同じ画像から切り出した二つの領域の相対的な位置を言い当てるように(Doersch et al., 2015)、画像の隠された部分を残りの部分から予測するように、あるいは二つの事例が同じ元の画像を乱したものかどうかを予測するように、モデルを訓練できる。自己教師ありモデルは、表現を学ぶことが多く、その表現は後で、得られたモデルを関心のある下流の課題でファインチューニングすることで活用される。
1.3.3. Interacting with an Environment1.3.3 環境とのやり取り
So far, we have not discussed where data actually comes from, or what actually happens when a machine learning model generates an output. That is because supervised learning and unsupervised learning do not address these issues in a very sophisticated way. In each case, we grab a big pile of data upfront, then set our pattern recognition machines in motion without ever interacting with the environment again. Because all the learning takes place after the algorithm is disconnected from the environment, this is sometimes called offline learning. For example, supervised learning assumes the simple interaction pattern depicted in Fig. 1.3.6.
英語のヒント
ここまで、データが実際にどこから来るのか、あるいは機械学習モデルが出力を生成したときに実際に何が起きるのかは論じてこなかった。それは、教師あり学習も教師なし学習も、こうした問題をあまり洗練された形では扱わないからである。どちらの場合も、最初に大きなデータの山をつかみ、それからパターン認識の機械を動かし始め、その後は二度と環境とやり取りしない。学習はすべて、アルゴリズムが環境から切り離された後で行われるので、これをオフライン学習と呼ぶこともある。たとえば教師あり学習は、図1.3.6に描いた単純なやり取りのパターンを仮定している。
Fig. 1.3.6図1.3.6
Collecting data for supervised learning from an environment.
英語のヒント
環境から教師あり学習のためのデータを集める。
This simplicity of offline learning has its charms. The upside is that we can worry about pattern recognition in isolation, with no concern about complications arising from interactions with a dynamic environment. But this problem formulation is limiting. If you grew up reading Asimov’s Robot novels, then you probably picture artificially intelligent agents capable not only of making predictions, but also of taking actions in the world. We want to think about intelligent agents, not just predictive models. This means that we need to think about choosing actions, not just making predictions. In contrast to mere predictions, actions actually impact the environment. If we want to train an intelligent agent, we must account for the way its actions might impact the future observations of the agent, and so offline learning is inappropriate.
英語のヒント
オフライン学習の単純さには魅力がある。利点は、動的な環境とのやり取りから生じる面倒を気にせずに、パターン認識だけを切り離して考えられることである。しかし、この問題の定式化には限界がある。アシモフのロボットものの小説を読んで育ったなら、予測をするだけでなく、世界で行動もとれる人工知能のエージェントを思い描くだろう。私たちが考えたいのは、単なる予測モデルではなく、知的なエージェントである。つまり、予測をするだけでなく、行動を選ぶことを考える必要がある。単なる予測と違い、行動は実際に環境に影響を与える。知的なエージェントを訓練したいなら、その行動がエージェントの将来の観測にどう影響しうるかを考慮しなければならないので、オフライン学習は不適切である。
Considering the interaction with an environment opens a whole set of new modeling questions. The following are just a few examples.
英語のヒント
環境とのやり取りを考えると、新しいモデル化の問いが一気に開ける。次はそのほんの数例である。
- Does the environment remember what we did previously?
英語のヒント
環境は、私たちが前にしたことを覚えているか。 - Does the environment want to help us, e.g., a user reading text into a speech recognizer?
英語のヒント
環境は私たちを助けたがっているか。たとえば、音声認識器に向かって文章を読み上げる利用者のように。 - Does the environment want to beat us, e.g., spammers adapting their emails to evade spam filters?
英語のヒント
環境は私たちを打ち負かしたがっているか。たとえば、スパムフィルタを逃れるようにメールを変えてくるスパム送信者のように。 - Does the environment have shifting dynamics? For example, would future data always resemble the past or would the patterns change over time, either naturally or in response to our automated tools?
英語のヒント
環境の動き方は変化するか。たとえば、将来のデータはいつも過去に似ているのか、それともパターンは、自然に、あるいは私たちの自動化された道具への反応として、時とともに変わるのか。
These questions raise the problem of distribution shift, where training and test data are different. An example of this, that many of us may have met, is when taking exams written by a lecturer, while the homework was composed by their teaching assistants. Next, we briefly describe reinforcement learning, a rich framework for posing learning problems in which an agent interacts with an environment.
英語のヒント
これらの問いは、訓練データとテストデータが異なるという、分布シフトの問題を提起する。私たちの多くが出会ったことのあるその例として、宿題はティーチングアシスタントが作ったのに、講師が作った試験を受けるという場合がある。次に、エージェントが環境とやり取りする学習問題を立てるための豊かな枠組みである、強化学習を簡単に説明する。
1.3.4. Reinforcement Learning1.3.4 強化学習
If you are interested in using machine learning to develop an agent that interacts with an environment and takes actions, then you are probably going to wind up focusing on reinforcement learning. This might include applications to robotics, to dialogue systems, and even to developing artificial intelligence (AI) for video games. Deep reinforcement learning, which applies deep learning to reinforcement learning problems, has surged in popularity. The breakthrough deep Q-network, that beat humans at Atari games using only the visual input (Mnih et al., 2015), and the AlphaGo program, which dethroned the world champion at the board game Go (Silver et al., 2016), are two prominent examples.
英語のヒント
機械学習を使って、環境とやり取りし行動をとるエージェントを開発することに関心があるなら、おそらく強化学習に行き着くことになる。これには、ロボット工学や対話システムへの応用、さらにはビデオゲームの人工知能(AI)の開発さえ含まれるかもしれない。深層学習を強化学習の問題に応用する深層強化学習は、人気が急上昇している。画像の入力だけを使ってアタリのゲームで人間に勝った画期的な深層Qネットワーク(Mnih et al., 2015)や、ボードゲームの囲碁で世界王者を倒したAlphaGoのプログラム(Silver et al., 2016)が、その二つの著名な例である。
Reinforcement learning gives a very general statement of a problem in which an agent interacts with an environment over a series of time steps. At each time step, the agent receives some observation from the environment and must choose an action that is subsequently transmitted back to the environment via some mechanism (sometimes called an actuator), when, after each loop, the agent receives a reward from the environment. This process is illustrated in Fig. 1.3.7. The agent then receives a subsequent observation, and chooses a subsequent action, and so on. The behavior of a reinforcement learning agent is governed by a policy. In brief, a policy is just a function that maps from observations of the environment to actions. The goal of reinforcement learning is to produce good policies.
英語のヒント
強化学習は、エージェントが一連の時間ステップにわたって環境とやり取りする問題を、非常に一般的な形で述べたものである。各時間ステップで、エージェントは環境から何らかの観測を受け取り、行動を選ばなければならない。その行動はその後、何らかの仕組み(アクチュエータと呼ばれることもある)を通じて環境に送り返され、各ループの後でエージェントは環境から報酬を受け取る。この過程を図1.3.7に示す。エージェントはそれから次の観測を受け取り、次の行動を選び、という具合に続く。強化学習エージェントの振る舞いは方策によって決まる。手短に言えば、方策とは、環境の観測から行動への写像にほかならない。強化学習の目標は、よい方策を作り出すことである。
Fig. 1.3.7図1.3.7
The interaction between reinforcement learning and an environment.
英語のヒント
強化学習と環境のやり取り。
It is hard to overstate the generality of the reinforcement learning framework. For example, supervised learning can be recast as reinforcement learning. Say we had a classification problem. We could create a reinforcement learning agent with one action corresponding to each class. We could then create an environment which gave a reward that was exactly equal to the loss function from the original supervised learning problem.
英語のヒント
強化学習の枠組みの一般性は、いくら強調してもしすぎることはない。たとえば、教師あり学習は強化学習として捉え直すことができる。分類問題があるとしよう。各クラスに対応する行動を一つずつもつ強化学習エージェントを作ることができる。そして、元の教師あり学習問題の損失関数とちょうど等しい報酬を与える環境を作ればよい。
Further, reinforcement learning can also address many problems that supervised learning cannot. For example, in supervised learning, we always expect that the training input comes associated with the correct label. But in reinforcement learning, we do not assume that, for each observation the environment tells us the optimal action. In general, we just get some reward. Moreover, the environment may not even tell us which actions led to the reward.
英語のヒント
さらに、強化学習は、教師あり学習では扱えない多くの問題も扱える。たとえば教師あり学習では、訓練の入力には必ず正しいラベルが付いてくると期待する。しかし強化学習では、観測のたびに環境が最適な行動を教えてくれるとは仮定しない。一般には、何らかの報酬が得られるだけである。しかも、どの行動がその報酬につながったのかさえ、環境は教えてくれないかもしれない。
Consider the game of chess. The only real reward signal comes at the end of the game when we either win, earning a reward of, say, , or when we lose, receiving a reward of, say, . So reinforcement learners must deal with the credit assignment problem: determining which actions to credit or blame for an outcome. The same goes for an employee who gets a promotion on October 11. That promotion likely reflects a number of well-chosen actions over the previous year. Getting promoted in the future requires figuring out which actions along the way led to the earlier promotions.
英語のヒント
チェスのゲームを考えよう。本当の報酬の信号は、ゲームの終わりにしか来ない。勝てば、たとえばの報酬を得るし、負ければ、たとえばの報酬を受け取る。そこで強化学習者は、貢献度の割り当ての問題、つまり、ある結果についてどの行動をほめ、どの行動を責めるべきかを決める問題に取り組まなければならない。10月11日に昇進した従業員についても同じことが言える。その昇進は、おそらくその前の1年間の、よく選ばれたいくつもの行動を反映している。将来昇進するには、それまでのどの行動が以前の昇進につながったのかを解き明かす必要がある。
Reinforcement learners may also have to deal with the problem of partial observability. That is, the current observation might not tell you everything about your current state. Say your cleaning robot found itself trapped in one of many identical closets in your house. Rescuing the robot involves inferring its precise location which might require considering earlier observations prior to it entering the closet.
英語のヒント
強化学習者は、部分観測可能性の問題も扱わなければならないかもしれない。つまり、今の観測が、今の状態についてすべてを教えてくれるとは限らない。掃除ロボットが、家にあるたくさんの同じような押し入れの一つに閉じ込められてしまったとしよう。ロボットを救い出すには、その正確な位置を推測する必要があり、そのためには、押し入れに入る前のそれ以前の観測を考える必要があるかもしれない。
Finally, at any given point, reinforcement learners might know of one good policy, but there might be many other better policies that the agent has never tried. The reinforcement learner must constantly choose whether to exploit the best (currently) known strategy as a policy, or to explore the space of strategies, potentially giving up some short-term reward in exchange for knowledge.
英語のヒント
最後に、どの時点でも、強化学習者はよい方策を一つ知っているかもしれないが、エージェントが一度も試したことのない、もっとよい方策がほかにたくさんあるかもしれない。強化学習者は、(今のところ)知られている最良の戦略を方策として活用するか、それとも、場合によっては知識と引き換えに短期の報酬をいくらか手放してでも、戦略の空間を探索するかを、絶えず選ばなければならない。
The general reinforcement learning problem has a very general setting. Actions affect subsequent observations. Rewards are only observed when they correspond to the chosen actions. The environment may be either fully or partially observed. Accounting for all this complexity at once may be asking too much. Moreover, not every practical problem exhibits all this complexity. As a result, researchers have studied a number of special cases of reinforcement learning problems.
英語のヒント
一般の強化学習問題は、非常に一般的な設定をもつ。行動はその後の観測に影響する。報酬は、選んだ行動に対応するときにしか観測されない。環境は完全に観測される場合も、部分的にしか観測されない場合もある。この複雑さをすべて一度に考慮に入れるのは、求めすぎかもしれない。しかも、実際の問題がすべて、この複雑さをすべて示すわけではない。その結果、研究者たちは強化学習問題のいくつもの特別な場合を研究してきた。
When the environment is fully observed, we call the reinforcement learning problem a Markov decision process. When the state does not depend on the previous actions, we call it a contextual bandit problem. When there is no state, just a set of available actions with initially unknown rewards, we have the classic multi-armed bandit problem.
英語のヒント
環境が完全に観測されるとき、その強化学習問題をマルコフ決定過程という。状態がそれまでの行動に依存しないとき、文脈付きバンディット問題という。状態がなく、最初は報酬のわからない利用可能な行動の集合だけがあるとき、古典的な多腕バンディット問題になる。