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

要約

この研究では、多段階の意思決定タスクに直面したときの変圧器の訓練損失の急速な改善を研究します。
私たちは、トランスフォーマーが中間タスクを学習するのに苦労し、トレーニングと検証の両方の損失が数百エポックにわたって飽和することを発見しました。
変圧器は最終的に中間タスクを学習すると、これを予期せず迅速に実行します。
トランスフォーマーが以前は理解できなかった概念を突然学習したように見えるため、これらの突然の改善をユーレカモーメントと呼びます。
問題を詳細に調査するために合成タスクを設計しましたが、言語モデリングとコンテキスト内学習 (ICL) でもパフォーマンスの飛躍的な向上が見られます。
このような突然の移行は、これらのタスクの複数のステップの性質によって引き起こされているのではないかと考えられます。
実際、私たちは関連性を発見し、合成マルチステップ タスクを改善する方法を使用して、言語モデリングと ICL のトレーニングを改善できることを示しました。
合成データを使用して、問題をトランスの自己注意ブロックの Softmax 関数まで追跡し、問題を軽減する方法を示します。
これらの修正により、必要なトレーニング ステップの数が減り、中間タスクを学習する可能性が高まり、最終精度が向上し、トレーニングがハイパーパラメーターに対してより堅牢になります。

要約(オリジナル)

In this work, we study rapid improvements of the training loss in transformers when being confronted with multi-step decision tasks. We found that transformers struggle to learn the intermediate task and both training and validation loss saturate for hundreds of epochs. When transformers finally learn the intermediate task, they do this rapidly and unexpectedly. We call these abrupt improvements Eureka-moments, since the transformer appears to suddenly learn a previously incomprehensible concept. We designed synthetic tasks to study the problem in detail, but the leaps in performance can be observed also for language modeling and in-context learning (ICL). We suspect that these abrupt transitions are caused by the multi-step nature of these tasks. Indeed, we find connections and show that ways to improve on the synthetic multi-step tasks can be used to improve the training of language modeling and ICL. Using the synthetic data 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 reduce the required number of training steps, lead to higher likelihood to learn the intermediate task, to higher final accuracy and training becomes more robust to hyper-parameters.

arxiv情報

著者 David T. Hoffmann,Simon Schrodi,Jelena Bratulić,Nadine Behrmann,Volker Fischer,Thomas Brox
発行日 2024-06-06 17:58:45+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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