패치피케이션에서의 스케일링 법칙: 이미지는 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