Skip to main content
QUICK REVIEW

[Paper Review] Multi-Head Self-Attention via Vision Transformer for Zero-Shot Learning

Faisal Alamri, Anjan Dutta|arXiv (Cornell University)|Jul 30, 2021
Domain Adaptation and Few-Shot LearningComputer Science35 references23 citations
TL;DR

This paper proposes ViT-ZSL, a Vision Transformer-based model that leverages multi-head self-attention to learn discriminative visual attributes without object part annotations, achieving state-of-the-art harmonic mean performance on all three GZSL benchmarks (AWA2, CUB, SUN) by effectively localizing relevant image regions for unseen class recognition.

ABSTRACT

Zero-Shot Learning (ZSL) aims to recognise unseen object classes, which are not observed during the training phase. The existing body of works on ZSL mostly relies on pretrained visual features and lacks the explicit attribute localisation mechanism on images. In this work, we propose an attention-based model in the problem settings of ZSL to learn attributes useful for unseen class recognition. Our method uses an attention mechanism adapted from Vision Transformer to capture and learn discriminative attributes by splitting images into small patches. We conduct experiments on three popular ZSL benchmarks (i.e., AWA2, CUB and SUN) and set new state-of-the-art harmonic mean results {on all the three datasets}, which illustrate the effectiveness of our proposed method.

Motivation & Objective

  • Address the lack of explicit attribute localization in existing zero-shot learning (ZSL) methods that rely on pretrained visual features.
  • Overcome the limitation of weak local visual representation learning in ZSL by introducing a stronger attention mechanism.
  • Enable zero-shot recognition of unseen object classes without requiring part-level annotations or object detection.
  • Explore the feasibility and effectiveness of Vision Transformers in ZSL for joint global and local feature learning via multi-head self-attention.
  • Achieve state-of-the-art performance on standard GZSL benchmarks through improved visual-semantic alignment using attention-driven feature learning.

Proposed method

  • Split input images into fixed-size patches to serve as input tokens for the Vision Transformer encoder.
  • Apply multi-head scaled dot-product self-attention to compute relationships between image patches, enabling the model to attend to discriminative local and global features.
  • Use learnable class tokens to aggregate patch representations into a unified image-level embedding.
  • Project visual features into a shared semantic space using learned attention weights, aligning them with semantic embeddings of seen and unseen classes.
  • Train the model end-to-end using contrastive loss to maximize similarity between visual features and their corresponding semantic embeddings.
  • Leverage the self-attention mechanism to implicitly localize relevant attributes without explicit supervision, improving generalization to unseen classes.

Experimental results

Research questions

  • RQ1Can Vision Transformer-based multi-head self-attention improve visual feature localization for zero-shot learning without part-level annotations?
  • RQ2How effective is the self-attention mechanism in capturing both local and global discriminative features for unseen class recognition?
  • RQ3Does the proposed ViT-ZSL model outperform existing state-of-the-art ZSL methods in the generalized zero-shot learning (GZSL) setting?
  • RQ4To what extent does the attention mechanism enable the model to focus on semantically relevant image regions under partial occlusion or incomplete object appearances?
  • RQ5Can the model generalize to datasets with a large number of object classes, such as SUN, without fine-tuning or additional supervision?

Key findings

  • ViT-ZSL achieves a new state-of-the-art harmonic mean of 90.02% on the AWA2 dataset, outperforming all prior methods including AREN (92.9% accuracy, but not reported in harmonic mean).
  • On the CUB dataset, ViT-ZSL achieves the highest accuracy for unseen classes (83.4%) and the second-highest for seen classes (92.1%), resulting in the best harmonic mean among all reported models.
  • On the SUN dataset, ViT-ZSL achieves the highest harmonic mean of 47.9%, significantly outperforming all other models, demonstrating strong generalization on large-scale, fine-grained datasets.
  • Qualitative attention maps show that the model effectively focuses on object-level attributes even when objects are partially visible or occluded, such as in images with only the head or top part of the bird visible.
  • The model learns to attend to contextually relevant regions (e.g., forest, ground, or perching structures) that correlate with semantic attributes, improving semantic alignment.
  • Despite strong performance, the model still exhibits a bias toward seen classes, indicating a need for future work in transductive training or domain adaptation to further balance performance across seen and unseen classes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.