arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2210.12333cs.CV
收藏

小数据集上视觉Transformer中的累积琐碎注意事项

Accumulated Trivial Attention Matters in Vision Transformers on Small Datasets

University of Kansas(堪萨斯大学);Institute of Automation, Chinese Academy of Sciences(中国科学院自动化研究所);Toronto Metropolitan University(多伦多都会大学)

Xiangyu Chen, Qinghao Hu, Kaidong Li, Cuncong Zhong, Guanghui Wang

摘要:

视觉Transformer在计算机视觉任务上表现出了竞争力,这得益于它们利用多头自注意模块和多层感知器捕获远程依赖关系的能力。然而,计算全局注意力带来了与卷积神经网络相比的另一个缺点,即需要更多的数据和计算来收敛,这使得难以在实际应用中常见的小数据集上很好地推广。以前的工作要么专注于从大数据集转移知识,要么调整小数据集的结构。在仔细研究自注意模块后,我们发现在视觉Transformer中,琐碎的注意权重的数量远远大于重要的注意权重,并且由于琐碎权重的数量太大,累积起来的琐碎权重占据了注意的主导地位,而这些琐碎权重并不是由注意本身来处理的。这将覆盖有用的非平凡注意力,并且当平凡注意力包括更多噪声时(例如,在一些骨干的浅层中)损害性能。针对这一问题,提出通过阈值将注意力权重分为平凡和非平凡两类,然后通过平凡权重抑制变换(TWIST)抑制累积平凡注意力(SATA)权重,以降低注意力噪声。在CIFAR-100和Tiny-ImageNet数据集上的大量实验表明,我们的抑制方法将视觉Transformer的准确率提高了2.3%。代码可在https://github.com/xiangyu8/SATA上获得。

英文摘要:

Vision Transformers has demonstrated competitive performance on computer vision tasks benefiting from their ability to capture long-range dependencies with multi-head self-attention modules and multi-layer perceptron. However, calculating global attention brings another disadvantage compared with convolutional neural networks, i.e. requiring much more data and computations to converge, which makes it difficult to generalize well on small datasets, which is common in practical applications. Previous works are either focusing on transferring knowledge from large datasets or adjusting the structure for small datasets. After carefully examining the self-attention modules, we discover that the number of trivial attention weights is far greater than the important ones and the accumulated trivial weights are dominating the attention in Vision Transformers due to their large quantity, which is not handled by the attention itself. This will cover useful non-trivial attention and harm the performance when trivial attention includes more noise, e.g. in shallow layers for some backbones. To solve this issue, we proposed to divide attention weights into trivial and non-trivial ones by thresholds, then Suppressing Accumulated Trivial Attention (SATA) weights by proposed Trivial WeIghts Suppression Transformation (TWIST) to reduce attention noise. Extensive experiments on CIFAR-100 and Tiny-ImageNet datasets show that our suppressing method boosts the accuracy of Vision Transformers by up to 2.3%. Code is available at https://github.com/xiangyu8/SATA.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑