All models

VisualBERT-EarlyFusionVLM

A BERT-style Transformer that processes text and image region features together in one stack.

Multimodal · 387 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 (32 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
111.5M
Operations
387
Framework
PyTorch
Recurrent
No
Published
2019
Cited by
2,755 (as of 18 November 2026)
Authors
Liunian Harold Li, Mark Yatskar, Da Yin and others
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
m3339
Graph hash
15e25e02f89476c0785559b74e30a902cca3905a58eeff03fe00654248d162fa
Skeleton hash
689bcf047f9e792a295ff08769c4639b0846e18cd4369f9439086ef04d35d551
Architecture hash
fc3591fff864998eeb0648345cdfcfc4e5f8cd538c3e2968bc060f93faa3f0f8
Diagram SHA-256
92875e987a53ad7db7d5ac15b34bac6c5c0229dac38b7d2eee0401a2819a8304
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

VisualBERT is a model for vision-and-language tasks: a stack of Transformer layers that takes text and image regions together and aligns them implicitly through self-attention. It joins BERT with a pretrained object proposal system such as Faster-RCNN, and the features extracted from the proposals are treated as unordered input tokens and fed in along with the text.

Each visual embedding is a sum of three parts: a feature of the bounding region computed by a convolutional neural network, a segment embedding that marks it as image and not text, and a position embedding. The Transformer encoder in the paper has the BERT base configuration of 12 layers, a hidden size of 768 and 12 self-attention heads, with parameters initialized from pre-trained BERT.

Pre-training on COCO captions uses two objectives: predicting masked words from the remaining text and the visual context, and deciding whether the provided text matches the image. The paper evaluates on VQA, VCR, NLVR2 and Flickr30K, and tests an ablation without early fusion, in which image representations are combined with the text only at the very end and not in the initial Transformer layer.

Key idea. VisualBERT feeds text and image region features into one stack of Transformer layers so self-attention aligns them implicitly, and pre-trains it on image caption data with two objectives.

  • visualbert
  • visual bert
  • vision and language
  • visual question answering
  • vqa
  • early fusion
  • image-text transformer
  • visual commonsense reasoning
  • vision-language pre-training

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

Cite the paper

@misc{li2019visualbertsimpleperformantbaseline,
      title={VisualBERT: A Simple and Performant Baseline for Vision and Language}, 
      author={Liunian Harold Li and Mark Yatskar and Da Yin and Cho-Jui Hsieh and Kai-Wei Chang},
      year={2019},
      eprint={1908.03557},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/1908.03557}, 
}