Paper commentary
Coordinate Attention for Efficient Mobile Network Design
Coordinate attention adds position information to channel attention cheaply
- Problem Channel attention such as SE ignores where signals sit, because it pools each map to one value per channel. Spatial add-ons use local convolutions, and non-local blocks cost too much for mobile networks.
- Method Coordinate attention replaces global pooling with two one-dimensional poolings, one per spatial axis, then multiplies the input by the resulting row and column attention maps.
- Results On ImageNet with MobileNetV2, coordinate attention scores 74.3 top-1, compared with 73.5 for SE attention.
Why position gets lost in mobile attention
Squeeze-and-Excitation (SE) attention is the most popular attention choice for mobile networks, mainly because its extra cost stays low. It pools each feature map to one value per channel and then reweights the channels, so it models how channels relate but not where the signal sits. Spatial attention in BAM and CBAM tries to recover position by shrinking the channel count and applying convolutions.
Convolutions see only local neighborhoods, yet vision tasks need long-range dependencies, so that route falls short. Non-local and self-attention blocks could capture long-range links, but their computation is too heavy for mobile models.
The question is whether positional information can be added to cheap channel attention without the cost of non-local blocks. The authors aim to keep the channel reweighting that makes SE cheap while adding the position information it lacks.
Pooling along height and width separately
The key idea is to keep the channel reweighting of channel attention but replace its single global pooling with two one-dimensional poolings, one along each spatial axis. Each pooling leaves one spatial axis intact, so the resulting maps still record which row or column a signal came from. The authors argue this suits mobile models because the extra step is light and avoids the heavy computation of non-local blocks.
Formally, the height-wise output for channel c at row h averages the input across the width: \( z^h_c(h) = \frac{1}{W} \sum_{0 \le i < W} x_c(h,i) \). The width-wise output for column w averages over the height in the same way: \( z^w_c(w) = \frac{1}{H} \sum_{0 \le j < H} x_c(j,w) \). Because the height pooling keeps rows and the width pooling keeps columns, one map carries long-range context along one axis while the other keeps exact position.
Standard channel attention instead produces a single feature vector from its squeeze step, so these two maps carry more spatial structure.
Turning pooled maps into attention weights
The two pooled maps are concatenated along the spatial dimension and passed through one shared 1×1 convolution with a non-linearity. The output is \( f = \delta(F_1([z^h, z^w])) \), with \( f \in \mathbb{R}^{C/r \times (H+W)} \). So f is a compact map that encodes both directions, and the reduction ratio r shrinks its channel count to save parameters.
The authors then split f back into f^h and f^w along the spatial dimension. Two further 1×1 convolutions, F^h and F^w, expand each part back to the C channels of the input, and a sigmoid turns them into weights. That gives \( g^h = \sigma(F^h(f^h)) \) and \( g^w = \sigma(F^w(f^w)) \). The design had three criteria: it should be simple and cheap, use the positional information fully, and still capture channel relations.
The output multiplies each element of the input by its row weight and its column weight: \( y_c(i,j) = x_c(i,j) \times g^h_c(i) \times g^w_c(j) \). The authors read each attention element as a signal of whether the object of interest exists in that row or that column.
Which parts of the block matter on ImageNet
The ImageNet ablations start from MobileNetV2, which scores 72.3 top-1 and is trained for 200 epochs with a batch size of 256. Keeping only the horizontal attention or only the vertical attention gives 73.5 in both cases, the same as SE attention. So one direction alone adds the gain that SE gives, and nothing beyond it.
With both directions, coordinate attention scores 74.3, which is 2.0 above the baseline. The authors read the result as coordinate information embedding helping more than either direction alone, at similar parameters.
Width multipliers, reduction ratio and the CBAM comparison
Across weight multipliers on MobileNetV2, CBAM tracks SE closely, while coordinate attention scores highest at each width. At multiplier 1.0 the scores are 73.5 for SE, 73.6 for CBAM and 74.3 for coordinate attention. The spatial branch of CBAM seems to add little on top of SE in mobile networks, according to the authors.
On MobileNeXt, which uses sandglass blocks, the baseline scores 74.0, SE 74.7 and coordinate attention 75.2.
The parameter counts are close, so the authors call this robustness to the reduction ratio.
Cost and the EfficientNet-b0 baseline
On MobileNetV2, M-Adds rise from 300M to 310M, and latency on a Google Pixel 4 moves from 14-16ms to 17-19ms. On MobileNeXt the M-Adds go from 300M to 330M for the coordinate attention variant. So the overhead is modest, but it is not zero.
EfficientNet-b0 already contains SE attention, so the authors swap its SE blocks for coordinate attention and keep the other settings.
Why the positional encoding beats the CBAM spatial branch
The authors give two reasons for the gap between their positional encoding and CBAM's spatial branch. First, CBAM's spatial module reduces the channel dimension to 1, which the authors say loses information. Coordinate attention instead uses a reduction ratio to shrink the bottleneck only moderately. Second, CBAM uses a 7×7 convolution for local spatial information, while coordinate attention pools along two complementary 1D directions for long-range context.
The authors also show Grad-CAM visualizations, which describe the attention qualitatively rather than as a score.
Object detection with SSDLite320
Detection uses SSDLite320 with a MobileNetV2 backbone, and the coordinate attention model starts from the ImageNet-pretrained backbone. The COCO runs use the 2017 validation set, and the reported results are single-model tests.
On COCO, the MobileNetV2 baseline gets 22.3 AP, SE attention 23.7, CBAM 23.0 and coordinate attention 24.5. Coordinate attention adds 0.5M parameters over the baseline, going from 4.3M to 4.8M at 0.8B M-Adds for both. The authors read the higher AP as evidence that the positional encoding transfers to detection, not only ImageNet accuracy.
On Pascal VOC 2007, SE attention and CBAM both leave mAP at the baseline's 71.7. Coordinate attention raises it to 73.1 on the same detector and test set. That advantage was measured on one backbone and one detector, SSDLite320.
Semantic segmentation with DeepLabV3
Segmentation uses DeepLabV3 with a MobileNetV2 backbone, and the ASPP's 3×3 convolutions become depthwise separable convolutions. Pascal VOC 2012 trains on 10,582 augmented images and validates on 1,449 images.
At output stride 8, coordinate attention scores 73.96, compared to 71.82 for the baseline. These runs do not use COCO pre-training.
On Cityscapes at output stride 8, tested at 1024×2048, the baseline scores 71.4 mIoU and coordinate attention 74.0. SE attention scores 72.2 and CBAM 71.4 in the same table. The authors say the gain is largest on segmentation because the block captures long-range dependencies with precise position, which matters for dense predictions.
Limitations
The ImageNet ablations use MobileNetV2, MobileNeXt appears in one further table, and EfficientNet-b0 appears in one comparison. Detection uses only SSDLite320, and segmentation uses only DeepLabV3 with these mobile backbones. The tables report one value per setting, and none give variance across seeds.
Latency on a Google Pixel 4 goes from 14-16ms to 17-19ms, so the block is not free. The tested range covers classification, detection and segmentation, with no other backbones or tasks checked.
Paper info
- Authors
- Qibin Hou, Daquan Zhou, Jiashi Feng
- Venue
- arXiv · Preprint
- First published
- 2021-3-4
- Added
- 2026-11-11
- Updated
- 2021-3-4
- Version
- v1
- arXiv
- 2103.02907
- Category
- cs.CV
- Original paper terms
- CC BY 4.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Qibin Hou, Daquan Zhou, Jiashi Feng (2021). Coordinate Attention for Efficient Mobile Network Design. arXiv:2103.02907v1. https://arxiv.org/abs/2103.02907v1
BibTeX
@misc{hou2021coordinate,
title = {{Coordinate Attention for Efficient Mobile Network Design}},
author = {Qibin Hou and Daquan Zhou and Jiashi Feng},
year = {2021},
eprint = {2103.02907},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2103.02907v1}
}