Pyramid Coder: Hierarchical Code Generator for Compositional Visual Question Answering
Ruoyue Shen, Nakamasa Inoue, Koichi Shinoda

TL;DR
PyramidCoder is a hierarchical prompting framework for programmatic visual question answering that improves accuracy across multiple datasets without additional training by structuring the reasoning process into three levels.
Contribution
It introduces a novel three-level prompting framework for PVQA that leverages a single frozen LLM, enhancing flexibility and accuracy without extra training.
Findings
Achieves at least 0.5% accuracy improvement on GQA dataset.
Achieves 1.4% accuracy improvement on VQAv2 dataset.
Achieves 2.9% accuracy improvement on NLVR2 dataset.
Abstract
Visual question answering (VQA) is the task of providing accurate answers to natural language questions based on visual input. Programmatic VQA (PVQA) models have been gaining attention recently. These use large language models (LLMs) to formulate executable programs that address questions requiring complex visual reasoning. However, there are challenges in enabling LLMs to comprehend the usage of image processing modules and generate relevant code. To overcome these challenges, this paper introduces PyramidCoder, a novel prompting framework for PVQA models. PyramidCoder consists of three hierarchical levels, each serving a distinct purpose: query rephrasing, code generation, and answer aggregation. Notably, PyramidCoder utilizes a single frozen LLM and pre-defined prompts at each level, eliminating the need for additional training and ensuring flexibility across various LLM…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced Image and Video Retrieval Techniques · Multimodal Machine Learning Applications · Image Retrieval and Classification Techniques
MethodsSoftmax · Attention Is All You Need
