Spatial-Reduction Attention
An attention variant in the SegFormer encoder that reduces the number of tokens by downsampling keys and values, lowering complexity from quadratic to approximately linear.
Timeline (last 90 days)
Because SegFormer uses spatially reduced attention, standard attention rollout methods cannot be applied directly; the authors perform gradient-weighted attention rollout only on the last stage of the encoder, since the attention matrix at that stage is square.
Spatially reduced attention reduces the number of tokens by first downsampling the feature map in a convolutional manner, bringing the complexity down to approximately linear, but it results in a non-square attention matrix.
All Facts (2)
Because SegFormer uses spatially reduced attention, standard attention rollout methods cannot be applied directly; the authors perform gradient-weighted attention rollout only on the last stage of the encoder, since the attention matrix at that stage is square.
50%UnverifiedSpatially reduced attention reduces the number of tokens by first downsampling the feature map in a convolutional manner, bringing the complexity down to approximately linear, but it results in a non-square attention matrix.
50%