簡易檢索 / 詳目顯示

研究生: 陳冠鈞
Chen, Guan-Jun
論文名稱: 面向推理效率之問題類型感知訓練無關視覺 Token DCT 壓縮方法
Inference-Efficient Training-Free Visual Token Compression via Question-Type-Aware DCT
指導教授: 賴槿峰
Lai, Chin-Feng
學位類別: 碩士
Master
系所名稱: 工學院 - 工程科學系
Department of Engineering Science
論文出版年: 2026
畢業學年度: 114
語文別: 中文
論文頁數: 86
中文關鍵詞: 視覺語言模型視覺 Token 壓縮離散餘弦轉換問題類型感知路由LoRA 可恢復性
外文關鍵詞: Vision-Language Model, Visual Token Compression, Discrete Cosine Transform, Question-Aware Routing, LoRA Recoverability
相關次數: 點閱:89下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 視覺語言模型(VLM)的視覺 token 數量直接主導推理延遲與記憶體開銷,例如 LLaVA-1.5 的 CLIP 編碼器輸出 576 個 token、PaliGemma 的 SigLIP 編碼器輸出 1024 個 token,皆佔輸入序列 80% 以上。現有訓練無關壓縮方法多採固定全域壓縮率,未區分不同問題類型對視覺細節的依賴程度,例如是非類問題僅需全域語意,文字辨識類問題卻高度依賴高頻細節,固定壓縮率因此在不同問題上造成不必要的精度損失或 token 浪費。

    本研究提出 QRoute-DCT,一個訓練無關(training-free)、問題類型感知的離散餘弦轉換(DCT)視覺 token 壓縮框架。透過規則式問題路由器依問題類型查表決定保留係數 C,並以 2D DCT 對 CLIP/SigLIP 特徵空間的 patch grid 進行低頻保留壓縮,全程不修改任何模型權重,以 monkey-patch 方式整合進 PaliGemma-3B 與 LLaVA-1.5-7B 兩種架構。

    本研究確立三項主要結果:(1) 效率上,QRoute-DCT 於本文所比較的方法中位於精度與效率權衡的效率端,PaliGemma prefill 加速 2.71×(-63%)、LLaVA 2.39×(-58%),影像 KV cache 縮減 85%/73%,batch size 8 吞吐量提升 81%/91%;在相近 token 預算的比較下,於 CV-Bench 與 GQA 兩個資料集上同時取得優於 HiPrune 的精度與效率;此優勢範圍有明確邊界,若擴大至完整 7-benchmark suite(該比較之 DCT 欄為 static-C12 復現,非 QRoute-DCT),則 HiPrune 實際勝 5/7,並揭露對 FastV/FEATHER/DivPrune 之精度—速度取捨;上述實測加速有理論 FLOPs 上界作為佐證(6.5×/3.6×,Gemma-2B/LLaMA-7B,線性項主導);(2) 在 VQAv2 全量驗證集(214,354 樣本)上,1000-seed 隨機路由消融證實路由策略本身具統計顯著價值(OCR +17.95pp、Color +8.38pp),驗證問題感知配置、而非單純 token 數量帶來增益;(3) 以 LoRA 作為壓縮損失探針,Compression × LoRA-variant 消融網格顯示 DCT 造成的精度損失中 43–57% 可由輕量 PEFT(608K 參數、1.5 小時訓練)恢復,其中 QRoute-DCT 搭配 Multi-layer LoRA 達 81.93%(163 token),以少 36% 的 token 超越 token 預算較大之未訓練 Static C=16 配置(256 token, 81.12%)。

    此外,本研究透過固定方法、只改變視覺編碼器的控制實驗,發現頻域與注意力兩派壓縮方法的相對優劣會隨編碼器(SigLIP vs. CLIP)反轉,並於五個推理型資料集上刻畫出頻域方法於粗略場景推理佔優、於精確空間幾何任務居劣的邊界,作為本研究的延伸發現。

    整體而言,本研究提出一套訓練無關、即插即用、以推理效率為優先的問題類型感知視覺 token 壓縮框架,並透過 LoRA 探針與跨編碼器分析,為視覺壓縮方法的選擇與後續優化建立可驗證的依據。

    Vision-language models (VLMs) encode an image into hundreds to over a thousand visual tokens, which occupy more than 80% of the input sequence and dominate inference latency and memory cost. Existing training-free compression methods apply one fixed compression ratio to every question, although question types differ widely in how much visual detail they require. This thesis proposes QRoute-DCT, a training-free and question-type-aware compression framework. A rule-based router maps each question to a retention coefficient C through a lookup table, and a two-dimensional discrete cosine transform (DCT) keeps only the low-frequency block of the encoder patch grid, reducing the token count to C^2 without modifying any model weight. The method is integrated into PaliGemma-3B and LLaVA-1.5-7B by monkey-patching and evaluated on seven benchmarks. On the full VQAv2 validation set it reaches 77.26% with an average of 163 tokens; against a static baseline of comparable budget it improves OCR by 19.14 percentage points, color by 9.32 and spatial by 5.15, at the cost of 2.15 points on yes/no questions. Measured prefill latency drops by 2.71× and 2.39× on the two models, and image KV cache by 85% and 73%. A lightweight LoRA probe recovers 43–57% of the compression loss, indicating that roughly half of it stems from projector distribution mismatch rather than irreversible information loss.

    摘要 i 英文延伸摘要 iii Table of Contents viii List of Tables xi List of Figures xiii 第一章 緒論 1 1.1 視覺語言模型的推理成本問題 1 1.2 現有壓縮方法的缺口 1 1.3 研究目標與核心貢獻 2 1.4 論文架構 3 第二章 文獻探討 4 2.1 視覺語言模型架構與資料集 4 2.1.1 三段式範式與架構演進 4 2.1.2 投影層設計家族 4 2.1.3 VQA 評估資料集 5 2.2 視覺 Token 壓縮之三大方法家族 5 2.2.1 選擇式剪枝(Selective Pruning) 5 2.2.2 合併式(Merge-based) 6 2.2.3 頻域式(Frequency-based) 6 2.2.4 三大家族的效率與精度取捨 6 2.3 DCT 理論與頻域方法在深度學習中的應用 7 2.3.1 DCT 與影像壓縮工程背景 7 2.3.2 DCT 與 Karhunen-Loève 變換的關係 7 2.3.3 為何選擇 DCT,而非 FFT 或小波 7 2.3.4 頻域方法在深度學習中的應用 8 2.3.5 本研究在頻域方法中的定位 8 2.4 PEFT 與 LoRA 背景 9 2.4.1 PEFT 動機與分類 9 2.4.2 LoRA 與低秩假說 9 2.4.3 LoRA 變體 10 2.4.4 PEFT 在 VLM 上的應用 10 2.5 研究空缺與本研究定位 11 第三章 基於問題類型感知之 QRoute-DCT 壓縮方法 13 3.1 系統架構總覽 13 3.2 DCT 頻域壓縮引擎 15 3.2.1 DCT-II 數學基礎 15 3.2.2 CLIP/SigLIP 特徵空間的 DCT 壓縮 16 3.2.3 理論依據 17 3.3 問題類型路由器 18 3.3.1 問題分類策略 18 3.3.2 路由作為約束最佳化 19 3.3.3 C 值路由表設計 19 3.4 Monkey-Patch 整合機制 21 3.4.1 為何採用 Monkey-Patch 21 3.4.2 PaliGemma 整合細節 21 3.4.3 LLaVA 整合細節 21 3.4.4 統一介面設計 22 3.5 統一評估協定 22 第四章 主要準確率與跨基準泛化驗證 23 4.1 實驗設置 23 4.2 主要結果(PaliGemma 與 LLaVA 雙 backbone) 24 4.2.1 VQAv2 24 4.2.2 TextVQA 26 4.2.3 GQA 26 4.2.4 視覺編碼器架構對路由空間之影響 27 4.3 基於隨機路由消融之問題類型路由增益驗證 28 4.4 路由誤判之敏感度分析 30 4.5 跨基準泛化與外部方法對照 30 4.5.1 雙編碼器跨基準之綜合驗證結果 30 4.5.2 與外部方法於 CLIP 架構之精度與效率定位對照 32 4.5.3 頻域壓縮對高頻細節與全域推理之權衡效應 32 第五章 推理效率分析與部署收益評估 34 5.1 理論運算量與部署成本分析 34 5.2 對自身 baseline 的相對改善 36 5.3 與外部競品的 Pareto 前緣 40 5.4 與 HiPrune 比較結果的適用範圍 42 第六章 以 LoRA 作為壓縮損失探針之可恢復性分析 44 6.1 分佈失配與真實資訊損失之動機探討 44 6.2 保留係數與 LoRA 變體之二階消融網格分析 45 6.3 旗艦結果與恢復率 47 6.4 跨任務轉移行為 48 第七章 編碼器表徵幾何與壓縮策略之關聯性分析 50 7.1 跨編碼器策略優劣翻轉之現象觀察 50 7.2 機制假說與幾何指標之檢驗 51 7.2.1 兩派方法的成立前提與機制假說 51 7.2.2 指標推導與合理性 52 7.2.3 量測結果與檢驗 54 7.3 均勻覆蓋與注意力選擇之運算子分解分析 58 7.4 基於任務粒度之精細推理鏡像現象分析 60 7.5 小結與限制 60 第八章 討論與研究範圍 62 8.1 為何 Overall 增益小但 Per-Type 增益大 62 8.2 Training-Free 的代價與收益 62 8.3 跨任務泛化中的格式偏置 63 8.4 方法探索與範圍收斂 63 8.5 方法的適用範圍 64 第九章 結論與未來工作 65 9.1 結論 65 9.2 主要貢獻對應 66 9.3 未來工作方向 66 9.4 結語 67 參考文獻 68

    [1] Nasir Ahmed, T. Natarajan, and K. R. Rao. Discrete cosine transform. IEEE Transactions on Computers, C-23(1):90–93, 1974.

    [2] Anthropic. Claude 3.5 sonnet model card addendum. Technical report, 2024.

    [3] Jinze Bai, Shuai Bai, Shusheng Yang, Shijie Wang, Sinan Tan, Peng Wang, Junyang Lin, Chang Zhou, and Jingren Zhou. Qwen-VL: A versatile vision-language model for understanding, localization, text reading, and beyond. arXiv:2308.12966, 2023.

    [4] Lucas Beyer, Andreas Steiner, André Susano Pinto, Alexander Kolesnikov, Xiao Wang, Daniel Salz, Maxim Neumann, Ibrahim Alabdulmohsin, Michael Tschannen, Emanuele Bugliarello, et al. PaliGemma: A versatile 3b VLM for transfer. arXiv:2407.07726, 2024.

    [5] Daniel Bolya, Cheng-Yang Fu, Xiaoliang Dai, Peizhao Zhang, Christoph Feichtenhofer, and Judy Hoffman. Token merging: Your ViT but faster. In International Conference on Learning Representations (ICLR), 2023.

    [6] Mu Cai, Jianwei Yang, Jianfeng Gao, and Yong Jae Lee. Matryoshka multimodal models. In International Conference on Learning Representations (ICLR), 2025.

    [7] Liang Chen, Haozhe Zhao, Tianyu Liu, Shuai Bai, Junyang Lin, Chang Zhou, and Baobao Chang. FastV: An empirical study on eliminating redundant visual tokens in multimodal large language models. In European Conference on Computer Vision (ECCV), 2024.

    [8] Zhe Chen, Weiyun Wang, Hao Tian, Shenglong Ye, Zhangwei Gao, Erfei Cui, Wenwen Tong, Kongzhi Hu, Jiapeng Luo, Zheng Ma, et al. How far are we to GPT-4V? closing the gap to commercial multimodal models with open-source suites. Science China Information Sciences, 67(12):220101, 2024.

    [9] Wenliang Dai, Junnan Li, Dongxu Li, Anthony Meng Huat Tiong, Junqi Zhao, Weisheng Wang, Boyang Li, Pascale Fung, and Steven Hoi. InstructBLIP: Towards general-purpose vision-language models with instruction tuning. In Advances in Neural Information Processing Systems (NeurIPS), 2023.

    [10] Mark Endo, Xiaohan Wang, and Serena Yeung-Levy. Feather the throttle: Revisiting visual token pruning for vision-language model acceleration. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 22826–22835, 2025.

    [11] Gemini Team, Google DeepMind. Gemini: A family of highly capable multimodal models. arXiv:2312.11805, 2023.

    [12] Yash Goyal, Tejas Khot, Douglas Summers-Stay, Dhruv Batra, and Devi Parikh. Making the V in VQA matter: Elevating the role of image understanding in visual question answering. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017.

    [13] Xiaochuang Han, Ananya Kumar, Yulia Tsvetkov, and Marjan Ghazvininejad. JPEG-LM: Llms as image generators with canonical codec representations. arXiv:2408.08459, 2024.

    [14] Zeyu Han, Chao Gao, Jinyang Liu, Jeff Zhang, and Sai Qian Zhang. Parameter-efficient fine-tuning for large models: A comprehensive survey. Transactions on Machine Learning Research (TMLR), 2024.

    [15] Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin de Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. Parameter-efficient transfer learning for NLP. In Proceedings of the 36th International Conference on Machine Learning (ICML), 2019.

    [16] Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. In International Conference on Learning Representations (ICLR), 2022.

    [17] Wenbo Hu, Zi-Yi Chang, Yu-Chuan Liu, Yu-Sheng Hu, William Yang Wang, and Xin Eric Wang. Matryoshka query transformer for large vision-language models. In Advances in Neural Information Processing Systems (NeurIPS), volume 37, pages 50168–50188, 2024.

    [18] Drew A. Hudson and Christopher D. Manning. GQA: A new dataset for real-world visual reasoning and compositional question answering. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019.

    [19] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc V. Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In Proceedings of the 38th International Conference on Machine Learning (ICML), 2021.

    [20] Wonjae Kim, Bokyung Son, and Ildoo Kim. Vilt: Vision-and-language transformer without convolution or region supervision. In Proceedings of the 38th International Conference on Machine Learning (ICML), 2021.

    [21] James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, and Santiago Ontanon. FNet: Mixing tokens with fourier transforms. In Proceedings of the Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), 2022.

    [22] Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In Proceedings of the Conference on Empirical Methods in Natural Language Processing (EMNLP), 2021.

    [23] Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. BLIP-2: Bootstrapping language-image pre-training with frozen image encoders and large language models. In Proceedings of the 40th International Conference on Machine Learning (ICML), 2023.

    [24] Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. BLIP: Bootstrapping language-image pre-training for unified vision-language understanding and generation. In Proceedings of the 39th International Conference on Machine Learning (ICML), 2022.

    [25] Shuai Li, Jian Xu, Xiao-Hui Li, Chao Deng, and Lin-Lin Huang. QG-VTC: Question-guided visual token compression in MLLMs for efficient VQA. arXiv:2504.00654, 2025.

    [26] Wentong Li, Yuqian Yuan, Jian Liu, Dongqi Tang, Song Wang, Jianke Zhu, and Lei Zhang. TokenPacker: Efficient visual projector for multimodal LLM. International Journal of Computer Vision, 133(10):6794–6812, 2025.

    [27] Zhihang Lin, Mingbao Lin, Luxi Lin, and Rongrong Ji. Boosting multimodal large language models with visual tokens withdrawal for rapid inference. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), volume 39, pages 5334–5342, 2025.

    [28] Haotian Liu, Chunyuan Li, Yuheng Li, and Yong Jae Lee. Improved baselines with visual instruction tuning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 26296–26306, 2024.

    [29] Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan Zhang, Sheng Shen, and Yong Jae Lee. LLaVA-NeXT: Improved reasoning, OCR, and world knowledge. Blog post, https://llava-vl.github.io/blog/2024-01-30-llava-next/, 2024.

    [30] Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. In Advances in Neural Information Processing Systems (NeurIPS), 2023.

    [31] Jizhihui Liu, Feiyi Du, Guangdao Zhu, Niu Lian, Jun Li, and Bin Chen. HiPrune: Training-free visual token pruning via hierarchical attention in vision-language models. arXiv:2508.00553, 2025.

    [32] Shih-Yang Liu, Chien-Yi Wang, Hongxu Yin, Pavlo Molchanov, Yu-Chiang Frank Wang, Kwang-Ting Cheng, and Min-Hung Chen. DoRA: Weight-decomposed low-rank adaptation. In Proceedings of the 41st International Conference on Machine Learning (ICML), 2024.

    [33] OpenAI. GPT-4V(ision) system card. Technical report, 2023.

    [34] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Proceedings of the 38th International Conference on Machine Learning (ICML), 2021.

    [35] Saeed Ranjbar Alvar, Gursimran Singh, Mohammad Akbari, and Yong Zhang. DivPrune: Diversity-based visual token pruning for large multimodal models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9392–9401, 2025.

    [36] Yongming Rao, Wenliang Zhao, Zheng Zhu, Jiwen Lu, and Jie Zhou. GFNet: Global filter networks for visual recognition. In Advances in Neural Information Processing Systems (NeurIPS), 2021.

    [37] Olivier Roy and Martin Vetterli. The effective rank: A measure of effective dimensionality. In Proc. European Signal Processing Conference (EUSIPCO), 2007.

    [38] Yuzhang Shang, Mu Cai, Bingxin Xu, Yong Jae Lee, and Yan Yan. LLaVA-PruMerge: Adaptive token reduction for efficient large multimodal models. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 22857–22867, 2025.

    [39] Amanpreet Singh, Vivek Natarajan, Meet Shah, Yu Jiang, Xinlei Chen, Dhruv Batra, Devi Parikh, and Marcus Rohrbach. Towards VQA models that can read. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2019.

    [40] Huanyu Wang, Jushi Kai, Haoli Bai, Lu Hou, Bo Jiang, Ziwei He, and Zhouhan Lin. Fourier-VLM: Compressing vision tokens in the frequency domain for large vision-language models. arXiv:2508.06038v2, 2025.

    [41] Peng Wang, Shuai Bai, Sinan Tan, Shijie Wang, Zhihao Fan, Jinze Bai, Keqin Chen, Xuejing Liu, Jialin Wang, Wenbin Ge, Yang Fan, Kai Dang, Mengfei Du, Xuancheng Ren, Rui Men, Dayiheng Liu, Chang Zhou, Jingren Zhou, and Junyang Lin. Qwen2-VL: Enhancing vision-language model's perception of the world at any resolution. arXiv:2409.12191, 2024.

    [42] Senqiao Yang, Yukang Chen, Zhuotao Tian, Chengyao Wang, Jingyao Li, Bei Yu, and Jiaya Jia. VisionZip: Longer is better but not necessary in vision language models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 19792–19802, 2025.

    [43] Qizhe Zhang, Aosong Cheng, Ming Lu, Renrui Zhang, Zhiyong Zhuo, Jiajun Cao, Shaobo Guo, Qi She, and Shanghang Zhang. Beyond text-visual attention: Exploiting visual cues for effective token pruning in VLMs. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 20857–20867, 2025.

    [44] Shaolei Zhang, Qingkai Fang, Zhe Yang, and Yang Feng. LLaVA-Mini: Efficient image and video large multimodal models with one vision token. In International Conference on Learning Representations (ICLR), 2025.

    [45] Deyao Zhu, Jun Chen, Xiaoqian Shen, Xiang Li, and Mohamed Elhoseiny. MiniGPT-4: Enhancing vision-language understanding with advanced large language models. In International Conference on Learning Representations (ICLR), 2024.

    下載圖示
    校外:立即公開
    QR CODE