DToMA: Training-free Dynamic Token MAnipulation for Long Video Understanding
Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 2314-2322.
https://doi.org/10.24963/ijcai.2025/258
Keywords
- Computer Vision: CV: Video analysis and understanding
Abstract
Video Large Language Models (VideoLLMs) often require thousands of visual tokens to process long videos, leading to substantial computational costs, further exacerbated by visual token inefficiency. Existing token reduction and alternative video representation methods improve efficiency but often compromise comprehension abilities. In this work, we analyze the reasoning processes of VideoLLMs in multi-choice VideoQA task, identifying three reasoning stages—shallow, intermediate, and deep stages—that closely mimic human cognitive processing. Our analysis reveals specific inefficiencies at each stage: in shallow layers, VideoLLMs attempt to memorize all video details without prioritizing relevant content; in intermediate layers, models fail to re-examine uncertain content dynamically; and in deep layers, they continue processing video even when sufficiently confident. To bridge this gap, we propose DToMA, a training-free Dynamic Token MAnipulation method inspired by human adjustment mechanisms in three aspects: 1) Text-guided keyframe-aware reorganization to prioritize keyframes and reduce redundancy, 2) Uncertainty-based visual injection to revisit content dynamically, and 3) Early-exit pruning to halt visual tokens when confident. Experiments on 6 long video understanding benchmarks show that DToMA enhances both efficiency and comprehension, outperforming state-of-the-art methods and generalizing well across 3 VideoLLM architectures and sizes. Code is available at https://github.com/yuanrr/DToMA.
- [Bolya et al., 2023] Daniel Bolya, Cheng-Yang Fu, Xiao- liang Dai, Peizhao Zhang, Christoph Feichtenhofer, and Judy Hoffman. Token merging: Your vit but faster. In The Eleventh International Conference on Learning Represen- tations, 2023.
- [Chen et al., 2024a] Shiqi Chen, Miao Xiong, Junteng Liu, Zhengxuan Wu, Teng Xiao, Siyang Gao, and Junxian He. In-context sharpness as alerts: An inner representation perspective for hallucination mitigation. arXiv preprint arXiv:2403.01548, 2024.
- [Chen et al., 2024b] Yi Chen, Jian Xu, Xu-Yao Zhang, Wen- Zhuo Liu, Yang-Yang Liu, and Cheng-Lin Liu. Recov- erable compression: A multimodal vision token recovery mechanism guided by text information. arXiv preprint arXiv:2409.01179, 2024.
- [Chen et al., 2025] Liang Chen, Haozhe Zhao, Tianyu Liu, Shuai Bai, Junyang Lin, Chang Zhou, and Baobao Chang. An image is worth 1/2 tokens after layer 2: Plug-and-play inference acceleration for large vision-language models. In European Conference on Computer Vision, pages 19- 35. Springer, 2025.
- [Du et al., 2024] Yifan Du, Yuqi Huo, Kun Zhou, Zijia Zhao, Haoyu Lu, Han Huang, Wayne Xin Zhao, Bingning Wang, Weipeng Chen, and Ji-Rong Wen. Exploring the design space of visual context representation in video mllms. arXiv preprint arXiv:2410.13694, 2024.
- [Dundas and Chik, 2011] Jitesh Dundas and David Chik. Implementing human-like intuition mechanism in artificial intelligence. arXiv preprint arXiv:1106.5917, 2011.
- [Endo et al., 2024] Mark Endo, Xiaohan Wang, and Serena Yeung-Levy. Feather the throttle: Revisiting visual to- ken pruning for vision-language model acceleration. arXiv preprint arXiv:2412.13180, 2024.
- [Fang et al., 2024] Yixiong Fang, Ziran Yang, Zhaorun Chen, Zhuokai Zhao, and Jiawei Zhou. From uncertainty to trust: Enhancing reliability in vision-language models with uncertainty-guided dropout decoding. arXiv preprint arXiv:2412.06474, 2024.
- [Fu et al., 2024a] Chaoyou Fu, Yuhan Dai, Yongdong Luo, Lei Li, Shuhuai Ren, Renrui Zhang, Zihan Wang, Chenyu Zhou, Yunhang Shen, Mengdan Zhang, et al. Video- mme: The first-ever comprehensive evaluation benchmark of multi-modal llms in video analysis. arXiv preprint arXiv:2405.21075, 2024.
- [Fu et al., 2024b] Yuhan Fu, Ruobing Xie, Jiazhen Liu, Bangxiang Lan, Xingwu Sun, Zhanhui Kang, and Xirong Li. Magnifier prompt: Tackling multimodal hallucina- tion via extremely simple instructions. arXiv preprint arXiv:2410.11701, 2024.
- [Geva et al., 2021] Mor Geva, Roei Schuster, Jonathan Be- rant, and Omer Levy. Transformer feed-forward layers are key-value memories. In Proceedings of the 2021 Confer- ence on Empirical Methods in Natural Language Process- ing, pages 5484-5495, 2021.
- [Jiang et al., 2024a] Lei Jiang, Weizhe Huang, Tongxuan Liu, Yuting Zeng, Jing Li, Lechao Cheng, and Xiao- hua Xu. Fopru: Focal pruning for efficient large vision- language models. arXiv preprint arXiv:2411.14164, 2024.
- [Jiang et al., 2024b] Nick Jiang, Anish Kachinthaya, Suzie Petryk, and Yossi Gandelsman. Interpreting and editing vision-language representations to mitigate hallucinations. arXiv preprint arXiv:2410.02762, 2024.
- [Kim et al., 2024] Wonkyun Kim, Changin Choi, Wonseok Lee, and Wonjong Rhee. An image grid can be worth a video: Zero-shot video question answering using a vlm. arXiv preprint arXiv:2403.18406, 2024.
- [Lan et al., 2024] Xiaohan Lan, Yitian Yuan, Zequn Jie, and Lin Ma. Vidcompress: Memory-enhanced temporal com- pression for video understanding in large language models. arXiv preprint arXiv:2410.11417, 2024.
- [Li et al., 2022] Yiming Li, Xiaoshan Yang, and Chang- sheng Xu. Dynamic scene graph generation via anticipa- tory pre-training. In Proceedings of the IEEE/CVF con- ference on computer vision and pattern recognition, pages 13874-13883, 2022.
- [Li et al., 2024] Bo Li, Yuanhan Zhang, Dong Guo, Ren- rui Zhang, Feng Li, Hao Zhang, Kaichen Zhang, Peiyuan Zhang, Yanwei Li, Ziwei Liu, et al. Llava-onevision: Easy visual task transfer. arXiv preprint arXiv:2408.03326, 2024.
- [Li et al., 2025] Yanwei Li, Chengyao Wang, and Jiaya Jia. Llama-vid: An image is worth 2 tokens in large language models. In European Conference on Computer Vision, pages 323-340. Springer, 2025.
- [Liu et al., 2024a] Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. Improved baselines with visual in- struction tuning. In Proceedings of the IEEE/CVF Confer- ence on Computer Vision and Pattern Recognition, pages 26296-26306, 2024.
- [Liu et al., 2024b] Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan Zhang, Sheng Shen, and Yong Jae Lee. Llava-next: Improved reasoning, ocr, and world knowl- edge, 2024.
- [Liu et al., 2025] Shi Liu, Kecheng Zheng, and Wei Chen. Paying more attention to image: A training-free method for alleviating hallucination in lvlms. In European Confer- ence on Computer Vision, pages 125-140. Springer, 2025.
- [Mangalam et al., 2023] Karttikeya Mangalam, Raiymbek Akshulakov, and Jitendra Malik. Egoschema: A diag- nostic benchmark for very long-form video language un- derstanding. Advances in Neural Information Processing Systems, 36:46212-46244, 2023.
- [nostalgebraist, 2020] nostalgebraist. Interpreting gpt: The logit lens. LessWrong, 2020.
- [Patraucean et al., 2024] Viorica Patraucean, Lucas Smaira, Ankush Gupta, Adria Recasens, Larisa Markeeva, Dylan Banarse, Skanda Koppula, Mateusz Malinowski, Yi Yang, Carl Doersch, et al. Perception test: A diagnostic bench- mark for multimodal video models. Advances in Neural Information Processing Systems, 36, 2024.
- [Shang et al., 2024] Yuzhang Shang, Mu Cai, Bingxin Xu, Yong Jae Lee, and Yan Yan. Llava-prumerge: Adaptive to- ken reduction for efficient large multimodal models. arXiv preprint arXiv:2403.15388, 2024.
- [Shen et al., 2024] Xiaoqian Shen, Yunyang Xiong, Chang- sheng Zhao, Lemeng Wu, Jun Chen, Chenchen Zhu, Zechun Liu, Fanyi Xiao, Balakrishnan Varadarajan, Flo- rian Bordes, et al. Longvu: Spatiotemporal adaptive com- pression for long video-language understanding. arXiv preprint arXiv:2410.17434, 2024.
- [Song et al., 2024] Dingjie Song, Wenjun Wang, Shunian Chen, Xidong Wang, Michael Guan, and Benyou Wang. Less is more: A simple yet effective token reduction method for efficient multi-modal llms. arXiv preprint arXiv:2409.10994, 2024.
- [Team et al., 2024] Gemini Team, Petko Georgiev, Ving Ian Lei, Ryan Burnell, Libin Bai, Anmol Gulati, Garrett Tanzer, Damien Vincent, Zhufeng Pan, Shibo Wang, et al. Gemini 1.5: Unlocking multimodal understand- ing across millions of tokens of context. arXiv preprint arXiv:2403.05530, 2024.
- [Wang et al., 2024] Peng Wang, Shuai Bai, Sinan Tan, Shi- jie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, et al. Qwen2-vl: Enhanc- ing vision-language model's perception of the world at any resolution. arXiv preprint arXiv:2409.12191, 2024.
- [Wu et al., 2024] Haoning Wu, Dongxu Li, Bei Chen, and Junnan Li. Longvideobench: A benchmark for long- context interleaved video-language understanding. arXiv preprint arXiv:2407.15754, 2024.
- [Xiao et al., 2021] Junbin Xiao, Xindi Shang, Angela Yao, and Tat-Seng Chua. Next-qa: Next phase of question- answering to explaining temporal actions. In Proceedings of the IEEE/CVF conference on computer vision and pat- tern recognition, pages 9777-9786, 2021.
- [Xu et al., 2024] Mingze Xu, Mingfei Gao, Zhe Gan, Hong- You Chen, Zhengfeng Lai, Haiming Gang, Kai Kang, and Afshin Dehghan. Slowfast-llava: A strong training-free baseline for video large language models. arXiv preprint arXiv:2407.15841, 2024.
- [Yang et al., 2024] An Yang, Baosong Yang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Zhou, Chengpeng Li, Chengyuan Li, Dayiheng Liu, Fei Huang, et al. Qwen2 technical report. arXiv preprint arXiv:2407.10671, 2024.
- [Ye et al., 2024] Weihao Ye, Qiong Wu, Wenhao Lin, and Yiyi Zhou. Fit and prune: Fast and training-free visual to- ken pruning for multi-modal large language models. arXiv preprint arXiv:2409.10197, 2024.
- [Yuan et al., 2024] Zhihang Yuan, Yuzhang Shang, Yang Zhou, Zhen Dong, Zhe Zhou, Chenhao Xue, Bingzhe Wu, Zhikai Li, Qingyi Gu, Yong Jae Lee, et al. Llm infer- ence unveiled: Survey and roofline model insights. arXiv preprint arXiv:2402.16363, 2024.
- [Zhai et al., 2023] Xiaohua Zhai, Basil Mustafa, Alexander Kolesnikov, and Lucas Beyer. Sigmoid loss for language image pre-training. In Proceedings of the IEEE/CVF In- ternational Conference on Computer Vision, pages 11975- 11986, 2023.
- [Zhang et al., 2024a] Kaichen Zhang, Bo Li, Peiyuan Zhang, Fanyi Pu, Joshua Adrian Cahyono, Kairui Hu, Shuai Liu, Yuanhan Zhang, Jingkang Yang, Chunyuan Li, and Ziwei Liu. Lmms-eval: Reality check on the evaluation of large multimodal models, 2024.
- [Zhang et al., 2024b] Peiyuan Zhang, Kaichen Zhang, Bo Li, Guangtao Zeng, Jingkang Yang, Yuanhan Zhang, Ziyue Wang, Haoran Tan, Chunyuan Li, and Ziwei Liu. Long context transfer from language to vision. arXiv preprint arXiv:2406.16852, 2024.
- [Zhang et al., 2024c] Qizhe Zhang, Aosong Cheng, Ming Lu, Zhiyong Zhuo, Minqi Wang, Jiajun Cao, Shaobo Guo, Qi She, and Shanghang Zhang. [cls] attention is all you need for training-free visual token pruning: Make vlm in- ference faster. arXiv preprint arXiv:2412.01818, 2024.
- [Zhang et al., 2024d] Yuanhan Zhang, Jinming Wu, Wei Li, Bo Li, Zejun Ma, Ziwei Liu, and Chunyuan Li. Video instruction tuning with synthetic data. arXiv preprint arXiv:2410.02713, 2024.
- [Zhao et al., 2024] Shiyu Zhao, Zhenting Wang, Felix Juefei-Xu, Xide Xia, Miao Liu, Xiaofang Wang, Mingfu Liang, Ning Zhang, Dimitris N Metaxas, and Licheng Yu. Accelerating multimodel large language models by searching optimal vision token reduction. arXiv preprint arXiv:2412.00556, 2024.
- [Zhou et al., 2024] Junjie Zhou, Yan Shu, Bo Zhao, Boya Wu, Shitao Xiao, Xi Yang, Yongping Xiong, Bo Zhang, Tiejun Huang, and Zheng Liu. Mlvu: A comprehensive benchmark for multi-task long video understanding. arXiv preprint arXiv:2406.04264, 2024.
- [Zou et al., 2025] Xin Zou, Yizhou Wang, Yibo Yan, Yuan- huiyi Lyu, Kening Zheng, Sirui Huang, Junkai Chen, Pei- jie Jiang, Jia Liu, Chang Tang, and Xuming Hu. Look twice before you answer: Memory-space visual retracing for hallucination mitigation in multimodal large language models. The Forty-second International Conference on Machine Learning (ICML), 2025.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
Long video understanding requires models to process and reason over video content spanning several minutes to hours. Large language models (LLMs) [Yang et al., 2024] have shown exceptional comprehension of textual information. Multimodal LLMs (MLLMs) [Li et al., 2024; Wang et al.,
∗Corresponding author

2024] further equip LLMs with multimodal perception ability, greatly extending their comprehension of images and short videos. Those advances motivate researchers to investigate methods for effectively understanding long videos.
Existing VideoLLMs typically process videos by converting each frame into hundreds of visual tokens, leading to a rapid token increase as video length grows. For instance, LLaVA-Video [Zhang et al., 2024d] generates over 11k tokens for merely 64 frames. However, these visual tokens often have heavy redundancy [Chen et al., 2025], exacerbating the computational challenges. To address this, prior works focus on token reduction and alternative video representation strategies. The former includes pruning visual content outside LLMs [Shang et al., 2024; Shen et al., 2024] and compression mechanisms within LLMs [Chen et al., 2025; Ye et al., 2024]. The latter methods, such as image grids [Kim et al., 2024], slow-fast processing [Xu et al., 2024], or querybased methods [Li et al., 2025], design alternative ways to effectively represent videos. While improving efficiency, they are often at the expense of visual details or temporal dependencies, limiting their comprehension ability. Effective visual token processing remains to be explored for simultaneously improving efficiency and video comprehension.
To enhance both efficiency and comprehension abilities, we explore the internal reasoning mechanisms of VideoLLMs, inspired by human reasoning processes. Human reasoning consists of two key aspects: a general reasoning process and intuitive adjustment mechanisms [Dundas and Chik, 2011]. Humans generally approach video understanding tasks by first perceiving video content, then analyzing based on questions, and finally inferring based on prior knowledge. For quicker and better comprehension, they employ strategies such as conducting an initial coarse scan to adjust focus, rewatching video to clarify uncertainties or refine their understanding, and ceasing examining visual content once confident in their conclusions. We delve into the internal reasoning mechanisms of VideoLLMs to analyze whether they exhibit reasoning processes similar to humans. Inspired by recent studies [Fang et al., 2024] and [Chen et al., 2025], we analyze reasoning patterns in multi-choice VideoQA tasks through entropy dynamics and cross-attention. Specifically, we identify three distinct reasoning stages in VideoLLMs: 1) ShallowLayers: Text strongly attends to visual tokens, facilitating rapid multimodal information exchange. Entropy remains high, suggesting an information-gathering phase [Chen et al., 2025], akin to human initial perception of video content. 2) Intermediate Layers: Attention declines and narrows its focus, and entropy fluctuates as the model explores and analyzes visual content, similar to humans refining and analyzing visual content given questions. 3) Deep Layers: The model greatly reduces attention on visual tokens and entropy steadily declines, indicating a shift to knowledgedriven reasoning, resembling how humans draw conclusions after gathering sufficient information. Our analysis reveals an important insight: while VideoLLMs align with the general reasoning process observed in humans, they overlook the intuitive adjustment mechanisms crucial for human cognition. Unlike humans, VideoLLMs do not prioritize questionrelevant content but instead attempt to memorize all video details. They cannot re-examine the visual content when uncertain and cease processing visual content once sufficiently confident in their conclusions. This limits leads to suboptimal efficiency and comprehension abilities in VideoLLMs.
Based on these observations, we propose DToMA, a training-free Dynamic Token MAipulation method to improve efficiency and comprehension abilities of VideoLLMs in three aspects: text-guided keyframe-aware reorganization, uncertainty-based visual injection, and early-exit pruning. Firstly, text-guided keyframe-aware reorganization imitates humans to selectively focus after an initial scan. It uses crossattention scores from shallow layers to identify keyframes, allocating more tokens to keyframes while reducing nonkeyframe tokens. Secondly, uncertainty-based visual injection emulates humans to revisit related content when uncertainty arises. For samples with high entropy, this process dynamically reintroduces visual tokens in the model's feedforward layers, enhancing alignment with visual content and reducing uncertainty. Thirdly, early-exit pruning mirrors humans to stop examining visual content once they are confident about their conclusions. This process prunes visual tokens before the model reaches its deep layers, reducing redundant computations without sacrificing reasoning accuracy. As shown in Fig.1, by systematically emulating these human-inspired cognitive strategies, DToMA achieves gains in both efficiency and comprehension capability.
Our contributions are summarized as follows:
- We analyze VideoLLMs' reasoning processes through entropy and attention dynamics, revealing that while these models partially emulate human general reasoning processes, they lack key intuitive adjustments critical for efficiency and comprehension capability.
- We propose DToMA, a training-free dynamic visual token manipulation method that improves efficiency and reasoning capability by imitating human intuitive adjustment mechanisms, including text-guided keyframeaware reorganization, uncertainty-based visual injection, and early-exit pruning.
- Experiments on 6 long video understanding benchmarks demonstrate that DToMA outperforms state-of-the-art methods and generalizes across diverse LLM architectures and sizes.
2 RelatedWorks
2.1 Video Large Language Models
The demand for enhanced understanding capabilities in MLLMs has led to a substantial increase in visual tokens. Early works like LLaVA [Liu et al., 2024a] encode a 336px image into 576 tokens, while further efforts [Li et al., 2024; Liu et al., 2024b] splitting higher resolution images into multiple sub-images, leading to more extended tokens, e.g., 2,306 tokens for a 672px image. Video understanding tasks exacerbate this challenge due to sequential frames, e.g., up to 4k tokens for a 16-frame video, straining LLM context limits [Liu et al., 2024b]. To process longer videos, efforts like Gemini1.5 [Team et al., 2024] and LongVA [Zhang et al., 2024b] extend context windows but suffer from prohibitive computational costs, with Gemini-1.5 encoding one-hour videos into 920k tokens. Compression strategies, such as LLaMA-VID [Li et al., 2025] and Vid-Compress [Lan et al., 2024], reduce the token numbers but often sacrifice visual detail. Alternative approaches like image grids [Kim et al., 2024] and slow-fast processing [Xu et al., 2024] improve efficiency but struggle with long videos.
The key challenge remains in the excessive number of tokens to represent video content. To address this, we propose DToMA, a training-free dynamic token manipulation method that enhances efficiency and understanding of VideoLLMs.
2.2 Visual Token Reduction
Extensive research has focused on reducing visual tokens to enhance efficiency without obviously compromising visual understanding. Methods like LLaVA-PruMerge [Shang et al., 2024], FasterVLM [Zhang et al., 2024c], and FoPru [Jiang et al., 2024a] drop redundant tokens using attention guidance in visual encoder but lack textual adaptability. Methods like TRIM [Song et al., 2024] and [Chen et al., 2024b] employ paired text encoders, i.e., CLIP, to assist token filtering but are incompatible with fine-tuned image encoders. Recent works consider compression within LLMs, such as FastV [Chen et al., 2025] and Feather [Endo et al., 2024], retaining tokens with high visual-text attention scores. FitPrune [Ye et al., 2024] and G-Search [Zhao et al., 2024] further progressively prune tokens within LLM layers, thereby enhancing computational efficiency.

Existing methods do not adequately balance efficiency with performance, often compromising video understanding. To address this gap, DToMA 1) mitigates inefficiency by pruning non-keyframe tokens and exiting all visual tokens in LLM deep layers, and 2) improves comprehension by exerting emphasis on keyframes and reintroducing visual information when uncertainty arises. Thus, DToMA improves both efficiency and comprehension without additional training.
2.3 InterpretingMLLM Internal Mechanism
Understanding the inner workings of MLLMs can gain insights into their reasoning processes, identify inefficiencies, and develop targeted strategies for improvement. Recent interpretability studies using attention scores [Chen et al., 2025; Li et al., 2022], intermediate representations [Jiang et al., 2024b], and activation patterns [Chen et al., 2024a] mitigate token redundancy and image hallucination issues. For instance, analyzing attention scores provides insight into the model's focus at each layer. Recent studies leverage this method to reveal that LLMs often emphasize textual information over visual content [Liu et al., 2025; Fu et al., 2024b]. By better balancing the emphasis on visual tokens, these methods effectively mitigate image hallucinations.
Building on these insights, we analyze VideoLLMs through the lenses of attention and entropy dynamics to compare their reasoning processes to human cognition. We find that while VideoLLMs can imitate general human reasoning phases, they lack key intuitive strategies for efficient and accurate reasoning. DToMA bridges this gap by incorporating human-inspired strategies to enhance reasoning efficiency and comprehension.
3 Method
3.1 Preliminary
VideoLLMs generate text responses based on input video and text queries. The core components include a visual encoder E(·), a projector for modality alignment, an LLM with L layers, and an LM head Vocab(·) which predicts the vocabulary distribution of the next token. Given a video with N frames, the visual encoder extracts N frame embeddings. The projector maps frame embeddings as visual tokens Tv ∈ RN×P×d to enable processing by the LLM, where P, d are the number of patches and model dimension. Then, visual tokens Tv and text query tokens Tt ∈ RNt×d are concatenated as the input sequence, i.e., {xi}t1 , t = N × P + Nt, and are processed through L LLM layers. The LLM final layer output h(L) xt is used by Vocab(·) to predict the next token xt+1 as:

With greedy decoding, the most probable word for output would be selected.
3.2 Observations of LLM Internal Behaviors
In this section, we aim to explore the inefficiencies in the reasoning processes of VideoLLMs by analyzing their internal behaviors. Through this analysis, we identify key areas where the models struggle and propose potential improvements.
Specifically, to gain insights into these behaviors, we employ two critical metrics: entropy and cross-attention dynamics. These metrics are chosen because they provide a comprehensive view of the model's confidence levels and its prioritization of multimodal information, respectively. Entropy helps track uncertainty and confidence across layers [Fang et al., 2024], while cross-attention reveals how the model integrates information from different modalities [Chen et al., 2025]. Detailed observation implementations are as follows:
- Entropy dynamics are observed by tracking the evolution of answer probabilities across layers, inspired by recent interpretability research [nostalgebraist, 2020] which finds intermediate outputs h(l) xt in each l-th layer can be interpreted by Vocab(·). By prompting the model to answer directly with the letter option from given choices, we can decode the first token output at each layer l to track answer probabilities P(x = o|x1:t) following Eq. (1), denoted as Po, where o ∈ {A, B, C, D}. Then, the normalized entropy is computed as H = ∑ -PologPo/logm, where m = 4 is the number of options. H is the model's uncertainty at each layer.

- Cross-attention dynamics are analyzed through attention maps from each layer. Specifically, for attention maps A(l) xt ∈ Rn×t×t in each layer, where n is the number of heads, we extract the cross-attention scores between text query Tt and visual tokens Tv, i.e., C (l) xt ∈ Rn×Nt×NP , from A(l) xt . Aggregating C (l) xt across all attention heads yields: C (l) xt = ∑n C (l) xt . Measuring C (l) xt allows us to analyze how text token aggregates visual information.
Our analysis reveals distinct stages in VideoLLMs' reasoning process, as in Fig.2, 3. In shallow layers, entropy is high and Po is nearly random, yet text tokens strongly attend to visual tokens, indicating an initial information-gathering phase [Chen et al., 2025]. In intermediate layers, entropy exhibits dynamic fluctuations. For simple questions, it decreases steadily as the model converges on the correct answer. However, for complex ones, prolonged fluctuations suggest ongoing uncertainty. Attention declines and narrows its focus, reflecting information refinement. In deep layers, entropy rapidly converges for simple questions but remains higher and fluctuates for complex ones. Attention to visual tokens diminishes, indicating internal textual reasoning.
The above observations highlight several inefficiencies: in shallow layers, models attempt to perceive all visual content. Methods like FastV [Chen et al., 2025] reduce the influence of redundancy but do not adequately emphasize key information, leading to unnecessary computational overhead and suboptimal performance. Though uncertainty occurs in intermediate layers, the diminishing cross-attention from text tokens makes it challenging for the model to independently and adequately reassess necessary visual evidence. In deep layers, reduced attention to visual tokens suggests inefficiency in continuously computing visual context for final reasoning.
3.3 DToMA
To this end, we propose DToMA, a training-free Dynamic visual Token MAnipulation method to address those inefficiencies and improve reasoning capabilities, as in Fig. 4. DToMA has 3 token processing strategies: text-guided keyframeaware reorganization, uncertainty-based visual injection, and early-exit pruning, detailed in the following sections.
Text-Guided Keyframe-Aware Reorganization (TKR). To solve the inefficiency that the model attempts to memorize all video details in shallow layers, we propose TKR that prioritizes keyframes while reducing non-keyframe tokens for both efficiency and understanding ability improvement. The method involves a two-pass process. The first pass is executed only in LLM shallow layers to obtain question-related guidance for keyframe selection and non-keyframe tokens reduction. Then, the second pass is executed formally through all layers with our reorganized visual tokens. Details of TKR are shown in Algorithm 1. Specifically, the LLM first performs an r1-layer forward pass using coarse representations ˆ Tv to get cross-attention C (r) ˆ xt , which is then averaged to obtain frame importance F (r) for keyframe selection. Note that F (r) would be divided into S non-overlapping segments, i.e., F (r) 1 , ..., F (r) S , and the topk frames are selected from each segment to avoid concentrating keyframes in a local video clip. For non-keyframes, we drop the lowest attended tokens in ˆ Tv, ensuring the pruning ratio respects the token budget. Finally, keyframes retain their fine representations and non-keyframes are with reduced coarse representations, both are reorganized in chronological order for full propagation through the LLM as: LLM1:L(Concat(Tfinal,Tt)). This method balances computational efficiency with representational fidelity, highly adaptable to various computational budgets and tasks.
Uncertainty-Based Visual Injection (V-Inj). Intermediate layers often exhibit uncertainty for complex questions. As attention to visual tokens diminishes over layers, it is challenging for the model to incorporate necessary visual evidence independently, leading to propagated confusion. To address this, we propose uncertainty-based visual injection, which identifies uncertain layers and reintroduces visual evidence to support more accurate reasoning. Inspired by studies showing that feed-forward networks (FFNs) can act as key-value memories for factual knowledge retrieval [Geva et al., 2021] and that visual information can be effectively integrated into FFNs for hallucination mitigation [Zou et al., 2025], we inject visual tokens into the FFN during uncertain scenarios.
The standard FFN is defined as: FFN(x) = σ(x·W1)W2, where W1 ∈ Rd×D , W2 ∈ RD×d , σ is activation function, D is the intermediate dimension. Furthermore, by represent weights as W1 = (k1, k2, ..., kD) and W2 = (v1, v2, ..., vD)T , ki, vi ∈ Rd , the FFN can be rewritten in
Algorithm 1: Token Reorganization Strategy
Input: visual tokens Tv ∈ {T 1 v , ..., T N v }, T i v ∈ RP×d . Text tokens Tt, selected shallow layer r1, number of keyframes m, number of segments S, token budget B.
Output: Reorganized tokens Tfinal
## First Pass: Early Layer Execution
- Obtain coarse frame representations (e.g., pooling):
- Run r1-layer forward pass to get C(r) ˆ xt :
- Aggregate C(r1) ˆ xt to get frame importance:
- Identify top-k frames in each segment:
- ## Second Pass: Token Reorganization
- Compute pruning ratio:
- Reorganize visual tokens Tv:
key-value form:
where FFN can be interpreted as using input x as queries to compute similarity with keys ki and gather values vi.
To inject visual evidence, we convert our reorganized visual tokens Tfinal ∈ RB×d into keys and values and perform similar retrieval from the visual key-value memory as:
where K(Ti), V(Ti) ∈ Rd are key and value corresponding to visual token Ti ∈ Tfinal. We employ identical mappings for K(·) and V(·) to maintain its training-free nature. This visual memory is integrated into FFN as:
where β = Norm(FFN(x))/Norm(VisInj(x)) is a balance factor and α is injection strength. For modern Gated Linear Units (GLU) instead of FFN in recent LLMs, the visual injection bypasses the gating mechanism for simplicity.
We dynamically activate visual injection based on the entropy H of output probabilities in intermediate layers rs -re. If entropy in layer r2 ∈ [rs, re] exceeds a threshold G, visual evidence is injected at the next layer r2 + 1 by replacing FFN(r2+1) as FFN(r2+1) visual . This injection is performed only once in uncertain scenarios to preserve feature stability. This method enriches the visual cues tied to the question and enhances reasoning consistency with visual content, thus improving the model's capability to integrate multimodal information for accurate predictions.
Early-Exit Pruning (EP). To reduce inefficiency in deep layers, we introduce early-exit pruning by omitting overall visual token processing. Initially, we explored a dynamic early exit based on entropy convergence, enabling the model to bypass unnecessary computations for high-confidence samples. However, experiments showed that samples with prolonged uncertainty paid minimal attention to image tokens in deep layers, indicating that delayed exits do not enhance understanding and instead increase computing costs. Therefore, we adopted a fixed-layer exit strategy, which simplifies implementation and ensures consistent efficiency.
Specifically, for layers r > r3, all visual token computations are omitted. The attention mechanism is simplified to only focus on text tokens Tt and the FFN computations for visual tokens are bypassed. This pruning strategy significantly reduces computational costs while ensuring the model maintains reasoning accuracy.
4 Experiments
4.1 Benchmarks andMetrics
We conducted evaluations of our method on 6 long video understanding benchmarks, including VideoMME [Fu et al., 2024a], LongVideoBench [Wu et al., 2024], EgoSchema [Mangalam et al., 2023], MLVU [Zhou et al., 2024], NExTQA [Xiao et al., 2021], and PerceptionTest [Patraucean et al., 2024]. Following evaluation tool LMMs-Eval [Zhang et al., 2024a], we perform standardized evaluation settings and metrics, i.e., accuracy, on each benchmark. We evaluate the efficiency by computing FLOPs and prefill time of LLMs using the library from LLM-Viewer [Yuan et al., 2024], and assume 1000 text tokens for LLaVA-Video due to their time prompt, while 100 for the others.
4.2 Implementation Details
Our implementation mainly follows LLaVA-Video-7B [Zhang et al., 2024d]. We adopt SigLIP [Zhai et al., 2023] as the vision encoder and Qwen2 [Yang et al., 2024] as the LLM. For DToMA, the selected layer r1 = 3, r2 ∈ [12, 18], r3 = 21. For TKR, following optimal design [Du et al., 2024] for SigLIP, we use 2×2 pooling for keyframes, while 3×3 for coarse non-keyframes. Token budget B is pre-defined according to experimental requirements, and token compression ratio is self-adaptive according to B. With no specifically stated, we set m = S = N/4. For V-Inj, we set threshold G = 0.75, factor α = 0.25. We also adapt DToMA in LLaVA-OV-0.5B [Li et al., 2024], Qwen2-VL-2B [Wang et al., 2024] to evaluate generalizing across VideoLLM architectures and sizes.
4.3 Comparative Evaluation
Comparison with SOTA Methods. We compare DToMA with state-of-the-art (SOTA) methods, focusing on long video comprehension under identical token budgets. Specifically, we evaluate DToMA across three different architectures and sizes of video models, i.e., LLaVA-OV-0.5B, Qwen2-VL-2B, and LLaVA-Video-7B. By compressing visual tokens and using coarse representations for non-keyframes, DToMA enables more frame inputs within the same token budget. We set a double frame input for DToMA, with an 80.5% nonkeyframes compression ratio. Table 1 summarizes the results on 6 video understanding benchmarks. DToMA consistently improves performance across all 3 tested models, with the averaged improvement of 1.48%, 1.35%, and 1.43% on the 6 benchmarks, respectively. Specifically, when applied to LLaVA-Video-7B, it achieves SOTA results on 5 out of 6 benchmarks. Moreover, under the same token budget, the efficiency of DToMA also shows an improvement, with 83.6% FLOPs and 79.0% prefill time, which will be discussed in the ablation. This demonstrates the effectiveness of DToMA in enhancing both efficiency and understanding capabilities, and the generalization ability across diverse architectures and sizes of VideoLLMs.
| Models | #Tokens Budget | VideoMME | LongVideoBench | MLVU | EgoSchema | PerceptionTest | NExT-QA |
|---|---|---|---|---|---|---|---|
| w/o sub. | Val | M-Avg | Test | Val | Test | ||
| Proprietary Models | |||||||
| GPT4-V | - | 59.9 | 59.1 | 49.2 | - | - | - |
| GPT4-o | - | 71.9 | 66.7 | 64.6 | - | - | - |
| Gemini-1.5-Pro | - | 75.0 | 64.0 | - | 72.2 | - | - |
| Open-Source Video MLLMs | |||||||
| LLaVA-OV-0.5B | 6k | 44.0 | 43.4 | 50.3 | 26.8 | 49.2 | 57.2 |
| w. DToMA | 6k | 45.8 | 44.9 | 52.4 | 27.2 | 49.8 | 59.7 |
| Qwen2-VL-2B | 16k | 55.6 | - | - | 54.9 | 53.9 | - |
| Qwen2-VL-2B* | 8k | 54.2 | 48.1 | 57.2 | 54.3 | 53.2 | 75.2 |
| w. DToMA | 8k | 55.1 | 48.9 | 59.1 | 56.5 | 53.9 | 76.8 |
| LongVA-7B | 18k | 52.6 | - | 56.3 | - | - | 68.3 |
| LLaVA-OV-7B | 6k | 58.6 | 56.5 | 64.7 | 60.1 | 57.1 | 79.4 |
| LongVU-7B | 8k | 60.6 | - | 65.4 | 67.6 | - | - |
| Qwen2-VL-7B | 16k | 63.3 | - | - | 66.7 | 62.3 | - |
| LLaVA-Video-7B | 12k | 63.3 | 58.2 | 70.8 | 57.3 | 67.9 | 83.2 |
| w. DToMA | 12k | 65.0 | 59.6 | 71.7 | 59.3 | 68.9 | 83.8 |
Comparison with token reduction and efficient video representation Methods. To assess performance and efficiency (FLOPs and prefill time) of DToMA, we compared it with existing token reduction techniques, i.e., ToMe [Bolya et al., 2023], FastV [Chen et al., 2025], FasterVLM [Zhang et al., 2024c], and efficient video representation strategies, i.e., coarse representation ˆ Tv, SlowFast [Zhang et al., 2024d], SF-LLaVA [Xu et al., 2024], on VideoMME using LLaVAVideo with 64 and 128 frame inputs. The results are shown in Table 2. It reveals that DToMA achieves superior performance in terms of FLOPs and prefill time while improving accuracy on VideoMME. Specifically, With 64-frame videos, DToMA at a 50% compression ratio surpasses baseline (+0.4%) whereas other methods perform below baseline. For 128-frame videos, DToMA's advantages are more highlighted. This is especially notable as 128-frame inputs increase redundancy challenges for LLaVA-Video which is trained on 64-frame inputs. DToMA consistently outperforms the baseline (+1.0%) and other methods (+0.7%) with fewer FLOPs and prefill time, proving the effectiveness of DToMA in improving efficiency and understanding abilities.
| Methods | #Tokens | #Frames | FLOPs (TB) | Prefill Time (ms) | VideoMME w/o subs |
|---|---|---|---|---|---|
| LLaVA-Video | 11,648 | 64 | 249.3 | 1,214 | 63.3 |
| ToMe | 70% | 64 | 163.1 | 734.5 | 62.8 |
| FastV | 70% | 64 | 172.2 | 789.3 | 63.4 |
| FasterVLM | 70% | 64 | 162.9 | 734.2 | 63.1 |
| ToMe | 50% | 64 | 113.0 | 483.7 | 61.1 |
| FastV | 50% | 64 | 127.5 | 565.8 | 63.1 |
| FasterVLM | 50% | 64 | 112.9 | 483.5 | 63.0 |
| DToMA | 50% | 64 | 96.6 | 410.2 | 63.6 |
| ToMe | 30% | 64 | 69.0 | 276.6 | 57.6 |
| FastV | 30% | 64 | 88.1 | 374.8 | 61.2 |
| FasterVLM | 30% | 64 | 68.9 | 276.5 | 61.9 |
| DToMA† | 30% | 64 | 64.9 | 262.2 | 62.5 |
| LLaVA-Video | 23,296 | 128 | 589.0 | 3,224 | 64.0 |
| Corase rep. | 11,520 | 128 | 219.1 | 1,056 | 63.7 |
| SlowFast | 11,200 | 128 | 211.8 | 990.6 | 64.2 |
| SF-LLaVA | 15,232 | 128 | 320.8 | 1,643 | 63.8 |
| ToMe | 50% | 128 | 249.8 | 1,231 | 63.8 |
| FastV | 50% | 128 | 285.4 | 1,429 | 64.2 |
| FasterVLM | 50% | 128 | 249.0 | 1,217 | 64.3 |
| DToMA | 50% | 128 | 208.3 | 988.6 | 65.0 |
4.4 Ablation Study
Effectiveness of Each Component. We ablate the three key components of DToMA: text-guided keyframe-aware reorganization (TKR), uncertainty-based visual injection (V-Inj), and early-exit pruning (EP), in VideoMME dataset based on LLaVA-Video. The results are shown in Table 4. TKR reduces the token count by 50% and thus achieves marked efficiency gains, using only 49.6% of baseline FLOPs and 43.9% of prefill time while improving performance. It demonstrates that TKR effectively emphasizes the related visual context and reduces redundancy, thereby enhancing both efficiency and accuracy. V-Inj reintroduces visual information when uncertainty is detected, adding less than 0.5% FLOPs but boosting accuracy by 0.4% with baseline tokens and 0.7% with reorganized tokens in 128 frames. The results prove its effectiveness in mitigating uncertainty and aligning reasoning with visual context with only a small computing increase. EP uses 72.9% FLOPs and 71.7% prefill time of baseline to pro-
| TKR V-Inj | EP #Token | #Frame | FLOPs | Prefill Time |
|---|---|---|---|---|
| LLaVA-Video | 11,648 | 64 | 249.3 | 1,214 |
| ✓ | 5,824 | 64 | 123.7 | 533.2 |
| ✓ 11,648 | 64 | 250.2 | 1,215 | |
| ✓ | 11,648 | 64 | 181.9 | 870.7 |
| ✓ ✓ | 5,824 | 64 | 124.4 | 533.9 |
| ✓ ✓ ✓ | 5,824 | 64 | 96.6 | 410.2 |
| LLaVA-Video | 23,296 | 128 | 589.0 | 3,224 |
| ✓ | 11,648 | 128 | 275.2 | 1,317 |
| ✓ | 23,296 | 128 | 590.4 | 3,225 |
| ✓ | 23,296 | 128 | 424.5 | 2,336 |
| ✓ ✓ | 11,648 | 128 | 276.4 | 1,318 |
| ✓ ✓ ✓ | 11,648 | 128 | 208.3 | 988.6 |
63.3
63.4
63.7
63.1
63.8
63.6
64.0
64.5
64.4
63.8
65.2
65.0
| r1 in TKR | r2 in V-Inj | r3 in EP | ||||||
|---|---|---|---|---|---|---|---|---|
| Layer | Acc. | FLOPs | Layer | Acc. | FLOPs | Layer | Acc. | FLOPs |
| 1 | 64.4 | 190.5 | 13 | 64.6 | 207.4 | 19 | 63.9 | 191.5 |
| 2 | 64.9 | 199.2 | 17 | 64.7 | 207.4 | 20 | 64.8 | 199.8 |
| 3 | 65.0 | 208.3 | 12-18 | 64.6 | 208.6 | 21 | 65.0 | 208.3 |
| 4 | 65.0 | 216.9 | 13-18 | 65.0 | 208.3 | 22 | 64.7 | 216.7 |
| 5 | 64.8 | 225.6 | 13-19 | 64.9 | 208.4 | Dynamic | 65.0 | 226.3 |
Table 4: Deployment layer analysis of each component in DToMA based on LLaVA-Video in VideoMME dataset.
cess the same visual tokens by pruning all visual tokens in deep layers, improving model efficiency without compromising performance. Overall, these strategies enable DToMA to consistently improve both performance and computing efficiency. Notably, with 128-frame inputs, DToMA achieves a 1.7% improvement over the 64-frame baseline, using just 83.5% of the FLOPs and 81.4% of the prefill time, proving its excellent accuracy-efficiency trade-off.
Layer selection analysis. In DToMA, the methods TKR, V-Inj, and EP target inefficiencies in shallow, intermediate, and deep LLM layers, respectively. We select target layers based on attention and entropy dynamics. TKR is applied at the first layer when cross-attention shifts from inclined to vertical patterns. V-Inj starts when entropy diverges between easy and hard questions and ends when entropy rises sharply again, with visual attention drops. EP is applied when attention nearly vanishes. We evaluated various layer indices to find the best balance between accuracy and efficiency. Results in Table 4 show the optimal setup is r1 = 3, r2 ∈ [13 - 18], r3 = 21, maximizing accuracy while minimizing resource usage. We also tested dynamic r3 based on model uncertainty, but found no clear performance benefits and delayed the early exit due to diminished attention focus. Thus, we opt for a fixed early exit layer.
Uncertainty Decline Analysis. To investigate the impact of V-Inj on uncertainty, we visualize the uncertainty H across LLM layers in two datasets: VideoMME and LongVideoBench. The visualization results in Fig. 5 reveal that injecting visual content at intermediate layers greatly reduces model uncertainty. This reduction is not only immediate but also propagates to deeper layers, thus ensuring a sustained decrease in uncertainty throughout VideoLLM. VInj also lowers the uncertainty peaks in intermediate and deep layers, enabling the model to make more informed responses based on visual context in complex scenarios. The improved consistency and confidence underscore the value of V-Inj in enhancing the performance and reliability of VideoLLMs.


Hyper-parameter Analysis. To investigate the impact of hyper-parameters on DToMA, we conduct experiments by varying segment S in TKR, injection ratio α, and threshold G in V-Inj. More specifically, we consider the following settings: S ∈ {1, 4, 16, 32}, α ∈ {0.1, 0.15, 0.2, 0.25, 0.3, 0.4}, and G ∈ {0.6, 0.65, 0.7, 0.75, 0.8, 0.85}. The results in Fig. 6 show that the optimal performance is achieved with S = 16, α = 0.25, and G = 0.75.
5 Conclusion
This paper addresses the challenge of efficiently processing long videos in VideoLLMs while enhancing comprehension. By analyzing reasoning patterns of VideoLLMs in multi-choice VideoQA task through entropy and crossattention dynamics, we identify three distinct reasoning stages-shallow, intermediate, and deep stages-and the inefficiencies existing in these stages. To address these, we proposed DToMA, a training-free Dynamic Token Manipulation method in three aspects: text-guided keyframe-aware reorganization, uncertainty-based visual injection, and earlyexit pruning. Experiments on 6 long video benchmarks show that DToMA boosts both performance and efficiency, outperforms SOTA methods, and generalizes well across various VideoLLMs. In sum, DToMA offers a promising alternative to directly using the baseline, enabling superior long video understanding within reduced computational resources.
Acknowledgments
This work was supported by the National Natural Science Foundation of China under Grants 62325206 and 62301276, the Key Research and Development Program of Jiangsu Province under Grant BE2023016-4, and the Opening Foundation of the State Key Laboratory of Tibetan Intelligence, Key Laboratory of Tibetan Information Processing, Ministry of Education (2024-2-003).
@inproceedings{ijcai2025p258,
title = {DToMA: Training-free Dynamic Token MAnipulation for Long Video Understanding},
author = {Yuan, Bowen and You, Sisi and Bao, Bing-Kun},
booktitle = {Proceedings of the Thirty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-25}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {James Kwok},
pages = {2314--2322},
year = {2025},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2025/258},
url = {https://doi.org/10.24963/ijcai.2025/258},
}
TY - CPAPER TI - DToMA: Training-free Dynamic Token MAnipulation for Long Video Understanding AU - Yuan, Bowen AU - You, Sisi AU - Bao, Bing-Kun T2 - Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2025 SP - 2314 EP - 2322 DO - 10.24963/ijcai.2025/258 UR - https://doi.org/10.24963/ijcai.2025/258 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: