atlas

Research map / Vision-language and multimodal / Visual question answering

ViUniT: Visual Unit Tests for More Robust Visual Programming

CVPR 2025 · Vision-language and multimodal › Visual question answering · approach: Visual reasoning diagnostics · 1 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes ViUniT, which generates visual unit tests (image-caption plus expected-answer pairs rendered by diffusion models) to verify visual programs, and uses them for best-program selection, answer refusal, re-prompting, and unsupervised RL rewards.

Problem

Visual programs often produce correct answers for the wrong reasons (only 33% of correct programs on GQA were actually correct), and existing visual unit tests only check return types rather than logical correctness.

Approach

Generate unit tests as image descriptions and expected answers using an LLM, select a coverage-maximizing subset (by answer, then by caption embedding diversity), render them to images with text-to-image diffusion, and score candidate programs by how many tests they pass.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Select among 5 candidate programs using 5 visual unit testsCodeLlama-7B visual program selection · GQAaccuracy: 35.99±2.94 -> 49.27±1.33Helped
Select among 5 candidate programs using 5 visual unit testsCodeGemma-7B visual program selection · Winogroundaccuracy: 39.60±1.38 -> 51.92±0.90Helped
Select among 5 candidate programs using 5 visual unit tests rather than most-common-answer selectionCodeGemma-7B · SugarCREPEaccuracy: 46.67±1.69 -> 51.85±2.16Helped
Revert to an end-to-end model when the unit-test score is below 0.7CodeGemma-7B program answers · GQAaccuracy: 44.89±2.19 -> 54.58±1.24Helped
Revert to an end-to-end model when the unit-test score is below 0.7CodeLlama-7B program answers · Winogroundaccuracy: 51.67±1.16 -> 50.67±1.28Hurt
Use unit-test feedback instead of error traces when re-promptingCodeLlama-7B · GQAaccuracy: 37.92±2.68 -> 46.68±2.52Helped
Use unit-test feedback instead of error traces when re-promptingCodeGemma-7B · SugarCREPEaccuracy: 44.52±1.05 -> 48.21±1.12Helped
Use an unsupervised visual-unit-test reward instead of supervised correctness rewardCodeGemma-7B RL training · Winogroundaccuracy: 45.98±2.64 -> 49.29±0.43Helped
Use an unsupervised visual-unit-test reward instead of supervised correctness rewardCodeLlama-7B RL training · Winogroundaccuracy: 48.65±0.87 -> 46.52±0.81Hurt
Increase the number of unit tests, particularly from 1 to 5 (ablation)ViUniT best program selection · GQA and WinogroundaccuracyHelped
Increase the number of candidate programs (ablation)ViUniT best program selection · GQA and WinogroundaccuracyHelped
Exclude program implementation details from unit-test generation (ablation)ViUniT unit-test generator · GQAaccuracyHelped

Surprising findings

Limitations

Experimental setup

Datasets: GQA SugarCREPE Winoground

Benchmarks: GQA Winoground SugarCREPE

Metrics: accuracy F1 score for answer refusal human-judged program correctness

Baselines: gpt-4o-mini base setup most common answer selection error re-prompting supervised correctness reward reverting on error

Builds on: ViperGPT Khan et al. visual program RL property-based visual unit testing LM Guided Diffusion

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy