Lune

CVPR2023Top-tier venue

Visual Programming: Compositional visual reasoning without training

Tanmay Gupta, Aniruddha Kembhavi

Abstract

Abstract We present VISPROG, a neuro-symbolic approach to solving complex and compositional visual tasks given natural language instructions. VISPROG avoids the need for any task-specific training. Instead, it uses the incontext learning ability of large language models to generate python-like modular programs, which are then executed to get both the solution and a comprehensive and interpretable rationale. Each line of the generated program may invoke one of several off-the-shelf computer vision models, image processing subroutines, or python functions to produce intermediate outputs that may be consumed by subsequent parts of the program. We demonstrate the flexibility of VISPROG on 4 diverse tasks -compositional visual question answering, zero-shot reasoning on image pairs, factual knowledge object tagging, and language-guided image editing. We believe neuro-symbolic approaches like VISPROG are an exciting avenue to easily and effectively expand the scope of AI systems to serve the long tail of complex tasks that people may wish to perform.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

240 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • ViperGPT: Visual Inference via Python Execution for Reasoning cites Learning Transferable Visual Models From Natural Language Supervision
  • ViperGPT: Visual Inference via Python Execution for Reasoning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • ViperGPT: Visual Inference via Python Execution for Reasoning cites Flamingo: a Visual Language Model for Few-Shot Learning
  • Visual Instruction Tuning cites High-Resolution Image Synthesis with Latent Diffusion Models
  • Visual Instruction Tuning cites ViperGPT: Visual Inference via Python Execution for Reasoning
  • Visual Instruction Tuning cites Language Models are Few-Shot Learners
  • Visual Instruction Tuning cites Learning Transferable Visual Models From Natural Language Supervision
  • Visual Instruction Tuning cites Flamingo: a Visual Language Model for Few-Shot Learning
  • ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs cites HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face
  • ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • Learning Transferable Visual Models From Natural Language Supervision cites Language Models are Few-Shot Learners
  • HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face cites ViperGPT: Visual Inference via Python Execution for Reasoning
  • HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face cites Language Models are Few-Shot Learners
  • HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging Face cites Flamingo: a Visual Language Model for Few-Shot Learning
  • Flamingo: a Visual Language Model for Few-Shot Learning cites Language Models are Few-Shot Learners
  • Flamingo: a Visual Language Model for Few-Shot Learning cites Learning Transferable Visual Models From Natural Language Supervision
  • Chameleon: Plug-and-Play Compositional Reasoning with Large Language Models cites ViperGPT: Visual Inference via Python Execution for Reasoning
  • Chameleon: Plug-and-Play Compositional Reasoning with Large Language Models cites Language Models are Few-Shot Learners
  • Chameleon: Plug-and-Play Compositional Reasoning with Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers240

  1. Visual Instruction TuningHaotian Liu, Chunyuan Li, Qingyang Wu, Yong Jae LeeNeurIPS 2023 · 11,349 citations
  2. HuggingGPT: Solving AI Tasks with ChatGPT and its Friends in Hugging FaceYongliang Shen, Kaitao Song, Xu Tan, Dongsheng Li et al.NeurIPS 2023 · 1,778 citations
  3. ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIsYujia Qin, Shihao Liang, Yining Ye, Kunlun Zhu et al.ICLR 2024 · 1,469 citations
  4. ViperGPT: Visual Inference via Python Execution for ReasoningDídac Surís, Sachit Menon, Carl VondrickICCV 2023 · 732 citations
  5. Chameleon: Plug-and-Play Compositional Reasoning with Large Language ModelsPan Lu, Baolin Peng, Hao Cheng, Michel Galley et al.NeurIPS 2023 · 515 citations

Builds on13

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  3. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  4. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser et al.CVPR 2022 · 13,123 citations
  5. Flamingo: a Visual Language Model for Few-Shot LearningJean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech et al.NeurIPS 2022 · 6,707 citations

Related papers

  1. Synthesizing Visual Concepts as Vision-Language ProgramsAntonia Wüst, Wolfgang Stammer, Hikaru Shindo, Lukas Helff et al.CVPR 2026 · 6 citations
  2. NePTune: A Neuro-Pythonic Framework for Tunable Compositional Reasoning on Vision-LanguageDanial Kamali, Parisa KordjamshidiICLR 2026 · 10 citations
  3. GENOME: Generative Neuro-Symbolic Visual Reasoning by Growing and Reusing ModulesZhenfang Chen, Rui Sun, Wenjun Liu, Yining Hong et al.ICLR 2024 · 24 citations
  4. NeSyCoCo: A Neuro-Symbolic Concept Composer for Compositional GeneralizationDanial Kamali, Elham J. Barezi, Parisa KordjamshidiAAAI 2025 · 4 citations
  5. VIRO: Robust and Efficient Neuro-Symbolic Reasoning with Verification for Referring Expression ComprehensionHyejin Park, Junhyuk Kwon, Suha Kwak, Jungseul OkCVPR 2026 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines