Papers › Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encoding

Multi-Scale Vision Longformer: A New Vision Transformer for High-Resolution Image Encoding

29 Mar 2021ICCV 2021 10arXiv:2103.15358archive 2025-07-28

Pengchuan Zhang, Xiyang Dai, Jianwei Yang, Bin Xiao, Lu Yuan, Lei Zhang, Jianfeng Gao

This paper presents a new Vision Transformer (ViT) architecture Multi-Scale Vision Longformer, which significantly enhances the ViT of \cite{dosovitskiy2020image} for encoding high-resolution images using two techniques. The first is the multi-scale model structure, which provides image encodings at multiple scales with manageable computational cost. The second is the attention mechanism of vision Longformer, which is a variant of Longformer \cite{beltagy2020longformer}, originally developed for natural language processing, and achieves a linear complexity w.r.t. the number of input tokens. A comprehensive empirical study shows that the new ViT significantly outperforms several strong baselines, including the existing ViT models and their ResNet counterparts, and the Pyramid Vision Transformer from a concurrent work \cite{wang2021pyramid}, on a range of vision tasks, including image classification, object detection, and segmentation. The models and source code are released at \url{https://github.com/microsoft/vision-longformer}.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2103.15358")

Code

Syntology Ran 6 of 10 code samples harvested from 2 repositories linked to this paper; 4 have no recorded run. Of those that ran: 1 ran · honoured contract; 2 ran · violated contract; 3 ran · our draft was wrong.

By repository: official repository: 3 samples from 1 repository, 3 ran; community (archive-listed): 7 samples from 1 repository, 3 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

microsoft/vision-longformer officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 6 ran; 1 honoured the contract we drafted; 4 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
2ran · violated contract
3ran · our draft was wrong
4unverified

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

find_modules microsoft/vision-longformer/src/models/msvit.py official repository ran · our draft was wrong MIT (permissive) · 4e291c3ece372165 · report
get_module_device microsoft/vision-longformer/src/models/msvit.py official repository ran · our draft was wrong MIT (permissive) · f8ef5ca2539fcee5 · report
init_ microsoft/vision-longformer/src/models/msvit.py official repository ran · honoured contract fingerprinted MIT (permissive) · 3444251df88e6169 · report
default microsoft/VisionLongformerForObjectDetection/msvit/performer.py community (archive-listed) ran · violated contract fingerprinted MIT (permissive) · 60fff7c3c400d7ff · report
exists microsoft/VisionLongformerForObjectDetection/msvit/performer.py community (archive-listed) ran · violated contract MIT (permissive) · aa5486a3650902d8 · report
softmax_kernel microsoft/VisionLongformerForObjectDetection/msvit/performer.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 757aee54843af070 · report
mask_invalid_locations microsoft/VisionLongformerForObjectDetection/msvit/slidingchunk_2d.py community (archive-listed) unverified MIT (permissive) · ca8f2c57ed27ae92 · report
resize_pos_embed_1d microsoft/VisionLongformerForObjectDetection/converter.py community (archive-listed) unverified MIT (permissive) · 0b417de020bf073b · report
resize_pos_embed_2d microsoft/VisionLongformerForObjectDetection/converter.py community (archive-listed) unverified MIT (permissive) · 3d16b011ef55503e · report
slidingchunk_2dautograd microsoft/VisionLongformerForObjectDetection/msvit/slidingchunk_2d.py community (archive-listed) unverified MIT (permissive) · 56b6ba9dcdd328f4 · report

Tasks

Image ClassificationInstance SegmentationObject Detectionimage-classificationobject-detection

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Classification ImageNet ViL-Medium-D GFLOPs 8.7 #442 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Medium-D Number of params 39.7M #442 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Medium-D Top 1 Accuracy 83.3% #442 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Base-D GFLOPs 13.4 #460 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Base-D Number of params 55.7M #460 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Base-D Top 1 Accuracy 83.2% #460 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Medium-W Number of params 39.8M #487 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Medium-W Top 1 Accuracy 82.9% #487 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Small GFLOPs 4.86 #584 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Small Number of params 24.6M #584 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Small Top 1 Accuracy 82% #584 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Base-W GFLOPs 6.74 #600 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Base-W Number of params 79M #600 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Base-W Top 1 Accuracy 81.9% #600 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Tiny-RPB GFLOPs 1.3 #904 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Tiny-RPB Number of params 6.7M #904 of 1060 Archive leaderboard report
Image Classification ImageNet ViL-Tiny-RPB Top 1 Accuracy 76.7% #904 of 1060 Archive leaderboard report
Instance Segmentation COCO minival Mask R-CNN (ViL Base, multi-scale, 3x lr) AP75 49.9 #47 of 93 Archive leaderboard report
Instance Segmentation COCO minival Mask R-CNN (ViL Base, multi-scale, 3x lr) mask AP 45.7 #47 of 93 Archive leaderboard report
Instance Segmentation COCO minival Mask R-CNN (ViL Base, 1x lr) AP50 67.2 #48 of 93 Archive leaderboard report
Instance Segmentation COCO minival Mask R-CNN (ViL Base, 1x lr) AP75 49.3 #48 of 93 Archive leaderboard report
Instance Segmentation COCO minival Mask R-CNN (ViL Base, 1x lr) mask AP 45.1 #48 of 93 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base, multi-scale, 3x) AP75 47.6 #124 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base, multi-scale, 3x) APL 58.1 #124 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base, multi-scale, 3x) APM 48 #124 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base, multi-scale, 3x) APS 29.9 #124 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base, multi-scale, 3x) box AP 44.7 #124 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base) AP50 65.5 #132 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base) AP75 47.1 #132 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base) APL 58.3 #132 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base) APM 47.9 #132 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base) APS 28.9 #132 of 220 Archive leaderboard report
Object Detection COCO minival RetinaNet (ViL-Base) box AP 44.3 #132 of 220 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

1x1 ConvolutionAbsolute Position EncodingsAdamAdamWAttentionAttention DropoutAverage PoolingBPEBatch NormalizationBottleneck Residual BlockConvolutionDense ConnectionsDropoutGlobal Average PoolingKaiming InitializationLabel SmoothingLayer NormalizationLinear LayerLinear Warmup With Linear DecayLongformerMax PoolingMulti-Head AttentionPosition-Wise Feed-Forward LayerReLUResidual BlockResidual ConnectionSoftmaxTransformerVision TransformerWeight DecayWordPiece

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections