Vision Transformers (ViTs) are built on the assumption of treating image patches as ``visual tokens" and learn patch-to-patch attention. The patch embedding based tokenizer has a semantic gap with respect to its counterpart, the textual tokenizer. The patch-to-patch attention suffers from the quadratic complexity issue, and also makes it non-trivial to explain learned ViTs. To address these issues in ViT, this paper proposes to learn Patch-to-Cluster attention (PaCa) in ViT. Queries in our PaCa-ViT starts with patches, while keys and values are directly based on clustering (with a predefined small number of clusters). The clusters are learned end-to-end, leading to better tokenizers and inducing joint clustering-for-attention and attention-for-clustering for better and interpretable models. The quadratic complexity is relaxed to linear complexity. The proposed PaCa module is used in designing efficient and interpretable ViT backbones and semantic segmentation head networks. In experiments, the proposed methods are tested on ImageNet-1k image classification, MS-COCO object detection and instance segmentation and MIT-ADE20k semantic segmentation. Compared with the prior art, it obtains better performance in all the three benchmarks than the SWin and the PVTs by significant margins in ImageNet-1k and MIT-ADE20k. It is also significantly more efficient than PVT models in MS-COCO and MIT-ADE20k due to the linear complexity. The learned clusters are semantically meaningful. Code and model checkpoints are available at https://github.com/iVMCL/PaCaViT.


翻译:视觉变换器(ViT)基于将图像补丁视为“视觉标记”并学习补丁到补丁的关注点这一假设进行构建。补丁嵌入式记号生成器与其文本式记号生成器对应物存在语义上的差距。补丁到补丁的关注点存在二次复杂度问题,并且使得解释ViT的学习变得困难。 为了解决这些ViT中的问题,本文提出在ViT中学习补丁到集群关注点(PaCa)。我们PaCa-ViT中的查询从补丁开始,而键和值基于聚类直接进行(具有预定义的少量的聚类)。这些聚类是端到端学习的,从而导致更好的标记生成器和诱导联合聚类-关注和关注-聚类以得到更好和可解释的模型。二次复杂性被放松到线性复杂性。在设计高效且可解释的ViT主干和语义分割头部网络时,使用了所提出的PaCa模块。在实验中,所提出的方法在ImageNet-1k图像分类,MS-COCO对象检测和实例分割以及MIT-ADE20k语义分割中进行测试。与SWin和PVT相比,它在ImageNet-1k和MIT-ADE20k中的所有三个基准测试中表现更好。由于是线性复杂度,因此在MS-COCO和MIT-ADE20k中比PVT模型更有效率。学习到的聚类在语义上具有含义。 代码和模型检查点可在https://github.com/iVMCL/PaCaViT获取。

0
下载
关闭预览

相关内容

CVPR2022 | 一种适用于密集场景的渐进式端到端目标检测器
【AAAI2022】对偶对比学习在人脸伪造检测中的应用
专知会员服务
22+阅读 · 2022年1月9日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
强化学习最新教程,17页pdf
专知会员服务
168+阅读 · 2019年10月11日
GNN 新基准!Long Range Graph Benchmark
图与推荐
0+阅读 · 2022年10月18日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
全球人工智能
19+阅读 · 2017年12月17日
【推荐】ResNet, AlexNet, VGG, Inception:各种卷积网络架构的理解
机器学习研究会
20+阅读 · 2017年12月17日
【推荐】全卷积语义分割综述
机器学习研究会
19+阅读 · 2017年8月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
1+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
Arxiv
27+阅读 · 2021年11月11日
Arxiv
19+阅读 · 2018年3月28日
VIP会员
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
1+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
Top
微信扫码咨询专知VIP会员