Abstract
Transformer is a new kind of neural architecture which encodes the input data as powerful features via the attention mechanism. Basically, the visual transformers first divide the input images into several local patches and then calculate both representations and their relationship. Since natural images are of high complexity with abundant detail and color information, the granularity of the patch dividing is not fine enough for excavating features of objects in different scales and locations. In this paper, we point out that the attention inside these local patches are also essential for building visual transformers with high performance and we explore a new architecture, namely, Transformer iN Transformer (TNT). Specifically, we regard the local patches (e.g., 16×16) as "visual sentences" and present to further divide them into smaller patches (e.g., 4×4) as "visual words". The attention of each word will be calculated with other words in the given visual sentence with negligible computational costs. Features of both words and sentences will be aggregated to enhance the representation ability. Experiments on several benchmarks demonstrate the effectiveness of the proposed TNT architecture, e.g., we achieve an 81.5% top-1 accuracy on the ImageNet, which is about 1.7% higher than that of the state-of-the-art visual transformer with similar computational cost. The PyTorch code is available at https://github.com/huawei-noah/CV-Backbones, and the MindSpore code is available at https://gitee.com/mindspore/models/ tree/master/research/cv/TNT. © 2021 Neural information processing systems foundation. All rights reserved.
| Original language | English |
|---|---|
| Title of host publication | NIPS '21: Proceedings of the 35th International Conference on Neural Information Processing Systems |
| Editors | M. Ranzato, A. Beygelzimer, Y. Dauphin |
| Place of Publication | United States |
| Publisher | Curran Associates Inc. |
| Pages | 15908-15919 |
| ISBN (Print) | 9781713845393 |
| Publication status | Published - Dec 2021 |
| Externally published | Yes |
| Event | 35th Conference on Neural Information Processing Systems (NeurIPS 2021) - Virtual, Los Angeles, United States Duration: 6 Dec 2021 → 14 Dec 2021 https://nips.cc/virtual/2021/index.html https://papers.nips.cc/paper/2021 https://media.neurips.cc/Conferences/NeurIPS2021/NeurIPS_2021_poster.pdf https://www.proceedings.com/63069.html |
Publication series
| Name | Advances in Neural Information Processing Systems |
|---|---|
| Volume | 34 |
| ISSN (Print) | 1049-5258 |
Conference
| Conference | 35th Conference on Neural Information Processing Systems (NeurIPS 2021) |
|---|---|
| Place | United States |
| City | Los Angeles |
| Period | 6/12/21 → 14/12/21 |
| Internet address |
Funding
This work was supported by NSFC (62072449, 61632003), Guangdong-Hongkong-Macao Joint Research Grant (2020B1515130004) and Macao FDCT (0018/2019/AKP, 0015/2019/AKP).
Fingerprint
Dive into the research topics of 'Transformer in Transformer'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver