ViKey: Enhancing Temporal Understanding in Videos via Visual Prompting

Yeonkyung Lee, Dayun Ju, Youngmin Kim, Seil Kang, Seong Jae Hwang

TL;DR

Frame selection makes Video Large Language Models (VideoLLMs) computationally efficient but often destroys their ability to understand the sequential order of events. VIKEY is a training-free, plug-and-play framework that fixes this by stamping frame numbers directly onto video pixels and explicitly mapping query keywords to these frame indices. This simple approach allows models to maintain high temporal reasoning accuracy even when stripping away up to 80% of the video frames.

What Problem Does This Paper Address?

Processing every single frame of a long video through a VideoLLM is incredibly expensive in terms of memory and compute. To scale these models, practitioners rely on "frame selection"—sampling a sparse subset of frames and discarding the rest.

However, this shortcut comes at a cost: it breaks the continuous temporal flow of the video. While humans can easily infer what happened between two disjoint images, VideoLLMs frequently lose track of time and causal relationships when intermediate frames are missing. For example, a model might correctly see a referee and a player but completely misinterpret who stepped over a line first.

The authors tackle a fundamental question: How can we restore temporal continuity and reasoning in sparsely sampled videos without undergoing expensive model retraining?

Illustrations of How Frame Selection Disrupts and Visual Prompting Restores Temporal Reasoning

Methods

The authors introduce VIKEY, a training-free framework that enhances temporal understanding using two core components:

  1. Sequential Visual Prompting (VP): The framework stamps sequential frame numbers (e.g., "frame #01", "frame #02") directly into the pixel space of each sampled video frame. Through empirical testing, the authors found that placing these prompts in the bottom-left corner yields the best results.
  2. Keyword-Frame Mapping (KFM): To help the model connect the textual question with the modified visual frames, VIKEY uses an off-the-shelf LLM to extract key visual concepts (keywords) from the user's query. It then uses a vision-language model (like CLIP) to calculate the similarity between these keywords and the sampled frames. If the similarity score exceeds a predefined threshold ($\tau$), the query is automatically rewritten to include the frame index (e.g., rewriting a query to say "the iron scrubber (frame 2)").
Overall pipeline of VIKEY

Datasets

VIKEY was evaluated across the temporal reasoning subsets of four prominent video understanding benchmarks:

  • TempCompass: Specifically the Event Order (EO) and Attribute Change (AC) categories.
  • MVBench: Specifically the Action Sequence (AS) and Scene Transition (ST) categories.
  • VideoMME: The Temporal Reasoning (TR) subset.
  • LongVideoBench: The Event Before/After Event (E3E), Object Before/After Object (O3O), and Sequence of Scenes (SSS) categories.

Key Insights and Ideas

  • Visual Prompts Bypass Internal Embedding Failures: The authors conducted a "positional embedding degradation" experiment where they intentionally scrambled or collapsed the model's internal rotary position embeddings (RoPE). Remarkably, adding visual prompts on the pixels restored the model's temporal awareness. This proves that pixel-level numbers act as an explicit, robust temporal anchor that can override or substitute for internal architectural constraints.
  • The "Subtitle Bias": VideoLLMs exhibit a strong spatial bias toward the bottom of the frame. Stamping frame numbers in the bottom-left or bottom-right corners resulted in near-perfect accuracy on frame-lookup tasks. Placing them at the top caused performance to drop and introduced "off-by-one" errors. The authors hypothesize this is because models are heavily pre-trained on web videos containing subtitles, watermarks, and timestamps at the bottom of the screen.
  • Layer-Wise Attention Shifts: Attention analysis showed that visual prompting doesn't just act as a passive text label; it actively shifts the model's internal attention mechanisms to focus more heavily on image tokens, particularly in the mid-to-late layers associated with spatiotemporal integration.

Key Results

  • Sparse Frames, Dense Performance: Across all benchmarks, VIKEY consistently boosted the performance of baseline models (like LLaVA-Video and Qwen2.5-VL). Most notably, on the VideoMME dataset, VIKEY using only 20% of the frames achieved higher accuracy than the dense 64-frame baseline without visual prompting.
  • Outperforming Token Pruning: The authors compared VIKEY against FrameFusion, a state-of-the-art token reduction method. As shown in Figure 6, VIKEY consistently maintained higher accuracy across all frame sampling ratios (from 20% to 90%), demonstrating that preserving frame-level structure with visual cues is superior to pruning visual tokens for temporal tasks.
Performance Comparison under Varying Frame Sampling Ratios

Limitations and Future Work

  • Ambiguity in Near-Identical Frames: When a video contains consecutive frames that look nearly identical, CLIP-based similarity matching can falter. This causes the KFM module to map a keyword to the wrong frame index, anchoring the model's reasoning to the wrong moment in time.
  • Content Occlusion: Because the frame numbers are stamped in a fixed corner, they can occasionally block crucial visual details or pre-existing text (like hardcoded subtitles) native to the video.
  • Future Directions: The authors suggest exploring sequence-aware or multi-frame similarity matching to resolve near-identical frame ambiguity. They also propose developing adaptive prompt placement strategies that use visual saliency maps to place numbers in unobtrusive areas of the frame.

Summary updated

Abstract

Recent advancements in Video Large Language Models (VideoLLMs) have enabled strong performance across diverse multimodal video tasks. To reduce the high computational cost of processing dense video frames, efficiency-oriented methods such as frame selection have been widely adopted. While effective at minimizing redundancy, these methods often cause notable performance drops on tasks requiring temporal reasoning. Unlike humans, who can infer event progression from sparse visual cues, VideoLLMs frequently misinterpret temporal relations when intermediate frames are omitted. To address this limitation, we explore visual prompting (VP) as a lightweight yet effective way to enhance temporal understanding in VideoLLMs. Our analysis reveals that simply annotating each frame with explicit ordinal information helps the model perceive temporal continuity. This visual cue also supports frame-level referencing and mitigates positional ambiguity within a sparsely sampled sequence. Building on these insights, we introduce ViKey, a training-free framework that combines VP with a lightweight Keyword-Frame Mapping (KFM) module. KFM leverages frame indices as dictionary-like keys to link textual cues to the most relevant frames, providing explicit temporal anchors during inference. Despite its simplicity, our approach substantially improves temporal reasoning and, on some datasets, preserves dense-frame baseline performance with as few as 20% of frames.
BibTeX
@inproceedings{lee2026vikey,
  author = {Yeonkyung Lee and Dayun Ju and Youngmin Kim and Seil Kang and Seong Jae Hwang},
  title = {{ViKey: Enhancing Temporal Understanding in Videos via Visual Prompting}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=3SenJvMF5E},
}
Figure