Understanding Complexity in VideoQA via Visual Program Generation

Cristobal Eyzaguirre, Igor Vasiljevic, Achal Dave, Jiajun Wu, Rares Andrei Ambrus, Thomas Kollar, Juan Carlos Niebles, Pavel Tokmakov

Introduction

Video Question Answering (VideoQA) represents a significant challenge in computer vision, requiring models to synthesize temporal dynamics with spatial reasoning. Traditionally, the difficulty of VideoQA benchmarks has been determined by human annotators. However, this paper reveals a fundamental misalignment: human intuition regarding question difficulty is often a poor predictor of actual model performance. To address this, we introduce CodePlexity, a novel metric that quantifies complexity by translating natural language questions into executable visual programs.

The Human-AI Intuition Gap

A central finding of this research is that humans and AI models have vastly different "blind spots." A question that appears trivial to a human—such as "What does the dog do after letting go of the bone?"—may require multi-step temporal logic that current state-of-the-art models cannot reliably execute. Conversely, questions humans perceive as difficult, like identifying a specific location in a crowded scene, might be easily solved by models using simple visual cues.

Comparison of human vs. machine complexity estimates. The left example (dog) is human-easy but machine-hard due to temporal logic; the right example (cheerleaders) is human-hard but machine-easy.

The CodePlexity Framework

To move beyond subjective human estimates, the authors propose a bottom-up approach based on Visual Program Generation. The process involves several key steps:

  1. Program Synthesis: Using a Large Language Model (LLM), questions are translated into Python code (visual programs) that represent the logical steps needed to find an answer.
  2. Structural Analysis: These programs are parsed into Abstract Syntax Trees (ASTs). By analyzing the subtrees, the researchers can identify specific logical structures—such as nested loops or complex conditionals—that correlate with model failure.
  3. Complexity Scoring: A logistic regression model is trained on these structural features to produce the CodePlexity score. Unlike text-based metrics (e.g., sentence length), CodePlexity captures the underlying reasoning requirements of the task.

Key Insights: Why Models Fail

The analysis reveals that universal architectural weaknesses exist across diverse VideoQA models. Models consistently struggle with tasks requiring:

  • Fine-grained temporal reasoning: Specifically, logic that requires tracking state changes over time (e.g., For loops checking conditions after a specific event).
  • Precise spatial relationships: Understanding the relative positioning of multiple moving objects.

CodePlex-QA: A New Benchmark

Using the CodePlexity metric, the authors automatically generated CodePlex-QA, a benchmark designed to be significantly more challenging than existing datasets like NExT-QA. By filtering for questions with high CodePlexity scores, they created a dataset that is empirically 1.9 times harder for current models.

Testing on CodePlex-QA showed dramatic performance drops for top-tier models. For instance, InternVideo's accuracy fell from 50.9% on NExT-QA to just 29.9% on CodePlex-QA, highlighting the effectiveness of the metric in identifying true reasoning bottlenecks.

Conclusion

CodePlexity demonstrates that code is a superior proxy for reasoning complexity compared to natural language. By making implicit reasoning steps explicit through visual programs, researchers can better understand model limitations and build more robust benchmarks. Future work will look to combine question complexity with video-level metrics to create a holistic measure of VideoQA difficulty.

Summary updated

BibTeX
@inproceedings{eyzaguirre2025understanding,
  author = {Cristobal Eyzaguirre and Igor Vasiljevic and Achal Dave and Jiajun Wu and Rares Andrei Ambrus and Thomas Kollar and Juan Carlos Niebles and Pavel Tokmakov},
  title = {{Understanding Complexity in VideoQA via Visual Program Generation}},
  booktitle = {International Conference on Machine Learning},
  year = {2025},
  url = {https://openreview.net/forum?id=6GFPnVHEKB},
}
Figure