Abstract
Processing long-form video content remains a significant challenge for Multimodal Large Language Models (MLLMs) due to the quadratic scaling of self-attention mechanisms. We present Test-Time Temporal Sampling (T3S), a training-free, "plug-and-play" inference wrapper that enhances both the efficiency and accuracy of long-video understanding. T3S decomposes a single long video into multiple short, diverse subsequences, processing them in a single packed forward pass. This approach reduces computational costs by over 50% while yielding accuracy improvements of up to 3.1% on challenging benchmarks.
Introduction
The "final boss" of scalability for MLLMs is long-video understanding. The core bottleneck is the self-attention mechanism, which scales quadratically ($O(L^2)$) with the number of tokens. Dense sampling to capture fine-grained details leads to token explosions, causing high latency or memory exhaustion.
Existing approaches typically fall into three categories, each with significant drawbacks:
- Rule-based sampling: Fast but risks missing critical "needle-in-a-haystack" moments.
- Learned selectors: Effective but require expensive human-annotated data and increase architectural complexity.
- Memory-based summarization: Efficient but necessitates retraining the model.
T3S offers a "Goldilocks" solution: a zero-shot method that works with any off-the-shelf model to improve performance while simultaneously saving time.
Methodology: The T3S Framework
T3S treats efficient video understanding as an ensemble approximation problem, operating through three distinct stages:
- Multi-Trial Frame Sampling (Temporal): Instead of processing one continuous long sequence, T3S conducts $m$ independent trials. Each trial randomly samples a small set of frames, ensuring broad statistical coverage of the video timeline without the overhead of a single massive sequence.
- Token Subsampling (Spatial): To further reduce spatial redundancy, T3S randomly drops a fraction of visual tokens (patches) within the sampled frames.
- Multi-Subsequence Inference & Aggregation: These $m$ short subsequences are "packed" into a single batch for a single forward pass. Due to the quadratic nature of attention, processing several short sequences (\sum \alpha_i^2 L^2) is significantly cheaper than one long sequence ($L^2$). Finally, the model aggregates predictions (logits) from these diverse "views" to generate a final answer.
Experimental Evaluation
The researchers evaluated T3S across three premier long-video benchmarks: VideoMME (900 videos up to 1 hour), LongVideoBench (3,700+ videos focused on referring reasoning), and MLVU (multi-task benchmark). Testing spanned several state-of-the-art open-source models, including Qwen2.5-VL-7B, LLaVA-Video-7B, and Oryx-1.5-7B.
Key Results and Insights
- Efficiency Gains: T3S achieved a 2.04× wall-clock speedup on Qwen2.5-VL-7B, effectively halving the time to first token.
- Accuracy Improvements: On LongVideoBench, T3S improved overall accuracy by 3.1%. Notably, on the MLVU benchmark, it achieved an +8.8% jump in "Action Order" tasks.
- Temporal Breadth vs. Spatial Depth: The results suggest it is more effective to use many "lightweight probes" across the timeline than a single "deep look" at a limited segment. Random sampling acts as an unbiased selector, statistically capturing pivotal events that uniform sampling might overlook.
Discussion and Limitations
While T3S provides a "free lunch" in many scenarios, it faces certain hardware and architectural constraints. On a single GPU, real-world speedups are sometimes limited by hardware saturation when computing many tokens in parallel. Additionally, as the model generates text, the memory footprint of $m$ trials grows. Future optimizations could involve deduplicating identical text tokens across trials or engineering more efficient attention masks for shared prefixes like system prompts and questions.
In conclusion, T3S demonstrates that significant gains in long-video tasks can be achieved through intelligent sampling strategies at inference time, bypassing the need for larger models or additional training data.
Summary updated