第12章最適化アルゴリズム
12.10.1. The Algorithm12.10.1 アルゴリズム
One of the key components of Adam is that it uses exponential weighted moving averages (also known as leaky averaging) to obtain an estimate of both the momentum and also the second moment of the gradient. That is, it uses the state variables
英語のヒント
Adamの主な構成要素の一つは、指数重みつき移動平均(漏れのある平均とも呼ばれる)を使って、勾配のモメンタムと2次モーメントの両方の推定値を得ることである。つまり、次の状態変数を使う。
(12.10.1)
Here and are nonnegative weighting parameters. Common choices for them are and . That is, the variance estimate moves much more slowly than the momentum term. Note that if we initialize we have a significant amount of bias initially towards smaller values. This can be addressed by using the fact that to re-normalize terms. Correspondingly the normalized state variables are given by
英語のヒント
ここでとは非負の重みのパラメータである。よく選ばれるのはとである。つまり、分散の推定値はモメンタムの項よりずっとゆっくり動く。と初期化すると、最初はかなり小さい値のほうへ偏りがあることに注意してほしい。これは、という事実を使って項を正規化し直せば対処できる。それに応じて、正規化した状態変数は次で与えられる。
(12.10.2)
Armed with the proper estimates we can now write out the update equations. First, we rescale the gradient in a manner very much akin to that of RMSProp to obtain
英語のヒント
適切な推定値が手に入ったので、いよいよ更新式を書き出せる。まず、RMSPropのものとよく似たやり方で勾配を再スケールし、次を得る。
(12.10.3)
Unlike RMSProp our update uses the momentum rather than the gradient itself. Moreover, there is a slight cosmetic difference as the rescaling happens using instead of . The former works arguably slightly better in practice, hence the deviation from RMSProp. Typically we pick for a good trade-off between numerical stability and fidelity.
英語のヒント
RMSPropと違って、この更新は勾配そのものではなくモメンタムを使う。さらに、再スケーリングがではなくを使って行われるという、見た目上のわずかな違いがある。実際には前者のほうが少しよく働くと言ってよく、そのためRMSPropから外れている。ふつうは、数値的な安定性と忠実さのよい兼ね合いのため、を選ぶ。
Now we have all the pieces in place to compute updates. This is slightly anticlimactic and we have a simple update of the form
英語のヒント
これで、更新を計算する部品がすべてそろった。これは少し拍子抜けで、次の形の単純な更新になる。
(12.10.4)
Reviewing the design of Adam its inspiration is clear. Momentum and scale are clearly visible in the state variables. Their rather peculiar definition forces us to debias terms (this could be fixed by a slightly different initialization and update condition). Second, the combination of both terms is pretty straightforward, given RMSProp. Last, the explicit learning rate allows us to control the step length to address issues of convergence.
英語のヒント
Adamの設計を振り返ると、その着想ははっきりしている。モメンタムとスケールは、状態変数にはっきり見える。それらのかなり変わった定義のため、項の偏りを取り除く必要がある(これは、少し違う初期化と更新の条件で直せるだろう)。第二に、RMSPropを踏まえれば、両方の項の組み合わせはかなり素直である。最後に、明示的な学習率によって、ステップの長さを制御し、収束の問題に対処できる。