mlsanityData to 7 Oct 2026

AdaCoder: Adaptive Prompt Compression for Programmatic Visual Question Answering

arXiv 2407.19410 ↗First posted 28 Jul 2024cs.AI cs.CV cs.MMcited by 1

On the map: Efficient LLM inference and serving → Prompt and context compression

Abstract (arXiv)

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.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Prompt and context compression, one of 12 directions in Efficient LLM inference and serving. Builds on 23 of its 48 references that are in the map. First posted on arXiv 28 Jul 2024.

Builds on

23 of 48 references.

Closest ancestors · 2

Same direction, newest first

  1. 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compression19 Mar
  2. 2022Prompt Compression and Contrastive Conditioning for Controllability and Toxicity Reduction in Language Models6 Oct

Other references · 21

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  3. 2016Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answeringcited by 2,498
  4. 2015VQA: Visual Question Answeringcited by 2,489
  5. 2023Code Llama: Open Foundation Models for Codecited by 2,105
  6. 2016Modeling Context in Referring Expressionscited by 1,054
  7. 2022Token Merging: Your ViT But Fastercited by 995
  8. 2023MagicBrush: A Manually Annotated Dataset for Instruction-Guided Image Editingcited by 615
  9. 2023ViperGPT: Visual Inference via Python Execution for Reasoningcited by 591
  10. 2024BLINK: Multimodal Large Language Models Can See but Not Perceivecited by 529
  11. 2022Visual Programming: Compositional visual reasoning without trainingcited by 507
  12. 2023Adapting Language Models to Compress Contextscited by 350
9 more
  1. 2023LLMLingua: Compressing Prompts for Accelerated Inference of Large Language Modelscited by 279
  2. 2015Stacked Attention Networks for Image Question Answeringcited by 273
  3. 2021Learned Token Pruning for Transformerscited by 138
  4. 2020Length-Adaptive Transformer: Train Once with Length Drop, Use Anytime with Searchcited by 76
  5. 2015Ask Your Neurons: A Neural-based Approach to Answering Questions about Imagescited by 51
  6. 2023Modular Visual Question Answering via Code Generationcited by 47
  7. 2023Tab-CoT: Zero-shot Tabular Chain of Thoughtcited by 42
  8. 2023Improving Zero-shot Visual Question Answering via Large Language Models with Reasoning Question Promptscited by 19
  9. 2022Extensible Prompts for Language Models on Zero-shot Language Style Customizationcited by 6

Built on by

Cited by year

Citing papers per year: 2024: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2024Pyramid Coder: Hierarchical Code Generator for Compositional Visual Question Answering
  2. 2025AVAM: Universal Training-free Adaptive Visual Anchoring Embedded into Multimodal Large Language Model for Multi-image Question Answering
  3. 2024Learning to Compress Contexts for Efficient Knowledge-based Visual Question Answering
  4. 2024Efficient Large Multi-modal Models via Visual Context Compression
  5. 2024Rationale-guided Prompting for Knowledge-based Visual Question Answering
  6. 2023Prophet: Prompting Large Language Models with Complementary Answer Heuristics for Knowledge-based Visual Question Answering
  7. 2026Rethinking Token Reduction for Large Vision-Language Models
  8. 2025CATCH: A Modular Cross-domain Adaptive Template with Hook