All models

X-VLM

A vision language model that pre-trains by locating the image region a text describes while aligning the two.

Multimodal · 2,582 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

This diagram has 2,582 operations (51 KB) and is drawn when you ask.

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
215.6M
Operations
2,582
Framework
PyTorch
Recurrent
No
Published
ICML 2022
Cited by
122 (as of 29 October 2026)
Authors
Yan Zeng, Xinsong Zhang, Hang Li
License
BSD-3-Clause
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
m21523
Graph hash
ca2ef9c14b29e79f2e5cf32b6d62d793c323124583bf4e613ec24dd0c4af63ee
Skeleton hash
e30118ef7e6f02f3f6c042b07ce50ed254761cf3fb38deff2655e2fb55dc757a
Architecture hash
3fef0cc254bc794bfa889e278a895b6470b39f7a53cc54f53407b5aaccfc1531
Diagram SHA-256
dd3f0899dd05267b0fe0537e3bb1f17249a4d046ef7d1627e929ac623271a1de
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-VLM is a vision language model pre-trained to align texts with visual concepts of different sizes: an object, a region or the image itself. The paper sets this against two earlier approaches. Methods built on object detection give object-centric features that cannot easily represent relations among multiple objects, and the others align texts only with coarse features of the whole image.

The model has an image encoder, a text encoder and a cross-modal encoder, all based on Transformer. The cross-modal encoder fuses vision and language features through cross-attention at each layer. The image encoder is initialized from Swin Transformer base, and the text and cross-modal encoders have six layers each, initialized from the first and last six layers of BERT base. A visual concept is represented by aggregating the features of the patches it covers, with their average added as a summary feature.

Pre-training sums four losses: bounding box prediction, contrastive learning, matching prediction and masked language modeling. The box is predicted from the cross-modal encoder's [CLS] embedding by an MLP followed by a sigmoid, given the image and a text. The paper reports 215.6M parameters for pre-training and, on MSCOCO image-text retrieval, an absolute gain of 4.65% in recall at 1 over VinVL.

Key idea. X-VLM learns multi-grained vision language alignments by locating visual concepts in the image given their texts while aligning those texts with the concepts.

  • X-VLM
  • XVLM
  • multi-grained vision language pre-training
  • vision language model
  • aligning texts with visual concepts
  • image-text retrieval
  • visual grounding
  • visual question answering

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

Cite the paper

@misc{zeng2022multigrainedvisionlanguagepretraining,
      title={Multi-Grained Vision Language Pre-Training: Aligning Texts with Visual Concepts}, 
      author={Yan Zeng and Xinsong Zhang and Hang Li},
      year={2022},
      eprint={2111.08276},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2111.08276}, 
}