All models

X-CLIP

A CLIP-based video-text retrieval model that contrasts videos and captions at multiple granularities.

Multimodal · 1,308 operations Structure only

Structure-only capture: TorchLens recorded this graph without running real numbers through the model, so shapes and data types on the diagram are hypotheses, not measurements.

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 (139 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
164.5M
Operations
1,308
Framework
PyTorch
Recurrent
No
Published
ACM MM 2022
Cited by
333 (as of 27 October 2026)
Authors
Yiwei Ma, Guohai Xu, Xiaoshuai Sun and others
License
MIT
Checked
Structure only: shapes and data types are hypotheses, not measurements.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21511
Graph hash
08792e369834ba757ed53f0ed999d043b0b93f6aa5d482d9fd61a20cc0805001
Skeleton hash
c8cafd660734376f0323541c3416efcd37f1822d2d7e7c5e536c40a4d1a5364c
Architecture hash
904a1efbc9cf63a2adf7305a457b458c06614c8c1e69406149f846a6f6b21b43
Diagram SHA-256
c30179b0972fffd8ed54adec3a89e3888895a5657a44b48f197da9cc947551b6
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3

What it is

X-CLIP is a multi-grained contrastive model for video-text retrieval. The paper observes that contrastive pre-training for this task has focused on coarse-grained or fine-grained contrast, while cross-grained contrast, the contrast between coarse-grained and fine-grained representations, has rarely been explored.

Cross-grained contrast calculates the correlation between coarse-grained features and each fine-grained feature, so the coarse-grained feature can guide the filtering of unnecessary fine-grained features during similarity calculation. The fine-grained and cross-grained similarity matrices then have to be aggregated into an instance-level similarity. For this the authors propose the Attention Over Similarity Matrix (AOSM) module, which makes the model focus on the contrast between essential frames and words.

The paper reports recall at 1 of 49.3 on MSR-VTT, 50.4 on MSVD, 26.1 on LSMDC, 47.8 on DiDeMo and 46.2 on ActivityNet. The implementation relies on resources from CLIP4Clip and CLIP, and starts from pretrained CLIP checkpoints, ViT-B/32 or ViT-B/16.

Key idea. X-CLIP adds cross-grained contrast between coarse-grained and fine-grained features, and an attention module that aggregates the similarity matrices into an instance-level similarity for video-text retrieval.

  • X-CLIP
  • video-text retrieval
  • text-to-video retrieval
  • multi-grained contrastive learning
  • cross-grained contrast
  • Attention Over Similarity Matrix
  • AOSM
  • MSR-VTT

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

Cite the paper

@misc{ma2022xclipendtoendmultigrainedcontrastive,
      title={X-CLIP: End-to-End Multi-grained Contrastive Learning for Video-Text Retrieval}, 
      author={Yiwei Ma and Guohai Xu and Xiaoshuai Sun and Ming Yan and Ji Zhang and Rongrong Ji},
      year={2022},
      eprint={2207.07285},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2207.07285}, 
}