Abstract
Modern Vision-Language Models (VLMs) often struggle with complex, multi-step reasoning in specialized domains like chart interpretation. We present a "self-play" framework that enables VLMs to autonomously improve their reasoning capabilities. By treating a training dataset as an active environment, the model generates code-based reasoning chains, executes them in a runtime, and iteratively refines its logic against ground-truth labels. This process produces high-quality few-shot examples that significantly enhance performance on challenging benchmarks like ChartQA and PlotQA.
Introduction
While models like Gemini 1.5 and GPT-4o excel at general tasks, scientific chart reasoning remains a bottleneck. Standard few-shot prompting often fails when the model has already seen the data during pre-training, and existing auto-prompting frameworks can struggle with the brittle nature of code generation. The core challenge lies in enabling models to discover robust problem-solving strategies without manual intervention.
The Self-play Programming Interface
The proposed framework introduces a Self-play Programming Interface that separates high-level logic from low-level visual perception. Instead of a direct answer, the model is prompted to write a Python function, execute(), to solve a query.
The workflow consists of several key stages:
- Orchestration: The model acts as a manager, writing code that calls an indirection API (e.g., an
ImageObjectwith ananswer()method). - Self-as-a-Tool: The code calls a sub-instance of the model (or a specialized tool like PaliGemma) to extract specific visual details.
- Execution and Refinement: A computational runtime executes the code. If errors occur, the model uses the feedback to self-refine its logic.
- Bootstrapping: Successful traces—those matching the "golden label"—are stored in a few-shot pool for future inference.
Experimental Setup and Datasets
The framework was evaluated on three major benchmarks:
- ChartQA: Requires complex visual perception and logical reasoning.
- PlotQA: Focuses on data extraction from scientific plots.
- ChartFC: A fact-checking task for chart-based statements.
To optimize the iterative process, the researchers utilized a "Novelty Score" during inference. This score prioritizes examples that the model found difficult during training, ensuring that the most informative "learning signals" are used for complex test cases.
Key Results and Insights
The Self-play (SP) approach demonstrated substantial gains over zero-shot baselines:
- PlotQA: Gemini 1.5 Flash improved from 42.2% to 52.3% after 10 iterations.
- ChartQA: Performance rose from 80.0% to 81.3%, avoiding the degradation often seen with standard auto-prompting tools like DSPy.
- Generalizability: The method also improved GPT-4o's performance on PlotQA, showing its model-agnostic potential.
A critical insight is that the computational runtime serves as an objective grounding mechanism. Unlike text-only reasoning, code either works or it doesn't, providing a clear signal for improvement. Furthermore, using specialized models (like fine-tuned PaliGemma) as tools within the generated code further enhances the system's accuracy.
Conclusion and Future Directions
Self-play through computational runtimes offers a scalable path toward autonomous model improvement in specialized domains. Future work includes expanding the toolset to include calculators or database search and testing the framework's efficacy on natural image reasoning. While the orchestration cost is higher due to multiple model calls, the resulting boost in reasoning quality provides a compelling trade-off for complex visual tasks.
Summary updated