All models

X-LAN

An image captioner built from bilinear X-Linear attention blocks and an LSTM decoder.

Multimodal · 1,384 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (484 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
75.2M
Operations
1,384
Framework
PyTorch
Recurrent
Yes
Published
CVPR 2020
Cited by
720 (as of 28 October 2026)
Authors
Yingwei Pan, Ting Yao, Yehao Li, Tao Mei
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21516
Graph hash
dd30d4817901d8ed02ce7d81a6955f034ac7e88e133c4dd330ecda8653719240
Skeleton hash
9a33ee0301fbace55085cdbad04919efedef71e1fad7ea868f24d1799b6a1c65
Architecture hash
154c598c881857cdc428f8c5e8d7c6baa881269136dca69a3c82a8846ecc1cbc
Diagram SHA-256
7e8eb998588066536444e8ad92cbc5a3244eca8504c09828905743cb79301814
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

X-LAN writes captions for images, using attention that multiplies features together where, the paper says, conventional attention fuses query and key by element-wise sum. Its building block, the X-Linear attention block, uses bilinear pooling to weigh both image regions and feature channels. The paper reports that applying it after two exponential transformations approximates feature interactions of infinite order.

The network starts from image regions found by a Faster R-CNN detector. A stack of X-Linear attention blocks encodes these region features. The encoder has one such layer followed by M more, with M set to 3. An LSTM decoder with its own X-Linear block then reasons over image and text to write the sentence.

The paper reports a CIDEr score of 132.0% on the COCO Karpathy test split. Putting the same blocks into a Transformer raised that to 132.8%.

Key idea. A unified X-Linear attention block models second-order feature interactions with both spatial and channel-wise bilinear attention.

  • X-LAN
  • X-Linear attention
  • X-Linear attention network
  • image captioning
  • bilinear pooling
  • bilinear attention
  • LSTM decoder
  • region features
  • COCO captions

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{pan2020xlinearattentionnetworksimage,
      title={X-Linear Attention Networks for Image Captioning}, 
      author={Yingwei Pan and Ting Yao and Yehao Li and Tao Mei},
      year={2020},
      eprint={2003.14080},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2003.14080}, 
}