MaiT: Leverage Attention Masks for More Efficient Image Transformers
Ling Li, Ali Shafiee Ardestani, Joseph Hassoun

TL;DR
MaiT introduces attention masks to image transformers, effectively incorporating spatial locality to improve accuracy and efficiency, making them more suitable for embedded applications.
Contribution
The paper proposes a novel attention masking technique that encodes locality in image transformers, enhancing performance and efficiency across various architectures.
Findings
Top-1 accuracy increases by up to 1.7% over CaiT.
Model parameters and FLOPs are reduced.
Throughput improves by up to 1.5X compared to Swin.
Abstract
Though image transformers have shown competitive results with convolutional neural networks in computer vision tasks, lacking inductive biases such as locality still poses problems in terms of model efficiency especially for embedded applications. In this work, we address this issue by introducing attention masks to incorporate spatial locality into self-attention heads. Local dependencies are captured efficiently with masked attention heads along with global dependencies captured by unmasked attention heads. With Masked attention image Transformer - MaiT, top-1 accuracy increases by up to 1.7% compared to CaiT with fewer parameters and FLOPs, and the throughput improves by up to 1.5X compared to Swin. Encoding locality with attention masks is model agnostic, and thus it applies to monolithic, hierarchical, or other novel transformer architectures.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Neural Network Applications · CCD and CMOS Imaging Sensors · Visual Attention and Saliency Detection
MethodsMulti-Head Attention · Attention Is All You Need · Linear Layer · Softmax · Dense Connections · Position-Wise Feed-Forward Layer · Dropout · Label Smoothing · Absolute Position Encodings · Byte Pair Encoding
