atlas

Research map / Architectures and efficiency / Attention and transformers

MSPE: Multi-Scale Patch Embedding Prompts Vision Transformers to Any Resolution

NeurIPS 2024 · Architectures and efficiency › Attention and transformers · approach: Hybrid and interpretable ViT designs

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes MSPE, which replaces a ViT's patch embedding with multiple adaptive, PI-resized convolution kernels trained for 5 epochs with a frozen encoder, so pretrained ViTs can process images at native variable resolutions.

Problem

Pretrained ViTs are tied to a fixed input resolution; changing resolution degrades accuracy and existing resolution-adaptive methods either require costly full retraining or are incompatible with pretrained models.

Approach

Keep the Transformer encoder frozen and optimize only the patch embedding layer: multiple variable-sized kernels whose size adapts to input resolution via pseudo-inverse resize, trained with mixed-resolution loss so images are processed at native size and aspect ratio without resizing.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace standard patch embedding with multi-scale adaptive kernelsViT-B · ImageNet-1K, 28×28Top-1 accuracy: 14.86 -> 56.41Helped
Replace standard patch embedding with multi-scale adaptive kernelsSETR Naive (ViT-L) · ADE20K, 128×128mIOU: 31.44 -> 39.65Helped
Replace standard patch embedding with multi-scale adaptive kernelsSETR Naive (ViT-L) · Cityscapes, 192×192mIOU: 59.78 -> 65.90Helped
Replace standard patch embedding with multi-scale adaptive kernelsViTDet (ViT-B) · COCO2017, 256box AP: 0.19 -> 0.30Helped
Use MSPE rather than image resizing at inferenceViT-B · ImageNet-1K, 28×28Top-1 accuracy: 52.99 -> 56.41Helped
Increase training from 1 to 5 epochs (ablation)MSPE ViT-B · ImageNet-1K, 28×28Top-1 accuracy: 28.07 -> 56.42Helped
Increase training from 5 to 20 epochs (ablation)MSPE ViT-B · ImageNet-1K, 28×28Top-1 accuracy: 56.42 -> 58.88Helped
Set λ to 0 rather than 1 or 2 (ablation)MSPE · ImageNet-1KTop-1 accuracyHurt
Increase kernel count from K=3 to K=4 (ablation)MSPE · ImageNet-1KTop-1 accuracyNo clear effect
Use PI-resize for resizing patch embedding weights instead of other resizing methods (ablation)MSPE · ImageNet-1KTop-1 accuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: ImageNet-1K ADE20K Cityscapes COCO2017

Benchmarks: ImageNet-1K ADE20K Cityscapes COCO2017

Metrics: top-1 accuracy mIOU mACC F1-score AP

Baselines: Vanilla ViT FlexiViT ResFormer NaViT IMG-resize

Builds on: FlexiViT ResFormer NaViT ViT PI-resize

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy