All models

MCAN

A deep co-attention network of self-attention and guided-attention units for visual question answering.

Multimodal · 734 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 (28 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
57.8M
Operations
734
Framework
PyTorch
Recurrent
No
Published
CVPR 2019
Cited by
1,010 (as of 27 October 2026)
Authors
Zhou Yu, Jun Yu, Yuhao Cui and others
License
Apache-2.0
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
m18052
Graph hash
82efccf6ac0b25cb1f497bd9f8fb0cae5b6641dcfa4dd00c543dcae75c41eb54
Skeleton hash
ad8c664655d75098426aaf09a0baa0917c31cfc314d443b53586ec989c372f24
Architecture hash
167a832e260405cbb8c917eb96ff00d13280cf1d6a4a2ba8a1f9118de6a1fe7f
Diagram SHA-256
b2c53fb17b22242782f2dc6c2bf64b01adc1d2d4a0138fa7c8b478884f971059
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

MCAN, the Modular Co-Attention Network, answers questions about images with a deep stack of co-attention layers that relate question words to image regions. The paper observes that, at the time, deep co-attention models showed little improvement over shallow ones. Its authors locate the bottleneck in a lack of dense self-attention within each modality.

Inspired by the Transformer, the paper designs two attention units: a self-attention unit for word-to-word or region-to-region interactions, and a guided-attention unit that links the two modalities. In the encoder-decoder arrangement, stacked self-attention units learn the question features, and a decoder uses the final question features to learn the attended image features. The official PyTorch code implements this encoder-decoder strategy. The paper sets the attention dimension to 512 with 8 heads.

Images enter as bottom-up-attention region features, a dynamic number from 10 to 100 of 2048-D vectors per image. The output is a classifier over an answer vocabulary of 3,129 entries. The repository reports that a single model reaches 70.70% (small) and 70.93% (large) overall accuracy on the test-dev split of VQA-v2.

Key idea. MCAN cascades Modular Co-Attention layers in depth, each composing self-attention and guided-attention units to model questions and images jointly for visual question answering.

  • MCAN
  • Modular Co-Attention Network
  • Deep Modular Co-Attention Networks
  • visual question answering
  • VQA
  • VQA-v2
  • co-attention
  • guided attention
  • mcan-vqa

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

Cite the paper

@misc{yu2019deepmodularcoattentionnetworks,
      title={Deep Modular Co-Attention Networks for Visual Question Answering}, 
      author={Zhou Yu and Jun Yu and Yuhao Cui and Dacheng Tao and Qi Tian},
      year={2019},
      eprint={1906.10770},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1906.10770}, 
}