Methods › General › Attention Mechanisms › Global Sub-Sampled Attention

Global Sub-Sampled Attention

2 papers tagged archive 2025-07-28

Introduced by Xiangxiang Chu et al. in Twins: Revisiting the Design of Spatial Attention in Vision Transformers

archive 2025-07-28 Description, source and code snippet are the archive's method entry.

Global Sub-Sampled Attention, or GSA, is a local attention mechanism used in the Twins-SVT architecture.

A single representative is used to summarize the key information for each of m ×n subwindows and the representative is used to communicate with other sub-windows (serving as the key in self-attention), which can reduce the cost to 𝒪(m n H W d)=𝒪((H² W² d)/(k₁ k₂)). This is essentially equivalent to using the sub-sampled feature maps as the key in attention operations, and thus it is termed global sub-sampled attention (GSA).

If we alternatively use the LSA and GSA like separable convolutions (depth-wise + point-wise). The total computation cost is 𝒪((H² W² d)/(k₁ k₂)+k₁ k₂ H W d) . We have:

(H² W² d)/(k₁ k₂)+k₁ k₂ H W d ≥2 H W d √(H W)

The minimum is obtained when k₁ ·k₂=√(H W). Note that H=W=224 is popular in classification. Without loss of generality, square sub-windows are used, i.e., k₁=k₂. Therefore, k₁=k₂=15 is close to the global minimum for H=W=224. However, the network is designed to include several stages with variable resolutions. Stage 1 has feature maps of 56 ×56, the minimum is obtained when k₁=k₂=√(56) ≈7. Theoretically, we can calibrate optimal k₁ and k₂ for each of the stages. For simplicity, k₁=k₂=7 is used everywhere. As for stages with lower resolutions, the summarizing window-size of GSA is controlled to avoid too small amount of generated keys. Specifically, the sizes of 4,2 and 1 are used for the last three stages respectively.

PaperSource

Papers archive 2025-07-28

2 shown of 2, newest first. Repository counts are the archive's code-links table. A Syntology line states what Syntology ran from that paper's harvested code; it is per sample and not a correctness claim.

Tasks archive 2025-07-28

7 tasks the archive attaches to papers tagged with this method, by distinct papers. A task without a page in the catalog is plain text.

TaskPapers
Avg1
Benchmarking1
Fact Checking1
Fact Verification1
Image Classification1
Retrieval1
Semantic Segmentation1

Usage over time archive 2025-07-28

Papers per year tagged with Global Sub-Sampled Attention: 2021 to 2023, peak 1 1 0 2021: 1 paper 2021 2022: 0 papers 2022 2023: 1 paper 2023
Papers per year the archive tags with this method, by the paper's archive date (2 dated). Bars are counts, not a trend claim.

Components: the archive holds no method-to-method composition, so PwC's Components table cannot be rebuilt; the Papers list carries no Results column for the same reason (the archive does not join its leaderboard rows to method tags).

Categories archive 2025-07-28

Attention Mechanisms

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