Questions about surgical videos are rarely about a single moment. "Which instrument was used in the step after the capsule was opened?" requires finding one event, finding a later event, and reading an object off the second one. Current video question-answering systems either match the whole question against every frame at once, so the most salient noun drowns out the brief action that actually matters, or they split the question into sub-questions and then pick frames for each sub-question independently. Neither uses the fact that the pieces of the question are related in time. We propose to turn a question's decomposition tree directly into a set of linked soft time windows over the video. Each leaf sub-question gets a smooth window, a Gaussian bump over time with a learned center and width. Each internal node of the tree ("before", "after", "during") becomes a differentiable constraint on where its children's windows can sit. A surgery-specific video-text encoder, pre-trained so that it can tell adjacent procedural steps apart, supplies the evidence each window is fit to.
Surgery is the right test bed for three reasons. General encoders fail on surgical instruments and fine tissue actions. Procedures follow a strong step order, so relational temporal questions are common and meaningful. And a gap between plausible-sounding answers and answers actually grounded in the video matters clinically. If the idea works, a model should answer compositional surgical questions better at a fixed frame budget, and more of its correct answers should rest on the right video segments.
Core Claim
The tree obtained by decomposing a question already contains a temporal plan: which events must be found, and how they must be ordered or nested. Using that plan as a joint, differentiable prior over per-leaf frame windows should improve both accuracy and temporal grounding on relational questions, compared with allocating frames to sub-questions independently. The gain should depend on a domain encoder whose pre-training preserves and exploits step order. The claim predicts where gains should appear. They should be large on multi-event ordering questions, small on single-event recognition questions, and near zero on short clips.
Research Program
The closest prior work is SCOPE, Think in Cloud, Look at Edges. It has a large language model decompose a video question into a graph of atomic, visually checkable sub-queries, each with an importance score. It then splits a fixed frame budget across those sub-queries and selects frames per sub-query with CLIP matching plus a diversity rule. SCOPE motivates our work, because it names the failure we target, "semantic submergence" of subtle actions under a flat query vector. It differs from our proposal in two ways. Its selection is discrete and each sub-query is handled independently, so the relation "after" in its own example never constrains where the frames go. It also uses generic encoders only. Logic-in-Frames extracts temporal and causal relations from the query and spreads sampling probability heuristically around detector hits. Its authors explicitly name surgical logics and a learnable search as future work, which is the gap we take on. ProViQ compiles questions into programs that call vision tools and filter frames with hard, hand-written rules. On the continuous-weighting side, NG+ in Can I Trust Your Answer? and the span anchors in AMDNet supply the method we reuse: Gaussian temporal masks with a learned center and width. Both condition a single window on a single query vector. On the surgical side, LLaVA-Surg uses a hierarchy of knowledge only to generate training data offline, and pools a few frames uniformly at inference. CSMAE learns which surgical video tokens matter, but without any language conditioning.
We will build three components.
The first is an order-aware surgical video-text encoder. We will pre-train it contrastively on short clips paired with time-stamped narration segments from the WebSurg lecture corpus that LLaVA-Surg transcribed. The key design choice is the hard negatives: narration from the adjacent steps of the same procedure. We will add an auxiliary objective that predicts whether two clips are in the correct order. This choice follows a finding from BioBART: shuffling sentence order during pre-training hurt biomedical language models because it destroyed the logical flow of the text. We read that as evidence that in procedural domains, order is part of what the model must learn rather than noise to be made invariant to. The same narration timestamps provide free, weak temporal labels for training the window predictor.
The second component is tree-coupled window fitting. A planner language model produces a tree whose leaves are atomic, visually checkable sub-queries and whose internal nodes carry a relation. For each leaf $i$, the encoder gives a similarity curve $s_i(t)$ over time, and a small head proposes an initial window with center $c_i$ and width $w_i$. The windows are then refined jointly by maximizing
$$ J = \sum_i \sum_t g_i(t)\, s_i(t) \;-\; \lambda \sum_{(a,b)\in R_{\text{before}}} \mathrm{softplus}(c_a - c_b + m), $$
Here $g_i(t)$ is the Gaussian mask of leaf $i$. $R_{\text{before}}$ is the set of leaf pairs that the tree orders in time, with "after" rewritten as reversed "before"; "during" is handled analogously with an overlap term. $m$ is a minimum separation margin, and $\lambda$ sets the strength of the constraint. The final frame weights are a mixture of the leaf masks, scaled by node importance. These weights decide which frames and how many visual tokens the answering model receives under a fixed budget.
The third component is confidence-gated aggregation. We borrow post-order tree execution from ProbTree, answering leaves first and combining upward. Each leaf's peak evidence score is passed upward, so a parent node can discount a leaf whose window found no convincing event. This directly targets the "weakest link" failure identified in Is a Question Decomposition Unit All We Need?.
For evaluation data, we will use Surg-QA, and we will construct a compositional temporal benchmark from the step annotations of D99 and Cataract-101. Templated single-event, two-event ordering, and nested questions ("what tool appears during the step after X") come with ground-truth time windows derived from the annotations. This is a constructed benchmark, and we will release its generation templates so it can be audited.
Baselines
The naive reference is uniform sampling of 16 or 32 frames, fed to the same answering model used everywhere else. The answering model is LLaVA-Surg for surgical tests and a fixed open video model for general tests. Uniform sampling is what LLaVA-Surg does by default. On Surg-QA, LLaVA-Surg reports a GPT Score of 2.45 and an Accuracy@1 of 0.545 (LLaVA-Surg). Any variant must at least hold those numbers on Surg-QA's mostly single-event questions.
The strongest competitor is SCOPE reimplemented with our domain encoder substituted for CLIP. That gives it the same decomposition planner, the same frame budget, and the same answering model, so the only remaining difference is independent discrete per-sub-query selection versus jointly constrained soft windows. SCOPE reports gains of 3.4% over uniform sampling and 1.8% over AKS on Video-MME with a 72B model. The file gives no absolute SCOPE accuracy and no surgical result for it. Our method beats it if it improves accuracy on the two-event and nested splits of the constructed benchmark, and improves temporal overlap with ground-truth windows, by more than the seed-to-seed spread, while not losing on single-event questions.
The second strong competitor is single-query Gaussian weighting in the style of NG+, again on the domain encoder. On NExT-GQA, NG+ reports QA accuracy of 70.8% and grounded accuracy (Acc@GQA) of 17.5% with FrozenBiLM, up from 69.1% and 15.8% (Can I Trust Your Answer?). This competitor isolates whether decomposition adds anything once windows are soft.
We will also run two ablations. The first removes the relation penalty ($\lambda=0$), which yields independent soft windows and isolates the tree-as-temporal-structure ingredient. The second replaces the order-aware encoder with a generic CLIP encoder, and with a domain encoder trained without adjacent-step negatives, to isolate the pre-training ingredient.
All methods get the same frame budgets, the same planner outputs where applicable, and equal hyperparameter search budgets tuned on a held-out split of procedures. Latency is reported alongside accuracy.
Why not just…?
Why not just swap a surgical encoder into SCOPE? This is the real threat, which is why it is our main baseline. If independent discrete allocation with a good encoder already finds both events, the coupling term adds nothing. We expect coupling to matter when a sub-query is visually ambiguous, because the same instrument appears in several steps and only the order constraint picks the right occurrence. The $\lambda=0$ ablation and the per-split comparison against SCOPE-with-domain-encoder settle this. If the gap on ordering questions is within noise, we would drop the joint fitting and report the encoder as the contribution.
Why not just feed many frames to a strong domain-tuned model? Longer context does not remove temporal noise. Gemini 1.5 Pro loses 14.3% going from short to long videos on Video-MME. Blind, video-free models reach about 80% of standard model performance on NExT-GQA, which shows that accuracy alone hides missing grounding. We will run LLaVA-Surg with the maximum number of frames its context allows as an additional reference point. We will judge it on grounding overlap, not only accuracy.
Why not just use linear chain-of-thought prompting instead of a tree? A linear chain gives no explicit leaves to attach windows to, and no relations to turn into constraints. ProbTree also shows tree execution beating linear chains by 7.3 F1 on MuSiQue. We will include a chain-of-thought answerer over uniform frames to check that this advantage carries over to video.
Proposed Experiments
The decisive test is a breakdown on the constructed cataract benchmark by question structure: single-event, two-event ordering, and nested. The prediction is that our method's margin over SCOPE-with-domain-encoder grows with structural depth. Temporal overlap with ground-truth windows should rise together with accuracy. A widening gap between accuracy and grounding would indicate the model is taking language shortcuts. A second test measures grounding directly on NExT-GQA with a generic encoder, to check whether tree coupling raises Acc@GQA beyond NG+'s 17.5% outside surgery. A third runs on Video-MME and LongVideoBench with generic encoders, to check that the method is not surgery-specific. Absolute SCOPE and Logic-in-Frames numbers on these benchmarks were not found on Lacuna, so we will rerun both. A fourth tests transfer: an encoder pre-trained with cataract-heavy data, evaluated on Surg-QA laparoscopic procedures, to measure the sub-domain gap that CSMAE leaves open. A final check uses clips under 15 seconds. There, following Q-Frame, we expect no benefit, and we will report the overhead honestly.
References
- Think in Cloud, Look at Edges: Semantic-Driven Query Decomposition for Efficient Video Reasoning
- Logic-in-Frames: Dynamic Keyframe Search via Visual Semantic-Logical Verification for Long Video Understanding
- Video Question Answering with Procedural Programs
- Can I Trust Your Answer? Visually Grounded Video Question Answering
- Towards Efficient Partially Relevant Video Retrieval with Active Moment Discovering
- LLaVA-Surg: Towards Multimodal Surgical Assistant via Structured Lecture Learning
- CSMAE~:~Cataract Surgical Masked Autoencoder (MAE) based Pre-training
- BioBART: Pretraining and Evaluation of A Biomedical Generative Language Model
- Probabilistic Tree-of-thought Reasoning for Answering Knowledge-intensive Complex Questions
- Is a Question Decomposition Unit All We Need?
- Video-MME: The First-Ever Comprehensive Evaluation Benchmark of Multi-modal LLMs in Video Analysis
- Q-Frame: Query-aware Frame Selection and Multi-Resolution Adaptation for Video-LLMs