arXiv reaDer
エキスパートの重み平均化: ビジョントランスフォーマーのための新しい一般的なトレーニングスキーム
Experts Weights Averaging: A New General Training Scheme for Vision Transformers
構造の再パラメータ化は、畳み込みニューラル ネットワーク (CNN) の一般的なトレーニング スキームであり、推論コストを増加させることなくパフォーマンスの向上を実現します。ビジョン トランスフォーマー (ViT) がさまざまな視覚タスクにおいて CNN を徐々に上回っているため、推論コストを増加させることなくパフォーマンスの向上を達成できる ViT 専用のトレーニング スキームが存在するのではないかと疑問に思う人もいるかもしれません。最近、Mixture-of-Experts (MoE) がますます注目を集めています。これは、まばらにアクティブ化された専門家によって、固定コストで変圧器の容量を効率的にスケールアップできるためです。 MoE をマルチブランチ構造とみなすこともできることを考慮すると、MoE を利用して構造の再パラメータ化と同様の ViT トレーニング スキームを実装できるでしょうか?この論文では、ViT のための新しい一般的なトレーニング戦略を使用して、これらの質問に肯定的に答えます。具体的には、ViT のトレーニング フェーズと推論フェーズを分離します。トレーニング中に、ViT の一部のフィードフォワード ネットワーク (FFN) を、ランダムで均一な分割によってエキスパートにトークンを割り当てる特別に設計されたより効率的な MoE に置き換え、各反復の最後にこれらの MoE に対してエキスパートの重み付け平均 (EWA) を実行します。 。トレーニング後、専門家を平均化することで各 MoE を FFN に変換し、推論のためにモデルを元の ViT に戻します。さらに、それがなぜ、どのように機能するかを示す理論的分析を提供します。さまざまな 2D および 3D ビジュアル タスク、ViT アーキテクチャ、およびデータセットにわたる包括的な実験により、提案されたトレーニング スキームの有効性と一般化可能性が検証されます。さらに、ViT を微調整するときに、トレーニング スキームを適用してパフォーマンスを向上させることもできます。最後に、同様に重要ですが、提案された EWA 手法は、さまざまな 2D 視覚的小規模データセットおよび 3D 視覚的タスクにおける単純な MoE の有効性を大幅に向上させることができます。
Structural re-parameterization is a general training scheme for Convolutional Neural Networks (CNNs), which achieves performance improvement without increasing inference cost. As Vision Transformers (ViTs) are gradually surpassing CNNs in various visual tasks, one may question: if a training scheme specifically for ViTs exists that can also achieve performance improvement without increasing inference cost? Recently, Mixture-of-Experts (MoE) has attracted increasing attention, as it can efficiently scale up the capacity of Transformers at a fixed cost through sparsely activated experts. Considering that MoE can also be viewed as a multi-branch structure, can we utilize MoE to implement a ViT training scheme similar to structural re-parameterization? In this paper, we affirmatively answer these questions, with a new general training strategy for ViTs. Specifically, we decouple the training and inference phases of ViTs. During training, we replace some Feed-Forward Networks (FFNs) of the ViT with specially designed, more efficient MoEs that assign tokens to experts by random uniform partition, and perform Experts Weights Averaging (EWA) on these MoEs at the end of each iteration. After training, we convert each MoE into an FFN by averaging the experts, transforming the model back into original ViT for inference. We further provide a theoretical analysis to show why and how it works. Comprehensive experiments across various 2D and 3D visual tasks, ViT architectures, and datasets validate the effectiveness and generalizability of the proposed training scheme. Besides, our training scheme can also be applied to improve performance when fine-tuning ViTs. Lastly, but equally important, the proposed EWA technique can significantly improve the effectiveness of naive MoE in various 2D visual small datasets and 3D visual tasks.
updated: Fri Aug 11 2023 12:05:12 GMT+0000 (UTC)
published: Fri Aug 11 2023 12:05:12 GMT+0000 (UTC)
参考文献 (このサイトで利用可能なもの) / References (only if available on this site)
被参照文献 (このサイトで利用可能なものを新しい順に) / Citations (only if available on this site, in order of most recent)
Amazon.co.jpアソシエイト