Eureka-Moments in Transformers: Multi-Step Tasks Reveal Softmax Induced Optimization Problems

要約

この研究では、多段階の意思決定タスクに直面したときに、変圧器の損失を迅速かつ段階的に改善することを研究します。
トランスフォーマーは中間タスクの学習に苦労しているのに対し、CNN では私たちが調査したタスクではそのような問題が発生しないことがわかりました。
トランスフォーマーが中間タスクを学習するとき、トレーニングと検証の両方の損失が数百エポックで飽和した後、これを予期せず迅速に実行します。
トランスフォーマーが以前は理解できなかったタスクを突然学習したように見えるため、これらの急速な改善をユーレカモーメントと呼びます。
パフォーマンスの同様の飛躍はグロッキングとして知られるようになりました。
Grokking とは対照的に、Eureka-moments では、検証とトレーニング損失の両方が急速に改善する前に飽和します。
問題をトランスのセルフアテンション ブロックの Softmax 関数まで遡り、問題を軽減する方法を示します。
これらの修正により、トレーニング速度が向上しました。
改良されたモデルは、わずか 20% のトレーニング ステップでベースライン モデルの 95% に到達すると同時に、中間タスクを学習する可能性がはるかに高くなり、最終的な精度が向上し、ハイパーパラメーターに対してより堅牢になります。

要約(オリジナル)

In this work, we study rapid, step-wise improvements of the loss in transformers when being confronted with multi-step decision tasks. We found that transformers struggle to learn the intermediate tasks, whereas CNNs have no such issue on the tasks we studied. When transformers learn the intermediate task, they do this rapidly and unexpectedly after both training and validation loss saturated for hundreds of epochs. We call these rapid improvements Eureka-moments, since the transformer appears to suddenly learn a previously incomprehensible task. Similar leaps in performance have become known as Grokking. In contrast to Grokking, for Eureka-moments, both the validation and the training loss saturate before rapidly improving. We trace the problem back to the Softmax function in the self-attention block of transformers and show ways to alleviate the problem. These fixes improve training speed. The improved models reach 95% of the baseline model in just 20% of training steps while having a much higher likelihood to learn the intermediate task, lead to higher final accuracy and are more robust to hyper-parameters.

arxiv情報

著者 David T. Hoffmann,Simon Schrodi,Nadine Behrmann,Volker Fischer,Thomas Brox
発行日 2023-10-19 17:55:06+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CV, cs.LG パーマリンク