Papers › RegionViT: Regional-to-Local Attention for Vision Transformers

RegionViT: Regional-to-Local Attention for Vision Transformers

4 Jun 2021ICLR 2022 4arXiv:2106.02689archive 2025-07-28

Chun-Fu Chen, Rameswar Panda, Quanfu Fan

Vision transformer (ViT) has recently shown its strong capability in achieving comparable results to convolutional neural networks (CNNs) on image classification. However, vanilla ViT simply inherits the same architecture from the natural language processing directly, which is often not optimized for vision applications. Motivated by this, in this paper, we propose a new architecture that adopts the pyramid structure and employ a novel regional-to-local attention rather than global self-attention in vision transformers. More specifically, our model first generates regional tokens and local tokens from an image with different patch sizes, where each regional token is associated with a set of local tokens based on the spatial location. The regional-to-local attention includes two steps: first, the regional self-attention extract global information among all regional tokens and then the local self-attention exchanges the information among one regional token and the associated local tokens via self-attention. Therefore, even though local self-attention confines the scope in a local region but it can still receive global information. Extensive experiments on four vision tasks, including image classification, object and keypoint detection, semantics segmentation and action recognition, show that our approach outperforms or is on par with state-of-the-art ViT variants including many concurrent works. Our source codes and models are available at https://github.com/ibm/regionvit.

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="2106.02689")

Code

Syntology Ran 13 of 25 code samples harvested from 3 repositories linked to this paper; 12 have no recorded run. Of those that ran: 1 ran · honoured contract; 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 10 ran with no contract checked.

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

IBM/RegionViT officialmentioned in papermentioned on GitHubpytorch report
conceptofmind/Region-ViT-flax mentioned on GitHubjax report
dc3ea9f/RegionViT mentioned 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

25 samples harvested; 13 ran; 1 honoured the contract we drafted; 12 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
1ran · our draft was wrong
1ran · fixture could not drive it
10ran
12unverified

Licence: 0 of the 25 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 3 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.

AttentionWithRelPos IBM/RegionViT/regionvit/regionvit.py official repository ran Apache-2.0 (permissive) · c7197ed401e12d9c · report
LayerNorm2d IBM/RegionViT/regionvit/regionvit.py official repository ran fingerprinted Apache-2.0 (permissive) · fb988c11d14bdbfc · report
PatchEmbed IBM/RegionViT/regionvit/regionvit.py official repository ran Apache-2.0 (permissive) · 6688b31853ed31b4 · report
Projection IBM/RegionViT/regionvit/regionvit.py official repository ran fingerprinted Apache-2.0 (permissive) · 54d188ee9d7b46be · report
R2LAttentionPlusFFN IBM/RegionViT/regionvit/regionvit.py official repository ran Apache-2.0 (permissive) · eb1f3e402e1dc74c · report
convert_to_flatten_layout IBM/RegionViT/regionvit/regionvit.py official repository ran · fixture could not drive it Apache-2.0 (permissive) · b3f0623f46fcc9af · report
ConvAttBlock IBM/RegionViT/regionvit/regionvit.py official repository unverified Apache-2.0 (permissive) · fbf61a6af6d13754 · report
RegionViT IBM/RegionViT/regionvit/regionvit.py official repository unverified Apache-2.0 (permissive) · 9717421cdc52208a · report
convert_to_spatial_layout IBM/RegionViT/regionvit/regionvit.py official repository unverified Apache-2.0 (permissive) · cc95bcc461e63789 · report
DropPath dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) ran fingerprinted MIT (permissive) · 67186f084bc62090 · report
MultiHeadSelfAttention dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) ran MIT (permissive) · 02fc42edbfdbea41 · report
PatchEmbed dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) ran MIT (permissive) · bc7dfc56f71e7a9b · report
PatchMerging dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) ran MIT (permissive) · 77415c05ec9a1664 · report
divisible_by conceptofmind/Region-ViT-flax/region_vit_flax.py community (archive-listed) ran fingerprinted MIT (permissive) · cc47cc901f6ee6ea · report
get_2d_relative_position_index dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) ran · honoured contract fingerprinted MIT (permissive) · 0936ade4b0df66b9 · report
remap_position_index dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) ran · our draft was wrong fingerprinted MIT (permissive) · b572c48319c37542 · report
Attention conceptofmind/Region-ViT-flax/region_vit_flax.py community (archive-listed) unverified MIT (permissive) · 43d3378c696e6de4 · report
BasicLayer dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) unverified MIT (permissive) · 23ae2961428275c4 · report
Downsample conceptofmind/Region-ViT-flax/region_vit_flax.py community (archive-listed) unverified MIT (permissive) · ddaf1aef43c3e9f2 · report
MLP conceptofmind/Region-ViT-flax/region_vit_flax.py community (archive-listed) unverified MIT (permissive) · 4a180adb3206c763 · report
PEG conceptofmind/Region-ViT-flax/region_vit_flax.py community (archive-listed) unverified MIT (permissive) · 701acfe4475d1a8d · report
R2LEncoderBlock dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) unverified MIT (permissive) · 90fc7131c656ed6b · report
R2LTransformer conceptofmind/Region-ViT-flax/region_vit_flax.py community (archive-listed) unverified MIT (permissive) · 7b8ebb406d076c7a · report
RegionViT dc3ea9f/RegionViT/models/region_vit.py community (archive-listed) unverified MIT (permissive) · d872e0d4743209a6 · report
RegionViT conceptofmind/Region-ViT-flax/region_vit_flax.py community (archive-listed) unverified MIT (permissive) · eda0483677e50eae · report

Tasks

Action RecognitionImage ClassificationKeypoint DetectionObject Detectionimage-classification

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Introduced by this paper: RegionViT

RegionViT

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