ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2111.10017
11
3

Rethinking Query, Key, and Value Embedding in Vision Transformer under Tiny Model Constraints

19 November 2021
Jaesin Ahn
Jiuk Hong
Jeongwoo Ju
Heechul Jung
    ViT
ArXivPDFHTML
Abstract

A vision transformer (ViT) is the dominant model in the computer vision field. Despite numerous studies that mainly focus on dealing with inductive bias and complexity, there remains the problem of finding better transformer networks. For example, conventional transformer-based models usually use a projection layer for each query (Q), key (K), and value (V) embedding before multi-head self-attention. Insufficient consideration of semantic Q,KQ, KQ,K, and VVV embedding may lead to a performance drop. In this paper, we propose three types of structures for QQQ, KKK, and VVV embedding. The first structure utilizes two layers with ReLU, which is a non-linear embedding for Q,KQ, KQ,K, and VVV. The second involves sharing one of the non-linear layers to share knowledge among Q,KQ, KQ,K, and VVV. The third proposed structure shares all non-linear layers with code parameters. The codes are trainable, and the values determine the embedding process to be performed among QQQ, KKK, and VVV. Hence, we demonstrate the superior image classification performance of the proposed approaches in experiments compared to several state-of-the-art approaches. The proposed method achieved 71.4%71.4\%71.4% with a few parameters (of 3.1M3.1M3.1M) on the ImageNet-1k dataset compared to that required by the original transformer model of XCiT-N12 (69.9%69.9\%69.9%). Additionally, the method achieved 93.3%93.3\%93.3% with only 2.9M2.9M2.9M parameters in transfer learning on average for the CIFAR-10, CIFAR-100, Stanford Cars datasets, and STL-10 datasets, which is better than the accuracy of 92.2%92.2\%92.2% obtained via the original XCiT-N12 model.

View on arXiv
Comments on this paper