Video-text representation learning has shown promising capabilities in many multi-modal applications. Current methods follow the de-facto vision-text alignment during pre-training, allowing a shared representation. However, video-text alignment methods train on coarse-grained text description, resulting in weak representations for detailed, fine-grained descriptions. While some approaches tried to incorporate long captions for learning fine-grained representations, they only rely on a global video-text alignment, failing to effectively capture such fine-grained details. To address this issue, we propose ViFCLIP, a video-text model trained with fine-grained video-text alignment. Our model integrates learnable frame-tokens, allowing a fine-grained visual representation beyond the global video representation. We also adopt a subcaption sampling strategy that generates diverse and multi-granular fine-grained textual supervision extracted from detailed captions. Finally, our fine-grained alignment method relies on a token-to-token interaction where each subcaption is aligned with its most similar frame-token. Our model shows SOTA results on many zero-shot text-to-video retrieval datasets against prior video-text dual encoders and MLLM models. Project page: https://uliege-viulab.github.io/vifclip.
Figures & tables
Figure 1: ViFCLIP is a strong video-text model. Against prior methods, our method shows state-of-the-art results on most zero-shot text-to-video retrieval benchmarks.
Figure 2: Overview of ViFCLIP. (a) Interaction between different tokens in the vision encoder. (b) Subcaption generation and MaxSim operation for the fine-grained alignment. (c) The vision encoder processes sampled frames of a video to produce global [ CLS ], local frame-tokens and register tokens. The text encoder processes one summary caption, one detailed caption, and K subcaptions to produce their relative [ EOS ] representations. Global vision and text representations are aligned together, while registers and frame-tokens are aligned to subcaptions in a single joint vision-text embedding space. (d) Legend relative to the different tokens.
Method
MSRVTT
DiDeMo
ANet
MSVD
LSMDC
CRB-G
R@1
R@1
R@1
R@1
R@1
R@1
MLLM-based
GME-2B
37.9
30.2
35.1
49.6
19.8
73.2
UNITE-2B
43.8
37.3
43.1
50.8
22.3
79.4
VLM2Vec-V2
29.0
30.9
22.0
39.1
16.3
80.6
BGE-VL
40.0
37.0
35.3
49.9
21.4
86.5
GVE-3B
43.0
38.9
41.9
50.5
19.4
85.0
Table 1: Coarse-grained zero-shot text-to-video retrieval. We evaluate our methods against state-of-the-art methods on coarse-grained zero-shot retrieval benchmarks. We report text-to-video R@1. Bold denotes the best and underline the second-best result. All models are evaluated with the same protocol.
Fine-grained
Long-context
Spatial
Temporal
Partially Relevant
Method
CRB-S
VDC-O
CRB-T
CMRB
DREAM-E
LoVR-TH
PEV-K
LoVR-V
VDC-D
R@1
R@1
R@1
R@10
R@1
R@10
R@1
R@1
R@1
MLLM-based
GME-2B
76.8
72.7
42.9
26.7
25.2
40.7
36.9
19.0
85.3
UNITE-2B
80.9
76.3
47.0
30.3
27.6
49.2
36.4
82.0
83.1
VLM2Vec-V2
79.8
76.9
30.2
27.5
23.3
47.8
24.0
63.0
87.7
Table 2: Fine-grained and long-context zero-shot text-to-video retrieval. We evaluate our methods against state-of-the-art methods on fine-grained and long-context zero-shot retrieval benchmarks. We report text-to-video R@1 or R@10. Bold denotes the best and underline second-best result. All models are evaluated with the same protocol.
Method
MSR-VTT
CRB-T
VDC-O
DREAM-E
Global loss (LongViCLIP)
41.4
46.4
75.2
25.8
+ Extended text context (134 → 248)
41.9
47.7
75.3
25.4
+ Reduce random masking (50% → 10%)
41.3
48.7
76.1
26.6
+ Subcap. loss
43.3
51.0
78.1
28.4
+ Temp. attn.
42.9
51.1
78.7
28.4
+ Inference
42.5
51.4
78.8
30.1
Table 3: Ablation of the main components of our method. Subcap. loss: subcaption alignment loss; Temp. attn.: temporal attention across frame-tokens; Inference: average the [ CLS ] and maximum frame-token similarities (rows above use the [ CLS ] only). Bold denotes the best result.
Table 4: Ablation study of frame-token alignment and attention masking. (a) –: no subcaption alignment (global loss only); CLS : alignment between the global video representation and subcaptions; FrTok : alignment between frame-tokens and subcaptions. Bold denotes the best result.
Fine-grained Interaction
MSR-VTT
CRB-T
VDC-O
F2S
42.2
48.5
77.5
F2S + S2F
41.1
50.7
76.7
S2F (ours)
42.9
51.1
78.7
Table 5: Effect of fine-grained interaction. F2S : Frame-to-Subcaption; S2F : Subcaption-to-Frame; F2S +S2F : combines both F2S and S2F . Bold denotes the best result.
Table 6: Ablation study of subcaption generation. When not specified, we use K=12 subcaptions and sample N=3 maximum number of sentences per subcaption. Bold denotes the best and underline second-best result.
Inference
MSR-VTT
CRB-T
VDC-O
CLS only
43.8
50.6
77.7
FrTok only
37.0
48.8
77.9
max( CLS , FrTok )
43.6
50.8
78.5
mean( CLS , FrTok )
43.9
51.8
78.4
Table 7: Ablation study of inference scoring strategies. We compare using the global [ CLS ] similarity or the best-maximum frame-token FrTok similarity alone, as well as combining both similarities using their maximum or mean. All scores are obtained with the same model (last row of Tab. 3 ). Bold denotes the best and underline second-best result.
Figure 3: Qualitative example of our MaxSim-based fine-grained alignment. Each subcaption is matched to its most similar token among the frame-tokens and register tokens. Subcaptions describing frame-specific content are matched to frame-tokens, while those containing global information or content unrelated to the video are matched to register tokens.
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
Method
Checkpoint or backbone
CLIP4Clip [ 31 ]
Searchium-ai/clip4clip-webvid150k
ViCLIP-L [ 43 ]
OpenGVLab/ViCLIP-L-14-hf
VideoCLIP-XL [ 40 ]
alibaba-pai/VideoCLIP-XL
UMT-L [ 27 ]
OpenGVLab/UMT-L16-17m
LanguageBind [ 61 ]
LanguageBind/ LanguageBind_Video_Huge_V1.5_FT
InternVideo2-1B [ 44 ]
OpenGVLab/ InternVideo2-Stage2_1B-224p-f4
Appendix
Table 8: Configurations for text-to-video retrieval. Checkpoint names identify the evaluated weights on Hugging Face using their organization/model identifiers.
Method
Pretraining data
MSRVTT
DiDeMo
ANet
MSVD
LSMDC
R@1
R@1
R@1
R@1
R@1
Cross-encoder
VIOLET [ 18 ]
YT-Temporal + WebVid-2M + CC3M
25.9
23.5
–
–
–
Singularity [ 26 ]
WebVid-2M + Img15M
34.0
37.1
30.6
–
–
UMT-L [ 27 ]
WebVid-2M + Img15M
42.6
46.4
42.8
49.9
25.2
UMT-L (Panda) [ 13 ]
Panda-5M
37.2
34.2
–
37.2
–
Appendix
Table 9: Broader comparison on zero-shot text-to-video retrieval. We evaluate our methods against state-of-the-art methods on coarse-grained zero-shot retrieval benchmarks. Img15M denotes CC12M + SBU + COCO + VG. CC denotes Conceptual Captions, and VG denotes Visual Genome. Bold denotes the best and underline second-best result.
Method
MSRVTT
DiDeMo
ANet
MSVD
LSMDC
R@1
R@1
R@1
R@1
R@1
CLIP
38.2
32.2
26.1
52.3
22.5
CLIP4Clip
45.6
43.0
40.3
45.2
24.3
ViCLIP-L
52.5
49.4
49.8
53.1
33.0
VideoCLIP-XL
57.0
62.3
58.4
55.6
34.2
Ours
LongViCLIP-L
57.2
67.4
63.5
60.8
34.6
Appendix
Table 10: Fine-tuned text-to-video retrieval. We evaluate our methods against state-of-the-art methods on fine-tuned retrieval benchmarks. For prior works, we report the results from [ 40 ] using the same fine-tuning setup. Bold denotes the best and underline the second-best result.
Method
K400
K600
K700
Acc.
Acc.
Acc.
CLIP4Clip
49.6
47.0
38.0
ViCLIP-L
59.9
57.9
49.9
VideoCLIP-XL
63.4
61.2
53.5
Ours
LongViCLIP-L
65.2
62.6
55.2
ViFCLIP-L ( CLS only)
65.3
63.6
56.0
Appendix
Table 11: Zero-shot action classification. We evaluate our methods against CLIP-based video-text models on zero-shot video classification benchmarks. We report top-1 accuracy computed using the [ CLS ] token. All models are evaluated with the same protocol. Bold denotes the best and underline second-best result.
Adaptation step
MSR-VTT
CRB-T
VDC-O
ViCLIP (1 short caption, 32 tokens)
32.3
25.6
43.0
+ Extend text context (32 → 134 tokens)
31.4
30.4
54.3
+ Add one long caption per video
33.8
34.3
62.9
+ Reduce random masking (90% → 50%)
36.8
37.1
66.2
+ Unfreeze text encoder (LR 2×10−5 )
35.9
41.5
69.3
+ Use multiple short and long captions (LongViCLIP)
41.4
46.4
75.2
Appendix
Table 12: Adapting ViCLIP into LongViCLIP. Each step adds the indicated change to the preceding configuration. The final LongViCLIP configuration is shaded in gray. Bold denotes the best result.
Table 13: Ablations on the video encoder. (a) Number of frame tokens. (b) Number of registers. (c) Learnable frame tokens vs. frame tokens obtained by mean pooling. (d) Number of inter-frame attention layers. Bold denotes the best and underline second-best result
Table 14: Training hyperparameters. We report the hyperparameters used to pretrain the base and large variants of LongViCLIP and ViFCLIP, as well as those used to fine-tune both methods on video-text retrieval benchmarks.
Figure 4: Additional qualitative examples of our MaxSim-based fine-grained alignment.
Figure 5: Illustration of our subcaption sampling strategy. We split the detailed captions into individual sentences, randomly select between 1 and N=3 sentences, and concatenate them to form a subcaption. We repeat this process K=12 times for each video.
Figure 6: Qualitative examples of fine-grained text-to-video retrieval. (a) Example from DREAM-E. (b) Example from CRB-T.