Skip to main content
QUICK REVIEW

[Paper Review] Universal Few-shot Learning of Dense Prediction Tasks with Visual Token Matching

Donggyun Kim, Jinwoo Kim|arXiv (Cornell University)|Mar 27, 2023
Domain Adaptation and Few-Shot LearningComputer Science3 citations
TL;DR

This paper proposes Visual Token Matching (VTM), a universal few-shot learning framework for dense prediction tasks that uses non-parametric patch-level matching on image and label embeddings. It achieves competitive performance with only 10 labeled examples (0.004% of full supervision), often outperforming fully supervised baselines on unseen tasks across diverse dense prediction tasks like semantic segmentation and depth estimation.

ABSTRACT

Dense prediction tasks are a fundamental class of problems in computer vision. As supervised methods suffer from high pixel-wise labeling cost, a few-shot learning solution that can learn any dense task from a few labeled images is desired. Yet, current few-shot learning methods target a restricted set of tasks such as semantic segmentation, presumably due to challenges in designing a general and unified model that is able to flexibly and efficiently adapt to arbitrary tasks of unseen semantics. We propose Visual Token Matching (VTM), a universal few-shot learner for arbitrary dense prediction tasks. It employs non-parametric matching on patch-level embedded tokens of images and labels that encapsulates all tasks. Also, VTM flexibly adapts to any task with a tiny amount of task-specific parameters that modulate the matching algorithm. We implement VTM as a powerful hierarchical encoder-decoder architecture involving ViT backbones where token matching is performed at multiple feature hierarchies. We experiment VTM on a challenging variant of Taskonomy dataset and observe that it robustly few-shot learns various unseen dense prediction tasks. Surprisingly, it is competitive with fully supervised baselines using only 10 labeled examples of novel tasks (0.004% of full supervision) and sometimes outperforms using 0.1% of full supervision. Codes are available at https://github.com/GitGyun/visual_token_matching.

Motivation & Objective

  • Address the lack of a unified few-shot learning framework for arbitrary dense prediction tasks in computer vision.
  • Overcome the high cost of pixel-wise annotation by enabling few-shot generalization across diverse tasks with minimal labeled data.
  • Design a model that maintains a unified architecture while flexibly adapting to unseen tasks using minimal task-specific parameters.
  • Enable robust few-shot generalization across diverse dense prediction tasks, including semantic segmentation, depth estimation, and surface normal prediction.
  • Demonstrate that a single unified model can achieve performance competitive with fully supervised baselines using drastically fewer labeled examples.

Proposed method

  • Represent input images and labels as learnable patch-level tokens using Vision Transformer (ViT) encoders.
  • Perform non-parametric matching between image and label tokens based on similarity in their embedded representations.
  • Introduce a small set of task-specific parameters to modulate the matching mechanism, enabling flexible adaptation to unseen task semantics.
  • Implement a hierarchical encoder-decoder architecture with multi-scale feature matching using self-attention mechanisms.
  • Use a convolutional decoder to reconstruct dense predictions from matched token features, preserving spatial structure.
  • Train the model using episodic meta-learning, where each episode simulates a novel task with a few labeled support images.
Figure 1: Overall architecture of VTM. Our model is a hierarchical encoder-decoder with four main components: the image encoder $f_{\mathcal{T}}$ , label encoder $g$ , label decoder $h$ , and the matching module. See the text for more detailed descriptions.
Figure 1: Overall architecture of VTM. Our model is a hierarchical encoder-decoder with four main components: the image encoder $f_{\mathcal{T}}$ , label encoder $g$ , label decoder $h$ , and the matching module. See the text for more detailed descriptions.

Experimental results

Research questions

  • RQ1Can a single unified model generalize to arbitrary dense prediction tasks using only a few labeled examples?
  • RQ2How effective is non-parametric visual token matching in few-shot dense prediction compared to fully supervised baselines?
  • RQ3What is the impact of support set size on few-shot performance across diverse tasks?
  • RQ4How robust is the model to variations in the choice of support set images?
  • RQ5How does the amount of meta-training data affect the few-shot generalization capability of the model?

Key findings

  • VTM achieves competitive performance with only 10 labeled examples per task (0.004% of full supervision), often outperforming fully supervised baselines.
  • With 275 labeled examples (0.1% of full supervision), VTM surpasses or matches the performance of fully supervised models on multiple dense prediction tasks.
  • The model shows marginal performance variance across different randomly sampled support sets, indicating robustness to support set choice.
  • Performance improves consistently with more meta-training tasks, demonstrating the benefit of diverse task exposure during pre-training.
  • The model generalizes well even when trained on incomplete datasets with partial task annotations, showing practical robustness.
  • Attention maps reveal that VTM flexibly adapts its similarity focus to relevant image regions depending on the task (e.g., objects for segmentation, planes for surface normals).
Figure 2: Qualitative comparison of few-shot learning methods in $10$ -shot evaluation for ten dense prediction tasks in Taskonomy. While other approaches fail, our model successfully few-shot learns all novel tasks with diverse semantics and different label representations.
Figure 2: Qualitative comparison of few-shot learning methods in $10$ -shot evaluation for ten dense prediction tasks in Taskonomy. While other approaches fail, our model successfully few-shot learns all novel tasks with diverse semantics and different label representations.

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.