Skip to main content
QUICK REVIEW

[Paper Review] X-Linear Attention Networks for Image Captioning

Yingwei Pan, Ting Yao|arXiv (Cornell University)|Mar 31, 2020
Multimodal Machine Learning ApplicationsComputer Science41 references8 citations
TL;DR

This paper proposes X-Linear Attention Networks (X-LAN), a novel unified attention block that models second-order feature interactions via spatial and channel-wise bilinear pooling between visual and language features. By stacking these blocks and integrating them into both image encoder and sentence decoder, X-LAN achieves state-of-the-art performance with a CIDEr score of 132.8% on the COCO Karpathy test split, demonstrating superior multi-modal reasoning through higher-order interactions.

ABSTRACT

Recent progress on fine-grained visual recognition and visual question answering has featured Bilinear Pooling, which effectively models the 2$^{nd}$ order interactions across multi-modal inputs. Nevertheless, there has not been evidence in support of building such interactions concurrently with attention mechanism for image captioning. In this paper, we introduce a unified attention block -- X-Linear attention block, that fully employs bilinear pooling to selectively capitalize on visual information or perform multi-modal reasoning. Technically, X-Linear attention block simultaneously exploits both the spatial and channel-wise bilinear attention distributions to capture the 2$^{nd}$ order interactions between the input single-modal or multi-modal features. Higher and even infinity order feature interactions are readily modeled through stacking multiple X-Linear attention blocks and equipping the block with Exponential Linear Unit (ELU) in a parameter-free fashion, respectively. Furthermore, we present X-Linear Attention Networks (dubbed as X-LAN) that novelly integrates X-Linear attention block(s) into image encoder and sentence decoder of image captioning model to leverage higher order intra- and inter-modal interactions. The experiments on COCO benchmark demonstrate that our X-LAN obtains to-date the best published CIDEr performance of 132.0% on COCO Karpathy test split. When further endowing Transformer with X-Linear attention blocks, CIDEr is boosted up to 132.8%. Source code is available at \url{https://github.com/Panda-Peter/image-captioning}.

Motivation & Objective

  • To address the limitation of conventional attention mechanisms in image captioning, which only model first-order feature interactions and lack effective multi-modal reasoning.
  • To propose a unified attention block that captures second-order interactions across visual and language modalities using bilinear pooling.
  • To enable higher-order and even infinite-order feature interactions through stacking blocks and applying ELU in a parameter-free manner.
  • To integrate the X-Linear attention block into both image encoder and sentence decoder for enhanced intra- and inter-modal representation learning.
  • To achieve state-of-the-art performance on image captioning benchmarks through improved multi-modal reasoning.

Proposed method

  • The X-Linear attention block computes the outer product of query and key via bilinear pooling to model second-order interactions between visual features and language hidden states.
  • It predicts spatial attention weights via two embedding layers and a softmax operation on the bilinear output, enabling selective focus on relevant image regions.
  • A squeeze-excitation mechanism computes channel-wise attention by aggregating spatial features and applying a sigmoid-gated excitation to refine channel importance.
  • The attended features are computed as a weighted sum of bilinear-pooled query-value pairs, modulated by both spatial and channel-wise attention vectors.
  • Higher-order interactions are modeled by stacking multiple X-Linear blocks, while ELU is applied to enable infinite-order interactions without additional parameters.
  • The X-LAN architecture integrates these blocks into Faster R-CNN-based image encoders and LSTM/Transformer decoders to enhance both intra-modal (region-level) and inter-modal (visual-language) reasoning.

Experimental results

Research questions

  • RQ1Can bilinear pooling be effectively integrated into attention mechanisms to model second-order interactions in image captioning?
  • RQ2How does modeling both spatial and channel-wise attention distributions improve visual-linguistic feature alignment?
  • RQ3Can stacking X-Linear attention blocks enable higher-order feature interactions without overfitting or excessive parameter growth?
  • RQ4Does integrating X-Linear attention into both image encoder and sentence decoder lead to significant performance gains on image captioning?
  • RQ5Can the use of ELU in the X-Linear block enable effective modeling of infinite-order interactions in a parameter-free manner?

Key findings

  • X-LAN achieves a new state-of-the-art CIDEr score of 132.8% on the COCO Karpathy test split when integrated with a Transformer decoder.
  • The model with four stacked X-Linear blocks in the encoder achieves a CIDEr score of 120.4%, showing incremental gains with increased stacking.
  • Adding ELU to the X-Linear block boosts performance to 122.0% with four blocks, indicating effective modeling of higher-order interactions.
  • The ablation study confirms that replacing conventional attention with X-Linear attention in the decoder improves CIDEr from 114.1% to 117.0%.
  • Attention visualization shows that X-LAN consistently attends to relevant image regions, avoiding misalignment seen in baseline models like Up-Down.
  • Performance gains plateau beyond four stacked blocks, suggesting a trade-off between model capacity and overfitting.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.