Enhancing Video-LLM Reasoning via Agent-of-Thoughts Distillation

Yudi Shi, Shangzhe Di, Qirui Chen, Weidi Xie

TL;DR

The paper introduces Agent-of-Thoughts Distillation (AoTD), a method that embeds the multi-step reasoning of complex, multi-model agent systems directly into a single end-to-end Video Large Language Model (Video-LLM). By using an agent framework to generate verified, natural-language reasoning chains and distilling them into the model via instruction tuning, AoTD achieves state-of-the-art performance on Video Question Answering (VideoQA) while remaining computationally efficient and highly explainable.

What Problem Does This Paper Address?

VideoQA is uniquely challenging because it requires a deep understanding of spatial-temporal dynamics—answering questions like "Which object did the person close before they held the phone?" requires tracking actions and objects across time.

Currently, research splits into two paradigms, both with major drawbacks:

  1. End-to-end Video-LLMs: These models are fast and perform well on standard benchmarks, but they act as "black boxes." They lack explainability and frequently struggle with precise spatial-temporal grounding.
  2. Agent-based Systems: These systems use an LLM controller to decompose complex questions into sub-tasks, solving them sequentially using specialized vision tools (e.g., object detectors, trackers). While highly interpretable, they are incredibly slow, memory-intensive, and bottlenecked by the imperfect performance of individual tools.

The authors tackle this trade-off, seeking a way to build a video-language model that possesses the multi-step reasoning and grounding capabilities of an agent system, but retains the inference speed and simplicity of an end-to-end model.

Methods

The authors propose a four-step pipeline to generate high-quality Chain-of-Thought (CoT) data from an agent system and distill it into a single Video-LLM:

Overview of the Agent-of-Thoughts Distillation (AoTD) framework
  1. Model Selection: The authors systematically benchmark off-the-shelf models for atomic video tasks (e.g., DeepSeek-Coder-Instruct for question decomposition, OWL-ViT v2 for object detection, and UniVTG for temporal grounding) to build a reliable agent core.
  2. Program Generation & Execution: For a given video and question, a code-generation LLM decomposes the query into an executable Python program. The specialized vision tools execute this program step-by-step, generating an execution trace containing bounding boxes, timestamps, and labels.
  3. CoT Conversion & Filtering: Because raw execution traces are messy, an LLM translates them into clean, natural-language reasoning chains. Crucially, a two-step verification mechanism filters out bad data: it ensures the program reached the correct final answer and prompts an LLM to verify that the reasoning steps are logically sound.
  4. Step-by-step Distillation: The verified CoTs are distilled into a base Video-LLM (LLaVA-NeXT-Video 7B) using a joint loss function that optimizes for both predicting the final answer and generating the intermediate rationale.

Datasets

The agent-based system was applied to several highly compositional VideoQA datasets to generate training rationales:

  • STAR (Situated Reasoning)
  • NExT-QA (Temporal & Causal)
  • AGQA & ANetQA (Compositional spatio-temporal)
  • CLEVRER & EgoQA (Used for general training mix)

Out of 158.6K raw video-QA pairs, the filtering mechanism retained 32.3K high-quality, verified CoTs for distillation.

The final model was evaluated across a broad suite of benchmarks, including MVBench, VideoMME, Perception-Test, VSIBench, ActivityNet-QA, and Video-ChatGPT.

Key Insights and Ideas

  • The Best of Both Worlds: Distillation allows a single model to internalize the specialized capabilities of an entire suite of vision tools (detectors, grounders) without needing to run those tools at inference time.
  • Filtering is Paramount: The authors found that training on unverified execution traces hurts performance. Specialized vision tools often hallucinate or fail; using an LLM to rigorously filter out logically inconsistent reasoning chains ensures the Video-LLM only learns high-quality problem-solving paths.
  • Emergent Grounding Capabilities: Even though the distilled model only outputs text, learning from tool-generated CoTs allows it to accurately output precise bounding box coordinates and frame ranges during its "thinking process," mimicking specialized vision models.

Key Results

The distilled model, LLaVA-NeXT-Video-AoTD, consistently outperformed both the base model and standard instruction-tuned variants:

  • Benchmark Improvements: On the compositional STAR dataset, accuracy jumped from 52.4% (base model) to 74.3% (AoTD). On MVBench, it improved from 46.5% to 55.6%.
  • Efficiency Gains: Compared to running the full agent-based system, the distilled AoTD model reduced inference latency by ~78% (from 47.93 seconds down to 10.58 seconds per query) and slashed memory consumption from 65.34 GB to just 18.21 GB.
Visualizing the step-by-step rationales generated by the model

Limitations and Future Work

  • Tool Dependency: The quality of the distilled CoTs is fundamentally bottlenecked by the capabilities of the off-the-shelf specialist models used in the data-generation phase.
  • Data Imbalance: The current training distribution is heavily skewed toward compositional QA tasks; a more balanced dataset mix could yield more holistic video understanding.
  • Task Expansion: The authors suggest that this agent-to-LLM distillation framework could be expanded beyond VideoQA to tasks like video captioning and referring video object segmentation.

Summary updated

BibTeX
@inproceedings{shi2025enhancing,
  author = {Yudi Shi and Shangzhe Di and Qirui Chen and Weidi Xie},
  title = {{Enhancing Video-LLM Reasoning via Agent-of-Thoughts Distillation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00797},
}
Figure