Introduction
Visual reasoning—the capacity to answer complex queries about images or manipulate visual content based on natural language instructions—demands a sophisticated interplay between perception and logic. Recent neuro-symbolic frameworks have attempted to bridge this gap by using Large Language Models (LLMs) to translate natural language into executable programs that invoke specialized vision modules. However, these approaches often suffer from two primary limitations: rigidity and inefficiency.
Models such as VisProg are constrained by a fixed, manually curated library of modules, failing when a task requires a novel skill. Conversely, models like ViperGPT generate entirely new code for every query, which is computationally wasteful and prone to unverified bugs. To address these challenges, we introduce GENOME (GenerativE Neuro-symbOlic visual reasoning by growing and reusing ModulEs), a framework that enables LLMs to autonomously create, verify, and reuse Python-based modules.
The GENOME Framework
GENOME mimics human skill acquisition through a structured three-stage pipeline: initialization, generation with verification, and execution.
1. Module Initialization
When presented with a novel task, the LLM first assesses its existing module library. If the current tools are insufficient to handle the specific logic of the query, the LLM defines a "module signature"—specifying the necessary inputs and outputs for a new, general-purpose module (e.g., COMPARE_ATTRIBUTE).
2. Module Generation and Verification
The LLM then generates the Python implementation for the new module. A critical innovation in GENOME is the use of "unit testing." The system utilizes a small set of training examples to verify the generated code. If the module fails to produce the correct output or encounters an error, the LLM enters a debugging loop. Only modules that successfully pass these tests are integrated into the permanent Scalable Module Library.
3. Module Execution
During the inference phase, the LLM parses the user's query into a high-level program that calls upon the validated modules in the library. These programs are executed to yield the final result, whether it be a textual answer or an edited image.
Experimental Evaluation
The effectiveness of GENOME was evaluated across six diverse visual reasoning tasks, ranging from standard benchmarks to abstract reasoning.
- Standard Benchmarks: On GQA (compositional VQA) and RefCOCO (referring expression comprehension), GENOME achieved performance competitive with specialized, state-of-the-art models, recording an accuracy of 45.6 on GQA.
- Transfer Learning: To test the portability of learned modules, the authors evaluated GENOME on Image Editing and Knowledge Tagging. In Image Editing, GENOME achieved 55.3% accuracy, significantly outperforming VisProg's 16.7%. This demonstrates that modules learned for one task (e.g., VQA) can be seamlessly repurposed for others (e.g., editing).
- Abstract Reasoning: On the Raven Progressive Matrices task, GENOME reached 80.1% accuracy using only a few-shot training setup. This performance approaches human-level benchmarks (95.5%) and surpasses many fully-supervised neural architectures.
Key Insights
GENOME highlights the power of abstraction and verification in neuro-symbolic AI. By treating training data as a software test suite, the model ensures its learned "knowledge" is functional and robust. Furthermore, the creation of general-purpose symbolic modules avoids the "re-inventing the wheel" problem, making the reasoning process transparent, debuggable, and highly transferable across domains.
Conclusion and Future Directions
GENOME represents a significant advancement in autonomous visual reasoning. While highly effective, the framework currently relies on task-specific prompts and the coding proficiency of the underlying LLM. Future work will explore the development of "universal prompts" and the expansion of the framework to multi-modal inputs, including audio and video, to create even more versatile reasoning agents.
Summary updated