Video question-answering models can only look at a few dozen frames from an hour-long video, so something has to choose which frames they see. Today's selectors score each frame on its own by how well it matches the question, then add a rule that spreads the picks out in time. That works for "what color was the car?" It breaks on questions like "what did the cook do after adding the eggs the second time?" In that case the right frames depend on where the other events fall on the timeline, and an action that recurs looks identical at every recurrence. We propose to treat frame selection for such questions the way genomics treats read mapping. The question is decomposed into an ordered list of events. That list is aligned to the video timeline with a monotone dynamic program, the same recursion that underlies edit distance. The frame budget is then spent on the segments the alignment picks and on the gaps between them.
The second ingredient also comes from sequence alignment, and it addresses where the cost actually lies. Aligning five events to 100,000 frames is cheap. Computing the frame-by-event similarity matrix is not, because every frame must pass through an image encoder. Genomic aligners avoid this cost with a filter-then-verify structure: a cheap pass discards most of the reference, and expensive computation runs only in a narrow band around plausible matches. We adapt that structure to video. A sparse first pass embeds frames at a low rate and finds candidate alignment paths. Dense embedding then runs only inside bands around the best few paths. The claim is that order-constrained alignment picks the correct occurrence of recurring events where per-frame selectors cannot, and that banded refinement keeps the encoder cost to a small fraction of the video.
Core Claim
When a question describes two or more ordered events, selecting frames by monotone alignment of the event list to the timeline will beat diversity-aware per-frame selectors. This holds specifically on questions whose events recur or look alike across the video. On single-event questions the method should match those selectors, because it falls back to one of them. A coarse-to-fine banded version should recover the dense alignment path while embedding only a few percent of frames.
Where this sits relative to prior work
The diversity-aware selectors motivate the proposal and supply its components. BOLT samples frames along the inverse cumulative distribution of query–frame similarity, which keeps some coverage everywhere. AKS recursively decides whether a segment has a sharp relevance peak to zoom into or should be split for coverage. Nar-KFC picks a non-redundant subgraph of frames with a greedy quadratic program and fills the gaps with captions. TimeSearch-R applies a repulsive determinantal point process within segments that an RL-trained agent chooses. FOCUS treats clips as bandit arms and scores only 1.6% of frames. All of these score frames against one undifferentiated query, so none of them can use the fact that event B must come after event A. We reuse their within-segment diversity rules, specifically inverse-transform sampling or a determinantal point process, as the step that spends the budget once alignment has fixed the segments.
LongVideoBench supplies the empirical motivation. It reports that ordering three or more scenes ("Sequence of Scenes") is the hardest task for every model it evaluated. KFS-Bench constrains the evaluation design. It shows that downstream QA accuracy conflates selection quality with model reasoning failures, and it provides scene-level ground truth that we can score against directly.
The genomics papers supply the scaling method. Shifted Hamming distance cheaply rejects most candidate placements before exact verification. Embed-Search-Align retrieves candidate chunks by vector search and runs Smith-Waterman only on them. Banded and wavefront dynamic programming, as in Accelign, restrict computation to a strip around the likely path. We do not port bit-level SIMD tricks, which depend on a four-letter alphabet. We borrow the architecture: filter coarsely, verify within a band, and keep several candidate placements because repeats make the top hit unreliable. ESA's known weakness, that top-K retrieval clumps on repetitive references, is the genomic version of the occurrence ambiguity we target.
Ordered alignment of videos to step lists has a history in procedural-video work outside the indexed literature. We do not claim the recursion itself as new. The new pieces are three: using it as a budgeted keyframe selector for general long-video QA, gating it so it activates only on multi-event questions, and making it affordable with genomics-style banded refinement.
Research Program
Event extraction. A small language model rewrites each question, together with its answer options, into an ordered list of event phrases $e_1,\dots,e_M$. Ordinal phrasing such as "the second time" is kept as repeated entries. If the model extracts fewer than two events, the system falls back to AKS. This keeps the method from losing ground on single-event questions.
Alignment. Let $\sigma(i,t)$ be the similarity between event phrase $e_i$ and frame $f_t$, computed by a CLIP-style encoder. Let $H(i,t)$ be the best score for placing events $1..i$ in frames $1..t$. Then
$$H(i,t)=\max\{\,H(i,t-1),\;\; H(i-1,t-\delta)+\sigma(i,t),\;\; H(i-1,t)-\rho\,\}.$$
Here $\delta$ is a minimum temporal separation between consecutive events. It stops two events from collapsing onto one moment, which is the order-aware analogue of non-maximum suppression. The penalty $\rho$ allows an event to be dropped, which matters when a wrong answer option names an event that never occurs. Frames between matched events cost nothing, as in semi-global alignment. Traceback returns one anchor frame per event.
We keep the top-$r$ alternative paths rather than only the best one, since recurring events produce near-tied paths. For the same reason, the model is fed the union of frames from these top-$r$ paths, so it can resolve which occurrence the question means rather than relying on the selector to break near-ties.
Budget allocation. Given $K$ frames, most of the budget goes to windows around the anchors, with diversity enforced inside each window by inverse-transform sampling. A fixed fraction goes to the gaps between anchors, so the model sees what happened in between.
Banded refinement. The first pass embeds frames at roughly 0.2 frames per second. The alignment runs on this coarse sequence, and dense embedding is then applied only within $\pm w$ seconds of the anchors of the top-$r$ coarse paths. We will measure how often the banded path matches the fully dense path as $w$ and $r$ vary. That gives a cost–fidelity curve directly comparable to FOCUS's 1.6% frame-scoring figure. We expect failures when a key event is shorter than the coarse stride, and we will measure how often this happens rather than assume it away.
An evaluation choice we rejected. One might score order preservation with an edit distance between the scene sequence of the selected frames and the ground-truth scene order. Selected frames are always presented in time order, so this metric reduces to scene recall and says nothing new. The meaningful quantity is whether the selector chose the right occurrence. We therefore build ground truth for that directly.
Baselines
The naive reference is uniform sampling at the same frame budget $K$. Pure top-$K$ relevance selection is included to show clumping.
The strongest existing selector on LongVideoBench is AKS, run with its released judge-and-split procedure. The comparison is fair because it uses the same encoder, the same answering model, the same $K$, and the same tuning budget for its hyperparameters as ours. On this benchmark, AKS with LLaVA-Video-7B reports 62.7% accuracy (AKS). BOLT is the strongest training-free competitor on Video-MME and MLVU. It reports 56.1% on Video-MME with LLaVA-OneVision at 8 frames (versus 53.8% uniform) and 63.4% on MLVU (versus 58.9%) (BOLT). ASCS is the reference on KFS-Bench. That paper reports gains over uniform of up to 2.6% on LongVideoBench and 1.3% on Video-MME, but no reported absolute UKSS value for ASCS was found on Lacuna. We will rerun it to obtain one. For cost comparisons we use FOCUS, which reports an 11.9% gain over uniform on videos longer than 20 minutes while scoring 1.6% of frames (FOCUS).
The decisive ablation is per-event retrieve-and-sort. It uses the same extracted events, runs BOLT-style selection separately for each event, and merges the frames in time order. Order is then imposed only after selection, so this isolates whether the monotone constraint does any work. A second ablation runs the full method with dense rather than banded embedding, to isolate the cost of the filter.
Beating these baselines means two things. On multi-event questions, the method must beat both AKS and per-event retrieve-and-sort in downstream accuracy and in KFS-Bench scene recall, with paired-bootstrap confidence intervals that exclude zero. On single-event questions, it must not fall below AKS.
Why not just…?
Why not just feed more uniform frames to a long-context model? Uniform sampling is blind to content. LongVideoBench reports that many open models lose accuracy as uniform frame counts grow, and Video-MME reports a 14.3% drop for Gemini 1.5 Pro from short to long videos (Video-MME). We will still sweep $K$ for uniform sampling. If uniform at $2K$ matches our method at $K$ on the multi-event subset, the method is not worth its complexity.
Why not just split the question into events and run an existing selector per event? This is the real threat. When events are visually distinct, it should capture most of the benefit, and we expect parity there. It fails when an event recurs, because each per-event search independently picks the most similar occurrence and nothing ties that choice to its neighbours. The recurring-event stress test and the ablation above settle the question. If retrieve-and-sort matches the full method even on recurrences, the claim is false.
Why not let an agent search the timeline itself, as TimeSearch-R does? Agentic search can reason about order. It costs multiple model calls, about 2.3 turns per question on Video-Holmes, and its authors report hallucinated timestamps and looping (TimeSearch-R). We will compare at matched wall-clock time on Haystack-LVBench, where TimeSearch-R reports a temporal F1 of 8.4. Our method needs to be competitive at a fraction of the inference cost to justify itself, not necessarily better.
Why not just apply temporal non-maximum suppression to top-K? Suppression spreads frames out but is indifferent to which side of an event they fall on. Our separation parameter $\delta$ is its order-aware counterpart. Running top-K with suppression at the same separation tests whether order, rather than spacing, is the active ingredient.
Proposed Experiments
The primary test uses the Sequence of Scenes and other L2 relation questions in LongVideoBench and the long split of Video-MME. Accuracy is reported with LLaVA-Video-7B and Qwen2-VL at $K\in\{8,16,32\}$. The confounding that KFS-Bench documents is avoided by also reporting its Balanced Scene Recall and UKSS on its LongVideoBench and Video-MME subsets.
The recurring-event stress test follows BOLT's practice of stitching clips into synthetic long videos. Here one action clip is inserted two or three times with different preceding and following context, and questions refer to a specific occurrence by order. Because we build the videos, the correct occurrence is known exactly. We report the rate at which each selector picks frames from the correct occurrence, separately from QA accuracy.
The scaling experiment plots fraction of frames embedded against banded-versus-dense path agreement and against accuracy, for videos of 10, 30, and 60 minutes.
The method is supported if three things hold together: a clear gain over retrieve-and-sort on recurrences, no loss against AKS on single-event questions, and dense-path agreement above 90% while embedding under 5% of frames. If the gain disappears once retrieve-and-sort is given the same events, the result shows that event decomposition, not alignment, was doing the work, and we will report it that way.
References
- BOLT: Boost Large Vision-Language Model Without Training for Long-form Video Understanding
- Adaptive Keyframe Sampling for Long Video Understanding
- Threading Keyframe with Narratives: MLLMs as Strong Long Video Comprehenders
- TimeSearch-R: Adaptive Temporal Search for Long-Form Video Understanding via Self-Verification Reinforcement Learning
- FOCUS: Efficient Keyframe Selection for Long Video Understanding
- LongVideoBench: A Benchmark for Long-context Interleaved Video-Language Understanding
- KFS-Bench: Comprehensive Evaluation of Key Frame Sampling in Long Video Understanding
- Shifted Hamming distance: a fast and accurate SIMD-friendly filter to accelerate alignment verification in read mapping
- Embed-Search-Align: DNA sequence alignment using Transformer models
- Accelign: a GPU-based Library for Accelerating Pairwise Sequence Alignment
- Video-MME: The First-Ever Comprehensive Evaluation Benchmark of Multi-modal LLMs in Video Analysis