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

SCA-CNN: Spatial and Channel-wise Attention in Convolutional Networks for Image Captioning

SCA-CNN attends over space and channels at several layers for captioning

  • Problem Captioning models weight only the last convolutional layer's spatial positions, so they miss channel identity and the layer hierarchy. Spatial pooling also drops some spatial detail before the decoder sees it.
  • Method SCA-CNN attends over spatial locations and channels at several convolutional layers. It computes the weights from the decoder state and applies them by element-wise multiplication, unlike models that sum features by weight.
  • Results With one attentive layer on ResNet-152, the Channel-Spatial model reached a BLEU-4 of 25.7 on Flickr8k, against 20.5 for the spatial-only S model.

Where spatial-only attention falls short

Most attention captioning models of the time weighted only the last convolutional feature map, so every generated word drew on one layer's spatial pattern. The pooling that follows those weights averages features across positions, so some spatial detail is lost before the decoder sees the feature. The last layer also has large receptive fields whose neighbouring regions look alike, which limits how much its spatial weights can differ from one position to the next.

A CNN feature map is at once spatial, channel-wise and layered, yet that attention design uses only the spatial axis. The authors therefore set out to use all three axes in one captioning model, with attention applied to the feature maps of several layers.

Attention over channels and layers

Each channel of a convolutional feature map is the response of one filter, so a channel works as a detector response rather than an anonymous coordinate. Weighting channels therefore selects the visual patterns that the current word needs, such as the shapes that make up cake in the paper's example.

Each feature map is built from the maps below it, so attended channels in a low layer and in a high layer carry different levels of abstraction. Attending in several layers lets the model combine elemental evidence with composite evidence instead of relying on one level.

At each attended layer the weights are computed from the same decoder state, and each layer's feature map is multiplied by its own weights to give a modulated feature. Earlier models summed features by their weights, whereas multiplication keeps the full layout of the feature map.

Computing the spatial and channel weights

At decoding step t the attention for layer l takes the previous LSTM state \(h_{t-1} \in \mathbb{R}^d\) and the layer's feature map \(V_l\). The feature map is flattened into \(m = W \cdot H\) column vectors \(v_i \in \mathbb{R}^C\), one for each image location.

The spatial module maps the location vectors and the hidden state into a shared space of dimension k, applies tanh, and then a linear score per location followed by a softmax over the locations gives the distribution. \[ a = \tanh\big((W_s V + b_s) \oplus W_{hs} h_{t-1}\big), \qquad \alpha = \mathrm{softmax}(W_i a + b_i) \] Here \(W_s\) is k by C, \(W_{hs}\) is k by d, \(W_i\) is a vector of length k, and \(\oplus\) adds a vector to every column of a matrix.

The channel module reduces each channel \(u_i\) to a scalar \(v_i\), its mean, so the layer becomes a single C-dimensional vector \(v\). The channel module then mirrors the spatial one: an outer product with \(W_c\) joins \(v\) with the hidden state through a tanh layer, and a softmax over the C channels gives \(\beta\). \[ b = \tanh\big((W_c \otimes v + b_c) \oplus W_{hc} h_{t-1}\big), \qquad \beta = \mathrm{softmax}(W'_i b + b'_i) \]

Giving every entry of the full attention tensor its own weight would need space on the order of \(W^l H^l C^l k\). Splitting the weights into a spatial part and a channel part reduces this to order \(W^l H^l k\) for the spatial weights and \(C^l k\) for the channel weights. The split is presented as an approximation, so the two weight sets are not a joint weighting over positions and channels.

Ordering the two attentions and multiplying them in

Modulation applies the weights to the feature map by multiplication, so the output \(X_l = f(V_l, \gamma_l)\) keeps the layout of \(V_l\), with \(\gamma_l\) collecting the spatial and channel weights of that layer. SCA-CNN uses element-wise multiplication for \(f\), which is the step that separates it from models that sum features by attention weight.

In the Channel-Spatial (C-S) order the channel weights come first: \(\beta\) is computed from \(V\) and the hidden state, the feature map is channel-weighted, and the spatial step runs on that result. \[ \beta = \Phi_c(h_{t-1}, V), \qquad \alpha = \Phi_s(h_{t-1}, f_c(V,\beta)), \qquad X = f(V,\alpha,\beta) \] Here \(f_c\) is a channel-wise multiplication, and \(f\) applies both weight sets to produce the final map.

The Spatial-Channel (S-C) order reverses the two steps: \(\alpha\) is computed from \(V\) first, and the channel step runs on a region-weighted map. \[ \alpha = \Phi_s(h_{t-1}, V), \qquad \beta = \Phi_c(h_{t-1}, f_s(V,\alpha)), \qquad X = f(V,\alpha,\beta) \] Here \(f_s\) is an element-wise multiplication over the regions of each channel.

The decoder LSTM takes the modulated feature \(X_L\) of the last attended layer together with the previous word and the previous state. It returns a new state \(h_t\), from which the next word is drawn through a softmax over the dictionary.

Datasets, metrics and training settings

Flickr8k has 8,000 images, and its official split uses 6,000 for training, 1,000 for validation and 1,000 for testing. Flickr30k uses a public split from earlier work, with 29,000 training, 1,000 validation and 1,000 test images. The MSCOCO training set has 82,783 images, and because the test labels are not available, the official validation set is split into 5,000 images for validation and 5,000 for local testing.

BLEU at 1 to 4, METEOR, CIDEr and ROUGE-L are computed with the MSCOCO caption evaluation tool. All four score n-gram overlap between generated and reference captions, and they adjust the weighting for how distinctive each n-gram is.

VGG-19 and ResNet-152 serve as the image encoders, and the decoder LSTM uses 100-dimensional word embeddings and 1,000 hidden units. The common space for the attention weights has 512 dimensions, and the whole framework is trained end to end with Adadelta. The mini-batch size is 16 for Flickr8k and 64 for Flickr30k and MSCOCO, with dropout and early stopping used against overfitting.

At test time beam search with a beam size of 5 chooses the caption, and the reported scores come without length normalization. The authors note that length normalization can help in some degree but leave it out so that the comparisons are fair.

Channel-wise attention against spatial-only models

With one attentive layer, five models are compared: the spatial-only S, the channel-only C, the two combined orders C-S and S-C, and the hard-attention baseline SAT. The SAT numbers for VGG-19 come from the original paper, while the ResNet-152 SAT numbers are the authors' own runs.

On VGG-19, S reached a BLEU-4 of 23.0 on Flickr8k against 21.3 for SAT, but on ResNet-152 SAT scored 21.7 against 20.5 for S. The authors link this to VGG-19's fully connected layers, which they take to keep spatial information, while ResNet-152's average pooling layer removes it.

On ResNet-152 the channel-only C model rose well above S, with a BLEU-4 of 24.4 against 20.5 on Flickr8k and 29.5 against 28.3 on MSCOCO. The authors attribute the larger channel-wise gains on ResNet-152 to its 2048 channels, against 512 for VGG-19.

On ResNet-152 both combined orders beat S on all three datasets, with C-S at 25.7 against 20.5 on Flickr8k, 22.1 against 20.5 on Flickr30k and 30.4 against 28.3 on MSCOCO. The authors judged C-S slightly better than S-C and used it in the later experiments.

On VGG-19 the two families stay close: C-S reached 23.5 against 23.0 for S on Flickr8k, 21.0 against 21.1 on Flickr30k and 28.1 against 28.2 on MSCOCO. So the benefit of channel-wise attention in this comparison appears with the ResNet-152 encoder.

Attention at two or three layers

The multi-layer study varies how many layers carry attention in S and C-S, with each later layer initialized from the weights of the earlier attentive layer. For VGG-19 the layers are conv5_4, conv5_3 and conv5_2, and for ResNet-152 they are res5c, res5c_branch2b and res5c_branch2a.

The gains are not uniform: for C-S on ResNet-152 with MSCOCO, CIDEr rises from 91.7 at one layer to 95.2 at two and falls to 94.7 at three. On VGG-19 with Flickr8k, C-S BLEU-4 falls from 23.5 at one layer to 22.8 at two while CIDEr rises from 60.3 to 62.1.

The spatial-only S model gains with depth on ResNet-152 Flickr8k, where CIDEr goes from 49.9 at one layer to 61.7 at three. The authors report that the gain comes from applying attention across several levels of semantic abstraction.

The authors report that too many attentive layers can overfit, and that Flickr8k degrades more readily than MSCOCO. They relate this to the training sets, with 6,000 images for Flickr8k against 82,783 for MSCOCO.

Position against published captioning systems

The baselines fall into three groups: end-to-end multimodal networks (Deep VS, m-RNN, Google NIC), pure spatial attention (Soft-Attention and Hard-Attention), and semantic attention (emb-gLSTM and ATT). The SCA-CNN rows in the table use the two-layer C-S model with VGG-19 and with ResNet-152.

On Flickr8k with ResNet-152, SCA-CNN-ResNet reached a BLEU-4 of 25.8 against 21.3 for Hard-Attention. On MSCOCO, the local gap to ATT is 0.6% in BLEU-4 and 0.1% in METEOR, and ATT is an ensemble.

On the MSCOCO test server with the c5 reference setting, SCA-CNN reached a CIDEr of 91.2 against 86.5 for Hard-Attention.

Limits of the evidence

All experiments use VGG-19 or ResNet-152 encoders on the three captioning benchmarks, and the module is described as applicable to any layer of any CNN, a claim that is not tested on other backbones. Extension to temporal attention for video captioning is left as future work.

The comparison with ATT and Google NIC is not like-for-like: both are ensembles, while SCA-CNN is a single model, and Google NIC uses Inception-v3 where SCA-CNN uses ResNet. Ensembles can always score higher than a single model, which is why the authors do not read these gaps as a fair ranking.

The gains from more attentive layers are not monotonic, and extra layers degrade results on some datasets and encoders. The tables give one value per configuration, and no variance or confidence intervals are reported.

Paper info

Authors
Long Chen, Hanwang Zhang, Jun Xiao, Liqiang Nie, Jian Shao, Wei Liu, Tat-Seng Chua
Venue
arXiv · Preprint
First published
2016-11-17
Added
2026-11-12
Updated
2017-4-12
Version
v2
arXiv
1611.05594
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

Long Chen, Hanwang Zhang, Jun Xiao, Liqiang Nie, Jian Shao, Wei Liu, Tat-Seng Chua (2016). SCA-CNN: Spatial and Channel-wise Attention in Convolutional Networks for Image Captioning. arXiv:1611.05594v2. https://arxiv.org/abs/1611.05594v2

BibTeX
@misc{chen2016spatial,
  title = {{SCA-CNN: Spatial and Channel-wise Attention in Convolutional Networks for Image Captioning}},
  author = {Long Chen and Hanwang Zhang and Jun Xiao and Liqiang Nie and Jian Shao and Wei Liu and Tat-Seng Chua},
  year = {2016},
  eprint = {1611.05594},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1611.05594v2}
}

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