Question-Instructed Visual Descriptions for Zero-Shot Video Question Answering (2024)

Abstract: We present Q-ViD, a simple approach for video question answering (video QA), that unlike prior methods, which are based on complex architectures, computationally expensive pipelines or use closed models like GPTs, QViD relies on a single instruction-aware open vision-language model (InstructBLIP) to tackle video QA using frame descriptions. Specifically, we create captioning instruction prompts that rely on the target questions about the videos and leverage InstructBLIP to obtain video frame captions that are useful to the task at hand. Subsequently, we form descriptions of the whole video using the question-dependent frame captions, and feed that information, along with a question-answering prompt, to a large language model (LLM). The LLM is our reasoning module, and performs the final step of multiple-choice QA. Our simple Q-ViD framework achieves competitive or even higher performances than current state of the art models on a diverse range of video QA benchmarks, including NExT-QA, STAR, How2QA, TVQA and IntentQA. Our code is publicly available at: https://github.com/Daromog/Q-ViD

heading: 1 Introduction
text: Recently, vision-language models have shown remarkable performances in image questionanswering tasks (Goyal et al., 2017; Marino et al., 2019; Schwenk et al., 2022), with models such as Flamingo (Alayrac et al., 2022), BLIP-2 (Li et al., 2023b), InstructBlip (Dai et al., 2023) and mPLUG-Owl (Ye et al., 2023) showing strong reasoning capabilities in the vision-language space. Image captioning (Vinyals et al., 2015; Ghandi et al., 2023) is one of the tasks in which these models truly excel, as they can generate detailed linguistic descriptions from images. Different works have leveraged this capability in many ways for zero-shot image-question answering, such as giving linguistic context to images (Hu et al., 2022;
Ghosal et al., 2023), addressing underspecification problems in questions (Prasad et al., 2023), coordination of multiple image captions to complement information (Chen et al., 2023b), or by combining captions with other type of linguistic information from the image (Berrios et al., 2023). In this manner, the reasoning capabilities of LLMs can be directly used to reason about the linguistic image descriptions and generate an answer for the given visual question.
This approach has been successful for images, but in the case of video-question answering tasks (Lei et al., 2018; Li et al., 2020; Xiao et al., 2021; Wu et al., 2021; Li et al., 2023a) this is more challenging. Video possesses multiple image frames that have relationships between each other and involve the recognition of objects, actions, as well as the inference about semantic, temporal, causal reasoning and much more (Zhong et al., 2022). Thus, some works (Chen et al., 2023a; Wang et al., 2023) have focused on using ChatGPT to either ask visual questions to image-language models like BLIP-2 or to respond and retrieve useful information from large datasets with detailed linguistic information from the video. Similarly, Zhang et al. (2023a) have leveraged the reasoning capabilities of GPT3.5 to create textual summaries from the video, and later perform video QA using only textual information. While others (Wang et al., 2022b; Zeng et al., 2022) combine linguistic information from multiple sources such as captions, visual tokenization or even subtitles of input speech. In summary, current methods for video QA rely on any combination of closed LLMs, expensive training regimes, and complex architectures with multiple modules (Yang et al., 2022; Ko et al., 2023; Yu et al., 2023; Momeni et al., 2023; Li et al., 2023c; Zhang et al., 2023a). In contrast, we introduce Q-ViD a simple Question-Instructed Visual Descriptions for video QA approach that relies on an instructionaware vision-language model, InstructBLIP (Dai
9329
et al., 2023), to automatically generate rich specific captions from video frames. In this manner, we effectively turn the video QA task into a text QA task. More specifically, given an input video V we sample n number of frames, then, we generate question-specific instructions to prompt the multimodal instruction tuned model to generate captions for each frame. Afterwards, we form a video description by concatenating all the generated question-dependent captions from InstructBLIP, and use it along with the question, options and a question-answering instruction prompt as input to the LLM-based reasoning module that generates an answer to the multiple-choice question about the video. We demonstrate the effectiveness of Q-ViD on five challenging multiple choice video question answering tasks (NExT-QA, STAR, How2QA, TVQA, IntentQA), showing that this simple framework can achieve strong performances comparable with more complex pipelines. Our contributions are summarized as follows:
• We propose Q-ViD, a simple gradient-free approach for zero-shot video QA that relies on an open instruction-tuned multimodal model to extract question-specific descriptions of frames to transform the video QA task into a text QA one.
• Our approach achieves strong zero-shot performance that is competitive or even superior to more complex architectures such as SeViLa, Internvideo, and Flamingo. It even compares favorably with recent solutions that include GPT APIs, like LloVi and ViperGPT.

heading: 2 Related Work

heading: 2.1 Multimodal Pretraining for Video QA
text: The strong reasoning capabilities of LLMs (Chung et al., 2022; Touvron et al., 2023; Brown et al., 2020; Hoffmann et al., 2022) in natural language processing tasks has motivated to apply these models for visual understanding. Currently, LLMs have been successfully adapted to understand images (Li et al., 2023b; Ye et al., 2023; Chen et al., 2023c), but applying the same principles for video is more challenging. Approaches for VideoQA rely on image-language models, and adapt those to process video by using fixed amounts of video frames as input (Alayrac et al., 2022; Yu et al., 2023; Yang et al., 2022), or by selecting key-frames from the initial sequence (Yu et al., 2023; Li et al., 2023c).
Commonly, these works use frozen visual and language models and focus only on modality alignment. Models like Flamingo (Alayrac et al., 2022) uses a fixed amount of video frames as input and bridges modalities by training a perceiver resampler and gated attention layers in the Chinchilla LLM (Hoffmann et al., 2022). While others, like SeViLa (Yu et al., 2023) relies on BLIP-2 (Li et al., 2023b) for modality alignment, using an intermediate pretrained module called Q-former. SeViLa, first perform key-frame localization and then video QA with Flan-T5 LLMs (Chung et al., 2022). On the other hand, other works apart from using frozen vision models, adapt the LLM to visual inputs using adapter tokens (Zhang et al., 2023b) or intermediate trainable modules (Houlsby et al., 2019). Models like Flipped-VQA (Ko et al., 2023) focuses on adapting LLaMa (Touvron et al., 2023) to video QA by using adapter tokens along with different training objectives to leverage the temporal and causal reasoning abilities of LLMs. Similarly, FrozenBilm (Yang et al., 2022) exploit the strong zeroshot performance of BILM, a frozen bidirectional language model that is adapted to video QA by using lightweight trainable modules. Despite the success of all these models, they require complex architectures and training regimes, unlike these works we build a simple, gradient-free, approach for zero-shot video QA.

heading: 2.2 Image Captions for Video Understanding
text: One of the core strengths of image-language models (Alayrac et al., 2022; Li et al., 2023b; Dai et al., 2023) is the generation of image captions, thus due to the current strong zero-shot capabilities of LLMs, captions can be directly use to reason about visual content. This has been successfully leveraged in the image-language space for image question-answering with approaches such as Lens (Berrios et al., 2023), Img2LLM (Guo et al., 2023) and PromptCat (Hu et al., 2022) that gather image captions and other type of linguistic information to answer a visual question. While similar approaches have been taken for videos, the use of large models like GPTs is very common, with models such as ChatCaptioner (Chen et al., 2023a), ViperGPT (Surís et al., 2023) , ChatVideo (Wang et al., 2023), VidIL (Wang et al., 2022b), Socratic Models (Zeng et al., 2022), and LLoVi (Zhang et al., 2023a) have been applied for video-language tasks, common methods use GPTs to either interact with imagelanguage models to get visual descriptions, or to
make summaries from captions and other type of information such as visual tokenization, subtitles of speech and more. Unlike these approaches, we do not use GPTs or multiple computationally expensive modules in any part of our pipeline to achieve strong zero-shot performance on video QA.

heading: 3 Method
text: Recently, vision-language models trained with instruction tuning (Dai et al., 2023; Zhu et al., 2023; Liu et al., 2023) have shown impressive capabilities to faithfully follow instructions and extract visual representations adapted to the task at hand. Thus, with Q-ViD (Figure 1),we propose to leverage these capabilities for multiple-choice video QA, and turn this task into textual QA using InstructBLIP (Dai et al., 2023). We use a questiondependent captioning prompt as the input instruction, to guide InstructBLIP to generate video frame descriptions that are more relevant for the given question. Afterwards, we reuse the LLM from InstructBLIP and use it as our reasoning module. This LLM (Flan-T5) takes a question-answering prompt as input, that consists of a video description formed by the concatenation of all the questiondependent frame captions, the question, options and a task instruction. Considering that Flan-T5 is also originally trained with instructions, we aim to leverage its reasoning capabilities to correctly answer the question given only the text we just described as input. Our simple approach does not rely on complex pipelines or closed GPT models, which makes it easy, cheaper and straight forward to use for zero-shot video QA. On the other hand, Q-ViD is flexible and model agnostic, which means we can use any multimodal models available. This section presents our approach in detail. First, we in-
troduce some preliminary information on InstructBLIP, which serves as the foundation of our work, and then we provide a detailed overview for all components from our Q-ViD framework.

heading: 3.1 Preliminaries: InstructBLIP
text: We rely on InstructBLIP (Dai et al., 2023) as the foundational architecture of Q-ViD. InstructBLIP is a vision-language instruction tuning framework based on a Query Transformer (Q-former) and frozen vision and language models. Unlike BLIP-2 (Li et al., 2023b), which is based on an instructionagnostic approach, InstructBLIP can obtain visual features depending on specific instructions of the task at hand using an instruction-aware Q-former, which in addition to query embeddings, uses instruction tokens to guide the Q-former in extracting specific image features. Subsequently, a LLM (Flan-T5) uses these features to generate visual descriptions depending on the input instructions. In our approach we adapt this model to video, we adopt it to obtain video frame captions that are dependant on the questions of the video QA task, thus, we aim to gather the most important information from each part of the video and use it as input for our reasoning module to answer the given question. Because of our Q-ViD framework is a zero-shot approach, we do not train any part of InstructBLIP, and keep all of its parts frozen.

heading: 3.2 Q-ViD: Generating Frame Descriptions for Video QA
text: We focus on automatically generating meaningful captions that can provide enough information about what is happening in the video to the LLM. We assume that if captions for the frames contain relevant information related to the question
needing answer, then an LLM should be able to answer the question correctly without additional need for frame/video input. As shown in Figure 2, given an input video V , we use a uniform sampling strategy and extract a set of n video frames {f1, f2, ..., fn}. We then use InstructBLIP, refered as Ib, to obtain instruction-aware visual captions ci for each frame fi, as follows ci = Ib(fi, E), where E represents the question-dependent captioning instruction. Q-ViD generates E, by concatenating a captioning prompt, referred as B (e.g "Provide a detailed description of the image related to the question:") and a question, referred as Q (e.g "Why did the man in white held tightly to the boy in white?"), represented as follows E = concat(B,Q). Specifically, E is used as input to the Q-former and the LLM of InstructBLIP to obtain specific visual representations and frame descriptions respectively. Thus, we represent the input video V as a set of question-dependent frame captions c = (c1, c2, ..., cn), where each caption is conformed by a sequence of wm words ci = (w1, w2, ..., wm). In this way, we extract specific textual information from the frames of V , that is going to be useful for the question answering task. Next, we describe the reasoning module of Q-ViD and how these question-dependent captions are used to perform video QA.

heading: 3.3 Q-ViD: Reasoning Module
text: We reuse the frozen LLM (Flan-T5) from InstructBLIP and implement it as the reasoning module of Q-ViD. In order to perform video QA using lan-
guage, we first concatenate the question-dependent frame captions C = [c1, c2, ..., cn] in the same order they appear in the video. Then, we create a question-answering instruction L as follows: L = concat(C,Q,A, T ). In other words, we concatenate in L the list of captions C, question Q, possible answers A and a task description T (e.g "Considering the information presented in the captions, select the correct answer in one letter (A,B,C) from the options."). Our goal is to leverage the LLM reasoning linguistic capabilities by providing a set of captions that were tailored to be relevant for the specific question Q. Our experiments in Section 4, show that this simple approach works surprisingly well, showing to be competitive, and even superior in some cases, in comparison with more complex pipelines. Next, we describe in more detail the prompts used for question-dependent captioning and video QA.

heading: 3.4 Q-ViD: Prompt Design
text: First, to get question-dependent captions for each frame, given the question Q we prompt InstructBLIP with a question-dependent captioning instruction: "Provide a detailed description of the image related to the question: {Q}". This instruction is used along with queries as input to the frozen Q-Former and LLM modules of InstructBLIP to extract specific visual features and generate question-dependent descriptions. Afterwards, to perform QA with the reasoning module, given the list of captions C and the list of possible answers A = [a1, ..., am] with m being the number
of options provided in each dataset, we prompt the language model as follows: "Captions: {C} Question: {Q}. Option A: a1. Option B: a2. Option C: a3. Considering the information presented in the captions, select the correct answer in one letter from the options (A,B,C)". In this prompt, in addition to the list of captions, the question and the list of possible answers, we added a small instruction at the end to specify in detail that a single letter is needed as output.

heading: 4 Experiments
text: In this section, we present our experiments for zeroshot video QA. First, we describe the datasets we used and the implementation details. Then, we evaluate our approach, compare Q-ViD with other state of the art models for video QA and provide a comprehensive analysis of the model’s performance. Lastly, we conduct some ablation studies of Q-ViD regarding the instructions prompt design.

heading: 4.1 Datasets
text: To test our approach, we conduct experiments on the following multiple-choice video QA benchmarks. To make comparisons with prior work we use the validation set in NExT-QA, STAR, How2QA and TVQA, meanwhile in IntentQA we use the test set. More details are shown below:
• NExT-QA (Xiao et al., 2021): A benchmark focused on Temporal, Causal and Descriptive reasoning type of questions. Contains 5,440 videos and 48K multiple-choice questions in total. We perform our experiments using the validation set that is conformed by 570 videos and 5K multi-choice questions. • STAR (Wu et al., 2021): A benchmark that evaluates situated reasoning in real-world videos, is focused on interaction, sequence, prediction and feasibility type of questions. It contains 22K situation video clips and 60K questions. We perform evaluations on the validation set with 7K multiple-choice questions. • HOW2QA (Li et al., 2020): A dataset that consists on 44K question-answering pairs for 22 thousand 60-second clips selected from 9035 videos. We perform experiments on the validation set with 2.8K questions. • TVQA (Lei et al., 2018): A large scale video QA dataset based on six popular TV shows. It has 152K multiple-choice questions and 21K video clips. For our zero-shot evaluations we
use the validation set with 15K video-question pairs. • IntentQA (Li et al., 2023a): A dataset focused on video intent reasoning. It contains 4K videos and 16K multiple-choice questionanswer samples. In this case, we use the test set for our zero-shot evaluations which contains 2K video-question answering samples.

heading: 4.2 Implementation Details
text: For Q-ViD we adopt InstructBLIP-Flan-T5XXL with 12.1B parameters, as a default vision encoder it uses VIT-g/14 (Fang et al., 2023), and as language model FlanT5XXL (Chung et al., 2022). We extract 64 frames per video, as in preliminary experiments this number worked well. For frame captioning, we use a maximum number of 30 tokens per description and top-p sampling with topp = 0.7 to get varied captions. Regarding our reasoning module, we reuse and adopt the corresponding Flan-T5 language model from InstructBLIP. In this case we do not use top-p sampling. Our experiments were conducted using 4 NVIDIA A100 (40GB) GPUs using the Language-Vision Intelligence library LAVIS (Li et al., 2022) and the released code from SeViLa (Yu et al., 2023) .

heading: 4.3 Overall Performance
text: Table 1 provides a detailed overview on the performance of Q-ViD on the validation set of NExT-QA, STAR, HOW2QA and TVQA. We compare our approach with current state of the art methods such as SeViLa (Yu et al., 2023), FrozenBILM (Yang et al., 2022) and VideoChat2 (Li et al., 2024), as well as, with GPT-based models like ViperGPT (Surís et al., 2023) and LloVi (Zhang et al., 2023a). The results obtained from our experiments demonstrate the surprisingly competitive nature of Q-ViD, outperforming or being competitive with previous methods with more complex architectural pipelines such as SeViLa, VideoChat2 and LLoVi. For fair comparisons, we gray out methods that use GPTs.
Specifically, on NExT-QA, Q-ViD outperforms SeViLa by 2.7% of average accuracy, and achieves almost the same state of the art results of Llovi, a framework based of GPT-3.5. Notably, Q-ViD is the best-performing model on causal questions, temporal questions, and overall average performance among methods that are not based on GPTs, showing the ability of this approach to perform action reasoning, which is the target of NExTQA. With STAR, Q-ViD achieves the second
best average accuracy behind VideoChat2, outperforming all other methods like SeViLa by 1.1%, BLIP-2concat by 3.5%, InternVideo by 4.1% and Flamingo-80B by 6%. Also note that Q-ViD achieves the second best performances on sequence and feasibility type of question of STAR. Lastly, on How2QA we achieve the second best performance behind SeViLa, and achieves the best overall performance for TVQA with an improvement of 0.4% to the previous best-performing method VideoChat2.
On the other hand, in Table 2 we evaluate our approach on IntentQA, we use the test set of this benchmark in order to compare with prior works. We take the same comparison made from (Zhang et al., 2023a), and divide the table in two categories, Supervised and Zero-shot approaches. QViD continues showing strong results, greatly outperforming all supervised methods and the SeViLa zero-shot performance by 2.7%. Interestingly, QViD almost achieves the best overall performance from the GPT-based method Llovi. These results demonstrate that our approach can be used among different video QA tasks and be able to achieve strong zero-shot performances.

heading: 5 Ablation Studies
text: In this section, we perform some ablation studies related to the instruction prompt selection for QViD. For these experiments, we chose NExT-QA and STAR as our benchmarks, and report results on the validation sets on each dataset. Specifically, we test two model variations, using InstructBLIPFlanT5XL (Q-ViDXL) and the one used to report our main results, InstructBLIP-FlanT5XXL (QViDXXL), we test different prompts to analyze and
compare the use of question-dependent and general descriptive captions. Additionally, we also make some ablation experiments for the questionanswering instruction prompt that is used by the reasoning module to perform multi-choice QA. We discuss our findings in detail below.

heading: 5.1 Prompt Analysis
text: We focus on analyzing the impact on performance of the Captioning and QA instruction templates in Q-ViD. First, for the captioning instruction template (Figure 3), we compare two type of variants: (1) General prompts and (2) Question-dependent prompts. With general prompts we focus on obtaining general visual descriptions, and with questiondependent prompts on visual information related to the question of the task at hand. In order to test the impact of these captioning prompts, in both cases, we use a Base QA instruction template used as
input by the reasoning module (LLM) to perform multiple-choice QA. To leverage as much as possible the instruction-based capabilities of InstructBLIP, we create these prompts based on similar templates used by this model in its training setup.
Table 3 compares the performance of Q-ViDXL and Q-ViDXXL using the general, and questiondependent captioning prompts. It can be seen that performance varies between both models. First, Q-ViDXL achieves better performances with general captioning prompts, when comparing the best variants of this model, using the (2) General and (1) Dependent prompts, the former further increases the average accuracy by +1.4% on NExT-QA and +3.1% on STAR. On the other hand, the same behaviour is not shown using a bigger model, QViDXXL achieves significant improvements in average performance by using question-dependent prompts, when comparing its best variants using the (2) General and (2) Dependent prompts, the latter obtains improvements of +3.5% on NExT-QA and +4.2% on STAR. Unsurprisingly, Q-ViDXXL provides significant performance boosts when compared to its smaller version Q-ViDXL achieving better performances on all type of questions in both datasets, showing a better capability to follow instructions, however, this also demonstrates that using question-dependent prompts to obtain specific information for the task at hand, performs better for zero-shot Video QA than using captioning prompts that obtains general visual descriptions.
Next, in Table 4 we investigate the impact on performance of the QA Instruction template. We
propose two variations that are shown at the bottom of Figure 4 , in addition to the Base QA template (Figure 3). With these new variants we aim to test giving more details to our reasoning module based on Flan-T5, because of this LLM is also a model trained with instructions, we explore if using more complex and detailed QA prompts we can achieve better performances. For this comparison we take the best variants (Table 3) of Q-ViDXL and Q-ViDXXL using the (2) General and (2) Dependent captioning prompts respectively for each model, and explore their performances with different QA instruction templates. As shown in Table 4, using more complex variants of the initial Base QA Instruction prompt does not have a big impact on performance in any of the models, it even slightly affects the performance in some cases, showing that the simplest base prompt was enough for the LLM to understand the task. With this ablation study we can highlight the fact that the input instruction used to obtain dedicated frame descriptions is far more important than elaborated question-answering instruction prompts for zero-shot video QA.

heading: 6 Conclusion
text: In this paper, we introduce Q-ViD, a simple, gradient-free approach for zero-shot video QA. QViD turns video QA into textual QA using frame captions. To do so, Q-VID relies on an instructionaware visual language model and uses questiondependent captioning instructions to obtain specific frame descriptions useful for the task at hand.
This information is later used by a reasoning module with a question-answering instruction prompt to perform multiple-choice video QA. Our simple approach achieves competitive or even higher performances than more complex architectures and methods that rely on closed models like the GPT family. In our ablation studies we show that using dedicated instructions to get question-dependent captions works better than common prompts to get general descriptions from frames to perform video QA using captions.
Limitations
Even though, Q-ViD has shown to achieve strong performances for zero-shot video question answering, our approach suffers from some limitations. While the adopted instruction-aware multimodal model, InstructBlip, shows to successfully follow instructions from the question and extract meaningful information that can help the reasoning module to come up with the right answer, we have seen that in some cases the model tends to show
hallucinations in the captions, or generate direct short one-word answers instead of a detailed and question-specific description of the image. On the other hand, even though experiments with really long videos are not within the scope of this paper, our approach would no be recommended in those cases, due to the high memory usage that comes with saving detailed frame captions to create an entire video description, which would also affect the LLM-based reasoning module because of the limited amount of tokens allowed as input or due to memory constrains to process the entire video description.

heading: A Licences
text: We use standard licenses from the community for the datasets, codes, and models that we used in this paper:
• NExT-QA (Xiao et al., 2021): MIT
• STAR (Wu et al., 2021): Apache
• How2QA (Li et al., 2020): MIT
• TVQA (Lei et al., 2018): MIT
• IntentQA (Li et al., 2023a): N/A
• SeViLa (Yu et al., 2023): BSD 3 - Clause
• LAVIS (Li et al., 2022): BSD 3-Clause
• Pytorch (Paszke et al., 2019): BSD Style
• Q-ViD (Ours): BSD 3-Clause

heading: B Use of Artifacts
text: In this work we adopt a open multimodal model, InstructBLIP (Dai et al., 2023), its application in our approach is consistent with its original intended use. For Q-ViD we release our code and we hope it will be useful for future works.

heading: Future Work
text: For Q-ViD we release our code and we hope it will be useful for future works