第4章分類のための線形ニューラルネットワーク
4.7.2. Examples of Distribution Shift4.7.2 分布シフトの例
Before delving into formalism and algorithms, we can discuss some concrete situations where covariate or concept shift might not be obvious.
英語のヒント
形式的な扱いやアルゴリズムに踏み込む前に、共変量シフトや概念シフトがはっきりしないかもしれない具体的な状況をいくつか論じておこう。
4.7.2.1. Medical Diagnostics4.7.2.1 医療診断
Imagine that you want to design an algorithm to detect cancer. You collect data from healthy and sick people and you train your algorithm. It works fine, giving you high accuracy and you conclude that you are ready for a successful career in medical diagnostics. Not so fast.
英語のヒント
がんを検出するアルゴリズムを設計したいとしよう。健康な人と病気の人からデータを集め、アルゴリズムを訓練する。うまく動いて高い正解率が出たので、医療診断の分野で成功する準備ができたと結論する。そう急ぐな。
The distributions that gave rise to the training data and those you will encounter in the wild might differ considerably. This happened to an unfortunate startup that some of we authors worked with years ago. They were developing a blood test for a disease that predominantly affects older men and hoped to study it using blood samples that they had collected from patients. However, it is considerably more difficult to obtain blood samples from healthy men than from sick patients already in the system. To compensate, the startup solicited blood donations from students on a university campus to serve as healthy controls in developing their test. Then they asked whether we could help them to build a classifier for detecting the disease.
英語のヒント
訓練データを生み出した分布と、現実の場で出会う分布は、かなり違うかもしれない。これは、筆者らの何人かが何年も前に一緒に仕事をした、ある不運なスタートアップに実際に起きたことである。彼らは、主に高齢の男性がかかる病気の血液検査を開発していて、患者から集めた血液の標本を使ってそれを研究したいと考えていた。しかし、すでに医療機関にかかっている病気の患者から血液の標本を得るよりも、健康な男性から得るほうがかなり難しい。その埋め合わせとして、そのスタートアップは、検査を開発するうえで健康な対照群とするため、大学のキャンパスの学生に献血を募った。そして、病気を検出する分類器を作るのを手伝ってもらえないかと、私たちに頼んできた。
As we explained to them, it would indeed be easy to distinguish between the healthy and sick cohorts with near-perfect accuracy. However, that is because the test subjects differed in age, hormone levels, physical activity, diet, alcohol consumption, and many more factors unrelated to the disease. This was unlikely to be the case with real patients. Due to their sampling procedure, we could expect to encounter extreme covariate shift. Moreover, this case was unlikely to be correctable via conventional methods. In short, they wasted a significant sum of money.
英語のヒント
彼らに説明したとおり、健康な群と病気の群は、ほぼ完璧な正解率で確かに簡単に見分けられるだろう。しかしそれは、被験者が、年齢、ホルモンの水準、身体活動、食事、飲酒量をはじめ、病気と関係のない多くの要因で異なっていたからである。本物の患者では、そうなることはまずない。彼らの標本抽出の手順のせいで、極端な共変量シフトに出会うことが予想できた。さらに、この場合は、従来の方法で補正できる見込みもなかった。要するに、彼らはかなりの額のお金を無駄にしたのである。
4.7.2.2. Self-Driving Cars4.7.2.2 自動運転車
Say a company wanted to leverage machine learning for developing self-driving cars. One key component here is a roadside detector. Since real annotated data is expensive to get, they had the (smart and questionable) idea to use synthetic data from a game rendering engine as additional training data. This worked really well on “test data” drawn from the rendering engine. Alas, inside a real car it was a disaster. As it turned out, the roadside had been rendered with a very simplistic texture. More importantly, all the roadside had been rendered with the same texture and the roadside detector learned about this “feature” very quickly.
英語のヒント
ある会社が、自動運転車の開発に機械学習を活用したかったとしよう。ここで鍵となる部品の一つは、路肩の検出器である。注釈付きの本物のデータは手に入れるのに費用がかかるので、彼らは、ゲームの描画エンジンが作る合成データを追加の訓練データとして使うという、(賢くもあり疑わしくもある)着想を得た。これは、描画エンジンから取り出した「テストデータ」では本当にうまくいった。ところが、本物の車の中では大失敗だった。わかってみると、路肩はとても単純なテクスチャで描画されていた。もっと重要なことに、路肩はすべて同じテクスチャで描画されていて、路肩の検出器はこの「特徴」をすぐに覚えてしまったのである。
A similar thing happened to the US Army when they first tried to detect tanks in the forest. They took aerial photographs of the forest without tanks, then drove the tanks into the forest and took another set of pictures. The classifier appeared to work perfectly. Unfortunately, it had merely learned how to distinguish trees with shadows from trees without shadows—the first set of pictures was taken in the early morning, the second set at noon.
英語のヒント
似たことが、アメリカ陸軍が森の中の戦車を初めて検出しようとしたときにも起きた。彼らは、戦車のいない森の航空写真を撮り、それから戦車を森に乗り入れて、もう一組の写真を撮った。分類器は完璧に働くように見えた。残念ながら、分類器は、影のある木と影のない木を見分ける方法を覚えただけだった。最初の一組の写真は早朝に、二組目は正午に撮られていたのである。
4.7.2.3. Nonstationary Distributions4.7.2.3 非定常な分布
A much more subtle situation arises when the distribution changes slowly (also known as nonstationary distribution) and the model is not updated adequately. Below are some typical cases.
英語のヒント
分布がゆっくり変わり(非定常な分布とも呼ばれる)、モデルが適切に更新されないときには、はるかにとらえにくい状況が生じる。典型的な場合をいくつか下に挙げる。
- We train a computational advertising model and then fail to update it frequently (e.g., we forget to incorporate that an obscure new device called an iPad was just launched).
英語のヒント
計算広告のモデルを訓練し、その後それを頻繁に更新しそこなう(たとえば、iPadという名の無名の新しい機器が発売されたばかりだということを取り込むのを忘れる)。 - We build a spam filter. It works well at detecting all spam that we have seen so far. But then the spammers wise up and craft new messages that look unlike anything we have seen before.
英語のヒント
迷惑メールのフィルタを作る。これまでに見たすべての迷惑メールを、うまく検出できる。しかしその後、迷惑メールの送り手は知恵をつけ、これまで見たどれとも似ていない新しいメッセージを仕立てる。 - We build a product recommendation system. It works throughout the winter but then continues to recommend Santa hats long after Christmas.
英語のヒント
商品の推薦システムを作る。冬のあいだはずっとうまく働くが、クリスマスがとうに過ぎてもサンタの帽子を勧め続ける。
4.7.2.4. More Anecdotes4.7.2.4 さらなる逸話
- We build a face detector. It works well on all benchmarks. Unfortunately it fails on test data—the offending examples are close-ups where the face fills the entire image (no such data was in the training set).
英語のヒント
顔の検出器を作る。どのベンチマークでもうまく働く。残念ながら、テストデータではうまくいかない。問題の事例は、顔が画像全体を埋めるクローズアップである(そうしたデータは訓練集合になかった)。 - We build a web search engine for the US market and want to deploy it in the UK.
英語のヒント
米国市場向けにウェブ検索エンジンを作り、それを英国でも展開したい。 - We train an image classifier by compiling a large dataset where each among a large set of classes is equally represented in the dataset, say 1000 categories, represented by 1000 images each. Then we deploy the system in the real world, where the actual label distribution of photographs is decidedly non-uniform.
英語のヒント
多数のクラスのそれぞれがデータセットのなかで等しく現れる大きなデータセット、たとえば1000カテゴリーがそれぞれ1000枚の画像で表されるデータセットを編んで、画像分類器を訓練する。それから、そのシステムを現実の世界で展開する。そこでは、写真の実際のラベルの分布は明らかに一様ではない。