2025-02-10 · 进阶 · 计算机视觉 · 机器学习

Scaling Laws in Patchification: An Image Is Worth 50,176 Tokens And More

这篇论文研究了图像分块化对视觉模型的影响,发现减小分块大小可以提高模型性能,并提出了“一个像素等于50,176个token”的视觉编码新范式。

更新于 2025-02-10。作者:Feng Wang、Yaodong Yu、Guoyizhe Wei、Wei Shao、Yuyin Zhou、Alan Yuille、Cihang Xie。

中文摘要

自从视觉Transformer(ViT)被引入以来,图像块化一直被视为平面视觉架构的默认图像标记化方法。通过压缩图像的空间尺寸,这种方法可以有效地缩短标记序列并降低类似ViT的平面架构的计算成本。在这项工作中,我们旨在彻底检查由基于图像块化的压缩编码范式引起的信息损失以及它如何影响视觉理解。我们进行了广泛的图像块大小缩放实验,并兴奋地观察到在图像块化中的一个有趣缩放规律:模型可以从较小的图像块大小中持续获益并实现更好的预测性能,直到达到最小图像块大小1x1,即像素标记化。这一结论在跨不同视觉任务、各种输入尺度和不同的架构(如ViT和最近的Mamba模型)中具有广泛的适用性。此外,作为副产品,我们发现随着图像块尺寸的减小,特定于任务的解码器头部对于密集预测变得不那么关键。在实验中,我们成功地将视觉序列扩展到异常长的50,176个标记,在ImageNet-1k基准上使用基线大小的模型实现了84.6%的竞争性测试准确率。我们希望这项研究可以为构建非压缩视觉模型未来的工作提供洞察力和理论基础。代码可在https://github.com/wangf3014/Patch_Scaling获取。

英文摘要

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.

解读

一句话总结

这篇论文研究了图像分块化对视觉模型的影响,发现减小分块大小可以提高模型性能,并提出了“一个像素等于50,176个token”的视觉编码新范式。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源

机器可读索引:llms.txt