{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2512-06866","title":"Less Is More, but Where? Dynamic Token Compression via LLM-Guided Keyframe Prior","arxiv_id":"2512.06866","date":"2025-12-07","proceeding":"NeurIPS","authors":["Yulin Li","Haokun Gui","Ziyang Fan","Junjie Wang","Bin Kang","Bin Chen","Zhuotao Tian"],"abstract":"Recent advances in Video Large Language Models (VLLMs) have achieved remarkable video understanding capabilities, yet face critical efficiency bottlenecks due to quadratic computational growth with lengthy visual token sequences of long videos. While existing keyframe sampling methods can improve temporal modeling efficiency, additional computational cost is introduced before feature encoding, and the binary frame selection paradigm is found suboptimal. Therefore, in this work, we propose Dynamic Token compression via LLM-guided Keyframe prior (DyToK), a training-free paradigm that enables dynamic token compression by harnessing VLLMs' inherent attention mechanisms. Our analysis reveals that VLLM attention layers naturally encoding query-conditioned keyframe priors, by which DyToK dynamically adjusts per-frame token retention ratios, prioritizing semantically rich frames while suppressing redundancies. Extensive experiments demonstrate that DyToK achieves state-of-the-art efficiency-accuracy tradeoffs. DyToK shows plug-and-play compatibility with existing compression methods, such as VisionZip and FastV, attaining 4.3x faster inference while preserving accuracy across multiple VLLMs, such as LLaVA-OneVision and Qwen2.5-VL. Code is available at https://github.com/yu-lin-li/DyToK .","url_abs":"https://arxiv.org/abs/2512.06866","url_pdf":"https://arxiv.org/pdf/2512.06866","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2512.06866","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2512.06866"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/yu-lin-li/DyToK","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":5,"ran_draft_wrong":2,"unverified":8},"by_repo_kind":{"found_in_text":{"samples":15,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"57e732507bad40db","entry":"escaped_split","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"eval/lmms_eval/utils.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/eval/lmms_eval/utils.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"57e732507bad40db"}},{"code_sha256_prefix":"00f5e7d9ee6636ba","entry":"get_sample_size","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"eval/lmms_eval/evaluator_utils.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/eval/lmms_eval/evaluator_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"00f5e7d9ee6636ba"}},{"code_sha256_prefix":"20a7cc804eb22661","entry":"hash_args","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"eval/lmms_eval/api/model.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/eval/lmms_eval/api/model.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"20a7cc804eb22661"}},{"code_sha256_prefix":"1fddd33683ef553c","entry":"hash_string","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"eval/lmms_eval/utils.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/eval/lmms_eval/utils.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1fddd33683ef553c"}},{"code_sha256_prefix":"ae00474f91be5441","entry":"is_json","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"eval/lmms_eval/utils.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/eval/lmms_eval/utils.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ae00474f91be5441"}},{"code_sha256_prefix":"74386ef186ff5c64","entry":"remove_none_pattern","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"eval/lmms_eval/logging_utils.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/eval/lmms_eval/logging_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"74386ef186ff5c64"}},{"code_sha256_prefix":"c44830a7722ff5f7","entry":"request_caching_arg_to_dict","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"eval/lmms_eval/evaluator.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/eval/lmms_eval/evaluator.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c44830a7722ff5f7"}},{"code_sha256_prefix":"2d39981ff01054c0","entry":"Qwen2Attention_forward","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"dytok/visionzip/modeling_qwen2.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/dytok/visionzip/modeling_qwen2.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2d39981ff01054c0"}},{"code_sha256_prefix":"b2e11b191bfb220f","entry":"SigLipAttention_forward","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"dytok/visionzip/siglip_encoder.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/dytok/visionzip/siglip_encoder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b2e11b191bfb220f"}},{"code_sha256_prefix":"105d4beb9639b79b","entry":"SigLipVisionTower_forward","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"dytok/visionzip/siglip_encoder.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/dytok/visionzip/siglip_encoder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"105d4beb9639b79b"}},{"code_sha256_prefix":"2aa9dea2423043fa","entry":"SigLip_EncoderLayer_forward","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"dytok/visionzip/siglip_encoder.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/dytok/visionzip/siglip_encoder.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2aa9dea2423043fa"}},{"code_sha256_prefix":"089d3de5fd9f5bee","entry":"encode_images_visionzip","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"dytok/visionzip/llava_arch.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/dytok/visionzip/llava_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"089d3de5fd9f5bee"}},{"code_sha256_prefix":"727a5334cd53d7ae","entry":"encode_images_visionzip_multi","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"dytok/visionzip/llava_arch.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/dytok/visionzip/llava_arch.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"727a5334cd53d7ae"}},{"code_sha256_prefix":"80648f1bef493fe4","entry":"generate_static","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"dytok/visionzip/utils.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/dytok/visionzip/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"80648f1bef493fe4"}},{"code_sha256_prefix":"be9ad8c0e6b90e15","entry":"validate_inputs","repo":"yu-lin-li/DyToK","repo_kind":"found_in_text","path":"dytok/visionzip/utils.py","file_url":"https://github.com/yu-lin-li/DyToK/blob/HEAD/dytok/visionzip/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"be9ad8c0e6b90e15"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CV","source":"arxiv_api"},"syntology_extracted_results":null}