プリンキピア

第8章現代の畳み込みニューラルネットワーク

8.6.1. Function Classes8.6.1 関数のクラス

Consider ℱ, the class of functions that a specific network architecture (together with learning rates and other hyperparameter settings) can reach. That is, for all f∈ℱ there exists some set of parameters (e.g., weights and biases) that can be obtained through training on a suitable dataset. Let’s assume that f∗ is the “truth” function that we really would like to find. If it is in ℱ, we are in good shape but typically we will not be quite so lucky. Instead, we will try to find some fℱ∗ which is our best bet within ℱ. For instance, given a dataset with features 𝐗 and labels 𝐲, we might try finding it by solving the following optimization problem:
英語のヒント
ℱを、特定のネットワーク構造が(学習率やほかのハイパーパラメータの設定とあわせて)到達できる関数のクラスとしよう。つまり、すべてのf∈ℱに対して、適切なデータセットで訓練することで得られるパラメータ(たとえば重みとバイアス)の組が存在する。f∗が、本当に見つけたい「真の」関数だとしよう。それがℱに含まれていれば好都合だが、ふつうはそれほど運よくはいかない。その代わり、ℱの中で最善の候補であるfℱ∗を見つけようとする。たとえば、特徴量𝐗とラベル𝐲のデータセットが与えられたとき、次の最適化問題を解くことでそれを見つけようとするかもしれない。
fℱ∗=defargminf⁡L(𝐗,𝐲,f) subject to f∈ℱ.(8.6.1)
We know that regularization (Morozov, 1984, Tikhonov and Arsenin, 1977) may control complexity of ℱ and achieve consistency, so a larger size of training data generally leads to better fℱ∗. It is only reasonable to assume that if we design a different and more powerful architecture ℱ′ we should arrive at a better outcome. In other words, we would expect that fℱ′∗ is “better” than fℱ∗. However, if ℱ⊈ℱ′ there is no guarantee that this should even happen. In fact, fℱ′∗ might well be worse. As illustrated by Fig. 8.6.1, for non-nested function classes, a larger function class does not always move closer to the “truth” function f∗. For instance, on the left of Fig. 8.6.1, though ℱ3 is closer to f∗ than ℱ1, ℱ6 moves away and there is no guarantee that further increasing the complexity can reduce the distance from f∗. With nested function classes where ℱ1⊆⋯⊆ℱ6 on the right of Fig. 8.6.1, we can avoid the aforementioned issue from the non-nested function classes.
英語のヒント
正則化(Morozov, 1984、Tikhonov and Arsenin, 1977)はℱの複雑さを制御し、一致性を達成しうるので、訓練データが大きいほど一般により良いfℱ∗につながることがわかっている。別の、もっと強力な構造ℱ′を設計すれば、より良い結果にたどり着くはずだと考えるのは、ごく当然である。言い換えれば、fℱ′∗はfℱ∗より「良い」と期待するだろう。しかし、ℱ⊈ℱ′なら、そうなるという保証すらない。実際、fℱ′∗のほうが悪くなることも十分ありうる。図8.6.1に示すように、入れ子になっていない関数のクラスでは、大きな関数のクラスがいつも「真の」関数f∗に近づくとは限らない。たとえば、図8.6.1の左では、ℱ3はℱ1よりf∗に近いが、ℱ6は遠ざかっており、複雑さをさらに増やせばf∗からの距離を縮められるという保証はない。図8.6.1の右の、ℱ1⊆⋯⊆ℱ6となる入れ子の関数のクラスなら、入れ子でない関数のクラスで起きた前述の問題を避けられる。
Fig. 8.6.1図8.6.1
For non-nested function classes, a larger (indicated by area) function class does not guarantee we will get closer to the “truth” function (𝑓∗). This does not happen in nested function classes.
英語のヒント
入れ子でない関数のクラスでは、(面積で示した)より大きな関数のクラスが、「真の」関数(𝑓∗)に近づくことを保証しない。入れ子の関数のクラスでは、このことは起こらない。
Thus, only if larger function classes contain the smaller ones are we guaranteed that increasing them strictly increases the expressive power of the network. For deep neural networks, if we can train the newly-added layer into an identity function f(𝐱)=𝐱, the new model will be as effective as the original model. As the new model may get a better solution to fit the training dataset, the added layer might make it easier to reduce training errors.
英語のヒント
したがって、大きな関数のクラスが小さなものを含む場合にだけ、それを大きくすればネットワークの表現力が厳密に増すことが保証される。深いニューラルネットワークでは、新しく加えた層を恒等関数f(𝐱)=𝐱になるよう訓練できれば、新しいモデルは元のモデルと同じだけ効果的になる。新しいモデルは訓練データセットに当てはまるもっと良い解を得られるかもしれないので、加えた層は訓練誤差を減らしやすくするかもしれない。
This is the question that He et al. (2016) considered when working on very deep computer vision models. At the heart of their proposed residual network (ResNet) is the idea that every additional layer should more easily contain the identity function as one of its elements. These considerations are rather profound but they led to a surprisingly simple solution, a residual block. With it, ResNet won the ImageNet Large Scale Visual Recognition Challenge in 2015. The design had a profound influence on how to build deep neural networks. For instance, residual blocks have been added to recurrent networks (Kim et al., 2017, Prakash et al., 2016). Likewise, Transformers (Vaswani et al., 2017) use them to stack many layers of networks efficiently. It is also used in graph neural networks (Kipf and Welling, 2016) and, as a basic concept, it has been used extensively in computer vision (Redmon and Farhadi, 2018, Ren et al., 2015). Note that residual networks are predated by highway networks (Srivastava et al., 2015) that share some of the motivation, albeit without the elegant parametrization around the identity function.
英語のヒント
これは、He et al. (2016)が、とても深いコンピュータビジョンのモデルに取り組む中で考えた問いである。彼らの提案した残差ネットワーク(ResNet)の核心には、加えるどの層も、その要素の一つとして恒等関数をもっと簡単に含めるべきだという考えがある。こうした考察はかなり深遠だが、驚くほど単純な解決策である残差ブロックにつながった。これを使って、ResNetは2015年のImageNet Large Scale Visual Recognition Challengeで優勝した。この設計は、深いニューラルネットワークの作り方に深い影響を与えた。たとえば、残差ブロックはリカレントネットワークに加えられてきた(Kim et al., 2017、Prakash et al., 2016)。同じように、Transformer(Vaswani et al., 2017)は、ネットワークの多くの層を効率よく積み重ねるためにそれを使う。グラフニューラルネットワーク(Kipf and Welling, 2016)でも使われており、基本的な概念として、コンピュータビジョンで広く使われてきた(Redmon and Farhadi, 2018、Ren et al., 2015)。残差ネットワークより前に、動機の一部を共有するハイウェイネットワーク(Srivastava et al., 2015)があったことに注意してほしい。ただし、恒等関数を中心にした洗練されたパラメータ化はもっていなかった。