ViLBERT
Two-stream BERT for images and text whose streams interact through co-attentional transformer layers.
Multimodal · 1,585 operations Checked
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
- Task
- Multimodal
- Parameters
- 246.7M
- Operations
- 1,585
- Framework
- PyTorch
- Recurrent
- No
- Published
- NeurIPS 2019
- Paper
- ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks
- Cited by
- 2,111 (as of 28 October 2026)
- Authors
- Jiasen Lu, Dhruv Batra, Devi Parikh, Stefan Lee
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m21346
- Graph hash
- b8d3b0c59305aedde1d4887172663bca84def606736d1eb77288367cc9bf7b30
- Skeleton hash
- c605dc16cd79d90b9c399e8db32f2c214d2d4fa64922f58b73ee706022119a65
- Architecture hash
- 1faae24d5aed4c31c91a36d0c70b27223b5168f2123151c6975013407fac665a
- Diagram SHA-256
- 3c92a8912b82d32365d784128c56ad6bd32c3ee1a4e315575ad945741118c847
- 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
ViLBERT, short for Vision-and-Language BERT, learns joint representations of images and text that are not tied to any single task. It is built as two parallel BERT-style models, one over image regions and one over text. The two streams meet in co-attentional transformer layers, where each stream computes its queries as usual but the keys and values of each modality are handed to the other modality's attention block.
The model does not take pixels: image regions arrive as features extracted by a Faster R-CNN detector pretrained on Visual Genome. Because regions have no natural order, each one carries a 5-d vector built from its box corners and the fraction of the image area it covers. The text stream is initialized from a pretrained BERT language model, and the blocks of the visual stream use a hidden state size of 1024 with 8 attention heads.
Pretraining ran on Conceptual Captions with two proxy tasks: predicting masked words and image regions, and predicting whether an image and a text segment correspond. The paper then transfers the model to visual question answering, visual commonsense reasoning, referring expressions and caption-based image retrieval. It reports improvements of 2 to 10 percentage points on these tasks over task-specific baselines that used separately pretrained vision and language models. In the paper's experiments the two-stream structure also outperformed a single-stream unified model.
Key idea. ViLBERT extends BERT to separate vision and language streams that communicate through co-attentional transformer layers, so that visual grounding can be pretrained and then transferred.
- ViLBERT
- Vision-and-Language BERT
- vision and language pretraining
- visual grounding
- co-attention
- two-stream transformer
- visual question answering
- image-text representation
- Conceptual Captions
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{lu2019vilbertpretrainingtaskagnosticvisiolinguistic,
title={ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks},
author={Jiasen Lu and Dhruv Batra and Devi Parikh and Stefan Lee},
year={2019},
eprint={1908.02265},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/1908.02265},
}