{"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/longvu-spatiotemporal-adaptive-compression","title":"LongVU: Spatiotemporal Adaptive Compression for Long Video-Language Understanding","arxiv_id":"2410.17434","date":"2024-10-22","proceeding":null,"authors":["Xiaoqian Shen","Yunyang Xiong","Changsheng Zhao","Lemeng Wu","Jun Chen","Chenchen Zhu","Zechun Liu","Fanyi Xiao","Balakrishnan Varadarajan","Florian Bordes","Zhuang Liu","Hu Xu","Hyunwoo J. Kim","Bilge Soran","Raghuraman Krishnamoorthi","Mohamed Elhoseiny","Vikas Chandra"],"abstract":"Multimodal Large Language Models (MLLMs) have shown promising progress in understanding and analyzing video content. However, processing long videos remains a significant challenge constrained by LLM's context size. To address this limitation, we propose LongVU, a spatiotemporal adaptive compression mechanism thats reduces the number of video tokens while preserving visual details of long videos. Our idea is based on leveraging cross-modal query and inter-frame dependencies to adaptively reduce temporal and spatial redundancy in videos. Specifically, we leverage DINOv2 features to remove redundant frames that exhibit high similarity. Then we utilize text-guided cross-modal query for selective frame feature reduction. Further, we perform spatial token reduction across frames based on their temporal dependencies. Our adaptive compression strategy effectively processes a large number of frames with little visual information loss within given context length. Our LongVU consistently surpass existing methods across a variety of video understanding benchmarks, especially on hour-long video understanding tasks such as VideoMME and MLVU. Given a light-weight LLM, our LongVU also scales effectively into a smaller size with state-of-the-art video understanding performance.","url_abs":"https://arxiv.org/abs/2410.17434v1","url_pdf":"https://arxiv.org/pdf/2410.17434v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"longvu-spatiotemporal-adaptive-compression","repo_url":"https://github.com/Vision-CAIR/LongVU","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"token-reduction","task_name":"Token Reduction"},{"task_slug":"video-question-answering","task_name":"Video Question Answering"},{"task_slug":"video-understanding","task_name":"Video Understanding"},{"task_slug":"zeroshot-video-question-answer","task_name":"Zero-Shot Video Question Answer"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/video-question-answering-on-mvbench","task":"Video Question Answering","dataset":"MVBench","model":"LongVU (7B)","rank_in_archive_order":4,"of":22,"metrics":{"Avg.":"66.9"},"uses_additional_data":false},{"leaderboard":"/sota/zero-shot-video-question-answer-on-egoschema-1","task":"Zero-Shot Video Question Answer","dataset":"EgoSchema (fullset)","model":"LongVU (7B)","rank_in_archive_order":4,"of":29,"metrics":{"Accuracy":"67.6"},"uses_additional_data":false},{"leaderboard":"/sota/zero-shot-video-question-answer-on-video-mme-1","task":"Zero-Shot Video Question Answer","dataset":"Video-MME","model":"LongVU (7B)","rank_in_archive_order":10,"of":11,"metrics":{"Accuracy (%)":"60.6"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.17434","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.17434"}},"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":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Vision-CAIR/LongVU","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":1,"ran_draft_wrong":1,"ran_fixture":4,"unverified":5},"by_repo_kind":{"official":{"samples":11,"ran":6,"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":"7e03b180fa317c9a","entry":"divide_to_patches","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_utils.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_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":"7e03b180fa317c9a"}},{"code_sha256_prefix":"c774723322f1f9c6","entry":"find_all_linear_names","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_datautils.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_datautils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c774723322f1f9c6"}},{"code_sha256_prefix":"3999ff487573f32c","entry":"select_best_resolution","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_utils.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3999ff487573f32c"}},{"code_sha256_prefix":"10893c4608c08075","entry":"split_to_even_chunks","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_trainer.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_trainer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"10893c4608c08075"}},{"code_sha256_prefix":"fd89ea82cae32f5d","entry":"unmask_attention_mask","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/cambrian_arch.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/cambrian_arch.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fd89ea82cae32f5d"}},{"code_sha256_prefix":"83d2977826140fdc","entry":"unpad_image","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/cambrian_arch.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/cambrian_arch.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"83d2977826140fdc"}},{"code_sha256_prefix":"fac53f6bae1b69a4","entry":"get_length_grouped_indices","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_trainer.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_trainer.py","link_basis":"harvester_set","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":"fac53f6bae1b69a4"}},{"code_sha256_prefix":"2ed115fa11e791e8","entry":"get_mm_adapter_state_maybe_zero_3","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_datautils.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_datautils.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":"2ed115fa11e791e8"}},{"code_sha256_prefix":"704c4eee7dd02a27","entry":"get_modality_length_grouped_indices","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_trainer.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_trainer.py","link_basis":"harvester_set","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":"704c4eee7dd02a27"}},{"code_sha256_prefix":"25aaa1a93cc25f4d","entry":"maybe_zero_3","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_datautils.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_datautils.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":"25aaa1a93cc25f4d"}},{"code_sha256_prefix":"d964d4c8ae68d31b","entry":"resize_and_pad_image","repo":"Vision-CAIR/LongVU","repo_kind":"official","path":"longvu/mm_utils.py","file_url":"https://github.com/Vision-CAIR/LongVU/blob/HEAD/longvu/mm_utils.py","link_basis":"harvester_set","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":"d964d4c8ae68d31b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}