Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Residual Attention Network for Image Classification

Residual Attention Network adds attention to feedforward image classifiers

  • Problem Stacking attention modules the obvious way lowers accuracy in deep networks. The authors blame repeated mask multiplication, which shrinks features, and masks that break identity mappings.
  • Method Residual Attention Network stacks Attention Modules, each with a mask branch and a trunk branch. Attention residual learning scales trunk features by one plus the mask.
  • Results The network beats ResNet-200 by 0.6% top-1 accuracy on ImageNet while using 46% of its trunk depth.

Why stacking attention is hard in very deep networks

Earlier attention work mostly lived in sequential models, where a top-down signal chooses where to look step by step, while the strongest image classifiers were feedforward convolutional networks built very deep. The question this paper takes up is whether an attention mechanism can sit inside such a feedforward network and still improve classification.

The answer is the Residual Attention Network, which is assembled by stacking Attention Modules so that each stage refines the features passed to the next.

Stacking the modules in the obvious way lowers accuracy. The authors point to two causes: each multiplication by a mask between zero and one shrinks feature values again and again in deep layers, and a mask can break the identity mapping that residual units rely on.

Attention Module: a trunk branch and a soft mask

Each module is divided into a mask branch and a trunk branch. The trunk branch does the feature processing and can be built from pre-activation Residual Units, ResNeXt or Inception blocks.

The mask branch produces a mask M(x) with the same size as the trunk output T(x), and the module output is the element-wise product of the two. Here i runs over spatial positions and c over channels. \[ H_{i,c}(x) = M_{i,c}(x) * T_{i,c}(x) \]

Because the mask multiplies the trunk output, it acts as a feature selector in the forward pass and as a gradient filter in the backward pass. \[ \frac{\partial M(x,\theta)T(x,\phi)}{\partial \phi} = M(x,\theta)\frac{\partial T(x,\phi)}{\partial \phi} \] Here theta are the mask branch parameters and phi the trunk branch parameters, so the gradient reaching the trunk is scaled by the mask.

The authors read this as the reason the module tolerates noisy labels.

Each trunk branch gets its own mask branch, because a single shared mask would need an exponential number of channels to cover all combinations of factors that vary across layers. A single module also changes the features only once, so a failed modification on part of an image cannot be corrected later.

Layout of the soft mask branch

The mask branch first sweeps bottom-up, applying max pooling several times after a few residual units so that the receptive field grows quickly. At the lowest resolution the global information is expanded by a symmetric top-down path, with interpolation after some residual units. The number of interpolation steps matches the number of pooling steps, so the mask returns to the input size.

Skip connections join the bottom-up and top-down parts to carry information from several scales. A sigmoid after two consecutive 1x1 convolution layers brings the output into the range zero to one.

The authors describe the mask branch as aiming to improve the trunk features rather than solve a complex task on its own, which separates it from the segmentation and pose networks that use the same top-down pattern.

Attention residual learning

The module output is changed to the following form, in which F is the feature produced by the deep convolutional layers on the trunk side. \[ H_{i,c}(x) = (1 + M_{i,c}(x)) * F_{i,c}(x) \] M(x) ranges over [0, 1]. When M(x) is close to 0, H(x) approximates the original features F(x), so a module can pass its input through unchanged.

The original ResNet adds its input to a residual function, whereas here the features are scaled by one plus the mask and the mask branches act as feature selectors that enhance good features and suppress noise. Because of this, features can bypass the mask branch and move to higher layers, which weakens the mask's selection when that is useful.

Stacked modules refine the feature maps gradually, and the authors use this to explain why increasing depth improves performance under attention residual learning. The deepest variant in the paper has 452 layers, and the authors report that it surpasses ResNet-1001 on CIFAR by a large margin.

Choosing the mask activation

Three activation functions set how much structure the mask can carry. Mixed attention applies a plain sigmoid to each channel and spatial position. \[ f_1(x_{i,c}) = \frac{1}{1 + \exp(-x_{i,c})} \] Channel attention applies an L2 normalization across all channels at each spatial position, so the mask carries no spatial information. Spatial attention standardizes each channel's feature map with its mean and standard deviation and then applies a sigmoid.

On CIFAR-10 with Attention-56, the top-1 error is 5.52 for mixed attention, 6.24 for channel attention and 6.33 for spatial attention, so the unconstrained mixed form is lowest. The authors attribute the gap to letting the mask adapt freely to the features, instead of constraining it with weight sharing or normalization as in earlier methods.

Only Attention-56 was compared under these three activations.

Attention residual learning against naive attention learning

The baseline, called naive attention learning, multiplies the features directly by the soft mask without the residual term. The number of modules per stage is set to m = {1, 2, 3, 4}, which gives Attention-56, Attention-92, Attention-128 and Attention-164. Training followed the ResNet-style CIFAR setup, with nesterov SGD, mini-batch size 64 and 160k iterations.

With attention residual learning, top-1 error is 5.52, 4.99, 4.44 and 4.31 for the four depths on CIFAR-10. With naive attention learning it is 5.89, 5.35, 5.57 and 7.18, so the residual version is lower at every depth and its error falls as depth grows. Naive attention learning gets worse at Attention-164, where the error is 7.18 against 4.31 with attention residual learning.

The authors measured the mean absolute response of each stage for Attention-164. With naive attention learning the response vanishes in stage 2 after four Attention Modules, whereas the attention residual network keeps it, which the authors read as signal attenuation from repeated multiplication. Each cell in the table is a single value, and the text reports no repeated runs.

Encoder-decoder mask against local convolutions

The encoder-decoder mask is compared with a local convolution mask built from three residual units that use the same number of FLOPs. Both masks are placed in Attention-56.

The encoder-decoder version reaches 5.52 top-1 error and the local convolution version 6.48, a difference of 0.94 in top-1 error on CIFAR-10. The authors conclude that the soft attention optimization benefits from multi-scale information.

Robustness to noisy labels

Label noise is modeled by a confusion matrix Q whose diagonal entries are r, the clean label ratio over the whole dataset, and whose off-diagonal entries are (1 - r)/9. The experiment uses CIFAR-10 and compares ResNet-164 with Attention-92.

At noise levels of 10%, 30%, 50% and 70%, ResNet-164 reaches 5.93, 6.61, 8.35 and 17.21 top-1 error, and Attention-92 reaches 5.15, 5.79, 7.27 and 15.75.

The authors argue that the mask blocks gradients from wrong labels, so only the trunk branch absorbs the wrong supervision while the mask branch masks it out. This explanation rests on the gradient derivation and the accuracy table; the text gives no gradient measurements under noisy labels.

CIFAR-10 and CIFAR-100 against state-of-the-art networks

Table 6 lists parameter counts and errors for the baselines and for the Attention variants.

The authors interpret this as the attention module and residual learning reducing the parameter count while improving classification.

ImageNet single crop results

The experiments use ImageNet LSVRC 2012 with 1,000 classes and evaluate on the non-blacklist images of the validation set. A 224 by 224 crop is sampled from an augmented image or its horizontal flip.

With Inception, AttentionInception-56 reaches 20.36 top-1 and 5.29 top-5 at 299 by 299, against 21.3 and 5.5 for Inception-ResNet-v1.

The top-1 reduction is 0.6, and the authors estimate that the training time is nearly half that of ResNet-200. This estimate is not measured in the table.

Limitations

The ImageNet comparisons use single crop only, and the rows use different test sizes of 224, 299 and 320. Attention-56 and Attention-92 are the only Attention variants reported on ImageNet, and the deeper variants appear only on CIFAR.

The text gives ResNet-200 32% more parameters than Attention-92, while Table 7 lists 64.7 and 51.3 million.

The activation comparison and the mask structure comparison use only Attention-56 on CIFAR-10. The noisy label experiment compares only Attention-92 with ResNet-164 on CIFAR-10 at the four listed noise levels. Experiments on detection and segmentation are left as future work.

Paper info

Authors
Fei Wang, Mengqing Jiang, Chen Qian, Shuo Yang, Cheng Li, Honggang Zhang, Xiaogang Wang, Xiaoou Tang
Venue
arXiv · Preprint
First published
2017-4-23
Added
2026-11-12
Updated
2017-4-23
Version
v1
arXiv
1704.06904
Category
cs.CV
Original paper terms
arXiv non-exclusive 1.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

Fei Wang, Mengqing Jiang, Chen Qian, Shuo Yang, Cheng Li, Honggang Zhang, Xiaogang Wang, Xiaoou Tang (2017). Residual Attention Network for Image Classification. arXiv:1704.06904v1. https://arxiv.org/abs/1704.06904v1

BibTeX
@misc{wang2017residual,
  title = {{Residual Attention Network for Image Classification}},
  author = {Fei Wang and Mengqing Jiang and Chen Qian and Shuo Yang and Cheng Li and Honggang Zhang and Xiaogang Wang and Xiaoou Tang},
  year = {2017},
  eprint = {1704.06904},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1704.06904v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up