Skip to main content
QUICK REVIEW

[Paper Review] ViTAR: Vision Transformer with Any Resolution

Qihang Fan, Quanzeng You|arXiv (Cornell University)|Mar 27, 2024
CCD and CMOS Imaging SensorsEngineering3 citations
TL;DR

ViTAR introduces a Vision Transformer with Any Resolution through two core innovations: Adaptive Token Merger (ATM) for efficient, resolution-agnostic token processing and Fuzzy Positional Encoding (FPE) for robust positional awareness across resolutions. The model achieves 83.3% top-1 accuracy at 1120×1120 and 80.4% at 4032×4032, with reduced computational cost and strong compatibility with self-supervised learning frameworks like MAE.

ABSTRACT

This paper tackles a significant challenge faced by Vision Transformers (ViTs): their constrained scalability across different image resolutions. Typically, ViTs experience a performance decline when processing resolutions different from those seen during training. Our work introduces two key innovations to address this issue. Firstly, we propose a novel module for dynamic resolution adjustment, designed with a single Transformer block, specifically to achieve highly efficient incremental token integration. Secondly, we introduce fuzzy positional encoding in the Vision Transformer to provide consistent positional awareness across multiple resolutions, thereby preventing overfitting to any single training resolution. Our resulting model, ViTAR (Vision Transformer with Any Resolution), demonstrates impressive adaptability, achieving 83.3\% top-1 accuracy at a 1120x1120 resolution and 80.4\% accuracy at a 4032x4032 resolution, all while reducing computational costs. ViTAR also shows strong performance in downstream tasks such as instance and semantic segmentation and can easily combined with self-supervised learning techniques like Masked AutoEncoder. Our work provides a cost-effective solution for enhancing the resolution scalability of ViTs, paving the way for more versatile and efficient high-resolution image processing.

Motivation & Objective

  • To address the poor resolution generalization of Vision Transformers (ViTs), which degrade in performance when tested on resolutions different from training.
  • To reduce computational cost during high-resolution inference, which typically scales quadratically with input size in standard ViTs.
  • To enable compatibility with self-supervised learning frameworks like Masked Autoencoder (MAE), which are hindered by complex positional encoding designs.
  • To develop a method that generalizes robustly across a wide range of input resolutions without overfitting to specific training resolutions.
  • To achieve strong performance in high-resolution vision tasks such as instance and semantic segmentation with minimal computational overhead.

Proposed method

  • Adaptive Token Merger (ATM) dynamically merges input tokens across a grid structure, progressively reducing sequence length to a fixed size while preserving spatial hierarchy.
  • ATM processes tokens by scattering them onto grids and iteratively merging tokens within each grid unit, producing a compact set of 'grid tokens' for subsequent attention computation.
  • Fuzzy Positional Encoding (FPE) replaces precise positional encodings with stochastic, noise-robust positional perturbations to prevent overfitting to specific resolutions.
  • FPE introduces random noise to positional embeddings during training, implicitly acting as data augmentation to improve generalization across resolution variations.
  • The model integrates with MAE-based self-supervised learning by maintaining compatibility with absolute positional encoding, unlike convolution-based alternatives.
  • Multi-resolution training using diverse input resolutions (224–1120) enhances generalization, with performance improving as training resolution diversity increases.

Experimental results

Research questions

  • RQ1Can a Vision Transformer be made robust to arbitrary input resolutions without performance degradation?
  • RQ2How can computational cost be reduced when processing high-resolution images in ViTs?
  • RQ3Can positional encoding be modified to prevent overfitting to specific training resolutions?
  • RQ4Is it possible to maintain compatibility with self-supervised learning frameworks like MAE while improving resolution generalization?
  • RQ5Does multi-resolution training significantly improve generalization across unseen resolutions?

Key findings

  • ViTAR achieves 83.3% top-1 accuracy at 1120×1120 resolution and 80.4% at 4032×4032, significantly outperforming baseline ViTs and ResFormer at high resolutions.
  • At 4032×4032 resolution, ViTAR reduces computational cost to less than one-tenth of standard ViT, demonstrating strong efficiency at scale.
  • FPE outperforms APE by 4.6% under the MAE framework at 4032×4032 resolution, proving its effectiveness in self-supervised settings.
  • Training with five resolutions (224–1120) increases 4032×4032 accuracy by 4.9% compared to training with only two resolutions (224, 448), confirming the benefit of multi-resolution data.
  • ViTAR maintains strong performance in downstream tasks like instance and semantic segmentation, with minimal computational overhead at high resolutions.
  • FPE achieves 83.1% top-1 accuracy at 1120×1120 and 78.6% at 4032×4032, demonstrating consistent performance across resolution ranges.

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.