MABViT -- Modified Attention Block Enhances Vision Transformers

Mahesh Ramesh, Aswinkumar Ramkumar
12/3/2023
cs.CVcs.LG

No confident code implementation found for this paper.

Abstract

Recent studies have demonstrated the effectiveness of Gated Linear Units (GLU) in enhancing transformer models, particularly in Large Language Models (LLMs). Additionally, utilizing a parallel configuration within each Transformer block rather than the conventional serialized method has been revealed to accelerate the training of LLMs without significantly impacting performance. However, when the MLP and attention block were run in parallel for the image classification task, we observed a noticeable decline in performance. We propose a novel transformer variant that integrates non-linearity within the attention block to tackle this problem. We implemented the GLU-based activation function on the Value tensor, and this new technique surpasses the current state-of-the-art S/16 variant of Vision Transformers by 0.6% on the ImageNet-1K dataset while utilizing fewer parameters. It also supersedes the B/16 variant while using only half the parameters. Furthermore, we provide results with the GELU activation function variant to confirm our assertions. Lastly, we showcase that the MABViT variants exhibit greater potential when utilized in deep transformers compared to the standard architecture.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ramesh2023mabvit,
  title  = {MABViT -- Modified Attention Block Enhances Vision Transformers},
  author = {Mahesh Ramesh and Aswinkumar Ramkumar},
  year   = {2023},
  eprint = {2312.01324},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2312.01324v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2312.01324.svg)](https://codeofpaper.com/paper/2312.01324)

Discussion