diff --git "a/2024/Recursive Visual Programming/layout.json" "b/2024/Recursive Visual Programming/layout.json" new file mode 100644--- /dev/null +++ "b/2024/Recursive Visual Programming/layout.json" @@ -0,0 +1,7377 @@ +{ + "pdf_info": [ + { + "para_blocks": [ + { + "bbox": [ + 197, + 112, + 416, + 129 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 197, + 112, + 416, + 129 + ], + "spans": [ + { + "bbox": [ + 197, + 112, + 416, + 129 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 194, + 149, + 418, + 175 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 194, + 149, + 418, + 175 + ], + "spans": [ + { + "bbox": [ + 194, + 149, + 418, + 175 + ], + "type": "text", + "content": "Jiaxin Ge1 Sanjay Subramanian1 Baifeng Shi1 Roei Herzig1 Trevor Darrell1" + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 258, + 184, + 355, + 194 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 258, + 184, + 355, + 194 + ], + "spans": [ + { + "bbox": [ + 258, + 184, + 355, + 194 + ], + "type": "text", + "content": "UC Berkeley, CA, USA" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 160, + 223, + 452, + 420 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 160, + 223, + 452, + 420 + ], + "spans": [ + { + "bbox": [ + 160, + 223, + 452, + 420 + ], + "type": "text", + "content": "Abstract. Visual Programming (VP) has emerged as a powerful framework for Visual Question Answering (VQA). By generating and executing bespoke code for each question, these methods show advancement in leveraging Large Language Models (LLMs) for complex problem-solving. Despite their potential, existing VP methods generate all code in a single function, which does not fully utilize LLM's reasoning capacity and the modular adaptability of code. This results in code that is suboptimal in terms of both accuracy and interpretability. Inspired by human coding practices, we propose Recursive Visual Programming (RVP), which better harnesses the reasoning capacity of LLMs, provides modular code structure between code pieces, and assigns different return types for the sub-problems elegantly. RVP approaches VQA tasks with an top-down recursive code generation approach, allowing decomposition of complicated problems into smaller parts. We show RVP's efficacy through extensive experiments on benchmarks including VSR, COVR, GQA, and NextQA, underscoring the value of adopting human-like recursive and modular programming techniques for solving VQA tasks. Our code is available at https://github.com/para-lost/RVP." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 160, + 430, + 405, + 441 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 160, + 430, + 405, + 441 + ], + "spans": [ + { + "bbox": [ + 160, + 430, + 405, + 441 + ], + "type": "text", + "content": "Keywords: Visual Programming " + }, + { + "bbox": [ + 160, + 430, + 405, + 441 + ], + "type": "inline_equation", + "content": "\\cdot" + }, + { + "bbox": [ + 160, + 430, + 405, + 441 + ], + "type": "text", + "content": " Vision-Language " + }, + { + "bbox": [ + 160, + 430, + 405, + 441 + ], + "type": "inline_equation", + "content": "\\cdot" + }, + { + "bbox": [ + 160, + 430, + 405, + 441 + ], + "type": "text", + "content": " VQA" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 132, + 461, + 230, + 474 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 461, + 230, + 474 + ], + "spans": [ + { + "bbox": [ + 132, + 461, + 230, + 474 + ], + "type": "text", + "content": "1 Introduction" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 130, + 486, + 481, + 582 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 486, + 481, + 582 + ], + "spans": [ + { + "bbox": [ + 130, + 486, + 481, + 582 + ], + "type": "text", + "content": "Visual Question Answering (VQA) lies at the intersection of computer vision and natural language processing, posing the challenge of interpreting visual data to answer questions [3,16,26]. Following the recent progress on code generation using Large Language Models (LLMs) [6,27,33], Visual Programming (VP) methods have notably advanced in this area, successfully using LLMs to generate and execute code in few-shot and zero-shot scenarios [14,30,31]. In these techniques, various vision models are provided to LLM as APIs, and the LLM is used as a planner to utilize these vision models to perform reasoning over images." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 130, + 582, + 481, + 665 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 582, + 481, + 665 + ], + "spans": [ + { + "bbox": [ + 130, + 582, + 481, + 665 + ], + "type": "text", + "content": "Despite these advancements, such planning remains very challenging for Visual Programming. These methods require the model to generate a single code block using the predefined APIs at once. As a result, the model must handle logic, be aware of all details, and utilize the vision APIs appropriately. This has two main drawbacks. First, such approaches do not fully utilize LLM's reasoning capability, which would benefit from breaking down the problem into step-by-step sub-problems, as demonstrated in recent NLP research [4]. Secondly, they" + } + ] + } + ], + "index": 7 + } + ], + "discarded_blocks": [], + "page_size": [ + 612, + 792 + ], + "page_idx": 0 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 136, + 114, + 479, + 324 + ], + "blocks": [ + { + "bbox": [ + 136, + 114, + 479, + 324 + ], + "lines": [ + { + "bbox": [ + 136, + 114, + 479, + 324 + ], + "spans": [ + { + "bbox": [ + 136, + 114, + 479, + 324 + ], + "type": "image", + "image_path": "cc5ac8908a42096357813ed66e120177bf0638873d475f7f0f643930020c20da.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 130, + 331, + 482, + 410 + ], + "lines": [ + { + "bbox": [ + 130, + 331, + 482, + 410 + ], + "spans": [ + { + "bbox": [ + 130, + 331, + 482, + 410 + ], + "type": "text", + "content": "Fig. 1: A breakdown of Recursive Visual Programming for a visual question is illustrated with an image where scenes within it contain smaller versions of themselves. To locate a man wearing a hat at the third level of an image, the model first generates code that has two recursive_query API calls. The initial call identifies the largest mirror (representing the next image level), and the subsequent call seeks \"the man with a hat\" at the second level. The model iteratively generates and executes code through these calls until the final answer is produced without additional recursive calls." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "bbox": [ + 130, + 435, + 481, + 460 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 435, + 481, + 460 + ], + "spans": [ + { + "bbox": [ + 130, + 435, + 481, + 460 + ], + "type": "text", + "content": "fail to utilize the full potential of code because they lack modularity between the code pieces, particularly when the code is one long piece." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 460, + 481, + 520 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 460, + 481, + 520 + ], + "spans": [ + { + "bbox": [ + 130, + 460, + 481, + 520 + ], + "type": "text", + "content": "We consider how humans tackle these issues. Humans tend to code in a top-down manner: first they break down complex tasks into manageable subproblems, and then they tackle each through focused code segments. This approach allows the programmer to concentrate on the main logic flow rather than figuring out all the details at once, resulting in a more clear and elegant structure." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 130, + 521, + 482, + 628 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 521, + 482, + 628 + ], + "spans": [ + { + "bbox": [ + 130, + 521, + 482, + 628 + ], + "type": "text", + "content": "Inspired by this, we hypothesize that incorporating a similar recursive coding strategy would also help solve complex visual question-answering problems. To investigate whether LLMs could indeed benefit from recursive coding, we conduct preliminary experiment of the recursive coding approach on standard symbolic reasoning benchmarks, such as Dyck Language [32] and Games of 24 [38]. This is done by simply prompting the LLM to code recursively. We find that utilizing LLMs to code recursively leads to a notable improvement in accuracy, as shown in Figure 2. Motivated by this result, we explore in this paper how a recursive coding methodology can be applied to VQA tasks." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 130, + 629, + 482, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 629, + 482, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 629, + 482, + 666 + ], + "type": "text", + "content": "Specifically, we propose a novel VP method for VQA tasks, named Recursive Visual Programming (RVP). Instead of querying LLM only once to generate a single piece of code, we ask LLM to decompose the question into sub-questions" + } + ] + } + ], + "index": 7 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "spans": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "type": "text", + "content": "2" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 203, + 100 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 203, + 100 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 203, + 100 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 1 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 134, + 115, + 478, + 236 + ], + "blocks": [ + { + "bbox": [ + 134, + 115, + 478, + 236 + ], + "lines": [ + { + "bbox": [ + 134, + 115, + 478, + 236 + ], + "spans": [ + { + "bbox": [ + 134, + 115, + 478, + 236 + ], + "type": "image", + "image_path": "a11a8f66fb1cbde1cb07d94fb4fa00b38ebd21d81121ba7bbb9dd4d01c6c283c.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 130, + 243, + 482, + 300 + ], + "lines": [ + { + "bbox": [ + 130, + 243, + 482, + 300 + ], + "spans": [ + { + "bbox": [ + 130, + 243, + 482, + 300 + ], + "type": "text", + "content": "Fig. 2: Motivating Examples. Adding the prompt \"solve the problem recursively\" to the input significantly improves the model's performance on traditional coding tasks, Dyck language [32] and Games of 24 [38]. \"NR\" refers to non-recursive approach and \"R\" refers to recursive approach. This shows that LLMs can potentially benefit from human's recursive programming approach." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "bbox": [ + 130, + 312, + 482, + 419 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 312, + 482, + 419 + ], + "spans": [ + { + "bbox": [ + 130, + 312, + 482, + 419 + ], + "type": "text", + "content": "and recursively query itself for each sub-question to generate modular code pieces. For each sub-question, the same process repeats, until reaching an atom level where the current question can be solved by only calling external APIs. See example in Figure 1. In contrast to querying LLM only once, we find that using recursive queries to generate code for each sub-question can improve the readability and accuracy of the code, as shown in Figure 3. Moreover, MVP allows assigning dynamic types to each sub-question, enabling new code pieces to return a variety of types based on the current need. Remarkably, MVP assigns return types unseen in in-context examples, such as List[str], List[ImagePatch]." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 420, + 482, + 529 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 420, + 482, + 529 + ], + "spans": [ + { + "bbox": [ + 130, + 420, + 482, + 529 + ], + "type": "text", + "content": "Our contribution can be summarized as follows: (i) We introduce a novel recursive approach based on human programming. This approach is a top-down programming method that better harnesses LLM's reasoning capacity and enhances modularity between multiple code pieces. It is easily applicable to any existing VP model for visual question answering task. (ii) We allow dynamic return types for the sub-problems, which enhances flexibility and adaptability. (iii) We demonstrate improved performance on several standard benchmarks, such as GQA, VSR, NextQA and COVR, demonstrating the effectiveness of our approach. We also show better interpretability than non-recursive VP methods." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 132, + 545, + 238, + 558 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 545, + 238, + 558 + ], + "spans": [ + { + "bbox": [ + 132, + 545, + 238, + 558 + ], + "type": "text", + "content": "2 Related Work" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 130, + 570, + 482, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 570, + 482, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 570, + 482, + 666 + ], + "type": "text", + "content": "Modular Visual Reasoning. There is a long line of work that seeks to combine modularity with the expressivity of deep neural networks. Early work on this topic converts the output of a parser [1] to a program or trains a program generator either separately from or jointly with the execution modules [2, 15]. Later work finds that such models are often challenging to train on real-world datasets, particularly when interpretability of individual module outputs is expected [29]. Other work improves performance on multi-hop visual reasoning without explicitly defining a set of modules, e.g., by predicting and operating" + } + ] + } + ], + "index": 7 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "spans": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "spans": [ + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "type": "text", + "content": "3" + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 2 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 135, + 114, + 481, + 327 + ], + "blocks": [ + { + "bbox": [ + 135, + 114, + 481, + 327 + ], + "lines": [ + { + "bbox": [ + 135, + 114, + 481, + 327 + ], + "spans": [ + { + "bbox": [ + 135, + 114, + 481, + 327 + ], + "type": "image", + "image_path": "a8b7ab2795a081c333bac9386e43bd962bfd8fe27c57853ee5b1b9e61417c441.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 130, + 335, + 482, + 381 + ], + "lines": [ + { + "bbox": [ + 130, + 335, + 482, + 381 + ], + "spans": [ + { + "bbox": [ + 130, + 335, + 482, + 381 + ], + "type": "text", + "content": "Fig. 3: Example from COVR (Upper). Current VP methods fail to provide binary 'yes' or 'no' answers, while Recursive Visual Programming method outputs the correct answer. Example from GQA (Middle and Bottom). Recursive outperforms current non-recursive methods by correctly addressing all details and their associated logic." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "bbox": [ + 130, + 426, + 237, + 438 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 426, + 237, + 438 + ], + "spans": [ + { + "bbox": [ + 130, + 426, + 237, + 438 + ], + "type": "text", + "content": "over a scene graph [18]." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 438, + 482, + 581 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 438, + 482, + 581 + ], + "spans": [ + { + "bbox": [ + 130, + 438, + 482, + 581 + ], + "type": "text", + "content": "Visual Programming. Recent language models can accurately generate code from text descriptions when prompted with a small number of examples [8]. This advance has enabled a few-shot modular visual reasoning approach, commonly called visual programming [14], which consists of prompting a language model for a program and executing the program with pre-trained vision models. This paradigm has led to impressive results in visual question answering, video question answering, visual and tabular question answering, referring expression comprehension, and text-based image editing [11, 12, 23, 30, 31]. Programming with LLMs has also been applied to produce plans and reward functions for robots [21, 24, 40]. Our work builds on these techniques by enabling the LLM to generate code in multiple steps-first planning the overall process and then filling in the details-rather than all at once." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 130, + 582, + 483, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 582, + 483, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 582, + 483, + 666 + ], + "type": "text", + "content": "Language Models for Reasoning Tasks. In the text domain, there is a large body of work on using language models for reasoning tasks. In particular, several papers have shown the efficacy of code generation as a scaffold for such tasks [9, 13, 25, 34]. Aside from code generation, prior work has also shown that decomposing complex queries into simpler ones improves the performance of language models [28, 42]. Our RVP approach applies this insight to improve the code generation component of visual programming." + } + ] + } + ], + "index": 6 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "spans": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "type": "text", + "content": "4" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 3 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 136, + 114, + 479, + 315 + ], + "blocks": [ + { + "bbox": [ + 136, + 114, + 479, + 315 + ], + "lines": [ + { + "bbox": [ + 136, + 114, + 479, + 315 + ], + "spans": [ + { + "bbox": [ + 136, + 114, + 479, + 315 + ], + "type": "image", + "image_path": "289e4bc1dc3f4c4c4b0e6b14f23b1457f7727744791a3995762557724aba68b7.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 130, + 323, + 482, + 357 + ], + "lines": [ + { + "bbox": [ + 130, + 323, + 482, + 357 + ], + "spans": [ + { + "bbox": [ + 130, + 323, + 482, + 357 + ], + "type": "text", + "content": "Fig. 4: An overview of our approach. When a recursive_query API call is occurred, the model generates and executes new code based on the query, returning the output back to the original call." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "bbox": [ + 131, + 378, + 339, + 392 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 131, + 378, + 339, + 392 + ], + "spans": [ + { + "bbox": [ + 131, + 378, + 339, + 392 + ], + "type": "text", + "content": "3 Recursive Visual Programming" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 402, + 482, + 463 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 402, + 482, + 463 + ], + "spans": [ + { + "bbox": [ + 130, + 402, + 482, + 463 + ], + "type": "text", + "content": "In this section, we introduce our method, Recursive Visual Programming (RVP). We first review the problem setup and ingredients of visual programming as established by prior work (see Section 3.1). We then introduce our recursive coding framework (see Section 3.2), which involves a multi-step prompting scheme, as well as a system for dynamic type assignment (see Section 3.3)." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 131, + 479, + 228, + 491 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 131, + 479, + 228, + 491 + ], + "spans": [ + { + "bbox": [ + 131, + 479, + 228, + 491 + ], + "type": "text", + "content": "3.1 Preliminaries" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "spans": [ + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "text", + "content": "In Visual Question Answering (VQA), the system " + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "inline_equation", + "content": "f" + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "text", + "content": " is given a visual input " + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "inline_equation", + "content": "I" + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "text", + "content": " (i.e. an image, a set of images, or a video), as well as a question " + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "inline_equation", + "content": "Q" + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "text", + "content": " relating to the visual content. The expected output is a textual answer " + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "inline_equation", + "content": "A" + }, + { + "bbox": [ + 131, + 498, + 482, + 535 + ], + "type": "text", + "content": " to the question:" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 277, + 543, + 481, + 557 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 277, + 543, + 481, + 557 + ], + "spans": [ + { + "bbox": [ + 277, + 543, + 481, + 557 + ], + "type": "interline_equation", + "content": "A \\leftarrow f (I, Q) \\tag {1}", + "image_path": "dba73d81bc1633f66faa4e0f74d3d1b92900824b150f96d02745820cd8f1ea3e.jpg" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "spans": [ + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "text", + "content": "Visual Programming methods [14,30,31] represent " + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "inline_equation", + "content": "f" + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "text", + "content": " as the composition of two functions: a code generator " + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "inline_equation", + "content": "g" + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "text", + "content": " and a visual executor " + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "inline_equation", + "content": "h" + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "text", + "content": ". In the first part, the code generator generates a program " + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "inline_equation", + "content": "P" + }, + { + "bbox": [ + 130, + 563, + 482, + 612 + ], + "type": "text", + "content": " conditioned on the question, and in the second part, the executor executes the program on the visual input:" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 254, + 620, + 481, + 634 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 254, + 620, + 481, + 634 + ], + "spans": [ + { + "bbox": [ + 254, + 620, + 481, + 634 + ], + "type": "interline_equation", + "content": "P \\leftarrow g (Q), A \\leftarrow h (P, I) \\tag {2}", + "image_path": "e63d2122334e0aa08529b7cd53aac01dd8645d71ad73f15e611c2a111aa5e254.jpg" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 131, + 641, + 481, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 131, + 641, + 481, + 666 + ], + "spans": [ + { + "bbox": [ + 131, + 641, + 481, + 666 + ], + "type": "text", + "content": "We focus on the few-shot setting in which we have only a few (at most 50) training examples—each consisting of a question, program, and answer—for a given" + } + ] + } + ], + "index": 11 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "spans": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "spans": [ + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "type": "text", + "content": "5" + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 4 + }, + { + "para_blocks": [ + { + "bbox": [ + 130, + 116, + 479, + 163 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 116, + 479, + 163 + ], + "spans": [ + { + "bbox": [ + 130, + 116, + 479, + 163 + ], + "type": "text", + "content": "task. Therefore, the code generator " + }, + { + "bbox": [ + 130, + 116, + 479, + 163 + ], + "type": "inline_equation", + "content": "g" + }, + { + "bbox": [ + 130, + 116, + 479, + 163 + ], + "type": "text", + "content": " is composed of a language model and a prompt that includes a description of the API available to the executor and in-context examples of questions along with the corresponding correct programs. We use Python as the programming language, similar to [30, 31]." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 130, + 165, + 479, + 201 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 165, + 479, + 201 + ], + "spans": [ + { + "bbox": [ + 130, + 165, + 479, + 201 + ], + "type": "text", + "content": "We evaluate our approach using the ViperGPT [31] API. For questions over images or sets of images, these functions can be called on an ImagePatch object, which can be any crop of the image:" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 136, + 213, + 481, + 374 + ], + "type": "list", + "angle": 0, + "index": 10, + "blocks": [ + { + "bbox": [ + 136, + 213, + 481, + 237 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 136, + 213, + 481, + 237 + ], + "spans": [ + { + "bbox": [ + 136, + 213, + 481, + 237 + ], + "type": "text", + "content": "1. find(object: str): Returns a list of ImagePatch objects matching the description." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 136, + 239, + 481, + 262 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 136, + 239, + 481, + 262 + ], + "spans": [ + { + "bbox": [ + 136, + 239, + 481, + 262 + ], + "type": "text", + "content": "2. exists(object: str): Returns a bool representing whether the described object exists." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 136, + 264, + 481, + 287 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 136, + 264, + 481, + 287 + ], + "spans": [ + { + "bbox": [ + 136, + 264, + 481, + 287 + ], + "type": "text", + "content": "3. verify_property(object: str, property: str): Returns a bool representing whether the described object has the specified property." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 136, + 289, + 481, + 312 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 136, + 289, + 481, + 312 + ], + "spans": [ + { + "bbox": [ + 136, + 289, + 481, + 312 + ], + "type": "text", + "content": "4. simple_query(question: str): Returns an answer to the provided question based on the given ImagePatch." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 136, + 315, + 481, + 338 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 136, + 315, + 481, + 338 + ], + "spans": [ + { + "bbox": [ + 136, + 315, + 481, + 338 + ], + "type": "text", + "content": "5. compute_depth(): Returns the median depth of the region in the given ImagePatch." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 136, + 340, + 481, + 374 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 136, + 340, + 481, + 374 + ], + "spans": [ + { + "bbox": [ + 136, + 340, + 481, + 374 + ], + "type": "text", + "content": "6. crop(left: int, lower: int, right: int, upper: int): Crops a part of the given ImagePatch and returns a new ImagePatch representing that crop." + } + ] + } + ], + "index": 9 + } + ], + "sub_type": "text" + }, + { + "bbox": [ + 130, + 387, + 479, + 423 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 387, + 479, + 423 + ], + "spans": [ + { + "bbox": [ + 130, + 387, + 479, + 423 + ], + "type": "text", + "content": "For questions about a video, the API includes three other functions: trim(), frame_from_index(), and frame_iterator(), which return an abbreviated version of the video, a specific frame, and an iterator over the frames respectively." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 131, + 447, + 318, + 459 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 131, + 447, + 318, + 459 + ], + "spans": [ + { + "bbox": [ + 131, + 447, + 318, + 459 + ], + "type": "text", + "content": "3.2 Recursive Visual Programming" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 130, + 472, + 481, + 616 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 472, + 481, + 616 + ], + "spans": [ + { + "bbox": [ + 130, + 472, + 481, + 616 + ], + "type": "text", + "content": "We introduce a new method for code generation in visual programming: Recursive Visual Programming (RVP). RVP enables the language model to break the code generation process into multiple sub-questions and recursively call itself to generate a program for each sub-question. As shown in Figure 4, we operationalize RVP by adding a new function to the API: recursive_query(image, sub-question). During execution, when recursive_query is called, it prompts the language model to generate a new code given the sub-question. This code is then executed, and its return value is returned by recursive_query. An example break down of the usage of recursive_query call is shown in Figure 1. We set the recursive termination condition by (1) setting max depth of 10 and (2) switching to direct simple query when generated code contains a recursive call to the same input question." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 130, + 617, + 481, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 617, + 481, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 617, + 481, + 666 + ], + "type": "text", + "content": "To enable this process, we add examples of calling recursive_query in the prompt to show the model how to decompose the problem and utilize the answers returned by recursive_query. We provide examples of the in-context prompt of recursive_query we used in the supplementary material." + } + ] + } + ], + "index": 14 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "spans": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "type": "text", + "content": "6" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 5 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 137, + 116, + 477, + 288 + ], + "blocks": [ + { + "bbox": [ + 137, + 116, + 477, + 288 + ], + "lines": [ + { + "bbox": [ + 137, + 116, + 477, + 288 + ], + "spans": [ + { + "bbox": [ + 137, + 116, + 477, + 288 + ], + "type": "image", + "image_path": "e847bf6c00ebf60a2f11847f5d049b303e64d5069766beb8bd8f16965ff7d17b.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 130, + 297, + 482, + 331 + ], + "lines": [ + { + "bbox": [ + 130, + 297, + 482, + 331 + ], + "spans": [ + { + "bbox": [ + 130, + 297, + 482, + 331 + ], + "type": "text", + "content": "Fig.5: Examples of dynamic type assignment in recursive_query calls. The model autonomously determines the appropriate return type in its code generation and generalize to new types unseen in in-context examples such as List[ImagePatch]." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "bbox": [ + 132, + 361, + 297, + 374 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 361, + 297, + 374 + ], + "spans": [ + { + "bbox": [ + 132, + 361, + 297, + 374 + ], + "type": "text", + "content": "3.3 Dynamic Type Assignment" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 402, + 482, + 570 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 402, + 482, + 570 + ], + "spans": [ + { + "bbox": [ + 130, + 402, + 482, + 570 + ], + "type": "text", + "content": "In previous visual programming frameworks, code generation mechanisms are constrained by static type assignments, i.e., the return type of a given function is fixed. For instance, simple_query always returns a string. However, this rigid structure limits the model's flexibility to adapt the code to different contexts within the VQA task. RVP introduces dynamic type assignment to address this limitation. When the code generator writes a recursive_query function, it can include the expected return type as a part of the question that is passed to the recursive_query. To facilitate this, in the in-context examples that include recursive_query, we let the input 'question' specify a type. As shown in Figure 5, we give examples of type ImagePatch, bool, float, and str being specified within the queries. When receiving this question, the model discerns the required type and generates code that declares and returns the correct type. For instance, a query like \"Return a bool, is there a black cat in the picture?\" will prompt the generation of code with the signature." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 254, + 587, + 481, + 601 + ], + "type": "interline_equation", + "angle": 0, + "lines": [ + { + "bbox": [ + 254, + 587, + 481, + 601 + ], + "spans": [ + { + "bbox": [ + 254, + 587, + 481, + 601 + ], + "type": "interline_equation", + "content": "\\operatorname {e x e c u t e} (\\operatorname {i m a g e}) \\rightarrow \\operatorname {b o o l} \\tag {3}", + "image_path": "cb4dde4afbd4993cffaf3879144c3b569d93740abb7ab4fa3ef178746782995f.jpg" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "text", + "content": "This signature indicates that the generated code " + }, + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "inline_equation", + "content": "P'" + }, + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "text", + "content": ", when executed, will return a boolean value " + }, + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "inline_equation", + "content": "A_{\\mathrm{bool}}" + }, + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "text", + "content": " which answers the sub-question " + }, + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "inline_equation", + "content": "Q'" + }, + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "text", + "content": ", illustrating the dynamic and context-sensitive nature of RVP's code generation capabilities that help to produce syntactically and semantically appropriate code for complex reasoning." + } + ] + } + ], + "index": 7 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "spans": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "spans": [ + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "type": "text", + "content": "7" + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 6 + }, + { + "para_blocks": [ + { + "bbox": [ + 132, + 114, + 230, + 129 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 114, + 230, + 129 + ], + "spans": [ + { + "bbox": [ + 132, + 114, + 230, + 129 + ], + "type": "text", + "content": "4 Experiments" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 132, + 139, + 480, + 163 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 139, + 480, + 163 + ], + "spans": [ + { + "bbox": [ + 132, + 139, + 480, + 163 + ], + "type": "text", + "content": "In this section, we introduce the basic settings including the task formulation and parameter details. Then, we provide experiment results and in-depth analysis." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 132, + 171, + 253, + 183 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 171, + 253, + 183 + ], + "spans": [ + { + "bbox": [ + 132, + 171, + 253, + 183 + ], + "type": "text", + "content": "4.1 Experiment Setup" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 190, + 482, + 345 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 190, + 482, + 345 + ], + "spans": [ + { + "bbox": [ + 130, + 190, + 482, + 345 + ], + "type": "text", + "content": "Datasets. We evaluate on four datasets spanning a wide range of visual reasoning skills and types of visual input: Visual Spatial Reasoning (VSR) [22], GQA [17], COVR [5], and NextQA [36]. For NextQA, we present results on the \"Hard Temporal\" subset which was curated to consist of questions that truly require temporal reasoning [7]. VSR and GQA include queries about single images, while COVR includes queries about multiple images, and NextQA includes queries about video. On each dataset, we evaluate methods by their accuracy in producing an answer that exactly matches the ground-truth answer. For NextQA, we adopt a multiple-choice setup in which we provide methods with the set of possible answer choices for each question. For VSR, a spatial statement of an image is made, and the question is framed as : \"Is it true or false,\" followed by the statement. In this way, a VSR statement is framed as a VQA question and the model will answer either true or false." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 130, + 346, + 482, + 418 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 346, + 482, + 418 + ], + "spans": [ + { + "bbox": [ + 130, + 346, + 482, + 418 + ], + "type": "text", + "content": "Implementation Details. We implement RVP using the ViperGPT API and the accompanying prompt template. For each dataset, we curate a set of in-context examples which are added to the prompt. The set of question-answer pairs is shared between the recursive and non-recursive methods. We use seven in-context examples for GQA, six for NextQA, six for VSR, and eight for COVR. For code generation, use GPT-3.5-turbo via the OpenAI API1." + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 132, + 435, + 265, + 447 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 435, + 265, + 447 + ], + "spans": [ + { + "bbox": [ + 132, + 435, + 265, + 447 + ], + "type": "text", + "content": "4.2 Quantitative Results" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 130, + 454, + 484, + 550 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 454, + 484, + 550 + ], + "spans": [ + { + "bbox": [ + 130, + 454, + 484, + 550 + ], + "type": "text", + "content": "Table 1 presents our results across four datasets. In all settings, we outperform ViperGPT, which is identical to RVP except that RVP includes recursive_query function in the API and in-context examples. This indicates that recursive programming indeed improves accuracy in visual reasoning tasks. Moreover, our method outperforms previous zero/few-shot methods in all but one of the settings. While our primary aim was not to push the state-of-the-art results, we show that integrating the clarity and elegance of recursive coding into standard VP methods not only doesn't impair performance, but can enhance it." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 132, + 567, + 258, + 578 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 567, + 258, + 578 + ], + "spans": [ + { + "bbox": [ + 132, + 567, + 258, + 578 + ], + "type": "text", + "content": "4.3 Qualitative Results" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 132, + 586, + 482, + 647 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 586, + 482, + 647 + ], + "spans": [ + { + "bbox": [ + 132, + 586, + 482, + 647 + ], + "type": "text", + "content": "We provide qualitative examples in Figure 3,6,7. In the example from COVR in Figure 3, the non-recursive approach answers with neither \"yes\" nor \"no,\" while the recursive approach does confirm to these choices. One possible explanation for this issue is that LLMs struggle to maintain coherence across long contexts [37]. RVP circumvents this issue by pushing the LLM to commit to the answer" + } + ] + } + ], + "index": 10 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "spans": [ + { + "bbox": [ + 133, + 91, + 140, + 100 + ], + "type": "text", + "content": "8" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + }, + { + "bbox": [ + 133, + 653, + 250, + 665 + ], + "type": "page_footnote", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 653, + 250, + 665 + ], + "spans": [ + { + "bbox": [ + 133, + 653, + 250, + 665 + ], + "type": "text", + "content": "1 wwwPLATFORM.openai.com" + } + ] + } + ], + "index": 11 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 7 + }, + { + "para_blocks": [ + { + "type": "table", + "bbox": [ + 155, + 201, + 455, + 292 + ], + "blocks": [ + { + "bbox": [ + 130, + 114, + 482, + 193 + ], + "lines": [ + { + "bbox": [ + 130, + 114, + 482, + 193 + ], + "spans": [ + { + "bbox": [ + 130, + 114, + 482, + 193 + ], + "type": "text", + "content": "Table 1: Results. We report exact-match accuracy on each dataset. Best zero/few-shot result for each dataset is bolded. †Fully supervised results are from different models: ViLT [19] for VSR, HiTeA [39] for NextQA, VinVL-Base [41] for GQA, and VisualBERT [20] for COVR. ‡We report the results of our reproduction of ViperGPT using the officially released code and the same in-context examples used for our method (since the original in-context examples from ViperGPT were not released). We use GPT3.5-turbo while CodeVQA uses Codex, which is not available anymore." + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 155, + 201, + 455, + 292 + ], + "lines": [ + { + "bbox": [ + 155, + 201, + 455, + 292 + ], + "spans": [ + { + "bbox": [ + 155, + 201, + 455, + 292 + ], + "type": "table", + "html": "
MethodVSRNextQAGQA Test-devCOVR Test
Random SplitZero-shot SplitHard Split-TTest-dev
Fully supervised†69.363.048.665.157.9
Zero/few-shot methods
CLIP56.054.5---
BLIPv2---42.31-
CodeVQA---49.050.7
ViperGPT‡61.2561.5947.2144.6351.69
RVP (ours)63.5366.0948.8245.6252.67
", + "image_path": "496ab97313fb4e20d67846ce56a2339f9cdcdbe1199030901a99f073198dd51d.jpg" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "table_body" + } + ], + "index": 3 + }, + { + "bbox": [ + 130, + 315, + 482, + 481 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 315, + 482, + 481 + ], + "spans": [ + { + "bbox": [ + 130, + 315, + 482, + 481 + ], + "type": "text", + "content": "types earlier in its generation (the length from the beginning of the code to the point \"return xxx\" is shorter). In Figure 6, the non-recursive approach fails to handle the logic correctly while the recursive approach correctly does. This is likely due to that RVP breaks down the code logic and each code piece only needs to focus on a single logic, while the non-recursive method attempts to handle all the logic at once. In the GQA example, a common pattern involves handling complex logical problems and multiple properties. Non-recursive methods often fell short in these cases, either overlooking critical details or processing them in a logically flawed manner. RVP manages these intricate questions by addressing each detail accurately. This difference may stem from the inherent difficulty LLMs face in processing complicated logic over extended contexts. Recursive methods simplify this by focusing on the overall logic and gradually breaking the problems down into smaller, more manageable segments. This facilitates easier and more accurate resolution." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 482, + 482, + 544 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 482, + 482, + 544 + ], + "spans": [ + { + "bbox": [ + 130, + 482, + 482, + 544 + ], + "type": "text", + "content": "We provide a dynamic type assignment example in Figure 5. In this example, RVP assigns the return type List[ImagePatch] in the recursive_query call. It's worth noting that the return type List[ImagePatch] is unseen in the in-context examples. This suggests that RVP has the potential to utilize complicated and diverse data structures, highlight the effectiveness of our approach." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 131, + 560, + 238, + 572 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 131, + 560, + 238, + 572 + ], + "spans": [ + { + "bbox": [ + 131, + 560, + 238, + 572 + ], + "type": "text", + "content": "4.4 Ablation Study" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 130, + 581, + 482, + 629 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 581, + 482, + 629 + ], + "spans": [ + { + "bbox": [ + 130, + 581, + 482, + 629 + ], + "type": "text", + "content": "Dynamic Type This section studies integrating dynamic type assignment within the recursive_query API. For the GQA dataset, we examined all instances with recursive patterns in the test_dev split. In COVR, where the test set is unavailable, we used the val_1000 samples from the validation set, following [30]." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 130, + 630, + 482, + 665 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 630, + 482, + 665 + ], + "spans": [ + { + "bbox": [ + 130, + 630, + 482, + 665 + ], + "type": "text", + "content": "We compare four approaches: Non-recursive Baseline: Standard approach without recursive features. Fixed-Type Recursive: The recursive_query API is constrained to return a string. Dynamic-Implicit Recursive: The API" + } + ] + } + ], + "index": 8 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "spans": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "spans": [ + { + "bbox": [ + 474, + 92, + 480, + 100 + ], + "type": "text", + "content": "9" + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 8 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 134, + 115, + 480, + 418 + ], + "blocks": [ + { + "bbox": [ + 134, + 115, + 480, + 418 + ], + "lines": [ + { + "bbox": [ + 134, + 115, + 480, + 418 + ], + "spans": [ + { + "bbox": [ + 134, + 115, + 480, + 418 + ], + "type": "image", + "image_path": "96032daf77e87f35d0d7e22e44648709dd0d14974fd7eb030569176dd9312844.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 132, + 426, + 482, + 450 + ], + "lines": [ + { + "bbox": [ + 132, + 426, + 482, + 450 + ], + "spans": [ + { + "bbox": [ + 132, + 426, + 482, + 450 + ], + "type": "text", + "content": "Fig. 6: Examples from COVR. RVP allows correct logic flow while traditional nonrecursive VP fails to handle the logic correctly." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_caption" + } + ], + "index": 2 + }, + { + "bbox": [ + 130, + 478, + 482, + 528 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 478, + 482, + 528 + ], + "spans": [ + { + "bbox": [ + 130, + 478, + 482, + 528 + ], + "type": "text", + "content": "can return various types, but the specific type is not predefined in the query. For example, \"Is there a black cat?\" could yield either a boolean or a string. Dynamic-Explicit Recursive: Our primary approach, where the API's input query specifies the return type, like \"Return a bool, is there a black cat?\"" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 533, + 483, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 533, + 483, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 533, + 483, + 666 + ], + "type": "text", + "content": "Table 2 shows our findings. The dynamic-explicit type assignment outperformed other methods, underscoring the need for clear type specification. The dynamic-implicit method showed lower performance than non-recursive due to type ambiguities, as exemplified in Figure 8, where the first code piece assumes the return type is a bool, while the second code piece returns a str. Fixed-type assignment proves to be beneficial over non-recursive methods, indicating that recursion itself adds value, but its rigidity in type handling limits performance. This study highlights the benefits of flexible, dynamic type assignment and the crucial role of explicit type declaration for accurate and consistent responses. These insights mark a step towards more adaptable visual reasoning frameworks, emphasizing the need for precision in dynamic environments." + } + ] + } + ], + "index": 5 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 134, + 91, + 144, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 134, + 91, + 144, + 100 + ], + "spans": [ + { + "bbox": [ + 134, + 91, + 144, + 100 + ], + "type": "text", + "content": "10" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 203, + 100 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 203, + 100 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 203, + 100 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 9 + }, + { + "para_blocks": [ + { + "type": "image", + "bbox": [ + 137, + 114, + 477, + 276 + ], + "blocks": [ + { + "bbox": [ + 137, + 114, + 477, + 276 + ], + "lines": [ + { + "bbox": [ + 137, + 114, + 477, + 276 + ], + "spans": [ + { + "bbox": [ + 137, + 114, + 477, + 276 + ], + "type": "image", + "image_path": "68ee3982eab4da0234e24377af0769c55cfb81cf4fbef81d73669132562e818b.jpg" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "image_body" + } + ], + "index": 2 + }, + { + "type": "image", + "bbox": [ + 137, + 277, + 477, + 462 + ], + "blocks": [ + { + "bbox": [ + 137, + 277, + 477, + 462 + ], + "lines": [ + { + "bbox": [ + 137, + 277, + 477, + 462 + ], + "spans": [ + { + "bbox": [ + 137, + 277, + 477, + 462 + ], + "type": "image", + "image_path": "7289d0e956b6012d08344c50375c505214c6fb3d6a09b6bebfa0f820f4e5b31e.jpg" + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 132, + 472, + 481, + 495 + ], + "lines": [ + { + "bbox": [ + 132, + 472, + 481, + 495 + ], + "spans": [ + { + "bbox": [ + 132, + 472, + 481, + 495 + ], + "type": "text", + "content": "Fig. 7: Examples from GQA. RVP allows handling the details more elegantly and produces logically correct code." + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "image_caption" + } + ], + "index": 3 + }, + { + "bbox": [ + 130, + 521, + 480, + 545 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 521, + 480, + 545 + ], + "spans": [ + { + "bbox": [ + 130, + 521, + 480, + 545 + ], + "type": "text", + "content": "In-Context Examples We conduct ablation on using retrieval-based in-context example selection and using different number of in-context examples." + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 130, + 546, + 482, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 546, + 482, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 546, + 482, + 666 + ], + "type": "text", + "content": "Retrieval-based in-context example selection. We manage to write 9 programs using the recursive method from the 50 provided by CodeVQA [30], and add our original 3 recursive programs to them. We keep the non-recursive in-context example unchanged and choose 3 recursive in-context examples from these 12 for each question. We follow [35] to use the embedding-based retrieval technique that calculates a score for each example, and then select the top 3 examples for each question. The results of GQA_val_2000 are in Table 2. We find that the recursive pattern occurrence rate is significantly higher than using fixed in-context examples. This is likely because by retrieving similar recursively-decomposed questions, the model can more easily simulate their pat" + } + ] + } + ], + "index": 6 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "spans": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 470, + 92, + 479, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 470, + 92, + 479, + 100 + ], + "spans": [ + { + "bbox": [ + 470, + 92, + 479, + 100 + ], + "type": "text", + "content": "11" + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 10 + }, + { + "para_blocks": [ + { + "bbox": [ + 130, + 116, + 482, + 187 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 116, + 482, + 187 + ], + "spans": [ + { + "bbox": [ + 130, + 116, + 482, + 187 + ], + "type": "text", + "content": "terns, thereby attempting to solve more problems recursively. However, the overall accuracy does not improve. This suggests that although the retrieval-based method encourages more diverse and suitable patterns of recursive decomposition, there is a need for improved techniques in selecting the example pool—such as focusing on those most suitable for recursive decomposition instead of randomly selecting—along with careful tuning of the example programs." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 130, + 188, + 482, + 236 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 188, + 482, + 236 + ], + "spans": [ + { + "bbox": [ + 130, + 188, + 482, + 236 + ], + "type": "text", + "content": "Number of in-context examples. We randomly add one example/delete one example from the covr_1000_val, the results are shown in Table 2. The results indicate that adding the number of examples can enhance the performance, but does not have a significant impact." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 130, + 247, + 482, + 355 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 247, + 482, + 355 + ], + "spans": [ + { + "bbox": [ + 130, + 247, + 482, + 355 + ], + "type": "text", + "content": "Error feedback loop Recent studies have studied the debugging ability of LLMs on code [10]. We study whether modular visual code structure enables better bug identification for visual programming. We sample 20 incorrect programs for 10 questions that have type/logic errors, and use GPT3.5 to (1) identify the bug, and (2) write the correct code given the bug. For identification, the model correctly finds 7 bugs correctly for RVP and 2 for non-recursive visual programming. For correction, the model fixes 7 bugs correctly for RVP and 7 for visual programming. This suggests that clearer and more modular code structure, as presented RVP, can potentially aids bug identification." + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 364, + 482, + 431 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 364, + 482, + 431 + ], + "spans": [ + { + "bbox": [ + 130, + 364, + 482, + 431 + ], + "type": "text", + "content": "Table 2: Ablation study. (a) We provide ablation study results for dynamic type assignment and found that specified dynamic type assignment in RVP achieves the highest performance. (b) We provide results on using retrieval-based in-context examples and fixed examples. Retrieval-based method enables more diverse recursive patterns but requires careful choosing the prompt pool. (c) We provide results of using different number of examples and found this doesn't influence performance significantly." + } + ] + } + ], + "index": 5 + }, + { + "type": "table", + "bbox": [ + 138, + 463, + 269, + 531 + ], + "blocks": [ + { + "bbox": [ + 144, + 441, + 261, + 453 + ], + "lines": [ + { + "bbox": [ + 144, + 441, + 261, + 453 + ], + "spans": [ + { + "bbox": [ + 144, + 441, + 261, + 453 + ], + "type": "text", + "content": "(a) Dynamic Type Ablation." + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 138, + 463, + 269, + 531 + ], + "lines": [ + { + "bbox": [ + 138, + 463, + 269, + 531 + ], + "spans": [ + { + "bbox": [ + 138, + 463, + 269, + 531 + ], + "type": "table", + "html": "
MethodGQACOVR
Non-Recursive55.9960.71
Fixed-Type65.0560.12
Dynamic-Implicit55.3453.57
Dynamic-Explicit70.2367.86
", + "image_path": "c7572b10aeb5498e15731da1d5b06aaab0a3a3cd9bc31fcf04faf953bd090d35.jpg" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "table_body" + } + ], + "index": 7 + }, + { + "type": "table", + "bbox": [ + 279, + 472, + 386, + 531 + ], + "blocks": [ + { + "bbox": [ + 280, + 441, + 386, + 464 + ], + "lines": [ + { + "bbox": [ + 280, + 441, + 386, + 464 + ], + "spans": [ + { + "bbox": [ + 280, + 441, + 386, + 464 + ], + "type": "text", + "content": "(b) Retrieval-Based and Fixed Examples" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 279, + 472, + 386, + 531 + ], + "lines": [ + { + "bbox": [ + 279, + 472, + 386, + 531 + ], + "spans": [ + { + "bbox": [ + 279, + 472, + 386, + 531 + ], + "type": "table", + "html": "
FixedRetrieval
Accuracy54.7553.79
Rec Rate3.55%14.85%
Rec Acc71.8357.91
", + "image_path": "893966c64d7c77f5fe3a0a53d68e6a634e877000ec23d7becc5181806f12162d.jpg" + } + ] + } + ], + "index": 9, + "angle": 0, + "type": "table_body" + } + ], + "index": 9 + }, + { + "type": "table", + "bbox": [ + 398, + 473, + 476, + 531 + ], + "blocks": [ + { + "bbox": [ + 391, + 441, + 481, + 464 + ], + "lines": [ + { + "bbox": [ + 391, + 441, + 481, + 464 + ], + "spans": [ + { + "bbox": [ + 391, + 441, + 481, + 464 + ], + "type": "text", + "content": "(c) In-Context Example Num" + } + ] + } + ], + "index": 10, + "angle": 0, + "type": "table_caption" + }, + { + "bbox": [ + 398, + 473, + 476, + 531 + ], + "lines": [ + { + "bbox": [ + 398, + 473, + 476, + 531 + ], + "spans": [ + { + "bbox": [ + 398, + 473, + 476, + 531 + ], + "type": "table", + "html": "
MethodAccuracy
Del 150.65
Original51.05
Add 151.35
", + "image_path": "bebc2669a832fa6f24c63efb460af383106230a1eed24bcad68d5b818ea4993b.jpg" + } + ] + } + ], + "index": 11, + "angle": 0, + "type": "table_body" + } + ], + "index": 11 + }, + { + "bbox": [ + 131, + 551, + 253, + 563 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 131, + 551, + 253, + 563 + ], + "spans": [ + { + "bbox": [ + 131, + 551, + 253, + 563 + ], + "type": "text", + "content": "4.5 Readability Study" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 130, + 570, + 481, + 617 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 570, + 481, + 617 + ], + "spans": [ + { + "bbox": [ + 130, + 570, + 481, + 617 + ], + "type": "text", + "content": "This study investigates how recursive coding impacts code readability and comprehension for human programmers. Our goal is to move from complex code structures to more modular, clear, and understandable code. To evaluate this, we focus on code quality in terms of its understandability." + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 617, + 482, + 666 + ], + "type": "text", + "content": "From the COVR dataset, we randomly select one example from each five different question types where recursive patterns occur. We present the main function of both their recursive and non-recursive code versions to 15 participants and ask them to grasp the high-level intent of the code as quickly as" + } + ] + } + ], + "index": 14 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "spans": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "type": "text", + "content": "12" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 11 + }, + { + "para_blocks": [ + { + "type": "code", + "bbox": [ + 136, + 114, + 298, + 238 + ], + "blocks": [ + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "lines": [ + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "spans": [ + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "type": "text", + "content": "def execute(image) -> str: image_batch = ImagePatch(image) is.black_skateboard= image_batchrecursive_query(\"Are there any black skateboards?\") is_motorcycle " + }, + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "type": "text", + "content": " image_batchrecursive_query(\"Arethereanymotorcycles?\") return bool to yesno(is.black Skateboard or is_motorcycle) \ndef execute(image) -> str: image_batch " + }, + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "type": "text", + "content": " ImagePatch(image) skateboard_patches " + }, + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "type": "inline_equation", + "content": "=" + }, + { + "bbox": [ + 136, + 114, + 298, + 238 + ], + "type": "text", + "content": " image_batch.find(\"skateboard\") for skateboard_batch in skateboard_patches: If skateboard_batchverified_property(\"skateboard\", \"black\"): return \"yes\" return \"no\"" + } + ] + } + ], + "index": 2, + "angle": 0, + "type": "code_body" + }, + { + "bbox": [ + 133, + 243, + 299, + 252 + ], + "lines": [ + { + "bbox": [ + 133, + 243, + 299, + 252 + ], + "spans": [ + { + "bbox": [ + 133, + 243, + 299, + 252 + ], + "type": "text", + "content": "Return Type Confusion: Expect Bool but Actually Str." + } + ] + } + ], + "index": 3, + "angle": 0, + "type": "code_caption" + } + ], + "index": 2, + "sub_type": "code", + "guess_lang": "python" + }, + { + "type": "image", + "bbox": [ + 309, + 124, + 478, + 248 + ], + "blocks": [ + { + "bbox": [ + 309, + 124, + 478, + 248 + ], + "lines": [ + { + "bbox": [ + 309, + 124, + 478, + 248 + ], + "spans": [ + { + "bbox": [ + 309, + 124, + 478, + 248 + ], + "type": "image", + "image_path": "5d1427f2a49da9b18a5f78c59270b89ceb435daaf18ee769d6a2d32c42e9e657.jpg" + } + ] + } + ], + "index": 4, + "angle": 0, + "type": "image_body" + }, + { + "bbox": [ + 130, + 261, + 301, + 305 + ], + "lines": [ + { + "bbox": [ + 130, + 261, + 301, + 305 + ], + "spans": [ + { + "bbox": [ + 130, + 261, + 301, + 305 + ], + "type": "text", + "content": "Fig.8: Failure example of dynamic type assignment due to unspecified type, The model confuses the type and return a str instead of a bool." + } + ] + } + ], + "index": 5, + "angle": 0, + "type": "image_caption" + }, + { + "bbox": [ + 304, + 261, + 482, + 305 + ], + "lines": [ + { + "bbox": [ + 304, + 261, + 482, + 305 + ], + "spans": [ + { + "bbox": [ + 304, + 261, + 482, + 305 + ], + "type": "text", + "content": "Fig.9: Comparison of average understanding time for recursive and non-recursive codes. RVP demonstrates better readability and is easy to understand." + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "image_caption" + } + ], + "index": 4 + }, + { + "bbox": [ + 130, + 329, + 482, + 449 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 329, + 482, + 449 + ], + "spans": [ + { + "bbox": [ + 130, + 329, + 482, + 449 + ], + "type": "text", + "content": "possible. For the non-recursive case, the main function is just the single code snippet generated by the LLM. For the recursive case, the main function consists of the code generated by the first LLM call (the high level code) but not the functions generated by the recursive queries. This helps us measure how fast users can understand the code's intention by looking at the main function, and reflects the self-explanatory nature of the code. Figure 9 shows the results. Participants consistently understand the recursive code faster than the non-recursive versions. This quicker comprehension can be attributed to the recursive code's structured and clear approach. Non-recursive code, while correct, sometimes lacks immediate clarity in conveying its primary goal." + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 130, + 449, + 482, + 496 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 449, + 482, + 496 + ], + "spans": [ + { + "bbox": [ + 130, + 449, + 482, + 496 + ], + "type": "text", + "content": "We also calculate the average line length for all main and sub functions. For RVP, the average length of all functions is 8.47. For non-recursive VP, the average length of the functions is 15.4. This suggests that RVP decreases the average length the code pieces and enhances modularity." + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 130, + 497, + 482, + 545 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 497, + 482, + 545 + ], + "spans": [ + { + "bbox": [ + 130, + 497, + 482, + 545 + ], + "type": "text", + "content": "Our findings suggest that recursive coding not only simplifies complex code but also enhances its accessibility and ease of understanding. Its orderly structure and clear logic accelerate comprehension, leading to more efficient and user-friendly programming. We provide more details of this study in the supp." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 132, + 562, + 257, + 574 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 562, + 257, + 574 + ], + "spans": [ + { + "bbox": [ + 132, + 562, + 257, + 574 + ], + "type": "text", + "content": "4.6 Recursive Analysis" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 130, + 581, + 482, + 653 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 581, + 482, + 653 + ], + "spans": [ + { + "bbox": [ + 130, + 581, + 482, + 653 + ], + "type": "text", + "content": "Question Type. We study which types of questions tend to use recursive and found that recursive patterns appeared in five question types within both the COVR test set and the GQA test-dev set, as shown in Table 3. The 'Verify Property' and 'Query' types in GQA, and 'Compare' and 'Multi-Reference' in COVR, were most common. This suggests recursive methods tend to occur in tasks that require comparative and referential analysis." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 132, + 653, + 481, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 653, + 481, + 666 + ], + "spans": [ + { + "bbox": [ + 132, + 653, + 481, + 666 + ], + "type": "text", + "content": "Dynamic Type. We study which types of dynamic return types occurs and" + } + ] + } + ], + "index": 12 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "spans": [ + { + "bbox": [ + 321, + 91, + 447, + 102 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 470, + 91, + 480, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 470, + 91, + 480, + 100 + ], + "spans": [ + { + "bbox": [ + 470, + 91, + 480, + 100 + ], + "type": "text", + "content": "13" + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 12 + }, + { + "para_blocks": [ + { + "bbox": [ + 130, + 114, + 482, + 182 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 114, + 482, + 182 + ], + "spans": [ + { + "bbox": [ + 130, + 114, + 482, + 182 + ], + "type": "text", + "content": "Table 3: Recursive analysis. Table (a) provides the distribution of recursive patterns by question type in GQA and COVR. We have found that recursive patterns occur commonly in question types that require reasoning. Table (b) studies different recursive query return types and their frequency in GQA and COVR. The model generalizes to unseen types. Table (c) compares accuracy across question types. Recursive methods outperform non-recursive particularly in 'Choose' and 'Query' questions." + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 140, + 189, + 266, + 201 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 140, + 189, + 266, + 201 + ], + "spans": [ + { + "bbox": [ + 140, + 189, + 266, + 201 + ], + "type": "text", + "content": "(a) Dist. of Recursive Patterns" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 271, + 189, + 378, + 201 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 271, + 189, + 378, + 201 + ], + "spans": [ + { + "bbox": [ + 271, + 189, + 378, + 201 + ], + "type": "text", + "content": "(b) Diverse Return Types" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 389, + 189, + 468, + 201 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 389, + 189, + 468, + 201 + ], + "spans": [ + { + "bbox": [ + 389, + 189, + 468, + 201 + ], + "type": "text", + "content": "(c) Type Accuracy" + } + ] + } + ], + "index": 5 + }, + { + "type": "table", + "bbox": [ + 142, + 209, + 264, + 308 + ], + "blocks": [ + { + "bbox": [ + 142, + 209, + 264, + 308 + ], + "lines": [ + { + "bbox": [ + 142, + 209, + 264, + 308 + ], + "spans": [ + { + "bbox": [ + 142, + 209, + 264, + 308 + ], + "type": "table", + "html": "
COVR/GQAQuestion Types
COVRGQA
Compare45715
Mult. Ref282-
Quant. Attr12-
Spec Attr357-
Choose125
Verify-68
Query-167
Logical-34
", + "image_path": "c3ec4fc02156296064b0cc19376ec9964bd0c0a61d3507bb99e8ff47e76d118c.jpg" + } + ] + } + ], + "index": 6, + "angle": 0, + "type": "table_body" + } + ], + "index": 6 + }, + { + "type": "table", + "bbox": [ + 270, + 210, + 377, + 287 + ], + "blocks": [ + { + "bbox": [ + 270, + 210, + 377, + 287 + ], + "lines": [ + { + "bbox": [ + 270, + 210, + 377, + 287 + ], + "spans": [ + { + "bbox": [ + 270, + 210, + 377, + 287 + ], + "type": "table", + "html": "
Data TypeGQACOVR
Str3191828
Bool521592
List[str]16-
ImagePatch30-
List[ImgPatch]15
Float6-
Int-914
", + "image_path": "c64a9c635a2dca6e0741c5521f4b7e3ea2d55902cf6856c7c7b06de6f69fa8b1.jpg" + } + ] + } + ], + "index": 7, + "angle": 0, + "type": "table_body" + } + ], + "index": 7 + }, + { + "type": "table", + "bbox": [ + 380, + 210, + 477, + 285 + ], + "blocks": [ + { + "bbox": [ + 380, + 210, + 477, + 285 + ], + "lines": [ + { + "bbox": [ + 380, + 210, + 477, + 285 + ], + "spans": [ + { + "bbox": [ + 380, + 210, + 477, + 285 + ], + "type": "table", + "html": "
QuestionAccuracy (%)
Non-RecRec
Verify52.9464.71
Query56.8971.86
Logical55.8870.59
Compare66.6753.33
Choose52.0084.00
", + "image_path": "ddc4faaf47e79e153aacf695e7aeb7a74d5690893d1cf14b51e72d0894afff2a.jpg" + } + ] + } + ], + "index": 8, + "angle": 0, + "type": "table_body" + } + ], + "index": 8 + }, + { + "bbox": [ + 130, + 316, + 481, + 363 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 316, + 481, + 363 + ], + "spans": [ + { + "bbox": [ + 130, + 316, + 481, + 363 + ], + "type": "text", + "content": "their frequently in GQA and COVR. In Table 3, we found that RVP generalizes to new types like List[str] and List[ImagePatch], which are not included in the in-context examples. This flexibility and ability to generalize beyond in-context examples highlight the inherent adaptability of recursive methods." + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 130, + 364, + 481, + 423 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 364, + 481, + 423 + ], + "spans": [ + { + "bbox": [ + 130, + 364, + 481, + 423 + ], + "type": "text", + "content": "Type Accuracy. We evaluate the accuracy of recursive methods across different question types. An analysis of the GQA test-dev set is presented in Table 3. It reveals that recursive methods significantly improve accuracy in 'Query', 'Logical', and 'Choose' questions. This underscores their suitability for complex reasoning and decision-making tasks." + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "spans": [ + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "text", + "content": "Error Source. We sample 50 incorrect recursive examples from GQA2000val and manually check the error source: " + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "inline_equation", + "content": "22\\%" + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "text", + "content": " are caused by logic error inside subfunctions; " + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "inline_equation", + "content": "18\\%" + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "text", + "content": " are caused by logic error between functions; " + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "inline_equation", + "content": "52\\%" + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "text", + "content": " are caused by API model inaccuracy (i.e. detection model error); and " + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "inline_equation", + "content": "4\\%" + }, + { + "bbox": [ + 130, + 424, + 481, + 483 + ], + "type": "text", + "content": " are caused by other problems like the groundtruth answer unclear." + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 130, + 483, + 481, + 508 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 483, + 481, + 508 + ], + "spans": [ + { + "bbox": [ + 130, + 483, + 481, + 508 + ], + "type": "text", + "content": "Cost And Runtime. For the questions which require recursive query, RVP takes about 2.1 times (runtime) and about 3 times (cost) compared to ViperGPT." + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 131, + 521, + 313, + 533 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 131, + 521, + 313, + 533 + ], + "spans": [ + { + "bbox": [ + 131, + 521, + 313, + 533 + ], + "type": "text", + "content": "5 Conclusion and Limitation" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 130, + 534, + 482, + 666 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 534, + 482, + 666 + ], + "spans": [ + { + "bbox": [ + 130, + 534, + 482, + 666 + ], + "type": "text", + "content": "In this work, we present RVP, a visual programming method that adopts recursive coding to generate concise, elegant and easy-to-understand code, handling details and intricate logic more accurately compared with traditional visual programming methods. We conduct extensive experiments across various benchmarks and provide a comprehensive analysis of RVP. Our work is the first to explore recursive programming in the visual domain and dynamic-type code generation for visual reasoning; we believe the recursive programming concept would have a potential greater impact on other domains as well. While RVP is effective for complicated visual questions, most questions in current VQA benchmarks tend to be short and non-recursive. We believe that the benefit of our method could be demonstrated better with a new benchmark or a more complex split." + } + ] + } + ], + "index": 14 + } + ], + "discarded_blocks": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "spans": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "type": "text", + "content": "14" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 13 + }, + { + "para_blocks": [ + { + "bbox": [ + 133, + 114, + 246, + 129 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 114, + 246, + 129 + ], + "spans": [ + { + "bbox": [ + 133, + 114, + 246, + 129 + ], + "type": "text", + "content": "Acknowledgements" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 130, + 139, + 481, + 174 + ], + "type": "text", + "angle": 0, + "lines": [ + { + "bbox": [ + 130, + 139, + 481, + 174 + ], + "spans": [ + { + "bbox": [ + 130, + 139, + 481, + 174 + ], + "type": "text", + "content": "We would like to thank Ben Bogin for helping us test on the private COVR test set, and Guangyuan Jiang for helping us proof read the paper and providing valuable feedback." + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 133, + 193, + 197, + 205 + ], + "type": "title", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 193, + 197, + 205 + ], + "spans": [ + { + "bbox": [ + 133, + 193, + 197, + 205 + ], + "type": "text", + "content": "References" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 138, + 217, + 481, + 665 + ], + "type": "list", + "angle": 0, + "index": 14, + "blocks": [ + { + "bbox": [ + 138, + 217, + 481, + 251 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 217, + 481, + 251 + ], + "spans": [ + { + "bbox": [ + 138, + 217, + 481, + 251 + ], + "type": "text", + "content": "1. Andreas, J., Rohrbach, M., Darrell, T., Klein, D.: Neural module networks. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) pp. 39-48 (2015), https://api-semanticscholar.org/CorpusID:5276660" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 138, + 251, + 481, + 282 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 251, + 481, + 282 + ], + "spans": [ + { + "bbox": [ + 138, + 251, + 481, + 282 + ], + "type": "text", + "content": "2. Andreas, J., Rohrbach, M., Darrell, T., Klein, D.: Learning to compose neural networks for question answering. ArXiv abs/1601.01705 (2016), https://apisemantic scholar.org/CorpusID:3130692" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 138, + 283, + 481, + 315 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 283, + 481, + 315 + ], + "spans": [ + { + "bbox": [ + 138, + 283, + 481, + 315 + ], + "type": "text", + "content": "3. Antol, S., Agrawal, A., Lu, J., Mitchell, M., Batra, D., Zitnick, C.L., Parikh, D.: Vqa: Visual question answering. In: Proceedings of the IEEE international conference on computer vision. pp. 2425-2433 (2015)" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 138, + 316, + 481, + 348 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 316, + 481, + 348 + ], + "spans": [ + { + "bbox": [ + 138, + 316, + 481, + 348 + ], + "type": "text", + "content": "4. Besta, M., Blach, N., Kubicek, A., Gerstenberger, R., Podstawski, M., Gianinazzi, L., Gajda, J., Lehmann, T., Niewiadomski, H., Nczyk, P., Hoefler, T.: Graph of thoughts: Solving elaborate problems with large language models (2024)" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 138, + 349, + 481, + 381 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 349, + 481, + 381 + ], + "spans": [ + { + "bbox": [ + 138, + 349, + 481, + 381 + ], + "type": "text", + "content": "5. Bogin, B., Gupta, S., Gardner, M., Berant, J.: Covr: A test-bed for visually grounded compositional generalization with real images. ArXiv abs/2109.10613 (2021), https://api.sementicscholar.org/CorpusID:237592834" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 138, + 381, + 481, + 479 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 381, + 481, + 479 + ], + "spans": [ + { + "bbox": [ + 138, + 381, + 481, + 479 + ], + "type": "text", + "content": "6. Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J.D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., Amodei, D.: Language models are few-shot learners. In: Larochelle, H., Ranzato, M., Hadsell, R., Balcan, M., Lin, H. (eds.) Advances in Neural Information Processing Systems. vol. 33, pp. 1877-1901. Curran Associates, Inc. (2020), https://proceedings.neurips.cc/paper/2020/file/1457c0d6bfb4967418bf8ac142f64a-Paper.pdf" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 138, + 479, + 481, + 512 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 479, + 481, + 512 + ], + "spans": [ + { + "bbox": [ + 138, + 479, + 481, + 512 + ], + "type": "text", + "content": "7. Buch, S., Eyzaguirre, C., Gaidon, A., Wu, J., Fei-Fei, L., Niebles, J.C.: Revisiting the \"Video\" in Video-Language Understanding. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (2022)" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 138, + 512, + 481, + 631 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 512, + 481, + 631 + ], + "spans": [ + { + "bbox": [ + 138, + 512, + 481, + 631 + ], + "type": "text", + "content": "8. Chen, M., Tworek, J., Jun, H., Yuan, Q., Ponde, H., Kaplan, J., Edwards, H., Burda, Y., Joseph, N., Brockman, G., Ray, A., Puri, R., Krueger, G., Petrov, M., Khlaaf, H., Sastry, G., Mishkin, P., Chan, B., Gray, S., Ryder, N., Pavlov, M., Power, A., Kaiser, L., Bavarian, M., Winter, C., Tillet, P., Such, F.P., Cummings, D.W., Plappert, M., Chantzis, F., Barnes, E., Herbert-Voss, A., Guss, W.H., Nichol, A., Babuschkin, I., Balaji, S.A., Jain, S., Carr, A., Leike, J., Achiam, J., Misra, V., Morikawa, E., Radford, A., Knight, M.M., Brundage, M., Murati, M., Mayer, K., Welinder, P., McGrew, B., Amodei, D., McCandlish, S., Sutskever, I., Zaremba, W.: Evaluating large language models trained on code. ArXiv abs/2107.03374 (2021), https://api-semanticscholar.org/CorpusID: 235755472" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 138, + 632, + 481, + 665 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 138, + 632, + 481, + 665 + ], + "spans": [ + { + "bbox": [ + 138, + 632, + 481, + 665 + ], + "type": "text", + "content": "9. Chen, W., Ma, X., Wang, X., Cohen, W.W.: Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks. Transactions on Machine Learning Research (2023)" + } + ] + } + ], + "index": 13 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "spans": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 470, + 92, + 480, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 470, + 92, + 480, + 100 + ], + "spans": [ + { + "bbox": [ + 470, + 92, + 480, + 100 + ], + "type": "text", + "content": "15" + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 14 + }, + { + "para_blocks": [ + { + "bbox": [ + 132, + 116, + 481, + 666 + ], + "type": "list", + "angle": 0, + "index": 18, + "blocks": [ + { + "bbox": [ + 133, + 116, + 480, + 138 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 116, + 480, + 138 + ], + "spans": [ + { + "bbox": [ + 133, + 116, + 480, + 138 + ], + "type": "text", + "content": "10. Chen, X., Lin, M., Scharli, N., Zhou, D.: Teaching large language models to self-debug. arXiv preprint arXiv:2304.05128 (2023)" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 133, + 139, + 481, + 182 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 139, + 481, + 182 + ], + "spans": [ + { + "bbox": [ + 133, + 139, + 481, + 182 + ], + "type": "text", + "content": "11. Cheng, Z., Xie, T., Shi, P., Li, C., Nadkarni, R., Hu, Y., Xiong, C., Radev, D.R., Ostendorf, M., Zettlemoyer, L., Smith, N.A., Yu, T.: Binding language models in symbolic languages. ArXiv abs/2210.02875 (2022), https://api-semanticscholar.org/CorpusID:252734772" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 132, + 182, + 480, + 205 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 182, + 480, + 205 + ], + "spans": [ + { + "bbox": [ + 132, + 182, + 480, + 205 + ], + "type": "text", + "content": "12. Cho, J., Zala, A., Bansal, M.: Visual programming for text-to-image generation and evaluation. NeurIPS (2023)" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 132, + 205, + 480, + 226 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 205, + 480, + 226 + ], + "spans": [ + { + "bbox": [ + 132, + 205, + 480, + 226 + ], + "type": "text", + "content": "13. Gao, L., Madaan, A., Zhou, S., Alon, U., Liu, P., Yang, Y., Callan, J., Neubig, G.: Pal: Program-aided language models. arXiv preprint arXiv:2211.10435 (2022)" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 132, + 227, + 480, + 270 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 227, + 480, + 270 + ], + "spans": [ + { + "bbox": [ + 132, + 227, + 480, + 270 + ], + "type": "text", + "content": "14. Gupta, T., Kembhavi, A.: Visual programming: Compositional visual reasoning without training. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) pp. 14953-14962 (2022), https://api-semanticscholar.org/CorpusID:253734854" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 132, + 271, + 480, + 315 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 271, + 480, + 315 + ], + "spans": [ + { + "bbox": [ + 132, + 271, + 480, + 315 + ], + "type": "text", + "content": "15. Hu, R., Andreas, J., Rohrbach, M., Darrell, T., Saenko, K.: Learning to reason: End-to-end module networks for visual question answering. 2017 IEEE International Conference on Computer Vision (ICCV) pp. 804-813 (2017), https://api_semanticscholar.org/CorpusID:18682" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 132, + 316, + 480, + 358 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 316, + 480, + 358 + ], + "spans": [ + { + "bbox": [ + 132, + 316, + 480, + 358 + ], + "type": "text", + "content": "16. Hudson, D.A., Manning, C.D.: Gqa: A new dataset for real-world visual reasoning and compositional question answering. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) pp. 6693-6702 (2019), https://apisemantic scholar.org/CorpusID:152282269" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 132, + 358, + 480, + 402 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 358, + 480, + 402 + ], + "spans": [ + { + "bbox": [ + 132, + 358, + 480, + 402 + ], + "type": "text", + "content": "17. Hudson, D.A., Manning, C.D.: Gqa: A new dataset for real-world visual reasoning and compositional question answering. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) pp. 6693-6702 (2019), https://apisemantic scholar.org/CorpusID:152282269" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 132, + 403, + 480, + 435 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 403, + 480, + 435 + ], + "spans": [ + { + "bbox": [ + 132, + 403, + 480, + 435 + ], + "type": "text", + "content": "18. Hudson, D.A., Manning, C.D.: Learning by abstraction: The neural state machine. In: Neural Information Processing Systems (2019), https://api-semanticscholar.org/CorpusID:195847902" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 132, + 435, + 480, + 468 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 435, + 480, + 468 + ], + "spans": [ + { + "bbox": [ + 132, + 435, + 480, + 468 + ], + "type": "text", + "content": "19. Kim, W., Son, B., Kim, I.: Vilt: Vision-and-language transformer without convolution or region supervision. In: International Conference on Machine Learning (2021), https://api-semanticscholar.org/CorpusID:231839613" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 132, + 468, + 480, + 501 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 468, + 480, + 501 + ], + "spans": [ + { + "bbox": [ + 132, + 468, + 480, + 501 + ], + "type": "text", + "content": "20. Li, L.H., Yatskar, M., Yin, D., Hsieh, C.J., Chang, K.W.: Visualbert: A simple and performant baseline for vision and language. ArXiv abs/1908.03557 (2019), https://api_semanticscholar.org/CorpusID:199528533" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 132, + 501, + 480, + 534 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 501, + 480, + 534 + ], + "spans": [ + { + "bbox": [ + 132, + 501, + 480, + 534 + ], + "type": "text", + "content": "21. Liang, J., Huang, W., Xia, F., Xu, P., Hausman, K., Ichter, B., Florence, P., Zeng, A.: Code as policies: Language model programs for embodied control. In: arXiv preprint arXiv:2209.07753 (2022)" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 132, + 534, + 480, + 566 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 534, + 480, + 566 + ], + "spans": [ + { + "bbox": [ + 132, + 534, + 480, + 566 + ], + "type": "text", + "content": "22. Liu, F., Emerson, G.E.T., Collier, N.: Visual spatial reasoning. Transactions of the Association for Computational Linguistics 11, 635-651 (2022), https://apisemantic scholar.org/CorpusID:248496506" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 132, + 567, + 480, + 600 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 567, + 480, + 600 + ], + "spans": [ + { + "bbox": [ + 132, + 567, + 480, + 600 + ], + "type": "text", + "content": "23. Lu, P., Peng, B., Cheng, H., Galley, M., Chang, K.W., Wu, Y.N., Zhu, S.C., Gao, J.: Chameleon: Plug-and-play compositional reasoning with large language models. arXiv preprint arXiv:2304.09842 (2023)" + } + ] + } + ], + "index": 15 + }, + { + "bbox": [ + 132, + 601, + 480, + 632 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 601, + 480, + 632 + ], + "spans": [ + { + "bbox": [ + 132, + 601, + 480, + 632 + ], + "type": "text", + "content": "24. Ma, Y.J., Liang, W., Wang, G., Huang, D.A., Bastani, O., Jayaraman, D., Zhu, Y., Fan, L., Anandkumar, A.: Eureka: Human-level reward design via coding large language models. arXiv preprint arXiv: Arxiv-2310.12931 (2023)" + } + ] + } + ], + "index": 16 + }, + { + "bbox": [ + 132, + 632, + 480, + 666 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 632, + 480, + 666 + ], + "spans": [ + { + "bbox": [ + 132, + 632, + 480, + 666 + ], + "type": "text", + "content": "25. Madaan, A., Zhou, S., Alon, U., Yang, Y., Neubig, G.: Language models of code are few-shot commonsense learners. In: Goldberg, Y., Kozareva, Z., Zhang, Y. (eds.) Proceedings of the 2022 Conference on Empirical Methods in Natural Language" + } + ] + } + ], + "index": 17 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "spans": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "type": "text", + "content": "16" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 202, + 100 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 202, + 100 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 202, + 100 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 15 + }, + { + "para_blocks": [ + { + "bbox": [ + 132, + 116, + 481, + 665 + ], + "type": "list", + "angle": 0, + "index": 16, + "blocks": [ + { + "bbox": [ + 149, + 116, + 480, + 149 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 149, + 116, + 480, + 149 + ], + "spans": [ + { + "bbox": [ + 149, + 116, + 480, + 149 + ], + "type": "text", + "content": "Processing. pp. 1384-1403. Association for Computational Linguistics, Abu Dhabi, United Arab Emirates (Dec 2022). https://doi.org/10.18653/v1/2022.emnlp-main.90, https://aclanthology.org/2022.emnlp-main.90" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 133, + 151, + 481, + 195 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 151, + 481, + 195 + ], + "spans": [ + { + "bbox": [ + 133, + 151, + 481, + 195 + ], + "type": "text", + "content": "26. Marino, K., Rastegari, M., Farhadi, A., Mottaghi, R.: Ok-vqa: A visual question answering benchmark requiring external knowledge. 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) pp. 3190-3199 (2019), https://api-semanticscholar.org/CorpusID:173991173" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 132, + 196, + 480, + 217 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 196, + 480, + 217 + ], + "spans": [ + { + "bbox": [ + 132, + 196, + 480, + 217 + ], + "type": "text", + "content": "27. OpenAI: Gpt-4 technical report. ArXiv abs/2303.08774 (2023), https://apisemantic scholar.org/CorpusID:257532815" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 132, + 219, + 480, + 251 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 219, + 480, + 251 + ], + "spans": [ + { + "bbox": [ + 132, + 219, + 480, + 251 + ], + "type": "text", + "content": "28. Press, O., Zhang, M., Min, S., Schmidt, L., Smith, N.A., Lewis, M.: Measuring and narrowing the compositionality gap in language models. ArXiv abs/2210.03350 (2022), https://api-semanticscholar.org/CorpusID:252762102" + } + ] + } + ], + "index": 5 + }, + { + "bbox": [ + 132, + 252, + 480, + 296 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 252, + 480, + 296 + ], + "spans": [ + { + "bbox": [ + 132, + 252, + 480, + 296 + ], + "type": "text", + "content": "29. Subramanian, S., Bogin, B., Gupta, N., Wolfson, T., Singh, S., Berant, J., Gardner, M.: Obtaining faithful interpretations from compositional neural networks. In: Annual Meeting of the Association for Computational Linguistics (2020), https://apisemantic scholar.org/CorpusID:218487535" + } + ] + } + ], + "index": 6 + }, + { + "bbox": [ + 132, + 297, + 481, + 373 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 297, + 481, + 373 + ], + "spans": [ + { + "bbox": [ + 132, + 297, + 481, + 373 + ], + "type": "text", + "content": "30. Subramanian, S., Narasimhan, M., Khangaonkar, K., Yang, K., Nagrani, A., Schmid, C., Zeng, A., Darrell, T., Klein, D.: Modular visual question answering via code generation. In: Rogers, A., Boyd-Graber, J., Okazaki, N. (eds.) Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers). pp. 747-761. Association for Computational Linguistics, Toronto, Canada (Jul 2023). https://doi.org/10.18653/v1/2023.acl-short.65, https://aclanthology.org/2023.acl-short.65" + } + ] + } + ], + "index": 7 + }, + { + "bbox": [ + 132, + 374, + 480, + 407 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 374, + 480, + 407 + ], + "spans": [ + { + "bbox": [ + 132, + 374, + 480, + 407 + ], + "type": "text", + "content": "31. Sur'is, D., Menon, S., Vondrick, C.: Vipergpt: Visual inference via python execution for reasoning. ArXiv abs/2303.08128 (2023), https://api_semanticscholar.org/CorpusID:257505358" + } + ] + } + ], + "index": 8 + }, + { + "bbox": [ + 132, + 408, + 480, + 441 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 408, + 480, + 441 + ], + "spans": [ + { + "bbox": [ + 132, + 408, + 480, + 441 + ], + "type": "text", + "content": "32. Suzgun, M., Scales, N., Scharli, N., Gehrmann, S., Tay, Y., Chung, H.W., Chowdhery, A., Le, Q.V., Chi, E.H., Zhou, D., et al.: Challenging big-bench tasks and whether chain-of-thought can solve them. arXiv preprint arXiv:2210.09261 (2022)" + } + ] + } + ], + "index": 9 + }, + { + "bbox": [ + 132, + 441, + 480, + 495 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 441, + 480, + 495 + ], + "spans": [ + { + "bbox": [ + 132, + 441, + 480, + 495 + ], + "type": "text", + "content": "33. Touvron, H., Lavril, T., Izacard, G., Martinet, X., Lachaux, M.A., Lacroix, T., Rozière, B., Goyal, N., Hambro, E., Azhar, F., Rodriguez, A., Joulin, A., Grave, E., Lample, G.: Llama: Open and efficient foundation language models. ArXiv abs/2302.13971 (2023), https://apisemanticscholar.org/CorpusID: 257219404" + } + ] + } + ], + "index": 10 + }, + { + "bbox": [ + 132, + 497, + 480, + 519 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 497, + 480, + 519 + ], + "spans": [ + { + "bbox": [ + 132, + 497, + 480, + 519 + ], + "type": "text", + "content": "34. Wang, X., Li, S., Ji, H.: Code4struct: Code generation for few-shot structured prediction from natural language. arXiv preprint arXiv:2210.12810 (2022)" + } + ] + } + ], + "index": 11 + }, + { + "bbox": [ + 132, + 520, + 480, + 563 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 520, + 480, + 563 + ], + "spans": [ + { + "bbox": [ + 132, + 520, + 480, + 563 + ], + "type": "text", + "content": "35. Wang, Z., Li, M., Xu, R., Zhou, L., Lei, J., Lin, X., Wang, S., Yang, Z., Zhu, C., Hoiem, D., et al.: Language models with image descriptors are strong few-shot video-language learners. Advances in Neural Information Processing Systems 35, 8483-8497 (2022)" + } + ] + } + ], + "index": 12 + }, + { + "bbox": [ + 132, + 565, + 480, + 597 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 565, + 480, + 597 + ], + "spans": [ + { + "bbox": [ + 132, + 565, + 480, + 597 + ], + "type": "text", + "content": "36. Xiao, J., Shang, X., Yao, A., Chua, T.S.: Next-qa: Next phase of question-answering to explaining temporal actions. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). pp. 9777–9786 (June 2021)" + } + ] + } + ], + "index": 13 + }, + { + "bbox": [ + 132, + 599, + 480, + 632 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 599, + 480, + 632 + ], + "spans": [ + { + "bbox": [ + 132, + 599, + 480, + 632 + ], + "type": "text", + "content": "37. Yang, K., Klein, D., Peng, N., Tian, Y.: Doc: Improving long story coherence with detailed outline control. In: Annual Meeting of the Association for Computational Linguistics (2023), https://api-semanticscholar.org/CorpusID:254877751" + } + ] + } + ], + "index": 14 + }, + { + "bbox": [ + 132, + 632, + 480, + 665 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 632, + 480, + 665 + ], + "spans": [ + { + "bbox": [ + 132, + 632, + 480, + 665 + ], + "type": "text", + "content": "38. Yao, S., Yu, D., Zhao, J., Shafran, I., Griffiths, T.L., Cao, Y., Narasimhan, K.: Tree of thoughts: Deliberate problem solving with large language models. arXiv preprint arXiv:2305.10601 (2023)" + } + ] + } + ], + "index": 15 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "spans": [ + { + "bbox": [ + 320, + 91, + 447, + 102 + ], + "type": "text", + "content": "Recursive Visual Programming" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 470, + 91, + 480, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 470, + 91, + 480, + 100 + ], + "spans": [ + { + "bbox": [ + 470, + 91, + 480, + 100 + ], + "type": "text", + "content": "17" + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 16 + }, + { + "para_blocks": [ + { + "bbox": [ + 132, + 116, + 481, + 293 + ], + "type": "list", + "angle": 0, + "index": 6, + "blocks": [ + { + "bbox": [ + 132, + 116, + 481, + 149 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 116, + 481, + 149 + ], + "spans": [ + { + "bbox": [ + 132, + 116, + 481, + 149 + ], + "type": "text", + "content": "39. Ye, Q., Xu, G., Yan, M., Xu, H., Qian, Q., Zhang, J., Huang, F.: Hitea: Hierarchical temporal-aware video-language pre-training. ArXiv abs/2212.14546 (2022), https://api-semanticscholar.org/CorpusID:255340506" + } + ] + } + ], + "index": 2 + }, + { + "bbox": [ + 132, + 150, + 481, + 205 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 150, + 481, + 205 + ], + "spans": [ + { + "bbox": [ + 132, + 150, + 481, + 205 + ], + "type": "text", + "content": "40. Yu, W., Gileadi, N., Fu, C., Kirmani, S., Lee, K.H., Gonzalez Arenas, M., Lewis Chiang, H.T., Erez, T., Hasenclever, L., Humplik, J., Ichter, B., Xiao, T., Xu, P., Zeng, A., Zhang, T., Heess, N., Sadigh, D., Tan, J., Tassa, Y., Xia, F.: Language to rewards for robotic skill synthesis. Arxiv preprint arXiv:2306.08647 (2023)" + } + ] + } + ], + "index": 3 + }, + { + "bbox": [ + 132, + 205, + 481, + 248 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 205, + 481, + 248 + ], + "spans": [ + { + "bbox": [ + 132, + 205, + 481, + 248 + ], + "type": "text", + "content": "41. Zhang, P., Li, X., Hu, X., Yang, J., Zhang, L., Wang, L., Choi, Y., Gao, J.: Vinvl: Revisiting visual representations in vision-language models. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) pp. 5575-5584 (2021), https://api_semanticscholar.org/CorpusID:235692795" + } + ] + } + ], + "index": 4 + }, + { + "bbox": [ + 132, + 249, + 481, + 293 + ], + "type": "ref_text", + "angle": 0, + "lines": [ + { + "bbox": [ + 132, + 249, + 481, + 293 + ], + "spans": [ + { + "bbox": [ + 132, + 249, + 481, + 293 + ], + "type": "text", + "content": "42. Zhou, D., Scharli, N., Hou, L., Wei, J., Scales, N., Wang, X., Schuurmans, D., Bousquet, O., Le, Q., hsin Chi, E.H.: Least-to-most prompting enables complex reasoning in large language models. ArXiv abs/2205.10625 (2022), https://api_semanticscholar.org/CorpusID:248986239" + } + ] + } + ], + "index": 5 + } + ], + "sub_type": "ref_text" + } + ], + "discarded_blocks": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "type": "page_number", + "angle": 0, + "lines": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "spans": [ + { + "bbox": [ + 133, + 91, + 144, + 100 + ], + "type": "text", + "content": "18" + } + ] + } + ], + "index": 0 + }, + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "header", + "angle": 0, + "lines": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "spans": [ + { + "bbox": [ + 166, + 91, + 203, + 101 + ], + "type": "text", + "content": "Ge et al." + } + ] + } + ], + "index": 1 + } + ], + "page_size": [ + 612, + 792 + ], + "page_idx": 17 + } + ], + "_backend": "vlm", + "_version_name": "2.6.4" +} \ No newline at end of file