プリンキピア

第4章分類のための線形ニューラルネットワーク

4.6.2. Test Set Reuse4.6.2 テスト集合の再利用

In some sense, you are now set up to succeed at conducting empirical machine learning research. Nearly all practical models are developed and validated based on test set performance and you are now a master of the test set. For any fixed classifier f, you know how to evaluate its test error ϵ𝒟(f), and know precisely what can (and cannot) be said about its population error ϵ(f).
英語のヒント
ある意味で、これで経験的な機械学習の研究をうまく進める準備が整った。実用的なモデルのほとんどすべては、テスト集合での性能にもとづいて開発され検証されており、今やあなたはテスト集合の達人である。どんな固定した分類器fについても、そのテスト誤差ϵ𝒟(f)を評価する方法を知っており、その母集団誤差ϵ(f)について何が言えるか(そして何が言えないか)を正確に知っている。
So let’s say that you take this knowledge and prepare to train your first model f1. Knowing just how confident you need to be in the performance of your classifier’s error rate you apply our analysis above to determine an appropriate number of examples to set aside for the test set. Moreover, let’s assume that you took the lessons from Section 3.6 to heart and made sure to preserve the sanctity of the test set by conducting all of your preliminary analysis, hyperparameter tuning, and even selection among multiple competing model architectures on a validation set. Finally you evaluate your model f1 on the test set and report an unbiased estimate of the population error with an associated confidence interval.
英語のヒント
そこで、この知識を手に、最初のモデルf1を訓練する準備をするとしよう。分類器の誤り率の性能にどれだけ確信をもつ必要があるかを正確にわかったうえで、上の分析を当てはめ、テスト集合のために取っておく事例の適切な数を決める。さらに、3.6節の教訓を心に刻み、予備的な分析、ハイパーパラメータの調整、さらには競合する複数のモデル構造からの選択まで、すべてを検証集合で行って、テスト集合の神聖さを確実に守ったとしよう。最後に、テスト集合でモデルf1を評価し、母集団誤差の不偏推定値を、それに伴う信頼区間とともに報告する。
So far everything seems to be going well. However, that night you wake up at 3am with a brilliant idea for a new modeling approach. The next day, you code up your new model, tune its hyperparameters on the validation set and not only are you getting your new model f2 to work but its error rate appears to be much lower than f1’s. However, the thrill of discovery suddenly fades as you prepare for the final evaluation. You do not have a test set!
英語のヒント
ここまでは、すべてがうまくいっているように見える。しかしその夜、新しいモデリングの手法についての見事な着想とともに、午前3時に目が覚める。翌日、新しいモデルをコードに書き上げ、検証集合でそのハイパーパラメータを調整すると、新しいモデルf2が動くだけでなく、その誤り率はf1のものよりずっと低いように見える。しかし、最終評価の準備をするうちに、発見の興奮は急にしぼんでいく。テスト集合がないのである!
Even though the original test set 𝒟 is still sitting on your server, you now face two formidable problems. First, when you collected your test set, you determined the required level of precision under the assumption that you were evaluating a single classifier f. However, if you get into the business of evaluating multiple classifiers f1,...,fk on the same test set, you must consider the problem of false discovery. Before, you might have been 95% sure that ϵ𝒟(f)∈ϵ(f)±0.01 for a single classifier f and thus the probability of a misleading result was a mere 5%. With k classifiers in the mix, it can be hard to guarantee that there is not even one among them whose test set performance is misleading. With 20 classifiers under consideration, you might have no power at all to rule out the possibility that at least one among them received a misleading score. This problem relates to multiple hypothesis testing, which despite a vast literature in statistics, remains a persistent problem plaguing scientific research.
英語のヒント
元のテスト集合𝒟はまだサーバーに置かれているとはいえ、今や二つの手ごわい問題に直面している。第一に、テスト集合を集めたときには、一つの分類器fを評価しているという仮定のもとで、必要な精度の水準を決めた。しかし、同じテスト集合で複数の分類器f1,...,fkを評価することに手を出すなら、偽の発見の問題を考えなければならない。以前なら、一つの分類器fについてϵ𝒟(f)∈ϵ(f)±0.01であると95%確信できたかもしれず、したがって誤解を招く結果が出る確率はわずか5%だった。k個の分類器が混ざると、そのなかにテスト集合での性能が誤解を招くものが一つもないと保証するのは難しくなりうる。20個の分類器を検討しているなら、少なくともそのうちの一つが誤解を招く得点を受け取った可能性を排除する力は、まったくないかもしれない。この問題は多重仮説検定に関わる。多重仮説検定は、統計学に膨大な文献があるにもかかわらず、科学研究を悩ませ続ける根強い問題のままである。
If that is not enough to worry you, there is a special reason to distrust the results that you get on subsequent evaluations. Recall that our analysis of test set performance rested on the assumption that the classifier was chosen absent any contact with the test set and thus we could view the test set as drawn randomly from the underlying population. Here, not only are you testing multiple functions, the subsequent function f2 was chosen after you observed the test set performance of f1. Once information from the test set has leaked to the modeler, it can never be a true test set again in the strictest sense. This problem is called adaptive overfitting and has recently emerged as a topic of intense interest to learning theorists and statisticians (Dwork et al., 2015). Fortunately, while it is possible to leak all information out of a holdout set, and the theoretical worst case scenarios are bleak, these analyses may be too conservative. In practice, take care to create real test sets, to consult them as infrequently as possible, to account for multiple hypothesis testing when reporting confidence intervals, and to dial up your vigilance more aggressively when the stakes are high and your dataset size is small. When running a series of benchmark challenges, it is often good practice to maintain several test sets so that after each round, the old test set can be demoted to a validation set.
英語のヒント
それだけでは心配が足りないというなら、その後の評価で得られる結果を信用しない特別な理由がある。テスト集合での性能についての分析は、分類器がテスト集合と一切接触せずに選ばれ、したがってテスト集合は背後にある母集団から無作為に取り出されたものとみなせる、という仮定の上に成り立っていたことを思い出してほしい。ここでは、複数の関数を試しているだけでなく、後の関数f2はf1のテスト集合での性能を観測した後に選ばれている。テスト集合からの情報がいったんモデルを作る人に漏れたら、最も厳密な意味では、それは二度と真のテスト集合にはなりえない。この問題は適応的過学習と呼ばれ、最近、学習理論家や統計学者の強い関心を集める話題として浮上してきた(Dwork et al., 2015)。幸い、ホールドアウト集合から情報をすべて漏らすことは可能で、理論上の最悪のシナリオは暗いものの、こうした分析は保守的すぎるかもしれない。実際には、本物のテスト集合を作り、それをできるだけまれにしか参照せず、信頼区間を報告するときには多重仮説検定を考慮に入れ、懸かっているものが大きくデータセットが小さいときには、より積極的に警戒を強めるよう注意すること。一連のベンチマーク課題を運営するときは、複数のテスト集合を維持しておき、各回の後に古いテスト集合を検証集合に格下げできるようにするのが、多くの場合よいやり方である。