Zero-Shot Video Question Answering with Procedural Programs

Rohan Choudhury, Koichiro Niinuma, Kris M. Kitani, László A. JeniarXiv 2023 · DOI

Abstract

ProViQ (Procedural Video Querying) is a novel framework designed to solve complex video question answering (VideoQA) tasks by decomposing them into executable Python programs. By leveraging Large Language Models (LLMs) to generate and orchestrate modular visual subtasks—such as object detection, tracking, and captioning—ProViQ achieves state-of-the-art zero-shot performance across multiple benchmarks. This approach allows the system to outperform many supervised models without requiring task-specific training data, while providing an interpretable reasoning trace.

Introduction

Traditional VideoQA models typically operate as "black boxes," trained end-to-end on massive datasets. These models often struggle with two primary challenges: reasoning complexity and data dependency. Complex queries, such as "What color jacket did the skier in orange pants wear?", require multi-step logic that global video features often fail to capture. Furthermore, the high cost of labeled video-question pairs limits the scalability of supervised methods. ProViQ addresses these issues by mimicking human-like reasoning, breaking down a single query into a sequence of discrete, interpretable visual subtasks.

Methodology: Code Generation as Reasoning

The core of ProViQ is the concept of code generation as a reasoning mechanism. Instead of directly outputting an answer, the system follows a three-step pipeline:

  1. Program Generation: An LLM (specifically GPT-3.5-turbo) receives the user's question along with an API of available visual modules. It then writes a short Python script to solve the query.
  2. Execution: A Python interpreter executes the generated code, calling various pre-trained "expert" models through a unified API.
  3. Modular API: The system utilizes a toolbox of specialized models, including GroundingDINO for text-conditioned object detection, BLIP-2 for image-level QA, and ByteTrack for multi-object tracking.
Figure 3: The ProViQ pipeline decomposes a complex query into three executable steps: filtering the relevant actor, finding the specific object of interest, and querying its attributes.

For long-form content, ProViQ employs a Long Video Summarization module. This module processes videos by chunking them into 1-second segments, generating captions, and using an LLM to synthesize a coherent narrative paragraph, enabling reasoning over extended temporal durations.

Experimental Evaluation

The authors evaluated ProViQ on a comprehensive battery of benchmarks covering short, long, and multimodal video content:

  • Open-Ended: TGIF-QA, MSVD-QA, MSRVTT-QA, ActivityNet-QA, and iVQA.
  • Multiple-Choice: TVQA (dialogue-heavy) and NeXT-QA (causal/temporal).
  • Long-Form: EgoSchema (3-minute egocentric videos).

Key Results and Insights

ProViQ demonstrated significant performance improvements over previous zero-shot leaders like FrozenBiLM, achieving a +25% accuracy jump on TGIF-QA and the challenging EgoSchema benchmark, and a +23% increase on iVQA. Notably, it surpassed supervised state-of-the-art models on ActivityNet-QA and iVQA without seeing a single training example from those datasets.

Figure 6: Example of visual grounding where the system identifies and crops the jacket within the filtered skier clip.

Key insights from the study include:

  • Interpretability by Design: The use of Python scripts allows users to trace the reasoning process and identify exactly where a failure occurred (e.g., a detection error vs. a logic error).
  • Emergent Capabilities: The code-based approach enables tasks the system wasn't explicitly designed for, such as query-based video editing.
  • Text as a Bridge: Converting visual information into a text-based narrative allows LLMs to apply superior linguistic reasoning to long-form video content.

Conclusion

ProViQ establishes a new paradigm for zero-shot VideoQA by leveraging the reasoning power of LLMs to orchestrate specialized visual experts. While the system is currently limited by the performance of its underlying visual modules, its modularity allows for easy integration of future improvements in action recognition or spatial reasoning. Future work will focus on enhancing the LLM's ability to handle ambiguous queries and multimodal confusion in complex datasets.

Summary updated

BibTeX
@misc{choudhury2023zero,
  author = {Rohan Choudhury and Koichiro Niinuma and Kris M. Kitani and László A. Jeni},
  title = {{Zero-Shot Video Question Answering with Procedural Programs}},
  year = {2023},
  eprint = {2312.00937},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.00937},
}
Figure