mlsanityData to 14 Oct 2026

ViUniT: Visual Unit Tests for More Robust Visual Programming

arXiv 2412.08859 ↗First posted 12 Dec 2024cs.CVcited by 4

Not on the map. Why?

Abstract (arXiv)

Programming based approaches to reasoning tasks have substantially expanded the types of questions models can answer about visual scenes. Yet on benchmark visual reasoning data, when models answer correctly, they produce incorrect programs 33% of the time. These models are often right for the wrong reasons and risk unexpected failures on new data. Unit tests play a foundational role in ensuring code correctness and could be used to repair such failures. We propose Visual Unit Testing (ViUniT), a framework to improve the reliability of visual programs by automatically generating unit tests. In our framework, a unit test is represented as a novel image and answer pair meant to verify the logical correctness of a program produced for a given query. Our method leverages a language model to create unit tests in the form of image descriptions and expected answers and image synthesis to produce corresponding images. We conduct a comprehensive analysis of what constitutes an effective visual unit test suite, exploring unit test generation, sampling strategies, image generation methods, and varying the number of programs and unit tests. Additionally, we introduce four applications of visual unit tests: best program selection, answer refusal, re-prompting, and unsupervised reward formulations for reinforcement learning. Experiments with two models across three datasets in visual question answering and image-text matching demonstrate that ViUniT improves model performance by 11.4%. Notably, it enables 7B open-source models to outperform gpt-4o-mini by an average of 7.7% and reduces the occurrence of programs that are correct for the wrong reasons by 40%.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 52 of its 60 references that are in the map. First posted on arXiv 12 Dec 2024.

Builds on

52 of 60 references.

References · 52

  1. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2021High-Resolution Image Synthesis with Latent Diffusion Modelscited by 18,863
  4. 2023GPT-4 Technical Reportcited by 18,396
  5. 2024The Llama 3 Herd of Modelscited by 14,715
  6. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  7. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  8. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  9. 2023Visual Instruction Tuningcited by 7,869
  10. 2023BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Modelscited by 6,137
  11. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  12. 2023SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesiscited by 4,356
38 more
  1. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
  2. 2023Grounding DINO: Marrying DINO with Grounded Pre-Training for Open-Set Object Detectioncited by 3,332
  3. 2023Mistral 7Bcited by 3,164
  4. 2023InstructBLIP: Towards General-purpose Vision-Language Models with Instruction Tuningcited by 2,876
  5. 2016Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answeringcited by 2,516
  6. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  7. 2019Towards VQA Models That Can Readcited by 1,718
  8. 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,463
  9. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
  10. 2023PaLM 2 Technical Reportcited by 1,162
  11. 2019OK-VQA: A Visual Question Answering Benchmark Requiring External Knowledgecited by 1,121
  12. 2023The Flan Collection: Designing Data and Methods for Effective Instruction Tuningcited by 739
  13. 2023CogAgent: A Visual Language Model for GUI Agentscited by 704
  14. 2023ViperGPT: Visual Inference via Python Execution for Reasoningcited by 603
  15. 2022Winoground: Probing Vision and Language Models for Visio-Linguistic Compositionalitycited by 529
  16. 2023MM-REACT: Prompting ChatGPT for Multimodal Reasoning and Actioncited by 517
  17. 2022Visual Programming: Compositional visual reasoning without trainingcited by 516
  18. 2022CodeT: Code Generation with Generated Testscited by 384
  19. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 358
  20. 2023Chameleon: Plug-and-Play Compositional Reasoning with Large Language Modelscited by 356
  21. 2021An Empirical Study of GPT-3 for Few-Shot Knowledge-Based VQAcited by 301
  22. 2023LLM-grounded Diffusion: Enhancing Prompt Understanding of Text-to-Image Diffusion Models with Large Language Modelscited by 243
  23. 2023SugarCrepe: Fixing Hackable Benchmarks for Vision-Language Compositionalitycited by 243
  24. 2024CodeGemma: Open Code Models Based on Gemmacited by 150
  25. 2023Execution-based Code Generation using Deep Reinforcement Learningcited by 99
  26. 2024Editable Scene Simulation for Autonomous Driving via Collaborative LLM-Agentscited by 91
  27. 2023X-InstructBLIP: A Framework for aligning X-Modal instruction-aware representations to LLMs and Emergent Cross-modal Reasoningcited by 80
  28. 2023PanGu-Coder2: Boosting Large Language Models for Code with Ranking Feedbackcited by 69
  29. 2023Visual Program Distillation: Distilling Tools and Programmatic Reasoning into Vision-Language Modelscited by 66
  30. 2023CLOVA: A Closed-Loop Visual Assistant with Tool Usage and Updatecited by 43
  31. 2023Goodhart's Law in Reinforcement Learningcited by 41
  32. 2023A3Test: Assertion-Augmented Automated Test Case Generationcited by 33
  33. 2024Synthesize Step-by-Step: Tools, Templates and LLMs as Data Generators for Reasoning-Based Chart VQAcited by 19
  34. 2024Towards Truly Zero-shot Compositional Visual Reasoning with LLMs as Programmerscited by 14
  35. 2023XGen-7B Technical Reportcited by 12
  36. 2024Self-Training Large Language Models for Improved Visual Program Synthesis With Visual Reinforcementcited by 12
  37. 2023Recursive Visual Programmingcited by 6
  38. 2024Image Translation as Diffusion Visual Programmerscited by 5

50 most cited of 52 All 52 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 3.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025CodeV: Code with Images for Faithful Visual Reasoning via Tool-Aware Policy Optimization
  2. 2026TACIT Benchmark: A Programmatic Visual Reasoning Benchmark for Generative and Discriminative Models
  3. 2026VisualCoding: Learning Executable Skills for Reliable Visual Reasoning
  4. 2026Visual Set Program Synthesizer
  5. 2024VDebugger: Harnessing Execution Feedback for Debugging Visual Programs
  6. 2026VBVR-Pro: A Scalable and Verifiable Suite for Native Visual Reasoning
  7. 2025V-REX: Benchmarking Exploratory Visual Reasoning via Chain-of-Questions
  8. 2025VisualSphinx: Large-Scale Synthetic Vision Logic Puzzles for RL