Skip to content
AI.info

Research

Understanding Temporal Logic Consistency in Video-Language Models through Cross-Modal Attention Discriminability

Understanding Temporal Logic Consistency in Video-Language Models through Cross-Modal Attention Discriminability Overview Research area: Computer Vision / multimodal large language models — specifical

arXiv
2510.08138
Published
2025-10-09
Authors
Chengzhi Li, Heyan Huang, Ping Jian, Zhen Yang, Yaning Tian, Zhongbin Guo

AI summary

Understanding Temporal Logic Consistency in Video-Language Models through Cross-Modal Attention Discriminability

Overview

Research area: Computer Vision / multimodal large language models — specifically the interpretability and temporal reasoning behavior of Video Large Language Models (Video-LLMs).

Technical level: Intermediate. The paper assumes familiarity with transformer attention, Video-LLMs, and temporal grounding metrics (IoU), but its central argument is stated in accessible terms: models contradict themselves when asked the same question in different words because a small set of attention heads cannot tell different timestamps apart.

Scope: The paper offers an interpretability-driven diagnosis of why Video-LLMs give logically inconsistent answers to rephrased temporal questions, and proposes a training loss, Temporally Conditioned Attention Sharpening (TCAS), that fixes it by sharpening cross-modal attention distributions.

What This Paper Is About

Video-LLMs can answer a question about when something happens in a video, but when the same question is rephrased — or the event description is shifted — they often produce a contradictory answer, which the authors trace to a lack of true temporal comprehension. Building on the consistency benchmark of Jung et al., the authors ask what goes wrong inside the model rather than only measuring how often it goes wrong. Their goal is to identify the internal cause of temporal inconsistency and then design a training objective that removes it.

Key Contributions

  1. Identification of a minority of key heads: The authors show that a small portion of mid-layer cross-modal attention heads in TimeChat carry most of the model's attention to visual tokens, and that these heads play a critical role in maintaining temporal understanding logic consistency.

  2. A causal, not just correlational, conclusion: Through a statistical analysis and a targeted intervention on attention, they establish that the temporal discriminability of attention is a decisive factor in the model's ability to produce logically consistent temporal predictions.

  3. The TCAS method: They propose Temporally Conditioned Attention Sharpening (TCAS), an optimization objective formulated as a contrastive learning loss over attention scores that requires no additional modules, no ground-truth temporal labels, and no task-specific templates.

  4. Validation across models, datasets, and tasks: They verify TCAS on Qwen2.5-VL, Video-LLaMA, and TimeChat, using both the TimeIT and VTune tuning annotations, on Charades-CON and ActivityNet-CON consistency benchmarks, and on the standard Charades-STA and ActivityNet-Captions temporal grounding benchmarks, where TCAS also improves grounding scores.

Main Findings

  • Inconsistency is concentrated in a few heads: Sorting attention heads by cross-modal score (the average attention from question/answer text tokens to visual tokens) shows that only a small portion of mid-layer heads in TimeChat have notably higher cross-modal scores. After timestamp aggregation, the key head A^14,3 maps event text tokens onto the corresponding temporal visual tokens — but fails to focus on the correct segment for videos KXIMH and ZUU2X, which coincides with a shift consistency score of 0 for those samples, versus 0.562 for 9MOH2 and 0.288 for WIOOY.

  • Positive correlation between discriminability and consistency: The attention discriminability score (the share of attention mass falling inside the ground-truth time range) is positively correlated with consistency: Pearson coefficients of 0.4778 (p-value 5.18 × 10^-41) for the rephrased grounding set and 0.4788 (p-value 3.69 × 10^-41) for the shifted grounding set, both far below 0.05. The authors note the relationship is not linear, since Video-LLMs are complex nonlinear systems, but that the positive correlation is statistically significant.

  • Intervention confirms causality: Blending original attention with uniform attention over ground-truth timestamps, A_{q,V} = (1 − α)A^orig_{q,V} + αA^gt_{q,V}, shows that mild interventions help while strong ones hurt. At α = 0.2 the R-Ground mIoU rises from 81.8 to 82.6 and R0.5 from 90.2 to 90.7, while at α = 1.0 R-Ground mIoU falls to 78.5. The authors also report that mild interventions suffice to improve c_rg., whereas improving c_sg. requires stronger intervention — indicating the shifted grounding task is harder for the model to keep consistent.

  • Cross-model and cross-task generalizability of the diagnosis: A parallel analysis of Qwen2.5-VL on an Event Order Judgment (EOJ) task, using 1,000 consistent question-answer pairs built from Charades-STA test annotations, again shows cross-modal scores concentrated in a few middle-layer heads, with text tokens for events at different times focusing on their corresponding temporal segments.

  • TCAS improves consistency across all tested settings: On Charades-CON with the VTune annotation, TimeChat goes from 76.2 (SFT) to 83.3 (TCAS) on Ground, from 69.2 to 75.0 (90.1 relative) on R-Ground, and from 36.2 to 39.5 on S-Ground; H-Verify rises from 44.8 to 52.9 and C-Verify from 42.4 to 50.8. Similar direction-of-improvement holds for Qwen2.5-VL, Video-LLaMA, and the TimeIT annotation, and on ActivityNet-CON.

  • TCAS also improves ordinary temporal grounding: On Charades-STA, TimeChat with TCAS reaches R@1,0.5 of 60.2 and R@1,0.7 of 37.6, versus 58.4 and 34.7 for TimeChat with SFT and 46.7 and 23.7 for the un-tuned TimeChat. On ActivityNet-Captions, TCAS gives 41.2 and 24.9 versus 41.0 and 23.7 for SFT. The authors attribute this to a regularization effect: SFT can fit dataset biases and rely on shortcuts such as language priors, whereas TCAS forces the model to use discriminative temporal attention.

  • Greater gains on longer videos: On Charades-CON, gains over SFT grow with duration. For videos over 40 seconds (n = 51), TCAS improves Grounding by +17.7 points (58.8 to 76.5) and R-Ground by +14.8 points (51.2 to 66.0); for 0–20 second videos (n = 58) the gains are +3.4 and +1.7.

  • The mechanism is borne out post-training: Comparing baseline and TCAS-enhanced models on the top-32 attention discriminability scores shows a clear rightward shift in the distribution, indicating TCAS directly increases discriminability rather than producing a side effect.

  • Smaller ActivityNet-CON gains have a stated cause: The authors report the ActivityNet-CON improvement is relatively smaller because that dataset has a noisier data distribution, with event descriptions written as long sentences that deviate from the general understanding of what an event is, making all methods perform worse.

  • Hyperparameter sensitivity: TCAS is more sensitive to scope-related hyperparameters — the number of top heads t, and the threshold thr, which govern how many heads and tokens are adjusted — than to intensity hyperparameters (margin m and loss weight w_ae). Increasing t causes a significant drop on the Ground and R-Ground subsets, and a larger thr causes a substantial decline on the S-Ground, H-Verify, and C-Verify subsets. The empirically optimal combination reported is t = 32, m = 0.2, thr = 0.1, w_ae = 0.5, giving 83.31 on Ground, 75.02 on R-Ground, 39.52 on S-Ground, 52.93 on H-Verify, and 50.81 on C-Verify.

Methodology in Plain English

The authors work in three stages. First, look inside the model. Using TimeChat-7b (which uses a Sliding Video Q-Former and a Timestation-aware frame encoder) on the original, rephrased, and shifted grounding subsets of Charades-CON, they define cross-modal score as how much attention each head pays from question/answer text tokens to visual tokens, and rank heads by it. They then visualize the winning heads over the temporal dimension, grouping tokens by timestamp.

Second, test whether the pattern is causal. They define an attention discriminability score — what fraction of a head's visual attention lands inside the ground-truth time span for the queried event — and correlate it with per-sample consistency scores (the product of the original IoU and the rephrased or shifted IoU). Because correlation alone is not causation, they run an intervention during inference, mixing each query token and top head's original attention with a uniform attention distribution over the ground-truth timestamps, controlled by a strength α, and watch what happens to consistency as α grows.

Third, build and test a fix. TCAS is a loss, not a module. It selects the top t heads by cross-modal score and the text tokens whose maximum timestamp-aggregated attention exceeds a threshold. For each such token it computes the mean attention over visual timestamps, splits the timestamps into a positive set (above the mean) and a negative set (below the mean), and penalizes the case where the weakest positive score is not separated from the strongest negative score by at least a margin m: Max(m + Max(N) − Min(P), 0). Crucially, this is contrastive among timestamps rather than anchored to ground-truth labels, so it can be applied to general video-language tasks; a weight w_ae balances it against the standard next-token prediction loss. Training used PyTorch on a single NVIDIA A100 80GB GPU with the Adam optimizer (learning rate 1 × 10^-5, batch size 4) for approximately 3 days; Qwen2.5-VL, TimeChat, and Video-LLaMA process 16, 96, and 8 frames respectively, all at 224 × 224 spatial resolution.

Why This Matters

Research impact. Prior work on Video-LLM temporal understanding largely added specialized temporal modules or built new evaluation benchmarks. This paper instead offers a mechanistic explanation internal to the model — the decoder's limitations trace back to insufficient discriminability of cross-modal attention heads — and shows that a single attention-level objective both raises consistency scores and improves standard temporal grounding, suggesting temporal logic consistency is a factor in temporal understanding rather than just a symptom of failure.

Real-world applications:

  • Video search and surveillance review: Reliable answers about when an event occurred in long footage matter for reviewing hours of recorded video.
  • Video editing and media archiving: Automatically locating segments from natural-language descriptions supports clipping, indexing, and reuse.
  • Assistive and accessibility tools: Describing and querying video content for users who cannot watch it depends on the model not contradicting itself under paraphrase.
  • Robotics and embodied agents: Acting on the correct segment of a demonstration or recording requires stable temporal grounding under differently worded instructions.

Industry relevance. TCAS requires no additional modules and is described as compatible with various transformer-based architectures, so it is a training-time change rather than a re-architecture — attractive for teams fine-tuning existing Video-LLMs. The finding that standard supervised fine-tuning can fit biases and lean on language priors, while TCAS suppresses those cues, is directly relevant to anyone worried about whether a video model is truly looking at the video.

Future Directions

  • Beyond logical inconsistency: The authors explicitly acknowledge that their focus on logical inconsistency may not encompass all facets of temporal understanding, leaving other failure modes to characterize.

  • Explaining the remaining gap on harder tasks: Improving the shift consistency score required stronger intervention than the rephrase score, and ActivityNet-CON showed smaller gains due to noisier long-sentence event descriptions — both suggest room for methods that handle challenging temporal distributions.

  • Extending the EOJ analysis: The EOJ task was used as a brief generalizability check on Qwen2.5-VL with a 1,000-pair probing dataset; whether TCAS-style objectives extend to multi-event ordering tasks more broadly is left open.

  • Transfer to other architectures and modalities: The paper argues TC

Authors’ abstract

Large language models (LLMs) often generate self-contradictory outputs, which severely impacts their reliability and hinders their adoption in practical applications. In video-language models (Video-LLMs), this phenomenon recently draws the attention of researchers. Specifically, these models fail to provide logically consistent responses to rephrased questions based on their grounding outputs. However, the underlying causes of this phenomenon remain underexplored. In this work, we adopt an interpretability-driven approach to analyze, statistically summarize, and intervention the potential factors of the phenomenon. We find that one of the primary reasons for the inconsistency in responses lies in the inability of cross-modal attention heads to effectively distinguish video tokens across different timestamps. To address this, we propose an attention enhancement method called Temporally Conditioned Attention Sharpening (TCAS), which constructs an enhancement objective based on attention distinctions to enhance the model's temporal resolution capability, thereby improving its temporal understanding logic consistency. Experimental results demonstrate that our method significantly enhances the temporal logic consistency of Video-LLMs. Further analyses reveal that our method indeed improves the temporal discriminability of attention heads, validating our conclusions. Additionally, our method even achieves performance improvements in general video temporal grounding tasks, suggesting that temporal logic consistency is an important factor in temporal understanding.

Read the original paper