alphaFeedback

WorksComputer Science

SAPO: Self-Supervised Attention Policy Optimization for Improving Temporal Video Grounding in Vision-Language Models

AI contributions
Not recorded for this paper
View details

Abstract

Video vision-language models (VLMs) have strong semantic understanding, yet remain unreliable at precise temporal grounding. Existing gains from explicitly aligning video frames with absolute time suggest that VLMs may already encode accurate temporal locations internally but lose precision when expressing them as timestamps. Our analysis across four VLMs and two grounding datasets confirms this hypothesis: attention intervals outperform predicted intervals on approximately 66% of valid examples. We term this discrepancy the temporal generation gap. Because precise temporal annotations are expensive, this finding motivates closing the gap to improve temporal grounding using only unlabeled video-query pairs. We propose Self-Supervised Attention Policy Optimization (SAPO), which uses internal temporal attention as self-supervision for Group Relative Policy Optimization and applies a ground-truth-free criterion to select high-value samples. SAPO consistently improves temporal grounding across multiple datasets and models spanning weak to strong initial grounding ability. Relative mIoU gains reach 33.7% on Qwen2.5-VL-3B and 5.4% on the strong Time-R1-7B. The improvements transfer across datasets while preserving general video understanding.

Introduction

Vision–language models (VLMs) have become a general interface for video understanding Bai et al. [1]. Beyond recognizing what happens, a capable video VLM must also determine precisely when an event occurs. Temporal video grounding (TVG) directly evaluates this ability by requiring a model to localize the start and end times of an event described by a natural-language query. Despite their strong general video understanding, current VLMs remain substantially less reliable when generating precise timestamps.

Recent studies attribute much of this weakness to insufficient alignment between visual features and absolute time. Existing methods therefore inject frame-level temporal information through interleaved textual timestamps, timestamp overlays, or time-aligned position embeddings [23, 8, 1] (Wu et al. 2025). Their improvements establish that VLMs predict time more accurately when the correspondence between visual evidence and temporal coordinates is made explicit.

Given the substantial gains from explicitly mapping visual inputs to temporal coordinates, we ask whether a VLM already contains internal evidence for temporal localization but loses precision when generating timestamps. To investigate this question, we compare the model’s explicitly generated predicted interval with an attention interval decoded from its temporal attention over video tokens. We evaluate both intervals by their IoU with the ground-truth interval and count the proportion of examples for which the attention interval is more accurate. Across four VLMs, attention achieves a higher IoU than prediction on an average of 66.0% of examples on Charades-STA and 65.8% on ActivityNet-Captions. We term this systematic discrepancy the temporal generation gap: the model’s attention can localize the queried event more accurately than its explicit timestamp prediction, as illustrated in Figure 1.

Attention knows better than prediction

Figure 1. Attention knows better than prediction. The attention-decoded interval IaI_a can localize the queried event more accurately than the generated interval IpI_p. SAPO uses attention as supervisor to improve native timestamp prediction without temporal-boundary annotations during training.

Although attention does not provide perfectly accurate boundaries, its relative advantage reveals a useful source of internal temporal supervision. Since annotating precise start and end timestamps for video–query pairs is highly costly, this finding motivates us to exploit unlabeled video–query data and improve temporal grounding directly through attention-based self-supervision.

Based on this insight, we propose Self-Supervised Attention Policy Optimization (SAPO), which uses internal attention to construct RL rewards for timestamp generation. Each selected video–query pair is processed by a trainable policy and a frozen reference model initialized from the same VLM. The policy samples a group of timestamp intervals, while the reference extracts a stationary temporal-attention distribution. To avoid the sparse supervision of directly using interval IoU as the reward, SAPO projects each rollout interval onto the video timeline with a Gaussian kernel and measures its Wasserstein-1 distance to the reference attention distribution, yielding a dense temporal reward. Group-relative advantage estimation then updates the policy, with the reference model also providing KL regularization. SAPO thus transfers internal temporal evidence into native timestamp prediction without ground-truth boundaries for training.

Not all video–query pairs, however, contain equally useful attention supervision. We therefore explore how to identify a higher proportion of valuable training examples without ground truth. Among the examined criteria, top-kk selection by Jensen–Shannon divergence between the prediction and attention distributions provides a lightweight solution and retrieves more high-value examples for RL than random sampling.

We evaluate SAPO on three benchmarks using both Qwen2.5-VL models and Time-R1-7B, a strong temporal grounding model, without temporal annotations during training. SAPO yields relative mIoU improvements of up to 33.7% on Qwen2.5-VL-3B and 5.4% on Time-R1-7B. Gains under cross-dataset training further demonstrate transfer across data domains, while the Video-MME accuracy of Qwen2.5-VL-3B remains close to the base model (58.0 vs. 57.4), indicating that SAPO largely preserves general video understanding. Further ablations verify the effects of high-value sample selection and the individual training objectives. Our contributions are summarized as follows:

  • Across multiple VLMs and grounding datasets, we identify a temporal generation gap: internal temporal attention often localizes queried events more accurately than explicitly generated timestamps.

  • We propose Self-Supervised Attention Policy Optimization (SAPO), which uses internal attention to improve temporal grounding through reinforcement learning without temporal-boundary annotations.

  • Experiments across models, datasets, and training sources demonstrate consistent grounding improvements for both general-purpose VLMs and a strong temporal grounding model, together with cross-dataset transfer and largely preserved general video understanding.

Vision–Language Models. Recent VLMs combine visual encoders with large language models to support general image and video understanding [1] (Li et al. 2024; Chen et al. 2024). Although these models exhibit strong semantic reasoning ability, precise temporal grounding remains challenging. Our work directly improves the temporal grounding ability of a VLM without changing its architecture or requiring temporal annotations.

Temporal Video Grounding. Temporal video grounding localizes the video segment described by a natural-language query. Conventional methods learn this task from annotated temporal intervals [24, 11]. Recent generative VLMs instead formulate grounding as native timestamp generation. They improve grounding through architectural designs, temporally grounded instruction data and supervised fine-tuning [8, 16, 19, 22, 6, 18, 5, 7], or more effective post-training algorithms such as reinforcement learning and on-policy distillation [20] (Li et al. 2026). Despite their different approaches to exploiting supervision, these methods rely on annotated temporal targets.

Training-free methods avoid temporal annotations by constructing external workflows that match frame-level information from frozen models with the query [10, 26] (Qu et al. 2024). Although they can produce temporal intervals without training, they do not improve the native grounding ability of the underlying VLM. SAPO differs from both supervised and training-free methods: it uses self-supervision from the model’s own attention to improve its native timestamp generation through policy optimization, without temporal annotations.

Model Mechanism Analysis. Prior studies inspect internal model states to understand how visual evidence is encoded before the final response [25, 14]. They show that model outputs may not fully reflect the information available in intermediate representations. Following this perspective, we analyze temporal attention in generative VLMs and identify a gap between internal localization and explicit timestamp generation.

Preliminary

Given an untrimmed video VV and a natural-language query qq, temporal video grounding aims to localize the temporal interval corresponding to the queried event. We distinguish three intervals: the ground-truth interval IgI_g (used only for evaluation and controlled analysis), the predicted interval IpI_p generated by the model, and the attention interval IaI_a decoded from its temporal attention. For each example, we determine which interval is more accurate by comparing IoU⁡(Ia,Ig)\operatorname{IoU}(I_a, I_g) with IoU⁡(Ip,Ig)\operatorname{IoU}(I_p, I_g).

We conduct this analysis with four VLMs on all 3,720 Charades-STA examples and the same fixed random sample of 4,000 examples from the 17,505 ActivityNet examples. We obtain IaI_a from the last prompt token’s cross-modal attention to the video tokens. We average over attention heads, pool spatial tokens within each frame to obtain a normalized temporal profile a(t)a(t), where ∑ta(t)=1\sum_t a(t) = 1. We decode this profile by finding the shortest contiguous frame window whose cumulative attention mass reaches a threshold τ\tau:

[i∗,j∗]=arg⁡min⁡1≤i≤j≤T (j−i)s.t.∑t=ija(t)≥τ,(1)[i^*,j^*] = \underset{1 \le i \le j \le T}{\arg\min}\,(j-i)\quad\text{s.t.}\quad\sum_{t=i}^{j} a(t) \ge\tau, \tag*{(1)}

where TT is the number of sampled video frames and τ=50%\tau= 50\%. We then map the frame indices [i∗,j∗][i^*,j^*] to their corresponding timestamps to obtain IaI_a. The model-specific layers, sensitivity to the layer and threshold, and further extraction details are provided in the Appendix. Representing both attention and prediction as temporal intervals enables a direct comparison under the same IoU metric and avoids favoring attention merely because it is represented as a smooth distribution.

Table 1 provides quantitative evidence for a consistent temporal generation gap. Across all eight model–dataset combinations, the attention interval achieves higher mIoU than the predicted interval, and attention is more accurate on the majority of valid examples. The averaged intervals in Figure 2 exhibit the same pattern. This gap likely arises because temporal attention operates directly in video-token position space, whereas timestamp generation must further convert token positions into calibrated numerical seconds, introducing additional localization error. The availability of this effective internal supervision, together with the high cost of temporal boundary annotation, motivates us to improve timestamp generation through attention-based self-supervision without human-annotated boundaries.

ModelDataAttn. wins{sup}†`Attn. mIoUPred. mIoU
Qwen2.5-VL-3BCharades65.039.536.5
ActivityNet71.032.824.6
Qwen2.5-VL-7BCharades62.046.143.6
ActivityNet67.032.427.4
InternVL3-2BCharades79.039.215.2
ActivityNet64.023.916.9
Qwen3-VL-4BCharades58.046.944.7
ActivityNet61.043.541.3

Table 1. The temporal generation gap across models and datasets. Attn. wins† is the fraction of valid samples where IoU(IaI_a, IgI_g) > IoU(IpI_p, IgI_g), excluding all-zero ties. All values are percentages.

Average temporal intervals for Charades-STA and ActivityNet-Captions across four models

Figure 2. Average temporal intervals visualize the generation gap. Each panel overlays the average ground-truth interval, the average predicted interval, and the average attention interval for one model–dataset pair. The attention interval is consistently closer to the ground-truth region than the explicit prediction.

Method

Building on the preceding finding, we propose Self-Supervised Attention Policy Optimization (SAPO), which uses internal temporal attention as self-supervision to improve the native grounding ability of a VLM. As illustrated in Figure 3, for each unlabeled video–query pair, a trainable policy samples timestamp intervals, while a frozen reference model provides a stationary temporal attention distribution. SAPO measures their alignment as the rollout reward, estimates group-relative advantages, and updates the policy. We next describe the complete optimization procedure and the selection of high-value samples without ground truth. Implementation details are provided in the Appendix.

Conventional TVG training and SAPO annotation-free alternative

Figure 3. Conventional TVG training and our annotation-free alternative. Top: Conventional TVG post-training relies on ground-truth temporal boundaries, using them either as supervised targets for fine-tuning or as rewards for reinforcement learning. Bottom: SAPO instead derives self-supervision from the VLM’s internal temporal attention to improve the model’s temporal grounding ability without ground-truth boundaries.

Self-Supervised Attention Policy Optimization

Given an unlabeled sample (V,q)(V,q), the policy πθ\pi_\theta generates a group of rollouts {y^k}k=1K\{\hat{y}_k\}_{k=1}^{K}, each containing a timestamp interval I^y^k=[s^k,e^k]\hat{I}_{\hat{y}_k}=[\hat{s}_k,\hat{e}_k]. In parallel, the reference model πθ0\pi_{\theta_0} produces a temporal attention profile over the video frames, which is corrected and normalized into a∈ΔTa \in\Delta^T. Decoding aa with (1) gives the attention interval IaI_a. The frozen reference model therefore provides two related forms of temporal supervision: the continuous reference attention distribution aa and its decoded attention interval IaI_a. The temporal distribution reward operates directly on aa, whereas the attention-interval IoU reward operates on IaI_a.

Directly using interval IoU as the reward produces sparse feedback: when rollouts do not overlap with IaI_a, they all receive zero reward regardless of their temporal distance from the attended region. SAPO therefore converts each rollout interval into a continuous distribution g(I^y^)g(\hat{I}_{\hat{y}}) using a Gaussian kernel and compares it with the corrected attention distribution aa before threshold-based interval decoding. SAPO scores each rollout by

r(y^)=−wdistW1(g(I^y^),a)+wIoUIoU⁡(I^y^,Ia)+λfmtrfmt−λwidthpwidth,(2)r(\hat{y})=-w_{\mathrm{dist}}W_1(g(\hat{I}_{\hat{y}}),a)+w_{\mathrm{IoU}}\operatorname{IoU}(\hat{I}_{\hat{y}},I_a) +\lambda_{\mathrm{fmt}}r_{\mathrm{fmt}}-\lambda_{\mathrm{width}}p_{\mathrm{width}}, \tag*{(2)}

where aa provides attention-derived temporal supervision.

(i) Temporal distribution reward. The first term measures agreement between the rollout-induced distribution and the reference attention distribution using the Wasserstein-1 distance. Because W1W_1 increases with the temporal transport required to match aa, it provides graded feedback even for non-overlapping rollouts. (ii) Attention-interval IoU reward. The second term measures temporal IoU between the generated interval and the interval IaI_a decoded from the reference attention distribution, providing a sparse interval-level complement to the distribution reward. (iii) Format-validity reward. rfmtr_{\mathrm{fmt}} rewards a well-formed interval (0≤s<e≤dur0 \le s < e \le\mathrm{dur}), preventing malformed outputs. (iv) Interval-width regularization. pwidthp_{\mathrm{width}} penalizes near-full-video intervals to discourage a trivial duration-prior solution.

For each video–query pair, we standardize the rewards within its rollout group to obtain group-relative advantages and optimize the policy with GRPO (Shao et al. [17]). The update increases the likelihood of intervals that align more closely with the temporal attention while applying the standard KL regularization. Repeating this process transfers the reference model’s internal temporal localization into the policy’s explicit timestamp generation.

High-Value Sample Selection

The preceding objective can train on any unlabeled video–query pair, but not every sample provides equally useful attention supervision. If the base prediction already agrees with attention, there is little discrepancy for SAPO to correct; if prediction is more accurate than attention, the internal signal may not provide useful supervision. Determining which signal is more accurate normally requires ground-truth boundaries. We therefore seek a proxy that does not require ground truth and selects a higher proportion of samples on which attention provides the stronger localization signal. Given an unlabeled pool D={(Vi,qi)}i=1M\mathcal{D} = \{(V_i, q_i)\}_{i=1}^{M}, we run the base model once to obtain the predicted interval Ip,iI_{p,i} and reference attention distribution aia_i for each sample. We convert Ip,iI_{p,i} into a temporal distribution pi=g(Ip,i)p_i = g(I_{p,i}). Under a training budget of kk samples, we score each sample by Jensen–Shannon divergence and select the top-kk examples:

di=JS⁡(pi∥ai),Dsel=TopK⁡(Vi,qi)∈D(di,k).(3)d_i = \operatorname{JS}(p_i \Vert a_i), \qquad\mathcal{D}_{\mathrm{sel}} = \operatorname{TopK}_{(V_i,q_i)\in\mathcal{D}}(d_i, k). \tag*{(3)}

As shown in Figure 4, the attention lead rate, defined as the fraction of examples for which the attention interval is more accurate than the predicted interval, increases with JS divergence on both datasets. Unlike the conditional statistic in Table 1, this rate is computed over all samples: ties are retained

Attention lead rate versus selection fraction

Figure 4. Attention lead rate increases monotonically with attention–prediction JS divergence. The rate is computed over all samples, with ties retained as non-leads.

in the denominator and counted as non-leads. The consistent trend indicates that prediction–attention divergence can serve as a ground-truth-free proxy for high-value samples. Because did_i requires no temporal boundaries, the same top-kk rule can be applied directly to a new unlabeled dataset. Further comparisons with alternative selection criteria that do not use ground truth are reported in the experiments.

Use of Ground Truth

Ground-truth boundaries are used only to validate the general diagnostic findings and to evaluate final grounding performance. Building on these findings, SAPO operates on training data with temporal boundaries removed; its sample selection, reward construction, and policy optimization require no ground truth.

Experiments

Experimental Setup

Base Models. We apply the same SAPO procedure to three base models: Qwen2.5-VL-3B and Qwen2.5-VL-7B [1], which represent general-purpose VLMs at two scales, and Time-R1-7B [20], a state-of-the-art model with strong temporal grounding performance.

Training Data. SAPO uses video–query pairs from the training splits of Charades-STA [4] and ActivityNet-Captions [9] after removing all temporal boundaries. Using the ground-truth-free criterion described in the Method, we select 2,000 high-value samples from one dataset for single-source training or 1,000 from each dataset for joint training, keeping the total budget fixed.

Benchmarks and Metrics. We evaluate temporal grounding on the held-out test splits of Charades-STA and ActivityNet-Captions under the standard train/test separation. To verify that temporal adaptation does not substantially impair general video understanding, we additionally report overall accuracy on Video-MME (Fu et al. 2024). Full training configurations, implementation details, and the Video-MME breakdown are provided in the Appendix.

Baselines. Our primary baselines are the zero-shot versions of the three base models, which enable controlled, paired comparisons under the same evaluation protocol. We also report ChatVTG (Qu et al. 2024), TFVTG [26], and TAG [10] as training-free numerical references because they share the no-annotation condition. They are not strictly comparable, however, because they improve inference through external workflows rather than update the underlying model. To our knowledge, no existing TVG method provides a directly matched setting that updates a model using video–query pairs without temporal annotations. Unless otherwise specified, post-training analyses and ablations use the joint-data setting.

Main Results

Table 2 shows that SAPO consistently improves both general-purpose VLMs and the already strong Time-R1 model. The gains are therefore not limited to correcting a weak base model, but extend across model scales and initial grounding abilities. Single-source training also transfers to the other dataset, while joint training remains effective across evaluation domains. These results indicate that SAPO learns a transferable improvement to native timestamp generation rather than fitting a dataset-specific temporal prior, supporting its use when adapting a VLM to previously unseen unlabeled data. Published training-free results are included as numerical references, but are not directly comparable because they improve inference through external workflows rather than updating the model itself.

BaseMethodtrain splitCharades-STA [email protected][email protected][email protected]mIoUΔ\DeltaActivityNet-Captions [email protected][email protected][email protected]mIoUΔ\Delta
Qwen2.5-VL-3BZero-shot–0.5530.3460.1750.365–0.3420.2160.1190.246–
+ SAPOCharades0.6640.3920.1580.415+13.7%0.4090.2410.1260.281+14.2%
+ SAPOActivityNet0.6290.3680.1650.398+9.0%0.4890.2850.1330.327+32.9%
+ SAPOCharades+ActivityNet0.6560.3840.1560.410+12.3%0.4930.2870.1300.329+33.7%
Qwen2.5-VL-7BZero-shot–0.6410.4220.2130.436–0.3810.2380.1300.274–
+ SAPOCharades0.6710.4430.2180.459+5.3%0.4100.2520.1340.292+6.6%
+ SAPOActivityNet0.6580.4340.2150.451+3.4%0.5220.3030.1420.348+27.0%
+ SAPOCharades+ActivityNet0.6770.4460.2200.462+6.0%0.5010.2930.1370.334+21.9%
Time-R1-7BZero-shot–0.8150.5780.2700.525–0.6460.4570.2550.448–
+ SAPOCharades0.8020.5960.3130.534+1.7%0.6570.4700.2630.456+1.8%
+ SAPOActivityNet0.8050.5880.3010.530+1.0%0.6770.4860.2760.472+5.4%
+ SAPOCharades+ActivityNet0.7820.6100.3350.533+1.5%0.6750.4840.2700.468+4.5%
Training-Free MethodsChatVTG0.5270.3300.1590.349–0.4070.2250.0940.272–
TFVTG0.6700.5000.2430.445–0.4930.2700.1340.341–
TAG0.6780.4860.2670.457–0.5190.2890.1510.366–

Table 2. SAPO consistently improves temporal grounding across base models and training sources.

Table 3 further shows that SAPO preserves general video understanding while strengthening temporal grounding. Performance on Video-MME remains close to that of the corresponding base model across training sources.

ModelVideo-MME Acc.Δ\Delta
Qwen2.5-VL-3B-Instruct58.0–
+ SAPO trained on Charades57.0-1.7%
+ SAPO trained on ActivityNet57.4-1.0%
+ SAPO trained on Charades+ActivityNet57.4-1.0%
Time-R1-7B60.1–
+ SAPO trained on Charades60.4+0.5%
+ SAPO trained on ActivityNet60.3+0.3%
+ SAPO trained on Charades+ActivityNet60.3+0.3%

Table 3. General video understanding on Video-MME.

Because SAPO requires neither ground-truth boundaries nor supervised targets, it also supports rapid adaptation directly on unlabeled target data. We construct a joint target pool by selecting 1,000 examples from each benchmark’s test split, apply SAPO without accessing their temporal annotations, and then evaluate the adapted model. Table 4 reports this explicitly transductive protocol alongside adaptation on the corresponding joint training pool. Target-set adaptation improves the model beyond standard training-split adaptation, showing that SAPO can be used in a practical test-time scenario: given a newly encountered unlabeled target set, the model first adapts to its video–query pairs and is then evaluated on that domain.

SettingCharades-STA mIoUΔ\DeltaActivityNet-Captions mIoUΔ\Delta
Base (zero-shot)0.365–0.246–
SAPO from train sets0.410+12.3%0.329+33.7%
SAPO from test sets0.421+15.3%0.341+38.6%

Table 4. Standard and transductive adaptation with SAPO.

In-Depth Analysis

We examine whether SAPO transfers internal localization evidence into native timestamps, closes the temporal generation gap, and changes attention accuracy, while also comparing it with direct attention decoding.

Does SAPO close the temporal generation gap? As shown in Table 5, SAPO substantially improves native timestamp prediction on both datasets and reduces the prediction–attention gap to within one mIoU point. The trained prediction slightly exceeds attention on Charades-STA and nearly matches it on ActivityNet-Captions, indicating that the original generation gap is effectively closed. Figure 5 provides complementary visual evidence: compared with the base model, the SAPO prediction aligns more closely with both the attention interval and the ground-truth event region.

SAPO moves the average predicted interval toward the ground-truth temporal region

Figure 5. SAPO moves the average predicted interval toward the ground-truth temporal region.

VariantPredicted Interval: Charades-STA [email protected]Predicted Interval: Charades-STA [email protected]Predicted Interval: Charades-STA [email protected]Predicted Interval: Charades-STA mIoUPredicted Interval: ActivityNet [email protected]Predicted Interval: ActivityNet [email protected]Predicted Interval: ActivityNet [email protected]Predicted Interval: ActivityNet mIoUAttention Interval Char. mIoUAttention Interval Act. mIoU
Base0.5530.3460.1750.3650.3420.2160.1190.246<u>0.395</u><u>0.328</u>
Attention pseudo-label + SFT0.647<u>0.371</u>0.1490.3950.4800.2470.1020.3150.3940.322
SAPO (Full)0.6560.3840.1560.4100.493<u>0.287</u>0.1300.3290.4010.335
1 w/o attention-derived rewards0.4920.3120.1590.3300.2260.1130.0540.163––
2 w/o temporal distribution reward0.5970.362<u>0.161</u>0.3780.4060.249<u>0.122</u>0.277––
3 w/o attention-interval IoU reward0.6160.3520.1450.3880.4710.2950.1140.312––
4 replace W1W_1 with JS divergence<u>0.673</u>0.3620.141<u>0.404</u><u>0.532</u>0.2720.1190.323––
5 w/o interval-width regularization0.6870.3350.1290.4030.5340.2760.116<u>0.325</u>––

Table 5. Ablation of SAPO. The first eight columns evaluate predicted intervals, while the last two report the mIoU of attention intervals. Variants 1–5 are discussed in the same order in the ablation analysis. Best and second-best results are marked in bold and underlined, respectively.

Attention accuracy remains largely stable after SAPO, with only minor increases on both datasets that may arise because prediction and attention share model parameters; we therefore treat this change as a secondary effect.

How does SAPO compare with direct attention decoding? As shown in Table 5, the native SAPO prediction achieves higher aggregate accuracy than directly decoding its attention. To explain this seemingly counter-intuitive result, we partition queries using the initial model: frozen attention has higher ground-truth IoU in the attention-better group, while the remaining queries form the prediction-better group. Each point in Figure 6 compares one query’s initial and post-SAPO prediction IoUs, with the diagonal denoting no change. SAPO improves 81%/86% of attention-better queries and, despite optimizing toward attention, also improves 38%/34% of prediction-better queries on Charades-STA/ActivityNet-Captions. Thus, gains on most attention-better queries outweigh regressions while many prediction-better cases are retained or further improved. Ground-truth-free selection further concentrates training on samples where attention is the stronger reference signal, allowing native predictions to exceed it in aggregate without doing so on every query.

SAPO preferentially improves samples whose base attention is more accurate than their base prediction

Figure 6. SAPO preferentially improves samples whose base attention is more accurate than their base prediction.

SAPO also retains native timestamp generation at inference, unlike direct decoding, which requires white-box attention access, layer selection, correction, and temporal-window extraction for every test example.

Ablation Studies

We ablate two main design choices: the selection of high-value samples without ground truth and the reward for policy optimization. All experiments use the Qwen2.5-VL-3B base model and the joint training pool from Charades and ActivityNet.

Training Sample Selector. We first assess how top-kk selection based on prediction–attention JS divergence affects downstream grounding performance. As shown in Table 6, random selection already improves the base model because the original unlabeled pool contains many attention-better examples. Under the same sample budget, JS selection yields consistently stronger downstream performance by increasing the proportion of such high-value examples. We also report a ground-truth oracle that selects only attention-better samples as an upper-bound reference; this diagnostic upper bound is not part of standard SAPO, which never accesses ground truth.

SelectorCharades-STA [email protected]Charades-STA mIoUΔ\DeltaActivityNet-Captions [email protected]ActivityNet-Captions mIoUΔ\Delta
Base (no training)0.3460.365–0.2160.246–
SAPO with different training-sample selectors
Random0.3690.396+8.5%0.2710.312+26.8%
JS divergence0.3840.410+12.3%0.2870.329+33.7%
GTGT oracle†0.3860.423+15.9%0.2920.343+39.4%

Table 6. Downstream TVG performance under different training-set selection strategies. The variants differ only in the selected training samples; Δ\Delta denotes the relative mIoU improvement over the base model.

Selection Metric. Beyond the random comparison, we evaluate alternative ranking metrics that do not use ground truth under the same selection budget. Figure 7 shows that prediction–attention JS divergence produces a higher attention lead rate, indicating that it retrieves a sample set with a larger proportion of high-value examples. Together with the downstream gains in Table 6, this result supports JS divergence as an effective criterion for constructing informative RL data without ground truth.

Comparison of selection metrics

Figure 7. Comparison of selection metrics.

Reward Components. Table 5 compares Full SAPO with five controlled variants that modify one aspect of the reward while keeping the training data and optimization settings fixed. We report mIoU together with recall at multiple IoU thresholds to assess boundary precision more comprehensively. The final two columns additionally track whether training changes the attention interval itself. Variant 1 removes both attention-derived rewards and performs below the base model, confirming that the gains of SAPO arise from attention-based self-supervision rather than generic format or width constraints.

SAPO uses attention supervision at two complementary levels. The temporal distribution reward aligns each rollout distribution with the full reference attention distribution through W1W_1, providing dense feedback that reflects temporal distance. The attention-interval IoU reward instead aligns the generated interval with the decoded attention interval, providing sparse boundary-level supervision. Variants 2 and 3 show that both components are effective. The larger degradation in Variant 2 further establishes the importance of dense supervision: interval IoU cannot distinguish non-overlapping rollouts, whereas distribution alignment still reflects their distances from the attended region. Variant 4 replaces W1W_1 with JS. Although the two variants achieve similar mIoU, JS reduces recall at stricter IoU thresholds. Unlike JS, W1W_1 preserves temporal geometry and provides distance-sensitive feedback for separated distributions, leading to more precise boundaries. Variant 5 exposes the role of width regularization. Without it, the model expands its predicted intervals to obtain coarse overlap, keeping mIoU similar while substantially degrading high-precision localization. The pseudo-label SFT baseline is instead constrained by the accuracy of its hard attention targets: its predicted intervals approach but remain below Full SAPO, and its attention accuracy remains essentially unchanged. In contrast, SAPO improves both predicted and attention intervals, indicating a joint adaptation mechanism beyond direct imitation of hard attention targets.

Conclusion

We identify a temporal generation gap in video VLMs: attention intervals localize queried events more accurately than predicted intervals on approximately 66% of valid examples. This finding reveals internal temporal evidence that can supervise timestamp generation without human-annotated boundaries. Based on this insight, we propose SAPO, which uses temporal attention as self-supervision for group-relative policy optimization to improve native timestamp prediction. Across multiple models, datasets, and training sources, SAPO improves temporal grounding for both general-purpose VLMs and a strong temporal grounding model, transfers across datasets, and largely preserves general video understanding.

Attention Extraction Protocol

Evaluation data. The temporal generation gap in Table 1 is measured on all 3,720 Charades-STA examples and a fixed random sample of 4,000 examples from the 17,505 ActivityNet examples. The identical subsets are used for all four VLMs. Ground-truth intervals are accessed only to compute the diagnostic IoU values; they are not used to extract attention, choose examples, or train standard SAPO. The explicitly marked GT-oracle ablation is reported only as an upper bound.

Diagnostic attention extraction. We take the last prompt token’s cross-modal attention to video tokens from a fixed mid-to-late layer, average it over attention heads, and pool the spatial visual tokens belonging to each frame. After removing the first-bin attention sink, we renormalize the resulting temporal profile. Its attention interval is the shortest contiguous window covering 50% of the cumulative attention mass, as defined in Eq. (1), and is then mapped from frame positions to seconds. We use ground-truth boundaries only in this offline mechanism analysis to measure diagnostic IoU. Table 7 lists the layer used for each model; the same layer is used on both datasets and throughout all experiments. Figure 8 reports sensitivity across middle-to-late layers and attention-mass thresholds.

ModelDatasetLayer
Qwen2.5-VL-3BCharades-STAL28
Qwen2.5-VL-3BActivityNetL28
Qwen2.5-VL-7BCharades-STAL22
Qwen2.5-VL-7BActivityNetL22
Qwen3-VL-4BCharades-STAL24
Qwen3-VL-4BActivityNetL24
InternVL3-2BCharades-STAL26
InternVL3-2BActivityNetL26

Table 7. Attention layers used for temporal interval decoding. A representative middle-to-late layer is specified without ground-truth layer selection and kept fixed across both datasets and all experiments.

Diagnostic sensitivity analysis plots

Figure 8. Diagnostic sensitivity analysis for Qwen2.5-VL-3B on Charades-STA, shown as a representative example. We report the attention lead rate: the fraction of examples on which the attention interval attains a higher IoU with the ground truth than the model’s own predicted interval, excluding ties. (a) The lead rate remains stable across the examined middle-to-late layers. (b) The same conclusion holds across a range of attention-mass thresholds around the fixed value 0.5.

Reference attention distribution. The reference attention distribution used during training follows the same last-token extraction, head averaging, spatial pooling, and interval-decoding procedure. We additionally divide the temporal profile by a position prior estimated from the training pool without temporal boundaries to remove dataset-level temporal bias, and renormalize the result into a distribution a∈ΔTa \in\Delta^{T}. The attention interval IaI_a is the shortest contiguous window covering 50% of the corrected attention mass. The layer and threshold remain fixed throughout sample selection and SAPO adaptation. For each model architecture, we directly specify one representative middle-to-late layer without ranking candidate layers by ground-truth grounding accuracy. The same layer is then used across datasets; the sensitivity analysis below verifies that the diagnostic conclusion is stable across nearby middle-to-late layers.

Detailed Generation-Gap Analysis

Pre-SAPO group-wise attention–prediction analysis. To complement the aggregate results in Table 1, we partition each model–dataset pair according to whether temporal attention decoding (TAD) or predicted timestamp decoding (PTD) attains higher ground-truth IoU. Table 8 reports the TAD and PTD mIoU within the attention-better, prediction-better, and all-zero tie groups.

Post-SAPO TAD–PTD group analysis. We further partition evaluation queries according to whether the trained policy’s temporal attention decoding (TAD) or predicted timestamp decoding (PTD) attains the higher IoU with the ground truth. Charades-STA uses the full test set, while ActivityNet-Captions uses the same fixed 4,000-query analysis subset as the preceding attention experiments. Table 9 reports the number and proportion of examples in each group together with the within-group mIoU of TAD and PTD.

DatasetGroupSamplesShareTAD mIoUPTD mIoU
Charades-STAAttention better (TAD > PTD)1,68245.2%0.5650.352
Charades-STAPrediction better (PTD > TAD)1,74546.9%0.3100.535
Charades-STATie (TAD = PTD)2937.9%0.0000.000
ActivityNet-CaptionsAttention better (TAD > PTD)1,68942.2%0.4540.250
ActivityNet-CaptionsPrediction better (PTD > TAD)1,95748.9%0.2930.457
ActivityNet-CaptionsTie (TAD = PTD)3548.9%0.0000.000

Table 9. Post-SAPO attention–prediction group statistics. Queries are grouped by comparing the ground-truth IoU of TAD and PTD. TAD mIoU and PTD mIoU are computed within each group.

Both attention-better and prediction-better examples remain substantial after SAPO. The large within-group margins show that the near-closed aggregate generation gap does not imply uniform agreement on every query; instead, the two signals retain complementary strengths across different examples.

SAPO Reward and Sample Selection

Distributions. A predicted interval [s,e][s,e] is turned into a temporal distribution g([s,e])g([s,e]) by placing a Gaussian over the TT uniform frame bins, centered at (s+e)/2(s+e)/2 with standard deviation 0.15max⁡(e−s,Δ)0.15\max(e-s,\Delta), where Δ\Delta is the bin width, and then normalizing. The temporal distribution reward uses the one-dimensional Wasserstein-1 distance W1(p,q)=1T∑i∣CDF⁡p(i)−CDF⁡q(i)∣W_1(p,q)=\frac{1}{T}\sum_i\lvert\operatorname{CDF}_p(i)-\operatorname{CDF}_q(i)\rvert, normalized to [0,1][0,1].

Reward weights. We use wdist=1.0w_{\mathrm{dist}}=1.0 for the temporal distribution reward, wIoU=0.5w_{\mathrm{IoU}}=0.5 for the attention-interval IoU reward, λfmt=0.1\lambda_{\mathrm{fmt}}=0.1 for the format-validity reward, and λwidth=0.5\lambda_{\mathrm{width}}=0.5 for interval-width regularization pwidth=p_{\mathrm{width}}= tbl:8: Pre-SAPO group-wise attention–prediction accuracy (mIoU). Queries are grouped by comparing the ground-truth IoU of TAD and PTD.

ModelDatasetAttention BetterPrediction BetterTie (Both Zero)
TADPTDTADPTDTADPTD
Qwen2.5-VL-3BCharades-STA0.5150.2680.2980.6630.0000.000
InternVL3-2BCharades-STA0.4890.0770.2270.5110.0000.000
Qwen2.5-VL-7BCharades-STA0.5870.3460.3680.6890.0000.000
Qwen3-VL-4BCharades-STA0.6170.3590.3600.6600.0000.000
Qwen2.5-VL-3BActivityNet-Captions0.4120.1240.2700.6560.0000.000
InternVL3-2BActivityNet-Captions0.3740.0870.1710.4370.0000.000
Qwen2.5-VL-7BActivityNet-Captions0.4180.1380.2420.6420.0000.000
Qwen3-VL-4BActivityNet-Captions0.6000.3000.2750.6820.0000.000

Table 8.

max(0,(e−s)/dur⁡−0.5)(0,(e-s)/\operatorname{dur} - 0.5). Malformed or unparseable outputs receive a fixed penalty of −1-1. Ground-truth timestamps are used only for diagnostic analyses, the oracle upper bound, and final evaluation. They never enter sample selection, reward construction, optimization, or model selection in the standard SAPO setting.

Algorithm 1: SAPO training

  1. Input: training pool D\mathcal{D} without temporal boundaries, policy θ\theta, frozen reference θ0\theta_0

  2. run πθ0\pi_{\theta_0} once; construct temporal attention aa and compute prediction–attention JS

  3. Dsel←\mathcal{D}_{\mathrm{sel}} \leftarrow samples with the highest JS divergence

  4. for each step do

  5. sample a batch from Dsel\mathcal{D}_{\mathrm{sel}}; draw a rollout group per query from πθ\pi_\theta

  6. read reference attention distribution aa and interval IaI_a from πθ0\pi_{\theta_0}

  7. score each rollout with the composite reward rr

  8. update θ\theta with group-relative advantage and KL to πθ0\pi_{\theta_0}

  9. end for

Selection. We rank the training pool without temporal boundaries by prediction–attention disagreement, measured as the Jensen–Shannon divergence between g(Ip)g(I_p) and the corrected attention distribution aa; larger values indicate higher training value. The main pool is constructed according to the data source. For single-source adaptation, we select 2,000 examples from Charades-STA or 2,000 examples from ActivityNet-Captions. For joint adaptation, we select 1,000 examples from each dataset, resulting in the same total budget of 2,000 examples. We use these budgets consistently whether candidates are drawn from the training split or, in the transductive setting, from the test split.

ModelVideo-MME Acc.
Qwen2.5-VL-3B + SAPO58.0; 57.4 ± 0.3
Time-R1-7B + SAPO60.1; 60.3 ± 0.2

Table 11. General-ability stability across SAPO runs (accuracy, mean ± std.).

Training Configuration

We train all base models with GRPO under the verl framework on five GPUs in a colocated actor/reference/rollout configuration, using sglang for rollout generation. The grounding prompt asks the model to output the start and end times of the queried event in seconds. Unless noted below, the three base models share the same optimizer settings: a learning rate of 1×10−61 \times10^{-6}, KL coefficient β=0.03\beta= 0.03 to the frozen reference model, entropy coefficient 0.01, a maximum prompt length of 4,096, and two epochs. We monitor the SAPO training reward and select a checkpoint after the reward has converged. No ground-truth or labeled-validation metric is used for checkpoint selection.

ModelOverallShortMediumLong
Qwen2.5-VL-3B-Instruct58.065.758.649.9
+ SAPO on Charades57.065.257.248.7
+ SAPO on ActivityNet57.465.757.848.7
+ SAPO on Charades+ActivityNet57.466.257.248.7
Time-R1-7B60.169.760.350.2
+ SAPO on Charades60.469.960.451.0
+ SAPO on ActivityNet60.370.060.450.6
+ SAPO on Charades+ActivityNet60.370.060.450.3

Table 12. Full Video-MME results (accuracy, %).

For Qwen2.5-VL-3B-Instruct and Qwen2.5-VL-7B-Instruct, each step draws a training batch of 60 queries with a PPO mini-batch of 30 and samples eight rollouts per query at temperature 1.1, with a maximum response length of 48 tokens (the model emits a short [s, e] timestamp). The two scales share the same configuration and differ only in the frozen base model and its representative attention layer (Table 7).

For Time-R1-7B, which produces chain-of-thought before its answer, we use a training batch of 30 queries with a PPO mini-batch of 15, eight rollouts per query at temperature 1.0, and a maximum response length of 256 tokens to accommodate the longer reasoning trace. All other hyperparameters are identical to the shared settings above.

Run-to-Run Stability

We repeat the principal SAPO settings with three random seeds. Table 10 reports mIoU as mean and standard deviation. The main-model rows use joint training-set adaptation, the transductive row uses the joint test-set pool, and the selection rows use the matched mixed-data budget from Table 6.

SettingCharadesActivityNet
Qwen2.5-VL-3B + SAPO40.9 ± 0.332.8 ± 0.4
Qwen2.5-VL-7B + SAPO46.1 ± 0.233.3 ± 0.4
Time-R1-7B + SAPO53.2 ± 0.246.7 ± 0.3
SAPO from test sets42.0 ± 0.333.9 ± 0.4
Random selection39.5 ± 0.331.1 ± 0.4
JS selection40.0 ± 0.332.8 ± 0.4
Oracle selection42.1 ± 0.234.1 ± 0.3

Table 10. Run-to-run stability (mIoU, mean ± std.).

General Video Understanding

The following tables report run-to-run stability and results by video duration for the Video-MME evaluation in the main paper.

References

  1. [1]Bai, S.; Chen, K.; Liu, X.; Wang, J.; et al. 2025. Qwen2.5-VL: Technical Report. arXiv preprint arXiv:2502.13923.arxiv.org/abs/2502.13923
  2. [4]Gao, J.; Sun, C.; Yang, Z.; and Nevatia, R. 2017. TALL: Temporal Activity Localization via Language Query. In Proceedings of the IEEE International Conference on Computer Vision (ICCV).arxiv.org/abs/1705.02101
  3. [5]Guo, Y.; Liu, J.; Li, M.; Cheng, D.; Tang, X.; Sui, D.; Liu, Q.; Chen, X.; and Zhao, K. 2025a. VTG-LLM: Integrating Timestamp Knowledge into Video LLMs for Enhanced Video Temporal Grounding. In Proceedings of the AAAI Conference on Artificial Intelligence.arxiv.org/abs/2405.13382
  4. [6]Guo, Y.; Liu, J.; Li, M.; Liu, Q.; Chen, X.; and Tang, X. 2025b. TRACE: Temporal Grounding Video LLM via Causal Event Modeling. In Proceedings of the International Conference on Learning Representations (ICLR).arxiv.org/abs/2410.05643
  5. [7]Hannan, T.; Islam, M. M.; Gu, J.; Seidl, T.; and Bertasius, G. 2025. ReVisionLLM: Recursive Vision-Language Model for Temporal Grounding in Hour-Long Videos. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 19192–19022.arxiv.org/abs/2411.14901
  6. [8]Huang, B.; Wang, X.; Chen, H.; Song, Z.; and Zhu, W. 2024. VTimeLLM: Empower LLM to Grasp Video Moments. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).arxiv.org/abs/2311.18445
  7. [9]Krishna, R.; Hata, K.; Ren, F.; Fei-Fei, L.; and Niebles, J. C. 2017. Dense-Captioning Events in Videos. In Proceedings of the IEEE International Conference on Computer Vision (ICCV).arxiv.org/abs/1705.00754
  8. [10]Lee, J.-S.; Lee, S.; Ahn, J.; Choi, Y.; and Lee, J.-H. 2025. TAG: A Simple Yet Effective Temporal-Aware Approach for Zero-Shot Video Temporal Grounding. In Proceedings of the British Machine Vision Conference.arxiv.org/abs/2508.07925
  9. [11]Lei, J.; Berg, T. L.; and Bansal, M. 2021. Detecting Moments and Highlights in Videos via Natural Language Queries. In Advances in Neural Information Processing Systems (NeurIPS).
  10. [14]Palit, V.; Pandey, R.; Arora, A.; and Liang, P. P. 2023. Towards Vision-Language Mechanistic Interpretability: A Causal Tracing Tool for BLIP. In Proceedings of the IEEE/CVF International Conference on Computer Vision Workshops, 2856–2861.arxiv.org/abs/2308.14179
  11. [16]Ren, S.; Yao, L.; Li, S.; Sun, X.; and Hou, L. 2024. TimeChat: A Time-Sensitive Multimodal Large Language Model for Long Video Understanding. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).arxiv.org/abs/2312.02051
  12. [17]Shao, Z.; Wang, P.; Zhu, Q.; et al. 2024. DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models. arXiv preprint arXiv:2402.03300.arxiv.org/abs/2402.03300
  13. [18]Wang, H.; Xu, Z.; Cheng, Y.; Diao, S.; Zhou, Y.; Cao, Y.; Wang, Q.; Ge, W.; and Huang, L. 2025a. Grounded-VideoLLM: Sharpening Fine-grained Temporal Grounding in Video Large Language Models. In Findings of the Association for Computational Linguistics: EMNLP.arxiv.org/abs/2410.03290
  14. [19]Wang, Y.; Meng, X.; Liang, J.; Wang, Y.; Liu, Q.; and Zhao, D. 2024. HawkEye: Training Video-Text LLMs for Grounding Text in Videos. arXiv preprint arXiv:2403.10228.arxiv.org/abs/2403.10228
  15. [20]Wang, Y.; Wang, Z.; Xu, B.; Du, Y.; Lin, K.; Xiao, Z.; Yue, Z.; Ju, J.; Zhang, L.; Yang, D.; Fang, X.; He, Z.; Luo, Z.; Wang, W.; Lin, J.; Luan, J.; and Jin, Q. 2025b. Time-R1: Post-Training Large Vision Language Model for Temporal Video Grounding. In Advances in Neural Information Processing Systems.arxiv.org/abs/2503.13377
  16. [22]Zeng, X.; Li, K.; Wang, C.; Li, X.; Jiang, T.; Yan, Z.; Li, S.; Shi, Y.; Yue, Z.; Wang, Y.; Wang, Y.; Qiao, Y.; and Wang, L. 2025. TimeSuite: Improving MLLMs for Long Video Understanding via Grounded Tuning. In Proceedings of the International Conference on Learning Representations (ICLR).arxiv.org/abs/2410.19702
  17. [23]Zhang, J.; Wang, T.; Ge, Y.; Ge, Y.; Li, X.; Shan, Y.; and Wang, L. 2026. TimeLens: Rethinking Video Temporal Grounding with Multimodal LLMs. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 10419–10429.arxiv.org/abs/2512.14698
  18. [24]Zhang, S.; Peng, H.; Fu, J.; and Luo, J. 2020. Learning 2D Temporal Adjacent Networks for Moment Localization with Natural Language. In Proceedings of the AAAI Conference on Artificial Intelligence.arxiv.org/abs/1912.03590
  19. [25]Zhao, Q.; Xu, M.; Gupta, K.; Asthana, A.; Zheng, L.; and Gould, S. 2024. The First to Know: How Token Distributions Reveal Hidden Knowledge in Large Vision-Language Models? arXiv preprint arXiv:2403.09037.arxiv.org/abs/2403.09037
  20. [26]Zheng, M.; Cai, X.; Chen, Q.; Peng, Y.; and Liu, Y. 2024. Training-Free Video Temporal Grounding Using Large-Scale Pre-Trained Models. In Proceedings of the European Conference on Computer Vision, 20–37.arxiv.org/abs/2408.16219

Paper details

vlnc:W_fed2dnk5
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Computer Science

Not recorded for this paper · View statement →

Looking for related papers…
Contents