Static Content First, Dynamics on Top: Refining the Mean for Text-Video Retrieval
Organizations: The University of Tokyo · National Institute of Informatics · University of Augsburg
Abstract
The fastest text-video retrieval models built on CLIP turn a video clip into a single vector, which is computed offline and compared with the query vector by one dot product. The frames of a clip are highly similar, so their mean holds most of the content; changes over time are small deviations from it. Prior methods such as CLIP4Clip feed frame embeddings directly to a temporal transformer and may miss how the clip evolves, because they are dominated by their shared content. Instead, we separate the frame embeddings into their mean and the deviations, and feed only the deviations to a temporal transformer. Starting from this mean, the clip vector attends to the transformer outputs to add what it still lacks, and a null slot lets it add little or nothing when the clip is mostly static. This runs once per clip, independently of the query, so each clip stays one vector that holds both static and dynamic content. On Something-Something v2, whose queries describe actions, our method outperforms every baseline. Taking the better of its results with and without distillation, it is the best on six of ten benchmarks and within 0.8 R@1 of the best on the others. It retrieves about 1,000x faster than the heaviest models.
Figures & tables
| Method | SSv2-Template | SSv2-Label | Charades | RTime (Hard) | ||||||||
| R@1 | R@5 | R@10 | R@1 | R@5 | R@10 | R@1 | R@5 | R@10 | R@1 | R@5 | R@10 | |
| CLIP4Clip-MeanP | 51.9 | 87.6 | 96.2 | 39.7 | 67.1 | 76.5 | 15.0 | 32.3 | 41.7 | 34.8 | 84.4 | 91.4 |
| CLIP4Clip-seqTransf | 78.5 | 97.5 | 99.4 | 48.2 | 74.8 | 82.5 | 16.9 | 36.2 | 46.9 | 35.1 | 83.9 | 91.8 |
| TeachCLIP w/o distill. | 75.3 | 97.9 | 99.2 | 48.0 | 75.2 | 83.4 | 16.6 | 35.6 | 46.2 | 35.5 | 84.5 | 91.8 |
| X-CLIP | 80.3 | 98.3 | 99.4 | 48.7 | 74.8 | 83.1 | 15.7 | 34.3 | 44.2 | 34.1 | 81.6 | 89.7 |
| X-Pool | 55.9 | 91.6 | 97.1 | 38.2 | 66.9 | 77.1 | 12.1 | 29.0 | 39.4 | 35.2 | 85.7 | 92.4 |
| Method | MSR-VTT | ActivityNet | MSVD | VATEX ∗ | LSMDC | DiDeMo | ||||||||||||
| R@1 | R@5 | R@10 | R@1 | R@5 | R@10 | R@1 | R@5 | R@10 | R@1 | R@5 | R@10 | R@1 | R@5 | R@10 | R@1 | R@5 | R@10 | |
| CLIP4Clip-MeanP | 43.4 | 70.3 | 80.3 | 38.6 | 70.1 | 82.1 | 44.0 | 73.9 | 83.1 | 60.2 | 89.7 | 94.7 | 17.9 | 38.4 | 48.7 | 39.4 | 68.4 | 78.5 |
| CLIP4Clip-seqTransf | 44.2 | 70.7 | 81.4 | 42.5 | 73.1 | 84.8 | 45.8 | 75.8 | 84.7 | 62.5 | 90.8 | 95.5 | 21.1 | 40.8 | 50.2 | 40.4 | 69.0 | 79.3 |
| TeachCLIP w/o distill. | 44.6 | 71.8 | 81.2 | 42.9 | 73.8 | 85.4 | 46.0 | 75.7 | 84.4 | 63.3 | 91.1 | 95.7 | 21.6 | 40.3 | 48.9 | 43.3 | 70.8 | 79.3 |
| X-CLIP | 46.7 | 72.7 | 82.9 | 44.6 | 74.2 | 85.1 | 46.1 | 76.0 | 85.0 | 62.3 | 90.5 | 95.3 | 21.9 | 41.8 | 51.0 | 45.4 | 73.7 | 82.2 |
| X-Pool | 46.0 | 72.4 | 81.8 | 40.1 | 71.1 | 82.9 | 45.9 | 76.5 | 85.0 | 61.5 | 90.4 | 95.5 | 21.0 | 40.5 | 49.9 | 44.6 | 72.7 | 82.2 |
| Train | MSR-VTT | SSv2-T | SSv2-L |
| Test | avg. of 5 | MSR-VTT | MSR-VTT |
| CLIP4Clip-MeanP | 27.7 | 15.9 | 25.8 |
| CLIP4Clip-seqTransf | 30.7 | 15.3 | 24.9 |
| TeachCLIP w/o distill. | 30.6 | 12.2 | 25.2 |
| X-CLIP | 31.8 | 12.4 | 24.7 |
| X-Pool | 34.8 | 20.3 | 29.7 |
Appendix figures & tables20 assets
Supplementary material from the paper’s appendix.
Appendix
| Benchmark | Frames | Words | Batch | Epochs | Epoch chosen on |
| SSv2-T / SSv2-L | 12 | 32 | 120 | 20 | test |
| Charades | 12 | 64 | 32 | 20 | test |
| RTime | 12 | 32 | 128 | 10 | validation |
| MSR-VTT | 12 | 32 | 128 a | 5 a | test |
| ActivityNet | 64 | 64 | 64 | 20 | test |
| MSVD | 12 | 32 | 128 | 5 | validation |
| Method | Numbers | MSR-VTT | ActivityNet | MSVD | VATEX ∗ | LSMDC | DiDeMo | SSv2-T | SSv2-L |
| CLIP4Clip-MeanP | published | 43.1 | 40.5 | 46.2 | – | 20.7 | 43.4 | – | – |
| reproduced | 43.4 | 38.6 | 44.0 | 60.2 | 17.9 | 39.4 | 51.9 | 39.7 | |
| CLIP4Clip-seqTransf | published | 44.5 | 40.5 | 45.2 | – | 22.6 | 42.8 | 77.0 † | 43.1 † |
| reproduced | 44.2 | 42.5 | 45.8 | 62.5 | 21.1 | 40.4 | 78.5 | 48.2 | |
| X-CLIP | published | 46.1 | 44.3 | 47.1 | – | 23.3 | 45.2 | – | – |
| reproduced | 46.7 | 44.6 | 46.1 | 62.3 | 21.9 | 45.4 | 80.3 | 48.7 |
| Method | SSv2-Template | SSv2-Label | ||||||||||
| mean std | R@1 per seed (epoch) | mean std | R@1 per seed (epoch) | |||||||||
| R@1 | R@5 | R@10 | 1 | 2 | 3 | R@1 | R@5 | R@10 | 1 | 2 | 3 | |
| CLIP4Clip-MeanP | 51.9 0.33 | 87.6 1.20 | 96.2 0.33 | 51.7 10 | 52.3 13 | 51.7 14 | 39.7 0.26 | 67.1 0.50 | 76.5 0.56 | 39.5 18 | 40.0 14 | 39.5 15 |
| CLIP4Clip-seqTransf | 78.5 2.39 | 97.5 0.33 | 99.4 0.00 | 80.5 15 | 79.3 16 | 75.9 16 | 48.2 0.31 | 74.8 0.09 | 82.5 0.28 | 48.2 19 | 48.5 20 | 47.9 20 |
| TeachCLIP w/o distill. | 75.3 1.15 | 97.9 0.66 | 99.2 0.33 | 74.1 18 | 75.3 14 | 76.4 18 | 48.0 0.34 | 75.2 0.72 | 83.4 0.23 | 47.6 19 | 48.1 17 | 48.3 16 |
| X-CLIP | 80.3 4.27 | 98.3 0.60 | 99.4 0.00 | 85.1 16 | 78.7 17 | 77.0 13 | 48.7 1.25 | 74.8 0.51 | 83.1 0.46 | 49.1 15 | 47.3 18 | 49.7 13 |
| Method | Charades | RTime (Hard) | ||||||||||
| mean std | R@1 per seed (epoch) | mean std | R@1 per seed (epoch) | |||||||||
| R@1 | R@5 | R@10 | 1 | 2 | 3 | R@1 | R@5 | R@10 | 1 | 2 | 3 | |
| CLIP4Clip-MeanP | 15.0 0.36 | 32.3 0.87 | 41.7 0.58 | 14.9 10 | 15.4 16 | 14.7 8 | 34.8 0.21 | 84.4 0.86 | 91.4 0.37 | 34.7 10 | 35.0 4 | 34.6 10 |
| CLIP4Clip-seqTransf | 16.9 0.42 | 36.2 0.17 | 46.9 0.44 | 16.8 20 | 17.4 16 | 16.6 18 | 35.1 0.15 | 83.9 0.47 | 91.8 0.37 | 35.3 8 | 35.2 8 | 34.9 6 |
| TeachCLIP w/o distill. | 16.6 0.40 | 35.6 0.90 | 46.2 1.51 | 17.0 18 | 16.2 13 | 16.5 18 | 35.5 1.22 | 84.5 1.03 | 91.8 1.02 | 36.8 9 | 34.4 10 | 35.4 6 |
| X-CLIP | 15.7 0.90 | 34.3 0.55 | 44.2 0.76 | 15.8 19 | 14.8 15 | 16.6 14 | 34.1 0.25 | 81.6 0.35 | 89.7 0.40 | 34.1 5 | 34.4 8 | 33.9 3 |
| Method | MSR-VTT | ActivityNet | ||||||||||
| mean std | R@1 per seed (epoch) | mean std | R@1 per seed (epoch) | |||||||||
| R@1 | R@5 | R@10 | 1 | 2 | 3 | R@1 | R@5 | R@10 | 1 | 2 | 3 | |
| CLIP4Clip-MeanP | 43.4 0.61 | 70.3 0.31 | 80.3 0.10 | 43.1 2 | 43.0 2 | 44.1 2 | 38.6 0.15 | 70.1 0.15 | 82.1 0.10 | 38.6 14 | 38.8 14 | 38.5 12 |
| CLIP4Clip-seqTransf | 44.2 0.31 | 70.7 0.72 | 81.4 0.50 | 44.3 2 | 43.9 3 | 44.5 3 | 42.5 0.06 | 73.1 0.10 | 84.8 0.12 | 42.5 16 | 42.4 16 | 42.5 18 |
| TeachCLIP w/o distill. | 44.6 0.21 | 71.8 0.45 | 81.2 0.66 | 44.7 2 | 44.8 4 | 44.4 3 | 42.9 0.32 | 73.8 0.15 | 85.4 0.26 | 43.3 17 | 42.8 17 | 42.7 18 |
| X-CLIP | 46.7 0.30 | 72.7 0.25 | 82.9 0.81 | 46.4 3 | 47.0 3 | 46.7 2 | 44.6 0.31 | 74.2 0.26 | 85.1 0.06 | 44.9 17 | 44.3 19 | 44.5 17 |
| Method | MSVD | VATEX ∗ | ||||||||||
| mean std | R@1 per seed (epoch) | mean std | R@1 per seed (epoch) | |||||||||
| R@1 | R@5 | R@10 | 1 | 2 | 3 | R@1 | R@5 | R@10 | 1 | 2 | 3 | |
| CLIP4Clip-MeanP | 44.0 0.56 | 73.9 0.18 | 83.1 0.17 | 43.5 1 | 44.6 2 | 43.9 3 | 60.2 0.25 | 89.7 0.10 | 94.7 0.00 | 60.0 4 | 60.5 3 | 60.2 4 |
| CLIP4Clip-seqTransf | 45.8 0.82 | 75.8 0.60 | 84.7 0.28 | 44.9 1 | 46.3 5 | 46.4 3 | 62.5 0.31 | 90.8 0.20 | 95.5 0.15 | 62.2 4 | 62.8 4 | 62.6 4 |
| TeachCLIP w/o distill. | 46.0 0.17 | 75.7 0.16 | 84.4 0.12 | 46.2 2 | 46.0 1 | 45.9 1 | 63.3 0.06 | 91.1 0.32 | 95.7 0.15 | 63.3 5 | 63.3 5 | 63.2 5 |
| X-CLIP | 46.1 0.44 | 76.0 0.20 | 85.0 0.15 | 45.9 1 | 45.8 3 | 46.6 3 | 62.3 0.20 | 90.5 0.06 | 95.3 0.12 | 62.1 4 | 62.3 5 | 62.5 4 |
| Method | LSMDC | DiDeMo | ||||||||||
| mean std | R@1 per seed (epoch) | mean std | R@1 per seed (epoch) | |||||||||
| R@1 | R@5 | R@10 | 1 | 2 | 3 | R@1 | R@5 | R@10 | 1 | 2 | 3 | |
| CLIP4Clip-MeanP | 17.9 0.75 | 38.4 0.75 | 48.7 0.53 | 18.7 3 | 17.2 2 | 17.9 3 | 39.4 1.16 | 68.4 0.20 | 78.5 0.46 | 38.6 3 | 40.7 8 | 38.8 5 |
| CLIP4Clip-seqTransf | 21.1 0.47 | 40.8 0.67 | 50.2 0.96 | 20.7 2 | 21.6 2 | 20.9 2 | 40.4 0.20 | 69.0 0.75 | 79.3 0.30 | 40.4 10 | 40.2 8 | 40.6 10 |
| TeachCLIP w/o distill. | 21.6 0.26 | 40.3 0.96 | 48.9 1.36 | 21.9 2 | 21.4 3 | 21.5 2 | 43.3 0.61 | 70.8 0.25 | 79.3 0.31 | 42.6 10 | 43.6 8 | 43.7 9 |
| X-CLIP | 21.9 0.42 | 41.8 0.62 | 51.0 0.75 | 21.4 3 | 22.2 2 | 22.0 2 | 45.4 0.65 | 73.7 0.17 | 82.2 0.45 | 45.4 9 | 44.7 10 | 46.0 9 |
| Vectors | Operations | Time per query (ms), gallery size | Index (GB) | ||||
| Method | per clip | per pair | k | k | k | M | k |
| One vector per clip (CLIP4Clip-MeanP, Ours, …) | 1 | 1 | 0.00014 | 0.00049 | 0.0037 | 0.049 | 0.10 |
| TS2-Net | 12 | 0.0010 | 0.0089 | 0.088 | 1.06 | 1.23 | |
| X-CLIP | 13 | 466.6 | 0.051 | 0.50 | 4.92 | 49.4 | 1.33 |
| X-Pool (key/value offline) | 24 | 1,049 | 0.038 | 0.35 | 3.48 | 34.9 | 2.46 |
| X-Pool (official) | 12 | 0.043 | 0.39 | 3.91 | 39.1 | 1.23 | |
| Benchmark | |||||
| SSv2-T | 83.1 1.8 | 81.6 0.6 | 82.2 2.0 | 83.9 3.5 | – |
| Charades | 16.9 0.1 | 16.6 0.6 | 16.4 0.4 | 17.1 0.2 | – |
| ActivityNet | 44.0 0.6 | 44.3 0.2 | 44.5 0.1 | 44.4 0.5 | 44.6 0.1 |
| MSR-VTT | 46.0 0.8 | 46.5 0.4 | 45.7 0.2 | 46.0 0.4 | – |
| MSVD | 46.4 0.3 | 46.1 0.5 | 45.8 0.1 | 46.4 0.4 | – |
| Amount, round | Overlap (%), round | ||||||
| 1 | 2 | 3 | 4 | 2 | 3 | 4 | |
| SSv2-T | 0.34 | 0.32 | 0.33 | 0.34 | 77 | 79 | 78 |
| Charades | 0.16 | 0.19 | 0.17 | 0.14 | 84 | 82 | 82 |
| ActivityNet | 0.09 | 0.07 | 0.07 | 0.09 | 87 | 86 | 85 |
| MSR-VTT | 0.22 | 0.18 | 0.17 | 0.12 | 89 | 89 | 88 |
| MSVD | 0.09 | 0.10 | 0.09 | 0.06 | 88 | 89 | 89 |
| Rounds kept | 4 | 3 | 2 | 1 |
| SSv2-T | 83.9 | 79.3 | 75.5 | 67.4 |
| Charades | 17.1 | 16.9 | 16.3 | 15.2 |
| ActivityNet | 44.4 | 44.1 | 43.8 | 43.4 |
| MSR-VTT | 46.0 | 45.9 | 46.1 | 45.4 |
| MSVD | 46.4 | 46.5 | 46.5 | 46.5 |
| Variant | MSR-VTT | SSv2-T |
| Ours, (reference) | 46.0 0.8 | 83.1 1.8 |
| Amount: scalar gate | 45.4 0.4 | – |
| Amount: sigmoid gate | 45.8 1.0 | – |
| Values without LN and scale | 45.2 0.5 | – |
| Null bias initialized at | 45.6 0.7 | – |
| Text query instead of | 46.3 0.2 | 83.3 0.0 |
| Benchmark | Teachers | Source |
| MSR-VTT | X-CLIP, TS2-Net, X-Pool | released by TeachCLIP |
| MSVD | X-CLIP, TS2-Net, X-Pool | released by TeachCLIP |
| DiDeMo | X-CLIP, TS2-Net | released (no X-Pool) |
| VATEX | X-CLIP, TS2-Net | released (no X-Pool) |
| ActivityNet | X-CLIP | trained, last epoch |
| LSMDC | X-CLIP | trained, last epoch |
| Method | Vec. | ms/query | SSv2-T | MSR-VTT | DiDeMo | LSMDC | VATEX |
| TeachCLIP w/o distill. | 1 | 0.004 | 81.0 | 46.9 | 46.4 | 24.2 | 66.9 |
| X-CLIP | 13 | 4.9 | 82.0 | 49.5 | – | – | – |
| Ours | 1 | 0.004 | 83.7 | 47.5 | 47.6 | 26.2 | 66.7 |
| Train | MSR-VTT | SSv2-T | SSv2-L | ||||||
| Test | DiDeMo | MSVD | VATEX | LSMDC | SSv2-L | SSv2-T | avg. of 5 | MSR-VTT | MSR-VTT |
| CLIP4Clip-MeanP | 28.5 | 38.8 | 47.4 | 8.9 | 14.6 | 5.0 | 27.7 | 15.9 | 25.8 |
| CLIP4Clip-seqTransf | 31.5 | 43.3 | 49.3 | 15.0 | 14.2 | 6.7 | 30.7 | 15.3 | 24.9 |
| TeachCLIP w/o distill. | 30.7 | 43.3 | 49.8 | 14.7 | 14.5 | 5.9 | 30.6 | 12.2 | 25.2 |
| X-CLIP | 32.4 | 44.3 | 51.0 | 15.9 | 15.4 | 6.9 | 31.8 | 12.4 | 24.7 |
| X-Pool | 38.9 | 46.5 | 54.9 | 16.4 | 17.1 | 6.1 | 34.8 | 20.3 | 29.7 |
| without centering | centered | ||||
| Benchmark | frames | words | frames | words | ratio |
| MSR-VTT | 0.82 | 0.53 | 0.64 | 0.18 | 3.50 |
| SSv2 | 0.90 | 0.55 | 0.71 | 0.20 | 3.53 |
| DiDeMo | 0.87 | 0.51 | 0.72 | 0.26 | 2.77 |
| MSVD | 0.88 | 0.50 | 0.73 | 0.16 | 4.61 |
| VATEX | 0.88 | 0.50 | 0.72 | 0.20 | 3.60 |
| SSv2-T | SSv2-L | |||||
| Model | intact | shuf. | rev. | intact | shuf. | rev. |
| CLIP4Clip-seqTransf | 78.7 | 59.3 | 36.0 | 48.1 | 44.4 | 39.8 |
| TeachCLIP w/o distill. | 75.5 | 58.2 | 36.2 | 48.0 | 43.9 | 39.4 |
| + input | 82.2 | 64.4 | 39.1 | – | – | – |
| Ours | 81.8 | 63.7 | 38.3 | 51.5 | 44.9 | 37.0 |
| Gain of ours | 6.3 | 5.5 | 2.1 | 3.5 | 1.1 | |