パッチ化におけるスケーリング則:1枚の画像は50,176トークン以上の価値がある
Scaling Laws in Patchification: An Image Is Worth 50,176 Tokens And More
February 6, 2025
著者: Feng Wang, Yaodong Yu, Guoyizhe Wei, Wei Shao, Yuyin Zhou, Alan Yuille, Cihang Xie
cs.AI
要旨
Vision Transformer(ViT)の導入以来、パッチ化は平易な視覚アーキテクチャのための画像トークン化手法として事実上のものと見なされてきました。画像の空間サイズを圧縮することで、この手法はトークンシーケンスを効果的に短縮し、ViTのような平易なアーキテクチャの計算コストを削減することができます。本研究では、このパッチ化ベースの圧縮符号化パラダイムによって引き起こされる情報損失と、それが視覚理解にどのように影響するかを徹底的に調査することを目的としています。私たちは広範囲なパッチサイズスケーリング実験を実施し、興味深いスケーリング則を観察しました。つまり、モデルはパッチサイズが減少すると一貫して利益を得て予測性能が向上し、最小の1x1のパッチサイズ、つまりピクセルトークン化に達するまでです。この結論は、異なるビジョンタスク、さまざまな入力スケール、ViTや最近のMambaモデルなど、さまざまなアーキテクチャに広く適用されます。さらに、副産物として、より小さなパッチでは、タスク固有のデコーダヘッドが密な予測に対してより重要でなくなることを発見しました。実験では、ビジュアルシーケンスを50,176トークンという非常に長い長さにスケーリングし、ImageNet-1kベンチマークでベースサイズのモデルで競争力のあるテスト精度84.6%を達成しました。この研究が、非圧縮のビジョンモデルの構築に関する将来の研究の洞察と理論的基盤を提供できればと願っています。コードはhttps://github.com/wangf3014/Patch_Scalingで入手可能です。
English
Since the introduction of Vision Transformer (ViT), patchification has long
been regarded as a de facto image tokenization approach for plain visual
architectures. By compressing the spatial size of images, this approach can
effectively shorten the token sequence and reduce the computational cost of
ViT-like plain architectures. In this work, we aim to thoroughly examine the
information loss caused by this patchification-based compressive encoding
paradigm and how it affects visual understanding. We conduct extensive patch
size scaling experiments and excitedly observe an intriguing scaling law in
patchification: the models can consistently benefit from decreased patch sizes
and attain improved predictive performance, until it reaches the minimum patch
size of 1x1, i.e., pixel tokenization. This conclusion is broadly applicable
across different vision tasks, various input scales, and diverse architectures
such as ViT and the recent Mamba models. Moreover, as a by-product, we discover
that with smaller patches, task-specific decoder heads become less critical for
dense prediction. In the experiments, we successfully scale up the visual
sequence to an exceptional length of 50,176 tokens, achieving a competitive
test accuracy of 84.6% with a base-sized model on the ImageNet-1k benchmark. We
hope this study can provide insights and theoretical foundations for future
works of building non-compressive vision models. Code is available at
https://github.com/wangf3014/Patch_Scaling.Summary
AI-Generated Summary