第8章現代の畳み込みニューラルネットワーク
8.8.2. Distributions and Parameters of Design Spaces8.8.2 設計空間の分布とパラメータ
As just discussed in Section 8.8.1, parameters of a design space are hyperparameters of networks in that design space. Consider the problem of identifying good parameters in the AnyNet design space. We could try finding the single best parameter choice for a given amount of computation (e.g., FLOPs and compute time). If we allowed for even only two possible choices for each parameter, we would have to explore combinations to find the best solution. This is clearly infeasible because of its exorbitant cost. Even worse, we do not really learn anything from this exercise in terms of how one should design a network. Next time we add, say, an X-stage, or a shift operation, or similar, we would need to start from scratch. Even worse, due to the stochasticity in training (rounding, shuffling, bit errors), no two runs are likely to produce exactly the same results. A better strategy would be to try to determine general guidelines of how the choices of parameters should be related. For instance, the bottleneck ratio, the number of channels, blocks, groups, or their change between layers should ideally be governed by a collection of simple rules. The approach in Radosavovic et al. (2019) relies on the following four assumptions:
英語のヒント
8.8.1節で論じたばかりのように、設計空間のパラメータは、その設計空間にあるネットワークのハイパーパラメータである。AnyNetの設計空間でよいパラメータを突き止める問題を考えよう。一定の計算量(たとえばFLOPsと計算時間)に対して、唯一最善のパラメータの選び方を見つけようとすることもできる。各パラメータに選択肢が二つしかないとしても、最善の解を見つけるには通りの組み合わせを探索しなければならない。これは、費用が法外なので、明らかに実行できない。さらに悪いことに、この作業からは、ネットワークをどう設計すべきかについて実質的に何も学べない。次に、たとえばX段や、シフトの演算などを加えるときには、ゼロからやり直す必要がある。もっと悪いことに、訓練の確率性(丸め、シャッフル、ビット誤り)のせいで、二回の実行がまったく同じ結果を出すことはまずない。もっとよい戦略は、パラメータの選び方がどう関係すべきかについての一般的な指針を定めようとすることだろう。たとえば、ボトルネック比、チャネル、ブロック、グループの数、あるいは層のあいだでのそれらの変化は、理想的には単純な規則の集まりで決まるべきである。Radosavovic et al. (2019)のやり方は、次の四つの仮定に頼っている。
- We assume that general design principles actually exist, so that many networks satisfying these requirements should offer good performance. Consequently, identifying a distribution over networks can be a sensible strategy. In other words, we assume that there are many good needles in the haystack.
英語のヒント
一般的な設計原理が実際に存在し、そのため、それらの要件を満たす多くのネットワークがよい性能を出すはずだと仮定する。したがって、ネットワーク上の分布を突き止めることは、理にかなった戦略になりうる。言い換えれば、干し草の山の中にはよい針がたくさんあると仮定する。 - We need not train networks to convergence before we can assess whether a network is good. Instead, it is sufficient to use the intermediate results as reliable guidance for final accuracy. Using (approximate) proxies to optimize an objective is referred to as multi-fidelity optimization (Forrester et al., 2007). Consequently, design optimization is carried out, based on the accuracy achieved after only a few passes through the dataset, reducing the cost significantly.
英語のヒント
ネットワークがよいかどうかを評価する前に、ネットワークを収束するまで訓練する必要はない。その代わり、中間の結果を、最終的な正解率の信頼できる目安として使えば十分である。(近似的な)代理を使って目的を最適化することは、マルチフィデリティ最適化と呼ばれる(Forrester et al., 2007)。したがって、設計の最適化は、データセットを数回通しただけで達成された正解率にもとづいて行われ、費用が大きく減る。 - Results obtained at a smaller scale (for smaller networks) generalize to larger ones. Consequently, optimization is carried out for networks that are structurally similar, but with a smaller number of blocks, fewer channels, etc. Only in the end will we need to verify that the so-found networks also offer good performance at scale.
英語のヒント
小さな規模で(小さなネットワークで)得られた結果は、大きなものにも一般化する。したがって、最適化は、構造は似ているがブロックの数やチャネルが少ないネットワークで行われる。こうして見つかったネットワークが大きな規模でもよい性能を出すことを確かめる必要があるのは、最後になってからである。 - Aspects of the design can be approximately factorized so that it is possible to infer their effect on the quality of the outcome somewhat independently. In other words, the optimization problem is moderately easy.
英語のヒント
設計のさまざまな側面はおおよそ分解でき、結果の質への影響をある程度独立に推論できる。言い換えれば、この最適化問題はほどほどに簡単である。
These assumptions allow us to test many networks cheaply. In particular, we can sample uniformly from the space of configurations and evaluate their performance. Subsequently, we can evaluate the quality of the choice of parameters by reviewing the distribution of error/accuracy that can be achieved with said networks. Denote by the cumulative distribution function (CDF) for errors committed by networks of a given design space, drawn using probability disribution . That is,
英語のヒント
これらの仮定によって、多くのネットワークを安く試せる。特に、構成の空間から一様にサンプリングし、その性能を評価できる。続いて、そうしたネットワークで達成できる誤差・正解率の分布を見直すことで、パラメータの選び方の質を評価できる。確率分布を使って引いた、ある設計空間のネットワークが犯す誤差の累積分布関数(CDF)をと表す。つまり、
(8.8.1)
Our goal is now to find a distribution over networks such that most networks have a very low error rate and where the support of is concise. Of course, this is computationally infeasible to perform accurately. We resort to a sample of networks (with errors , respectively) from and use the empirical CDF instead:
英語のヒント
ここでの目標は、ほとんどのネットワークの誤り率がとても低く、かつの台が簡潔であるような、ネットワーク上の分布を見つけることである。もちろん、これを正確に行うのは計算の面で実行できない。そこで、から抽出したネットワークの標本(それぞれの誤差は)に頼り、代わりに経験CDFを使う。
(8.8.2)
Whenever the CDF for one set of choices majorizes (or matches) another CDF it follows that its choice of parameters is superior (or indifferent). Accordingly Radosavovic et al. (2020) experimented with a shared network bottleneck ratio for all stages of the network. This gets rid of three of the four parameters governing the bottleneck ratio. To assess whether this (negatively) affects the performance one can draw networks from the constrained and from the unconstrained distribution and compare the corresonding CDFs. It turns out that this constraint does not affect the accuracy of the distribution of networks at all, as can be seen in the first panel of Fig. 8.8.2. Likewise, we could choose to pick the same group width occurring at the various stages of the network. Again, this does not affect performance, as can be seen in the second panel of Fig. 8.8.2. Both steps combined reduce the number of free parameters by six.
英語のヒント
ある選び方の組のCDFが別のCDFを優越する(あるいは一致する)なら、そのパラメータの選び方は優れている(あるいは差がない)ことになる。そこでRadosavovic et al. (2020)は、ネットワークのすべての段で共通のボトルネック比を使う実験をした。これにより、ボトルネック比を決める四つのパラメータのうち三つがなくなる。これが性能に(悪い)影響を与えるかどうかを評価するには、制約つきの分布と制約なしの分布からネットワークを引き、対応するCDFを比べればよい。図8.8.2の最初のパネルに見られるように、この制約はネットワークの分布の正解率にまったく影響しないことがわかる。同じように、ネットワークのさまざまな段に現れるグループの幅を同じに選ぶこともできる。やはり、図8.8.2の2番目のパネルに見られるように、これは性能に影響しない。二つの手順をあわせると、自由なパラメータの数が六つ減る。
Image omitted because its reuse rights could not be verified.権利の確認ができないため画像を割愛。
Fig. 8.8.2図8.8.2
Comparing error empirical distribution functions of design spaces. is the original design space; ties the bottleneck ratios, also ties group widths, increases the network depth across stages. From left to right: (i) tying bottleneck ratios has no effect on performance; (ii) tying group widths has no effect on performance; (iii) increasing network widths (channels) across stages improves performance; (iv) increasing network depths across stages improves performance. Figure courtesy of Radosavovic et al. (2020).
英語のヒント
設計空間の誤差の経験分布関数の比較。は元の設計空間である。はボトルネック比をそろえ、はさらにグループの幅もそろえ、は段を追ってネットワークの深さを増やす。左から右へ:(i)ボトルネック比をそろえても性能に影響はない。(ii)グループの幅をそろえても性能に影響はない。(iii)段を追ってネットワークの幅(チャネル)を増やすと性能が上がる。(iv)段を追ってネットワークの深さを増やすと性能が上がる。図はRadosavovic et al. (2020)の厚意による。
Next we look for ways to reduce the multitude of potential choices for width and depth of the stages. It is a reasonable assumption that, as we go deeper, the number of channels should increase, i.e., ( per their notation in Fig. 8.8.2), yielding . Likewise, it is equally reasonable to assume that as the stages progress, they should become deeper, i.e., , yielding . This can be experimentally verified in the third and fourth panel of Fig. 8.8.2, respectively.