借助紧凑型Transformers摆脱大数据模式
Escaping the Big Data Paradigm with Compact Transformers
摘要:
随着Transformers作为语言处理标准的兴起,以及它们在计算机视觉中的进步,参数大小和训练数据的量也相应地增长。许多人认为,正因为如此,Transformers不适合小数据集。这一趋势引起了一些关切,例如:某些科学领域的数据有限,资源有限的人被排除在该领域的研究之外。在本文中,我们的目标是提出一种小规模的学习方法,通过引入紧凑的Transformers。我们首次证明,通过正确的大小,卷积标记化,Transformers可以避免过拟合,并在小数据集上优于最先进的CNN。我们的模型在模型尺寸方面非常灵活,可以在获得具有竞争力的结果的同时拥有0.28M的参数。我们最好的模型在CIFAR-10上从头开始训练时可以达到98%的准确率,只有370万个参数,这是数据效率的显着提高,比以前基于Transformer的模型小10倍以上,比ResNet 50小15%,同时实现类似的性能。CCT还优于许多现代的基于CNN的方法,甚至是一些最近的基于NAS的方法。此外,我们在Flowers-102上获得了一个新的SOTA结果,其top-1准确率为99.76%,并在ImageNet上的现有基线(82.71%的准确率,参数数量为ViT的29%)以及NLP任务上进行了改进。我们简单紧凑的Transformers设计使其更适合于计算资源有限和/或处理小数据集的研究,同时扩展了数据高效Transformers的现有研究工作。我们的代码和预训练模型可在https://github.com/SHI-Labs/Compact-Transformers上公开获取。
英文摘要:
With the rise of Transformers as the standard for language processing, and their advancements in computer vision, there has been a corresponding growth in parameter size and amounts of training data. Many have come to believe that because of this, transformers are not suitable for small sets of data. This trend leads to concerns such as: limited availability of data in certain scientific domains and the exclusion of those with limited resource from research in the field. In this paper, we aim to present an approach for small-scale learning by introducing Compact Transformers. We show for the first time that with the right size, convolutional tokenization, transformers can avoid overfitting and outperform state-of-the-art CNNs on small datasets. Our models are flexible in terms of model size, and can have as little as 0.28M parameters while achieving competitive results. Our best model can reach 98% accuracy when training from scratch on CIFAR-10 with only 3.7M parameters, which is a significant improvement in data-efficiency over previous Transformer based models being over 10x smaller than other transformers and is 15% the size of ResNet50 while achieving similar performance. CCT also outperforms many modern CNN based approaches, and even some recent NAS-based approaches. Additionally, we obtain a new SOTA result on Flowers-102 with 99.76% top-1 accuracy, and improve upon the existing baseline on ImageNet (82.71% accuracy with 29% as many parameters as ViT), as well as NLP tasks. Our simple and compact design for transformers makes them more feasible to study for those with limited computing resources and/or dealing with small datasets, while extending existing research efforts in data efficient transformers. Our code and pre-trained models are publicly available at https://github.com/SHI-Labs/Compact-Transformers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。