Towards Truly Zero-shot Compositional Visual Reasoning with LLMs as Programmers
Aleksandar Stanić, Sergi Caelles, Michael Tschannen
TL;DR
The paper tackles the challenge of compositional visual reasoning by shifting from monolithic end-to-end models to LLMs that program visual tools. It introduces an Abstract API with spatially/temporally abstract routines, automatic generation of in-context examples (ACEs) from a small labeled set, and self-correction mechanisms (self-debugging and self-tuning) to reduce human engineering and enable near zero-shot performance. Across four datasets—RefCOCO, RefCOCO+, GQA, and NExT-QA—it demonstrates consistent gains from the Abstract API and ACEs, with self-tuning delivering additional improvements and self-debugging providing mixed results. The work suggests that combining structured tool use with automated example generation and adaptive correction can significantly improve robustness and generalization in visual reasoning tasks, moving closer to truly zero-shot compositional reasoning in real-world settings.
Abstract
Visual reasoning is dominated by end-to-end neural networks scaled to billions of model parameters and training examples. However, even the largest models struggle with compositional reasoning, generalization, fine-grained spatial and temporal reasoning, and counting. Visual reasoning with large language models (LLMs) as controllers can, in principle, address these limitations by decomposing the task and solving subtasks by orchestrating a set of (visual) tools. Recently, these models achieved great performance on tasks such as compositional visual question answering, visual grounding, and video temporal reasoning. Nevertheless, in their current form, these models heavily rely on human engineering of in-context examples in the prompt, which are often dataset- and task-specific and require significant labor by highly skilled programmers. In this work, we present a framework that mitigates these issues by introducing spatially and temporally abstract routines and by leveraging a small number of labeled examples to automatically generate in-context examples, thereby avoiding human-created in-context examples. On a number of visual reasoning tasks, we show that our framework leads to consistent gains in performance, makes LLMs as controllers setup more robust, and removes the need for human engineering of in-context examples.
