AdaCoder: Adaptive Prompt Compression for Programmatic Visual Question Answering
Mahiro Ukai, Shuhei Kurita, Atsushi Hashimoto, Yoshitaka Ushiku, Nakamasa Inoue
摘要
Visual question answering aims to provide responses to natural language questions given visual input. Recently, visual programmatic models (VPMs), which generate executable programs to answer questions through large language models (LLMs), have attracted research interest. However, they often require long input prompts to provide the LLM with sufficient API usage details to generate relevant code. To address this limitation, we propose AdaCoder, an adaptive prompt compression framework for VPMs. AdaCoder operates in two phases: a compression phase and an inference phase. In the compression phase, given a preprompt that describes all API definitions in the Python language with example snippets of code, a set of compressed preprompts is generated, each depending on a specific question type. In the inference phase, given an input question, AdaCoder predicts the question type and chooses the appropriate corresponding compressed preprompt to generate code to answer the question. Notably, AdaCoder employs a single frozen LLM and pre-defined prompts, negating the necessity of additional training and maintaining adaptability across different powerful black-box LLMs such as GPT and Claude. In experiments, we apply AdaCoder to ViperGPT and demonstrate that it reduces token length by 71.1%, while maintaining or even improving the performance of visual question answering.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 1 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Learning to Compress Prompts with Gist Tokens 引用了 Language Models are Few-Shot Learners
- ViUniT: Visual Unit Tests for More Robust Visual Programming 引用了 ViperGPT: Visual Inference via Python Execution for Reasoning
- ViUniT: Visual Unit Tests for More Robust Visual Programming 引用了 Language Models are Few-Shot Learners
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models 引用了 Language Models are Few-Shot Learners
引用它的顶会 Paper1
它引用的 Paper23
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran 等NeurIPS 2023 · 5,068 次引用
- ViperGPT: Visual Inference via Python Execution for ReasoningDídac Surís, Sachit Menon, Carl VondrickICCV 2023 · 732 次引用
- Learning to Compress Prompts with Gist TokensJesse Mu, Xiang Li, Noah D. GoodmanNeurIPS 2023 · 488 次引用
- PoWER-BERT: Accelerating BERT Inference via Progressive Word-vector EliminationSaurabh Goyal, Anamitra Roy Choudhury, Saurabh Raje, Venkatesan T. Chakaravarthy 等ICML 2020 · 260 次引用
相关 Paper
- Visual Program Distillation with Template-Based AugmentationMichal Shlapentokh-Rothman, Yu-Xiong Wang, Derek HoiemEMNLP Findings 2025 · 1 次引用
- PropTest: Automatic Property Testing for Improved Visual ProgrammingJaywon Koo, Ziyan Yang, Paola Cascante-Bonilla, Baishakhi Ray 等EMNLP Findings 2024 · 1 次引用
- Inference Optimal VLMs Need Fewer Visual Tokens and More ParametersKevin Y. Li, Sachin Goyal, João D. Semedo, J. Zico KolterICLR 2025
- D-CoDe: Scaling Image-Pretrained VLMs to Video via Dynamic Compression and Question DecompositionYiyang Huang, Yizhou Wang, Yun FuEMNLP 2025
- Analyzing Modular Approaches for Visual Question DecompositionApoorv Khandelwal, Ellie Pavlick, Chen SunEMNLP 2023 · 2 次引用
