English

Modular Visual Question Answering via Code Generation

Computation and Language 2023-06-09 v1

Abstract

We present a framework that formulates visual question answering as modular code generation. In contrast to prior work on modular approaches to VQA, our approach requires no additional training and relies on pre-trained language models (LMs), visual models pre-trained on image-caption pairs, and fifty VQA examples used for in-context learning. The generated Python programs invoke and compose the outputs of the visual models using arithmetic and conditional logic. Our approach improves accuracy on the COVR dataset by at least 3% and on the GQA dataset by roughly 2% compared to the few-shot baseline that does not employ code generation.

Keywords

Cite

@article{arxiv.2306.05392,
  title  = {Modular Visual Question Answering via Code Generation},
  author = {Sanjay Subramanian and Medhini Narasimhan and Kushal Khangaonkar and Kevin Yang and Arsha Nagrani and Cordelia Schmid and Andy Zeng and Trevor Darrell and Dan Klein},
  journal= {arXiv preprint arXiv:2306.05392},
  year   = {2023}
}

Comments

ACL 2023