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

你甚至需要注意吗?前馈层堆栈在ImageNet上表现惊人

Do You Even Need Attention? A Stack of Feed-Forward Layers Does Surprisingly Well on ImageNet

Oxford University(牛津大学)

Luke Melas-Kyriazi

摘要:

视觉Transformer在图像分类和其他视觉任务上的强大性能通常归因于其多头注意力层的设计。然而,注意力在多大程度上对这一强劲表现负责仍不清楚。在这个简短的报告中,我们问:注意力层是必要的吗?具体来说,我们取代了视觉Transformer与前馈层应用于补丁尺寸的关注层。由此产生的架构只是一系列前馈层,以交替的方式应用在贴片和特征尺寸上。在ImageNet上的实验中,这种架构的表现令人惊讶:ViT/DeiT大小的模型获得了74.9%的top-1准确率,而ViT和DeiT分别为77.9%和79.9%。这些结果表明,视觉Transformer的其他方面的注意,如补丁嵌入,可能是他们的强大性能比以前认为的更负责。我们希望这些结果能促使社区花更多的时间来理解为什么我们目前的模型如此有效。

英文摘要:

The strong performance of vision transformers on image classification and other vision tasks is often attributed to the design of their multi-head attention layers. However, the extent to which attention is responsible for this strong performance remains unclear. In this short report, we ask: is the attention layer even necessary? Specifically, we replace the attention layer in a vision transformer with a feed-forward layer applied over the patch dimension. The resulting architecture is simply a series of feed-forward layers applied over the patch and feature dimensions in an alternating fashion. In experiments on ImageNet, this architecture performs surprisingly well: a ViT/DeiT-base-sized model obtains 74.9\% top-1 accuracy, compared to 77.9\% and 79.9\% for ViT and DeiT respectively. These results indicate that aspects of vision transformers other than attention, such as the patch embedding, may be more responsible for their strong performance than previously thought. We hope these results prompt the community to spend more time trying to understand why our current models are as effective as they are.

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

↑