All models

Neural Module Network for Visual Reasoning (dynamic NMN)

A question-answering network assembled per question from small, jointly trained modules applied to image features.

Multimodal · 57 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 (46 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
17.2M
Operations
57
Framework
PyTorch
Recurrent
No
Published
CVPR 2016
Cited by
964 (as of 4 November 2026)
Authors
Jacob Andreas, Marcus Rohrbach, Trevor Darrell, Dan Klein
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
m18807
Graph hash
bacec81007c24cf531ec65a795202a2e2e59a57f33a9d0666c7061b8e0cd9efd
Skeleton hash
5365af49e4c177af3beb5ac98b9f267ca89b33fb3392c4dcf40f3e6949898676
Architecture hash
8c4279555b9c5ba0d578da001efa43d014d8590e2e8a87fff22f4e7d15dae413
Diagram SHA-256
829aea7be05a38bc1827ae72d0e6c9ba6e009468977c8deda84ac55ab293729d
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

This model follows a PyTorch implementation of Neural Module Networks for visual question answering that its README marks as not an official repository. The README says most of its ideas are taken directly from the Neural Module Networks paper.

Neural module networks (NMNs) answer questions about images by assembling a network for each question out of a collection of small, jointly trained modules. The starting observation is that visual question answering is compositional: a question about where a dog is shares substructure with a question about the dog's color or about where a cat is. The method decomposes each question into its linguistic substructures and uses those structures to instantiate a modular network from reusable components, for example for recognizing dogs or classifying colors.

The authors' code release describes an NMN as a network assembled dynamically by composing shallow fragments, called modules, into a deeper structure. That code predicts network layouts from natural-language strings and trains the modules end to end. Images enter as a 512x14x14 feature map produced by a 16-layer VGGNet.

The paper evaluates on two visual question answering datasets, the VQA natural image dataset and a new dataset of complex questions about abstract shapes, and reports results ahead of earlier methods on both at the time. The official README, in an update dated 22 Jun 2017, points to a later end-to-end module network framework and says it works better and is easier to set up.

Key idea. The paper describes a procedure for constructing and learning neural module networks, which compose jointly trained modules into a question-specific deep network for question answering.

  • Neural Module Networks
  • NMN
  • neural module network
  • visual question answering
  • VQA
  • compositional question answering
  • dynamic network layout
  • nmn2
  • module composition

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

Cite the paper

@misc{andreas2017neuralmodulenetworks,
      title={Neural Module Networks}, 
      author={Jacob Andreas and Marcus Rohrbach and Trevor Darrell and Dan Klein},
      year={2017},
      eprint={1511.02799},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1511.02799}, 
}