arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.08859cs.CV
收藏

ViUniT: 用于提升视觉编程鲁棒性的视觉单元测试

ViUniT: Visual Unit Tests for More Robust Visual Programming

University of Pennsylvania(宾夕法尼亚大学);Salesforce AI Research(Salesforce AI研究院)

Artemis Panagopoulou, Honglu Zhou, Silvio Savarese, Caiming Xiong, Chris Callison-Burch, Mark Yatskar, Juan Carlos Niebles

AI总结:

针对视觉推理模型常因错误原因得到正确结果、鲁棒性不足的问题,提出ViUniT框架,通过自动生成图像-答案对形式的视觉单元测试,可用于程序选择、答案弃权等场景,显著提升模型性能并降低错误推理的概率。

摘要:

基于编程的推理任务方法已大幅拓展了模型能够回答的视觉场景相关问题的类型。然而在基准视觉推理数据上,模型回答正确时,有33%的概率生成的是错误程序。这些模型往往因错误的原因得到正确结果,在新数据上存在出现意外失败的风险。单元测试在确保代码正确性方面发挥着基础性作用,可用于修复这类故障。我们提出视觉单元测试(Visual Unit Testing,ViUniT)框架,通过自动生成单元测试来提升视觉程序的可靠性。在我们的框架中,单元测试被表示为一种新颖的图像-答案对,用于验证针对给定查询生成的程序的逻辑正确性。我们的方法利用语言模型创建图像描述形式的单元测试和预期答案,并通过图像合成生成对应的图像。我们对有效视觉单元测试套件的构成要素开展了全面分析,探究了单元测试生成、采样策略、图像生成方法,以及程序和单元测试数量变化的影响。此外,我们介绍了视觉单元测试的四种应用:最优程序选择、答案弃权(不执行)、重新提示,以及用于强化学习的无监督奖励公式。在视觉问答和图文匹配任务的三个数据集上,针对两个模型开展的实验表明,ViUniT将模型性能提升了11.4%。值得注意的是,它使7B参数的开源模型平均表现优于gpt-4o-mini 7.7%,并将“因错误原因得到正确结果”的程序出现概率降低了40%。

英文摘要:

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%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑