Bidirectional Cross-Modal Knowledge Exploration for Video Recognition
with Pre-trained Vision-Language Models
December 31, 2022
Vision-language models (VLMs) pre-trained on large-scale image-text pairs have demonstrated impressive transferability on various visual tasks. Transferring knowledge from such powerful VLMs is a promising direction for building effective video
recognition models. However, current exploration in this field is still limited. We believe that the greatest value of pre-trained VLMs lies in building a bridge between visual and textual domains. In this paper, we propose a novel framework called
BIKE, which utilizes the cross-modal bridge to explore bidirectional knowledge: i) We introduce the Video Attribute Association mechanism, which leverages the Video-to-Text knowledge to generate textual auxiliary attributes
for complementing video recognition. ii) We also present a Temporal Concept Spotting mechanism that uses the Text-to-Video expertise to capture temporal saliency in a parameter-free manner, leading to enhanced video representation. Extensive
studies on six popular video datasets, including Kinetics-400 & 600, UCF-101, HMDB-51, ActivityNet and Charades, show that our method achieves state-of-the-art performance in various recognition scenarios, such as general, zero-shot, and few-shot video
recognition. Our best model achieves a state-of-the-art accuracy of 88.6% on the challenging Kinetics-400 using the released CLIP model. The code is available at https://github.com/whwu95/BIKE.

Figure 1: Illustration of the difference between our paradigm (c) with existing unimodality paradigm (a) and cross-modal paradigm (b). Please zoom in for the best view..
In recent years, the remarkable success of large-scale pre-training in NLP (, BERT [1], GPT [2], [3], ERNIE [4] and T5 [5]) has inspired the computer vision community. Vision-language models (VLMs) leverage large-scale noisy image-text pairs with weak correspondence for contrastive learning (, CLIP [6], ALIGN [7], CoCa [8], Florence[9]), and demonstrate impressive transferability across a wide range of visual tasks.
Naturally, transferring knowledge from such powerful pre-trained VLMs is emerging as a promising paradigm for building video recognition models. Currently, exploration in this field can be divided into two lines. As depicted in Figure 1 (a), one approach [10]–[12] follows the traditional unimodal video recognition paradigm, initializing the video encoder with the pre-trained visual encoder of VLM. Conversely, the other approach [13]–[16] directly transfers the entire VLM into a video-text learning framework that utilizes natural language (, class names) as supervision, as shown in Figure 1 (b). This leads to an question: have we fully utilized the knowledge of VLMs for video recognition?
In our opinion, the answer is No. The greatest charm of VLMs is their ability to build a bridge between the visual and textual domains. Despite this, previous research employing pre-aligned vision-text features of VLMs for video recognition has only
utilized unidirectional video-to-text matching. In this paper, we aim to facilitate bidirectional knowledge exploration through the cross-modal bridge for enhanced video recognition. With this in mind, we mine Video-to-Text and
Text-to-Video knowledge by 1) generating textual information from the input video and 2) utilizing category descriptions to extract valuable video-related signals.
In the first Video-to-Text direction, a common practice for mining VLM knowledge is to embed the input video and category description into a pre-aligned feature space, and then select the category that is closest to the video, as
illustrated in Figure 1 (b), which serves as our baseline. One further question naturally arises: Can we incorporate auxiliary textual information for video recognition? To address this question, we introduce an
Video-Attributes Association mechanism, which leverages the zero-shot capability of VLMs to retrieve the most relevant phrases from a pre-defined lexicon for the video. These phrases are considered potential “attributes” of the video and
can predict the video category directly. For example, a video of someone kicking a soccer ball may be associated with relevant phrases such as “running on the grass”, “juggling soccer ball” and “shooting goal”. Surprisingly, using only the generated
attributes, we can achieve 69% top-1 accuracy on the challenging Kinetics-400 dataset. Furthermore, these attributes provide additional information that the video visual signal may not capture, allowing us to build an Attributes Recognition Branch
for video recognition.
In the second Text-to-Video direction, we believe that temporal saliency in videos can be leveraged to improve video representations. For instance, in a video with the category “kicking soccer ball”, certain frames of kicking the ball
should have higher saliency, while other frames that are unrelated to the category or background frames should have lower saliency. This insight motivates us to propose the Video Concept Spotting mechanism, which utilizes the cross-model
bridge to generate category-dependent temporal saliency. In previous works [13], [15], [16], this intuitive exploration was disregarded. To be more specific, instead of treating each video frame equally, we use the correlation between each frame and the
given concept (, category) as a measure of frame-level saliency. This saliency is then used to temporally aggregate the frames, resulting in a compact video representation.
In the light of the above explorations, we propose BIKE, a simple yet effective framework via BIdirectional cross-modal Knowledge Exploration for enhanced video recognition. Our BIKE comprises two branches: the Attributes branch, which utilizes the Video-Attributes Association mechanism to introduce auxiliary attributes for complementary video recognition, and the Video branch, which uses the Video Concept Spotting mechanism to introduce temporal saliency to enhance video recognition. To demonstrate the effectiveness of our BIKE, we conduct comprehensive experiments on popular video datasets, including Kinetics-400 [17] & 600 [18], UCF-101 [19], HMDB-51 [20], ActivityNet [21] and Charades [22]. The results show that our method achieves state-of-the-art performance in most scenarios, , general, zero-shot, and few-shot recognition.
Our main contributions can be summarized as follows:
We propose a novel framework called BIKE that explores bidirectional knowledge from pre-trained vision-language models for video recognition.
In the Video-to-Text direction, we introduce the Video-Attributes Association mechanism to generate extra attributes for complementary video recognition.
In the Text-to-Video direction, we introduce the Video Concept Spotting mechanism to generate temporal saliency, which is used to yield the compact video representation for enhanced video recognition.
An overview of our proposed BIKE is shown in Figure 2. We next elaborate on each component in more detail.
In this section, we describe the typical cross-modal video recognition pipeline [13]–[16] based on the pre-trained vision-language model (VLM). Given a video, we sample \(T\) frames from the video as input \(v\). We also have a collection of categories \(C=\{c_1, c_2, \cdots, c_K\}\), where \(K\) is the number of classes. The goal of the video recognition task is to classify the video \(v\) into a category \(c \in C\). Under the formulation of video recognition, the video \(v\) is encoded with a vision encoder \(f(\cdot | \theta_v)\) to obtain the video embedding \(\mathbf{e_v}\), and the category \(c\) is encoded with a text encoder \(g(\cdot | \phi_c)\) to obtain the category embedding \(\mathbf{e_c}\), where \[\mathbf{e_v} = f(v | \theta_v), \mathbf{e_c} = g(c| \phi_c).\] Finally, we obtain the similarity score \(\mathcal{S}_V\) as follows: \[\mathcal{S}_V = s(\mathbf{e_v},\mathbf{e_c}),\] where \(s(\cdot,\cdot)\) is the cosine similarity function. The objective during training is to maximize \(\mathcal{S}_V\) if \(v\) and \(c\) are matched, and minimize it in all other cases. During inference, we compute the score between the video embedding and each category embedding, and choose the category with the highest \(\mathcal{S}_V\) as the top-1 prediction. The parameter \(\theta_v\) and \(\phi_c\) of the video encoder and text encoder are initialized with weights from the pre-trained VLM (, CLIP [6]). Throughout the rest of this work, we use the same notation.

Figure 2: An overview of our BIKE for video recognition. (a) BIKE explores bidirectional cross-modal knowledge from the pre-trained vision-language model (, CLIP) to introduce auxiliary attributes and
category-dependent temporal saliency for improved video recognition. BIKE comprises an auxiliary Attributes branch and a main Video branch. (b) In the Video-to-Text direction, we present the
Video-Attribute Association mechanism, which retrieves semantically relevant phrases from a pre-defined lexicon as video attributes for the input video. These attributes are concatenated and combined with a textual prefix to form an
attribute sentence for text recognition. (c) In the Text-to-Video direction, we present the Video Concept Spotting mechanism, which computes the similarity between video frames and a given category as a measure of temporal
saliency to enhance video representation. \(D\) is the dimension of embedding, \(T\) is the number of frames, and \(N\) is the number of words in the
category name..
First we focus on exploring Video-to-Text auxiliary signals. We present an Attributes branch as a complement to the regular Video branch in 2.1 for video recognition.
Pre-generated Attributes. We begin by describing how to generate auxiliary attributes. As depicted in Figure 2 (b), we utilize the zero-shot capability of the VLM (, CLIP [6]) to identify the most relevant phases from a pre-defined lexicon as possible *“Attributes"* of the video. To achieve this, we first apply the CLIP’s image encoder to the input video \(V\) to extract frame-level features. These features are then combined using average pooling to yield a video embedding. Next, we feed each phase in the pre-defined lexicon into the CLIP’s text encoder to produce a set of text embeddings. We then calculate the similarity between this video embedding and each text embedding, sort the results, and select the top few phrases as the ”Attributes". Once we have obtained the attributes, we employ a simple fusion method that concatenates them into a single attributes sentence \(a\). We also add a manually-designed prompt as a prefix to the sentence, such as”This is a video about {}“.
Attributes Recognition. As shown in Figure 2 (a), the attributes sentence \(a\) is encoded with a text encoder \(g(\cdot | \phi_a)\) to produce the attribute embedding \(\mathbf{e_a}\): \[\mathbf{e_a} = g(a| \phi_a).\] We use this attribute embedding to perform Attributes Recognition by calculating the similarity \(\mathcal{S}_A\) between the attribute embedding and category embeddings. Note that both the attribute sentence and categories are encoded using the same text encoder from CLIP. Interestingly, the Attributes branch can achieve a certain level of recognition performance (, \(\sim\)56%) without any extra training, even though it’s a lightweight text recognition pipeline. During inference, we combine the well-trained Video branch with the plug-and-play Attributes branch using the following fusion equation: \[\mathcal{S} = \lambda \mathcal{S}_{V} + (1-\lambda) \mathcal{S}_{A}, \label{eq:infer}\tag{1}\] where \(\lambda\) is the fusion weight. Without any additional training, the Attributes Recognition surprisingly improve the video recognition performance, , \(78.8\%\xrightarrow{+1.2\%}80.0\%\) on the challenging Kinetics-400. Naturally, the text encoder \(g(\cdot | \phi_a)\) can be further trained in an end-to-end manner to improve the Attributes branch and provide a stronger complementary capability, , \(78.8\%\xrightarrow{+2.6\%}81.4\%\).
In 2.2, the Video-to-Text knowledge is employed to generate auxiliary attributes, thereby constructing a complementary Attributes branch. Naturally, we also conduct an exploration to leverage the
Text-to-Video knowledge to enhance the standard Video branch for video recognition. Specifically, we propose the use of category-dependent temporal saliency to guide the temporal aggregation process, resulting in a compact video
representation that enhances video recognition.
Background. To obtain a video representation based on a pre-trained image model, the typical pipeline involves two stages. First, we employ the image model to extract the spatial embedding of each frame. Next, the embeddings of these frames are temporally aggregated (, mean pooling) to yield a video-level representation.
| Method | Venue | Input | Pre-training | Top-1(%) | Top-5(%) | Views | FLOPs | Param |
|---|---|---|---|---|---|---|---|---|
| NL I3D-101 [23] | CVPR’18 | 128\(^2\) | ImageNet-1K | 77.7 | 93.3 | 10 | 359 | 61.8 |
| MVFNet\(_{En}\) [24] | AAAI’21 | 24\(^2\) | ImageNet-1K | 79.1 | 93.8 | 10 | 188 | - |
| TimeSformer-L [25] | ICML’21 | 96\(^2\) | ImageNet-21K | 80.7 | 94.7 | 1 | 2380 | 121.4 |
| ViViT-L/16 [26] | ICCV’21 | 32\(^2\) | ImageNet-21K | 81.3 | 94.7 | 4 | 3992 | 310.8 |
| VideoSwin-L [27] | CVPR’22 | 32\(^2\) | ImageNet-21K | 84.9 | 96.7 | 10 | 2107 | 200.0 |
| ViViT-L/16 [26] | ICCV’21 | 32\(^2\) | JFT-300M | 83.5 | 95.5 | 4 | 3992 | 310.8 |
| ViViT-H/16 [26] | ICCV’21 | 32\(^2\) | JFT-300M | 84.8 | 95.8 | 4 | 8316 | 647.5 |
| TokenLearner-L/10 [28] | NeurIPS’21 | 32\(^2\) | JFT-300M | 85.4 | 96.3 | 4 | 4076 | 450 |
| MTV-H [29] | CVPR’22 | 32\(^2\) | JFT-300M | 85.8 | 96.6 | 4 | 3706 | - |
| CoVeR [30] | arXiv’21 | 16\(^2\) | JFT-300M | 86.3 | - | 1 | - | - |
| CoVeR [30] | arXiv’21 | 16\(^2\) | JFT-3B | 87.2 | - | 1 | - | - |
| CoCa ViT-giant [8] | arXiv’22 | 6\(^2\) | JFT-3B+ALIGN-1.8B | 88.9 | - | - | - | 2100 |
| VideoPrompt ViT-B/16 [14] | ECCV’22 | 16\(^2\) | WIT-400M | 76.9 | 93.5 | - | - | - |
| ActionCLIP ViT-B/16 [13] | arXiv’21 | 32\(^2\) | WIT-400M | 83.8 | 96.2 | 10 | 563 | 141.7 |
| Florence [9] | arXiv’21 | 32\(^2\) | FLD-900M | 86.5 | 97.3 | 4 | - | 647 |
| ST-Adapter ViT-L/14 [10] | NeurIPS’22 | 32\(^2\) | WIT-400M | 87.2 | 97.6 | 3 | 8248 | - |
| AIM ViT-L/14 [12] | ICLR’23 | 32\(^2\) | WIT-400M | 87.5 | 97.7 | 3 | 11208 | 341 |
| EVL ViT-L/14 [11] | ECCV’22 | 32\(^2\) | WIT-400M | 87.3 | - | 3 | 8088 | - |
| EVL ViT-L/14 [11] | ECCV’22 | 32\(^2\) | WIT-400M | 87.7 | - | 3 | 18196 | - |
| X-CLIP ViT-L/14 [15] | ECCV’22 | 16\(^2\) | WIT-400M | 87.7 | 97.4 | 4 | 3086 | - |
| Text4Vis ViT-L/14 [16] | AAAI’23 | 32\(^2\) | WIT-400M | 87.8 | 97.6 | 1 | 3829 | 230.7 |
| BIKE ViT-L/14 | CVPR’23 | 16\(^2\) | WIT-400M | 88.1 | 97.9 | 4 | 830 | 230 |
| 8\(^2\) | 88.3 | 98.1 | 4 | 932 | 230 | |||
| 32\(^2\) | 88.6 | 98.3 | 4 | 3728 | 230 |
2.0pt
Parameter-Free Video Concept Spotting. Mean pooling is a widely used technique to aggregate the frame embeddings and obtain the final video representation. Instead of treating each video frame equally as in mean pooling, we propose a parameter-free solution that utilizes the pre-aligned visual and textual semantics offered by the VLM (, CLIP [6]) to capture temporal saliency for video feature aggregation, as illustrated in Figure 2 (c). To estimate temporal saliency, we employ word embeddings as the query to obtain finer word-to-frame saliency. Formally, the pre-trained VLM can encode each video or category name separately, and output two sets of embeddings: \(\{\mathbf{v}_t \in \mathbb{R}^{d} | t=1,2,\cdots,T\}\) is a set of frame embeddings, where \(T\) is the number of sampled frames, and \(\{\mathbf{t}_n \in \mathbb{R}^{d}|n=1,2,\cdots,N\}\) is a set of word embeddings, where \(N\) is the number of words in the class name. We calculate the similarity between each word and each frame to measure the fine-grained relevancy. After that, we perform a softmax operation to normalize the similarities for each frame, and then aggregate the similarities between a certain frame and different words to obtain a frame-level saliency.
\[\mathcal{S}_{t}= \frac{1}{N} \sum_{n=1}^N \dfrac{\exp({\mathbf{v}_t}^\mathsf{T}\mathbf{t}_n/\tau)}{\sum_{t=1}^T \exp({\mathbf{v}_t}^\mathsf{T} \mathbf{t}_n/\tau)}, t \in [1, T], n \in [1, N], \label{eq:softmax}\tag{2}\] where \(\tau\) is the temperature of this softmax function. See Figure 3 for the visualization of temporal saliency. Next, we utilize the temporal saliency to aggregate these frame embeddings as follows: \[\mathbf{e_v} = \sum_{t=1}^T \mathbf{v}_t \mathcal{S}_{t},\] \(\mathbf{e_v} \in \mathbb{R}^{d}\) is the final enhanced video representation.
We present the BIKE learning framework for video recognition, as depicted in Figure 2 (a). Formally, our BIKE extracts feature representations \(\mathbf{e_v}\), \(\mathbf{e_a}\), and \(\mathbf{e_c}\) for a given video \(v\), pre-generated attributes \(a\), and category \(c\) with the corresponding encoders \(f(\cdot | \theta_v)\), \(g(\cdot | \phi_a)\), and \(g(\cdot | \phi_c)\). Model parameters \(\theta_v\), \(\theta_a\), and \(\theta_c\) are initialized with the weights from the pre-trained VLM (, CLIP [6]). In this paper, we freeze the parameters of the pre-trained text encoder for \(g(\cdot | \phi_c)\) and design extra manual prompts for the category \(c\) and attributes sentence \(a\).
During the training phase, our objective is to ensure that the video representation \(\mathbf{e_v}\) and the category representation \(\mathbf{e_c}\) are similar when they are related and dissimilar when they are not, and the same applies to the attributes-category pairs. Given a batch of \(B\) quadruples \(\{\mathbf{e_v}_i, \mathbf{e_a}_i, \mathbf{e_c}_i \equiv C[y_i], y_i\}_{i=1}^{B}\), where \(C\) is the collection of \(K\) categories indexed by \(y_i \in [0, K-1]\) and \(y_i\) is a label indicating the index of the category in the dataset, and \(\mathbf{e_v}_i\), \(\mathbf{e_a}_i\), \(\mathbf{e_c}_i\) denote the \(i\)-th video embedding, attributes embedding, and category embedding, respectively. We follow the common practice [13], [14] to consider the bidirectional learning objective and employ symmetric cross-entropy loss to maximize the similarity between matched Video-Category pairs and minimize the similarity for other pairs: \[\begin{gather} \mathcal{L}_{V2C} = - \frac{1}{B} \sum_{i}^{B} \frac{1}{ |\mathcal{K}(i)| } \sum_{ k \in \mathcal{K}(i) } \log \frac{ \exp(s(\mathbf{e_c}_i,\mathbf{e_v}_k)/\tau) }{\sum_{j}^{B} \exp(s(\mathbf{e_c}_i,\mathbf{e_v}_j)/\tau) }, \\ \mathcal{L}_{C2V} = - \frac{1}{B} \sum_{i}^{B} \frac{1}{ |\mathcal{K}(i)| } \sum_{ k \in \mathcal{K}(i) } \log \frac{ \exp(s(\mathbf{e_c}_k,\mathbf{e_v}_i)/\tau) }{\sum_{j}^{B} \exp(s(\mathbf{e_c}_j,\mathbf{e_v}_i)/\tau) }, \\ \mathcal{L}_{V} = \frac{1}{2} (\mathcal{L}_{V2C} + \mathcal{L}_{C2V}), \end{gather}\] where \(k \in \mathcal{K}(i) = \{ k | k \in [1, B], y_k = y_i\}\), \(s(\cdot,\cdot)\) is the cosine similarity, and \(\tau\) refers to the temperature hyper-parameter for scaling. Similarly, the loss for Attributes branch is formulated as: \[\begin{gather} \mathcal{L}_{A2C} = - \frac{1}{B} \sum_{i}^{B} \frac{1}{ |\mathcal{K}(i)| } \sum_{ k \in \mathcal{K}(i) } \log \frac{ \exp(s(\mathbf{e_c}_i,\mathbf{e_a}_k)/\tau) }{\sum_{j}^{B} \exp(s(\mathbf{e_c}_i,\mathbf{e_a}_j)/\tau) }, \\ \mathcal{L}_{C2A} = - \frac{1}{B} \sum_{i}^{B} \frac{1}{ |\mathcal{K}(i)| } \sum_{ k \in \mathcal{K}(i) } \log \frac{ \exp(s(\mathbf{e_c}_k,\mathbf{e_a}_i)/\tau) }{\sum_{j}^{B} \exp(s(\mathbf{e_c}_j,\mathbf{e_a}_i)/\tau) }, \\ \mathcal{L}_{A} = \frac{1}{2} (\mathcal{L}_{A2C} + \mathcal{L}_{C2A}). \end{gather}\] The total loss \(\mathcal{L}\) is the sum of \(\mathcal{L}_{V}\) and \(\mathcal{L}_{A}\): \[\mathcal{L} = \mathcal{L}_{V} + \mathcal{L}_{A}.\] For inference, we simply combine the similarity score of the two branches as Equation 1 .
We conduct experiments on six widely used video benchmarks, , Kinetics-400 [17] & 600 [18], ActivityNet [21], Charades [22], UCF-101 [19] and HMDB-51 [20]. See Supplementary for statistics of these datasets.
Training & Inference. In our experiments, we adopt the visual encoder of CLIP [6] as the video encoder and use the textual encoder of CLIP for both the category and attributes encoders. To avoid conflict between the two branches, we first train the video encoder and then the attributes encoder. To prepare the video input, we sparsely sample \(T\) (, 8, 16, 32) frames. We set the temperature hyperparameter \(\tau\) to 0.01 for all training phases. See Supplementary for detailed training hyperparameters.
To trade off accuracy and speed, we consider two evaluation protocols. (1) Single View: We use only 1 clip per video and the center crop for efficient evaluation, as shown in Table ¿tbl:tab:ablations?. (2) Multiple Views: It is a common practice [24], [31], [32] to sample multiple clips per video with several spatial crops to get higher accuracy. For comparison with SOTAs, we use four clips with three crops (“4\(\times\)3 Views”) in Table 1.
| Method | UCF\(^*\) / UCF | HMDB\(^*\) / HMDB | ActivityNet\(^*\)/ ActivityNet | Kinetics-600 |
|---|---|---|---|---|
| GA [34] | 17.3\(\pm\)1.1 / - | 19.3\(\pm\)2.1 / - | - | - |
| TS-GCN [35] | 34.2\(\pm\)3.1 / - | 23.2\(\pm\)3.0 / - | - | - |
| E2E [36] | 44.1 / 35.3 | 29.8 / 24.8 | 26.6 / 20.0 | - |
| DASZL [37] | 48.9\(\pm\)5.8 / - | - / - | - | - |
| ER [33] | 51.8\(\pm\)2.9 / - | 35.3\(\pm\)4.6 / - | - | 42.1\(\pm\)1.4 |
| ResT [38] | 58.7\(\pm\)3.3 / 46.7 | 41.1\(\pm\)3.7 / 34.4 | 32.5 / 26.3 | - |
| BIKE ViT-L | 86.6\(\pm\)3.4 / 80.8 | 61.4\(\pm\)3.6 / 52.8 | 86.2\(\pm\)1.0 / 80.0 | 68.5\(\pm\)1.2 |
Comparison with State-of-the-arts. We present our results on Kinetics-400 in Table 1 and compare our approach with SOTAs trained under various pre-training settings. Our approach outperforms regular video recognition methods while requiring significantly less computation, as shown in the upper table. We also demonstrate superiority over methods that use web-scale image pre-training, such as JFT-300M [39] and JFT-3B [40]. Our model performs better than all JFT-300M pre-trained methods, achieving a higher accuracy (+2.3%) than CoVeR [30]. Surprisingly, our method even outperforms the JFT-3B pre-trained model (88.6% v.s. 87.2%) despite the latter having almost 3 billion annotated images and a data scale 7.5\(\times\)larger than ours. We further compare our method with others using web-scale image-language pre-training, such as CLIP [6] and Florence [9]. Despite Florence having a larger dataset (2\(\times\)more data than the 400M image-text data used in CLIP), our approach still achieves a higher accuracy by 2.1%. Additionally, using only 8 frames and the same CLIP pre-training, our model performs on par with the best results of other methods, such as EVL [11], X-CLIP [15], and Text4Vis [16]. When we use more frames as input, our method achieves a new state-of-the-art accuracy of 88.6% under the CLIP pre-training setting.
We also evaluate our method on the untrimmed video dataset, ActivityNet-v1.3, to verify its generalizability. We fine-tune the Kinetics-400 pre-trained model with 16 frames, and report the top-1 accuracy and mean average precision (mAP) using the official evaluation metrics. Our approach significantly outperforms recent SOTAs, as shown in Table ¿tbl:tab:anet95sota?. Furthermore, to demonstrate its effectiveness on smaller datasets, we also evaluate our method on UCF-101 and HMDB-51, achieving top-1 accuracy of 98.8% and 83.1%, respectively. We include the results in the Supplementary due to space limitations.
0.41
| Video branch | \(g(\cdot | \phi_c)\) | Top-1(%) |
|---|---|---|
| Baseline: Mean Pool | 76.8 | |
| + Video Concept Spotting | 78.5 (+1.7) | |
| + (Technique) Transf | 78.7 (+1.9) | |
| + Frozen label encoder | 78.9 (+2.1) |
0.31
| Source | ||
| Source | Top-1 | |
| Word Emb. | Word Emb. | 78.1 |
| \([\)CLS\(]\) Emb. | \([\)CLS\(]\) Emb. | 74.7 |
| Word Emb. | \([\)CLS\(]\) Emb. | 78.5 |
0.23
2.0pt
| Top-1 | ||
|---|---|---|
| 46.2 | ||
| 51.2 | ||
| 56.6 |
0.2
2.0pt
| #Attributes | A | V+A |
|---|---|---|
| 3 | 53.4 | 79.9 |
| 5 | 56.6 | 80.0 |
| 7 | 57.1 | 79.7 |
0.28
2.0pt
| Training | A | V \(\xrightarrow{{\color{teal}\textbf{+$\Delta$\%}}}\) V+A |
|---|---|---|
| 56.6 | 78.9 \(\xrightarrow{{\color{teal}\textbf{+1.1\%}}}\) 80.0 | |
| 69.6 | 78.9 \(\xrightarrow{{\color{teal}\textbf{+2.5\%}}}\) 81.4 |
0.23
2.0pt
| V \(\xrightarrow{{\color{teal}\textbf{+$\Delta$\%}}}\) V+A | |
|---|---|
| Baseline | 76.8 \(\xrightarrow{{\color{teal}\textbf{+2.4\%}}}\) 79.2 |
| Ours | 78.9 \(\xrightarrow{{\color{teal}\textbf{+2.5\%}}}\) 81.4 |
0.21
2.0pt
| Lexicon | V \(\xrightarrow{{\color{teal}\textbf{+$\Delta$\%}}}\) V+A |
|---|---|
| IN-1K | 78.9 \(\xrightarrow{{\color{teal}\textbf{+1.4\%}}}\) 80.3 |
| K400 | 78.9 \(\xrightarrow{{\color{teal}\textbf{+2.5\%}}}\) 81.4 |
0.44
| Method | \(T\) | Backbone | Top-1(%) |
|---|---|---|---|
| VideoPrompt [14] | 16 | ViT-B/32 | 76.9 |
| ActionCLIP [13] | 8 | ViT-B/32 | 78.4 |
| BIKE (Ours) | 8 | ViT-B/32 | 81.4 (+3.0) |
0.53
| Backbone | Baseline \(\rightarrow\) V \(\rightarrow\) V+A | V\(^*\) \(\rightarrow\) V\(^*\)+A |
|---|---|---|
| ViT-B/32 | 76.8 \(\xrightarrow{{\color{teal}\textbf{+2.1\%}}}\) 78.9 \(\xrightarrow{{\color{teal}\textbf{+2.5\%}}}\) 81.4 | 80.2 \(\xrightarrow{{\color{teal}\textbf{+1.7\%}}}\) 81.9 |
| ViT-B/16 | 79.9 \(\xrightarrow{{\color{teal}\textbf{+2.2\%}}}\) 82.1 \(\xrightarrow{{\color{teal}\textbf{+1.1\%}}}\) 83.2 | 83.2 \(\xrightarrow{{\color{teal}\textbf{+0.7\%}}}\) 83.9 |
| ViT-L/14 | 85.2 \(\xrightarrow{{\color{teal}\textbf{+0.8\%}}}\) 86.4 \(\xrightarrow{{\color{teal}\textbf{+0.1\%}}}\) 86.5 | 87.4 \(\xrightarrow{\textbf{+0\%}}\) 87.4 |
Multi-Label Video Recognition. In addition to the single-label video recognition, we also evaluate our method on multi-label video recognition. We use the Charades dataset, which contains long-term activities with multiple actions, and utilize the Kinetics-400 pre-trained ViT-L backbone for training. The results are evaluated using the mAP metric. As shown in Table [tbl:tab:charades], our BIKE achieves the performance of 50.4% mAP, demonstrating its effectiveness in multi-label video classification.
Few-Shot Video Recognition. We demonstrate the few-shot recognition capability of our method, which refers to video recognition using only a few training samples. In this experiment, we scaled up the task to categorize all categories in the dataset with only a few samples per category for training. We used a CLIP pre-trained ViT-L/14 with 8 frames for few-shot video recognition, without further Kinetics-400 pre-training. The top-1 accuracy on four datasets is reported in Table [tbl:table:video95few]. Our method shows remarkable transferability to diverse domain data in a data-poor situation. On UCF-101 and HMDB-51, our method outperforms VideoSwin [27] by 42.8% and 52.6%, respectively. In comparison with image-language pre-trained methods, our method outperforms VideoPrompt [14] and X-Florence [15] by 21.1% and 21.9% on HMDB-51, respectively. See Supplementary for training details.
Zero-shot Video Recognition. We further evaluate our method in an open-set setting. Table 2 presents the results of zero-shot evaluation on four video datasets using our Kinetics-400 pre-trained model (, ViT-L/14 with 8 frames). There are two major evaluation methods on UCF-101, HMDB-51, and ActivityNet: half-classes evaluation (marked as \(^*\)) and full-classes evaluation. For fair comparison, we present the results under the half-classes evaluation protocol, which has been widely used in previous works [33], [34], [36], [38]. Additionally, we provide results on the entire dataset for more challenging and realistic accuracy evaluation. See Supplementary for further details on evaluation protocols. Our method exhibits strong cross-dataset generalization ability and outperforms classic zero-shot video recognition methods.
In this section, we provide extensive ablations to demonstrate our method with the instantiation in Table ¿tbl:tab:ablations?.
The Effect of Temporal Saliency. We investigate the impact of our proposed Video Concept Spotting (VCS) mechanism on the performance of the Video branch, as shown in Table [tbl:tab:ablation:video95sal]. We start with a baseline that uses mean pooling to aggregate the features of all frames, without considering temporal saliency. We observe that equipping the baseline with VCS can improve the accuracy by +1.7%. We then introduce a multi-layer (, 6-layers) Transformer encoder with position embedding for sequence features, commonly used in previous methods, and find that it provides an additional 0.2% performance boost. Moreover, freezing the category encoder not only reduces training parameters but also slightly improves performance (+0.2%).
Exploration of Category Embedding for Temporal Saliency and Classification. As mentioned in Section 2.3, CLIP’s textual encoder can generate two types of embeddings: the [CLS] embedding for the entire sentence and the word embedding for each word. Therefore, we can encode the category into these two types of embeddings. The category embedding has two roles in our method: 1) it serves as a query to determine the temporal saliency, and 2) it calculates similarity with video representation to produce recognition results. We demonstrate the results for three different combinations in Table [tbl:tab:ablation:query]. We find that the global [CLS] embedding performs better than the word-level embedding for final recognition, but the word-level embedding is necessary for temporal saliency.
Prompt Engineering and Number of Attributes. For both attributes and categories in the Attributes recognition branch, we manually define a prompt, , “This is a video about {}”. The results in Table [tbl:tab:ablation:prompt] show that the prompt significantly improves accuracy, even without training the attributes encoder. Furthermore, in Table [tbl:tab:ablation:n95attr], we observe that the number of attributes has little effect on the performance of the Attributes recognition and two-branch recognition.
The Impact of Attributes branch. Table [tbl:tab:ablation:train95attr] shows that without any training, the Attributes branch can be plug-and-played on the Video branch to improve the recognition performance. After training the attributes encoder, the Attributes branch further boosts performance by an impressive 2.5% on the fusion result. Additionally, we find that the Attributes branch can also improve the baseline when fused with it, as shown in Table [tbl:tab:ablation:val]. By combining the VCS and the Attributes branch, we can achieve a remarkable improvement of 4.6% on the baseline.
Attributes Generation with Different Lexicons. In 2.2, we use a pre-defined lexicon to obtain attributes. In Table [tbl:tab:ablation:lexicon], we explore the impact of different lexicons. We used ImageNet-1K, an image dataset that covers 1000 object categories, as our lexicon to search for potential object attributes. According to the results, this can increase the performance of the Attributes branch by 1.4%. We found that using the 400 categories of Kinetics-400 as the lexicon can further improve the results.
Comparison with CLIP-Based Methods. Table [tbl:tab:ablation:clip-based] presents a comparison between our method and two CLIP-based approaches, VideoPrompt [14] and ActionCLIP [13], both trained with contrastive loss. Despite using fewer frames, our method achieves higher Top-1 accuracy than VideoPrompt. Moreover, using the same ViT-B/32 backbone, our approach outperforms ActionCLIP by 3.0%.
More Evaluation with Different Backbones. Table [tbl:tab:ablation:backbone] presents a comprehensive evaluation of the
applicability of our method using larger backbones. Our observations are as follows: 1) Despite the greatly improved performance of the baseline with larger backbones, our VCS mechanism still provides consistent, additional gains. This
demonstrates the continued necessity of Text-to-Video saliency knowledge for large models. 2) As the absolute accuracy of the Video branch increases, the complementing effect of the Attributes branch gradually weakens. We
conjecture that with larger models, richer representations are learned, leading to reduced bias in learned representations and an increased correlation with the Attributes branch, resulting in a reduction in complementary information. 3)
Multiple-view evaluation involving more video clips leads to increased performance, reducing the bias of the model itself. For models with a top-1 accuracy of 87.4%, the Attributes branch is unable to provide supplementary knowledge. Therefore,
the Attributes branch is not utilized in our ViT-L/14 models presented in 3.2.
Figure 3 illustrates the temporal saliency generated by Video Concept Spotting mechanism, highlighting the frame that is most relevant to the category. We also demonstrate the complementarity of the auxiliary attributes generated by our Video-Attribute Association mechanism with the video branch. See more qualitative results in Supplementary.

Figure 3: Visualization of (Top) temporal saliency and (Bottom) attributes. Please zoom in for the best view..
Convolutional networks have been the standard backbone architecture in video recognition for a long time. Early works focused on jointly learning spatial and temporal context through parallel branches [31], [41]–[45]. Later works developed plug-and-play temporal modules [24], [46]–[53] for 2D CNN backbones to improve temporal modeling. Some works also designed dynamic inference mechanisms [54]–[59] for efficient video recognition. Recently, Vision Transformers [60]–[62] has emerged as a new trend in image recognition backbones. Transformers have also been adopted for video recognition, such as TimeSFormer [25], ViViT [26], VideoSwin [27], and MViT [63].
Transferring CLIP Models for Video Recognition. CLIP [6] provides good practice in learning the coordinated vision-language models using
large-scale image and text pairs. The pre-trained model can learn powerful visual representations aligned with rich linguistic semantics. Initially, some works [64]–[67] propose to directly use CLIP for video-text
retrieval. Later, a few works also explore the use of CLIP models for video recognition [10]–[16], they can be broadly categorized into two lines. The first line [10]–[12] follows the unimodal transferring paradigm, where the image encoder of CLIP is used as a strong initialization for the video encoder. The second line [13]–[16] provides cross-model learning baselines that
directly extend CLIP to video-label matching for video recognition. However, these studies only briefly tap into the knowledge from CLIP. In contrast, our work aims to further explore the bidirectional cross-modal knowledge from CLIP to enhance the
cross-model baseline. Our approach introduces auxiliary attributes in the Video-to-Text direction and category-dependent temporal saliency in the Text-to-Video direction, resulting in a more effective and interpretable video
recognition.
In this work, we introduce a novel two-stream framework called BIKE that leverages bidirectional cross-modal knowledge from CLIP models to enhance video recognition. Our approach involves the Attributes branch, which utilizes the Attributes-Category Association mechanism to generate attributes for auxiliary recognition, and the Video branch, which uses the Video Concept Spotting mechanism to generate temporal saliency and produce a more compact video representation. Our approach is evaluated on six video datasets, and the experimental results demonstrate its effectiveness.
In this appendix, we provide additional details and results for our approach. Specifically, §6 contains further details on the training process (§6.1), attributes branch (§6.2), zero-shot evaluation (§6.3), statistics of video datasets (§6.4), visual encoder architectures (§6.5), and Distributed InfoNCE (§6.6). In §7, we present additional results, including comparisons on UCF-101 and HMDB-51 (§7.1) and more visualizations (§7.2).
Regular Video Recognition. We present our approach for regular video recognition in Table 3, sharing the same training recipe for all video datasets, including Kinetics-400, ActivityNet, Charades, HMDB-51, and UCF-101.
Few-shot Video Recognition. We repeat the samples to maintain the same number of iterations as the regular counterpart. For instance, if the model is trained on Kinetics-400 with around 900 iterations per epoch for the general setting, we repeat the sample to maintain the same number of iterations for few-shot settings. We train few-shot models for 2 epochs on Kinetics-400 and 10 epochs on other video datasets, , ActivityNet, HMDB-51, and UCF-101, while keeping other settings the same as in Table 3.
Zero-shot Video Recognition. We use the Kinetics-400 pre-trained models to perform cross-dataset recognition without additional training on other datasets such as ActivityNet, HMDB-51, UCF-101, and Kinetics-600.
To improve the quality of auxiliary attributes, we pre-generate them using CLIP ViT-L/14 with 8 frames. We employ the text encoder architecture of CLIP ViT-B/32 as our attribute encoder. To integrate the Attributes branch with the Video branch, we set \(\lambda\) to 0.6 for the Video branch with ViT-B and \(\lambda\) to 0.8 for the Video branch with ViT-L.
| Setting | Value |
|---|---|
| Training Hyperparameter | |
| Batch size | 256 |
| Vocabulary size | 49408 |
| Training epochs | 30 (ViT-B), 20 (ViT-L) |
| Optimizer | AdamW |
| Learning rate (Base) | 5e-5, cosine |
| Learning rate (CLIP layers) | 5e-6, cosine |
| Weight decay | 0.2 |
| Linear warm-up epochs | 5 |
| Adam \(\beta_1\),\(\beta_2\) | 0.9, 0.999 |
| Augmentation | |
| Resize | RandomSizedCrop |
| Crop size | 224 (Default) |
| Random Flip | 0.5 |
| Random Gray scale | 0.2 |
| Embedding | Input | Vision Transformer | Text Transformer | |||||
| Model | dimension | resolution | layers | width | heads | layers | width | heads |
| ViT-B/32 | 512 | 224 | 12 | 768 | 12 | 12 | 512 | 8 |
| ViT-B/16 | 512 | 224 | 12 | 768 | 12 | 12 | 512 | 8 |
| ViT-L/14 | 768 | 224 | 24 | 1024 | 16 | 12 | 768 | 12 |
| ViT-L/14-336px | 768 | 336 | 24 | 1024 | 16 | 12 | 768 | 12 |
We employ our Kinetics-400 pre-trained models to evaluate on other datasets. For UCF-101, HMDB-51, and ActivityNet, we adopt two major evaluation protocols as described in [36]:
Half-Classes Evaluation: To ensure comparability with previous works, we randomly select half of the test dataset’s classes - 50 for UCF, 25 for HMDB, and 100 for ActivityNet - and evaluate on the selected subset. We repeat this process ten times and average the results for each test dataset. We refer to this setting as UCF\(^*\), HMDB\(^*\) and ActivityNet\(^*\).
Full-Classes Evaluation: This evaluation setting involves directly evaluating on the full dataset to return more realistic accuracy scores.
For Kinetics-600, we follow [33] to choose the 220 new categories outside of Kinetics-400 in Kinetics-600 for evaluation. We use the three splits provided by [33] and sample 160 categories for evaluation from the 220 categories in Kinetics-600 for each split. We report the mean accuracy of the three splits as the final accuracy.
We describe the video datasets used in our experiments:
Kinetics-400 is a large-scale video dataset that includes 240,000 training videos and 20,000 validation videos across 400 different human action categories. Each video in the dataset is a 10-second clip of an action moment, annotated from raw YouTube videos.
Kinetics-600 is an extension of Kinetics-400, consisting of approximately 480,000 videos from 600 action categories. The videos are divided into 390,000 for training, 30,000 for validation, and 60,000 for testing. In this paper, we use its test set for zero-shot evaluation.
UCF-101 is an action recognition dataset that contains 13,320 videos from 101 realistic action categories, collected from YouTube.
HMDB-51 is a collection of realistic videos from various sources, including movies and web videos. The dataset comprises 7,000 video clips from 51 action categories.
ActivityNet-v1.3 is a large-scale untrimmed video benchmark that contains 19,994 untrimmed videos of 5 to 10 minutes from 200 activity categories.
Charades is a video dataset designed for action recognition and localization tasks. It contains over 10,000 short video clips of people performing daily activities, and consists of 157 action categories.
In this paper, we provide the complete architecture details of the visual encoder and textual encoders. The CLIP-ViT architectures are shown in Table 4.
# category_encoder: encoder network for category input
# video_encoder: encoder network for video input
# V: minibatch of video inputs
# T: minibatch of category inputs
# N: the local batch size of each GPU, e.g.,16
# M: the number of GPUs, e.g.,8
# N * M: the global batch size for multi-gpu training, e.g.,128
# extract feature representations of each modality
local_vision_features = video_encoder(V) # shape: [N, embed_dim]
local_text_features = category_encoder(T) # shape: [N, embed_dim]
# normalization
local_vision_features = l2_normalize(local_vision_features, axis=1)
local_text_features = l2_normalize(local_text_features, axis=1)
# batch_gather is a function gathering and concatenating the tensors across GPUs.
all_vision_features = batch_gather(local_vision_features) # shape: [N * M, embed_dim]
all_text_features = batch_gather(local_text_features) # shape: [N * M, embed_dim]
# scaled pairwise cosine similarities
# shape = [N, N * M]
logits_per_vision = logit_scale * local_vision_features @ all_text_features.t()
# shape = [N, N * M]
logits_per_text = logit_scale * local_text_features @ all_vision_features.t()
# The logits are then used as inputs for N*M-way (e.g., 128-way) classification,
# resulting in a loss value corresponding to N inputs in each GPU.
# Then Distributed Data Parallel mechanism takes care of averaging these across GPUs,
# which becomes equivalent to calculating the loss over NMxNM (e.g.,128x128) similarities.Instead of Data-Parallel Training (DP), which is single-process, multi-thread, and only works on a single machine, Distributed Data-Parallel Training (DDP) is a widely adopted single-program multiple-data training paradigm for single- and multi-machine training. Due to GIL contention across threads, per-iteration replicated model, and additional overhead introduced by scattering inputs and gathering outputs, DP is usually slower than DDP even on a single machine. Hence, we develop the Distributed InfoNCE based on DDP for large batch size and fast training.
The core of the Distributed InfoNCE implementation is batch gathering, which enables us to calculate the NM\(\times\)NM similarity matrix across M GPUs for InfoNCE loss. Without batch gathering, each GPU only computes a local N\(\times\)N matrix where N\(\ll\)NM. This means that the cosine similarity and the InfoNCE loss would only be calculated for the pairs within a single GPU, and their gradients would be later averaged and synced. That’s obviously not what we want.
The batch gathering technique allows each GPU to hold N vision features and perform a matrix product with NM text features, resulting in an N\(\times\)NM matrix. This computation is distributed (, sharded) across M GPUs, and we have calculated NM\(\times\)NM similarities across the GPUs in total. The loss we employ is symmetric, and the same process is applied w.r.t. text inputs. [batch95gather] provides an example pseudocode to help understand the process.

Figure 4: Visualization of temporal saliency from our Video Concept Spotting mechanism. Please zoom in for best view..
In this section, we evaluate the performance of our method on the UCF-101 and HMDB-51 datasets to demonstrate its capacity for generalization to smaller datasets. We finetune our models on these two datasets using the pre-trained ViT-L model on Kinetics-400 and report the accuracy on split one. We use 16 frames as inputs and train for 30 epochs. Table 5 shows that our model has strong transferability, achieving a mean class accuracy of 98.8% on UCF-101 and 83.1% on HMDB-51.
| Method | UCF-101 | HMDB-51 |
|---|---|---|
| ARTNet [68] | 94.3% | 70.9% |
| I3D [32] | 95.6% | 74.8% |
| R(2+1)D [52] | 96.8% | 74.5% |
| S3D-G [51] | 96.8% | 75.9% |
| TSM [69] | 95.9% | 73.5% |
| STM [70] | 96.2% | 72.2% |
| MVFNet [24] | 96.6% | 75.7% |
| TDN [53] | 97.4% | 76.4% |
| Ours ViT-L | 98.8% | 82.2% |
| Ours ViT-L (336\(\uparrow\)) | 98.6% | 83.1% |


Figure 5: Visualization of the attribute sentence generated by the Video-Attribute Association mechanism that corrected the original incorrect prediction to the correct one..
We present additional visualizations of the Temporal Saliency generated by our Video Concept Spotting mechanism in Figure 4. In Figure 5, we also showcase more visualizations of the Generated Attributes produced by our Video-Attribute Association mechanism using two different lexicons.