Skip to main content
QUICK REVIEW

[Paper Review] SEGA: Semantic Guided Attention on Visual Prototype for Few-Shot Learning

Fengyuan Yang, Ruiping Wang|arXiv (Cornell University)|Nov 8, 2021
Domain Adaptation and Few-Shot LearningComputer Science5 citations
TL;DR

SEGA proposes a semantic guided attention mechanism that uses class-level semantic embeddings to guide visual feature attention during few-shot learning, enhancing discriminative prototype representations. By learning category-specific attention vectors from semantic priors, SEGA achieves state-of-the-art performance on miniImageNet, tieredImageNet, CUB, and CIFAR-FS, especially in 1-shot settings, outperforming prior methods by up to 4.5% accuracy.

ABSTRACT

Teaching machines to recognize a new category based on few training samples especially only one remains challenging owing to the incomprehensive understanding of the novel category caused by the lack of data. However, human can learn new classes quickly even given few samples since human can tell what discriminative features should be focused on about each category based on both the visual and semantic prior knowledge. To better utilize those prior knowledge, we propose the SEmantic Guided Attention (SEGA) mechanism where the semantic knowledge is used to guide the visual perception in a top-down manner about what visual features should be paid attention to when distinguishing a category from the others. As a result, the embedding of the novel class even with few samples can be more discriminative. Concretely, a feature extractor is trained to embed few images of each novel class into a visual prototype with the help of transferring visual prior knowledge from base classes. Then we learn a network that maps semantic knowledge to category-specific attention vectors which will be used to perform feature selection to enhance the visual prototypes. Extensive experiments on miniImageNet, tieredImageNet, CIFAR-FS, and CUB indicate that our semantic guided attention realizes anticipated function and outperforms state-of-the-art results.

Motivation & Objective

  • To address the challenge of limited visual data in few-shot learning by leveraging semantic prior knowledge to improve feature representation.
  • To enable top-down attention guidance from semantic embeddings to select key visual features for novel classes.
  • To learn a differentiable mapping from semantic embeddings to class-specific attention vectors for visual prototypes.
  • To improve generalization and discriminability of visual prototypes when only one or a few samples are available per class.
  • To validate that semantic knowledge can effectively guide visual perception in a human-like, attention-based manner.

Proposed method

  • A feature extractor is trained on base classes to embed few-shot images into visual prototypes.
  • A learnable network maps class semantic embeddings (e.g., text descriptions or class names) to category-specific attention vectors.
  • During inference, the attention vectors are generated from the novel class name and applied to the visual prototype via element-wise multiplication to highlight discriminative features.
  • The attention mechanism performs feature selection by emphasizing key visual dimensions, improving prototype discriminability.
  • The framework is trained end-to-end using cross-entropy loss on base classes, with attention supervision via contrastive learning or metric learning.
  • The method generalizes well: semantic-visual alignment learned on base classes transfers effectively to novel classes.

Experimental results

Research questions

  • RQ1Can semantic knowledge be effectively used to guide visual feature attention in few-shot learning?
  • RQ2Does attention guided by semantics improve the discriminativeness of visual prototypes with few samples?
  • RQ3How does semantic-guided attention compare to baseline methods that rely solely on visual features or prototype reconstruction?
  • RQ4To what extent does the alignment between semantic and visual spaces generalize from base to novel classes?
  • RQ5Does the benefit of semantic guidance diminish as the number of shots increases?

Key findings

  • SEGA achieves 69.04% top-1 accuracy on miniImageNet in the 5-way 1-shot setting, outperforming the previous SOTA AM3 by 3.74%.
  • On tieredImageNet, SEGA reaches 79.03% accuracy in 5-way 1-shot, surpassing the next best method by 0.91%.
  • On CUB, SEGA achieves 84.57% accuracy in 5-way 1-shot, significantly outperforming the prior SOTA FEAT (68.87%) and DeepEMD (75.65%).
  • On CIFAR-FS, SEGA achieves 78.45% accuracy in 5-way 1-shot, exceeding MetaOptNet (72.0%) and RFS (73.9%).
  • Grad-CAM visualizations confirm that SEGA focuses on semantically relevant regions (e.g., animal body parts), while baselines often attend to background noise.
  • The performance gain from semantic guidance is most significant in 1-shot scenarios, diminishing as shot count increases, indicating that semantic attention compensates for visual prototype instability.

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.