Datasets:
Add files using upload-large-folder tool
Browse files- parse/test/2lDQLiH1W4/2lDQLiH1W4.md +373 -0
- parse/test/2lDQLiH1W4/2lDQLiH1W4_content_list.json +796 -0
- parse/test/2lDQLiH1W4/2lDQLiH1W4_middle.json +0 -0
- parse/test/2lDQLiH1W4/2lDQLiH1W4_model.json +0 -0
- parse/test/2msbbX3ydD/2msbbX3ydD.md +583 -0
- parse/test/2msbbX3ydD/2msbbX3ydD_content_list.json +0 -0
- parse/test/2msbbX3ydD/2msbbX3ydD_middle.json +0 -0
- parse/test/2msbbX3ydD/2msbbX3ydD_model.json +0 -0
- parse/test/3xHDeA8Noi/3xHDeA8Noi.md +0 -0
- parse/test/3xHDeA8Noi/3xHDeA8Noi_content_list.json +0 -0
- parse/test/3xHDeA8Noi/3xHDeA8Noi_middle.json +0 -0
- parse/test/3xHDeA8Noi/3xHDeA8Noi_model.json +0 -0
- parse/test/BWSTBrmRqD/BWSTBrmRqD.md +338 -0
- parse/test/BWSTBrmRqD/BWSTBrmRqD_content_list.json +767 -0
- parse/test/BWSTBrmRqD/BWSTBrmRqD_middle.json +0 -0
- parse/test/BWSTBrmRqD/BWSTBrmRqD_model.json +0 -0
- parse/test/FQepisCUWu/FQepisCUWu.md +253 -0
- parse/test/FQepisCUWu/FQepisCUWu_content_list.json +523 -0
- parse/test/FQepisCUWu/FQepisCUWu_middle.json +0 -0
- parse/test/FQepisCUWu/FQepisCUWu_model.json +0 -0
- parse/test/MLBdiWu4Fw/MLBdiWu4Fw.md +440 -0
- parse/test/MLBdiWu4Fw/MLBdiWu4Fw_content_list.json +0 -0
- parse/test/MLBdiWu4Fw/MLBdiWu4Fw_middle.json +0 -0
- parse/test/MLBdiWu4Fw/MLBdiWu4Fw_model.json +0 -0
- parse/test/TrloAXEJ2B/TrloAXEJ2B.md +301 -0
- parse/test/TrloAXEJ2B/TrloAXEJ2B_content_list.json +726 -0
- parse/test/TrloAXEJ2B/TrloAXEJ2B_middle.json +0 -0
- parse/test/TrloAXEJ2B/TrloAXEJ2B_model.json +0 -0
- parse/test/bx24KpJ4Eb/bx24KpJ4Eb.md +0 -0
- parse/test/bx24KpJ4Eb/bx24KpJ4Eb_content_list.json +0 -0
- parse/test/bx24KpJ4Eb/bx24KpJ4Eb_middle.json +0 -0
- parse/test/bx24KpJ4Eb/bx24KpJ4Eb_model.json +0 -0
- parse/test/mw1PWNSWZP/mw1PWNSWZP_content_list.json +498 -0
- parse/test/mw1PWNSWZP/mw1PWNSWZP_middle.json +0 -0
- parse/test/mw1PWNSWZP/mw1PWNSWZP_model.json +0 -0
- parse/test/rp5vfyp5Np/rp5vfyp5Np.md +543 -0
- parse/test/rp5vfyp5Np/rp5vfyp5Np_content_list.json +0 -0
- parse/test/rp5vfyp5Np/rp5vfyp5Np_middle.json +0 -0
- parse/test/rp5vfyp5Np/rp5vfyp5Np_model.json +0 -0
- parse/test/rzQGHXNReU/rzQGHXNReU.md +203 -0
- parse/test/rzQGHXNReU/rzQGHXNReU_content_list.json +428 -0
- parse/test/rzQGHXNReU/rzQGHXNReU_middle.json +0 -0
- parse/test/rzQGHXNReU/rzQGHXNReU_model.json +0 -0
- parse/test/y0GJXRungR/y0GJXRungR.md +0 -0
- parse/test/y0GJXRungR/y0GJXRungR_content_list.json +0 -0
- parse/test/y0GJXRungR/y0GJXRungR_middle.json +0 -0
- parse/test/y0GJXRungR/y0GJXRungR_model.json +0 -0
- parse/test/zl16jLb91v/zl16jLb91v.md +0 -0
- parse/test/zl16jLb91v/zl16jLb91v_content_list.json +0 -0
- parse/test/zl16jLb91v/zl16jLb91v_model.json +0 -0
parse/test/2lDQLiH1W4/2lDQLiH1W4.md
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INSTANT3D: FAST TEXT-TO-3D WITH SPARSE-VIEW GENERATION AND LARGE RECONSTRUCTION MODEL
|
| 2 |
+
|
| 3 |
+
Jiahao $\mathbf { L i } ^ { 1 , 2 * }$ Hao Tan1 Kai Zhang1 Zexiang $\mathbf { X } \mathbf { u } ^ { 1 }$ Fujun Luan1 Yinghao $\mathbf { X } \mathbf { u } ^ { 1 , 3 }$ Yicong Hong1,4 Kalyan Sunkavalli1 Greg Shakhnarovich2 Sai Bi1
|
| 4 |
+
|
| 5 |
+
1Adobe Research 2TTIC 3Stanford University 4 Australian National Univeristy {jiahao,greg}@ttic.edu yhxu@stanford.edu mr.yiconghong@gmail.com {hatan,kaiz,zexu,fluan,sunkaval,sbi}@adobe.com
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Text-to-3D with diffusion models has achieved remarkable progress in recent years. However, existing methods either rely on score distillation-based optimization which suffer from slow inference, low diversity and Janus problems, or are feed-forward methods that generate low-quality results due to the scarcity of 3D training data. In this paper, we propose Instant3D, a novel method that generates high-quality and diverse 3D assets from text prompts in a feed-forward manner. We adopt a two-stage paradigm, which first generates a sparse set of four structured and consistent views from text in one shot with a fine-tuned 2D text-to-image diffusion model, and then directly regresses the NeRF from the generated images with a novel transformer-based sparse-view reconstructor. Through extensive experiments, we demonstrate that our method can generate diverse 3D assets of high visual quality within 20 seconds, which is two orders of magnitude faster than previous optimization-based methods that can take 1 to 10 hours. Our project webpage is: https://jiahao.ai/instant3d/.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
In recent years, remarkable progress has been achieved in the field of 2D image generation. This success can be attributed to two key factors: the development of novel generative models such as diffusion models (Song et al., 2021; Ho et al., 2020; Ramesh et al., 2022; Rombach et al., 2021), and the availability of large-scale datasets like Laion5B (Schuhmann et al., 2022). Transferring this success in 2D image generation to 3D presents challenges, mainly due to the scarcity of available 3D training data. While Laion5B has 5 billion text-image pairs, Objaverse-XL (Deitke et al., 2023a), the largest public 3D dataset, contains only 10 million 3D assets with less diversity and poorer annotations. As a result, previous attempts to directly train 3D diffusion models on existing 3D datasets (Luo & Hu, 2021; Nichol et al., 2022; Jun & Nichol, 2023; Gupta et al., 2023; Chen et al., 2023b) are limited in the visual (shape and appearance) quality, diversity and compositional complexity of the results they can produce.
|
| 14 |
+
|
| 15 |
+
To address this, another line of methods (Poole et al., 2022; Wang et al., 2023a; Lin et al., 2023; Wang et al., 2023b; Chen et al., 2023c) leverage the semantic understanding and high-quality generation capabilities of pretrained 2D diffusion models. Here, 2D generators are used to calculate gradients on rendered images, which are then used to optimize a 3D representation, usually a NeRF (Mildenhall et al., 2020). Although these methods yield better visual quality and text-3D alignment, they can be incredibly time-consuming, taking hours of optimization for each prompt. They also suffer from artifacts such as over-saturated colors and the “multi-face” problem arising from the bias in pretrained 2D diffusion models, and struggle to generate diverse results from the same text prompt, with varying the random seed leading to minor changes in geometry and texture.
|
| 16 |
+
|
| 17 |
+
In this paper, we propose Instant3D, a novel feed-forward method that generates high-quality and diverse 3D assets conditioned on the text prompt. Instant3D, like the methods noted above, builds on top of pretrained 2D diffusion models. However, it does so by splitting 3D generation into two stages: 2D generation and 3D reconstruction. In the first stage, instead of generating images sequentially (Liu et al., 2023b), we fine-tune an existing text-to-image diffusion model (Podell et al., 2023) to generate a sparse set of four-view images in the form of a $2 \times 2$ grid in a single denoising process. This design allows the multi-view images to attend to each other during generation, leading to more view-consistent results. In the second stage, instead of relying on a slow optimizationbased reconstruction method, inspired by Hong et al. (2024), we introduce a novel sparse-view large reconstruction model with a transformer-based architecture that can directly regress a triplanebased (Chan et al., 2022) NeRF from a sparse set of multi-view images. Our model projects sparseview images into a set of pose-aware image tokens using pretrained vision transformers (Caron et al., 2021), which are then fed to an image-to-triplane decoder that contains a sequence of transformer blocks with cross-attention and self-attention layers. Our proposed model has a large capacity with more than 500 million parameters and can robustly infer correct geometry and appearance of objects from just four images.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Our method generates high-quality 3D NeRF assets from the given text prompts within 20 seconds. Here we show novel view renderings from our generated NeRFs as well as the renderings of the extracted meshes from their density field.
|
| 21 |
+
|
| 22 |
+
Both of these stages are fine-tuned/trained with multi-view rendered images of around 750K 3D objects from Objaverse (Deitke et al., 2023b), where the second stage makes use of the full dataset and the first stage can be fine-tuned with as little as 10K data. While we use a relatively smaller dataset compared to the pre-training dataset for other modalities (e.g., C4 Raffel et al. (2020) for text and Laion5B for image), by combining it with the power of pretrained 2D diffusion models, Instant3D’s two-stage approach is able to generate high-quality and diverse 3D assets even from input prompts that contain complex compositional concepts (see Figure 1) and do not exist in the 3D dataset used for training. Due to its feed-forward architecture, Instant3D is exceptionally fast, requiring only about 20 seconds to generate a 3D asset, which is $2 0 0 \times$ faster than previous optimization-based methods (Poole et al., 2022; Wang et al., 2023b) while achieving comparable or even better quality.
|
| 23 |
+
|
| 24 |
+
# 2 RELATED WORKS
|
| 25 |
+
|
| 26 |
+
3D generation. Following the success of generative models on 2D images using VAEs (Kingma & Welling, 2013; Van Den Oord et al., 2017), GANs (Goodfellow et al., 2014; Karras et al., 2019; Gu et al., 2022; Kang et al., 2023), and autoregressive models (Oord et al., 2016; Van Den Oord et al., 2016), people have also explored the applications of such models on 3D generation. Previous approaches have explored different methods to generate 3D models in the form of point clouds (Wu et al., 2016; Gadelha et al., 2017; Smith & Meger, 2017), triangle meshes (Gao et al., 2022; Pavllo et al., 2020; Chen et al., 2019; Luo et al., 2021) , volumes (Chan et al., 2022; Or-El et al., 2022; Bergman et al., 2022; Skorokhodov et al., 2022; Mittal et al., 2022) and implicit representations (Liu et al., 2022; Fu et al., 2022; Sanghi et al., 2022) in an unconditional or text/image-conditioned manner. Such methods are usually trained on limited categories of 3D objects and do not generalize well to a wide range of novel classes.
|
| 27 |
+
|
| 28 |
+
Diffusion models (Rombach et al., 2021; Podell et al., 2023; Ho et al., 2020; Song et al., 2021; Saharia et al., 2022) open new possibilities for 3D generation. A class of methods directly train 3D diffusion models on the 3D representations (Nichol et al., 2022; Liu et al., 2023c; Zhou et al., 2021; Sanghi et al., 2023) or project the 3D models or multi-view rendered images into latent representations (Ntavelis et al., 2023; Zeng et al., 2022; Gupta et al., 2023; Jun & Nichol, 2023; Chen et al., 2023b) and perform the diffusion process in the latent space. For example, Shap-E (Jun & Nichol, 2023) encodes each 3D shape into a set of parameters of an implicit function, and then trains a conditional diffusion model on the parameters. These approaches face challenges due to the restricted availability and diversity of existing 3D data, consequently resulting in generated content with poor visual quality and inadequate alignment with the input prompt. Therefore, although trained on millions of 3D assets, Shap-E still fails to generate 3D shapes with complex compositional concepts and high-fidelity textures.
|
| 29 |
+
|
| 30 |
+
To resolve this, another line of works try to make use of 2D diffusion models to facilitate 3D generation. Some works (Jain et al., 2022; Mohammad Khalid et al., 2022) optimize meshes or NeRFs to maximize the CLIP Radford et al. (2021) score between the rendered images and input prompt utilizing pretrained CLIP models. While such methods can generate diverse 3D content, they exhibit a deficiency in visual realism. More recently, some works (Poole et al., 2022; Wang et al., 2023b; Lin et al., 2023; Chen et al., 2023c) optimize 3D representations using score distillation loss (SDS) based on pretrained 2D diffusion models. Such methods can generate high-quality results, but suffer from slow optimization, over-saturated colors and the Janus problem. For example, it takes 1.5 hours for DreamFusion (Poole et al., 2022) and 10 hours for ProlificDreamer Wang et al. (2023b) to generate a single 3D asset, which greatly limits their practicality. In contrast, our method enjoys the benefits of both worlds: it’s able to borrow information from pretrained 2D diffusion models to generate diverse multi-view consistent images that are subsequently lifted to faithful 3D models, while still being fast and efficient due to its feed-forward nature.
|
| 31 |
+
|
| 32 |
+
Sparse-view reconstruction. Traditional 3D reconstruction with multi-view stereo (Agarwal et al., 2011; Schonberger et al. ¨ , 2016; Furukawa et al., 2015) typically requires a dense set of input images that have significant overlaps to find correspondence across views and infer the geometry correctly. While NeRF (Mildenhall et al., 2020) and its variants (Muller et al. ¨ , 2022; Chen et al., 2022; 2023a) have further alleviated the prerequisites for 3D reconstruction, they perform per-scene optimization that still necessitates a lot of input images. Previous methods (Wang et al., 2021; Chen et al., 2021; Long et al., 2022; Reizenstein et al., 2021; Trevithick & Yang, 2021; Shen et al., 2023) have tried to learn data priors so as to infer NeRF from a sparse set of images. Typically they extract per-view features from each input image, and then for each point on the camera ray, aggregate multiview features and decode them to the density (or SDF) and colors. Such methods are either trained in a category-specific manner, or only trained on small datasets such as ShapeNet; they have not been demonstrated to generalize beyond these datasets especially to the complex text-to-2D outputs.
|
| 33 |
+
|
| 34 |
+
More recently, some methods utilize data priors from pretrained 2D diffusion models to lift a single 2D image to 3D by providing supervision at novel views using SDS loss (Liu et al., 2023b; Qian et al., 2023; Melas-Kyriazi et al., 2023) or generating multi-view images (Liu et al., 2023a). For instance, One-2-3-45 (Liu et al., 2023a) generates 32 images at novel views from a single input image using a fine-tuned 2D diffusion model, and reconstructs a 3D model from them, which suffers from inconsistency between the many generated views. In comparison, our sparse-view reconstructor adopts a highly scalable transformer-based architecture and is trained on large-scale 3D data. This gives it the ability to accurately reconstruct 3D models of novel unseen objects from a sparse set of 4 images without per-scene optimization.
|
| 35 |
+
|
| 36 |
+
# 3 METHOD
|
| 37 |
+
|
| 38 |
+
Our method Instant3D is composed of two stages: sparse-view generation and feed-forward NeRF reconstruction. In Section 3.1, we present our approach for generating sparse multi-view images conditioned on the text input. In Section 3.2, we describe our transformer-based sparse-view large reconstruction model.
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
Figure 2: Overview of our method. Given a text prompt (‘a car made out of sushi’), we perform multi-view generation with Gaussian blobs as initialization using fine-tuned 2D diffusion model, producing a 4-view image in the form of a $2 \times 2$ grid. Then we apply a transformer-based sparseview 3D reconstructor on the 4-view image to generate the final NeRF.
|
| 42 |
+
|
| 43 |
+
# 3.1 TEXT-CONDITIONED SPARSE VIEW GENERATION
|
| 44 |
+
|
| 45 |
+
Given a text prompt, our goal is to generate a set of multi-view images that are aligned with the prompt and consistent with each other. We achieve this by fine-tuning a pretrained text-to-image diffusion model to generate a $2 \times 2$ image grid as shown in Figure 2.
|
| 46 |
+
|
| 47 |
+
In the following paragraphs, we first illustrate that large text-to-image diffusion models (i.e., SDXL (Podell et al., 2023)) have the capacity to generate view-consistent images thus a lightweight fine-tuning is possible. We then introduce three essential techniques to achieve it: the image grid, the curation of the dataset, and also the Gaussian Blob noise initialization in inference. As a result of these observations and technical improvements, we can fine-tune the 2D diffusion model for only 10K steps (on 10K data) to generate consistent sparse views.
|
| 48 |
+
|
| 49 |
+
Multi-view generation with image grid. Previous methods (Liu et al., 2023b;a) on novel-view synthesis show that image diffusion models are capable of understanding the multi-view consistency. In light of this, we compile the images at different views into a single image in the form of an image grid, as depicted in Figure 2. This image-grid design can better match the original data format of the 2D diffusion model, and is suitable for simple direct fine-tuning protocol of 2D models. We also observe that this simple protocol only works when the base 2D diffusion has enough capacity, as shown in the comparisons of Stable Diffusion v1.5 (Rombach et al., 2021) and SDXL (Podell et al., 2023) in Section 4.3. The benefit from simplicity will also be illustrated later in unlocking the lightweight fine-tuning possibility.
|
| 50 |
+
|
| 51 |
+
Regarding the number of views in the image grid, there is a trade-off between the requirements of multi-view generation and 3D reconstruction. More generated views make the problem of 3D reconstruction easier with more overlaps but increase possibility of view inconsistencies in generation and reduces the resolution of each generated view. On the other hand, too few views may cause insufficient coverage, requiring the reconstructor to hallucinate unseen parts, which is challenging for a deterministic 3D reconstruction model. Our transformer-based reconstructor learns generic 3D priors from large-scale data, and greatly reduces the requirement for the number of views. We empirically found that using 4 views achieves a good balance in satisfying the two requirements above, and they can be naturally arranged in a $2 \times 2$ grid as shown in Figure 2. Next, we detail how the image grid data is created and curated.
|
| 52 |
+
|
| 53 |
+
Multi-view data creation and curation. To fine-tune the text-to-image diffusion model, we create paired multi-view renderings and text prompts. We adopt a large-scale synthetic 3D dataset Objaverse (Deitke et al., 2023b) and render four $5 1 2 \times 5 1 2$ views of about 750K objects with Blender. We distribute the four views at a fixed elevation (20 degrees) and four equidistant azimuths (0, 90, 180, 270 degrees) to achieve a better coverage of the object. We use Cap3D (Luo et al., 2023) to generate captions for each 3D object, which consolidates captions from multi-view renderings generated with pretrained image captioning model BLIP-2 (Li et al., 2023) using a large language model (LLM). Finally, the four views are assembled into a grid image in a fixed order and resized to the input resolution compatible with the 2D diffusion model.
|
| 54 |
+
|
| 55 |
+
We find that naively using all the data for fine-tuning reduces the photo-realism of the generated images and thus the quality of the 3D assets. Therefore, we train a simple scorer on a small amount (2000 samples) of manually labeled data to predict the quality of each 3D object. The model is a simple SVM on top of pretrained CLIP features extracted from multi-view renderings of the 3D object (please see Appendix for details). During training, our model only takes the top 10K data ranked by our scorer. We provide a quantitative study in Section 4.3 to validate the impact of different data curation strategies. Although the difference is not very significant from the metric perspective, we found that our curated data is helpful in improving the visual quality.
|
| 56 |
+
|
| 57 |
+

|
| 58 |
+
Figure 3: Architecture of our sparse-view reconstructor. The model applies a pretrained ViT to encode multi-view images into pose-aware image tokens, from which we decode a triplane representation of the scene using a transformer-based decoder. Finally we decode per-point triplane features to its density and color and perform volume rendering to render novel views. We illustrate here with 2 views and the actual implementation uses 4 views.
|
| 59 |
+
|
| 60 |
+
Inference with Gaussian blob initialization. While our training data is multi-view images with a white background, we observe that during inference starting from standard Gaussian noise still results in images that have cluttered backgrounds (see Figure 5); this introduces extra difficulty for the feed-forward reconstructor in the second stage (Section 3.2). To guide the model toward generating images with a clean white background, inspired by SDEdit (Meng et al., 2022), we first create an image of a $2 \times 2$ grid with a solid white background that has the same resolution as the output image, and initialize each sub-grid with a 2D Gaussian blob that is placed at the center of the image with a standard deviation of 0.1 (please see Appendix for details). The visualization of this Gaussian Blob is shown in Figure 2. The Gaussian blob image grid is fed to the auto-encoder to get its latent. We then add diffusion noise (e.g., use t=980/1000 for 50 DDIM denoising steps), and use it as the starting point for the denoising process. As seen in Figure 5, this technique effectively guides the model toward generating images with a clean background.
|
| 61 |
+
|
| 62 |
+
Lightweight fine-tuning. With all the above observations and techniques, we are able to adapt a text-to-image diffusion model to a text-to-multiview model with lightweight fine-tuning. This lightweight fine-tuning shares a similar spirit to the ‘instruction fine-tuning’ (Mishra et al., 2022; Wei et al., 2021) for LLM alignment. The assumption is that the base model is already capable of the task, and the fine-tuning is to unlock the base model’s ability without introducing additional knowledge.
|
| 63 |
+
|
| 64 |
+
Since we utilize an image grid, the fine-tuning follows the exactly same protocol as the 2D diffusion model pre-training, except that we decrease the learning rate to $1 0 ^ { - 5 }$ . We train the model with a batch size of 192 for only 10K iterations on the 10K curated multi-view data. The training is done using 32 NVIDIA A100 GPUs for only 3 hours. We study the impact of different training settings in Section 4.3. For more training details, please refer to Appendix.
|
| 65 |
+
|
| 66 |
+
# 3.2 FEED-FORWARD SPARSE-VIEW LARGE RECONSTRUCTION MODEL
|
| 67 |
+
|
| 68 |
+
In this stage, we aim to reconstruct a NeRF from the four-view images $\mathcal { T } = \{ \mathbf { I } _ { i } ~ | ~ i = 1 , . . . , 4 \}$ generated in the first stage. 3D reconstruction from sparse inputs with a large baseline is a challenging problem, which requires strong model priors to resolve the inherent ambiguity. Inspired by a recent work LRM (Hong et al., 2024) that introduces a transformer-based model for single image 3D reconstruction, we propose a novel approach that enables us to predict a NeRF from a sparse set of input views with known poses. Similar to Hong et al. (2024), our model consists of an image encoder, an image-to-triplane decoder, and a NeRF decoder. The image encoder encodes the multiview images into a set of tokens. We feed the concatenated image tokens to the image-to-triplane decoder to output a triplane representation (Chan et al., 2022) for the 3D object. Finally, the triplane features are decoded into per-point density and colors via the NeRF MLP decoder.
|
| 69 |
+
|
| 70 |
+
In detail, we apply a pretrained Vision Transformer (ViT) DINO (Caron et al., 2021) as our image encoder. To support multi-view inputs, we inject camera information in the image encoder to make the output image tokens pose-aware. This is different from Hong et al. (2024) that feeds the camera information in the image-to-triplane decoder because they take single image input. The camera information injection is done by the AdaLN (Huang & Belongie, 2017; Peebles & Xie, 2022) camera modulation as described in Hong et al. (2024). The final output of the image encoder is a set of poseaware image tokens $f _ { { \mathbf { I } } _ { i } } ^ { * }$ , and we concatenate the per-view tokens together as the feature descriptors for the multi-view images: $\mathbf { \mathit { f } } _ { \mathbb { T } } = \oplus ( \mathbf { \mathit { f } } _ { \mathbf { \mathit { I } } _ { 1 } } ^ { * } , . . . \mathbf { \mathit { f } } _ { \mathbf { \mathit { I } } _ { 4 } } ^ { * } )$
|
| 71 |
+
|
| 72 |
+
We use triplane as the scene representation. The triplane is flattened to a sequence of learnable tokens, and the image-to-triplane decoder connects these triplane tokens with the pose-aware image tokens $f _ { \mathcal { T } }$ using cross-attention layers, followed by self-attention and MLP layers. The final output tokens are reshaped and upsampled using a de-convolution layer to the final triplane representation. During training, we ray march through the object bounding box and decode the triplane features at each point to its density and color using a shared MLP, and finally get the pixel color via volume rendering. We train the networks in an end-to-end manner with image reconstruction loss at novel views using a combination of MSE loss and LPIPS (Zhang et al., 2018) loss.
|
| 73 |
+
|
| 74 |
+
Training details. We train the model on multi-view renderings of the Objaverse dataset (Deitke et al., 2023b). Different from the first stage that performs data curation, we use all the 3D objects in the dataset and scale them to $[ - 1 , 1 ] ^ { 3 }$ ; then we generate multi-view renderings using Blender under uniform lighting with a resolution of $5 1 2 \times 5 1 2$ . While the output images from the first stage are generated in a structured setup with fixed camera poses, we train the model using random views as a data augmentation mechanism to increase the robustness. Particularly, we randomly sample 32 views around each object. During training, we randomly select a subset of 4 images as input and another random set of 4 images as supervision. For inference, we will reuse the fixed camera poses in the first stage as the camera input to the reconstructor. For more details on the training, please refer to the Appendix.
|
| 75 |
+
|
| 76 |
+
# 4 EXPERIMENTS
|
| 77 |
+
|
| 78 |
+
In this section, we first do comparisons against previous methods on text-to-3D (Section 4.1), and then perform ablation studies on different design choices of our method. By default, we report the results generated with fine-tuned SDXL models, unless otherwise noted.
|
| 79 |
+
|
| 80 |
+
# 4.1 TEXT-TO-3D
|
| 81 |
+
|
| 82 |
+
We make comparisons to state-of-the-art methods on text-to-3D, including a feed-forward method Shap-E (Jun & Nichol, 2023), and optimization-based methods including DreamFusion (Poole et al., 2022) and ProlificDreamer (Wang et al., 2023b). We use the official code for Shap-E, and the implementation from three-studio (Guo et al., 2023) for the other two as there is no official code. We use default hyper-parameters (number of optimization iterations, number of denoising steps) of these models. For our own model we use the SDXL base model fine-tuned on 10K data for 10K steps. During inference we take 100 DDIM steps.
|
| 83 |
+
|
| 84 |
+
Qualitative comparisons. As shown in Figure 4, our method generates visually better results than those of Shap-E, producing sharper textures, better geometry and substantially improved text3D alignment. Shap-E applies a diffusion model that is exclusively trained on million-level 3D data, which might be evidence for the need of 2D data or models with 2D priors. DreamFusion and ProlificDreamer achieve better text-3D alignment utilizing pretrained 2D diffusion models. However,
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 4: Qualitative comparisons on text-to-3D against previous methods. We include more uncurated comparisons in the supplementary material.
|
| 88 |
+
|
| 89 |
+
Table 1: Quantitative comparisons on CLIP scores against baseline methods. Our method outperforms previous feed-forward method Shap-E and optimization-based method DreamFusion, and achieves competitive performance compared to ProlificDreamer while being $1 8 0 0 \times$ faster.
|
| 90 |
+
|
| 91 |
+
Table 2: Quantitative comparisons against previous sparse-view reconstruction methods on GSO dataset.
|
| 92 |
+
|
| 93 |
+
<table><tr><td></td><td>ViT-L/14 个</td><td>ViT-bigG-14↑</td><td>Time(s)↓</td></tr><tr><td>Shap-E</td><td>20.51</td><td>32.21</td><td>6</td></tr><tr><td>DreamFusion</td><td>23.60</td><td>37.46</td><td>5400</td></tr><tr><td>ProlificDreamer</td><td>27.39</td><td>42.98</td><td>36000</td></tr><tr><td>Ours</td><td>26.87</td><td>41.77</td><td>20</td></tr></table>
|
| 94 |
+
|
| 95 |
+
<table><tr><td></td><td>PSNR↑</td><td>SSIM↑</td><td>LPIPS↓</td></tr><tr><td>SparseNeus</td><td>20.62</td><td>0.8360</td><td>0.1989</td></tr><tr><td>Ours</td><td>26.54</td><td>0.8934</td><td>0.0643</td></tr></table>
|
| 96 |
+
|
| 97 |
+
DreamFusion generates results with over-saturated colors and over-smooth textures. While ProlificDreamer results have better details, it still suffers from low-quality geometry (as in ‘A bulldozer clearing ...’) and the Janus problem (as in ”a squirrel dressed like ...”, also more detailed in Appendix Figure 11). In comparison, our results have more photorealistic appearance with better geometric details. Please refer to the Appendix and supplementary materials for video comparisons and more results.
|
| 98 |
+
|
| 99 |
+
Quantitative comparisons. In Table 4, we quantitatively assess the coherence between the generated models and text prompts using CLIP-based scores. We perform the evaluation on results with 400 text prompts from DreamFusion. For each model, we render 10 random views and calculate the average CLIP score between the rendered images and the input text. We report the metric using multiple variants of CLIP models with different model sizes and training data (i.e., ViT-L/14 from OpenAI and ViT-bigG-14 from OpenCLIP). From the results we can see that our model achieves higher CLIP scores than Shap-E, indicating better text-3D alignment. Our method even achieves consistently higher CLIP scores than optimization-based method DreamFusion and competitive scores to ProlificDreamer, from which we can see that our approach can effectively inherit the great text understanding capability from the pretrained SDXL model and preserve them in the generated 3D assets via consistent sparse-view generation and robust 3D reconstruction.
|
| 100 |
+
|
| 101 |
+
Inference time comparisons. We present the time to generate a 3D asset in Table 1. The timing is measured using the default hyper-parameters of each method on an A100 GPU. Notably, our method is significantly faster than the optimization-based methods: while it takes 1.5 hours for DreamFusion and 10 hours for ProlificDreamer to generate a single asset, our method can finish the generation within 20 seconds, resulting in a $2 7 0 \times$ and $1 8 0 0 \times$ speed up respectively. In Figure 10, we show that our inference time can be further reduced without obviously sacrificing the quality by decreasing the number of DDIM steps.
|
| 102 |
+
|
| 103 |
+
# 4.2 COMPARISONS ON SPARSE VIEW RECONSTRUCTION
|
| 104 |
+
|
| 105 |
+
We make comparisons to previous sparse-view NeRF reconstruction works. Most of previous works (Reizenstein et al., 2021; Trevithick & Yang, 2021; Yu et al., 2021) are either trained on small-scale datasets such as ShapeNet, or trained in a category-specific manner. Therefore, we make comparisons to a state-of-the-art method SparseNeus (Long et al., 2022), which is also applied in One-2-3-45 (Liu et al., 2023a) where they train the model on the same Objaverse dataset for sparseview reconstruction. We do the comparisons on the Google Scan Object (GSO) dataset (Downs et al., 2022), which consists of 1019 objects. For each object, we render 4-view input following the structured setup and randomly select another 10 views for testing. We adopt the pretrained model from Liu et al. (2023a). Particularly, SparseNeus does not work well for 4-view inputs with such a large baseline; therefore we add another set of 4 input views in addition to our four input views (our method still uses 4 views as input), following the setup in Liu et al. (2023a). We report the metrics on novel view renderings in Table 2. From the table, we can see that our method outperforms the baseline method even with fewer input images, which demonstrates the superiority of our sparse-view reconstructor.
|
| 106 |
+
|
| 107 |
+
# 4.3 ABLATION STUDY FOR SPARSE VIEW GENERATION
|
| 108 |
+
|
| 109 |
+
We ablate several key decisions in our method design, including (1) the choice of the larger 2D base model SDXL, (2) the use of Gaussian Blob during inference, (3) the quality and size of the curated dataset, and lastly, (4) the need and requirements of lightweight fine-tuning. We gather the quantitative results in Table 3 and place all qualitative results in the Appendix. We observe that qualitative results are more evident than quantitative results, thus we recommend a closer examination.
|
| 110 |
+
|
| 111 |
+
Scalability with 2D text-to-image models. One of the notable advantages of our method is that its efficacy scales positively with the potency of the underlying 2D text-to-image model. In Figure 12, we present qualitative comparisons between two distinct backbones (with their own tuned hyperparameters): SD1.5 (Rombach et al., 2021) and SDXL (Podell et al., 2023). It becomes readily apparent that SDXL, which boasts a model size $3 \times$ larger than that of SD1.5, exhibits superior text comprehension and visual quality. We also show a quantitative comparison on CLIP scores in Table 3. By comparing $\mathrm { E x p } ( \mathrm { l } , \mathrm { m } )$ with $\mathrm { E x p } ( \mathrm { d } , \mathrm { g } )$ , we can see that the model with SD1.5 achieves consistently lower CLIP scores indicating worse text-3D alignment.
|
| 112 |
+
|
| 113 |
+
Gaussian blob initialization. In Figure 5, we show our results generated with and without Gaussian blob initialization. From the results we can see that while our fine-tuned model can generate multi-view images without Gaussian blob initialization, they tend to have cluttered backgrounds, which challenges the second-stage feed-forward reconstructor. In contrast, our proposed Gaussian blob initialization enables the fine-tuned model to generate images with a clean white background, which better align with the requirements of the second stage.
|
| 114 |
+
|
| 115 |
+
Quality and size of fine-tuning dataset. We evaluate the impact of the quality and size of the dataset used for fine-tuning 2D text-to-image models. We first make comparisons between curated and uncurated (randomly selected) data. The CLIP score rises slightly as shown in Table 3 (i.e., comparing $\mathrm { E x p } ( \mathrm { d } , \mathrm { i } ) )$ , while there is a substantial quality improvement as illustrated in Appendix Figure 7. This aligns with the observation that the data quality can dramatically impact the results in the instruction fine-tuning stage of LLM (Zhou et al., 2023).
|
| 116 |
+
|
| 117 |
+
When it comes to data size, we observe a double descent from Table $\mathrm { E x p } ( \mathbf { a } , \mathbf { d } , \mathbf { g } )$ with 1K, 10K, and 100K data. We pick Exp(a, d, g) here because they are the best results among different training steps for the same training data size. The reason for this double descent can be spotlighted by the qualitative comparisons in Appendix Figure 13, where training with 1K data can lead to inconsistent multi-view images, while training with 100K data can hurt the compositionality, photo-realism, and also text alignment.
|
| 118 |
+
|
| 119 |
+

|
| 120 |
+
Figure 5: Qualitative comparisons on results generated with and without Gaussian blob initialization.
|
| 121 |
+
|
| 122 |
+
Table 3: Comparison on CLIP scores of NeRF renderings with different variants of fine-tuning settings.
|
| 123 |
+
|
| 124 |
+
<table><tr><td>Exp ID</td><td>Exp Name</td><td>Base</td><td>#Data</td><td>Curated</td><td>#Steps</td><td>ViT-L/14</td><td>ViT-bigG-14</td></tr><tr><td>(a)</td><td>Curated-1K-s1k</td><td>SDXL</td><td>1K</td><td>√</td><td>1K</td><td>26.33</td><td>41.09</td></tr><tr><td>(b)</td><td>Curated-1K-s10k</td><td>SDXL</td><td>1K</td><td>√</td><td>10k</td><td>22.55</td><td>35.59</td></tr><tr><td>(c)</td><td>Curated-10K-s4k</td><td>SDXL</td><td>10K</td><td>√</td><td>4k</td><td>26.55</td><td>41.08</td></tr><tr><td>(d)</td><td>Curated-10K-s10k</td><td>SDXL</td><td>10K</td><td>√</td><td>10k</td><td>26.87</td><td>41.77</td></tr><tr><td>(e)</td><td>Curated-10K-s20k</td><td>SDXL</td><td>10K</td><td>√</td><td>20k</td><td>25.96</td><td>40.56</td></tr><tr><td>(f)</td><td>Curated-100K-s10k</td><td>SDXL</td><td>100K</td><td></td><td>10k</td><td>25.79</td><td>40.32</td></tr><tr><td>(g)</td><td>Curated-100K-s40k</td><td>SDXL</td><td>100K</td><td></td><td>40k</td><td>26.59</td><td>41.29</td></tr><tr><td>(h)</td><td>Curated-300K-s40k</td><td>SDXL</td><td>300K</td><td></td><td>40K</td><td>26.43</td><td>40.72</td></tr><tr><td>i</td><td>Random-10K-s10k</td><td>SDXL</td><td>10K</td><td>X</td><td>10k</td><td>26.87</td><td>41.47</td></tr><tr><td></td><td>Random-100K-s40k</td><td>SDXL</td><td>100K</td><td>X</td><td>40k</td><td>26.28</td><td>40.90</td></tr><tr><td>(k)</td><td>AllData-s40k</td><td>SDXL</td><td>700K</td><td>X</td><td>40k</td><td>26.13</td><td>40.60</td></tr><tr><td>1</td><td>Curated-10K-s10k (SD1.5)</td><td>SD1.5</td><td>10K</td><td>√</td><td>10k</td><td>23.50</td><td>36.90</td></tr><tr><td>(m)</td><td>Curated-100K-s40k (SD1.5)</td><td>SD1.5</td><td>100K</td><td>√</td><td>40k</td><td>25.48</td><td>39.07</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Number of fine-tuning steps. We also quantitatively and qualitatively analyze the impact of finetuning steps. For each block in Table 3 we show the CLIP scores of different training steps. Similar to the findings in instruction fine-tuning (Ouyang et al., 2022), the results do not increase monotonically regarding the number of fine-tuning steps but have a peak in the middle. For example, in our final setup with the SDXL base model and 10K curated data (i.e., Exp(c, d, e)), the results are peaked at 10K steps. For other setups, the observations are similar. We also qualitatively compare the results at different training steps for 10K curated data in Appendix Figure 14. There is an obvious degradation in the quality of the results for both 4K and 20K training steps.
|
| 127 |
+
|
| 128 |
+
Another important observation is that the peak might move earlier when the model size becomes larger. This can be observed by comparing between $\operatorname { E x p } ( 1 , \operatorname { m } )$ for SD1.5 and Exp(d,g) for SDXL. Note that this comparison is not conclusive yet from the Table given that SD1.5 does not perform reasonably with our direct fine-tuning protocol. More details are in the Appendix.
|
| 129 |
+
|
| 130 |
+
We also found that Exp(a) with 1K steps on 1K data can achieve the best CLIP scores but the view consistency is actually disrupted. A possible reason is that the CLIP score is insensitive to certain artifacts introduced by reconstruction from inconsistent images, which also calls for a more reliable evaluation metric for 3D generation.
|
| 131 |
+
|
| 132 |
+
# 5 CONCLUSIONS
|
| 133 |
+
|
| 134 |
+
In this paper we presented a novel feed-forward two-stage approach Instant3D that can generate high-quality and diverse 3D assets from text prompts within 20 seconds. Our method finetunes a 2D text-to-image diffusion model to generate consistent 4-view images, and lifts them to 3D with a robust transformer-based large reconstruction model. The experiment results show that our method outperforms previous feed-forward methods in terms of quality while being equally fast, and achieves comparable or better performance to previous optimization-based methods with a speed-up of more than 200 times. Instant3D allows novice users to easily create 3D assets and enables fast prototyping and iteration for various applications such as 3D design and modeling.
|
| 135 |
+
|
| 136 |
+
Ethics Statement. The generation ability of our model is inherited from the public 2D diffusion model SDXL. We only do lightweight fine-tuning over the SDXL model thus it is hard to introduce extra knowledge to it. Also, our model can share similar ethical and legal considerations to SDXL. The curation of the data for lightweight fine-tuning does not introduce outside annotators. Thus the quality of the data might be biased towards the preference of the authors, which can lead to a potential bias on the generated results as well. The text input to the model is not further checked by the model, which means that the model will try to do the generation for every text prompt it gets without the ability to acknowledge unknown knowledge.
|
| 137 |
+
|
| 138 |
+
Reproducibility Statement. In the main text, we highlight the essential techniques to build our model for both the first stage (Section 3.1) and the second stage (Section 3.2). We discuss how our data is created and curated in Section 3. The full model configurations and training details can be found in Appendix Section A.3 and Section A.6. We have detailed all the optimizer hyperparameters and model dimensions. We present more details on our data curation process in Section A.2. We also attach the IDs of our curated data in Supplementary Materials to further facilitate the reproduction.
|
| 139 |
+
|
| 140 |
+
# REFERENCES
|
| 141 |
+
|
| 142 |
+
Adobe. Adobe Firefly. https://firefly.adobe.com/, 2023.
|
| 143 |
+
|
| 144 |
+
Sameer Agarwal, Yasutaka Furukawa, Noah Snavely, Ian Simon, Brian Curless, Steven M Seitz, and Richard Szeliski. Building rome in a day. Communications of the ACM, 54(10):105–112, 2011.
|
| 145 |
+
Alexander Bergman, Petr Kellnhofer, Wang Yifan, Eric Chan, David Lindell, and Gordon Wetzstein. Generative neural articulated radiance fields. Advances in Neural Information Processing Systems, 35:19900–19916, 2022.
|
| 146 |
+
Mathilde Caron, Hugo Touvron, Ishan Misra, Herve J ´ egou, Julien Mairal, Piotr Bojanowski, and ´ Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the International Conference on Computer Vision (ICCV), 2021.
|
| 147 |
+
Eric R. Chan, Connor Z. Lin, Matthew A. Chan, Koki Nagano, Boxiao Pan, Shalini De Mello, Orazio Gallo, Leonidas Guibas, Jonathan Tremblay, Sameh Khamis, Tero Karras, and Gordon Wetzstein. Efficient geometry-aware 3D generative adversarial networks. In CVPR, 2022.
|
| 148 |
+
Anpei Chen, Zexiang Xu, Fuqiang Zhao, Xiaoshuai Zhang, Fanbo Xiang, Jingyi Yu, and Hao Su. Mvsnerf: Fast generalizable radiance field reconstruction from multi-view stereo. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 14124–14133, 2021.
|
| 149 |
+
Anpei Chen, Zexiang Xu, Andreas Geiger, Jingyi Yu, and Hao Su. Tensorf: Tensorial radiance fields. In European Conference on Computer Vision (ECCV), 2022.
|
| 150 |
+
Anpei Chen, Zexiang Xu, Xinyue Wei, Siyu Tang, Hao Su, and Andreas Geiger. Dictionary fields: Learning a neural basis decomposition. ACM Trans. Graph., 2023a.
|
| 151 |
+
Hansheng Chen, Jiatao Gu, Anpei Chen, Wei Tian, Zhuowen Tu, Lingjie Liu, and Hao Su. Singlestage diffusion nerf: A unified approach to 3d generation and reconstruction. In ICCV, 2023b.
|
| 152 |
+
Rui Chen, Yongwei Chen, Ningxin Jiao, and Kui Jia. Fantasia3d: Disentangling geometry and appearance for high-quality text-to-3d content creation. arXiv preprint arXiv:2303.13873, 2023c.
|
| 153 |
+
Tianqi Chen, Bing Xu, Chiyuan Zhang, and Carlos Guestrin. Training deep nets with sublinear memory cost. arXiv preprint arXiv:1604.06174, 2016.
|
| 154 |
+
Wenzheng Chen, Huan Ling, Jun Gao, Edward Smith, Jaakko Lehtinen, Alec Jacobson, and Sanja Fidler. Learning to predict 3d objects with an interpolation-based differentiable renderer. Advances in neural information processing systems, 32, 2019.
|
| 155 |
+
Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Re. Flashattention: Fast and memory- ´ efficient exact attention with io-awareness. Advances in Neural Information Processing Systems, 35:16344–16359, 2022.
|
| 156 |
+
|
| 157 |
+
Matt Deitke, Ruoshi Liu, Matthew Wallingford, Huong Ngo, Oscar Michel, Aditya Kusupati, Alan Fan, Christian Laforte, Vikram Voleti, Samir Yitzhak Gadre, et al. Objaverse-xl: A universe of $1 0 \mathrm { m } + 3 \mathrm { d }$ objects. arXiv preprint arXiv:2307.05663, 2023a.
|
| 158 |
+
|
| 159 |
+
Matt Deitke, Dustin Schwenk, Jordi Salvador, Luca Weihs, Oscar Michel, Eli VanderBilt, Ludwig Schmidt, Kiana Ehsani, Aniruddha Kembhavi, and Ali Farhadi. Objaverse: A universe of annotated 3d objects. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13142–13153, 2023b.
|
| 160 |
+
Laura Downs, Anthony Francis, Nate Koenig, Brandon Kinman, Ryan Hickman, Krista Reymann, Thomas B McHugh, and Vincent Vanhoucke. Google scanned objects: A high-quality dataset of 3d scanned household items. In 2022 International Conference on Robotics and Automation (ICRA), pp. 2553–2560. IEEE, 2022.
|
| 161 |
+
Rao Fu, Xiao Zhan, Yiwen Chen, Daniel Ritchie, and Srinath Sridhar. Shapecrafter: A recursive text-conditioned 3d shape generation model. Advances in Neural Information Processing Systems, 35:8882–8895, 2022.
|
| 162 |
+
Yasutaka Furukawa, Carlos Hernandez, et al. Multi-view stereo: A tutorial. ´ Foundations and Trends® in Computer Graphics and Vision, 9(1-2):1–148, 2015.
|
| 163 |
+
Matheus Gadelha, Subhransu Maji, and Rui Wang. 3d shape induction from 2d views of multiple objects. In 2017 International Conference on 3D Vision (3DV), pp. 402–411. IEEE, 2017.
|
| 164 |
+
Jun Gao, Tianchang Shen, Zian Wang, Wenzheng Chen, Kangxue Yin, Daiqing Li, Or Litany, Zan Gojcic, and Sanja Fidler. Get3d: A generative model of high quality 3d textured shapes learned from images. Advances In Neural Information Processing Systems, 35:31841–31854, 2022.
|
| 165 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014.
|
| 166 |
+
Jiatao Gu, Lingjie Liu, Peng Wang, and Christian Theobalt. Stylenerf: A style-based 3d aware generator for high-resolution image synthesis. In International Conference on Learning Representations, 2022.
|
| 167 |
+
Yuan-Chen Guo, Ying-Tian Liu, Ruizhi Shao, Christian Laforte, Vikram Voleti, Guan Luo, ChiaHao Chen, Zi-Xin Zou, Chen Wang, Yan-Pei Cao, and Song-Hai Zhang. threestudio: A unified framework for 3d content generation. https://github.com/threestudio-project/ threestudio, 2023.
|
| 168 |
+
Anchit Gupta, Wenhan Xiong, Yixin Nie, Ian Jones, and Barlas Oguz. 3dgen: Triplane latent ˘ diffusion for textured mesh generation. arXiv preprint arXiv:2303.05371, 2023.
|
| 169 |
+
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840–6851, 2020.
|
| 170 |
+
Yicong Hong, Kai Zhang, Jiuxiang Gu, Sai Bi, Yang Zhou, Difan Liu, Feng Liu, Kalyan Sunkavalli, Trung Bui, and Hao Tan. Lrm: Large reconstruction model for single image to 3d. In ICLR, 2024.
|
| 171 |
+
Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE international conference on computer vision, pp. 1501–1510, 2017.
|
| 172 |
+
Ajay Jain, Ben Mildenhall, Jonathan T Barron, Pieter Abbeel, and Ben Poole. Zero-shot text-guided object generation with dream fields. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 867–876, 2022.
|
| 173 |
+
Heewoo Jun and Alex Nichol. Shap-e: Generating conditional 3d implicit functions. arXiv preprint arXiv:2305.02463, 2023.
|
| 174 |
+
Minguk Kang, Jun-Yan Zhu, Richard Zhang, Jaesik Park, Eli Shechtman, Sylvain Paris, and Taesung Park. Scaling up gans for text-to-image synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2023.
|
| 175 |
+
Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4401–4410, 2019.
|
| 176 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 177 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 178 |
+
Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. Blip-2: Bootstrapping language-image pre-training with frozen image encoders and large language models. 2023.
|
| 179 |
+
Chen-Hsuan Lin, Jun Gao, Luming Tang, Towaki Takikawa, Xiaohui Zeng, Xun Huang, Karsten Kreis, Sanja Fidler, Ming-Yu Liu, and Tsung-Yi Lin. Magic3d: High-resolution text-to-3d content creation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 300–309, 2023.
|
| 180 |
+
Minghua Liu, Chao Xu, Haian Jin, Linghao Chen, Mukund Varma T, Zexiang Xu, and Hao Su. One-2-3-45: Any single image to 3d mesh in 45 seconds without per-shape optimization, 2023a.
|
| 181 |
+
Ruoshi Liu, Rundi Wu, Basile Van Hoorick, Pavel Tokmakov, Sergey Zakharov, and Carl Vondrick. Zero-1-to-3: Zero-shot one image to 3d object, 2023b.
|
| 182 |
+
Zhen Liu, Yao Feng, Michael J Black, Derek Nowrouzezahrai, Liam Paull, and Weiyang Liu. Meshdiffusion: Score-based generative 3d mesh modeling. arXiv preprint arXiv:2303.08133, 2023c.
|
| 183 |
+
Zhengzhe Liu, Yi Wang, Xiaojuan Qi, and Chi-Wing Fu. Towards implicit text-guided 3d shape generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 17896–17906, 2022.
|
| 184 |
+
Xiaoxiao Long, Cheng Lin, Peng Wang, Taku Komura, and Wenping Wang. Sparseneus: Fast generalizable neural surface reconstruction from sparse views. In European Conference on Computer Vision, pp. 210–227. Springer, 2022.
|
| 185 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.
|
| 186 |
+
Andrew Luo, Tianqin Li, Wen-Hao Zhang, and Tai Sing Lee. Surfgen: Adversarial 3d shape synthesis with explicit surface discriminators. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 16238–16248, 2021.
|
| 187 |
+
Shitong Luo and Wei Hu. Diffusion probabilistic models for 3d point cloud generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2837–2845, 2021.
|
| 188 |
+
Tiange Luo, Chris Rockwell, Honglak Lee, and Justin Johnson. Scalable 3d captioning with pretrained models. arXiv preprint arXiv:2306.07279, 2023.
|
| 189 |
+
Luke Melas-Kyriazi, Christian Rupprecht, Iro Laina, and Andrea Vedaldi. Realfusion: 360 reconstruction of any object from a single image. In CVPR, 2023. URL https://arxiv.org/ abs/2302.10663.
|
| 190 |
+
Chenlin Meng, Yutong He, Yang Song, Jiaming Song, Jiajun Wu, Jun-Yan Zhu, and Stefano Ermon. SDEdit: Guided image synthesis and editing with stochastic differential equations. In International Conference on Learning Representations, 2022.
|
| 191 |
+
Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, et al. Mixed precision training. In International Conference on Learning Representations, 2018.
|
| 192 |
+
Ben Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. In ECCV, 2020.
|
| 193 |
+
Swaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. Cross-task generalization via natural language crowdsourcing instructions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 3470–3487, 2022.
|
| 194 |
+
Paritosh Mittal, Yen-Chi Cheng, Maneesh Singh, and Shubham Tulsiani. Autosdf: Shape priors for 3d completion, reconstruction and generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 306–315, 2022.
|
| 195 |
+
Nasir Mohammad Khalid, Tianhao Xie, Eugene Belilovsky, and Tiberiu Popa. Clip-mesh: Generating textured meshes from text using pretrained image-text models. In SIGGRAPH Asia 2022 conference papers, pp. 1–8, 2022.
|
| 196 |
+
Thomas Muller, Alex Evans, Christoph Schied, and Alexander Keller. Instant neural graphics prim- ¨ itives with a multiresolution hash encoding. ACM Trans. Graph., 41(4):102:1–102:15, July 2022. doi: 10.1145/3528223.3530127. URL https://doi.org/10.1145/3528223. 3530127.
|
| 197 |
+
Alex Nichol, Heewoo Jun, Prafulla Dhariwal, Pamela Mishkin, and Mark Chen. Point-e: A system for generating 3d point clouds from complex prompts. arXiv preprint arXiv:2212.08751, 2022.
|
| 198 |
+
Evangelos Ntavelis, Aliaksandr Siarohin, Kyle Olszewski, Chaoyang Wang, Luc Van Gool, and Sergey Tulyakov. Autodecoding latent 3d diffusion models. arXiv preprint arXiv:2307.05445, 2023.
|
| 199 |
+
Aaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016.
|
| 200 |
+
Roy Or-El, Xuan Luo, Mengyi Shan, Eli Shechtman, Jeong Joon Park, and Ira KemelmacherShlizerman. StyleSDF: High-Resolution 3D-Consistent Image and Geometry Generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 13503–13513, June 2022.
|
| 201 |
+
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35: 27730–27744, 2022.
|
| 202 |
+
Dario Pavllo, Graham Spinks, Thomas Hofmann, Marie-Francine Moens, and Aurelien Lucchi. Convolutional generation of textured 3d meshes. Advances in Neural Information Processing Systems, 33:870–882, 2020.
|
| 203 |
+
F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011.
|
| 204 |
+
William Peebles and Saining Xie. Scalable diffusion models with transformers. arXiv preprint arXiv:2212.09748, 2022.
|
| 205 |
+
Dustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Muller, Joe ¨ Penna, and Robin Rombach. Sdxl: improving latent diffusion models for high-resolution image synthesis. arXiv preprint arXiv:2307.01952, 2023.
|
| 206 |
+
Ben Poole, Ajay Jain, Jonathan T. Barron, and Ben Mildenhall. Dreamfusion: Text-to-3d using 2d diffusion. arXiv, 2022.
|
| 207 |
+
Guocheng Qian, Jinjie Mai, Abdullah Hamdi, Jian Ren, Aliaksandr Siarohin, Bing Li, HsinYing Lee, Ivan Skorokhodov, Peter Wonka, Sergey Tulyakov, et al. Magic123: One image to high-quality 3d object generation using both 2d and 3d diffusion priors. arXiv preprint arXiv:2306.17843, 2023.
|
| 208 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748–8763. PMLR, 2021.
|
| 209 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 21(1):5485–5551, 2020.
|
| 210 |
+
Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical textconditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 1(2):3, 2022.
|
| 211 |
+
Jeremy Reizenstein, Roman Shapovalov, Philipp Henzler, Luca Sbordone, Patrick Labatut, and David Novotny. Common objects in 3d: Large-scale learning and evaluation of real-life 3d category reconstruction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 10901–10911, 2021.
|
| 212 |
+
Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Bjorn Ommer. High- ¨ resolution image synthesis with latent diffusion models, 2021.
|
| 213 |
+
Chitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Burcu Karagol Ayan, Tim Salimans, et al. Photorealistic text-to-image diffusion models with deep language understanding. Advances in Neural Information Processing Systems, 35:36479–36494, 2022.
|
| 214 |
+
Aditya Sanghi, Hang Chu, Joseph G Lambourne, Ye Wang, Chin-Yi Cheng, Marco Fumero, and Kamal Rahimi Malekshan. Clip-forge: Towards zero-shot text-to-shape generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18603–18613, 2022.
|
| 215 |
+
Aditya Sanghi, Rao Fu, Vivian Liu, Karl DD Willis, Hooman Shayani, Amir H Khasahmadi, Srinath Sridhar, and Daniel Ritchie. Clip-sculptor: Zero-shot generation of high-fidelity and diverse shapes from natural language. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18339–18348, 2023.
|
| 216 |
+
Johannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise ¨ view selection for unstructured multi-view stereo. In European Conference on Computer Vision (ECCV), 2016.
|
| 217 |
+
Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, et al. Laion-5b: An open large-scale dataset for training next generation image-text models. Advances in Neural Information Processing Systems, 35:25278–25294, 2022.
|
| 218 |
+
Bokui Shen, Xinchen Yan, Charles R Qi, Mahyar Najibi, Boyang Deng, Leonidas Guibas, Yin Zhou, and Dragomir Anguelov. Gina-3d: Learning to generate implicit neural assets in the wild. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4913–4926, 2023.
|
| 219 |
+
Ivan Skorokhodov, Sergey Tulyakov, Yiqun Wang, and Peter Wonka. Epigraf: Rethinking training of 3d gans. Advances in Neural Information Processing Systems, 35:24487–24501, 2022.
|
| 220 |
+
Edward J Smith and David Meger. Improved adversarial systems for 3d object generation and reconstruction. In Conference on Robot Learning, pp. 87–96. PMLR, 2017.
|
| 221 |
+
Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In International Conference on Learning Representations, 2021. URL https://openreview.net/ forum?id $\bar { }$ St1giarCHLP.
|
| 222 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee´ Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and \` efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023.
|
| 223 |
+
Alex Trevithick and Bo Yang. Grf: Learning a general radiance field for 3d representation and
|
| 224 |
+
rendering. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15182–15192, 2021.
|
| 225 |
+
Aaron Van Den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. ¨ In International conference on machine learning, pp. 1747–1756. PMLR, 2016.
|
| 226 |
+
Aaron Van Den Oord, Oriol Vinyals, et al. Neural discrete representation learning. Advances in neural information processing systems, 30, 2017.
|
| 227 |
+
Haochen Wang, Xiaodan Du, Jiahao Li, Raymond A Yeh, and Greg Shakhnarovich. Score jacobian chaining: Lifting pretrained 2d diffusion models for 3d generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12619–12629, 2023a.
|
| 228 |
+
Qianqian Wang, Zhicheng Wang, Kyle Genova, Pratul Srinivasan, Howard Zhou, Jonathan T. Barron, Ricardo Martin-Brualla, Noah Snavely, and Thomas Funkhouser. Ibrnet: Learning multiview image-based rendering. In CVPR, 2021.
|
| 229 |
+
Zhengyi Wang, Cheng Lu, Yikai Wang, Fan Bao, Chongxuan Li, Hang Su, and Jun Zhu. Prolificdreamer: High-fidelity and diverse text-to-3d generation with variational score distillation. arXiv
|
| 230 |
+
preprint arXiv:2305.16213, 2023b.
|
| 231 |
+
Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned language models are zero-shot learners. In International Conference on Learning Representations, 2021.
|
| 232 |
+
Jiajun Wu, Chengkai Zhang, Tianfan Xue, Bill Freeman, and Josh Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. Advances in neural information processing systems, 29, 2016.
|
| 233 |
+
Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelNeRF: Neural radiance fields from one or few images. In CVPR, 2021.
|
| 234 |
+
Xiaohui Zeng, Arash Vahdat, Francis Williams, Zan Gojcic, Or Litany, Sanja Fidler, and Karsten Kreis. Lion: Latent point diffusion models for 3d shape generation. In Advances in Neural Information Processing Systems (NeurIPS), 2022.
|
| 235 |
+
Richard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, 2018.
|
| 236 |
+
Chunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, et al. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206, 2023.
|
| 237 |
+
Linqi Zhou, Yilun Du, and Jiajun Wu. 3d shape generation and completion through point-voxel diffusion. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 5826–5835, 2021.
|
| 238 |
+
|
| 239 |
+
# A APPENDIX
|
| 240 |
+
|
| 241 |
+
# A.1 DIVERSITY OF GENERATION
|
| 242 |
+
|
| 243 |
+
Inheriting the generation capability from the base SDXL model, our method can generate diverse results from the same text prompt by using different random seeds in the feed-forward pass. As shown in Figure 6, our approach excels in generating diverse 3D assets featuring strikingly distinct textures and geometries from the same prompt. This is in contrast to previous SDS-optimization based methods, which are prone to generate similar results even with different initializations (Poole et al., 2022).
|
| 244 |
+
|
| 245 |
+

|
| 246 |
+
Figure 6: Our method can generate diverse results from the same text prompt.
|
| 247 |
+
|
| 248 |
+
# A.2 DATA CURATION DETIALS
|
| 249 |
+
|
| 250 |
+
We apply a quality scorer to curate high-quality data from the Objaverse dataset. To train the quality scorer, we first randomly sample 2000 3D objects from the dataset and manually label each 3D asset as good or bad. Good assets have realistic textures and complex geometry, while bad ones have simple shapes and flat or cartoon-like textures. This criterion is subjective and imprecise, but we found it good enough for the purpose of data filtering.
|
| 251 |
+
|
| 252 |
+
Since the amount of annotated data is limited, we use a pretrained CLIP (Radford et al., 2021) model to extract high-level image features of rendered images at 5 randomly sampled camera viewpoints for each object. Then we train a simple binary SVM classifier on top of the averaged CLIP features over different views. We use the $\mathrm { N u S V C }$ implementation from the popular scikit-learn framework Pedregosa et al. (2011), which also gives us a probability estimation of the classification. We use the trained SVM model to predict the classification probability for all objects in the dataset by extracting CLIP features in the same way as done for the training data. These probabilities are used as scores to rank the data from high to low quality. Finally, we use the top 10K objects as our fine-tuning data.
|
| 253 |
+
|
| 254 |
+
To render the 4-view data, we scale the curated objects and center them at a cube $[ - 1 , 1 ] ^ { 3 }$ . We render the objects with a white background following the structured setup discussed in Section 3.1 using a field of view $5 0 ^ { \circ }$ at a distance of 2.7 under uniform lighting. We use the physically-based path tracer Cycles in Blender for rendering.
|
| 255 |
+
|
| 256 |
+
In Figure 7 we show qualitative comparisons on results from models trained with curated data and random data. Models trained with random data tend to generate cartoon-like 3D assets with simple and flat textures. This is not surprising since a bulk of the Objaverse dataset contains simple shapes with simple textures, and without curation these data will guide the model to over-denoise the results, leading to large areas of flat colors. On the contrary, models trained with curated data tend to generate more photorealistic assets with complex textures and geometries.
|
| 257 |
+
|
| 258 |
+
# A.3 SDXL FINE-TUNING DETAILS
|
| 259 |
+
|
| 260 |
+
We use SDXL as the base model for our first-stage fine-tuning. We use AdamW optimizer with a fixed learning rate $1 0 ^ { - 5 }$ , $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 9 9$ and a weight decay of $1 0 ^ { - 2 }$ . We fine-tune the model using fp16 on 32 NVIDIA A100 GPUs with a total batch size of 192. No gradient accumulation is used. We train the model on 10K curated data for 40K steps, which takes around 3 hours.
|
| 261 |
+
|
| 262 |
+
We train the model with the standard denoising diffusion loss (Ho et al., 2020)
|
| 263 |
+
|
| 264 |
+
$$
|
| 265 |
+
L ( \pmb \theta ) = \mathbb { E } _ { t , \pmb { x } _ { 0 } , \epsilon } \big [ \| \epsilon - \epsilon _ { \theta } ( \sqrt { \overline { { \alpha } } _ { t } } \pmb x _ { 0 } + \sqrt { 1 - \overline { { \alpha } } _ { t } } \epsilon , t ) \| ^ { 2 } \big ]
|
| 266 |
+
$$
|
| 267 |
+
|
| 268 |
+
where $\epsilon _ { \theta }$ is the denoising U-Net and $\pmb { \theta }$ are the trainable parameters.
|
| 269 |
+
|
| 270 |
+
SDXL introduces image resolution and aspect ratio conditioning that allow mixing training on images of different resolutions and aspect ratios. As for our training data, we render 4 views each with a resolution of $5 1 2 \times 5 1 2$ and assemble them into a $1 0 2 4 \times 1 0 2 4$ image. Therefore we fix the resolution and aspect ratio conditioning to be (1024, 1024) throughout the fine-tuning procedure. We don’t do random cropping in our training and fixed the crop conditioning to be $( 0 , 0 )$ . All the other training setups are identical to the original SDXL.
|
| 271 |
+
|
| 272 |
+
Table 4: Ablation study of the sparse-view reconstruction model.
|
| 273 |
+
|
| 274 |
+
<table><tr><td></td><td>#Layers</td><td>Render</td><td>Supervision</td><td>PSNR↑</td><td>SSIM↑</td><td>LPIPS↓</td></tr><tr><td>exp01</td><td>6</td><td>64</td><td>All</td><td>23.6551</td><td>0.8616</td><td>0.1281</td></tr><tr><td>exp02</td><td>12</td><td>64</td><td>All</td><td>23.8257</td><td>0.8631</td><td>0.1266</td></tr><tr><td>exp03</td><td>24</td><td>64</td><td>All</td><td>23.8351</td><td>0.8635</td><td>0.1258</td></tr><tr><td>exp04</td><td>12</td><td>32</td><td>All</td><td>23.1704</td><td>0.8561</td><td>0.1358</td></tr><tr><td>exp05</td><td>12</td><td>64</td><td>w/o novel</td><td>18.2359</td><td>0.8103</td><td>0.2256</td></tr><tr><td>exp06</td><td>12</td><td>64</td><td>w/o LPIPS</td><td>24.1699</td><td>0.8641</td><td>0.1934</td></tr></table>
|
| 275 |
+
|
| 276 |
+
# A.4 SD1.5 FINE-TUNING DETAILS
|
| 277 |
+
|
| 278 |
+
We use 8 A100 GPUs for fine-tuning SD1.5 on 100K data with a total batch size of 64. We use the same AdamW optimizer as the one for SDXL with the same hyper-parameters. We also use gradient accumulation of 3 steps, which gives an effective batch size of 192. The training loss is the same as SDXL. We train the model for 120K steps (40K parameter updates due to gradient accumulation), which takes roughly 33 hours.
|
| 279 |
+
|
| 280 |
+
# A.5 GAUSSIAN BLOBS INITIALIZATION
|
| 281 |
+
|
| 282 |
+
Since the diffusion model is fine-tuned with only a relatively small number of steps, it still largely possesses the original denoising behavior on images that are not in the form of $2 \times 2$ grids and do not have a white background. Naively applying the standard backward denoising process starting from random Gaussian noise will likely lead to results far from the distribution of the fine-tuning data (see Figure 5).
|
| 283 |
+
|
| 284 |
+
The spatial structure of the training images is simple: four views of the same object are placed at the center of each quadrant. Also, the background is always white. Since the model is fine-tuned on such data with a denoising objective, it is natural that, when presented with a noisy input whose underlying clean image has these two characteristics, the model will tend to denoise the image to a clean one where the four-quadrant objects are view consistent. Following this, and inspired by SDEdit Meng et al. (2022), we introduce Gaussian blobs initialization to guide the model toward generating samples consistent with the distribution of the fine-tuning data.
|
| 285 |
+
|
| 286 |
+
The standard latent diffusion inference starts with a Gaussian noise image $\epsilon$ with the same size as the image latents. Instead, we modify the initial iteration to be a composition of Gaussian noise and an image with the two aforementioned characteristics: object quadrants and white background. We construct such an image by generating a grayscale image with a clean white background and a black Gaussian blob at the center. Specifically, we construct a $H \times W$ grayscale image $I$ , where $H$ and $W$ are the height and width of the input RGB image with a value range $[ 0 , 1 ]$ . For all our models $H = W$ , and we denote them using $S$ . For a given pixel $( x , y )$ , its pixel value is computed as
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
I ( x , y ) = 1 - \exp \bigg ( - \frac { ( x - S / 2 ) ^ { 2 } + ( y - S / 2 ) ^ { 2 } } { 2 \sigma ^ { 2 } S ^ { 2 } } \bigg )
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
where $\sigma$ is a hyper-parameter controlling the width of the Gaussian blob. Such an image looks like a black disc at the center of a white image slowly fading away toward the edges of the image. We then assemble four such images into a $2 \times 2$ image grid. Some examples of such images with different $\sigma$ can be seen at the first row of figure 5.
|
| 293 |
+
|
| 294 |
+
Next we construct the initial noise for the denoising step by blending a complete Gaussian noise latent with the latent of the Gaussian blobs. We denote the latent of the Gaussian blobs image $I$ as $\tilde { I }$ , and the latent of a noise image with i.i.d. Gaussian values as $\epsilon$ . For a $N$ step denoising inference process with timesteps $\{ t _ { N } , t _ { N - 1 } , . . . , t _ { 0 } \}$ , we mix the two latents with a weighted sum
|
| 295 |
+
|
| 296 |
+
$$
|
| 297 |
+
\epsilon _ { t _ { N } } = \sqrt { \overline { { \alpha } } _ { t _ { N } } } \tilde { I } + \sqrt { 1 - \overline { { \alpha } } _ { t _ { N } } } \epsilon
|
| 298 |
+
$$
|
| 299 |
+
|
| 300 |
+
Then $\epsilon _ { t _ { N } }$ is used as the initial noise of the denoising process, e.g., $t _ { N }$ is 980 for a denoising step with 50 (and the total number of timesteps is 1000).
|
| 301 |
+
|
| 302 |
+
# A.6 SPARSE-VIEW RECONSTRUCTION DETAILS
|
| 303 |
+
|
| 304 |
+
Model details We use the DINO-ViT-B/16 as our image encoder. This model is transformerbased, which has 12 layers and the hidden dimension of the transformer is 768. The ViT begins with a convolution of kernel size 16, stride 16, and padding 0. It is essentially patchifying the input image with a patch size of $1 6 \times 1 6$ . For our final model, the input image resolution is 512, thus it leads to $3 2 \times 3 2 = 1 0 2 4$ spatial tokens in the vision transformer. In ablation studies, we reduce the input resolution from 512 to 256 to save compute budget. The original DINO is trained with a resolution of $2 2 4 \times 2 2 4$ , thus the positional embedding has only a size of $1 4 \times 1 4 = 1 9 6$ . We thus use 2D bilinear extrapolation (with torch.nn.functional.interpolate function) to extrapolate it to the desired token size.
|
| 305 |
+
|
| 306 |
+
To integrate camera information into the image encoder, we inject modulation layers (Peebles & Xie, 2022) into each of the transformer layer (for both self-attention layers and MLP layers). The modulation layer is initialized to be an identity mapping and thus it is suitable to be added to a pre-trained vision transformer.
|
| 307 |
+
|
| 308 |
+
After the image encoder, we have 1025 image feature tokens for each image, since we also include the output of the [CLS] token. We concatenate the tokens from all four images to construct a sequence of condition features of length 4100. This condition feature will be used to create the keys and values in the cross-attention layers of the image-to-triplane transformer decoder.
|
| 309 |
+
|
| 310 |
+
The image-to-triplane transformer decoder starts with a token sequence of $( 3 \times 3 2 \times 3 2 ) \times 1 0 2 4$ , where $( 3 \times 3 2 \times 3 2 )$ is the number of tokens and 1024 is the hidden dimension of the transformer. We use 16 layers in our transformer decoder. All attention layers have 16 attention heads and each head has a dimension of 64. We remove the bias term in the attention layer as in Touvron et al. (2023). We take the pre-normalization architecture of the transformer where each sub-layer will be in the format of $x + f ( \mathrm { L a y e r N o r m } ( x ) )$ .
|
| 311 |
+
|
| 312 |
+
After the transformer, we apply a de-convolution layer to map the transformer output from $( 3 \times 3 2 \times$ $3 2 ) \times 1 0 2 4$ to $3 \times ( 6 4 \times 6 4 ) \times 8 0$ . It means that there are 3 planes (XY, YZ, XZ) (Chan et al., 2022) and each plane has a size of $6 4 \times 6 4$ . The dimension of each plane is 80. All three planes share the same deconvolution layer. The deconvolution is of kernal size 2, stride 2, and pad 0.
|
| 313 |
+
|
| 314 |
+
In NeRF volumetric rendering, the features from the three planes are bilinearly interpolated and concatenated to get a 240-dimensional feature for each point. Then, we have a 10-layer MLP with a hidden dimension of 64 to map this 240-dim feature to a 4-dim feature. The first three dimensions will be treated as RGB colors of the point and normalized to [0, 1] with a sigmoid function. The last dimension will be treated as the density value and we use an exponential function to map the MLP’s output to be non-negative.
|
| 315 |
+
|
| 316 |
+
For the exact formulation of the above operators, please refer to LRM (Hong et al., 2024) and DiT (Peebles & Xie, 2022).
|
| 317 |
+
|
| 318 |
+
Training details. We adopt the AdamW (Kingma & Ba, 2014; Loshchilov & Hutter, 2017) optimizer to train our model. We use a peak learning rate of $4 \times 1 0 ^ { - 4 }$ with a linear warm-up (on the first 3K steps) and a cosine decay. We change the $\beta _ { 2 }$ of the AdamW optimizer to 0.95 for better stability. We use a weight-decay of 0.05 for non-bias and non-layernorm parameters. We also apply a gradient clipping of 1.
|
| 319 |
+
|
| 320 |
+
For the initialization of the image encoder, we use the official DINO pre-trained weight. For the initialization of the triplane decoder, and NeRF MLP, we use the default initializer in the PyTorch implementation. We empirically found that the pre-normalization transformer is robust to different initialization of linear layers. For the positional embedding of the triplane tokens in the transformer√ decoder, we initialize them with a Gaussian of zero-mean and std of $1 / \sqrt { 1 0 2 4 }$ .
|
| 321 |
+
|
| 322 |
+
For each training step, we randomly sample 4 views as input and another 4 as supervision. The number of sample points per ray in NeRF rendering is 128, which are uniformly distributed along the segment within the $[ - 1 , 1 ] ^ { 3 }$ bounding box. The rendering resolution is $1 2 8 \times 1 2 8$ . To allow higher actual supervising resolution, we first resize the image to a smaller resolution (uniformly sampled from [128, 384]) and then crop a patch of $1 2 8 \times 1 2 8$ from it. Thus we can go beyond the rendering resolution of 128.
|
| 323 |
+
|
| 324 |
+
We utilize flash attention (Dao et al., 2022), mixed-precision training (with bf16 as the half-precision format) (Micikevicius et al., 2018), and gradient checkpointing (Chen et al., 2016) to improve the compute/memory efficiency of the training.
|
| 325 |
+
|
| 326 |
+
We perform the training for 120 epochs on our rendered Objaverse data with a training batch size of 1024. We use both L2 loss and LPIPS loss to supervise the model and the weights of the two losses are 1 and 2 respectively. The model is trained on 128 NVIDIA A100 GPUs and the whole training can be finished in 7 days.
|
| 327 |
+
|
| 328 |
+
# A.7 SPARSE VIEW RECONSTRUCTION ABLATION STUDY
|
| 329 |
+
|
| 330 |
+
We conduct an ablation study of our sparse-view reconstruction model to validate different design choices including the number of layers in the image-to-triplane decoder, the rendering resolution and the losses used during training, and the usage of novel view supervision. We train the model on the same dataset as our final model, however, we change the training recipe to reduce the computation cost to 32 A100 GPUs for 1 day. The changes of configuration for ablation include (1) a resolution of $2 5 6 \times 2 5 6$ for the input image resolution, (2) 96 points per ray during rendering, (3) 5 layers instead of 10 layers in the NeRF MLP, (4) 30 epochs of training.
|
| 331 |
+
|
| 332 |
+
To evaluate the performance of different variants, we test them on another 3D dataset Google Scanned Object (GSO) (Downs et al., 2022). For each object in GSO, we render a set of 64-view images rendered with a resolution of $5 1 2 \times 5 1 2$ at elevations $0 ^ { \circ }$ , $2 0 ^ { \circ }$ , $4 0 ^ { \circ }$ , $6 0 ^ { \circ }$ . Each elevation has 16 views with equidistant azimuths starting from 0. We use 4 views with elevation $2 0 ^ { \circ }$ and azimuths $4 5 ^ { \circ }$ , $1 3 5 ^ { \circ }$ , $2 2 5 ^ { \circ }$ , $3 1 5 ^ { \circ }$ as input, and randomly sample 5 views from the remaining views as our testing set, which stay the same for different variants. We render the 5 testing views and report their difference from the ground truth using 3 metrics including PSNR, SSIM and LPIPS. These metrics are averaged over all 1019 objects in the GSO dataset.
|
| 333 |
+
|
| 334 |
+
The results of the ablation studies are in Figure 4. From the table we can see that the model is robust to the number of transformer layers in the image-to-triplane decoder as shown in exp01, exp02, and exp03. We also observe that the LPIPS loss can largely affect the results by comparing the exp02 and exp06. Without the LPIPS loss, the model drops a lot on the LPIPS metric while getting a slight improvement on PSNR and SSIM. However, we empirically find that LPIPS is much more aligned with human perception and the rendered images become blurry without it. The rendering resolution is also important (as shown in exp04) since LPIPS can be more robust and accurate at a higher resolution, which also motivates us to use a rendering resolution of 128 by 128 when training our final model.
|
| 335 |
+
|
| 336 |
+
Also, the inclusion of novel view supervision in the training is critical as shown in exp05. All three metrics got a significant drop when only supervising the four input views. Upon reviewing the results, we find that it’s due to the insufficient coverage of the four views, which typically leads to floaters in regions not covered by the input views.
|
| 337 |
+
|
| 338 |
+
# A.8 EXTENSION TO IMAGE-CONDITIONED GENERATION
|
| 339 |
+
|
| 340 |
+
Our method can also be extended to support additional image conditioning to provide more finegrained control over the 3D model to be generated. In this process, the input to the model includes an input text prompt that describes the object to be generated as well as an image of the object. We use the same training data as our text-conditioned model. During training, for a randomly sampled time step, we keep the latent of the input image (top-left quadrant) untouched and only add noise to the latents of the remaining three views. This allows the diffusion model to generate the other views while accounting for the conditioning image. During inference, similarly, we replace the upper left quadrant of the latent feature with the latent of the clean conditioning image at each iteration. Figure 8 shows some visual results of our image-conditioned model. From the results we can see that our method is able to effectively generate the other views with faithful details that are coherent with the input text prompt and image, thus giving us high-quality 3D models with our sparse view reconstructor.
|
| 341 |
+
|
| 342 |
+

|
| 343 |
+
Figure 7: Comparisons on novel view renderings of NeRF assets generated from SDXL models finetuned with 10K curated data and random data. We can see that that curated data enables the model to generate more photorealistic 3D assets with more geometric and texture details. Here curated and random correspond to Exp d (Curated-10K-s10K) and i (Random-10K-s10K) in Table 3.
|
| 344 |
+
|
| 345 |
+
# A.9 LIMITATIONS
|
| 346 |
+
|
| 347 |
+
While our model can generate high-quality and diverse 3D assets, it still suffers from several limitations. First, while we perform a light-weight fine-tuning that enables the model to mostly preserve the capability of the SDXL model in textual understanding and generation, we do observe that our model fails to handle some over-complicated prompts, for example, those related to complex spatial arrangements of multiple subjects and complex scenes (see Figure 15). In addition, the generated assets are not as photorealistic as the 2D images generated by the original SDXL, which may be attributed to the information loss in the fine-tuning stage. Secondly, there is a lack of 3D inductive bias when generating multi-view images, and therefore it’s still possible for our model to generate inconsistent images that result in low-quality 3D assets with corrupted geometries and textures. Finally, our feed-forward reconstructor tends to generate blurry textures compared to the input images due to the usage of a relatively low-resolution triplane.
|
| 348 |
+
|
| 349 |
+

|
| 350 |
+
Figure 8: Comparison to previous methods on single image-conditioned 3D generation. We compared to previous methods Zero-1-to-3 (Liu et al., 2023b) and One-2-3-45 (Liu et al., 2023a). Our method can faithfully generate the details in the invisible regions, thus empowering us to reconstruct 3D assets of higher quality than baseline methods. All input images are generated with a public text-to-image platform Adobe Firefly (Adobe, 2023).
|
| 351 |
+
|
| 352 |
+

|
| 353 |
+
Figure 9: $2 \times 2$ grid images generated with Gaussian blobs of different sigma $\sigma$
|
| 354 |
+
|
| 355 |
+

|
| 356 |
+
a cute dragon with big eyes
|
| 357 |
+
Figure 10: Comparison on the NeRF assets generated with different numbers of DDIM steps and their inference time. While we use 100 steps in our experiments that take 20 seconds to generate a NeRF asset, we find that using a smaller number of steps can also give us results of similar quality with a much shorter inference time.
|
| 358 |
+
|
| 359 |
+

|
| 360 |
+
a red-eyed tree frog
|
| 361 |
+
Figure 11: SDS optimization-based methods such as ProlificDreamer (Wang et al., 2023b) can possibly suffer from the Janus problem, which greatly degrades the quality of the 3D assets. In contrast, our method can mostly get rid of this problem.
|
| 362 |
+
|
| 363 |
+

|
| 364 |
+
Figure 12: Comparisons on the quality of the NeRF assets generated with fine-tuned SDXL and SD1.5 models. SDXL has a model size that is three times larger than SD1.5 and thus has better text comprehension. As shown in the figure, the 3D assets generated by our fine-tuned SDXL have better photo-realism and text alignment. The used SDXL and SD1.5 models are from Exp d (Curated-10Ks10K) and m (Curated-100K-s40K) in Table 3.
|
| 365 |
+
|
| 366 |
+

|
| 367 |
+
Figure 13: Comparison on the effect of different fine-tuning data sizes. Training on too little data such as 1K results in inconsistency between the generated 4 views, thus resulting in incorrect geometry. On the other side, training on too much data such as 100K makes the model biased toward the fine-tuning dataset, thus negatively affecting the quality of generated 3D assets. Here 1K, 10K and 100K correspond to Exp a (Curated-1K-s1K), d (Curated-10K-s10K) and g (Curated-100K-s40K) in Table 3 respectively.
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 14: Comparison on different numbers of fine-tuning steps. 4K training steps lead to inconsistent 4-view generation, while 20K result in biasing towards the fine-tuning data. In contrast, 10K achieve a balance between these two. Here 4K, 10K and 20K correspond to Exp c (Curated-10Ks4K), d(Curated-10K-s10K) and e (Curated-10K-s20K) in Table 3.
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
Figure 15: Some examples of our failure cases. (a) Incorrect understanding of compositional concepts. (b) Inability to generate the exact quantity. (c) Fail to generate objects with complex structures. (d) Missing important concepts in the prompt.
|
parse/test/2lDQLiH1W4/2lDQLiH1W4_content_list.json
ADDED
|
@@ -0,0 +1,796 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "INSTANT3D: FAST TEXT-TO-3D WITH SPARSE-VIEW GENERATION AND LARGE RECONSTRUCTION MODEL ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"page_idx": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"type": "text",
|
| 10 |
+
"text": "Jiahao $\\mathbf { L i } ^ { 1 , 2 * }$ Hao Tan1 Kai Zhang1 Zexiang $\\mathbf { X } \\mathbf { u } ^ { 1 }$ Fujun Luan1 Yinghao $\\mathbf { X } \\mathbf { u } ^ { 1 , 3 }$ Yicong Hong1,4 Kalyan Sunkavalli1 Greg Shakhnarovich2 Sai Bi1 ",
|
| 11 |
+
"page_idx": 0
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"type": "text",
|
| 15 |
+
"text": "1Adobe Research 2TTIC 3Stanford University 4 Australian National Univeristy {jiahao,greg}@ttic.edu yhxu@stanford.edu mr.yiconghong@gmail.com {hatan,kaiz,zexu,fluan,sunkaval,sbi}@adobe.com ",
|
| 16 |
+
"page_idx": 0
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"type": "text",
|
| 20 |
+
"text": "ABSTRACT ",
|
| 21 |
+
"text_level": 1,
|
| 22 |
+
"page_idx": 0
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"type": "text",
|
| 26 |
+
"text": "Text-to-3D with diffusion models has achieved remarkable progress in recent years. However, existing methods either rely on score distillation-based optimization which suffer from slow inference, low diversity and Janus problems, or are feed-forward methods that generate low-quality results due to the scarcity of 3D training data. In this paper, we propose Instant3D, a novel method that generates high-quality and diverse 3D assets from text prompts in a feed-forward manner. We adopt a two-stage paradigm, which first generates a sparse set of four structured and consistent views from text in one shot with a fine-tuned 2D text-to-image diffusion model, and then directly regresses the NeRF from the generated images with a novel transformer-based sparse-view reconstructor. Through extensive experiments, we demonstrate that our method can generate diverse 3D assets of high visual quality within 20 seconds, which is two orders of magnitude faster than previous optimization-based methods that can take 1 to 10 hours. Our project webpage is: https://jiahao.ai/instant3d/. ",
|
| 27 |
+
"page_idx": 0
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"type": "text",
|
| 31 |
+
"text": "1 INTRODUCTION ",
|
| 32 |
+
"text_level": 1,
|
| 33 |
+
"page_idx": 0
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"type": "text",
|
| 37 |
+
"text": "In recent years, remarkable progress has been achieved in the field of 2D image generation. This success can be attributed to two key factors: the development of novel generative models such as diffusion models (Song et al., 2021; Ho et al., 2020; Ramesh et al., 2022; Rombach et al., 2021), and the availability of large-scale datasets like Laion5B (Schuhmann et al., 2022). Transferring this success in 2D image generation to 3D presents challenges, mainly due to the scarcity of available 3D training data. While Laion5B has 5 billion text-image pairs, Objaverse-XL (Deitke et al., 2023a), the largest public 3D dataset, contains only 10 million 3D assets with less diversity and poorer annotations. As a result, previous attempts to directly train 3D diffusion models on existing 3D datasets (Luo & Hu, 2021; Nichol et al., 2022; Jun & Nichol, 2023; Gupta et al., 2023; Chen et al., 2023b) are limited in the visual (shape and appearance) quality, diversity and compositional complexity of the results they can produce. ",
|
| 38 |
+
"page_idx": 0
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"type": "text",
|
| 42 |
+
"text": "To address this, another line of methods (Poole et al., 2022; Wang et al., 2023a; Lin et al., 2023; Wang et al., 2023b; Chen et al., 2023c) leverage the semantic understanding and high-quality generation capabilities of pretrained 2D diffusion models. Here, 2D generators are used to calculate gradients on rendered images, which are then used to optimize a 3D representation, usually a NeRF (Mildenhall et al., 2020). Although these methods yield better visual quality and text-3D alignment, they can be incredibly time-consuming, taking hours of optimization for each prompt. They also suffer from artifacts such as over-saturated colors and the “multi-face” problem arising from the bias in pretrained 2D diffusion models, and struggle to generate diverse results from the same text prompt, with varying the random seed leading to minor changes in geometry and texture. ",
|
| 43 |
+
"page_idx": 0
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"type": "text",
|
| 47 |
+
"text": "In this paper, we propose Instant3D, a novel feed-forward method that generates high-quality and diverse 3D assets conditioned on the text prompt. Instant3D, like the methods noted above, builds on top of pretrained 2D diffusion models. However, it does so by splitting 3D generation into two stages: 2D generation and 3D reconstruction. In the first stage, instead of generating images sequentially (Liu et al., 2023b), we fine-tune an existing text-to-image diffusion model (Podell et al., 2023) to generate a sparse set of four-view images in the form of a $2 \\times 2$ grid in a single denoising process. This design allows the multi-view images to attend to each other during generation, leading to more view-consistent results. In the second stage, instead of relying on a slow optimizationbased reconstruction method, inspired by Hong et al. (2024), we introduce a novel sparse-view large reconstruction model with a transformer-based architecture that can directly regress a triplanebased (Chan et al., 2022) NeRF from a sparse set of multi-view images. Our model projects sparseview images into a set of pose-aware image tokens using pretrained vision transformers (Caron et al., 2021), which are then fed to an image-to-triplane decoder that contains a sequence of transformer blocks with cross-attention and self-attention layers. Our proposed model has a large capacity with more than 500 million parameters and can robustly infer correct geometry and appearance of objects from just four images. ",
|
| 48 |
+
"page_idx": 0
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"type": "image",
|
| 52 |
+
"img_path": "images/6c99eff258382d18956c2c575aac0d379df39a26a4396f95ccb2322295b0f6aa.jpg",
|
| 53 |
+
"image_caption": [
|
| 54 |
+
"Figure 1: Our method generates high-quality 3D NeRF assets from the given text prompts within 20 seconds. Here we show novel view renderings from our generated NeRFs as well as the renderings of the extracted meshes from their density field. "
|
| 55 |
+
],
|
| 56 |
+
"image_footnote": [],
|
| 57 |
+
"page_idx": 1
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "",
|
| 62 |
+
"page_idx": 1
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"type": "text",
|
| 66 |
+
"text": "Both of these stages are fine-tuned/trained with multi-view rendered images of around 750K 3D objects from Objaverse (Deitke et al., 2023b), where the second stage makes use of the full dataset and the first stage can be fine-tuned with as little as 10K data. While we use a relatively smaller dataset compared to the pre-training dataset for other modalities (e.g., C4 Raffel et al. (2020) for text and Laion5B for image), by combining it with the power of pretrained 2D diffusion models, Instant3D’s two-stage approach is able to generate high-quality and diverse 3D assets even from input prompts that contain complex compositional concepts (see Figure 1) and do not exist in the 3D dataset used for training. Due to its feed-forward architecture, Instant3D is exceptionally fast, requiring only about 20 seconds to generate a 3D asset, which is $2 0 0 \\times$ faster than previous optimization-based methods (Poole et al., 2022; Wang et al., 2023b) while achieving comparable or even better quality. ",
|
| 67 |
+
"page_idx": 1
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "2 RELATED WORKS ",
|
| 72 |
+
"text_level": 1,
|
| 73 |
+
"page_idx": 1
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"type": "text",
|
| 77 |
+
"text": "3D generation. Following the success of generative models on 2D images using VAEs (Kingma & Welling, 2013; Van Den Oord et al., 2017), GANs (Goodfellow et al., 2014; Karras et al., 2019; Gu et al., 2022; Kang et al., 2023), and autoregressive models (Oord et al., 2016; Van Den Oord et al., 2016), people have also explored the applications of such models on 3D generation. Previous approaches have explored different methods to generate 3D models in the form of point clouds (Wu et al., 2016; Gadelha et al., 2017; Smith & Meger, 2017), triangle meshes (Gao et al., 2022; Pavllo et al., 2020; Chen et al., 2019; Luo et al., 2021) , volumes (Chan et al., 2022; Or-El et al., 2022; Bergman et al., 2022; Skorokhodov et al., 2022; Mittal et al., 2022) and implicit representations (Liu et al., 2022; Fu et al., 2022; Sanghi et al., 2022) in an unconditional or text/image-conditioned manner. Such methods are usually trained on limited categories of 3D objects and do not generalize well to a wide range of novel classes. ",
|
| 78 |
+
"page_idx": 1
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "",
|
| 83 |
+
"page_idx": 2
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"type": "text",
|
| 87 |
+
"text": "Diffusion models (Rombach et al., 2021; Podell et al., 2023; Ho et al., 2020; Song et al., 2021; Saharia et al., 2022) open new possibilities for 3D generation. A class of methods directly train 3D diffusion models on the 3D representations (Nichol et al., 2022; Liu et al., 2023c; Zhou et al., 2021; Sanghi et al., 2023) or project the 3D models or multi-view rendered images into latent representations (Ntavelis et al., 2023; Zeng et al., 2022; Gupta et al., 2023; Jun & Nichol, 2023; Chen et al., 2023b) and perform the diffusion process in the latent space. For example, Shap-E (Jun & Nichol, 2023) encodes each 3D shape into a set of parameters of an implicit function, and then trains a conditional diffusion model on the parameters. These approaches face challenges due to the restricted availability and diversity of existing 3D data, consequently resulting in generated content with poor visual quality and inadequate alignment with the input prompt. Therefore, although trained on millions of 3D assets, Shap-E still fails to generate 3D shapes with complex compositional concepts and high-fidelity textures. ",
|
| 88 |
+
"page_idx": 2
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"type": "text",
|
| 92 |
+
"text": "To resolve this, another line of works try to make use of 2D diffusion models to facilitate 3D generation. Some works (Jain et al., 2022; Mohammad Khalid et al., 2022) optimize meshes or NeRFs to maximize the CLIP Radford et al. (2021) score between the rendered images and input prompt utilizing pretrained CLIP models. While such methods can generate diverse 3D content, they exhibit a deficiency in visual realism. More recently, some works (Poole et al., 2022; Wang et al., 2023b; Lin et al., 2023; Chen et al., 2023c) optimize 3D representations using score distillation loss (SDS) based on pretrained 2D diffusion models. Such methods can generate high-quality results, but suffer from slow optimization, over-saturated colors and the Janus problem. For example, it takes 1.5 hours for DreamFusion (Poole et al., 2022) and 10 hours for ProlificDreamer Wang et al. (2023b) to generate a single 3D asset, which greatly limits their practicality. In contrast, our method enjoys the benefits of both worlds: it’s able to borrow information from pretrained 2D diffusion models to generate diverse multi-view consistent images that are subsequently lifted to faithful 3D models, while still being fast and efficient due to its feed-forward nature. ",
|
| 93 |
+
"page_idx": 2
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"type": "text",
|
| 97 |
+
"text": "Sparse-view reconstruction. Traditional 3D reconstruction with multi-view stereo (Agarwal et al., 2011; Schonberger et al. ¨ , 2016; Furukawa et al., 2015) typically requires a dense set of input images that have significant overlaps to find correspondence across views and infer the geometry correctly. While NeRF (Mildenhall et al., 2020) and its variants (Muller et al. ¨ , 2022; Chen et al., 2022; 2023a) have further alleviated the prerequisites for 3D reconstruction, they perform per-scene optimization that still necessitates a lot of input images. Previous methods (Wang et al., 2021; Chen et al., 2021; Long et al., 2022; Reizenstein et al., 2021; Trevithick & Yang, 2021; Shen et al., 2023) have tried to learn data priors so as to infer NeRF from a sparse set of images. Typically they extract per-view features from each input image, and then for each point on the camera ray, aggregate multiview features and decode them to the density (or SDF) and colors. Such methods are either trained in a category-specific manner, or only trained on small datasets such as ShapeNet; they have not been demonstrated to generalize beyond these datasets especially to the complex text-to-2D outputs. ",
|
| 98 |
+
"page_idx": 2
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"type": "text",
|
| 102 |
+
"text": "More recently, some methods utilize data priors from pretrained 2D diffusion models to lift a single 2D image to 3D by providing supervision at novel views using SDS loss (Liu et al., 2023b; Qian et al., 2023; Melas-Kyriazi et al., 2023) or generating multi-view images (Liu et al., 2023a). For instance, One-2-3-45 (Liu et al., 2023a) generates 32 images at novel views from a single input image using a fine-tuned 2D diffusion model, and reconstructs a 3D model from them, which suffers from inconsistency between the many generated views. In comparison, our sparse-view reconstructor adopts a highly scalable transformer-based architecture and is trained on large-scale 3D data. This gives it the ability to accurately reconstruct 3D models of novel unseen objects from a sparse set of 4 images without per-scene optimization. ",
|
| 103 |
+
"page_idx": 2
|
| 104 |
+
},
|
| 105 |
+
{
|
| 106 |
+
"type": "text",
|
| 107 |
+
"text": "3 METHOD ",
|
| 108 |
+
"text_level": 1,
|
| 109 |
+
"page_idx": 2
|
| 110 |
+
},
|
| 111 |
+
{
|
| 112 |
+
"type": "text",
|
| 113 |
+
"text": "Our method Instant3D is composed of two stages: sparse-view generation and feed-forward NeRF reconstruction. In Section 3.1, we present our approach for generating sparse multi-view images conditioned on the text input. In Section 3.2, we describe our transformer-based sparse-view large reconstruction model. ",
|
| 114 |
+
"page_idx": 2
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"type": "image",
|
| 118 |
+
"img_path": "images/81ee1718613c52e7b83680ac95feece08fbd52d66033a2740e25d54ed6579907.jpg",
|
| 119 |
+
"image_caption": [
|
| 120 |
+
"Figure 2: Overview of our method. Given a text prompt (‘a car made out of sushi’), we perform multi-view generation with Gaussian blobs as initialization using fine-tuned 2D diffusion model, producing a 4-view image in the form of a $2 \\times 2$ grid. Then we apply a transformer-based sparseview 3D reconstructor on the 4-view image to generate the final NeRF. "
|
| 121 |
+
],
|
| 122 |
+
"image_footnote": [],
|
| 123 |
+
"page_idx": 3
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"type": "text",
|
| 127 |
+
"text": "3.1 TEXT-CONDITIONED SPARSE VIEW GENERATION ",
|
| 128 |
+
"text_level": 1,
|
| 129 |
+
"page_idx": 3
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"type": "text",
|
| 133 |
+
"text": "Given a text prompt, our goal is to generate a set of multi-view images that are aligned with the prompt and consistent with each other. We achieve this by fine-tuning a pretrained text-to-image diffusion model to generate a $2 \\times 2$ image grid as shown in Figure 2. ",
|
| 134 |
+
"page_idx": 3
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"type": "text",
|
| 138 |
+
"text": "In the following paragraphs, we first illustrate that large text-to-image diffusion models (i.e., SDXL (Podell et al., 2023)) have the capacity to generate view-consistent images thus a lightweight fine-tuning is possible. We then introduce three essential techniques to achieve it: the image grid, the curation of the dataset, and also the Gaussian Blob noise initialization in inference. As a result of these observations and technical improvements, we can fine-tune the 2D diffusion model for only 10K steps (on 10K data) to generate consistent sparse views. ",
|
| 139 |
+
"page_idx": 3
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "Multi-view generation with image grid. Previous methods (Liu et al., 2023b;a) on novel-view synthesis show that image diffusion models are capable of understanding the multi-view consistency. In light of this, we compile the images at different views into a single image in the form of an image grid, as depicted in Figure 2. This image-grid design can better match the original data format of the 2D diffusion model, and is suitable for simple direct fine-tuning protocol of 2D models. We also observe that this simple protocol only works when the base 2D diffusion has enough capacity, as shown in the comparisons of Stable Diffusion v1.5 (Rombach et al., 2021) and SDXL (Podell et al., 2023) in Section 4.3. The benefit from simplicity will also be illustrated later in unlocking the lightweight fine-tuning possibility. ",
|
| 144 |
+
"page_idx": 3
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"type": "text",
|
| 148 |
+
"text": "Regarding the number of views in the image grid, there is a trade-off between the requirements of multi-view generation and 3D reconstruction. More generated views make the problem of 3D reconstruction easier with more overlaps but increase possibility of view inconsistencies in generation and reduces the resolution of each generated view. On the other hand, too few views may cause insufficient coverage, requiring the reconstructor to hallucinate unseen parts, which is challenging for a deterministic 3D reconstruction model. Our transformer-based reconstructor learns generic 3D priors from large-scale data, and greatly reduces the requirement for the number of views. We empirically found that using 4 views achieves a good balance in satisfying the two requirements above, and they can be naturally arranged in a $2 \\times 2$ grid as shown in Figure 2. Next, we detail how the image grid data is created and curated. ",
|
| 149 |
+
"page_idx": 3
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"type": "text",
|
| 153 |
+
"text": "Multi-view data creation and curation. To fine-tune the text-to-image diffusion model, we create paired multi-view renderings and text prompts. We adopt a large-scale synthetic 3D dataset Objaverse (Deitke et al., 2023b) and render four $5 1 2 \\times 5 1 2$ views of about 750K objects with Blender. We distribute the four views at a fixed elevation (20 degrees) and four equidistant azimuths (0, 90, 180, 270 degrees) to achieve a better coverage of the object. We use Cap3D (Luo et al., 2023) to generate captions for each 3D object, which consolidates captions from multi-view renderings generated with pretrained image captioning model BLIP-2 (Li et al., 2023) using a large language model (LLM). Finally, the four views are assembled into a grid image in a fixed order and resized to the input resolution compatible with the 2D diffusion model. ",
|
| 154 |
+
"page_idx": 3
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"type": "text",
|
| 158 |
+
"text": "We find that naively using all the data for fine-tuning reduces the photo-realism of the generated images and thus the quality of the 3D assets. Therefore, we train a simple scorer on a small amount (2000 samples) of manually labeled data to predict the quality of each 3D object. The model is a simple SVM on top of pretrained CLIP features extracted from multi-view renderings of the 3D object (please see Appendix for details). During training, our model only takes the top 10K data ranked by our scorer. We provide a quantitative study in Section 4.3 to validate the impact of different data curation strategies. Although the difference is not very significant from the metric perspective, we found that our curated data is helpful in improving the visual quality. ",
|
| 159 |
+
"page_idx": 3
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"type": "image",
|
| 163 |
+
"img_path": "images/324d5cff28ead68f7e94260c4c7714d8b28b03affe52c942f3236d03ce7c08ac.jpg",
|
| 164 |
+
"image_caption": [
|
| 165 |
+
"Figure 3: Architecture of our sparse-view reconstructor. The model applies a pretrained ViT to encode multi-view images into pose-aware image tokens, from which we decode a triplane representation of the scene using a transformer-based decoder. Finally we decode per-point triplane features to its density and color and perform volume rendering to render novel views. We illustrate here with 2 views and the actual implementation uses 4 views. "
|
| 166 |
+
],
|
| 167 |
+
"image_footnote": [],
|
| 168 |
+
"page_idx": 4
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "text",
|
| 172 |
+
"text": "",
|
| 173 |
+
"page_idx": 4
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "Inference with Gaussian blob initialization. While our training data is multi-view images with a white background, we observe that during inference starting from standard Gaussian noise still results in images that have cluttered backgrounds (see Figure 5); this introduces extra difficulty for the feed-forward reconstructor in the second stage (Section 3.2). To guide the model toward generating images with a clean white background, inspired by SDEdit (Meng et al., 2022), we first create an image of a $2 \\times 2$ grid with a solid white background that has the same resolution as the output image, and initialize each sub-grid with a 2D Gaussian blob that is placed at the center of the image with a standard deviation of 0.1 (please see Appendix for details). The visualization of this Gaussian Blob is shown in Figure 2. The Gaussian blob image grid is fed to the auto-encoder to get its latent. We then add diffusion noise (e.g., use t=980/1000 for 50 DDIM denoising steps), and use it as the starting point for the denoising process. As seen in Figure 5, this technique effectively guides the model toward generating images with a clean background. ",
|
| 178 |
+
"page_idx": 4
|
| 179 |
+
},
|
| 180 |
+
{
|
| 181 |
+
"type": "text",
|
| 182 |
+
"text": "Lightweight fine-tuning. With all the above observations and techniques, we are able to adapt a text-to-image diffusion model to a text-to-multiview model with lightweight fine-tuning. This lightweight fine-tuning shares a similar spirit to the ‘instruction fine-tuning’ (Mishra et al., 2022; Wei et al., 2021) for LLM alignment. The assumption is that the base model is already capable of the task, and the fine-tuning is to unlock the base model’s ability without introducing additional knowledge. ",
|
| 183 |
+
"page_idx": 4
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "Since we utilize an image grid, the fine-tuning follows the exactly same protocol as the 2D diffusion model pre-training, except that we decrease the learning rate to $1 0 ^ { - 5 }$ . We train the model with a batch size of 192 for only 10K iterations on the 10K curated multi-view data. The training is done using 32 NVIDIA A100 GPUs for only 3 hours. We study the impact of different training settings in Section 4.3. For more training details, please refer to Appendix. ",
|
| 188 |
+
"page_idx": 4
|
| 189 |
+
},
|
| 190 |
+
{
|
| 191 |
+
"type": "text",
|
| 192 |
+
"text": "3.2 FEED-FORWARD SPARSE-VIEW LARGE RECONSTRUCTION MODEL",
|
| 193 |
+
"text_level": 1,
|
| 194 |
+
"page_idx": 4
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"type": "text",
|
| 198 |
+
"text": "In this stage, we aim to reconstruct a NeRF from the four-view images $\\mathcal { T } = \\{ \\mathbf { I } _ { i } ~ | ~ i = 1 , . . . , 4 \\}$ generated in the first stage. 3D reconstruction from sparse inputs with a large baseline is a challenging problem, which requires strong model priors to resolve the inherent ambiguity. Inspired by a recent work LRM (Hong et al., 2024) that introduces a transformer-based model for single image 3D reconstruction, we propose a novel approach that enables us to predict a NeRF from a sparse set of input views with known poses. Similar to Hong et al. (2024), our model consists of an image encoder, an image-to-triplane decoder, and a NeRF decoder. The image encoder encodes the multiview images into a set of tokens. We feed the concatenated image tokens to the image-to-triplane decoder to output a triplane representation (Chan et al., 2022) for the 3D object. Finally, the triplane features are decoded into per-point density and colors via the NeRF MLP decoder. ",
|
| 199 |
+
"page_idx": 4
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "text",
|
| 203 |
+
"text": "",
|
| 204 |
+
"page_idx": 5
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"type": "text",
|
| 208 |
+
"text": "In detail, we apply a pretrained Vision Transformer (ViT) DINO (Caron et al., 2021) as our image encoder. To support multi-view inputs, we inject camera information in the image encoder to make the output image tokens pose-aware. This is different from Hong et al. (2024) that feeds the camera information in the image-to-triplane decoder because they take single image input. The camera information injection is done by the AdaLN (Huang & Belongie, 2017; Peebles & Xie, 2022) camera modulation as described in Hong et al. (2024). The final output of the image encoder is a set of poseaware image tokens $f _ { { \\mathbf { I } } _ { i } } ^ { * }$ , and we concatenate the per-view tokens together as the feature descriptors for the multi-view images: $\\mathbf { \\mathit { f } } _ { \\mathbb { T } } = \\oplus ( \\mathbf { \\mathit { f } } _ { \\mathbf { \\mathit { I } } _ { 1 } } ^ { * } , . . . \\mathbf { \\mathit { f } } _ { \\mathbf { \\mathit { I } } _ { 4 } } ^ { * } )$ ",
|
| 209 |
+
"page_idx": 5
|
| 210 |
+
},
|
| 211 |
+
{
|
| 212 |
+
"type": "text",
|
| 213 |
+
"text": "We use triplane as the scene representation. The triplane is flattened to a sequence of learnable tokens, and the image-to-triplane decoder connects these triplane tokens with the pose-aware image tokens $f _ { \\mathcal { T } }$ using cross-attention layers, followed by self-attention and MLP layers. The final output tokens are reshaped and upsampled using a de-convolution layer to the final triplane representation. During training, we ray march through the object bounding box and decode the triplane features at each point to its density and color using a shared MLP, and finally get the pixel color via volume rendering. We train the networks in an end-to-end manner with image reconstruction loss at novel views using a combination of MSE loss and LPIPS (Zhang et al., 2018) loss. ",
|
| 214 |
+
"page_idx": 5
|
| 215 |
+
},
|
| 216 |
+
{
|
| 217 |
+
"type": "text",
|
| 218 |
+
"text": "Training details. We train the model on multi-view renderings of the Objaverse dataset (Deitke et al., 2023b). Different from the first stage that performs data curation, we use all the 3D objects in the dataset and scale them to $[ - 1 , 1 ] ^ { 3 }$ ; then we generate multi-view renderings using Blender under uniform lighting with a resolution of $5 1 2 \\times 5 1 2$ . While the output images from the first stage are generated in a structured setup with fixed camera poses, we train the model using random views as a data augmentation mechanism to increase the robustness. Particularly, we randomly sample 32 views around each object. During training, we randomly select a subset of 4 images as input and another random set of 4 images as supervision. For inference, we will reuse the fixed camera poses in the first stage as the camera input to the reconstructor. For more details on the training, please refer to the Appendix. ",
|
| 219 |
+
"page_idx": 5
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"type": "text",
|
| 223 |
+
"text": "4 EXPERIMENTS ",
|
| 224 |
+
"text_level": 1,
|
| 225 |
+
"page_idx": 5
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"type": "text",
|
| 229 |
+
"text": "In this section, we first do comparisons against previous methods on text-to-3D (Section 4.1), and then perform ablation studies on different design choices of our method. By default, we report the results generated with fine-tuned SDXL models, unless otherwise noted. ",
|
| 230 |
+
"page_idx": 5
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"type": "text",
|
| 234 |
+
"text": "4.1 TEXT-TO-3D ",
|
| 235 |
+
"text_level": 1,
|
| 236 |
+
"page_idx": 5
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"type": "text",
|
| 240 |
+
"text": "We make comparisons to state-of-the-art methods on text-to-3D, including a feed-forward method Shap-E (Jun & Nichol, 2023), and optimization-based methods including DreamFusion (Poole et al., 2022) and ProlificDreamer (Wang et al., 2023b). We use the official code for Shap-E, and the implementation from three-studio (Guo et al., 2023) for the other two as there is no official code. We use default hyper-parameters (number of optimization iterations, number of denoising steps) of these models. For our own model we use the SDXL base model fine-tuned on 10K data for 10K steps. During inference we take 100 DDIM steps. ",
|
| 241 |
+
"page_idx": 5
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"type": "text",
|
| 245 |
+
"text": "Qualitative comparisons. As shown in Figure 4, our method generates visually better results than those of Shap-E, producing sharper textures, better geometry and substantially improved text3D alignment. Shap-E applies a diffusion model that is exclusively trained on million-level 3D data, which might be evidence for the need of 2D data or models with 2D priors. DreamFusion and ProlificDreamer achieve better text-3D alignment utilizing pretrained 2D diffusion models. However, ",
|
| 246 |
+
"page_idx": 5
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"type": "image",
|
| 250 |
+
"img_path": "images/da4a54df465ebb47b07f4d47c2dd449c4e65b8fd41d20ff212b7dad5cc8a372b.jpg",
|
| 251 |
+
"image_caption": [
|
| 252 |
+
"Figure 4: Qualitative comparisons on text-to-3D against previous methods. We include more uncurated comparisons in the supplementary material. "
|
| 253 |
+
],
|
| 254 |
+
"image_footnote": [],
|
| 255 |
+
"page_idx": 6
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "text",
|
| 259 |
+
"text": "Table 1: Quantitative comparisons on CLIP scores against baseline methods. Our method outperforms previous feed-forward method Shap-E and optimization-based method DreamFusion, and achieves competitive performance compared to ProlificDreamer while being $1 8 0 0 \\times$ faster. ",
|
| 260 |
+
"page_idx": 6
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
"type": "table",
|
| 264 |
+
"img_path": "images/16f9644a462ca21bf2c5efae01d53ee49f56d62626729ed6a1979a3c26112bbc.jpg",
|
| 265 |
+
"table_caption": [
|
| 266 |
+
"Table 2: Quantitative comparisons against previous sparse-view reconstruction methods on GSO dataset. "
|
| 267 |
+
],
|
| 268 |
+
"table_footnote": [],
|
| 269 |
+
"table_body": "<table><tr><td></td><td>ViT-L/14 个</td><td>ViT-bigG-14↑</td><td>Time(s)↓</td></tr><tr><td>Shap-E</td><td>20.51</td><td>32.21</td><td>6</td></tr><tr><td>DreamFusion</td><td>23.60</td><td>37.46</td><td>5400</td></tr><tr><td>ProlificDreamer</td><td>27.39</td><td>42.98</td><td>36000</td></tr><tr><td>Ours</td><td>26.87</td><td>41.77</td><td>20</td></tr></table>",
|
| 270 |
+
"page_idx": 6
|
| 271 |
+
},
|
| 272 |
+
{
|
| 273 |
+
"type": "table",
|
| 274 |
+
"img_path": "images/34415621989867a175e3ad79072c29fcb5bdb9bac93788836fe9f9ce0a19044f.jpg",
|
| 275 |
+
"table_caption": [],
|
| 276 |
+
"table_footnote": [],
|
| 277 |
+
"table_body": "<table><tr><td></td><td>PSNR↑</td><td>SSIM↑</td><td>LPIPS↓</td></tr><tr><td>SparseNeus</td><td>20.62</td><td>0.8360</td><td>0.1989</td></tr><tr><td>Ours</td><td>26.54</td><td>0.8934</td><td>0.0643</td></tr></table>",
|
| 278 |
+
"page_idx": 6
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"type": "text",
|
| 282 |
+
"text": "DreamFusion generates results with over-saturated colors and over-smooth textures. While ProlificDreamer results have better details, it still suffers from low-quality geometry (as in ‘A bulldozer clearing ...’) and the Janus problem (as in ”a squirrel dressed like ...”, also more detailed in Appendix Figure 11). In comparison, our results have more photorealistic appearance with better geometric details. Please refer to the Appendix and supplementary materials for video comparisons and more results. ",
|
| 283 |
+
"page_idx": 6
|
| 284 |
+
},
|
| 285 |
+
{
|
| 286 |
+
"type": "text",
|
| 287 |
+
"text": "Quantitative comparisons. In Table 4, we quantitatively assess the coherence between the generated models and text prompts using CLIP-based scores. We perform the evaluation on results with 400 text prompts from DreamFusion. For each model, we render 10 random views and calculate the average CLIP score between the rendered images and the input text. We report the metric using multiple variants of CLIP models with different model sizes and training data (i.e., ViT-L/14 from OpenAI and ViT-bigG-14 from OpenCLIP). From the results we can see that our model achieves higher CLIP scores than Shap-E, indicating better text-3D alignment. Our method even achieves consistently higher CLIP scores than optimization-based method DreamFusion and competitive scores to ProlificDreamer, from which we can see that our approach can effectively inherit the great text understanding capability from the pretrained SDXL model and preserve them in the generated 3D assets via consistent sparse-view generation and robust 3D reconstruction. ",
|
| 288 |
+
"page_idx": 6
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"type": "text",
|
| 292 |
+
"text": "Inference time comparisons. We present the time to generate a 3D asset in Table 1. The timing is measured using the default hyper-parameters of each method on an A100 GPU. Notably, our method is significantly faster than the optimization-based methods: while it takes 1.5 hours for DreamFusion and 10 hours for ProlificDreamer to generate a single asset, our method can finish the generation within 20 seconds, resulting in a $2 7 0 \\times$ and $1 8 0 0 \\times$ speed up respectively. In Figure 10, we show that our inference time can be further reduced without obviously sacrificing the quality by decreasing the number of DDIM steps. ",
|
| 293 |
+
"page_idx": 7
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "text",
|
| 297 |
+
"text": "4.2 COMPARISONS ON SPARSE VIEW RECONSTRUCTION",
|
| 298 |
+
"text_level": 1,
|
| 299 |
+
"page_idx": 7
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"type": "text",
|
| 303 |
+
"text": "We make comparisons to previous sparse-view NeRF reconstruction works. Most of previous works (Reizenstein et al., 2021; Trevithick & Yang, 2021; Yu et al., 2021) are either trained on small-scale datasets such as ShapeNet, or trained in a category-specific manner. Therefore, we make comparisons to a state-of-the-art method SparseNeus (Long et al., 2022), which is also applied in One-2-3-45 (Liu et al., 2023a) where they train the model on the same Objaverse dataset for sparseview reconstruction. We do the comparisons on the Google Scan Object (GSO) dataset (Downs et al., 2022), which consists of 1019 objects. For each object, we render 4-view input following the structured setup and randomly select another 10 views for testing. We adopt the pretrained model from Liu et al. (2023a). Particularly, SparseNeus does not work well for 4-view inputs with such a large baseline; therefore we add another set of 4 input views in addition to our four input views (our method still uses 4 views as input), following the setup in Liu et al. (2023a). We report the metrics on novel view renderings in Table 2. From the table, we can see that our method outperforms the baseline method even with fewer input images, which demonstrates the superiority of our sparse-view reconstructor. ",
|
| 304 |
+
"page_idx": 7
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "4.3 ABLATION STUDY FOR SPARSE VIEW GENERATION ",
|
| 309 |
+
"text_level": 1,
|
| 310 |
+
"page_idx": 7
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "We ablate several key decisions in our method design, including (1) the choice of the larger 2D base model SDXL, (2) the use of Gaussian Blob during inference, (3) the quality and size of the curated dataset, and lastly, (4) the need and requirements of lightweight fine-tuning. We gather the quantitative results in Table 3 and place all qualitative results in the Appendix. We observe that qualitative results are more evident than quantitative results, thus we recommend a closer examination. ",
|
| 315 |
+
"page_idx": 7
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "Scalability with 2D text-to-image models. One of the notable advantages of our method is that its efficacy scales positively with the potency of the underlying 2D text-to-image model. In Figure 12, we present qualitative comparisons between two distinct backbones (with their own tuned hyperparameters): SD1.5 (Rombach et al., 2021) and SDXL (Podell et al., 2023). It becomes readily apparent that SDXL, which boasts a model size $3 \\times$ larger than that of SD1.5, exhibits superior text comprehension and visual quality. We also show a quantitative comparison on CLIP scores in Table 3. By comparing $\\mathrm { E x p } ( \\mathrm { l } , \\mathrm { m } )$ with $\\mathrm { E x p } ( \\mathrm { d } , \\mathrm { g } )$ , we can see that the model with SD1.5 achieves consistently lower CLIP scores indicating worse text-3D alignment. ",
|
| 320 |
+
"page_idx": 7
|
| 321 |
+
},
|
| 322 |
+
{
|
| 323 |
+
"type": "text",
|
| 324 |
+
"text": "Gaussian blob initialization. In Figure 5, we show our results generated with and without Gaussian blob initialization. From the results we can see that while our fine-tuned model can generate multi-view images without Gaussian blob initialization, they tend to have cluttered backgrounds, which challenges the second-stage feed-forward reconstructor. In contrast, our proposed Gaussian blob initialization enables the fine-tuned model to generate images with a clean white background, which better align with the requirements of the second stage. ",
|
| 325 |
+
"page_idx": 7
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"type": "text",
|
| 329 |
+
"text": "Quality and size of fine-tuning dataset. We evaluate the impact of the quality and size of the dataset used for fine-tuning 2D text-to-image models. We first make comparisons between curated and uncurated (randomly selected) data. The CLIP score rises slightly as shown in Table 3 (i.e., comparing $\\mathrm { E x p } ( \\mathrm { d } , \\mathrm { i } ) )$ , while there is a substantial quality improvement as illustrated in Appendix Figure 7. This aligns with the observation that the data quality can dramatically impact the results in the instruction fine-tuning stage of LLM (Zhou et al., 2023). ",
|
| 330 |
+
"page_idx": 7
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"type": "text",
|
| 334 |
+
"text": "When it comes to data size, we observe a double descent from Table $\\mathrm { E x p } ( \\mathbf { a } , \\mathbf { d } , \\mathbf { g } )$ with 1K, 10K, and 100K data. We pick Exp(a, d, g) here because they are the best results among different training steps for the same training data size. The reason for this double descent can be spotlighted by the qualitative comparisons in Appendix Figure 13, where training with 1K data can lead to inconsistent multi-view images, while training with 100K data can hurt the compositionality, photo-realism, and also text alignment. ",
|
| 335 |
+
"page_idx": 7
|
| 336 |
+
},
|
| 337 |
+
{
|
| 338 |
+
"type": "image",
|
| 339 |
+
"img_path": "images/16e609251d003ccf3889851c900f6e51538032412713c2c4375f264fe726cddb.jpg",
|
| 340 |
+
"image_caption": [
|
| 341 |
+
"Figure 5: Qualitative comparisons on results generated with and without Gaussian blob initialization. "
|
| 342 |
+
],
|
| 343 |
+
"image_footnote": [],
|
| 344 |
+
"page_idx": 8
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "table",
|
| 348 |
+
"img_path": "images/cdb27c1cd347fb25fd2171f93e5ab8adc563f6724ebd679f99470b5adde3f79d.jpg",
|
| 349 |
+
"table_caption": [
|
| 350 |
+
"Table 3: Comparison on CLIP scores of NeRF renderings with different variants of fine-tuning settings. "
|
| 351 |
+
],
|
| 352 |
+
"table_footnote": [],
|
| 353 |
+
"table_body": "<table><tr><td>Exp ID</td><td>Exp Name</td><td>Base</td><td>#Data</td><td>Curated</td><td>#Steps</td><td>ViT-L/14</td><td>ViT-bigG-14</td></tr><tr><td>(a)</td><td>Curated-1K-s1k</td><td>SDXL</td><td>1K</td><td>√</td><td>1K</td><td>26.33</td><td>41.09</td></tr><tr><td>(b)</td><td>Curated-1K-s10k</td><td>SDXL</td><td>1K</td><td>√</td><td>10k</td><td>22.55</td><td>35.59</td></tr><tr><td>(c)</td><td>Curated-10K-s4k</td><td>SDXL</td><td>10K</td><td>√</td><td>4k</td><td>26.55</td><td>41.08</td></tr><tr><td>(d)</td><td>Curated-10K-s10k</td><td>SDXL</td><td>10K</td><td>√</td><td>10k</td><td>26.87</td><td>41.77</td></tr><tr><td>(e)</td><td>Curated-10K-s20k</td><td>SDXL</td><td>10K</td><td>√</td><td>20k</td><td>25.96</td><td>40.56</td></tr><tr><td>(f)</td><td>Curated-100K-s10k</td><td>SDXL</td><td>100K</td><td></td><td>10k</td><td>25.79</td><td>40.32</td></tr><tr><td>(g)</td><td>Curated-100K-s40k</td><td>SDXL</td><td>100K</td><td></td><td>40k</td><td>26.59</td><td>41.29</td></tr><tr><td>(h)</td><td>Curated-300K-s40k</td><td>SDXL</td><td>300K</td><td></td><td>40K</td><td>26.43</td><td>40.72</td></tr><tr><td>i</td><td>Random-10K-s10k</td><td>SDXL</td><td>10K</td><td>X</td><td>10k</td><td>26.87</td><td>41.47</td></tr><tr><td></td><td>Random-100K-s40k</td><td>SDXL</td><td>100K</td><td>X</td><td>40k</td><td>26.28</td><td>40.90</td></tr><tr><td>(k)</td><td>AllData-s40k</td><td>SDXL</td><td>700K</td><td>X</td><td>40k</td><td>26.13</td><td>40.60</td></tr><tr><td>1</td><td>Curated-10K-s10k (SD1.5)</td><td>SD1.5</td><td>10K</td><td>√</td><td>10k</td><td>23.50</td><td>36.90</td></tr><tr><td>(m)</td><td>Curated-100K-s40k (SD1.5)</td><td>SD1.5</td><td>100K</td><td>√</td><td>40k</td><td>25.48</td><td>39.07</td></tr></table>",
|
| 354 |
+
"page_idx": 8
|
| 355 |
+
},
|
| 356 |
+
{
|
| 357 |
+
"type": "text",
|
| 358 |
+
"text": "",
|
| 359 |
+
"page_idx": 8
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"type": "text",
|
| 363 |
+
"text": "Number of fine-tuning steps. We also quantitatively and qualitatively analyze the impact of finetuning steps. For each block in Table 3 we show the CLIP scores of different training steps. Similar to the findings in instruction fine-tuning (Ouyang et al., 2022), the results do not increase monotonically regarding the number of fine-tuning steps but have a peak in the middle. For example, in our final setup with the SDXL base model and 10K curated data (i.e., Exp(c, d, e)), the results are peaked at 10K steps. For other setups, the observations are similar. We also qualitatively compare the results at different training steps for 10K curated data in Appendix Figure 14. There is an obvious degradation in the quality of the results for both 4K and 20K training steps. ",
|
| 364 |
+
"page_idx": 8
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"type": "text",
|
| 368 |
+
"text": "Another important observation is that the peak might move earlier when the model size becomes larger. This can be observed by comparing between $\\operatorname { E x p } ( 1 , \\operatorname { m } )$ for SD1.5 and Exp(d,g) for SDXL. Note that this comparison is not conclusive yet from the Table given that SD1.5 does not perform reasonably with our direct fine-tuning protocol. More details are in the Appendix. ",
|
| 369 |
+
"page_idx": 8
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"type": "text",
|
| 373 |
+
"text": "We also found that Exp(a) with 1K steps on 1K data can achieve the best CLIP scores but the view consistency is actually disrupted. A possible reason is that the CLIP score is insensitive to certain artifacts introduced by reconstruction from inconsistent images, which also calls for a more reliable evaluation metric for 3D generation. ",
|
| 374 |
+
"page_idx": 8
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "text",
|
| 378 |
+
"text": "5 CONCLUSIONS ",
|
| 379 |
+
"text_level": 1,
|
| 380 |
+
"page_idx": 8
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"type": "text",
|
| 384 |
+
"text": "In this paper we presented a novel feed-forward two-stage approach Instant3D that can generate high-quality and diverse 3D assets from text prompts within 20 seconds. Our method finetunes a 2D text-to-image diffusion model to generate consistent 4-view images, and lifts them to 3D with a robust transformer-based large reconstruction model. The experiment results show that our method outperforms previous feed-forward methods in terms of quality while being equally fast, and achieves comparable or better performance to previous optimization-based methods with a speed-up of more than 200 times. Instant3D allows novice users to easily create 3D assets and enables fast prototyping and iteration for various applications such as 3D design and modeling. ",
|
| 385 |
+
"page_idx": 8
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"type": "text",
|
| 389 |
+
"text": "Ethics Statement. The generation ability of our model is inherited from the public 2D diffusion model SDXL. We only do lightweight fine-tuning over the SDXL model thus it is hard to introduce extra knowledge to it. Also, our model can share similar ethical and legal considerations to SDXL. The curation of the data for lightweight fine-tuning does not introduce outside annotators. Thus the quality of the data might be biased towards the preference of the authors, which can lead to a potential bias on the generated results as well. The text input to the model is not further checked by the model, which means that the model will try to do the generation for every text prompt it gets without the ability to acknowledge unknown knowledge. ",
|
| 390 |
+
"page_idx": 9
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"type": "text",
|
| 394 |
+
"text": "Reproducibility Statement. In the main text, we highlight the essential techniques to build our model for both the first stage (Section 3.1) and the second stage (Section 3.2). We discuss how our data is created and curated in Section 3. The full model configurations and training details can be found in Appendix Section A.3 and Section A.6. We have detailed all the optimizer hyperparameters and model dimensions. We present more details on our data curation process in Section A.2. We also attach the IDs of our curated data in Supplementary Materials to further facilitate the reproduction. ",
|
| 395 |
+
"page_idx": 9
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"type": "text",
|
| 399 |
+
"text": "REFERENCES ",
|
| 400 |
+
"text_level": 1,
|
| 401 |
+
"page_idx": 9
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"type": "text",
|
| 405 |
+
"text": "Adobe. Adobe Firefly. https://firefly.adobe.com/, 2023. ",
|
| 406 |
+
"page_idx": 9
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"type": "text",
|
| 410 |
+
"text": "Sameer Agarwal, Yasutaka Furukawa, Noah Snavely, Ian Simon, Brian Curless, Steven M Seitz, and Richard Szeliski. Building rome in a day. Communications of the ACM, 54(10):105–112, 2011. \nAlexander Bergman, Petr Kellnhofer, Wang Yifan, Eric Chan, David Lindell, and Gordon Wetzstein. Generative neural articulated radiance fields. Advances in Neural Information Processing Systems, 35:19900–19916, 2022. \nMathilde Caron, Hugo Touvron, Ishan Misra, Herve J ´ egou, Julien Mairal, Piotr Bojanowski, and ´ Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the International Conference on Computer Vision (ICCV), 2021. \nEric R. Chan, Connor Z. Lin, Matthew A. Chan, Koki Nagano, Boxiao Pan, Shalini De Mello, Orazio Gallo, Leonidas Guibas, Jonathan Tremblay, Sameh Khamis, Tero Karras, and Gordon Wetzstein. Efficient geometry-aware 3D generative adversarial networks. In CVPR, 2022. \nAnpei Chen, Zexiang Xu, Fuqiang Zhao, Xiaoshuai Zhang, Fanbo Xiang, Jingyi Yu, and Hao Su. Mvsnerf: Fast generalizable radiance field reconstruction from multi-view stereo. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 14124–14133, 2021. \nAnpei Chen, Zexiang Xu, Andreas Geiger, Jingyi Yu, and Hao Su. Tensorf: Tensorial radiance fields. In European Conference on Computer Vision (ECCV), 2022. \nAnpei Chen, Zexiang Xu, Xinyue Wei, Siyu Tang, Hao Su, and Andreas Geiger. Dictionary fields: Learning a neural basis decomposition. ACM Trans. Graph., 2023a. \nHansheng Chen, Jiatao Gu, Anpei Chen, Wei Tian, Zhuowen Tu, Lingjie Liu, and Hao Su. Singlestage diffusion nerf: A unified approach to 3d generation and reconstruction. In ICCV, 2023b. \nRui Chen, Yongwei Chen, Ningxin Jiao, and Kui Jia. Fantasia3d: Disentangling geometry and appearance for high-quality text-to-3d content creation. arXiv preprint arXiv:2303.13873, 2023c. \nTianqi Chen, Bing Xu, Chiyuan Zhang, and Carlos Guestrin. Training deep nets with sublinear memory cost. arXiv preprint arXiv:1604.06174, 2016. \nWenzheng Chen, Huan Ling, Jun Gao, Edward Smith, Jaakko Lehtinen, Alec Jacobson, and Sanja Fidler. Learning to predict 3d objects with an interpolation-based differentiable renderer. Advances in neural information processing systems, 32, 2019. \nTri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Re. Flashattention: Fast and memory- ´ efficient exact attention with io-awareness. Advances in Neural Information Processing Systems, 35:16344–16359, 2022. ",
|
| 411 |
+
"page_idx": 9
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "text",
|
| 415 |
+
"text": "Matt Deitke, Ruoshi Liu, Matthew Wallingford, Huong Ngo, Oscar Michel, Aditya Kusupati, Alan Fan, Christian Laforte, Vikram Voleti, Samir Yitzhak Gadre, et al. Objaverse-xl: A universe of $1 0 \\mathrm { m } + 3 \\mathrm { d }$ objects. arXiv preprint arXiv:2307.05663, 2023a. ",
|
| 416 |
+
"page_idx": 10
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"type": "text",
|
| 420 |
+
"text": "Matt Deitke, Dustin Schwenk, Jordi Salvador, Luca Weihs, Oscar Michel, Eli VanderBilt, Ludwig Schmidt, Kiana Ehsani, Aniruddha Kembhavi, and Ali Farhadi. Objaverse: A universe of annotated 3d objects. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13142–13153, 2023b. \nLaura Downs, Anthony Francis, Nate Koenig, Brandon Kinman, Ryan Hickman, Krista Reymann, Thomas B McHugh, and Vincent Vanhoucke. Google scanned objects: A high-quality dataset of 3d scanned household items. In 2022 International Conference on Robotics and Automation (ICRA), pp. 2553–2560. IEEE, 2022. \nRao Fu, Xiao Zhan, Yiwen Chen, Daniel Ritchie, and Srinath Sridhar. Shapecrafter: A recursive text-conditioned 3d shape generation model. Advances in Neural Information Processing Systems, 35:8882–8895, 2022. \nYasutaka Furukawa, Carlos Hernandez, et al. Multi-view stereo: A tutorial. ´ Foundations and Trends® in Computer Graphics and Vision, 9(1-2):1–148, 2015. \nMatheus Gadelha, Subhransu Maji, and Rui Wang. 3d shape induction from 2d views of multiple objects. In 2017 International Conference on 3D Vision (3DV), pp. 402–411. IEEE, 2017. \nJun Gao, Tianchang Shen, Zian Wang, Wenzheng Chen, Kangxue Yin, Daiqing Li, Or Litany, Zan Gojcic, and Sanja Fidler. Get3d: A generative model of high quality 3d textured shapes learned from images. Advances In Neural Information Processing Systems, 35:31841–31854, 2022. \nIan Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. Advances in neural information processing systems, 27, 2014. \nJiatao Gu, Lingjie Liu, Peng Wang, and Christian Theobalt. Stylenerf: A style-based 3d aware generator for high-resolution image synthesis. In International Conference on Learning Representations, 2022. \nYuan-Chen Guo, Ying-Tian Liu, Ruizhi Shao, Christian Laforte, Vikram Voleti, Guan Luo, ChiaHao Chen, Zi-Xin Zou, Chen Wang, Yan-Pei Cao, and Song-Hai Zhang. threestudio: A unified framework for 3d content generation. https://github.com/threestudio-project/ threestudio, 2023. \nAnchit Gupta, Wenhan Xiong, Yixin Nie, Ian Jones, and Barlas Oguz. 3dgen: Triplane latent ˘ diffusion for textured mesh generation. arXiv preprint arXiv:2303.05371, 2023. \nJonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. Advances in neural information processing systems, 33:6840–6851, 2020. \nYicong Hong, Kai Zhang, Jiuxiang Gu, Sai Bi, Yang Zhou, Difan Liu, Feng Liu, Kalyan Sunkavalli, Trung Bui, and Hao Tan. Lrm: Large reconstruction model for single image to 3d. In ICLR, 2024. \nXun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE international conference on computer vision, pp. 1501–1510, 2017. \nAjay Jain, Ben Mildenhall, Jonathan T Barron, Pieter Abbeel, and Ben Poole. Zero-shot text-guided object generation with dream fields. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 867–876, 2022. \nHeewoo Jun and Alex Nichol. Shap-e: Generating conditional 3d implicit functions. arXiv preprint arXiv:2305.02463, 2023. \nMinguk Kang, Jun-Yan Zhu, Richard Zhang, Jaesik Park, Eli Shechtman, Sylvain Paris, and Taesung Park. Scaling up gans for text-to-image synthesis. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2023. \nTero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4401–4410, 2019. \nDiederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. \nDiederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013. \nJunnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. Blip-2: Bootstrapping language-image pre-training with frozen image encoders and large language models. 2023. \nChen-Hsuan Lin, Jun Gao, Luming Tang, Towaki Takikawa, Xiaohui Zeng, Xun Huang, Karsten Kreis, Sanja Fidler, Ming-Yu Liu, and Tsung-Yi Lin. Magic3d: High-resolution text-to-3d content creation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 300–309, 2023. \nMinghua Liu, Chao Xu, Haian Jin, Linghao Chen, Mukund Varma T, Zexiang Xu, and Hao Su. One-2-3-45: Any single image to 3d mesh in 45 seconds without per-shape optimization, 2023a. \nRuoshi Liu, Rundi Wu, Basile Van Hoorick, Pavel Tokmakov, Sergey Zakharov, and Carl Vondrick. Zero-1-to-3: Zero-shot one image to 3d object, 2023b. \nZhen Liu, Yao Feng, Michael J Black, Derek Nowrouzezahrai, Liam Paull, and Weiyang Liu. Meshdiffusion: Score-based generative 3d mesh modeling. arXiv preprint arXiv:2303.08133, 2023c. \nZhengzhe Liu, Yi Wang, Xiaojuan Qi, and Chi-Wing Fu. Towards implicit text-guided 3d shape generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 17896–17906, 2022. \nXiaoxiao Long, Cheng Lin, Peng Wang, Taku Komura, and Wenping Wang. Sparseneus: Fast generalizable neural surface reconstruction from sparse views. In European Conference on Computer Vision, pp. 210–227. Springer, 2022. \nIlya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017. \nAndrew Luo, Tianqin Li, Wen-Hao Zhang, and Tai Sing Lee. Surfgen: Adversarial 3d shape synthesis with explicit surface discriminators. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 16238–16248, 2021. \nShitong Luo and Wei Hu. Diffusion probabilistic models for 3d point cloud generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 2837–2845, 2021. \nTiange Luo, Chris Rockwell, Honglak Lee, and Justin Johnson. Scalable 3d captioning with pretrained models. arXiv preprint arXiv:2306.07279, 2023. \nLuke Melas-Kyriazi, Christian Rupprecht, Iro Laina, and Andrea Vedaldi. Realfusion: 360 reconstruction of any object from a single image. In CVPR, 2023. URL https://arxiv.org/ abs/2302.10663. \nChenlin Meng, Yutong He, Yang Song, Jiaming Song, Jiajun Wu, Jun-Yan Zhu, and Stefano Ermon. SDEdit: Guided image synthesis and editing with stochastic differential equations. In International Conference on Learning Representations, 2022. \nPaulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, et al. Mixed precision training. In International Conference on Learning Representations, 2018. \nBen Mildenhall, Pratul P. Srinivasan, Matthew Tancik, Jonathan T. Barron, Ravi Ramamoorthi, and Ren Ng. Nerf: Representing scenes as neural radiance fields for view synthesis. In ECCV, 2020. \nSwaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. Cross-task generalization via natural language crowdsourcing instructions. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 3470–3487, 2022. \nParitosh Mittal, Yen-Chi Cheng, Maneesh Singh, and Shubham Tulsiani. Autosdf: Shape priors for 3d completion, reconstruction and generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 306–315, 2022. \nNasir Mohammad Khalid, Tianhao Xie, Eugene Belilovsky, and Tiberiu Popa. Clip-mesh: Generating textured meshes from text using pretrained image-text models. In SIGGRAPH Asia 2022 conference papers, pp. 1–8, 2022. \nThomas Muller, Alex Evans, Christoph Schied, and Alexander Keller. Instant neural graphics prim- ¨ itives with a multiresolution hash encoding. ACM Trans. Graph., 41(4):102:1–102:15, July 2022. doi: 10.1145/3528223.3530127. URL https://doi.org/10.1145/3528223. 3530127. \nAlex Nichol, Heewoo Jun, Prafulla Dhariwal, Pamela Mishkin, and Mark Chen. Point-e: A system for generating 3d point clouds from complex prompts. arXiv preprint arXiv:2212.08751, 2022. \nEvangelos Ntavelis, Aliaksandr Siarohin, Kyle Olszewski, Chaoyang Wang, Luc Van Gool, and Sergey Tulyakov. Autodecoding latent 3d diffusion models. arXiv preprint arXiv:2307.05445, 2023. \nAaron van den Oord, Sander Dieleman, Heiga Zen, Karen Simonyan, Oriol Vinyals, Alex Graves, Nal Kalchbrenner, Andrew Senior, and Koray Kavukcuoglu. Wavenet: A generative model for raw audio. arXiv preprint arXiv:1609.03499, 2016. \nRoy Or-El, Xuan Luo, Mengyi Shan, Eli Shechtman, Jeong Joon Park, and Ira KemelmacherShlizerman. StyleSDF: High-Resolution 3D-Consistent Image and Geometry Generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 13503–13513, June 2022. \nLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35: 27730–27744, 2022. \nDario Pavllo, Graham Spinks, Thomas Hofmann, Marie-Francine Moens, and Aurelien Lucchi. Convolutional generation of textured 3d meshes. Advances in Neural Information Processing Systems, 33:870–882, 2020. \nF. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12:2825–2830, 2011. \nWilliam Peebles and Saining Xie. Scalable diffusion models with transformers. arXiv preprint arXiv:2212.09748, 2022. \nDustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Muller, Joe ¨ Penna, and Robin Rombach. Sdxl: improving latent diffusion models for high-resolution image synthesis. arXiv preprint arXiv:2307.01952, 2023. \nBen Poole, Ajay Jain, Jonathan T. Barron, and Ben Mildenhall. Dreamfusion: Text-to-3d using 2d diffusion. arXiv, 2022. \nGuocheng Qian, Jinjie Mai, Abdullah Hamdi, Jian Ren, Aliaksandr Siarohin, Bing Li, HsinYing Lee, Ivan Skorokhodov, Peter Wonka, Sergey Tulyakov, et al. Magic123: One image to high-quality 3d object generation using both 2d and 3d diffusion priors. arXiv preprint arXiv:2306.17843, 2023. \nAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748–8763. PMLR, 2021. \nColin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. The Journal of Machine Learning Research, 21(1):5485–5551, 2020. \nAditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical textconditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 1(2):3, 2022. \nJeremy Reizenstein, Roman Shapovalov, Philipp Henzler, Luca Sbordone, Patrick Labatut, and David Novotny. Common objects in 3d: Large-scale learning and evaluation of real-life 3d category reconstruction. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 10901–10911, 2021. \nRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Bjorn Ommer. High- ¨ resolution image synthesis with latent diffusion models, 2021. \nChitwan Saharia, William Chan, Saurabh Saxena, Lala Li, Jay Whang, Emily L Denton, Kamyar Ghasemipour, Raphael Gontijo Lopes, Burcu Karagol Ayan, Tim Salimans, et al. Photorealistic text-to-image diffusion models with deep language understanding. Advances in Neural Information Processing Systems, 35:36479–36494, 2022. \nAditya Sanghi, Hang Chu, Joseph G Lambourne, Ye Wang, Chin-Yi Cheng, Marco Fumero, and Kamal Rahimi Malekshan. Clip-forge: Towards zero-shot text-to-shape generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18603–18613, 2022. \nAditya Sanghi, Rao Fu, Vivian Liu, Karl DD Willis, Hooman Shayani, Amir H Khasahmadi, Srinath Sridhar, and Daniel Ritchie. Clip-sculptor: Zero-shot generation of high-fidelity and diverse shapes from natural language. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 18339–18348, 2023. \nJohannes Lutz Schonberger, Enliang Zheng, Marc Pollefeys, and Jan-Michael Frahm. Pixelwise ¨ view selection for unstructured multi-view stereo. In European Conference on Computer Vision (ECCV), 2016. \nChristoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, et al. Laion-5b: An open large-scale dataset for training next generation image-text models. Advances in Neural Information Processing Systems, 35:25278–25294, 2022. \nBokui Shen, Xinchen Yan, Charles R Qi, Mahyar Najibi, Boyang Deng, Leonidas Guibas, Yin Zhou, and Dragomir Anguelov. Gina-3d: Learning to generate implicit neural assets in the wild. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 4913–4926, 2023. \nIvan Skorokhodov, Sergey Tulyakov, Yiqun Wang, and Peter Wonka. Epigraf: Rethinking training of 3d gans. Advances in Neural Information Processing Systems, 35:24487–24501, 2022. \nEdward J Smith and David Meger. Improved adversarial systems for 3d object generation and reconstruction. In Conference on Robot Learning, pp. 87–96. PMLR, 2017. \nJiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In International Conference on Learning Representations, 2021. URL https://openreview.net/ forum?id $\\bar { }$ St1giarCHLP. \nHugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee´ Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and \\` efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023. \nAlex Trevithick and Bo Yang. Grf: Learning a general radiance field for 3d representation and \nrendering. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 15182–15192, 2021. \nAaron Van Den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. ¨ In International conference on machine learning, pp. 1747–1756. PMLR, 2016. \nAaron Van Den Oord, Oriol Vinyals, et al. Neural discrete representation learning. Advances in neural information processing systems, 30, 2017. \nHaochen Wang, Xiaodan Du, Jiahao Li, Raymond A Yeh, and Greg Shakhnarovich. Score jacobian chaining: Lifting pretrained 2d diffusion models for 3d generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 12619–12629, 2023a. \nQianqian Wang, Zhicheng Wang, Kyle Genova, Pratul Srinivasan, Howard Zhou, Jonathan T. Barron, Ricardo Martin-Brualla, Noah Snavely, and Thomas Funkhouser. Ibrnet: Learning multiview image-based rendering. In CVPR, 2021. \nZhengyi Wang, Cheng Lu, Yikai Wang, Fan Bao, Chongxuan Li, Hang Su, and Jun Zhu. Prolificdreamer: High-fidelity and diverse text-to-3d generation with variational score distillation. arXiv \npreprint arXiv:2305.16213, 2023b. \nJason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned language models are zero-shot learners. In International Conference on Learning Representations, 2021. \nJiajun Wu, Chengkai Zhang, Tianfan Xue, Bill Freeman, and Josh Tenenbaum. Learning a probabilistic latent space of object shapes via 3d generative-adversarial modeling. Advances in neural information processing systems, 29, 2016. \nAlex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelNeRF: Neural radiance fields from one or few images. In CVPR, 2021. \nXiaohui Zeng, Arash Vahdat, Francis Williams, Zan Gojcic, Or Litany, Sanja Fidler, and Karsten Kreis. Lion: Latent point diffusion models for 3d shape generation. In Advances in Neural Information Processing Systems (NeurIPS), 2022. \nRichard Zhang, Phillip Isola, Alexei A Efros, Eli Shechtman, and Oliver Wang. The unreasonable effectiveness of deep features as a perceptual metric. In CVPR, 2018. \nChunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, et al. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206, 2023. \nLinqi Zhou, Yilun Du, and Jiajun Wu. 3d shape generation and completion through point-voxel diffusion. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 5826–5835, 2021. ",
|
| 421 |
+
"page_idx": 10
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "",
|
| 426 |
+
"page_idx": 11
|
| 427 |
+
},
|
| 428 |
+
{
|
| 429 |
+
"type": "text",
|
| 430 |
+
"text": "",
|
| 431 |
+
"page_idx": 12
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"type": "text",
|
| 435 |
+
"text": "",
|
| 436 |
+
"page_idx": 13
|
| 437 |
+
},
|
| 438 |
+
{
|
| 439 |
+
"type": "text",
|
| 440 |
+
"text": "",
|
| 441 |
+
"page_idx": 14
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"type": "text",
|
| 445 |
+
"text": "A APPENDIX ",
|
| 446 |
+
"text_level": 1,
|
| 447 |
+
"page_idx": 14
|
| 448 |
+
},
|
| 449 |
+
{
|
| 450 |
+
"type": "text",
|
| 451 |
+
"text": "A.1 DIVERSITY OF GENERATION ",
|
| 452 |
+
"text_level": 1,
|
| 453 |
+
"page_idx": 14
|
| 454 |
+
},
|
| 455 |
+
{
|
| 456 |
+
"type": "text",
|
| 457 |
+
"text": "Inheriting the generation capability from the base SDXL model, our method can generate diverse results from the same text prompt by using different random seeds in the feed-forward pass. As shown in Figure 6, our approach excels in generating diverse 3D assets featuring strikingly distinct textures and geometries from the same prompt. This is in contrast to previous SDS-optimization based methods, which are prone to generate similar results even with different initializations (Poole et al., 2022). ",
|
| 458 |
+
"page_idx": 14
|
| 459 |
+
},
|
| 460 |
+
{
|
| 461 |
+
"type": "image",
|
| 462 |
+
"img_path": "images/6c90b4e8ce67141172e049f9111a3256915aec843e611188d69778e2d3341e19.jpg",
|
| 463 |
+
"image_caption": [
|
| 464 |
+
"Figure 6: Our method can generate diverse results from the same text prompt. "
|
| 465 |
+
],
|
| 466 |
+
"image_footnote": [],
|
| 467 |
+
"page_idx": 15
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"type": "text",
|
| 471 |
+
"text": "A.2 DATA CURATION DETIALS ",
|
| 472 |
+
"text_level": 1,
|
| 473 |
+
"page_idx": 15
|
| 474 |
+
},
|
| 475 |
+
{
|
| 476 |
+
"type": "text",
|
| 477 |
+
"text": "We apply a quality scorer to curate high-quality data from the Objaverse dataset. To train the quality scorer, we first randomly sample 2000 3D objects from the dataset and manually label each 3D asset as good or bad. Good assets have realistic textures and complex geometry, while bad ones have simple shapes and flat or cartoon-like textures. This criterion is subjective and imprecise, but we found it good enough for the purpose of data filtering. ",
|
| 478 |
+
"page_idx": 15
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"type": "text",
|
| 482 |
+
"text": "Since the amount of annotated data is limited, we use a pretrained CLIP (Radford et al., 2021) model to extract high-level image features of rendered images at 5 randomly sampled camera viewpoints for each object. Then we train a simple binary SVM classifier on top of the averaged CLIP features over different views. We use the $\\mathrm { N u S V C }$ implementation from the popular scikit-learn framework Pedregosa et al. (2011), which also gives us a probability estimation of the classification. We use the trained SVM model to predict the classification probability for all objects in the dataset by extracting CLIP features in the same way as done for the training data. These probabilities are used as scores to rank the data from high to low quality. Finally, we use the top 10K objects as our fine-tuning data. ",
|
| 483 |
+
"page_idx": 15
|
| 484 |
+
},
|
| 485 |
+
{
|
| 486 |
+
"type": "text",
|
| 487 |
+
"text": "To render the 4-view data, we scale the curated objects and center them at a cube $[ - 1 , 1 ] ^ { 3 }$ . We render the objects with a white background following the structured setup discussed in Section 3.1 using a field of view $5 0 ^ { \\circ }$ at a distance of 2.7 under uniform lighting. We use the physically-based path tracer Cycles in Blender for rendering. ",
|
| 488 |
+
"page_idx": 15
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"type": "text",
|
| 492 |
+
"text": "In Figure 7 we show qualitative comparisons on results from models trained with curated data and random data. Models trained with random data tend to generate cartoon-like 3D assets with simple and flat textures. This is not surprising since a bulk of the Objaverse dataset contains simple shapes with simple textures, and without curation these data will guide the model to over-denoise the results, leading to large areas of flat colors. On the contrary, models trained with curated data tend to generate more photorealistic assets with complex textures and geometries. ",
|
| 493 |
+
"page_idx": 15
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"type": "text",
|
| 497 |
+
"text": "A.3 SDXL FINE-TUNING DETAILS ",
|
| 498 |
+
"text_level": 1,
|
| 499 |
+
"page_idx": 15
|
| 500 |
+
},
|
| 501 |
+
{
|
| 502 |
+
"type": "text",
|
| 503 |
+
"text": "We use SDXL as the base model for our first-stage fine-tuning. We use AdamW optimizer with a fixed learning rate $1 0 ^ { - 5 }$ , $\\beta _ { 1 } = 0 . 9$ , $\\beta _ { 2 } = 0 . 9 9 9$ and a weight decay of $1 0 ^ { - 2 }$ . We fine-tune the model using fp16 on 32 NVIDIA A100 GPUs with a total batch size of 192. No gradient accumulation is used. We train the model on 10K curated data for 40K steps, which takes around 3 hours. ",
|
| 504 |
+
"page_idx": 15
|
| 505 |
+
},
|
| 506 |
+
{
|
| 507 |
+
"type": "text",
|
| 508 |
+
"text": "We train the model with the standard denoising diffusion loss (Ho et al., 2020) ",
|
| 509 |
+
"page_idx": 15
|
| 510 |
+
},
|
| 511 |
+
{
|
| 512 |
+
"type": "equation",
|
| 513 |
+
"img_path": "images/f2d39162799acd4eb0beb8f8f1201c8c3331dab84a0355a2780302d29a5fd46f.jpg",
|
| 514 |
+
"text": "$$\nL ( \\pmb \\theta ) = \\mathbb { E } _ { t , \\pmb { x } _ { 0 } , \\epsilon } \\big [ \\| \\epsilon - \\epsilon _ { \\theta } ( \\sqrt { \\overline { { \\alpha } } _ { t } } \\pmb x _ { 0 } + \\sqrt { 1 - \\overline { { \\alpha } } _ { t } } \\epsilon , t ) \\| ^ { 2 } \\big ]\n$$",
|
| 515 |
+
"text_format": "latex",
|
| 516 |
+
"page_idx": 15
|
| 517 |
+
},
|
| 518 |
+
{
|
| 519 |
+
"type": "text",
|
| 520 |
+
"text": "where $\\epsilon _ { \\theta }$ is the denoising U-Net and $\\pmb { \\theta }$ are the trainable parameters. ",
|
| 521 |
+
"page_idx": 15
|
| 522 |
+
},
|
| 523 |
+
{
|
| 524 |
+
"type": "text",
|
| 525 |
+
"text": "SDXL introduces image resolution and aspect ratio conditioning that allow mixing training on images of different resolutions and aspect ratios. As for our training data, we render 4 views each with a resolution of $5 1 2 \\times 5 1 2$ and assemble them into a $1 0 2 4 \\times 1 0 2 4$ image. Therefore we fix the resolution and aspect ratio conditioning to be (1024, 1024) throughout the fine-tuning procedure. We don’t do random cropping in our training and fixed the crop conditioning to be $( 0 , 0 )$ . All the other training setups are identical to the original SDXL. ",
|
| 526 |
+
"page_idx": 15
|
| 527 |
+
},
|
| 528 |
+
{
|
| 529 |
+
"type": "table",
|
| 530 |
+
"img_path": "images/6c9fd7ec1df7c3d4a080c1e82e14a204075de5853ae5881280944e9635cc64e8.jpg",
|
| 531 |
+
"table_caption": [
|
| 532 |
+
"Table 4: Ablation study of the sparse-view reconstruction model. "
|
| 533 |
+
],
|
| 534 |
+
"table_footnote": [],
|
| 535 |
+
"table_body": "<table><tr><td></td><td>#Layers</td><td>Render</td><td>Supervision</td><td>PSNR↑</td><td>SSIM↑</td><td>LPIPS↓</td></tr><tr><td>exp01</td><td>6</td><td>64</td><td>All</td><td>23.6551</td><td>0.8616</td><td>0.1281</td></tr><tr><td>exp02</td><td>12</td><td>64</td><td>All</td><td>23.8257</td><td>0.8631</td><td>0.1266</td></tr><tr><td>exp03</td><td>24</td><td>64</td><td>All</td><td>23.8351</td><td>0.8635</td><td>0.1258</td></tr><tr><td>exp04</td><td>12</td><td>32</td><td>All</td><td>23.1704</td><td>0.8561</td><td>0.1358</td></tr><tr><td>exp05</td><td>12</td><td>64</td><td>w/o novel</td><td>18.2359</td><td>0.8103</td><td>0.2256</td></tr><tr><td>exp06</td><td>12</td><td>64</td><td>w/o LPIPS</td><td>24.1699</td><td>0.8641</td><td>0.1934</td></tr></table>",
|
| 536 |
+
"page_idx": 16
|
| 537 |
+
},
|
| 538 |
+
{
|
| 539 |
+
"type": "text",
|
| 540 |
+
"text": "A.4 SD1.5 FINE-TUNING DETAILS ",
|
| 541 |
+
"text_level": 1,
|
| 542 |
+
"page_idx": 16
|
| 543 |
+
},
|
| 544 |
+
{
|
| 545 |
+
"type": "text",
|
| 546 |
+
"text": "We use 8 A100 GPUs for fine-tuning SD1.5 on 100K data with a total batch size of 64. We use the same AdamW optimizer as the one for SDXL with the same hyper-parameters. We also use gradient accumulation of 3 steps, which gives an effective batch size of 192. The training loss is the same as SDXL. We train the model for 120K steps (40K parameter updates due to gradient accumulation), which takes roughly 33 hours. ",
|
| 547 |
+
"page_idx": 16
|
| 548 |
+
},
|
| 549 |
+
{
|
| 550 |
+
"type": "text",
|
| 551 |
+
"text": "A.5 GAUSSIAN BLOBS INITIALIZATION ",
|
| 552 |
+
"text_level": 1,
|
| 553 |
+
"page_idx": 16
|
| 554 |
+
},
|
| 555 |
+
{
|
| 556 |
+
"type": "text",
|
| 557 |
+
"text": "Since the diffusion model is fine-tuned with only a relatively small number of steps, it still largely possesses the original denoising behavior on images that are not in the form of $2 \\times 2$ grids and do not have a white background. Naively applying the standard backward denoising process starting from random Gaussian noise will likely lead to results far from the distribution of the fine-tuning data (see Figure 5). ",
|
| 558 |
+
"page_idx": 16
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"type": "text",
|
| 562 |
+
"text": "The spatial structure of the training images is simple: four views of the same object are placed at the center of each quadrant. Also, the background is always white. Since the model is fine-tuned on such data with a denoising objective, it is natural that, when presented with a noisy input whose underlying clean image has these two characteristics, the model will tend to denoise the image to a clean one where the four-quadrant objects are view consistent. Following this, and inspired by SDEdit Meng et al. (2022), we introduce Gaussian blobs initialization to guide the model toward generating samples consistent with the distribution of the fine-tuning data. ",
|
| 563 |
+
"page_idx": 16
|
| 564 |
+
},
|
| 565 |
+
{
|
| 566 |
+
"type": "text",
|
| 567 |
+
"text": "The standard latent diffusion inference starts with a Gaussian noise image $\\epsilon$ with the same size as the image latents. Instead, we modify the initial iteration to be a composition of Gaussian noise and an image with the two aforementioned characteristics: object quadrants and white background. We construct such an image by generating a grayscale image with a clean white background and a black Gaussian blob at the center. Specifically, we construct a $H \\times W$ grayscale image $I$ , where $H$ and $W$ are the height and width of the input RGB image with a value range $[ 0 , 1 ]$ . For all our models $H = W$ , and we denote them using $S$ . For a given pixel $( x , y )$ , its pixel value is computed as ",
|
| 568 |
+
"page_idx": 16
|
| 569 |
+
},
|
| 570 |
+
{
|
| 571 |
+
"type": "equation",
|
| 572 |
+
"img_path": "images/7710f449dd304eef403ba2fe22baec2b613c86a28cc85e92165c84079b117c80.jpg",
|
| 573 |
+
"text": "$$\nI ( x , y ) = 1 - \\exp \\bigg ( - \\frac { ( x - S / 2 ) ^ { 2 } + ( y - S / 2 ) ^ { 2 } } { 2 \\sigma ^ { 2 } S ^ { 2 } } \\bigg )\n$$",
|
| 574 |
+
"text_format": "latex",
|
| 575 |
+
"page_idx": 16
|
| 576 |
+
},
|
| 577 |
+
{
|
| 578 |
+
"type": "text",
|
| 579 |
+
"text": "where $\\sigma$ is a hyper-parameter controlling the width of the Gaussian blob. Such an image looks like a black disc at the center of a white image slowly fading away toward the edges of the image. We then assemble four such images into a $2 \\times 2$ image grid. Some examples of such images with different $\\sigma$ can be seen at the first row of figure 5. ",
|
| 580 |
+
"page_idx": 16
|
| 581 |
+
},
|
| 582 |
+
{
|
| 583 |
+
"type": "text",
|
| 584 |
+
"text": "Next we construct the initial noise for the denoising step by blending a complete Gaussian noise latent with the latent of the Gaussian blobs. We denote the latent of the Gaussian blobs image $I$ as $\\tilde { I }$ , and the latent of a noise image with i.i.d. Gaussian values as $\\epsilon$ . For a $N$ step denoising inference process with timesteps $\\{ t _ { N } , t _ { N - 1 } , . . . , t _ { 0 } \\}$ , we mix the two latents with a weighted sum ",
|
| 585 |
+
"page_idx": 16
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"type": "equation",
|
| 589 |
+
"img_path": "images/6a859d2a1cce7e1ad1030fbb91f6413b006a21441ddebee2ec88f5c58fd614c6.jpg",
|
| 590 |
+
"text": "$$\n\\epsilon _ { t _ { N } } = \\sqrt { \\overline { { \\alpha } } _ { t _ { N } } } \\tilde { I } + \\sqrt { 1 - \\overline { { \\alpha } } _ { t _ { N } } } \\epsilon\n$$",
|
| 591 |
+
"text_format": "latex",
|
| 592 |
+
"page_idx": 16
|
| 593 |
+
},
|
| 594 |
+
{
|
| 595 |
+
"type": "text",
|
| 596 |
+
"text": "Then $\\epsilon _ { t _ { N } }$ is used as the initial noise of the denoising process, e.g., $t _ { N }$ is 980 for a denoising step with 50 (and the total number of timesteps is 1000). ",
|
| 597 |
+
"page_idx": 16
|
| 598 |
+
},
|
| 599 |
+
{
|
| 600 |
+
"type": "text",
|
| 601 |
+
"text": "A.6 SPARSE-VIEW RECONSTRUCTION DETAILS",
|
| 602 |
+
"text_level": 1,
|
| 603 |
+
"page_idx": 17
|
| 604 |
+
},
|
| 605 |
+
{
|
| 606 |
+
"type": "text",
|
| 607 |
+
"text": "Model details We use the DINO-ViT-B/16 as our image encoder. This model is transformerbased, which has 12 layers and the hidden dimension of the transformer is 768. The ViT begins with a convolution of kernel size 16, stride 16, and padding 0. It is essentially patchifying the input image with a patch size of $1 6 \\times 1 6$ . For our final model, the input image resolution is 512, thus it leads to $3 2 \\times 3 2 = 1 0 2 4$ spatial tokens in the vision transformer. In ablation studies, we reduce the input resolution from 512 to 256 to save compute budget. The original DINO is trained with a resolution of $2 2 4 \\times 2 2 4$ , thus the positional embedding has only a size of $1 4 \\times 1 4 = 1 9 6$ . We thus use 2D bilinear extrapolation (with torch.nn.functional.interpolate function) to extrapolate it to the desired token size. ",
|
| 608 |
+
"page_idx": 17
|
| 609 |
+
},
|
| 610 |
+
{
|
| 611 |
+
"type": "text",
|
| 612 |
+
"text": "To integrate camera information into the image encoder, we inject modulation layers (Peebles & Xie, 2022) into each of the transformer layer (for both self-attention layers and MLP layers). The modulation layer is initialized to be an identity mapping and thus it is suitable to be added to a pre-trained vision transformer. ",
|
| 613 |
+
"page_idx": 17
|
| 614 |
+
},
|
| 615 |
+
{
|
| 616 |
+
"type": "text",
|
| 617 |
+
"text": "After the image encoder, we have 1025 image feature tokens for each image, since we also include the output of the [CLS] token. We concatenate the tokens from all four images to construct a sequence of condition features of length 4100. This condition feature will be used to create the keys and values in the cross-attention layers of the image-to-triplane transformer decoder. ",
|
| 618 |
+
"page_idx": 17
|
| 619 |
+
},
|
| 620 |
+
{
|
| 621 |
+
"type": "text",
|
| 622 |
+
"text": "The image-to-triplane transformer decoder starts with a token sequence of $( 3 \\times 3 2 \\times 3 2 ) \\times 1 0 2 4$ , where $( 3 \\times 3 2 \\times 3 2 )$ is the number of tokens and 1024 is the hidden dimension of the transformer. We use 16 layers in our transformer decoder. All attention layers have 16 attention heads and each head has a dimension of 64. We remove the bias term in the attention layer as in Touvron et al. (2023). We take the pre-normalization architecture of the transformer where each sub-layer will be in the format of $x + f ( \\mathrm { L a y e r N o r m } ( x ) )$ . ",
|
| 623 |
+
"page_idx": 17
|
| 624 |
+
},
|
| 625 |
+
{
|
| 626 |
+
"type": "text",
|
| 627 |
+
"text": "After the transformer, we apply a de-convolution layer to map the transformer output from $( 3 \\times 3 2 \\times$ $3 2 ) \\times 1 0 2 4$ to $3 \\times ( 6 4 \\times 6 4 ) \\times 8 0$ . It means that there are 3 planes (XY, YZ, XZ) (Chan et al., 2022) and each plane has a size of $6 4 \\times 6 4$ . The dimension of each plane is 80. All three planes share the same deconvolution layer. The deconvolution is of kernal size 2, stride 2, and pad 0. ",
|
| 628 |
+
"page_idx": 17
|
| 629 |
+
},
|
| 630 |
+
{
|
| 631 |
+
"type": "text",
|
| 632 |
+
"text": "In NeRF volumetric rendering, the features from the three planes are bilinearly interpolated and concatenated to get a 240-dimensional feature for each point. Then, we have a 10-layer MLP with a hidden dimension of 64 to map this 240-dim feature to a 4-dim feature. The first three dimensions will be treated as RGB colors of the point and normalized to [0, 1] with a sigmoid function. The last dimension will be treated as the density value and we use an exponential function to map the MLP’s output to be non-negative. ",
|
| 633 |
+
"page_idx": 17
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"type": "text",
|
| 637 |
+
"text": "For the exact formulation of the above operators, please refer to LRM (Hong et al., 2024) and DiT (Peebles & Xie, 2022). ",
|
| 638 |
+
"page_idx": 17
|
| 639 |
+
},
|
| 640 |
+
{
|
| 641 |
+
"type": "text",
|
| 642 |
+
"text": "Training details. We adopt the AdamW (Kingma & Ba, 2014; Loshchilov & Hutter, 2017) optimizer to train our model. We use a peak learning rate of $4 \\times 1 0 ^ { - 4 }$ with a linear warm-up (on the first 3K steps) and a cosine decay. We change the $\\beta _ { 2 }$ of the AdamW optimizer to 0.95 for better stability. We use a weight-decay of 0.05 for non-bias and non-layernorm parameters. We also apply a gradient clipping of 1. ",
|
| 643 |
+
"page_idx": 17
|
| 644 |
+
},
|
| 645 |
+
{
|
| 646 |
+
"type": "text",
|
| 647 |
+
"text": "For the initialization of the image encoder, we use the official DINO pre-trained weight. For the initialization of the triplane decoder, and NeRF MLP, we use the default initializer in the PyTorch implementation. We empirically found that the pre-normalization transformer is robust to different initialization of linear layers. For the positional embedding of the triplane tokens in the transformer√ decoder, we initialize them with a Gaussian of zero-mean and std of $1 / \\sqrt { 1 0 2 4 }$ . ",
|
| 648 |
+
"page_idx": 17
|
| 649 |
+
},
|
| 650 |
+
{
|
| 651 |
+
"type": "text",
|
| 652 |
+
"text": "For each training step, we randomly sample 4 views as input and another 4 as supervision. The number of sample points per ray in NeRF rendering is 128, which are uniformly distributed along the segment within the $[ - 1 , 1 ] ^ { 3 }$ bounding box. The rendering resolution is $1 2 8 \\times 1 2 8$ . To allow higher actual supervising resolution, we first resize the image to a smaller resolution (uniformly sampled from [128, 384]) and then crop a patch of $1 2 8 \\times 1 2 8$ from it. Thus we can go beyond the rendering resolution of 128. ",
|
| 653 |
+
"page_idx": 17
|
| 654 |
+
},
|
| 655 |
+
{
|
| 656 |
+
"type": "text",
|
| 657 |
+
"text": "We utilize flash attention (Dao et al., 2022), mixed-precision training (with bf16 as the half-precision format) (Micikevicius et al., 2018), and gradient checkpointing (Chen et al., 2016) to improve the compute/memory efficiency of the training. ",
|
| 658 |
+
"page_idx": 18
|
| 659 |
+
},
|
| 660 |
+
{
|
| 661 |
+
"type": "text",
|
| 662 |
+
"text": "We perform the training for 120 epochs on our rendered Objaverse data with a training batch size of 1024. We use both L2 loss and LPIPS loss to supervise the model and the weights of the two losses are 1 and 2 respectively. The model is trained on 128 NVIDIA A100 GPUs and the whole training can be finished in 7 days. ",
|
| 663 |
+
"page_idx": 18
|
| 664 |
+
},
|
| 665 |
+
{
|
| 666 |
+
"type": "text",
|
| 667 |
+
"text": "A.7 SPARSE VIEW RECONSTRUCTION ABLATION STUDY",
|
| 668 |
+
"text_level": 1,
|
| 669 |
+
"page_idx": 18
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"type": "text",
|
| 673 |
+
"text": "We conduct an ablation study of our sparse-view reconstruction model to validate different design choices including the number of layers in the image-to-triplane decoder, the rendering resolution and the losses used during training, and the usage of novel view supervision. We train the model on the same dataset as our final model, however, we change the training recipe to reduce the computation cost to 32 A100 GPUs for 1 day. The changes of configuration for ablation include (1) a resolution of $2 5 6 \\times 2 5 6$ for the input image resolution, (2) 96 points per ray during rendering, (3) 5 layers instead of 10 layers in the NeRF MLP, (4) 30 epochs of training. ",
|
| 674 |
+
"page_idx": 18
|
| 675 |
+
},
|
| 676 |
+
{
|
| 677 |
+
"type": "text",
|
| 678 |
+
"text": "To evaluate the performance of different variants, we test them on another 3D dataset Google Scanned Object (GSO) (Downs et al., 2022). For each object in GSO, we render a set of 64-view images rendered with a resolution of $5 1 2 \\times 5 1 2$ at elevations $0 ^ { \\circ }$ , $2 0 ^ { \\circ }$ , $4 0 ^ { \\circ }$ , $6 0 ^ { \\circ }$ . Each elevation has 16 views with equidistant azimuths starting from 0. We use 4 views with elevation $2 0 ^ { \\circ }$ and azimuths $4 5 ^ { \\circ }$ , $1 3 5 ^ { \\circ }$ , $2 2 5 ^ { \\circ }$ , $3 1 5 ^ { \\circ }$ as input, and randomly sample 5 views from the remaining views as our testing set, which stay the same for different variants. We render the 5 testing views and report their difference from the ground truth using 3 metrics including PSNR, SSIM and LPIPS. These metrics are averaged over all 1019 objects in the GSO dataset. ",
|
| 679 |
+
"page_idx": 18
|
| 680 |
+
},
|
| 681 |
+
{
|
| 682 |
+
"type": "text",
|
| 683 |
+
"text": "The results of the ablation studies are in Figure 4. From the table we can see that the model is robust to the number of transformer layers in the image-to-triplane decoder as shown in exp01, exp02, and exp03. We also observe that the LPIPS loss can largely affect the results by comparing the exp02 and exp06. Without the LPIPS loss, the model drops a lot on the LPIPS metric while getting a slight improvement on PSNR and SSIM. However, we empirically find that LPIPS is much more aligned with human perception and the rendered images become blurry without it. The rendering resolution is also important (as shown in exp04) since LPIPS can be more robust and accurate at a higher resolution, which also motivates us to use a rendering resolution of 128 by 128 when training our final model. ",
|
| 684 |
+
"page_idx": 18
|
| 685 |
+
},
|
| 686 |
+
{
|
| 687 |
+
"type": "text",
|
| 688 |
+
"text": "Also, the inclusion of novel view supervision in the training is critical as shown in exp05. All three metrics got a significant drop when only supervising the four input views. Upon reviewing the results, we find that it’s due to the insufficient coverage of the four views, which typically leads to floaters in regions not covered by the input views. ",
|
| 689 |
+
"page_idx": 18
|
| 690 |
+
},
|
| 691 |
+
{
|
| 692 |
+
"type": "text",
|
| 693 |
+
"text": "A.8 EXTENSION TO IMAGE-CONDITIONED GENERATION ",
|
| 694 |
+
"text_level": 1,
|
| 695 |
+
"page_idx": 18
|
| 696 |
+
},
|
| 697 |
+
{
|
| 698 |
+
"type": "text",
|
| 699 |
+
"text": "Our method can also be extended to support additional image conditioning to provide more finegrained control over the 3D model to be generated. In this process, the input to the model includes an input text prompt that describes the object to be generated as well as an image of the object. We use the same training data as our text-conditioned model. During training, for a randomly sampled time step, we keep the latent of the input image (top-left quadrant) untouched and only add noise to the latents of the remaining three views. This allows the diffusion model to generate the other views while accounting for the conditioning image. During inference, similarly, we replace the upper left quadrant of the latent feature with the latent of the clean conditioning image at each iteration. Figure 8 shows some visual results of our image-conditioned model. From the results we can see that our method is able to effectively generate the other views with faithful details that are coherent with the input text prompt and image, thus giving us high-quality 3D models with our sparse view reconstructor. ",
|
| 700 |
+
"page_idx": 18
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"type": "image",
|
| 704 |
+
"img_path": "images/6273316323abe88b4e8c75fa8b0579caa569257eea7e3ab6c14cace4f224bd61.jpg",
|
| 705 |
+
"image_caption": [
|
| 706 |
+
"Figure 7: Comparisons on novel view renderings of NeRF assets generated from SDXL models finetuned with 10K curated data and random data. We can see that that curated data enables the model to generate more photorealistic 3D assets with more geometric and texture details. Here curated and random correspond to Exp d (Curated-10K-s10K) and i (Random-10K-s10K) in Table 3. "
|
| 707 |
+
],
|
| 708 |
+
"image_footnote": [],
|
| 709 |
+
"page_idx": 19
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"type": "text",
|
| 713 |
+
"text": "A.9 LIMITATIONS ",
|
| 714 |
+
"text_level": 1,
|
| 715 |
+
"page_idx": 19
|
| 716 |
+
},
|
| 717 |
+
{
|
| 718 |
+
"type": "text",
|
| 719 |
+
"text": "While our model can generate high-quality and diverse 3D assets, it still suffers from several limitations. First, while we perform a light-weight fine-tuning that enables the model to mostly preserve the capability of the SDXL model in textual understanding and generation, we do observe that our model fails to handle some over-complicated prompts, for example, those related to complex spatial arrangements of multiple subjects and complex scenes (see Figure 15). In addition, the generated assets are not as photorealistic as the 2D images generated by the original SDXL, which may be attributed to the information loss in the fine-tuning stage. Secondly, there is a lack of 3D inductive bias when generating multi-view images, and therefore it’s still possible for our model to generate inconsistent images that result in low-quality 3D assets with corrupted geometries and textures. Finally, our feed-forward reconstructor tends to generate blurry textures compared to the input images due to the usage of a relatively low-resolution triplane. ",
|
| 720 |
+
"page_idx": 19
|
| 721 |
+
},
|
| 722 |
+
{
|
| 723 |
+
"type": "image",
|
| 724 |
+
"img_path": "images/d7c12fde9f83f2509676e79ab70af88ba89e3bcd620edf61b43159cbc7738fa6.jpg",
|
| 725 |
+
"image_caption": [
|
| 726 |
+
"Figure 8: Comparison to previous methods on single image-conditioned 3D generation. We compared to previous methods Zero-1-to-3 (Liu et al., 2023b) and One-2-3-45 (Liu et al., 2023a). Our method can faithfully generate the details in the invisible regions, thus empowering us to reconstruct 3D assets of higher quality than baseline methods. All input images are generated with a public text-to-image platform Adobe Firefly (Adobe, 2023). "
|
| 727 |
+
],
|
| 728 |
+
"image_footnote": [],
|
| 729 |
+
"page_idx": 20
|
| 730 |
+
},
|
| 731 |
+
{
|
| 732 |
+
"type": "image",
|
| 733 |
+
"img_path": "images/d236e373b390a0b99557b9760dd1d0bf316b7cbf0fcd1f66661198d660e0698e.jpg",
|
| 734 |
+
"image_caption": [
|
| 735 |
+
"Figure 9: $2 \\times 2$ grid images generated with Gaussian blobs of different sigma $\\sigma$ "
|
| 736 |
+
],
|
| 737 |
+
"image_footnote": [],
|
| 738 |
+
"page_idx": 21
|
| 739 |
+
},
|
| 740 |
+
{
|
| 741 |
+
"type": "image",
|
| 742 |
+
"img_path": "images/015c2521f406e014fbea5e5272cc114d4beb6759394cd08201a633e4ca55068a.jpg",
|
| 743 |
+
"image_caption": [
|
| 744 |
+
"a cute dragon with big eyes ",
|
| 745 |
+
"Figure 10: Comparison on the NeRF assets generated with different numbers of DDIM steps and their inference time. While we use 100 steps in our experiments that take 20 seconds to generate a NeRF asset, we find that using a smaller number of steps can also give us results of similar quality with a much shorter inference time. "
|
| 746 |
+
],
|
| 747 |
+
"image_footnote": [],
|
| 748 |
+
"page_idx": 22
|
| 749 |
+
},
|
| 750 |
+
{
|
| 751 |
+
"type": "image",
|
| 752 |
+
"img_path": "images/2882cf32906f185662f494042ebe6021a0065ad124249f42f730968028724ff9.jpg",
|
| 753 |
+
"image_caption": [
|
| 754 |
+
"a red-eyed tree frog ",
|
| 755 |
+
"Figure 11: SDS optimization-based methods such as ProlificDreamer (Wang et al., 2023b) can possibly suffer from the Janus problem, which greatly degrades the quality of the 3D assets. In contrast, our method can mostly get rid of this problem. "
|
| 756 |
+
],
|
| 757 |
+
"image_footnote": [],
|
| 758 |
+
"page_idx": 23
|
| 759 |
+
},
|
| 760 |
+
{
|
| 761 |
+
"type": "image",
|
| 762 |
+
"img_path": "images/d70569f93bb9b03c6e551001faa6e440a45388b376dc3ce5093fbba78a02e2ad.jpg",
|
| 763 |
+
"image_caption": [
|
| 764 |
+
"Figure 12: Comparisons on the quality of the NeRF assets generated with fine-tuned SDXL and SD1.5 models. SDXL has a model size that is three times larger than SD1.5 and thus has better text comprehension. As shown in the figure, the 3D assets generated by our fine-tuned SDXL have better photo-realism and text alignment. The used SDXL and SD1.5 models are from Exp d (Curated-10Ks10K) and m (Curated-100K-s40K) in Table 3. "
|
| 765 |
+
],
|
| 766 |
+
"image_footnote": [],
|
| 767 |
+
"page_idx": 23
|
| 768 |
+
},
|
| 769 |
+
{
|
| 770 |
+
"type": "image",
|
| 771 |
+
"img_path": "images/54575509acbc1ce66e25658e3ec0260e5c176c5def006d6b86691c855c657eae.jpg",
|
| 772 |
+
"image_caption": [
|
| 773 |
+
"Figure 13: Comparison on the effect of different fine-tuning data sizes. Training on too little data such as 1K results in inconsistency between the generated 4 views, thus resulting in incorrect geometry. On the other side, training on too much data such as 100K makes the model biased toward the fine-tuning dataset, thus negatively affecting the quality of generated 3D assets. Here 1K, 10K and 100K correspond to Exp a (Curated-1K-s1K), d (Curated-10K-s10K) and g (Curated-100K-s40K) in Table 3 respectively. "
|
| 774 |
+
],
|
| 775 |
+
"image_footnote": [],
|
| 776 |
+
"page_idx": 24
|
| 777 |
+
},
|
| 778 |
+
{
|
| 779 |
+
"type": "image",
|
| 780 |
+
"img_path": "images/da83aece5eb94a9613633e5ec11ac9268fbd4cc7b959817f087922c34d8cecf4.jpg",
|
| 781 |
+
"image_caption": [
|
| 782 |
+
"Figure 14: Comparison on different numbers of fine-tuning steps. 4K training steps lead to inconsistent 4-view generation, while 20K result in biasing towards the fine-tuning data. In contrast, 10K achieve a balance between these two. Here 4K, 10K and 20K correspond to Exp c (Curated-10Ks4K), d(Curated-10K-s10K) and e (Curated-10K-s20K) in Table 3. "
|
| 783 |
+
],
|
| 784 |
+
"image_footnote": [],
|
| 785 |
+
"page_idx": 24
|
| 786 |
+
},
|
| 787 |
+
{
|
| 788 |
+
"type": "image",
|
| 789 |
+
"img_path": "images/03fed42b754f7a944ca7d56aecd1a024e001ac9dc04ae3cca8af98c7e596e239.jpg",
|
| 790 |
+
"image_caption": [
|
| 791 |
+
"Figure 15: Some examples of our failure cases. (a) Incorrect understanding of compositional concepts. (b) Inability to generate the exact quantity. (c) Fail to generate objects with complex structures. (d) Missing important concepts in the prompt. "
|
| 792 |
+
],
|
| 793 |
+
"image_footnote": [],
|
| 794 |
+
"page_idx": 24
|
| 795 |
+
}
|
| 796 |
+
]
|
parse/test/2lDQLiH1W4/2lDQLiH1W4_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/2lDQLiH1W4/2lDQLiH1W4_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/2msbbX3ydD/2msbbX3ydD.md
ADDED
|
@@ -0,0 +1,583 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FERRET: REFER AND GROUND ANYTHING ANY-WHERE AT ANY GRANULARITY
|
| 2 |
+
|
| 3 |
+
Haoxuan $\mathbf { V o u } ^ { 1 \dagger }$ , Haotian Zhang2†, Zhe $\mathbf { G a n } ^ { 2 }$ , Xianzhi $\mathbf { D } \mathbf { u } ^ { 2 }$ , Bowen Zhang2, Zirui Wang2, Liangliang $\mathbf { C a o } ^ { 2 }$ , Shih-Fu Chang1, Yinfei Yang2
|
| 4 |
+
1Columbia University, 2Apple AI/ML
|
| 5 |
+
haoxuan.you@cs.columbia.edu, {haotian zhang2,zhe.gan,yinfeiy}@apple.com
|
| 6 |
+
|
| 7 |
+

|
| 8 |
+
Figure 1: Ferret enables referring and grounding capabilities for multimodal large language model (LLM). In terms of referring, a user can refer to a region or an object in point, box, or any free-form shape. The regionN in the input will be replaced by the proposed hybrid representation before being fed into the LLM. In terms of grounding, Ferret is able to accurately ground any open-vocabulary descriptions. The boxN in the output denotes the predicted bounding box coordinates.
|
| 9 |
+
|
| 10 |
+
# ABSTRACT
|
| 11 |
+
|
| 12 |
+
We introduce Ferret, a new Multimodal Large Language Model (MLLM) capable of understanding spatial referring of any shape or granularity within an image and accurately grounding open-vocabulary descriptions. To unify referring and grounding in the LLM paradigm, Ferret employs a novel and powerful hybrid region representation that integrates discrete coordinates and continuous features jointly to represent a region in the image. To extract the continuous features of versatile regions, we propose a spatial-aware visual sampler, adept at handling varying sparsity across different shapes. Consequently, Ferret can accept diverse region inputs, such as points, bounding boxes, and free-form shapes. To bolster the desired capability of Ferret, we curate GRIT, a comprehensive referand-ground instruction tuning dataset including 1.1M samples that contain rich hierarchical spatial knowledge, with 95K hard negative data to promote model robustness. The resulting model not only achieves superior performance in classical referring and grounding tasks, but also greatly outperforms existing MLLMs in region-based and localization-demanded multimodal chatting. Our evaluations also reveal a significantly improved capability of describing image details and a remarkable alleviation in object hallucination. Code and data are available at https://github.com/apple/ml-ferret.
|
| 13 |
+
|
| 14 |
+
# 1 INTRODUCTION
|
| 15 |
+
|
| 16 |
+
In vision-language learning, how to enable spatial understanding in models is a fundamental research problem. Two desired capabilities stem from this problem: referring and grounding. Referring demands that the model can accurately comprehend the semantics of specific given regions (Krahmer & Van Deemter, 2012; Kazemzadeh et al., 2014; Mao et al., 2016; Yu et al., 2016; Zellers et al., 2019), whereas grounding necessitates that the model to localize the region in accordance with the given semantic description (Luo & Shakhnarovich, 2017; Nagaraja et al., 2016; Yu et al., 2017; Kamath et al., 2021).
|
| 17 |
+
|
| 18 |
+
Essentially, referring and grounding demand the same type of knowledge: alignment of spatial information and semantics. Despite this, existing works mostly learn referring and grounding individually (Li et al., 2022; Wu et al., 2022; Yu et al., 2017). In comparison, humans can learn from one task and generalize the shared knowledge to the other task effortlessly, and are able to seamlessly integrate referring/grounding capabilities with daily dialogue and reasoning (Zellers et al., 2019). Inspired by the above gap, in this paper, we study three main questions: (i) How to unify referring and grounding in one framework, and will they benefit each other? (ii) How to represent versatile types of regions that humans usually use for referring, such as point, box, scribble, and even freeform shapes? (iii) How to make referring and grounding open-vocabulary, instruction-following, and robust, which are crucial for practical applications?
|
| 19 |
+
|
| 20 |
+
Targeting these three questions, we introduce Ferret, a novel refer-and-ground Multimodal Large Language Model (MLLM). First of all, we choose MLLM as the bedrock of Ferret to leverage their powerful vision-language global understanding capability (Zhu et al., 2023a; Liu et al., 2023b; Li et al., 2023c). To unify referring and grounding, Ferret first represents the coordinates of regions in natural language numerical form,1 as illustrated in Figure 3. However, it is inefficient to use single point or box coordinates to represent versatile shapes of regions, such as strokes, scribbles, or complex polygons. These shapes are essential for more universal and precise human-model interaction. To solve this problem, we further propose a spatial-aware visual sampler to acquire the visual features for regions in any shape, taking care of the varying sparsity in those shapes. Then, the discrete coordinates and the continuous visual features are combined together to represent the visual regions in the input, composing a hybrid region representation in Ferret. Equipped with above methods, Ferret can deal with input that mixes referred regions with free-form text, and is able to ground the mentioned objects in its output by seamlessly generating the coordinates for each groundable object along with generating text. To our best knowledge, Ferret is the first work that is able to process free-formed region inputs in MLLMs.
|
| 21 |
+
|
| 22 |
+
In order to make the refer-and-ground capability in Ferret open-vocabulary, instruction-following, and robust, we collect GRIT, a Ground-and-Refer Instruction-Tuning dataset with 1.1M samples. GRIT contains multiple levels of spatial knowledge, covering objects, relationships, region descriptions, and complex reasoning. It includes both text-in location-out (grounding) and location-in textout (referring) data, as well as data that mixes location and text in both input and output. The majority of the dataset is converted from existing vision(-language) tasks like object detection (Krishna et al., 2017) and phrase grounding (Yu et al., 2016; Plummer et al., 2015) with carefully designed templates to make it instruction-following. Additionally, 34K refer-and-ground instruction-tuning conversations are collected via the help of ChatGPT/GPT-4 (OpenAI, 2023b) to facilitate training an instruction-following and open-vocabulary refer-and-ground generalist. Moreover, we conduct spatial-aware negative data mining, which further promotes model robustness.
|
| 23 |
+
|
| 24 |
+
Ferret subsumes strong open-vocabulary capabilities of spatial understanding and localization. When evaluated on conventional referring and grounding tasks, it achieves superior performance. More than that, we believe refer-and-ground capabilities should be integrated into daily conversations of humans, e.g., people refer to something they don’t know and ask what it is used for (like Figure 1). To evaluate this new capability, we introduce Ferret-Bench, covering three new types of tasks: Referring Description, Referring Reasoning, and Grounding in Conversation. We benchmark existing MLLMs and observe that Ferret can outperform the best of them by $2 0 . 4 \%$ on average. Moreover, Ferret demonstrates an intriguing property of alleviating object hallucinations.
|
| 25 |
+
|
| 26 |
+
In summary, our contributions are threefold. (i) We propose Ferret, that uses a hybrid region representation equipped with a novel spatial-aware visual sampler, to enable fine-grained and openvocabulary referring and grounding in MLLM. (ii) We construct GRIT, a large-scale ground-andrefer instruction tuning dataset, for model training. It also contains additional spatial negative samples to enhance model robustness. (iii) We introduce Ferret-Bench, to evaluate tasks jointly requiring referring/grounding, semantics, knowledge, and reasoning. Our model exhibits superior performance in a wide range of tasks and reduces object hallucination.
|
| 27 |
+
|
| 28 |
+
# 2 METHOD
|
| 29 |
+
|
| 30 |
+
We start with detailing the proposed hybrid region representation to depict regions of various shapes and formats. Then, we present the model architecture of Ferret.
|
| 31 |
+
|
| 32 |
+
# 2.1 HYBRID REGION REPRESENTATION
|
| 33 |
+
|
| 34 |
+
When referring to specific regions, three primary formats are generally used: point, box, and free-form shapes. While the point and box formats can be succinctly represented by coordinates (e.g., $[ x , y ]$ for a point, and $[ x _ { \mathrm { m i n } } , y _ { \mathrm { m i n } } , x _ { \mathrm { m a x } } , y _ { \mathrm { m a x } } ]$ for a box) as in Peng et al. (2023); Chen et al. (2023b), the free-form shape is more versatile, encompassing a variety of region types such as scribbles, polygons, and masks. The advantage of free-form shape is straightforwardly illustrated in Figure 2. Depicting free-form shapes through coordinates is computationally expensive and obscure, and its complexity hinders the model learning to establish a clear correlation between the provided coordinates and the corresponding regions.
|
| 35 |
+
|
| 36 |
+
To generalize across all three distinct formats, we propose a hybrid region representation that synergizes discrete coordinates with continuous visual features to refer to a particular region, which is shown in the top-left of Figure 3. For coordinates, following Chen et al. (2021); Yang et al. (2022), we quantize each coordinate into one of the $n _ { \mathrm { b i n s } }$ discrete bins.2 Regarding continuous visual features, for a given region $\mathbf { R }$ , we first construct a 2D binary mask M of the same size as the image, marking a value of 1 inside the targeted region and 0 outside of the region. Then, the binary mask M, jointly with the extracted image feature map $\mathbf { Z }$ , is sent into our proposed spatial-aware visual sampler $s ( \cdot )$ , which will be detailed in Section 2.2, to extract the visual continuous feature $\mathbf { f } = s ( \mathbf { M } , \mathbf { Z } )$ .
|
| 37 |
+
|
| 38 |
+

|
| 39 |
+
Figure 2: Bounding box v.s. Free-from Shape. These two objects have almost the same bounding box, causing ambiguity when relying on the box to refer to. Equipped with hybrid region representation, Ferret can separate them.
|
| 40 |
+
|
| 41 |
+
Finally, we represent a point with $\{ x , y , \mathbf { f } _ { R _ { p } } \}$ , where the region $R _ { p }$ is a circle centered in $\{ x , y \}$ with a fixed radius.3 A box or a free-form shape can both be represented by $\{ x _ { \mathrm { m i n } } , y _ { \mathrm { m i n } } , x _ { \mathrm { m a x } } , y _ { \mathrm { m a x } } , \mathbf { f } _ { R _ { b o x } } \}$ , where ${ x _ { \operatorname* { m i n } } } / { x _ { \operatorname* { m a x } } }$ denotes the minimum/maximum $x$ -axis coordinate of the region, and so forth for $y$ -axis. $R _ { b o x }$ denotes the input region.
|
| 42 |
+
|
| 43 |
+
# 2.2 MODEL ARCHITECTURE
|
| 44 |
+
|
| 45 |
+
As illustrated in Figure 3, Ferret is mainly composed of $( i )$ an image encoder to extract image embeddings, $( i i )$ the proposed spatial-aware visual sampler to extract regional continuous features, and $( i i i )$ an LLM to jointly model image, text, and region features.
|
| 46 |
+
|
| 47 |
+
Input. We feed the image into a pre-trained visual encoder, CLIP-ViT-L/14 (Radford et al., 2021), to extract the image embeddings $\mathbf { \dot { Z } } \in \mathbb { R } ^ { H \times W \times C }$ . For text, we tokenize the text sequence using the pre-trained LLM’s tokenizer and project them into text embeddings $\mathbf { T } \in \mathbb { R } ^ { L \times D }$ . As for referred regions, we append the coordinates and a special token as a placeholder for continuous features after the name of the region: “⟨region name⟩ ⟨coordinates⟩ $\langle { \mathrm { S P E } } \rangle ^ { \mathrm { , , } }$ . For example, “a cat [100, 50, 200, 300] $\langle \mathrm { S P E } \rangle ^ { \mathrm { , , } }$ . If the name is unknown or hard to describe because multiple objects are included, we just use “region” or “area” as the “⟨region name⟩”. In this way, referred regions can be well mixed with ordinary texts to form complete sentences.
|
| 48 |
+
|
| 49 |
+

|
| 50 |
+
Figure 3: Overview of the proposed Ferret model architecture. (Left) The proposed hybrid region representation and spatial-aware visual sampler. (Right) Overall model architecture. All parameters besides the image encoder are trainable.
|
| 51 |
+
|
| 52 |
+
Spatial-aware Visual Sampler. The shape of the referred regions can be quite varied, not limited to just points or rectangle boxes. Grid-based processing like convolution or patch attention cannot handle irregular shapes. Similar to our cases, 3D point clouds are also in irregular shape and show varied sparsity in the 3D space. Inspired by existing works in 3D point cloud learning (Qi et al., 2017a; Ma et al., 2022; Wang et al., 2019), we propose a spatial-aware visual sampler.
|
| 53 |
+
|
| 54 |
+
Given extracted image feature map $\mathbf { Z } \in \mathbb { R } ^ { H \times W \times C }$ and the binary region mask M, we first randomly sample $N$ positive points inside M. For each point, its feature is obtained by bilinear interpolation. The $N$ points are fed into a cascade of blocks, where each of them includes three steps: sampling, gathering, pooling. (1) Sampling: $\textstyle { \frac { N } { r } }$ points are sampled from $N$ points via farthest point sampling (FPS) algorithm (Qi et al., 2017b),4 which can guarantee sufficient coverage. (2) Gathering: For each of the sampled points $x _ { i }$ , we search its $k$ nearest neighbors from the pool of previous $N$ points, and obtain a group of points $\{ x _ { i 1 } , x _ { i 2 } , . . . , x _ { i k } \}$ . Then, inspired by PointMLP (Ma et al., 2022), for each group, we fuse the features of sampled point $x _ { i }$ and it neighbor points by:
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
h _ { i k } = \sigma ( [ \theta ( [ \mathbf { Z } ( x _ { i k } ) - \mathbf { Z } ( x _ { i } ) ; C ( x _ { i k } ) - C ( x _ { i } ) ] ) ; \mathbf { Z } ( x _ { i } ) ; C ( x _ { i } ) ] ) ,
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
where $x _ { i k }$ is one of the neighbors of $x _ { i }$ , $\mathbf { Z } ( x )$ denotes the point $x$ ’s feature (in the first block, it is interpolated from feature map $\mathbf { Z }$ ; in the succeeding blocks, it is the output feature from the previous block), $C ( x )$ denotes the 2D coordinates of point $x , [ ; ]$ means channel-wise concatenation of multiple vectors, $\theta$ is implemented by a linear layer to adapt the relative local features, and $\sigma$ is also a linear layer to fuse each local feature from neighbors with sampled point feature. (3) Pooling: A max pooling is conducted to fuse $k$ neighbor features into one feature as the representation of the sampled point:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
h _ { i } = \operatorname* { m a x } _ { k : ( x _ { i k } ) \in \mathrm { K N N s o f } x _ { i } } h _ { i k } .
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
After the three steps, we obtain fewer points but a more dense feature space since it incorporates the local neighbor features as well as their relative positions. In experiments, we set $N { = } 5 1 2$ , $r { = } 4$ and $k { = } 2 4$ , and cascade two such blocks, which in the end outputs 32 points with their features. Similar to ROIAlign (He et al., 2017), we flatten the point features into a single vector and project it to the dimension of LLM embeddings. The final feature is used to replace the $\langle { \mathrm { S P E } } \rangle$ token in the input.
|
| 67 |
+
|
| 68 |
+
Output. The above region denotations are used in Ferret input to refer to specific regions. In Ferret output, to achieve grounding, we generate the box coordinates right after the corresponding regions/nouns in the text response. For instance, “There is a dog [100, 150, 300, 200] in the figure.” With this data format, our model is expected to implicitly learn what is groundable in the current image and what their locations are.
|
| 69 |
+
|
| 70 |
+
LLM. We consider Vicuna (Chiang et al., 2023) as our language model, a decoder-only LLM (Brown et al., 2020) that is instruction-tuned on top of LLaMA (Touvron et al., 2023a). Prior to being fed into the LLM, the image embeddings undergo transformation via an additional linear layer to match the embedding dimension of the text tokens.
|
| 71 |
+
|
| 72 |
+
4FPS starts from a random single point sampled from $N$ points. In each iteration, it samples one point from the rest points such that it is the farthest from the set of already sampled points. See detail in Qi et al. (2017b).
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
Figure 4: Overview of the GRIT dataset for Ferret model training. It contains three types of data: (i) public datasets that are converted into an instruction-following format (the top-3 rows); $( i i )$ data generated via prompting ChatGPT and GPT-4 (the 4th row); and (iii) negative data to enhance model robustness (the last row).
|
| 76 |
+
|
| 77 |
+
# 3 GRIT: GROUND-AND-REFER INSTRUCTION-TUNING DATASET
|
| 78 |
+
|
| 79 |
+
In this section, we present GRIT, a Ground-and-Refer Instruction-Tuning dataset containing around 1.1M multimodal dialogues for model training. GRIT consists of three types of data: (i) public datasets that are converted into an instruction-following format (Section 3.1); (ii) instruction-tuning data generated via ChatGPT and GPT-4 (Section 3.2); and (iii) additional data from spatial negative mining for enhancing model robustness (Section 3.3).
|
| 80 |
+
|
| 81 |
+
# 3.1 HIERARCHY
|
| 82 |
+
|
| 83 |
+
Spatial understanding can be characterized by varying levels of granularity and task formats. During our dataset creation, we look into the following categories based on two dimensions:
|
| 84 |
+
|
| 85 |
+
• In terms of granularity, we identify four main categories: $( i )$ individual objects, (ii) relationships among objects, (iii) descriptions of specific regions, and $( i v )$ region-based complex reasoning. • In terms of task format, we further divide the data into three distinct types: (i) Region-in Text-out data, (ii) Text-in Region-out data, and (iii) Text-Region combined data.5
|
| 86 |
+
|
| 87 |
+
We compiled an extensive set of public data focusing on the aforementioned dimensions and converted them into an instruction-following format using carefully designed templates. A more indepth view of these templates is available in Appendix C.1.
|
| 88 |
+
|
| 89 |
+
Individual objects. To achieve visual understanding at the object level, we select object detection datasets such as Visual Genome (Krishna et al., 2017), Object365 (Shao et al., 2019), and visual grounding datasets including RefCOCOs (Yu et al., 2016; Lin et al., 2014; Nagaraja et al., 2016) and Flickr30k-Entities (Plummer et al., 2015). The converted Visual Genome object data follow a Region-in Text-out format. Additionally, to enable Ferret to understand free-form shapes, we apply SAM (Kirillov et al., 2023) to Visual Genome object data to obtain a segmentation mask for each object, which is fed into the spatial-aware visual sampler to extract continuous region feature during training. The visual grounding datasets and Object365 data adhere to a Text-in Region-out format. This section has in total 678k data.
|
| 90 |
+
|
| 91 |
+
Relationships among objects & descriptions of regions. We selected data pertaining to object relationships and region captions from Visual Genome (Krishna et al., 2017) to address these two facets, respectively. Both datasets employ a Region-in Text-out format and 177k data are obtained. Similar to Visual Genome object data, we also extract segmentation masks of objects in Visual Genome relationship data via SAM.
|
| 92 |
+
|
| 93 |
+
Region-based complex reasoning. Regarding complex reasoning centered on specific regions, we constructed a novel dataset with the help of ChatGPT/GPT-4. It adopts a combined Text-Region format, and is detailed in the subsequent section.
|
| 94 |
+
|
| 95 |
+
# 3.2 GPT-ASSISTED VISUAL INSTRUCTION DATA GENERATION
|
| 96 |
+
|
| 97 |
+
Besides converting existing datasets by templates, dialogue instruction tuning data is proved to be critical for MLLM to understand human intention and generate fluent, natural, and long-form responses (Liu et al., 2023b; Zhu et al., 2023a; Li et al., 2023d). Few-shot prompting is widely used to obtain visual instruction tuning data, where textual scene descriptions of images and humanannotated dialogues are provided as few-shot demonstrations, and ChatGPT/GPT4 are prompted to generate new dialogue based on the new image’s textual scene descriptions.
|
| 98 |
+
|
| 99 |
+
However, previous instruction tuning data mainly focus on describing the entire image without explicitly specifying spatial-related information. To collect refer-and-ground instruction tuning data, we emphasize region-based spatial knowledge in the following three steps. (i) Besides objects and global captions usually used as before, our symbolic scene description additionally includes physical relationships between objects and region captions along with coordinates of them. (ii) In humanannotated dialogues, we add coordinates after the groundable regions or objects either in input or output or both, and the dialogues are typically focused on specific regions. It helps to implicitly prompt ChatGPT/GPT4 to follow similar patterns when generating new dialogues. (iii) The generated dialogues sometimes cannot follow the rules and patterns we wrote in system prompts and few-shot examples, which might be due to that the context of LLM input is too long to handle all the details. To alleviate it, we propose to use ChatGPT/GPT-4 again to refine the initially generated dialogues, whose context length is only $10 \%$ of the data generated from the first round on average. To save cost, we use ChatGPT in the first round of generation and GPT-4 for refining. 34k dialogues in total are collected.
|
| 100 |
+
|
| 101 |
+
Additionally, to exploit existing instruction-tuning data such as those in LLaVA (Liu et al., 2023b), we apply an open-vocabulary object detector, GLIPv2 (Zhang et al., 2022), on LLaVA-158k data to localize groundable nouns in the text. Then, we append the bounding boxes after the corresponding nouns, forming a pseudo-grounded LLaVA instruction data that are also used for training Ferret.
|
| 102 |
+
|
| 103 |
+
# 3.3 SPATIAL NEGATIVE MINING
|
| 104 |
+
|
| 105 |
+
As highlighted in prior studies (Li et al., 2023e; Liu et al., 2023a), MLLM exhibits a propensity to hallucinate in response to yes/no questions. We observed a similar occurrence when inquiring about detailed regions. To address this, we also conduct negative sample mining by following two ways: (i) Image-conditioned Category Localization, and (ii) Semantics-conditioned Category Localization. They both ask the model to localize specific object categories, thereby enabling the model’s ability to discern and potentially recognize the absence of certain objects. They differ in how to select the negative category. For (i), Object365 data are employed and we randomly select the object class from the vocabulary that is not shown in the given image. For (ii), Flickr30k data are used and negative categories are sourced by utilizing ChatGPT/GPT4 to find entities that are most analogous to the original class, attribute, or quantity, e.g., ‘man’ vs. ‘woman’, ‘blue’ vs. ‘yellow’, ‘two’ vs. ‘three’.
|
| 106 |
+
|
| 107 |
+
We curate the data to maintain an equilibrium between positive and negative samples for each of the two types.6 95k data are collected. A more comprehensive elaboration is provided in Appendix C.2.
|
| 108 |
+
|
| 109 |
+
# 4 EXPERIMENTS
|
| 110 |
+
|
| 111 |
+
First of all, we illustrate the training details of Ferret. Then in evaluation, we start with evaluating Ferret on conventional referring and grounding benchmarks (Sec. 4.1 and 4.2). Then, we demonstrate the power of Ferret in more complex multimodal chatting with refer-and-ground capability in Sec. 4.3. For a detailed visualization of each, kindly check Appendix E. We further ablate key components in Ferret (Sec. 4.4), analyze the object hallucination of Ferret (Sec. 4.5) and discuss Ferret v.s. GPT-4V (Sec. ??).
|
| 112 |
+
|
| 113 |
+
Table 1: Results of referring object classification on three different referring types, including point, box, and free-form shape. $\mathbf { \vec { \mathbf { \rho } } } \mathbf { \times } \mathbf { \vec { \mathbf { \rho } } }$ means no such capability.
|
| 114 |
+
|
| 115 |
+
<table><tr><td rowspan="2">Models</td><td colspan="3">LVIS (Acc %)</td></tr><tr><td>Point</td><td>Box</td><td>Free-form</td></tr><tr><td>Random Guess</td><td>50</td><td>50</td><td>50</td></tr><tr><td>LLaVA</td><td>50.1</td><td>50.3</td><td>×</td></tr><tr><td>Kosmos-2 (Peng et al.,2023)</td><td>×</td><td>60.25</td><td>×</td></tr><tr><td>Shikra-7B(Chen et al.,2023b)</td><td></td><td>57.82 67.71</td><td>×</td></tr><tr><td>GPT4-ROI (Zhang et al.,2023)</td><td>×</td><td>61.76</td><td>×</td></tr><tr><td>Ferret-7B</td><td></td><td>67.9479.42</td><td>69.77</td></tr><tr><td>Ferret-13B</td><td></td><td>68.3580.46</td><td>70.98</td></tr></table>
|
| 116 |
+
|
| 117 |
+
Table 2: Results of grounded image captioning on the test set of Flickr30k Entities. BLEU $@ 4$ , METEOR, CIDEr, and SPICE are used for the caption evaluation. $F 1 _ { a l l }$ and $F 1 _ { l o c }$ are used for grounding evaluation. $" - "$ means not reported.
|
| 118 |
+
|
| 119 |
+
<table><tr><td rowspan="2">Models</td><td colspan="4">Caption Eval.</td><td colspan="2">Grounding Eval.</td></tr><tr><td>B@4</td><td>M</td><td>C</td><td>S</td><td>F1all</td><td>F1loc</td></tr><tr><td>GVD (Zhou et al.,2019)</td><td></td><td></td><td>27.3 22.5 62.3 16.5</td><td></td><td>7.55</td><td>22.2</td></tr><tr><td>Cyclical (Ma et al.,2020)</td><td></td><td></td><td>26.8 22.4 61.1 16.8</td><td></td><td>8.44</td><td>22.78</td></tr><tr><td>POS-SCAN (Zhou et al., 2020)</td><td></td><td></td><td>30.1 22.6 69.3 16.8</td><td></td><td>7.17</td><td>17.49</td></tr><tr><td>UniTAB (Yang et al., 2022)</td><td></td><td></td><td>30.1 23.7 69.7 17.4</td><td></td><td>12.95</td><td>34.79</td></tr><tr><td>Shikra-13B (Chen et al.,2023b)</td><td>1</td><td>1</td><td>73.9</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Ferret-7B</td><td></td><td></td><td>35.1 24.6 74.8 18.015.02</td><td></td><td></td><td>37.62</td></tr><tr><td>Ferret-13B</td><td></td><td></td><td>37.0 25.5 76.1 18.315.12</td><td></td><td></td><td>38.03</td></tr></table>
|
| 120 |
+
|
| 121 |
+
Training Details. We initialize the image encoder with CLIP-ViT- $\mathrm { L } / 1 4 @ 3 3 6 \mathrm { p }$ , the LLM with Vicuna, and the projection layer with LLaVA’s first-stage weights, leaving the visual sampler randomly initialized. After the initialization, Ferret is trained on the aforementioned GRIT data for three epochs, optimized by Loshchilov & Hutter (2017) with a learning rate of $2 e - 5$ and a batch size of 128. The training takes ${ \sim } 5 / 2 . 5$ days on 8 A100 GPU for a Ferret-13B/7B. During training, when input refers to regions, we randomly choose either the center points or the bounding boxes (or segmentation masks if available) to represent the regions. We perform de-duplication in training data to remove the samples that are in downstream evaluations.
|
| 122 |
+
|
| 123 |
+
# 4.1 INPUT REFERRING
|
| 124 |
+
|
| 125 |
+
The model’s capability of understanding referring is reflected in that, given a referred region in the question, how accurately the model can understand the semantics of the referred region. To measure it, we start with the most basic semantics, object, as it is fundamental and clear to define. To be more specific, the task we evaluate on is Referring Object Classification: the question refers to a specific region in the image, and the model needs to classify the object in the region. Since Ferret and MLLMs usually generate free-form text responses, it is inaccurate to match the predicted class with the ground-truth class if directly asking the model to classify without constraints. Alternatively, we make it a binary-choice question in the format of “Is the object ⟨location⟩ a ⟨class A⟩ or a ⟨class B⟩?”. We feed the binary-choice question and image into the MLLMs to obtain the response, and then detect if the response matches the ground-truth (GT) class by some rule.7
|
| 126 |
+
|
| 127 |
+
To prepare the data, we used the validation split of LVIS dataset (Gupta et al., 2019) covering over 1000 object categories, and sampled 2667 objects as the GT objects. Then, we randomly choose a different object category in the same image whose central point is close to the GT object as the negative object, and replace $\langle \mathrm { c l a s s \_ A } \rangle$ and $\left. \mathrm { c l a s s \mathbf { \mathbf { B } } } \right.$ with those two randomly to form 2667 questions. Additionally, to mimic the versatility of referring in human life, we replace the ⟨location⟩ with three different types: point, box, and free-form shape. For point, we randomly sample a point inside the GT object that is also near the GT object’s boundary. For box, we use the GT bounding box provided by LVIS. For the free-form shape, we randomly generate some strokes inside the GT object to simulate that. Results on all three types of referring are summarized in Table 1. Ferret can significantly outperform previous models (Peng et al., 2023; Chen et al., 2023b) and handle all types of referring, a capability notably absent in previous works.
|
| 128 |
+
|
| 129 |
+
# 4.2 OUTPUT GROUNDING
|
| 130 |
+
|
| 131 |
+
Ferret performs well in referential dialogue, allowing for its integration into various VL tasks, notably those with grounding outputs. To rigorously assess the grounding capability, we first subject Ferret to benchmark visual grounding tasks in a generative paradigm. Then, to measure the alignments between words and regions, we further evaluate Ferret on grounded captioning task.
|
| 132 |
+
|
| 133 |
+
Visual grounding. Visual grounding aims to ground language queries into aligned image regions. We experiment on the sub-tasks of referring expression comprehension (REC) with three renowned benchmarks: RefCOCO (Lin et al., 2014), $\operatorname { R e f C O C O + }$ (Yu et al., 2016), and $\operatorname { R e f C O C O g }$ (Mao et al., 2016), and phrase grounding with Flickr30k Entities dataset (Plummer et al., 2015). REC task involves a question or description about a specific area in an image, with the model expected to predict just one bounding box. Phrase grounding, conversely, seeks to associate all the noun phrases in the input sentence with corresponding boxes, requiring the model to predict these boxes and the word-box connections. For both tasks, we utilize uniform prompts, represented as “What are the locations of $< q u e r y > / < p h r a s e s > ? ^ { , }$ , where $< q u e r y >$ denotes the textual referring expression, while $< p h r a s e s >$ stands for a “comma-delimited” aggregation of the given phrases. The model is trained to output in “<query> [box].” format. The generated bounding box is considered correct if its intersection over union (IoU) with the GT box is greater than 0.5. As shown in Table 3, Ferret achieves an outstanding performance on all metrics, and is comparable to specialized fine-tuning approaches (Kamath et al., 2021).
|
| 134 |
+
|
| 135 |
+
Table 3: Performance comparison $( \operatorname { A c c } @ 0 . 5 )$ on the referring expression comprehension (RefCOCO, Ref$\mathrm { C O C O + }$ , RefCOCOg) and phrase grounding (Flickr30k Entities) tasks. $^ *$ indicates that the method is specifically fine-tuned in the second stage.
|
| 136 |
+
|
| 137 |
+
<table><tr><td rowspan="2">Models</td><td colspan="3">val RefCOCOtestB</td><td colspan="3">vaRefCOCOtestB</td><td colspan="2">RefCOCOg</td><td rowspan="2" colspan="2">Flickr30k Enties</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>MAttNet (Yu et al., 2018)</td><td></td><td></td><td></td><td></td><td></td><td></td><td>76.40 80.43 69.28|64.93 70.26 56.00|66.67 67.01</td><td></td><td></td><td>1</td></tr><tr><td>OFA-L (Wang et al., 2022b)</td><td>79.9683.67 76.39</td><td></td><td></td><td>68.2976.00 61.75</td><td></td><td></td><td>67.57 67.58</td><td></td><td></td><td>1</td></tr><tr><td>TransVG (Deng et al., 2021)</td><td>81.0282.7278.35</td><td></td><td></td><td>64.8270.70 56.94</td><td></td><td></td><td>68.6767.73</td><td></td><td></td><td>79.10</td></tr><tr><td>UNITER (Chen et al., 2020)</td><td>81.41</td><td>87.0474.17</td><td></td><td>75.90 81.45 66.70</td><td></td><td></td><td>74.02 68.67</td><td></td><td>1</td><td>1</td></tr><tr><td>VILLA (Gan et al., 2020)</td><td>82.3987.48 74.84</td><td></td><td></td><td>76.17 81.54 66.84</td><td></td><td></td><td>76.18 76.71</td><td></td><td>/</td><td>1</td></tr><tr><td>UniTAB (Yang et al., 2022)</td><td>86.32</td><td>88.84</td><td>80.61</td><td>78.70 83.22</td><td></td><td>69.48</td><td>79.96 79.97</td><td></td><td>78.76</td><td>79.58</td></tr><tr><td>MDETR (Kamath et al.,2021)</td><td>86.75</td><td>89.58 81.41</td><td></td><td>79.52 84.09 70.62</td><td></td><td></td><td>81.64 80.89</td><td></td><td>82.3*</td><td>83.8*</td></tr><tr><td>Shikra-7B (Chen et al.,2023b)</td><td>87.01 90.61</td><td></td><td>80.24|81.60 87.36 72.12</td><td></td><td></td><td></td><td></td><td>82.27 82.19</td><td>75.84</td><td>76.54</td></tr><tr><td>Ferret-7B</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>87.49 91.35 82.4580.78 87.38 73.1483.93 84.76</td><td>80.39</td><td>82.21</td></tr><tr><td>Shikra-13B(Chen et al.,2023b) 87.83 91.11 81.81|82.89 87.79 74.41|82.64 83.16</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>[77.41</td><td>78.44</td></tr><tr><td>Ferret-13B</td><td></td><td></td><td></td><td></td><td></td><td></td><td>89.4892.41 84.3682.81 88.14 75.1785.83 86.34</td><td></td><td>81.13</td><td>84.76</td></tr></table>
|
| 138 |
+
|
| 139 |
+
Grounded captioning. The grounded captioning task requires the model to generate a caption and ground all generated noun phrases to image regions. The final predictions generally consist of three parts, i.e., the text caption, visual regions as boxes, and the grounding alignments between words and boxes. Following the established benchmarks on the Flickr30k Entities dataset, we evaluate captioning and grounding separately with the captioning metrics and grounding F1 scores, respectively. $F 1 _ { a l l }$ evaluates grounding as a multi-label classification problem. We also report $F 1 _ { l o c }$ that only computes the grounding score on correctly predicted object words. Results are summarized in Table 2, and Ferret achieves state-of-the-art.
|
| 140 |
+
|
| 141 |
+
# 4.3 FERRET-BENCH: MULTIMODAL CHATTING WITH REFERRING AND GROUNDING
|
| 142 |
+
|
| 143 |
+
Multimodal chatting has been an emergent ability of MLLMs. Previous benchmarks (Liu et al., 2023b) mainly evaluate conversation, detailed description, and complex reasoning via GPT-4 as a judge. Yet, a gap exists as no dataset currently evaluates multimodal chatting that necessitates referring or grounding actions, e.g., instances where individuals reference an unfamiliar object and inquire about its purpose. To benchmark this intriguing and practical capability, we introduce FerretBench that covers three kinds of region-based questions evaluating referring and grounding capability: (i) Referring Description: models are asked to describe a referred region based on its interaction with surrounding objects. (ii) Referring Reasoning: models need to reason on top of one or more referred regions correctly. (iii) Grounding in Conversation: models are required to reason correctly and accurately ground/localize the objects/regions necessary for the reasoning. For the ease of benchmarking other methods, we represent the regions with boxes instead of points or free-form shapes.
|
| 144 |
+
|
| 145 |
+
Specifically, we randomly sample 40 images from the COCO validation set for each type of question, and generate the questions and GPT-4’s answers following the instruction generation pipeline in Sec. 3.2. Following Liu et al. (2023b), we feed the question and image into MLLMs to obtain the predicted answer, and then prompt GPT-4 to rate the predicted answer and pseudo answer from GPT-4 based on the ground-truth textual scene description (object, relationship, region caption, global caption). GPT-4 evaluates both the precision of referring understanding, object grounding, and correctness of semantics. The rating score ranges from 1 to 10, in which higher means better. We calculate the ratio of the predicted answer’s score and the GPT-4 answer’s score, which is then presented as a percentage to measure the performance of MLLMs. We also asked GPT-4 to give a comprehensive review for the rating and found that GPT-4 is good at measuring the degree of spatial precision, such as how much the predicted bounding box diverges from the GT box coordinate. We refer the readers to Appendix D for further elaboration.
|
| 146 |
+
|
| 147 |
+
Table 4: Results on LLaVA-Bench and the proposed Ferret-Bench via GPT4-as-a-Judge evaluation.
|
| 148 |
+
|
| 149 |
+
<table><tr><td rowspan="2"></td><td colspan="4">LLaVA-Bench</td><td colspan="4">Ferret-Bench</td></tr><tr><td>ConversatioDon x</td><td></td><td></td><td>Avg.</td><td></td><td></td><td>Deferig Reeig gin</td><td>Avg</td></tr><tr><td>LLaVA8</td><td>85.4</td><td>68.3</td><td>92.1</td><td>81.9</td><td>41.4</td><td>31.7</td><td>28.8</td><td>34.0</td></tr><tr><td>Kosmos-2</td><td>71.7</td><td>63.4</td><td>74.9</td><td>70.0</td><td>51.8</td><td>33.7</td><td>48.4</td><td>44.6</td></tr><tr><td>Shikra-7B</td><td>80.6</td><td>70.7</td><td>88.1</td><td>79.9</td><td>46.0</td><td>41.6</td><td>50.1</td><td>45.9</td></tr><tr><td>Ferret-7B</td><td>84.4</td><td>79.4</td><td>96.3</td><td>86.7</td><td>68.7</td><td>67.3</td><td>57.5</td><td>64.5</td></tr><tr><td>Ferret-13B</td><td>85.2</td><td>80.9</td><td>96.4</td><td>87.5</td><td>70.6</td><td>68.7</td><td>59.7</td><td>66.3</td></tr></table>
|
| 150 |
+
|
| 151 |
+
Table 5: Ablation study on the mutual benefit of grounding data and referring data. We evaluate Accuracy for LVIS referring and $\mathbf { R } \ @ 1$ for grounding.
|
| 152 |
+
|
| 153 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">Referring (LVIS)| Grounding</td></tr><tr><td>Point</td><td>Box</td><td>Flickr30k</td></tr><tr><td>Ferret</td><td>67.9</td><td>79.4</td><td>80.4</td></tr><tr><td>w/o Grounding data</td><td>65.4</td><td>75.6</td><td>×</td></tr><tr><td>w/o Referring data</td><td>×</td><td>×</td><td>79.8</td></tr></table>
|
| 154 |
+
|
| 155 |
+
Table 6: Ablation study on the effectiveness of the proposed spatial-aware visual sampler. Accuracy is used to evaluate LVIS referring.
|
| 156 |
+
|
| 157 |
+
<table><tr><td rowspan="2">Module</td><td colspan="2">Referring (LVIS)</td></tr><tr><td>Point Box Free-form</td><td></td></tr><tr><td>Spatial-aware Visual Sampler 67.9</td><td>79.4</td><td>69.8</td></tr><tr><td>Visual Sampler in SEEM</td><td>67.177.2</td><td>68.9</td></tr></table>
|
| 158 |
+
|
| 159 |
+
We use LLaVA-Bench (Liu et al., 2023b) and the proposed Ferret-Bench to compare Ferret with previous models, including LLaVA (Liu et al., 2023b), Shikra (Chen et al., 2023b), and Kosmos2 (Peng et al., 2023). Results are summarized in Table 4. Ferret achieves superior performance in all types of tasks, boosting the score for the detailed description category from 68.3 to 80.9, and especially excels at the three new tasks demanding referring and grounding abilities.
|
| 160 |
+
|
| 161 |
+
# 4.4 ABLATION
|
| 162 |
+
|
| 163 |
+
In the ablation studies below, in default, we ablate Ferret-7B and mainly evaluate in referring object classification and grounding tasks on Flickr30k Entities validation set.
|
| 164 |
+
|
| 165 |
+
Mutual benefits of grounding and referring. As shown in Table 5, grounding and referring, as two main capabilities emphasized in this paper, can actually benefit each other. Particularly, when adding grounding data into training, the referring performance gets improved, and vice versa.
|
| 166 |
+
|
| 167 |
+
Spatial-aware Visual Sampler. We ablate the effectiveness of the spatial-aware visual sampler by replacing it with the visual sampler in SEEM (Zou et al., 2023), where they average the features of all the sampled points as the region feature. As we can see in Table 6, ours can outperform the previous visual sampler in all three referring tasks.
|
| 168 |
+
|
| 169 |
+
LLM model size. We study how much LLM model size influences the performance of referring and grounding. As seen in Table 1-4, having a larger LM backbone can generally help.
|
| 170 |
+
|
| 171 |
+
# 4.5 OBJECT HALLUCINATION
|
| 172 |
+
|
| 173 |
+
Attribute to the incorporation of fine-grained spatial knowledge and negative mining, Ferret also exhibits strong power against the hallucination problem. We evaluate object hallucinations on the POPE benchmark (Li et al., 2023e). Results are summarized in Table 7. Ferret has exhibited performance comparable to Shikra (Chen et al., 2023b), and far surpasses recent popular MLLMs.9
|
| 174 |
+
|
| 175 |
+
# 5 CONCLUSION
|
| 176 |
+
|
| 177 |
+
We present Ferret, a new multimodal large language model adept at referring and grounding. Ferret can refer image regions in any free-form shape, and automatically establish grounding for text deemed groundable by the model. We have curated the GRIT dataset for model training, and the Ferret-Bench dataset for evaluation. Ferret, like most MLLMs, may produce harmful and counterfactual responses. For future work, inspired by LISA (Lai et al., 2023), we plan to enhance Ferret to be able to output segmentation masks in addition to bounding boxes.
|
| 178 |
+
|
| 179 |
+
# REFERENCES
|
| 180 |
+
|
| 181 |
+
Armen Aghajanyan, Bernie Huang, Candace Ross, Vladimir Karpukhin, Hu Xu, Naman Goyal, Dmytro Okhonko, Mandar Joshi, Gargi Ghosh, Mike Lewis, et al. Cm3: A causal masked multimodal model of the internet. arXiv preprint arXiv:2201.07520, 2022.
|
| 182 |
+
Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katie Millican, Malcolm Reynolds, et al. Flamingo: a visual language model for few-shot learning. arXiv preprint arXiv:2204.14198, 2022.
|
| 183 |
+
Anas Awadalla, Irena Gao, Joshua Gardner, Jack Hessel, Yusuf Hanafy, Wanrong Zhu, Kalyani Marathe, Yonatan Bitton, Samir Gadre, Jenia Jitsev, Simon Kornblith, Pang Wei Koh, Gabriel Ilharco, Mitchell Wortsman, and Ludwig Schmidt. Openflamingo, March 2023. URL https: //doi.org/10.5281/zenodo.7733589.
|
| 184 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020.
|
| 185 |
+
Chi Chen, Ruoyu Qin, Fuwen Luo, Xiaoyue Mi, Peng Li, Maosong Sun, and Yang Liu. Positionenhanced visual instruction tuning for multimodal large language models. arXiv preprint arXiv:2308.13437, 2023a.
|
| 186 |
+
Keqin Chen, Zhao Zhang, Weili Zeng, Richong Zhang, Feng Zhu, and Rui Zhao. Shikra: Unleashing multimodal llm’s referential dialogue magic. arXiv preprint arXiv:2306.15195, 2023b.
|
| 187 |
+
Ting Chen, Saurabh Saxena, Lala Li, David J Fleet, and Geoffrey Hinton. Pix2seq: A language modeling framework for object detection. arXiv preprint arXiv:2109.10852, 2021.
|
| 188 |
+
Ting Chen, Saurabh Saxena, Lala Li, Tsung-Yi Lin, David J Fleet, and Geoffrey Hinton. A unified sequence interface for vision tasks. arXiv preprint arXiv:2206.07669, 2022a.
|
| 189 |
+
Xi Chen, Xiao Wang, Soravit Changpinyo, AJ Piergiovanni, Piotr Padlewski, Daniel Salz, Sebastian Goodman, Adam Grycner, Basil Mustafa, Lucas Beyer, et al. Pali: A jointly-scaled multilingual language-image model. arXiv preprint arXiv:2209.06794, 2022b.
|
| 190 |
+
Xi Chen, Josip Djolonga, Piotr Padlewski, Basil Mustafa, Soravit Changpinyo, Jialin Wu, Carlos Riquelme Ruiz, Sebastian Goodman, Xiao Wang, Yi Tay, et al. Pali-x: On scaling up a multilingual vision and language model. arXiv preprint arXiv:2305.18565, 2023c.
|
| 191 |
+
Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. Uniter: Universal image-text representation learning. In ECCV, 2020.
|
| 192 |
+
Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E Gonzalez, et al. Vicuna: An open-source chatbot impressing gpt-4 with $9 0 \% *$ chatgpt quality. See https://vicuna. lmsys. org (accessed 14 April 2023), 2023.
|
| 193 |
+
Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm: Scaling language modeling with pathways. arXiv preprint arXiv:2204.02311, 2022.
|
| 194 |
+
Wenliang Dai, Junnan Li, Dongxu Li, Anthony Meng Huat Tiong, Junqi Zhao, Weisheng Wang, Boyang Li, Pascale Fung, and Steven Hoi. Instructblip: Towards general-purpose vision-language models with instruction tuning. arXiv preprint arXiv:2305.06500, 2023.
|
| 195 |
+
Jiajun Deng, Zhengyuan Yang, Tianlang Chen, Wengang Zhou, and Houqiang Li. Transvg: End-toend visual grounding with transformers. In ICCV, 2021.
|
| 196 |
+
Danny Driess, Fei Xia, Mehdi SM Sajjadi, Corey Lynch, Aakanksha Chowdhery, Brian Ichter, Ayzaan Wahid, Jonathan Tompson, Quan Vuong, Tianhe Yu, et al. PaLM-E: An embodied multimodal language model. arXiv preprint arXiv:2303.03378, 2023.
|
| 197 |
+
Zhe Gan, Yen-Chun Chen, Linjie Li, Chen Zhu, Yu Cheng, and Jingjing Liu. Large-scale adversarial training for vision-and-language representation learning. NeurIPS, 2020.
|
| 198 |
+
Agrim Gupta, Piotr Dollar, and Ross Girshick. Lvis: A dataset for large vocabulary instance segmentation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 5356–5364, 2019.
|
| 199 |
+
Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross Girshick. Mask r-cnn. In ´ Proceedings of the IEEE international conference on computer vision, pp. 2961–2969, 2017.
|
| 200 |
+
Aishwarya Kamath, Mannat Singh, Yann LeCun, Gabriel Synnaeve, Ishan Misra, and Nicolas Carion. Mdetr-modulated detection for end-to-end multi-modal understanding. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 1780–1790, 2021.
|
| 201 |
+
Sahar Kazemzadeh, Vicente Ordonez, Mark Matten, and Tamara Berg. Referitgame: Referring to objects in photographs of natural scenes. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 787–798, 2014.
|
| 202 |
+
Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C Berg, Wan-Yen Lo, et al. Segment anything. arXiv preprint arXiv:2304.02643, 2023.
|
| 203 |
+
Jing Yu Koh, Daniel Fried, and Ruslan Salakhutdinov. Generating images with multimodal language models. arXiv preprint arXiv:2305.17216, 2023a.
|
| 204 |
+
Jing Yu Koh, Ruslan Salakhutdinov, and Daniel Fried. Grounding language models to images for multimodal generation. arXiv preprint arXiv:2301.13823, 2023b.
|
| 205 |
+
Emiel Krahmer and Kees Van Deemter. Computational generation of referring expressions: A survey. Computational Linguistics, 38(1):173–218, 2012.
|
| 206 |
+
Ranjay Krishna, Yuke Zhu, Oliver Groth, Justin Johnson, Kenji Hata, Joshua Kravitz, Stephanie Chen, Yannis Kalantidis, Li-Jia Li, David A Shamma, et al. Visual genome: Connecting language and vision using crowdsourced dense image annotations. International journal of computer vision, 123:32–73, 2017.
|
| 207 |
+
Xin Lai, Zhuotao Tian, Yukang Chen, Yanwei Li, Yuhui Yuan, Shu Liu, and Jiaya Jia. Lisa: Reasoning segmentation via large language model. arXiv preprint arXiv:2308.00692, 2023.
|
| 208 |
+
Hugo Laurenc¸on, Lucile Saulnier, Leo Tronchon, Stas Bekman, Amanpreet Singh, Anton Lozhkov, ´ Thomas Wang, Siddharth Karamcheti, Alexander M Rush, Douwe Kiela, et al. Obelisc: An open web-scale filtered dataset of interleaved image-text documents. arXiv preprint arXiv:2306.16527, 2023.
|
| 209 |
+
Bo Li, Yuanhan Zhang, Liangyu Chen, Jinghao Wang, Jingkang Yang, and Ziwei Liu. Otter: A multi-modal model with in-context instruction tuning. arXiv preprint arXiv:2305.03726, 2023a.
|
| 210 |
+
Chunyuan Li, Zhe Gan, Zhengyuan Yang, Jianwei Yang, Linjie Li, Lijuan Wang, and Jianfeng Gao. Multimodal foundation models: From specialists to general-purpose assistants. arXiv preprint arXiv:2309.10020, 2023b.
|
| 211 |
+
Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. Blip-2: Bootstrapping languageimage pre-training with frozen image encoders and large language models. arXiv preprint arXiv:2301.12597, 2023c.
|
| 212 |
+
Lei Li, Yuwei Yin, Shicheng Li, Liang Chen, Peiyi Wang, Shuhuai Ren, Mukai Li, Yazheng Yang, Jingjing Xu, Xu Sun, et al. $\mathbf { M } ^ { 3 } \mathrm { i t }$ : A large-scale dataset towards multi-modal multilingual instruction tuning. arXiv preprint arXiv:2306.04387, 2023d.
|
| 213 |
+
Liunian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Lijuan Wang, Lu Yuan, Lei Zhang, Jenq-Neng Hwang, et al. Grounded language-image pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10965–10975, 2022.
|
| 214 |
+
|
| 215 |
+
Yifan Li, Yifan Du, Kun Zhou, Jinpeng Wang, Wayne Xin Zhao, and Ji-Rong Wen. Evaluating object hallucination in large vision-language models. arXiv preprint arXiv:2305.10355, 2023e.
|
| 216 |
+
|
| 217 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13, pp. 740–755. Springer, 2014.
|
| 218 |
+
Fuxiao Liu, Kevin Lin, Linjie Li, Jianfeng Wang, Yaser Yacoob, and Lijuan Wang. Aligning large multi-modal model with robust instruction tuning. arXiv preprint arXiv:2306.14565, 2023a.
|
| 219 |
+
Haotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. arXiv preprint arXiv:2304.08485, 2023b.
|
| 220 |
+
Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.
|
| 221 |
+
Jiasen Lu, Christopher Clark, Rowan Zellers, Roozbeh Mottaghi, and Aniruddha Kembhavi. Unified-io: A unified model for vision, language, and multi-modal tasks. arXiv preprint arXiv:2206.08916, 2022.
|
| 222 |
+
Ruotian Luo and Gregory Shakhnarovich. Comprehension-guided referring expressions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7102–7111, 2017.
|
| 223 |
+
Chih-Yao Ma, Yannis Kalantidis, Ghassan AlRegib, Peter Vajda, Marcus Rohrbach, and Zsolt Kira. Learning to generate grounded visual captions without localization supervision. In ECCV, 2020.
|
| 224 |
+
Xu Ma, Can Qin, Haoxuan You, Haoxi Ran, and Yun Fu. Rethinking network design and local geometry in point cloud: A simple residual mlp framework. arXiv preprint arXiv:2202.07123, 2022.
|
| 225 |
+
Junhua Mao, Jonathan Huang, Alexander Toshev, Oana Camburu, Alan L Yuille, and Kevin Murphy. Generation and comprehension of unambiguous object descriptions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 11–20, 2016.
|
| 226 |
+
Varun K Nagaraja, Vlad I Morariu, and Larry S Davis. Modeling context between objects for referring expression understanding. In Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11–14, 2016, Proceedings, Part IV 14, pp. 792–807. Springer, 2016.
|
| 227 |
+
OpenAI. GPT-4 technical report. https://arxiv.org/abs/2303.08774, 2023a.
|
| 228 |
+
OpenAI. Gpt-4 technical report. arXiv, 2023b.
|
| 229 |
+
Zhiliang Peng, Wenhui Wang, Li Dong, Yaru Hao, Shaohan Huang, Shuming Ma, and Furu Wei. Kosmos-2: Grounding multimodal large language models to the world. arXiv preprint arXiv:2306.14824, 2023.
|
| 230 |
+
Bryan A Plummer, Liwei Wang, Chris M Cervantes, Juan C Caicedo, Julia Hockenmaier, and Svetlana Lazebnik. Flickr30k entities: Collecting region-to-phrase correspondences for richer imageto-sentence models. In Proceedings of the IEEE international conference on computer vision, pp. 2641–2649, 2015.
|
| 231 |
+
Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 652–660, 2017a.
|
| 232 |
+
Charles Ruizhongtai Qi, Li Yi, Hao Su, and Leonidas J Guibas. Pointnet++: Deep hierarchical feature learning on point sets in a metric space. Advances in neural information processing systems, 30, 2017b.
|
| 233 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In International conference on machine learning, pp. 8748–8763. PMLR, 2021.
|
| 234 |
+
Teven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana Ilic, Daniel Hesslow, Roman ´ Castagne, Alexandra Sasha Luccioni, Franc¸ois Yvon, Matthias Gall ´ e, et al. Bloom: A 176b- ´ parameter open-access multilingual language model. arXiv preprint arXiv:2211.05100, 2022.
|
| 235 |
+
Shuai Shao, Zeming Li, Tianyuan Zhang, Chao Peng, Gang Yu, Xiangyu Zhang, Jing Li, and Jian Sun. Objects365: A large-scale, high-quality dataset for object detection. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 8430–8439, 2019.
|
| 236 |
+
Quan Sun, Qiying Yu, Yufeng Cui, Fan Zhang, Xiaosong Zhang, Yueze Wang, Hongcheng Gao, Jingjing Liu, Tiejun Huang, and Xinlong Wang. Generative pretraining in multimodality. arXiv preprint arXiv:2307.05222, 2023.
|
| 237 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee´ Lacroix, Baptiste Roziere, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and \` efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023a.
|
| 238 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023b.
|
| 239 |
+
Jianfeng Wang, Zhengyuan Yang, Xiaowei Hu, Linjie Li, Kevin Lin, Zhe Gan, Zicheng Liu, Ce Liu, and Lijuan Wang. Git: A generative image-to-text transformer for vision and language. arXiv preprint arXiv:2205.14100, 2022a.
|
| 240 |
+
Peng Wang, An Yang, Rui Men, Junyang Lin, Shuai Bai, Zhikang Li, Jianxin Ma, Chang Zhou, Jingren Zhou, and Hongxia Yang. Ofa: Unifying architectures, tasks, and modalities through a simple sequence-to-sequence learning framework. In ICML, 2022b.
|
| 241 |
+
Wenhai Wang, Zhe Chen, Xiaokang Chen, Jiannan Wu, Xizhou Zhu, Gang Zeng, Ping Luo, Tong Lu, Jie Zhou, Yu Qiao, et al. Visionllm: Large language model is also an open-ended decoder for vision-centric tasks. arXiv preprint arXiv:2305.11175, 2023.
|
| 242 |
+
Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph cnn for learning on point clouds. ACM Transactions on Graphics (tog), 38(5): 1–12, 2019.
|
| 243 |
+
Zirui Wang, Jiahui Yu, Adams Wei Yu, Zihang Dai, Yulia Tsvetkov, and Yuan Cao. Simvlm: Simple visual language model pretraining with weak supervision. In ICLR, 2022c.
|
| 244 |
+
Jialian Wu, Jianfeng Wang, Zhengyuan Yang, Zhe Gan, Zicheng Liu, Junsong Yuan, and Lijuan Wang. Grit: A generative region-to-text transformer for object understanding. arXiv preprint arXiv:2212.00280, 2022.
|
| 245 |
+
Zhengyuan Yang, Zhe Gan, Jianfeng Wang, Xiaowei Hu, Faisal Ahmed, Zicheng Liu, Yumao Lu, and Lijuan Wang. Unitab: Unifying text and box outputs for grounded vision-language modeling. In European Conference on Computer Vision, pp. 521–539. Springer, 2022.
|
| 246 |
+
Qinghao Ye, Haiyang Xu, Guohai Xu, Jiabo Ye, Ming Yan, Yiyang Zhou, Junyang Wang, Anwen Hu, Pengcheng Shi, Yaya Shi, et al. mplug-owl: Modularization empowers large language models with multimodality. arXiv preprint arXiv:2304.14178, 2023.
|
| 247 |
+
Licheng Yu, Patrick Poirson, Shan Yang, Alexander C Berg, and Tamara L Berg. Modeling context in referring expressions. In Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part II 14, pp. 69–85. Springer, 2016.
|
| 248 |
+
Licheng Yu, Hao Tan, Mohit Bansal, and Tamara L Berg. A joint speaker-listener-reinforcer model for referring expressions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 7282–7290, 2017.
|
| 249 |
+
Licheng Yu, Zhe Lin, Xiaohui Shen, Jimei Yang, Xin Lu, Mohit Bansal, and Tamara L Berg. Mattnet: Modular attention network for referring expression comprehension. In CVPR, 2018.
|
| 250 |
+
Lili Yu, Bowen Shi, Ramakanth Pasunuru, Benjamin Muller, Olga Golovneva, Tianlu Wang, Arun Babu, Binh Tang, Brian Karrer, Shelly Sheynin, et al. Scaling autoregressive multi-modal models: Pretraining and instruction tuning. arXiv preprint arXiv:2309.02591, 2023.
|
| 251 |
+
Yuhang Zang, Wei Li, Jun Han, Kaiyang Zhou, and Chen Change Loy. Contextual object detection with multimodal large language models. arXiv preprint arXiv:2305.18279, 2023.
|
| 252 |
+
Rowan Zellers, Yonatan Bisk, Ali Farhadi, and Yejin Choi. From recognition to cognition: Visual commonsense reasoning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 6720–6731, 2019.
|
| 253 |
+
Haotian Zhang, Pengchuan Zhang, Xiaowei Hu, Yen-Chun Chen, Liunian Li, Xiyang Dai, Lijuan Wang, Lu Yuan, Jenq-Neng Hwang, and Jianfeng Gao. Glipv2: Unifying localization and visionlanguage understanding. Advances in Neural Information Processing Systems, 35:36067–36080, 2022.
|
| 254 |
+
Shilong Zhang, Peize Sun, Shoufa Chen, Min Xiao, Wenqi Shao, Wenwei Zhang, Kai Chen, and Ping Luo. Gpt4roi: Instruction tuning large language model on region-of-interest. arXiv preprint arXiv:2307.03601, 2023.
|
| 255 |
+
Yang Zhao, Zhijie Lin, Daquan Zhou, Zilong Huang, Jiashi Feng, and Bingyi Kang. Bubogpt: Enabling visual grounding in multi-modal llms. arXiv preprint arXiv:2307.08581, 2023.
|
| 256 |
+
Luowei Zhou, Yannis Kalantidis, Xinlei Chen, Jason J Corso, and Marcus Rohrbach. Grounded video description. In CVPR, 2019.
|
| 257 |
+
Yuanen Zhou, Meng Wang, Daqing Liu, Zhenzhen Hu, and Hanwang Zhang. More grounded image captioning by distilling image-text matching model. In CVPR, 2020.
|
| 258 |
+
Deyao Zhu, Jun Chen, Xiaoqian Shen, Xiang Li, and Mohamed Elhoseiny. Minigpt-4: Enhancing vision-language understanding with advanced large language models. arXiv preprint arXiv:2304.10592, 2023a.
|
| 259 |
+
Wanrong Zhu, Jack Hessel, Anas Awadalla, Samir Yitzhak Gadre, Jesse Dodge, Alex Fang, Youngjae Yu, Ludwig Schmidt, William Yang Wang, and Yejin Choi. Multimodal c4: An open, billionscale corpus of images interleaved with text. arXiv preprint arXiv:2304.06939, 2023b.
|
| 260 |
+
Xueyan Zou, Jianwei Yang, Hao Zhang, Feng Li, Linjie Li, Jianfeng Gao, and Yong Jae Lee. Segment everything everywhere all at once. arXiv preprint arXiv:2304.06718, 2023.
|
| 261 |
+
|
| 262 |
+
Table 7: Results on the object hallucination benchmark using the POPE evaluation pipeline (Li et al., 2023e).
|
| 263 |
+
|
| 264 |
+
<table><tr><td>Datasets</td><td>Metrics</td><td></td><td></td><td>Ferret Shikra InstructBLIP</td><td>MiniGPT4 LLaVA</td><td></td><td>MM-GPT</td><td>mPLUG-Owl</td></tr><tr><td rowspan="5">Random</td><td>Accuracy (↑)</td><td>90.24</td><td>86.90</td><td>88.57</td><td>79.67</td><td>50.37</td><td>50.10</td><td>53.97</td></tr><tr><td>Precision (↑)</td><td>97.72</td><td>94.40</td><td>84.09</td><td>78.24</td><td>50.19</td><td>50.05</td><td>52.07</td></tr><tr><td>Recall(↑)</td><td>83.00</td><td>79.26</td><td>95.13</td><td>82.20</td><td>99.13</td><td>100.00</td><td>99.60</td></tr><tr><td>F1 Score (↑)</td><td>89.76</td><td>86.19</td><td>89.27</td><td>80.17</td><td>66.64</td><td>66.71</td><td>68.39</td></tr><tr><td>Yes</td><td>43.78</td><td>43.26</td><td>56.57</td><td>52.53</td><td>98.77</td><td>99.90</td><td>95.63</td></tr><tr><td rowspan="5">Popular</td><td>Accuracy (↑)</td><td>84.90</td><td>83.97</td><td>82.77</td><td>69.73</td><td>49.87</td><td>50.00</td><td>50.90</td></tr><tr><td>Precision (↑)</td><td>88.24</td><td>87.55</td><td>76.27</td><td>65.86</td><td>49.93</td><td>50.00</td><td>50.46</td></tr><tr><td>Recall(↑)</td><td>80.53</td><td>79.20</td><td>95.13</td><td>81.93</td><td>99.27</td><td>100.00</td><td>99.40</td></tr><tr><td>F1 Score (↑)</td><td>84.21</td><td>83.16</td><td>84.66</td><td>73.02</td><td>66.44</td><td>66.67</td><td>66.94</td></tr><tr><td>Yes</td><td>45.63</td><td>45.23</td><td>62.37</td><td>62.20</td><td>99.40</td><td>100.00</td><td>98.57</td></tr><tr><td rowspan="5">Adversarial</td><td>Accuracy (↑)</td><td>82.36</td><td>83.10</td><td>72.10</td><td>65.17</td><td>49.70</td><td>50.00</td><td>50.67</td></tr><tr><td>Precision (↑)</td><td>83.60</td><td>85.60</td><td>65.13</td><td>61.19</td><td>49.85</td><td>50.00</td><td>50.34</td></tr><tr><td>Recall(↑)</td><td>80.53</td><td>79.60</td><td>95.13</td><td>82.93</td><td>99.07</td><td>100.00</td><td>99.33</td></tr><tr><td>F1 Score (↑)</td><td>82.00</td><td>82.49</td><td>77.32</td><td>70.42</td><td>66.32</td><td>66.67</td><td>66.82</td></tr><tr><td>Yes</td><td>48.18</td><td>46.50</td><td>73.03</td><td>67.77</td><td>99.37</td><td>100.00</td><td>98.67</td></tr></table>
|
| 265 |
+
|
| 266 |
+
Table 8: Comparison of Ferret v.s. recent MLLMs integrating spatial awareness. ‘Convention’ refers to a comprehensive collection of publicly available data that has been transformed using templates, ‘GPT-Generate’ signifies the generated refer/ground datasets employing GPT, and ‘Robustness’ denotes datasets aimed at mitigating hallucination and improving robustness. Section 3 explains more details about each.
|
| 267 |
+
|
| 268 |
+
<table><tr><td rowspan="2">Model</td><td colspan="3">Input Types</td><td rowspan="2">GrOutpung</td><td colspan="3">Data Construction</td><td rowspan="2">Qu antaetivr uval. w. Chat</td></tr><tr><td></td><td></td><td>Point Box Free-form</td><td></td><td>Convention GPT-Generate Robustness</td><td></td></tr><tr><td>BuboGPT</td><td>xxx√:</td><td></td><td></td><td></td><td>√</td><td></td><td></td><td>×</td></tr><tr><td>Vision-LLM</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Kosmos-2</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Shikra</td><td></td><td>xxνν</td><td></td><td></td><td>√</td><td>xxx√x</td><td></td><td></td></tr><tr><td>GPT4-ROI</td><td></td><td></td><td></td><td>ννννxxν</td><td></td><td>×</td><td>xxxxxxν</td><td>xxxxν</td></tr><tr><td>PVIT</td><td>X</td><td></td><td>xxxxxxν</td><td></td><td>√</td><td></td><td></td><td></td></tr><tr><td>Ferret</td><td></td><td></td><td></td><td></td><td></td><td><</td><td></td><td></td></tr></table>
|
| 269 |
+
|
| 270 |
+
# A RELATED WORK
|
| 271 |
+
|
| 272 |
+
Multimodal large language models (MLLMs). Large Language Models (LLMs), including GPTs (Brown et al., 2020; OpenAI, 2023a), PaLM (Chowdhery et al., 2022), BLOOM (Scao et al., 2022), and LLaMA (Touvron et al., 2023a;b), have revolutionized research in NLP, spurring significant advances in multimodal language models as well. Early models primarily focused on large-scale image-text pre-training. Notable examples include SimVLM (Wang et al., 2022c), GIT (Wang et al., 2022a), PaLI (Chen et al., 2022b), PaLI-X (Chen et al., 2023c), BLIP-2 (Li et al., 2023c), Flamingo (Alayrac et al., 2022), PaLM-E (Driess et al., 2023), CM3 (Aghajanyan et al., 2022), and CM3Leon (Yu et al., 2023). Flamingo, in particular, pioneered the integration of a pre-trained CLIP image encoder with LLMs through gated cross-attention blocks, showcasing emergent multimodal in-context few-shot learning capabilities. Its open-sourced variants, such as OpenFlamingo (Awadalla et al., 2023) and IDEFICS (Laurenc¸on et al., 2023), have garnered significant attention. Typically, these models undergo pre-training using millions or even billions of image-text pairs and interleaved image-text datasets (Zhu et al., 2023b).
|
| 273 |
+
|
| 274 |
+
On the other hand, recent research has increasingly focused on using pre-trained LLMs for visual instruction tuning. Prominent examples include LLaVA (Liu et al., 2023b), MiniGPT-4 (Zhu et al., 2023a), mPLUG-Owl (Ye et al., 2023), Otter (Li et al., 2023a), InstructBLIP (Dai et al., 2023), to name a few. In addition to text generation, recent models like FROMAGe (Koh et al., 2023b), GILL (Koh et al., 2023a), Emu (Sun et al., 2023), have also enabled MLLMs for image retrieval and image generation. Please refer to Chapter 5 of Li et al. (2023b) for a detailed review.
|
| 275 |
+
|
| 276 |
+
MLLMs for referring and grounding. In the realm of existing literature, works such as Kosmos2 (Peng et al., 2023) and Shikra (Chen et al., 2023b), closely resemble ours as they also enable MLLMs for fine-grained image comprehension and open-world referring and grounding. Additional works in this direction include GPT4ROI (Zhang et al., 2023), PVIT (Chen et al., 2023a), BuboGPT (Zhao et al., 2023), VisionLLM (Wang et al., 2023), and ContextDET (Zang et al., 2023). Nevertheless, pivotal distinctions set our model apart. First, prior endeavors supported only bounding boxes (and points in Shikra) as input. Conversely, due to Ferret’s innovative hybrid region representation, we accommodate a broader range of free-form shapes for referring, encompassing points, boxes, sketches, scribbles, polygons, and more. Second, we meticulously curate an extensive referand-ground instruction tuning dataset. Third, we introduce Ferret-Bench to facilitate forthcoming research and enhance evaluation benchmarks in this direction. Lastly, our model exhibits superior performance compared to previous works, notably mitigating object hallucination to a significant extent. A more straightforward side-by-side comparison is shown in Tab. 8.
|
| 277 |
+
|
| 278 |
+
Unifying grounding and VL understanding. Our work is also related to previous work that aims to unify text and bounding box output for vision-language (VL) models, such as UniTAB (Yang et al., 2022), OFA (Wang et al., 2022b), and Unified-IO (Lu et al., 2022), which also represent bounding boxes using a set of additional discrete tokens as proposed in Pix2Seq (Chen et al., 2021; 2022a). Ferret is unique in that (i) our model is built upon LLMs, marrying the power of LLMs and grounding, thus unlocking new capabilities such as grounded instruction tuning, and (ii) we handle bounding box coordinates as regular text tokens, avoiding the need for extra specialized tokens dedicated to representing boxes.
|
| 279 |
+
|
| 280 |
+
# B DISCUSSION ON LIMITATION AND FAILURE CASES
|
| 281 |
+
|
| 282 |
+
We acknowledge certain specific failure scenarios and limitations for our models, which are detailed as follows:
|
| 283 |
+
|
| 284 |
+
Failure Scenarios: (1). Referring to too many objects (more than 3) in one question might not be as accurate as referring to each of them in separate conversations. This is likely due to a relative scarcity of training data that mentions too many objects. (2). The referring and grounding of very small objects is less accurate than large or medium objects. It’s a common challenge in object detection. However, we think further improving input image resolution is able to help.
|
| 285 |
+
|
| 286 |
+
Limitations: (1). Not good at other languages because the training dataset is curated only in English. Although Ferret shows some emergent referring and grounding capability in other languages, its performance in other languages is still worse than in English. Future incorporation of multilingual training data could potentially mitigate this. (2). Similar to many large language models, Ferret has the potential to generate harmful or factually incorrect responses. (3). Ferret is not designed for segmentation tasks requiring mask outputs.
|
| 287 |
+
|
| 288 |
+
# C DETAILS OF DATASET
|
| 289 |
+
|
| 290 |
+
# C.1 TASK TEMPLATES FOR PUBLIC DATASETS
|
| 291 |
+
|
| 292 |
+
In Section 3.1, we mentioned using carefully designed task templates to convert public datasets such as Visual Genome into instruction-following format. The task templates we used are provided in Table 9. For simplicity, we only list three examples for each task.
|
| 293 |
+
|
| 294 |
+
# C.2 DETAILS ON SPATIAL NEGATIVE MINING
|
| 295 |
+
|
| 296 |
+
In Section 3.3, we conducted negative sample mining for two aspects: (i) Image-conditioned Category Localization, and (ii) Semantics-conditioned Category Localization. They use the same template to convert the original data, which falls into the task of object hallucination in Table 9. Specifically, for the negative categories in $( i i )$ , we prompt ChatGPT/GPT-4 to generate entities that are most analogous to the original class, attribute, or quantity, e.g., ‘man’ vs. ‘woman’, ‘blue’ vs. ‘yellow’, ‘two’ vs. ‘three’. The prompt feed into ChatGPT/GPT-4 encompasses all the entities extracted from 5 captions associated with one single image. We show the exact prompt template in Table 10.
|
| 297 |
+
|
| 298 |
+
Table 9: Examples of task templates Ferret used to transfer different public data types into the instruction-following format.
|
| 299 |
+
|
| 300 |
+
<table><tr><td>Task</td><td>Three randomly chosen examples from many.</td></tr><tr><td>Referring-Object</td><td>What is the class of the object <location>within the image? Classify object <location> in the image. Identify the object <location> in the image.</td></tr><tr><td>Referring-Relation</td><td>What does <object1><location1> do to <object2><location2> of the image? What is the physical relation between <object1><locationl>and <object2><location2>? Can you figure out the geometric relation of the <objectl><locationl>and <object2><location2>?</td></tr><tr><td>Referring-Region</td><td>Describe the region <location> in a short phrase. What is in the region <location>? Describe in a phrase. Capture in a phrase:what's near region <location>in the picture?</td></tr><tr><td>REC.</td><td>Where is<object>in the image? What are the coordinates for the given <object> in the image? Given the image,could you please tell me where is <object></td></tr><tr><td>Phrase Grounding</td><td>What are the locations of <objects>? Could you provide me with the exact locations of <objects>? Please indicate the positions of <objects> in the image?</td></tr><tr><td>Object Detection (O365)</td><td>Detect all objects among <class> in the image. Perform object detection given the image within <class>. Given the image and set <class>,identify allthe objects that belong to the set.</td></tr><tr><td>Grounded Captioning</td><td>What is this photo about? Use concise language. Describe the overall picture in just a few words. What do you see happening in this image? Provide the answer in short.</td></tr><tr><td>Object Hallucination</td><td>Is there a <object>in the image? Are there <object>in the image? Please tell me whether<object> exists in the image?</td></tr></table>
|
| 301 |
+
|
| 302 |
+
Table 10: In this example, we provide the prompt to generate the spatial negative sets.
|
| 303 |
+
|
| 304 |
+
messages $=$ [ {"role":"system", "content": f”’You are an AI visual assistant that can analyze a single image. You receive several entities given by a list, each describing the objects in the image you are observing.
|
| 305 |
+
|
| 306 |
+
For each entity mentioned, change them with the most misleading entity name (may belong to the same category but are actually different) (nonexistent objects: man woman, nonexistent attributes: brown yellow, nonexistent quantities: two three, etc.). The instructions should contain interrogative and declarative sentences.
|
| 307 |
+
|
| 308 |
+
The output format needs to be a list only which contains the misleading entity names. Please follow the instructions carefully.
|
| 309 |
+
|
| 310 |
+
1. The length of the output list needs to be exactly equal to the input list.
|
| 311 |
+
|
| 312 |
+
2. Do not explain the reasons.
|
| 313 |
+
|
| 314 |
+
3. Do not mention the input entities, at least the output name and input name needs to be different.
|
| 315 |
+
|
| 316 |
+
4. Do not mention something abstract, like alien ¨ .
|
| 317 |
+
|
| 318 |
+
5. When dealing with quantities, focus solely on increasing the numbers during revision.
|
| 319 |
+
|
| 320 |
+
6. When dealing with words like ”a few”, ”a group”, ”several”, ”some”, etc., try changing the objects (A few men $ \mathbf { A }$ few women).
|
| 321 |
+
|
| 322 |
+
7. Ensure that inclusive words are not substituted with their specific subsets. For example, if the word is ”people,” avoid replacing it with genders like ”man” or ”woman.” Instead, consider modifying them to different categories, such as ”people” ”animals.”.”’}]
|
| 323 |
+
|
| 324 |
+
We provide some example prompts to generate refer-and-ground from ChatGPT/GPT-4. Prompt and the in-context example of multiple-round visual conversation data are shown in Table 11 and Table 12. Prompt and the in-context example of one-round reasoning data are shown in Table 13 and Table 14.
|
| 325 |
+
|
| 326 |
+
Table 11: In this example, we provide the prompt used to generate the conversation response for refer-and-ground instruction tuning, following the practice of LLaVA (Liu et al., 2023b).
|
| 327 |
+
|
| 328 |
+
messages $\mathbf { \Sigma } = [ \mathbf { \Sigma } \{ { \ " } \Sigma \circ \mathrm { { 1 } } \mathsf { e " \Sigma }$ :"system", "content": f”’You are an AI visual assistant that can analyze a single image. You receive five global captions, each describing the same image you are observing. In addition, specific object locations within the image are given, along with detailed coordinates. These coordinates are in the form of bounding boxes, represented as (x1, y1, x2, y2) with floating numbers ranging from 0 to 1. These values correspond to the top left x, top left y, bottom right $\mathbf { X }$ , and bottom right y. Also, the relationships between pairs of objects are provided in the format of object relationship subject, where the object/subject are indexed by object id from previous object lists as well as the object names. Also, several region descriptions are given, each describing a box region of the image, with detailed coordinates.
|
| 329 |
+
|
| 330 |
+
Design a conversation between you and a person asking about this photo. Ask diverse questions and give corresponding answers. The answers should be in a tone that a visual AI assistant is seeing the image and answering the question.
|
| 331 |
+
|
| 332 |
+
Here are some additional requirements about generated questions and answers:
|
| 333 |
+
|
| 334 |
+
1. Only include questions that have definite answers:
|
| 335 |
+
(1) one can see the content in the image that the question asks about and can answer confidently; (2) one can determine confidently from the image that it is not in the image. Do not ask any questions that cannot be answered confidently.
|
| 336 |
+
|
| 337 |
+
2. Also include complex questions that are relevant to the content in the image, for example, asking about background knowledge of the objects in the image, asking to discuss events happening in the image, asking about object actions in the context of entire images, etc. Again, do not ask about uncertain details.
|
| 338 |
+
|
| 339 |
+
3. Provide detailed answers when answering complex questions. For example, give detailed examples or reasoning steps to make the content more convincing and well-organized. You can include multiple paragraphs if necessary.
|
| 340 |
+
|
| 341 |
+
4. In all samples, either in question or answer, you must mention bounding box coordinates to refer to the object or regions instead of directly saying the object name or describing the regions in text. In answer, explain the region in the context of the scene.
|
| 342 |
+
|
| 343 |
+
5. Do not mention that the information source is provided in the text/caption/region description.
|
| 344 |
+
Always answer as if you are directly looking at the image.
|
| 345 |
+
|
| 346 |
+
6. Make the question as diverse as possible. Include questions asking about the visual content of the image, including the object types, counting the objects, object actions, object locations, relative positions between objects, object selection, object functions, etc. Make the question challenging by less including the visual content details in the question.”’}
|
| 347 |
+
|
| 348 |
+
or sample in fewshot samples: messages.append({"role":"user", "content":sample[‘context’]}) messages.append({"role":"assistant", "content":sample[‘response’]} messages.append({"role":"user", "content":‘\n’.join(query)})
|
| 349 |
+
|
| 350 |
+

|
| 351 |
+
Table 12: One example used in in-context learning to construct GPT-Assisted Refer-and-Ground Instructon-Tuning. We encourage readers to refer to the codebase for the prompts for other types.
|
| 352 |
+
|
| 353 |
+
Table 13: In this example, we provide the prompt used to generate the reasoning response for referand-ground instruction tuning, following the practice of LLaVA (Liu et al., 2023b).
|
| 354 |
+
|
| 355 |
+
messages $\mathbf { \Sigma } = [ \mathbf { \Sigma } \{ { \ " } \Sigma \circ \mathrm { { 1 } } \mathsf { e " \Sigma }$ :"system", "content": f”’You are an AI visual assistant that can analyze a single image. You receive five global captions, each describing the same image you are observing. In addition, specific object locations within the image are given, along with detailed coordinates. These coordinates are in the form of bounding boxes, represented as (x1, y1, x2, y2) with floating numbers ranging from 0 to 1. These values correspond to the top left x, top left y, bottom right x, and bottom right y. Also, the relationships between pairs of objects are provided, in the format of object relationship subject, where the object/subject are indexed by object id from previous object lists as well as the object names. Also, several region descriptions are given, each describing a box region of the image, with detailed coordinates.
|
| 356 |
+
|
| 357 |
+
The task is to use the provided image information (objects, attribute, relationship, region description, captions), create a plausible and challenging question about the image, and provide the answer in detail.
|
| 358 |
+
|
| 359 |
+
Create complex questions that mention specific regions of the image, but the question should require some knowledge-aware or high-level commonsense reasoning beyond describing the scene.
|
| 360 |
+
|
| 361 |
+
To answer such questions, one should first understand the visual content, then based on the background knowledge or reasoning, either explain why the things are happening that way or provide guides and help to the user’s request. Make the question challenging by not including the visual content details in the question so that the user needs to reason about that first.
|
| 362 |
+
|
| 363 |
+
Here are some additional requirements about generated questions and answers:
|
| 364 |
+
|
| 365 |
+
1. In question or answer, you must mention bounding box coordinates to refer to the object or regions, instead of directly say the object name or describing the regions in text. In answers, explain the region in the context of scene. Include details like object counts, position of the objects, relative position between the objects.
|
| 366 |
+
|
| 367 |
+
2. Don’t ask the question you are not confident to answer. Only include question that have definite answer.
|
| 368 |
+
|
| 369 |
+
3. Do not mention that the information source is provided in text/catpion/region description. Always answer as if you are directly looking at the image.
|
| 370 |
+
|
| 371 |
+
4. Make the question as diverse as possible and as complex-reasoning required as possible.”’} ]
|
| 372 |
+
|
| 373 |
+
or sample in fewshot samples: messages.append({"role":"user", "content":sample[‘context’]}) messages.append({"role":"assistant", "content":sample[‘response’]} messages.append({"role":"user", "content":‘\n’.join(query)})
|
| 374 |
+
|
| 375 |
+
Table 14: One example used in in-context learning to construct GPT-Assisted Refer-and-Ground Instructon-Tuning. We encourage readers to refer to the codebase for the prompts for other types.
|
| 376 |
+
|
| 377 |
+

|
| 378 |
+
|
| 379 |
+
# D EXAMPLES AND PROMPTS FOR FERRET-BENCH
|
| 380 |
+
|
| 381 |
+
We leverage GPT-4 to generate three kinds of region-based questions evaluating referring and grounding capability: (i) Referring Description, (ii) Referring Reasoning, and (iii) Grounding in Conversation. Here, we only provide the prompt in Table 15 used to generate the referring description response. One example of GPT-4 answers is shown in Table 16. We recommend readers check out more examples in Appendix E.
|
| 382 |
+
|
| 383 |
+
Table 15: In this example, we provide the prompt used to generate the referring description response.
|
| 384 |
+
|
| 385 |
+
messages $=$ [ {"role":"system", "content": f”’You are an AI visual assistant that can analyze a single image. You receive five global captions, each describing the same image you are observing. In addition, specific object locations within the image are given, along with detailed coordinates. These coordinates are in the form of bounding boxes, represented as (x1, y1, x2, y2) with floating numbers ranging from 0 to 1. These values correspond to the top left x, top left y, bottom right $\mathbf { X }$ , and bottom right y. Also, the relationships between pairs of objects are provided, in the format of object relationship subject, where the object/subject are indexed by object id from previous object lists as well as the object names. Also, several region description are given, each describing a box region of image, with detailed coordinates.
|
| 386 |
+
|
| 387 |
+
The task is to use the provided image information (objects, attribute, relationship, region description, captions), create a plausible and challenging question about the image, and provide the answer in detail.
|
| 388 |
+
|
| 389 |
+
Create questions that refer to coordinates of some objects or regions without describing it, and ask about its interaction with surrounding/nearby objects.
|
| 390 |
+
|
| 391 |
+
To answer such questions, one should require first understanding the visual content, then based on the spatial information provided.
|
| 392 |
+
|
| 393 |
+
Here are some additional requirements about generated questions and answers:
|
| 394 |
+
|
| 395 |
+
1. In question, you must mention bounding box coordinates to refer to the object or regions, instead of directly say the object name or describing the regions in text. In answers, explain the region in the context of scene. Include details like object counts, position of the objects, relative position between the objects.
|
| 396 |
+
|
| 397 |
+
2. Don’t ask the question you are not confident to answer. Only include question that have definite answer.
|
| 398 |
+
|
| 399 |
+
3. Do not mention that the information source is provided in text/catpion/region description. Always answer as if you are directly looking at the image.
|
| 400 |
+
|
| 401 |
+
4. Don’t mention additional coordinates in the answer.
|
| 402 |
+
|
| 403 |
+
5. Question should be explicitly ask about context/surrounding/nearby information/interaction.”’} for sample in fewshot samples: messages.append({"role":"user", "content":sample[‘context’]}) messages.append({"role":"assistant", "content":sample[‘response’]} messages.append({"role":"user", "content":‘\n’.join(query)})
|
| 404 |
+
|
| 405 |
+
Table 16: One example of GPT4’s answers about referring description.
|
| 406 |
+
|
| 407 |
+
# Conversation
|
| 408 |
+
|
| 409 |
+
Question:
|
| 410 |
+
|
| 411 |
+
Describe the region [0.102, 0.230, 0.578, 0.761] in the context of surrounding objects. Answer:
|
| 412 |
+
|
| 413 |
+
It’s a man in the region, who is standing on top of a skateboard, performing a rail grind over a metal hand rail. There is a bench and a tree near him. Also, he is in front of some buildings.
|
| 414 |
+
|
| 415 |
+

|
| 416 |
+
|
| 417 |
+
# E MORE VISUALIZATION
|
| 418 |
+
|
| 419 |
+
We provide more quantitative results of the predictions under various tasks from Ferret to indicate the model’s strength and capability.
|
| 420 |
+
|
| 421 |
+
• Please refer to Figure 5 for Referring Object Classification on LVIS with different referring formats (point/box/).
|
| 422 |
+
• Please refer to Figure 6 for Visual Grounding on Flickr30k Entities and Referring Expression Comprehension on RefCOCO/RefCOCO $^ +$ /RefCOCOg.
|
| 423 |
+
• Please refer to Figure 7 for Grounded Captioning on Flickr30k Karpathy split.
|
| 424 |
+
• Please refer to Figure 8 for Evaluating Object Hallucination (POPE) on COCO val split.
|
| 425 |
+
• Please refer to Table 17 for Referring Description in Ferret-Bench.
|
| 426 |
+
• Please refer to Table 18 for Referring Resoning in Ferret-Bench.
|
| 427 |
+
• Please refer to Table 19 for Grounding in Conversation in Ferret-Bench.
|
| 428 |
+
|
| 429 |
+
# Referring Object Classification (LVIS) – point
|
| 430 |
+
|
| 431 |
+

|
| 432 |
+
Figure 5: Referring Object Classification on LVIS. The task aims to classify specific region(s) in an image given by point/box/segmentation inputs.
|
| 433 |
+
|
| 434 |
+

|
| 435 |
+
Figure 6: Phrase Grounding on Flickr30k Entities and Referring Expression Comprehension on RefCOCO/RefCOCO $+ \prime$ /RefCOCOg. The tasks aim to localize specific object(s) in an image described by a referring expression/given entity.
|
| 436 |
+
|
| 437 |
+

|
| 438 |
+
Figure 7: Grounded Captioning on Flickr30k. The task aims to generate a caption about the image and ground all generated noun phrases to image regions.
|
| 439 |
+
|
| 440 |
+

|
| 441 |
+
Figure 8: Object Hallucination Evaluation (POPE) on COCO. The task aims to input a query inquiring about the existence of an object, and the model is expected to generate a response in the form of either “yes/no”.
|
| 442 |
+
|
| 443 |
+
Table 17: Referring Description in Ferret-Bench. Qualitative examples to illustrate the difference between various models (LLaVA vs. Kosmos-2 vs. Shikra vs. Ferret (Ours)). For clarity, we have omitted the bounding box outputs in the textual representations.
|
| 444 |
+
|
| 445 |
+
# Question:
|
| 446 |
+
|
| 447 |
+
What is the interaction between the object [region0] and its surrounding objects?
|
| 448 |
+
|
| 449 |
+
# Ground Truth:
|
| 450 |
+
|
| 451 |
+
In the region, there is a metal support column. This column is providing support for a bridge above it, which a train is passing over. The column also features a red line on it. This region is part of a larger scene that includes a train track on an elevated bridge.
|
| 452 |
+
|
| 453 |
+

|
| 454 |
+
|
| 455 |
+
# LLaVA:
|
| 456 |
+
|
| 457 |
+
The object is a bridge which appears to be a part of a train station, as there are traffic lights present in the scene. The traffic lights are likely used to control the train’s movement and ensure safe passage over the bridge.
|
| 458 |
+
|
| 459 |
+
# Kosmos-2:
|
| 460 |
+
|
| 461 |
+
The interaction between the object and its surroundings is that of a train passing over a bridge.
|
| 462 |
+
|
| 463 |
+
# Shikra:
|
| 464 |
+
|
| 465 |
+
The metal pole is standing tall and straight, supporting the train that is traveling on the elevated track.
|
| 466 |
+
|
| 467 |
+
# Ferret (Ours):
|
| 468 |
+
|
| 469 |
+
The object is a metal post that is part of a bridge. This post is essential because it supports the bridge structure, ensuring its stability for the train to safely traverse the bridge. Other elements such as the train, and the overhead guard rail, depend on this post for support and stability. Without this post, the bridge wouldn’t be able to withstand the train’s weight and motion, potentially leading to a structural collapse. Therefore, this post plays a critical role in maintaining the bridge’s integrity and stability.
|
| 470 |
+
|
| 471 |
+
# Question:
|
| 472 |
+
|
| 473 |
+
What is the relationship between the object [region0] and object [region1] and its surrounding objects?
|
| 474 |
+
|
| 475 |
+
# Ground Truth:
|
| 476 |
+
|
| 477 |
+
The object is a vase, and the object is a flower. The flower is in the vase, suggesting it is a decorative element within the room.
|
| 478 |
+
|
| 479 |
+

|
| 480 |
+
|
| 481 |
+
LLaVA:
|
| 482 |
+
A wooden table with a green bowl placed on it. Kosmos-2:
|
| 483 |
+
The object is a vase with a green base.
|
| 484 |
+
Shikra:
|
| 485 |
+
The answer is flowers.
|
| 486 |
+
|
| 487 |
+
# Ferret (Ours):
|
| 488 |
+
|
| 489 |
+
The object and object are a vase and a flower, respectively. The vase is holding the flower, suggesting it’s displaying or supporting it.
|
| 490 |
+
|
| 491 |
+
Table 18: Referring Reasoning in Ferret-Bench. Qualitative examples to illustrate the difference between various models (LLaVA vs. Kosmos-2 vs. Shikra vs. Ferret (Ours)). For clarity, we have omitted the bounding box outputs in the textual representations.
|
| 492 |
+
|
| 493 |
+
# Question:
|
| 494 |
+
|
| 495 |
+
What is the purpose of the object [region0]?
|
| 496 |
+
|
| 497 |
+
# Ground Truth:
|
| 498 |
+
|
| 499 |
+
The object is a bottle. Bottles are typically used to hold and store different types of liquids. In this context, it might be used to store a beverage for the meal.
|
| 500 |
+
|
| 501 |
+

|
| 502 |
+
|
| 503 |
+
# LLaVA:
|
| 504 |
+
|
| 505 |
+
A knife and a fork, indicating that it is ready for a meal.
|
| 506 |
+
|
| 507 |
+
The purpose of the object is to attract the birds to the table.
|
| 508 |
+
|
| 509 |
+
Shikra: The answer is keep birds away.
|
| 510 |
+
|
| 511 |
+
Ferret (Ours):
|
| 512 |
+
|
| 513 |
+
The object is a bottle, generally used to store and dispense liquids like water, juice, or other beverages.
|
| 514 |
+
|
| 515 |
+
# Question:
|
| 516 |
+
|
| 517 |
+
What is the purpose of the object [region0] on the bike?
|
| 518 |
+
|
| 519 |
+
# Ground Truth:
|
| 520 |
+
|
| 521 |
+
The object is a shock absorber on the bike. Its purpose is to absorb or dampen shock impulses. It does this by converting the kinetic energy of the shock into another form of energy which is then dissipated. In the context of the motorcycle, it is particularly useful in providing comfort and stability for the rider, especially when travelling over uneven or rough terrains.
|
| 522 |
+
|
| 523 |
+

|
| 524 |
+
|
| 525 |
+
# LLaVA:
|
| 526 |
+
|
| 527 |
+
A black and silver Kawasaki motorcycle which is likely used for transportation, commuting, leisure rides, or long-distance travel.
|
| 528 |
+
|
| 529 |
+
# Kosmos-2:
|
| 530 |
+
|
| 531 |
+
The purpose of the object on the motorcycle is to store and protect the motorcycle’s fuel tank.
|
| 532 |
+
|
| 533 |
+
Shikra: The answer is leg.
|
| 534 |
+
|
| 535 |
+
# Ferret (Ours):
|
| 536 |
+
|
| 537 |
+
The object is a shock absorber. This component is essential for the bike’s stability, providing a smoother ride by soaking up the impact from bumps and uneven surfaces. It significantly improves the overall performance and comfort of the bike, enabling the rider to maintain control and stability even on rough terrains.
|
| 538 |
+
|
| 539 |
+
Table 19: Grounding in Conversation in Ferret-Bench. Qualitative examples to illustrate the difference between various models (Kosmos-2 vs. Shikra vs. Ferret (Ours)). For clarity, we only display the bounding box outputs in Ferret ’s responses.
|
| 540 |
+
|
| 541 |
+
# Question:
|
| 542 |
+
|
| 543 |
+
What is happening in the field and provide the coordinates of mentioned objects?
|
| 544 |
+
|
| 545 |
+
# Ground Truth:
|
| 546 |
+
|
| 547 |
+
In the image, there is a group of sheep [box0] [box1] grazing in a field [box2]. The field is filled with plant life [box3]. There is also a bush [box4] and some trees [box5] present in the field.
|
| 548 |
+
|
| 549 |
+

|
| 550 |
+
|
| 551 |
+
# Kosmos-2:
|
| 552 |
+
|
| 553 |
+
In the field, a herd of sheep [box0] is grazing on the lush green grass [box1].
|
| 554 |
+
|
| 555 |
+
# Shikra:
|
| 556 |
+
|
| 557 |
+
A group of sheep [box0] [box1] [box2] [box3] [box4] [box5] grazing on lush green grass.
|
| 558 |
+
|
| 559 |
+
# Ferret (Ours):
|
| 560 |
+
|
| 561 |
+
In the field, there are sheep [box0] [box1] [box2] [box3] [box4] [box5] grazing on the grass [box6].
|
| 562 |
+
|
| 563 |
+
# Question:
|
| 564 |
+
|
| 565 |
+
What is the man doing and what objects are in front of him? Please provide the coordinates of these objects.
|
| 566 |
+
|
| 567 |
+

|
| 568 |
+
|
| 569 |
+
# Ground Truth:
|
| 570 |
+
|
| 571 |
+
The man [box0] is sitting at a table [box1] and looking at a plate of food [box2] . There is a glass [box3] and a bottle [box4] on the table in front of him.
|
| 572 |
+
|
| 573 |
+
# Kosmos-2:
|
| 574 |
+
|
| 575 |
+
The man is sitting at a dining table [box0] smiling and looking at the plate of food in front him [box1].
|
| 576 |
+
|
| 577 |
+
# Shikra:
|
| 578 |
+
|
| 579 |
+
The man [box0] is sitting at a table [box1] with a plate of food [box2] in front of him. He is looking up and smiling, possibly staring at a person [box0] in the restaurant
|
| 580 |
+
|
| 581 |
+
# Ferret (Ours):
|
| 582 |
+
|
| 583 |
+
The man [box0] is having a meal at a table [box1]. In front of him, there is a plate [box2] with a variety of food items such as fruit and eggs. There is also a glass [box3] filled with water and a bottle [box4].
|
parse/test/2msbbX3ydD/2msbbX3ydD_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/2msbbX3ydD/2msbbX3ydD_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/2msbbX3ydD/2msbbX3ydD_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/3xHDeA8Noi/3xHDeA8Noi.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/3xHDeA8Noi/3xHDeA8Noi_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/3xHDeA8Noi/3xHDeA8Noi_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/3xHDeA8Noi/3xHDeA8Noi_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/BWSTBrmRqD/BWSTBrmRqD.md
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DOMINO: A DUAL-SYSTEM FOR MULTI-STEP VISUAL LANGUAGE REASONING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Visual language reasoning requires a system to extract text or numbers from information-dense images like charts or plots and perform logical or arithmetic reasoning to arrive at an answer. To tackle this task, existing work relies on either (1) an end-to-end vision-language model trained on a large amount of data, or (2) a two-stage pipeline where a captioning model converts the image into text that is further read by another large language model to deduce the answer. However, the former approach forces the model to answer a complex question with one single step, and the latter approach is prone to inaccurate or distracting information in the converted text that can confuse the language model. In this work, we propose a dual-system for multi-step multimodal reasoning, which consists of a “System-1” step for visual information extraction and a “System-2” step for deliberate reasoning. Given an input, System-2 breaks down the question into atomic sub-steps, each guiding System-1 to extract the information required for reasoning from the image. Experiments on chart and plot datasets show that our method with a pre-trained System-2 module performs competitively compared to prior work on in- and out-of-distribution data. By fine-tuning the System-2 module (LLaMA-2 70B) on only a small amount of data on multi-step reasoning, the accuracy of our method is further improved and surpasses the best fully-supervised end-to-end approach by $5 . 7 \%$ and a pipeline approach with FlanPaLM (540B) by $7 . 5 \%$ on a challenging dataset with human-authored questions.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Visual language reasoning for tasks such as question answering over charts/plots is computationally challenging: it requires (1) multi-step reasoning to decompose the original complex question, (2) extracting numbers or text from the information-dense images, and (3) performing arithmetic or logical reasoning to derive the final answer. Recent work on visual language reasoning has investigated both end-to-end and pipeline approaches. In the end-to-end approach (Lee et al., 2023; Liu et al., 2023b), a visual transformer is trained on a large amount of labeled data to answer questions based on images with a single step of inference. In the pipeline approach (Liu et al., 2023a), an off-the-shelf captioning model first converts the chart/plot into a linearized table. A text-only large language model (LLM) is then prompted to conduct chain-of-thought reasoning over the linearized table. The first approach empowers a unified model to accommodate both vision and language modalities, but struggles with questions requiring complex reasoning (Hoque et al., 2022). The second approach leverages the multi-step reasoning capabilities of LLMs on the verbalized table information. However, this conversion is prone to loss or distortion of information needed for reasoning (e.g., missing information about colors used in the plot). It also burdens the system unnecessarily as the linearized table is generated regardless of the question and thus may contain irrelevant information.
|
| 12 |
+
|
| 13 |
+
Inspired by the dual process theories of reasoning from cognitive science (Evans, 2003), in this work we present a dual-system for multi-step visual language reasoning called DOMINO. In particular, we use the notions of System-1 and System-2 processing in human brain introduced by Kahneman (2011), where System-1 corresponds to intuitive and habitual processing and System-2 refers to deliberate and controlled reasoning (Goyal & Bengio, 2022). Similarly, DOMINO alternates between two key modules, System-1 and System-2, to perform the task. In our context, System-1, realized as a visual reader, is responsible for intuitively extracting visual information from the image. System-2 which is implemented as an LLM reasoner, is responsible for more deliberate inference by conducting multi-step reasoning for task decomposition, commonsense reasoning, and logical or mathematical operations for answer derivation. More specifically, given an image of a chart and a textual question (see Figure 1 for an illustration), System-2 decomposes the task into a sequence of steps (sub-tasks). For certain intermediate steps, System-1 is guided to obtain the visual information from the image. With the intermediate result extracted by System-1, System-2 either performs the next-step reasoning or derives the answer with all the available information. Throughout the process, DOMINO asks System-1 to obtain visual information when needed, instead of captioning the whole image at once, and thus allows more interactions between the two modalities.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: Overview of DOMINO, which alternates between System-2 (a prompted LLM) and System-1 (a visual encoder-text decoder) to answer complex questions over charts. The text in blue callouts are generated by System-2. The text in green callouts are generated by System-1 and appended to the generation sequence of System-2 directly. The chart and the question are from ChartQA (Masry et al., 2022).
|
| 17 |
+
|
| 18 |
+
We build System-1 based on a pre-trained visual language model Liu et al. (2023a) suited for chart understanding, which takes an image and a query from System-2 as input and returns the intermediate result. To further customize System-1 to the target data domain, we create a synthetic training set that contains different atomic operations over an image of a chart/plot (e.g., extract the value of Macy’s in 2019 from Figure 1) using templates. To implement System-2, we adopt an LLM in order to utilize its emergent reasoning capabilities. To adjust System-2 to conduct visual-language reasoning, we explore both few-shot prompting and fine-tuning with a handful of annotated examples.
|
| 19 |
+
|
| 20 |
+
We conduct experiments on several question answering tasks over charts/plots including ChartQA (Masry et al., 2022), PlotQA (Methani et al., 2020), DVQA (Kafle et al., 2018) and FigureQA (Kahou et al., 2018). The results show that without fine-tuning the LLM, DOMINO outperforms the pipeline approach using few-shot methods on both in- and out-of-distribution data. With only 100 training examples, DOMINO even outperforms the best fully-supervised method by $5 . 7 \%$ in accuracy on ChartQA that requires more deliberate reasoning. Further analysis shows that: (1) The intermediate results are essential to the success of our method. (2) System-2 benefits more from learning task decomposition when the questions are arbitrary and natural but more from learning answer deduction when the questions are restricted in type. (3) DOMINO is more robust in handling complex charts. (4) Fine-tuning the LLM on interacting with vision is more data-efficient than finetuning the LLM on table reasoning.
|
| 21 |
+
|
| 22 |
+
# 2 RELATED WORK
|
| 23 |
+
|
| 24 |
+
Visual language reasoning and question answering is an active area of research (Kafle et al., 2018; Kahou et al., 2018; Chaudhry et al., 2019; Methani et al., 2020; Masry et al., 2022). This is a special case of multimodal reasoning tasks that requires understanding an information-intense image and performing multi-step arithmetic or logical reasoning to derive an answer to complex questions. Recent work on visual language question answering focusing on charts/plots has investigated both supervised end-to-end and pipeline approaches.
|
| 25 |
+
|
| 26 |
+
Supervised VQA. Among supervised approaches, PReFIL (Kafle et al., 2020) allows for OCR integration and uses different recurrent and dense models to encode text and image inputs separately which are then fused and fed to a classifier for obtaining an answer. More recently, visual transformers are trained on a large amount of labeled data to answer questions based on images with different training objectives. PaLI (Chen et al., 2023b) and PaLI-X (Chen et al., 2023a) use OCR-aware pretraining objectives where the model predicts texts obtained from some OCR system. Similarly, ChartBERT (Akhtar et al., 2023) uses OCR text and positions to train a transformer encoder. Using OCR systems, however, adds computational cost and falls short on cases where the charts/plots do not have numbers and texts written explicitly (Liu et al., 2023b). Pix2Struct (Lee et al., 2023) and MATCHA (Liu et al., 2023b) are end-to-end models for visual language, where Pix2Struct provides generic checkpoints for different visual language tasks and MATCHA further fine-tunes Pix2Struct with new pretraining objects for chart derendering and mathematical reasoning. ChartT5 (Zhou et al., 2023b) learns to interpret table information from chart images via cross-modal pre-training on plot table pairs with masked header prediction and masked value prediction pre-training objectives. UniChart (Masry et al., 2023) also considers an encoder-decoder architecture and considers different pretraining objectives for low-level and high-level tasks. These approaches empower a unified model to accommodate both vision and language modalities, but struggle with questions requiring complex reasoning (Hoque et al., 2022). Unlike the supervised approches that force the model to answer the question with one single step, DOMINO leverages an LLM for multi-step reasoning.
|
| 27 |
+
|
| 28 |
+
Pipelined VQA. The pipeline approach, on the other hand, divides the task into two steps consisting of 1) information extraction or chart derendering and 2) question answering. There are different approaches to extract information from charts: some approaches combine OCR, object detection/segmentation techniques and/or heuristic rules for extracting information (Jung et al., 2017; Balaji et al., 2018; Luo et al., 2021; Akhtar et al., 2023), while others use a deep model to either extract different chart components (Cheng et al., 2023a) or convert the input chart to a textual table (Liu et al., 2023a). The resulting output is then reasoned over for question answering using table-to-text models (Andrejczuk et al., 2022), specialized models (Cheng et al., 2023a), large language models (Chen, 2023; Liu et al., 2023a), or code models combined with program executors (Chen et al., 2022; Cheng et al., 2023b). Different from these approaches, DOMINO interleaves and alternates between information extraction (System-1) and task decomposition and reasoning (System-2).
|
| 29 |
+
|
| 30 |
+
# 3 DOMINO
|
| 31 |
+
|
| 32 |
+
DOMINO is a dual-system for multi-step visual language reasoning. Unlike the end-to-end approach that uses one unified model to answer questions with one single step, DOMINO leverages an LLM to solve questions that require multi-step reasoning. Unlike the few-shot pipeline approach that converts a whole chart into a table, DOMINO only obtains information from the chart contextualized by one reasoning step at a time, thus allowing more interactions between the textual and visual modalities.
|
| 33 |
+
|
| 34 |
+
Figure 1 illustrates the workflow of DOMINO. Given an image of the chart $c$ and a textual question $q _ { 0 }$ , DOMINO alternates between both modules to deduce the answer $a$ step by step. Taking the original question $q _ { 0 }$ , and potentially the previous reasoning steps as input, System-2 either generates the next query $q _ { i }$ $( i > 0$ ) to System-1 to obtain an intermediate result $a _ { i }$ or answers the question by synthesizing all the intermediate results $\left\{ q _ { i } , a _ { i } \right\}$ . Guided by System-2, System-1 takes the chart $c$ and the query $q _ { i }$ as input and returns the intermediate result $a _ { i }$ . We describe each module below.
|
| 35 |
+
|
| 36 |
+
# 3.1 SYSTEM-1
|
| 37 |
+
|
| 38 |
+
Our System-1 is responsible for the intuitive part of visual language reasoning, i.e., extracting information from the chart/plot. We implement System-1 as a vision encoder-text decoder Transformer model (Lee et al., 2023). Given a chart $c$ and a textual query $q _ { i }$ from System-2, the visual encoder first represents the chart as a sequence of patch embeddings. Then the query $q _ { i }$ is fed as the prefix of the text decoder to guide System-1 to generate the answer $a _ { i }$ by decoding from $P ( a _ { i } | c , q _ { i } )$ .
|
| 39 |
+
|
| 40 |
+
Atomic Operations We define the following list of atomic operations that are needed to extract information from charts/plots in general. These operations facilitate the interaction between System
|
| 41 |
+
|
| 42 |
+
2 and System-1. System-2 can choose to flexibly combine these atomic operations according to the reasoning structure, whereas System-1 can execute these operations individually.
|
| 43 |
+
|
| 44 |
+
Describe: Since System-2 is a text-only LLM and does not access the chart directly, it is challenging for System-2 to generate valid queries that are grounded to the chart. For example, it may ask for a data point that does not exist in the chart. To avoid such hallucinating behavior, we define our first atomic operation Describe, which allows System-2 to get a high-level description of the chart. When receiving this query, System-1 responds with the key elements that are visualized in the chart (see the first green callout from System-1 in Figure 1 for an example). We let System-2 always use Describe as the first reasoning step since it is vital for System-2 to ask valid queries in the following steps. Extract-Point: This atomic operation is designed to allow System-2 to obtain the value of a specific data point, e.g., extract the value of Macy’s in 2019, which is usually required for questions like “What is the difference between Macy’s and Bloomingdale’s in 2019?”. When receiving this query, System-1 only needs to extract one single value from the chart, which is more efficient than the pipeline approach which would extract all values. Extract-Group: The last atomic operation is designed to allow System-2 to obtain the values of a certain group, e.g., extract the value of Macy’s, which is required for questions like “What is the maximum value of Macy’s across all years?”. When receiving this query, System-1 returns all the values of Macy’s.
|
| 45 |
+
|
| 46 |
+
Training For each type of atomic operation, we generate the query-answer pairs $\left\{ q _ { i } , a _ { i } \right\}$ automatically based on available annotated data using templates (detailed in the experiment section). Table 6 in appendix $\ S \ \mathrm { A } . 1 . 2$ shows the examples of these query-answer pairs. We then train System-1 by applying the standard language modeling loss on the answer spans.
|
| 47 |
+
|
| 48 |
+
# 3.2 SYSTEM-2
|
| 49 |
+
|
| 50 |
+
Answering questions over charts/plots usually involves complex reasoning such as arithmetic and logical operations (taking the sum, finding the maximum, comparing values, etc.) (Masry et al., 2022). Due to their strong capability in step-by-step reasoning Wei et al. (2022), we adopt LLMs as System-2 for task decomposition.
|
| 51 |
+
|
| 52 |
+
Workflow Figure 1 illustrates the whole workflow of System-2. Given an originally complex question $q _ { 0 }$ , and optionally the previous reasoning steps $\{ q _ { i } , a _ { i } \}$ , System-2 can select one of the atomic operations to ask a further query $q _ { i + 1 }$ from System-1 or deduce the answer $a$ as the final step. If a further query $q _ { i + 1 }$ is generated, e.g., “Let’s extract the value of Bloomingdale’s in 2019.”, we feed $q _ { i + 1 }$ alone to System-1 for obtaining the intermediate result $a _ { i + 1 }$ , e.g., “The value is $5 5 '$ . Then we append $a _ { i + 1 }$ back to the current generation sequence of System-2 which continues to generate the next step. If System-2 acquires all the required information, it would conduct chain-of-thought reasoning to synthesize all the information to deduce the final answer $a$ , e.g., “The difference between ... So the answer is 558.”.
|
| 53 |
+
|
| 54 |
+
Learning to Decompose We now describe how to adapt an LLM to compose the atomic operations defined above to collect all the information required for answering a complex question over a chart. We explore both prompting-only and prompting+fine-tuning as two means of adaptation.
|
| 55 |
+
|
| 56 |
+
• Prompting-only: We use few-shot prompting to adapt an LLM to conduct visual language reasoning by interacting with System-1. In the prompt, each example consists of a question $q$ , the intermediate reasoning steps $\left\{ q _ { i } , a _ { i } \right\}$ , and finally a concluding sentence ending with the answer $a$ (see Figure 1 for the format of the prompt and Appendix $\ S \ A . 2$ for the full prompt we used). • Prompting $^ +$ fine-tuning: Recent works show that with minor fine-tuning, the reasoning capability of an LLM can be greatly enhanced (Yu et al., 2023; Zhou et al., 2023a). We take inspiration from this observation and study how much we can improve the performance of DOMINO by fine-tuning System-2 with only a few $< = 1 0 0$ ) training examples. Through fine-tuning, we aim to teach System-2 to both (1) decompose the task and (2) deduce the answer. During training, we only apply the language modeling loss on the text that is supposed to be generated by System-2 during the inference time — i.e., the query spans $q _ { i }$ and the final concluding sentence leading to $a$ . This is to avoid teaching System-2 to hallucinate the parts that should be generated by System-1, i.e., the intermediate answers $a _ { i }$ . During inference, we still provide the few-shot prompt to System-2 as we find this leads to a better performance of DOMINO overall.
|
| 57 |
+
|
| 58 |
+
# 4 EXPERIMENTAL SETUP
|
| 59 |
+
|
| 60 |
+
# 4.1 DATASETS
|
| 61 |
+
|
| 62 |
+
For fine-tuning and evaluation we use the ChartQA (Masry et al., 2022) and PlotQA (Methani et al., 2020) datasets. ChartQA has two subsets. One is machine generated (marked with augmented) and the other is human written (marked with human) which requires more complex reasoning. PlotQA also has two sets: v1 (mostly focused on extractive questions) and v2 (requires more numerical reasoning), both of which are machine generated. Details of each dataset are reported in Appendix A.1. For fine-tuning System-1, we use samples from training sets of these datasets along with templates for each of the Describe, Extract-Point, and Extract-Group atomic operations to generate the training data. See Appendix A.1.2 for examples of templates and generated data. For fine-tuning System-2, we collect 100 high-quality question decomposition and reasoning examples. More specifically, we sample diverse charts/questions from the training sets of ChartQA and PlotQA and ask an annotator to decompose each complex question into atomic operations and deduce the answer. See Appendix A.1.3 for examples of the collected data.
|
| 63 |
+
|
| 64 |
+
Since parts of the training sets of ChartQA and PlotQA are used during the fine-tuning stage, we also evaluate DOMINO on two additional datasets that were not used during fine-tuning: DVQA (Kafle et al., 2018) and FigureQA (Kahou et al., 2018). Both of these datasets include chart images from synthetic tables that are randomly generated from limited vocabularies. FigureQA has yes/no answers whereas DVQA contains open ended questions where many refer to texts specific to the corresponding charts. While DVQA only includes bar charts, FigureQA additionally includes line graphs and pie charts. For all synthetic datasets (i.e., PlotQA, DVQA, and FigureQA), we randomly sample 10K examples and use this set for evaluation.
|
| 65 |
+
|
| 66 |
+
# 4.2 TRAINING DETAILS
|
| 67 |
+
|
| 68 |
+
For System-1, we use DePlot as the backbone visual language model and fine-tune it on the synthetic dataset we created for atomic operations. We generate a total of 774, 019 examples using templates with the ChartQA and PlotQA training sets (17, 014 for Describe, 362, 955 for Extract-Point, and 273, 657 for Extract-Group. In Appendix A.1.2 we have provided some examples of the generated data. We set the batch size as 256, the learning rate as $1 e - 5$ and the training steps as 10K. For System-2, we use the 70B variant of the recently published LLaMA-2 (Touvron et al., 2023) family of models. Since we only use a handful of expert-annotated training examples $\Longleftarrow 1 0 0$ ), we use a very small batch size of 8 and set the learning rate as $1 e - 6$ . We train for a maximum optimization steps of 20 and apply the language modeling loss on the text generated only by System-2 as discussed in $\ S 3 . 2$ .
|
| 69 |
+
|
| 70 |
+
# 4.3 BASELINE MODELS AND EVALUATION METRICS
|
| 71 |
+
|
| 72 |
+
To evaluate the ability of DOMINO for answering complex questions about charts/plots, we compare it with several fully-supervised end-to-end approaches as well as the pipeline approach that first converts the chart/plot to a table and then reasons over the table step-by-step. Similar to prior work (e.g., (Liu et al., 2023a)), we report “relaxed accuracy” which computes exact match for textual responses but allows a $5 \%$ tolerance for numeric answers. We compare DOMINO against the following strong baselines:
|
| 73 |
+
|
| 74 |
+
Fully-Supervised We consider the following state-of-the-art supervised approaches which were discussed in $\ S 2$ : ChartT5 (Zhou et al., 2023b), Pix2Struct (Lee et al., 2023), MATCHA (Liu et al., 2023b), UniChart (Masry et al., 2023), and PaLI-X (Chen et al., 2023a).
|
| 75 |
+
|
| 76 |
+
Few-shot DePlot DePlot (Liu et al., 2023a) is a pipeline approach where a model is first trained to translate an image to a textual table, and then different LLMs are used to reason over the table via few-shot learning with Chain-of-Thought (CoT) prompting (Wei et al., 2022). We compare against this model with the following LLMs: GPT3 (Brown et al., 2020), FlanPaLM (540B) (Chung et al., 2022), LLaMa-2 (70B) (Touvron et al., 2023), and GPT4 (OpenAI, 2023). Following Liu et al. (2023a), we adopt both (1) sampling and (2) self-consistency (SC) decoding (Wang et al., 2023), which samples a set of generations and chooses the majority-voted answer, and use a temperature of 0.4. The 1-Shot prompt used in DePlot consists of 1 table with 5 question-answer pairs. However, this may mislead the LLM to assume that the new question is from the same context since we do not have any tables in the prompt. To align with our method, we also experiment with a 5-Shot prompt consisting of 5 tables, each with 1 question-answer pair (see Appendix A.2).
|
| 77 |
+
|
| 78 |
+
Table 1: Main results of the compared methods on downstream tasks. Best numbers are in bold and second best numbers are underlined. We re-evaluate the DePlot model with GPT-3 on our sampled subsets of PlotQA (marked by ∗). The results for other baselines (if available) are from the papers cited in the table. The 1-Shot prompt used in DePlot consists of 1 table with 5 question-answer pairs, while the 5-Shot prompt we use consists of 5 tables with 1 question-answer pair each.
|
| 79 |
+
|
| 80 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">ChartQA</td><td colspan="3">PlotQA</td></tr><tr><td>Aug.</td><td>Human</td><td>Avg.</td><td>V1</td><td>V2</td><td>Avg.</td></tr><tr><td>Fully-Supervised</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ChartT5 (Zhou et al.,2023b)</td><td>74.4</td><td>31.8</td><td>53.2</td><td></td><td>=</td><td>=</td></tr><tr><td>Pix2Struct (Lee et al., 2023)</td><td>81.6</td><td>30.5</td><td>56.1</td><td>73.2</td><td>71.9</td><td>72.6</td></tr><tr><td>MATCHA (Liu et al., 2023b)</td><td>90.2</td><td>38.2</td><td>64.2</td><td>92.3</td><td>90.7</td><td>91.5</td></tr><tr><td>UniChart (Masry et al.,2023)</td><td>88.6</td><td>43.9</td><td>66.2</td><td>1</td><td></td><td></td></tr><tr><td>PaLI-X (Chen et al.,2023a)</td><td>1</td><td></td><td>70.9</td><td>1</td><td>=</td><td>=</td></tr><tr><td>PaLI-X with OCR (Chen et al.,2023a)</td><td>1</td><td>=</td><td>72.3</td><td></td><td>=</td><td>=</td></tr><tr><td>Few-Shot DePlot</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>GPT3 (1-Shot) (Liu et al.,2023a)</td><td>37.3</td><td>36.5</td><td>36.9</td><td>*31.6</td><td>*42.2</td><td>*36.9</td></tr><tr><td>FlanPaLM (540B) (1-Shot) (Liu et al.,2023a)</td><td>76.7</td><td>57.8</td><td>67.3</td><td>51.3</td><td>44.9</td><td>48.1</td></tr><tr><td>FlanPaLM (540B) (1-Shot, SC) (Liu et al.,2023a)</td><td>78.8</td><td>62.2</td><td>70.5</td><td>57.8</td><td>50.1</td><td>53.9</td></tr><tr><td>LLaMA-2 (70B) (1-Shot)</td><td>86.5</td><td>53.5</td><td>70.0</td><td>32.5</td><td>43.4</td><td>37.9</td></tr><tr><td>GPT4 (5-Shot)</td><td>83.8</td><td>61.4</td><td>72.6</td><td></td><td>-</td><td>-</td></tr><tr><td>LLaMA-2 (70B) (5-Shot)</td><td>87.4</td><td>59.4</td><td>73.4</td><td>43.2</td><td>44.7</td><td>43.9</td></tr><tr><td>Other Pipeline Approaches</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ChartReader (Cheng et al., 2023a)</td><td></td><td></td><td>52.6</td><td>78.1</td><td>59.3</td><td>68.7</td></tr><tr><td>DOMINO (our method)</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LLaMA-2 (70B) (5-Shot)</td><td>88.6</td><td>59.3</td><td>74.0</td><td>53.1</td><td>59.0</td><td>56.1</td></tr><tr><td>- without Describe</td><td>77.4</td><td>45.6</td><td>61.5</td><td>40.5</td><td>62.7</td><td>51.6</td></tr><tr><td>LlaMa-2 (70B) (5-Shot, SC)</td><td>90.3</td><td>61.4</td><td>75.8</td><td>57.3</td><td>71.3</td><td>64.3</td></tr><tr><td>Fine-tuned LLaMA-2 (70B) (5-shot)</td><td>91.7</td><td>61.7</td><td>76.7</td><td>55.1</td><td>71.3</td><td>63.2</td></tr><tr><td>Fine-tuned LLaMA-2 (70B) (5-shot, SC)</td><td>91.8</td><td>64.1</td><td>78.0</td><td>58.9</td><td>80.7</td><td>69.8</td></tr></table>
|
| 81 |
+
|
| 82 |
+
# 5 MAIN RESULTS
|
| 83 |
+
|
| 84 |
+
Table 1 reports the results of comparing our method against fully-supervised and pipeline methods on ChartQA and PlotQA. We observe that: (1) Without fine-tuning, DOMINO already outperforms the best fully-supervised method (PaLI-X with OCR) on the ChartQA dataset $( 7 2 . 3 \% $ $7 5 . 8 \%$ ), where the questions are more diverse and complex. This demonstrates the effectiveness of DOMINO in handling such questions by leveraging the strong language understanding and task decomposition capabilities of the LLM. The fully-supervised methods do perform better than both DePlot and DOMINO on PlotQA. This is because PlotQA is a synthetic dataset with templatebased and restricted types of questions. The fully-supervised methods can learn the bias in data encoded in the large training set (with over 100M examples) as pointed out by Liu et al. (2023a). (2) DOMINO also outperforms DePlot using either GPT3, LLaMA-2 (70B) or the much larger FlanPaLM (540B) model on both ChartQA and PlotQA, and DePlot with GPT4 on ChartQA1. This demonstrates the benefits of DOMINO which allows more interactions between the language and the vision components, and does not introduce redundant information as DePlot does when converting a chart into a table2. (3) With minor fine-tuning using only a handful of 100 examples annotated with the reasoning process, we can further improve the performance of DOMINO on both ChartQA and PlotQA. We study data efficiency in $\ S \ O 6$ . Notably, with self-consistency decoding, DOMINO outperforms the best fully-supervised method by $5 . { \dot { 7 } } \%$ in accuracy on ChartQA and we also observe a large performance boost $( 7 1 . 3 \% 8 0 . 7 \% )$ ) on PlotQA-V2 which contains more numerical reasoning questions.
|
| 85 |
+
|
| 86 |
+
Table 2: Experimental results of the compared methods on the out-of-distribution datasets. Best numbers are in bold and the second best numbers are underlined. Our results are reported on 10K random sample of the corresponding evaluation sets. The results for other baselines are from their papers as cited in the table.
|
| 87 |
+
|
| 88 |
+
<table><tr><td>Method</td><td>DVQA</td><td colspan="2">FigureQA</td></tr><tr><td></td><td>Test-Novel (Reasoning)</td><td>Val1</td><td>Val2</td></tr><tr><td colspan="4">Seen at Training</td></tr><tr><td>State-of-the-Art PReFIL (no OCR) (Kafle et al.,2020)</td><td></td><td></td><td></td></tr><tr><td>PReFIL (with OCR) (Kafle et al., 2020)</td><td>49.2 80.7</td><td>=</td><td>一</td></tr><tr><td>ChartReader (Cheng et al., 2023a)</td><td>1</td><td>95.5</td><td>95.8</td></tr><tr><td colspan="4"></td></tr><tr><td colspan="4">Unseen at Training</td></tr><tr><td>Few-Shot DePlot</td><td></td><td></td><td></td></tr><tr><td>LLaMA-2 (1-Shot)</td><td>40.3</td><td>55.6</td><td>55.7</td></tr><tr><td>LLaMA-2 (5-Shot)</td><td>54.2</td><td>61.6</td><td>61.2</td></tr><tr><td>DOMINO (our method)</td><td></td><td>63.2</td><td>62.7</td></tr><tr><td>LLaMA-2 (5-Shot)</td><td>55.2</td><td></td><td></td></tr><tr><td>Fine-tuned LLaMA-2 (5-shot)</td><td>55.4</td><td>64.7</td><td>64.4</td></tr></table>
|
| 89 |
+
|
| 90 |
+
In Table 2, we report the results of DePlot and DOMINO on out-of-distribution (OOD) datasets including DVQA and FigureQA, and compare them with fully-supervised methods. Here the OOD setting means that neither System-1 nor System-2 of DOMINO is fine-tuned on the experimented datasets. DOMINO does not outperform the supervised methods due to the synthetic nature of these datasets and the fact that both PReFIL and ChartReader were fine-tuned on the training partitions of DVQA and FigureQA, respectively. However, with regard to few-shot approaches, results show that DOMINO generalizes better than DePlot. Future work could enhance DOMINO with a more advanced vision module to improve generalization capabilities.
|
| 91 |
+
|
| 92 |
+
# 6 ANALYSIS & DISCUSSION
|
| 93 |
+
|
| 94 |
+
Effectiveness of image description in addressing hallucination In this ablation study, we investigate the effectiveness of the Describe operation in providing the initial context to System-2 so that System-2 asks valid queries afterwards. We prompt System-2 with examples where Describe is not used at all. The performance of the resulting DOMINO variant is shown in Table 1 (without Describe). We observe that discarding the Describe step generally leads to a considerable performance drop of DOMINO except on the PlotQA-V2 split. This demonstrates the effectiveness of the Describe step in providing the necessary context for System-2 to generate the right decomposition steps, especially when the questions are flexible in terms of wording and may not provide enough information for reasoning as the synthetic questions from PlotQA-V2 do.
|
| 95 |
+
|
| 96 |
+
Skills learnt from fine-tuning System-2 We see significant improvement by fine-tuning System-2 in Table 1 and would like to investigate how the skills learnt from fine-tuning, i.e., task decomposition and answer deduction, contribute differently to the overall performance. We fine-tune System-2 by applying the language modeling loss only on (1) the intermediate queries $\left\{ q _ { i } \right\}$ or (2) the concluding sentence leading to the final answer $a$ . The results are shown in Table 3, where we have opposite observations on ChartQA and PlotQA, which reveals that the supervision on the intermediate process is not always beneficial. On ChartQA, we see a larger performance drop from fine-tuning
|
| 97 |
+
|
| 98 |
+
Table 3: Ablation study on how the task decomposition and answer deduction skills learnt in finetuning contribute differently to the overall performance. Method indicates what the language modeling loss was applied to.
|
| 99 |
+
|
| 100 |
+
<table><tr><td rowspan="2">Method</td><td colspan="3">ChartQA</td><td colspan="3">PlotQA</td></tr><tr><td>Aug.</td><td>Human</td><td>Avg.</td><td>V1</td><td>V2</td><td>Avg.</td></tr><tr><td>Fine-tuned LLaMA-2</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Answering Steps</td><td>86.3</td><td>48.1</td><td>67.2</td><td>51.1</td><td>76.8</td><td>64.0</td></tr><tr><td>Decomposition Steps</td><td>87.6</td><td>56.6</td><td>72.1</td><td>48.5</td><td>76.0</td><td>62.3</td></tr><tr><td>Answering and Decomposition Steps</td><td>91.7</td><td>61.7</td><td>76.7</td><td>55.1</td><td>71.3</td><td>63.2</td></tr></table>
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Figure 2: Performance grouped by the complexity of the underlying tables of the charts. The x-axes show the length of the underlying table of a chart. The left y-axes show the ratios of the questions in each length interval indicated by the green bars.
|
| 104 |
+
|
| 105 |
+
System-2 only on answer deduction. This demonstrates that LLMs struggle with task decomposition more than answer deduction when the questions are more natural. On PlotQA, however, we see a larger performance drop coming from fine-tuning System-2 only on decomposition steps for V1 and even performance gains from fine-tuning System-2 only on answer deduction or decomposition steps for V2. This is because the question types in PlotQA are rather restricted and in this case the LLM benefits more from just learning how to deduce the answer.
|
| 106 |
+
|
| 107 |
+
Robustness in handling complex charts We investigate whether the multi-interplay between language and vision allows DOMINO to perform robustly on more complex charts. Here, we use the length of the underlying table of a chart as a measurement of its complexity, and accordingly group the accuracy scores of DePlot and DOMINO (with a frozen or fine-tuned System-2) by the table length as shown in Figure 2. We observe that DOMINO (either frozen or fine-tuned) performs consistently better than DePlot on increasingly complex charts. This verifies the downside of converting charts to tables before reasoning as done in DePlot as it introduces redundant information and is error-prone, especially when the chart is very complex. DOMINO does not have this issue as we only require System-1 to obtain the necessary information required by one reasoning step.
|
| 108 |
+
|
| 109 |
+
Data efficiency of reasoning-based fine-tuning We study how DOMINO performs across different amount of training data. As comparison, we also fine-tune the LLM in DePlot on the same examples but annotated with chain-of-thought on tables. The results are shown in Figure 3. We observe that fine-tuned DOMINO generally outperforms fine-tuned DePlot across different numbers of training examples. One thing to note is that we do need sufficient examples to elicit the reasoning capabilities from the LLM so that it can outperform the frozen LLM (over 50 for PlotQA-V1 and over 20 for PlotQA-V2). Meanwhile, fine-tuning System-2 does not hurt DOMINO’s OOD performance on DVQA, regardless of the number of training examples. In comparison, fine-tuning DePlot leads to worse OOD performance when more than 10 training examples are used.
|
| 110 |
+
|
| 111 |
+
Inference efficiency Although there may be multiple calls to the vision module in DOMINO, DOMINO is more efficient compared to the few-shot DePlot model due to two reasons: (1) The vision module in DOMINO only needs to generate the required information based on the image while the vision module in DePlot needs to generate the whole table, which can be arbitrarily long. (2) As a result of (1), DOMINO does not need to take as input the whole table sequence which would consume a large part of the context window in the LM of DePlot.
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 3: Ablation study on how number of fine-tuning examples affects performance of the LLM. The LLM in both methods are not fine-tuned when the number of training examples equals to 0.
|
| 115 |
+
|
| 116 |
+
Table 4: Case studies on ChartQA-human. The underlined text represents the errors made by the models. See Appendix A.3 for associated charts.
|
| 117 |
+
|
| 118 |
+
<table><tr><td>Chart Se Whiarstleti dada ndieretageg</td><td>Chart: See Figure 4 right in appendix. Qdstion: Whatisertysofpople inPilipins</td></tr><tr><td rowspan="3">Deplot Generated Table: Country 丨 Expenditures on general government outsourcing (%GDP) Germany 113.4 Norway|9.41 Turkeyi7.54</td><td>DOMINO (frozen)</td></tr><tr><td>Let's describe the figure. The figure shows the data of: Share of people...</td></tr><tr><td>The x-axis shows: Malaysia | Philippines I Ghana | Switzerland. of Share of people...</td></tr><tr><td rowspan="3">Grnerated CoT:Let's find the rowof Turkey, hat'sRow 4.Let’s find the number for Turkey,that's 7.11. The answer is 7.11.X DOMINO (frozen)</td><td></td></tr><tr><td>The data is 27.58. The average share of people in Philippines and Ghana who ... is (27.58+27.58)/2=27.58.So theanswer is 27.58.X</td></tr><tr><td>DOMINO (fine-tuned)</td></tr><tr><td>The figure shows the dataof: Expenditures on general government outsourcing (dark blue). The x-axis shows: Germany |Norway|Turkey Greece.</td><td>... # same description as DOMINO (frozen) Let's extract the data of Share of people who... BY Philippines.</td></tr><tr><td></td><td>The data is 38.92. Let's extract the dataof Share of people who... BY Ghana.</td></tr><tr><td>The data is 7.54.</td><td></td></tr><tr><td>Theanswer is7.54.√</td><td>The data is 27.58. The average is (38.92+27.58)/2=33.25.So the answeris 33.25.√</td></tr></table>
|
| 119 |
+
|
| 120 |
+
Error Analysis Since PlotQA is a synthetic dataset, we have information about the template types that were used to generate questions. Appendix Table 7 shows the breakdown of errors per template type for the PlotQA-V2 dataset. Across all template types we see that DOMINO yields improvements, but the most significant reductions in errors are for questions that require reasoning (i.e., arithmetic, compound, comparison, min-max) where we see reductions of $4 5 \%$ to $6 8 \%$ in errors when comparing the fine-tuned model against the DePlot model.
|
| 121 |
+
|
| 122 |
+
To illustrate the difference between different models, Table 4 shows examples from the ChartQAhuman set. Table 4 (left) shows an example where DePlot correctly predicts the underlying table of the chart yet fails to extract the right value from the table due to the redundant information. By contrast, DOMINO only extracts the necessary information by generating a specific query to System-1 and thus answers correctly. Table 4 (right) shows an example where System-2 of DOMINO fails to leverage the information from the previous reasoning step (that Philippines and Ghana are two data groups in the chart) and thus generates an invalid query to System-1. Through fine-tuning, System-2 learns to properly decompose the question and generates the right queries to obtain the intermediate results.
|
| 123 |
+
|
| 124 |
+
# 7 CONCLUSION
|
| 125 |
+
|
| 126 |
+
In this paper, we introduce DOMINO, a dual-system for multi-step multimodal reasoning. DOMINO alternates between two key modules, System-1 for targeted information extraction from images and System-2 for task decomposition and answer generation. We compare our model’s performance against both supervised and pipeline approaches on different chart/plot question answering datasets, and achieve better or comparable results. Further analysis shows that: (1) A general description of the chart helps System-2 better at task decomposition. (2) DOMINO is more robust in terms of handling complex charts. (3) Training System-2 for better performance is data-efficient, but System-2 benefits differently from the skills acquired during fine-tuning.
|
| 127 |
+
|
| 128 |
+
# ETHICS STATEMENT
|
| 129 |
+
|
| 130 |
+
Step-by-step reasoning to derive an answer from large models builds transparency and trust for users, and eases bug-fixing. In this context, we hope our work builds transparency by providing the intermediate steps used to derive at an answer. However, similar to other works on question answering from charts, our models could possibly be abused to mislead the public about the charts content and implications. Although our models obtain comparable or state-of-the-art results on the datasets we evaluated, we can not guarantee that the output of these models will always be correct. We have shared our hyper-parameter settings in the paper to ensure the reproducibility of our experimental results and we will open source our code to Github.
|
| 131 |
+
|
| 132 |
+
REFERENCES
|
| 133 |
+
Mubashara Akhtar, Oana Cocarascu, and Elena Simperl. Reading and reasoning over chart images for evidence-based automated fact-checking. In Findings of the Association for Computational Linguistics: EACL 2023, pp. 399–414, Dubrovnik, Croatia, May 2023. Association for Computational Linguistics. URL https://aclanthology.org/2023.findings-eacl.30.
|
| 134 |
+
Ewa Andrejczuk, Julian Eisenschlos, Francesco Piccinno, Syrine Krichene, and Yasemin Altun. Table-to-text generation and pre-training with TabT5. In Findings of the Association for Computational Linguistics: EMNLP 2022, pp. 6758–6766, Abu Dhabi, United Arab Emirates, December 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.findings-emnlp.503. URL https://aclanthology.org/2022.findings-emnlp.503.
|
| 135 |
+
Abhijit Balaji, Thuvaarakkesh Ramanathan, and Venkateshwarlu Sonathi. Chart-text: A fully automated chart image descriptor. CoRR, abs/1812.10636, 2018. URL http://arxiv.org/ abs/1812.10636.
|
| 136 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 1877–1901. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/ file/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf.
|
| 137 |
+
Ritwick Chaudhry, Sumit Shekhar, Utkarsh Gupta, Pranav Maneriker, Prann Bansal, and Ajay Joshi. Leaf-qa: Locate, encode & attend for figure question answering, 2019.
|
| 138 |
+
Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Josh Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. Evaluating large language models trained on code, 2021.
|
| 139 |
+
Wenhu Chen. Large language models are few(1)-shot table reasoners. In Findings of the Association for Computational Linguistics: EACL 2023, pp. 1120–1130, Dubrovnik, Croatia, May 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.findings-eacl.83. URL https://aclanthology.org/2023.findings-eacl.83.
|
| 140 |
+
Wenhu Chen, Xueguang Ma, Xinyi Wang, and William W. Cohen. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks, 2022.
|
| 141 |
+
Xi Chen, Josip Djolonga, Piotr Padlewski, Basil Mustafa, Soravit Changpinyo, Jialin Wu, Carlos Riquelme Ruiz, Sebastian Goodman, Xiao Wang, Yi Tay, Siamak Shakeri, Mostafa Dehghani, Daniel Salz, Mario Lucic, Michael Tschannen, Arsha Nagrani, Hexiang Hu, Mandar Joshi, Bo Pang, Ceslee Montgomery, Paulina Pietrzyk, Marvin Ritter, AJ Piergiovanni, Matthias Minderer, Filip Pavetic, Austin Waters, Gang Li, Ibrahim Alabdulmohsin, Lucas Beyer, Julien Amelot, Kenton Lee, Andreas Peter Steiner, Yang Li, Daniel Keysers, Anurag Arnab, Yuanzhong Xu, Keran Rong, Alexander Kolesnikov, Mojtaba Seyedhosseini, Anelia Angelova, Xiaohua Zhai, Neil Houlsby, and Radu Soricut. Pali-x: On scaling up a multilingual vision and language model, 2023a.
|
| 142 |
+
Xi Chen, Xiao Wang, Soravit Changpinyo, AJ Piergiovanni, Piotr Padlewski, Daniel Salz, Sebastian Goodman, Adam Grycner, Basil Mustafa, Lucas Beyer, Alexander Kolesnikov, Joan Puigcerver, Nan Ding, Keran Rong, Hassan Akbari, Gaurav Mishra, Linting Xue, Ashish V Thapliyal, James Bradbury, Weicheng Kuo, Mojtaba Seyedhosseini, Chao Jia, Burcu Karagol Ayan, Carlos Riquelme Ruiz, Andreas Peter Steiner, Anelia Angelova, Xiaohua Zhai, Neil Houlsby, and Radu Soricut. PaLI: A jointly-scaled multilingual language-image model. In The Eleventh International Conference on Learning Representations, 2023b. URL https: //openreview.net/forum?id $\equiv$ mWVoBz4W0u.
|
| 143 |
+
Zhi-Qi Cheng, Qi Dai, Siyao Li, Jingdong Sun, Teruko Mitamura, and Alexander G. Hauptmann. Chartreader: A unified framework for chart derendering and comprehension without heuristic rules, 2023a.
|
| 144 |
+
Zhoujun Cheng, Tianbao Xie, Peng Shi, Chengzu Li, Rahul Nadkarni, Yushi Hu, Caiming Xiong, Dragomir Radev, Mari Ostendorf, Luke Zettlemoyer, Noah A. Smith, and Tao Yu. Binding language models in symbolic languages. In The Eleventh International Conference on Learning Representations, 2023b. URL https://openreview.net/forum?id $=$ lH1PV42cbF.
|
| 145 |
+
Hyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. Scaling instruction-finetuned language models, 2022.
|
| 146 |
+
Jonathan St BT Evans. In two minds: dual-process accounts of reasoning. Trends in cognitive sciences, 7(10):454–459, 2003.
|
| 147 |
+
Anirudh Goyal and Yoshua Bengio. Inductive biases for deep learning of higher-level cognition, 2022.
|
| 148 |
+
Enamul Hoque, Parsa Kavehzadeh, and Ahmed Masry. Chart question answering: State of the art and future directions. In Computer Graphics Forum, volume 41-3, pp. 555–572. Wiley Online Library, 2022.
|
| 149 |
+
Daekyoung Jung, Wonjae Kim, Hyunjoo Song, Jeongin Hwang, Bongshin Lee, Bo Hyoung Kim, and Jinwook Seo. Chartsense: Interactive data extraction from chart images. Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems, 2017. URL https://api. semanticscholar.org/CorpusID:6242305.
|
| 150 |
+
Kushal Kafle, Brian Price, Scott Cohen, and Christopher Kanan. Dvqa: Understanding data visualizations via question answering, 2018.
|
| 151 |
+
Kushal Kafle, Robik Shrestha, Brian Price, Scott Cohen, and Christopher Kanan. Answering questions about data visualizations using efficient bimodal fusion, 2020.
|
| 152 |
+
Daniel Kahneman. Thinking, fast and slow. New York, NY: Macmillan, 2011.
|
| 153 |
+
Samira Ebrahimi Kahou, Vincent Michalski, Adam Atkinson, Akos Kadar, Adam Trischler, and Yoshua Bengio. Figureqa: An annotated figure dataset for visual reasoning, 2018.
|
| 154 |
+
|
| 155 |
+
Kenton Lee, Mandar Joshi, Iulia Turc, Hexiang Hu, Fangyu Liu, Julian Eisenschlos, Urvashi Khandelwal, Peter Shaw, Ming-Wei Chang, and Kristina Toutanova. Pix2struct: Screenshot parsing as pretraining for visual language understanding, 2023.
|
| 156 |
+
|
| 157 |
+
Fangyu Liu, Julian Martin Eisenschlos, Francesco Piccinno, Syrine Krichene, Chenxi Pang, Kenton Lee, Mandar Joshi, Wenhu Chen, Nigel Collier, and Yasemin Altun. Deplot: One-shot visual language reasoning by plot-to-table translation, 2023a.
|
| 158 |
+
|
| 159 |
+
Fangyu Liu, Francesco Piccinno, Syrine Krichene, Chenxi Pang, Kenton Lee, Mandar Joshi, Yasemin Altun, Nigel Collier, and Julian Martin Eisenschlos. Matcha: Enhancing visual language pretraining with math reasoning and chart derendering, 2023b.
|
| 160 |
+
|
| 161 |
+
Junyu Luo, Zekun Li, Jinpeng Wang, and Chin-Yew Lin. Chartocr: Data extraction from charts images via a deep hybrid framework. In 2021 IEEE Winter Conference on Applications of Computer Vision (WACV). The Computer Vision Foundation, January 2021. URL https://www.microsoft.com/en-us/research/publication/ chartocr-data-extraction-from-charts-images-via-a-deep-hybrid-frame
|
| 162 |
+
|
| 163 |
+
Ahmed Masry, Do Xuan Long, Jia Qing Tan, Shafiq Joty, and Enamul Hoque. Chartqa: A benchmark for question answering about charts with visual and logical reasoning, 2022.
|
| 164 |
+
|
| 165 |
+
Ahmed Masry, Parsa Kavehzadeh, Xuan Long Do, Enamul Hoque, and Shafiq Joty. Unichart: A universal vision-language pretrained model for chart comprehension and reasoning, 2023.
|
| 166 |
+
|
| 167 |
+
Nitesh Methani, Pritha Ganguly, Mitesh M. Khapra, and Pratyush Kumar. Plotqa: Reasoning over scientific plots, 2020.
|
| 168 |
+
|
| 169 |
+
OpenAI. Gpt-4 technical report, 2023.
|
| 170 |
+
|
| 171 |
+
Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models, 2023.
|
| 172 |
+
|
| 173 |
+
Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models, 2023.
|
| 174 |
+
|
| 175 |
+
Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian ichter, Fei Xia, Ed H. Chi, Quoc V Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/ forum?id $=$ _VjQlMeSB_J.
|
| 176 |
+
|
| 177 |
+
Ping Yu, Tianlu Wang, Olga Golovneva, Badr AlKhamissi, Siddharth Verma, Zhijing Jin, Gargi Ghosh, Mona Diab, and Asli Celikyilmaz. ALERT: Adapt language models to reasoning tasks. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1055–1081, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long.60. URL https://aclanthology.org/2023. acl-long.60.
|
| 178 |
+
|
| 179 |
+
Chunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, et al. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206, 2023a.
|
| 180 |
+
|
| 181 |
+
Mingyang Zhou, Yi Fung, Long Chen, Christopher Thomas, Heng Ji, and Shih-Fu Chang. Enhanced chart understanding via visual language pre-training on plot table pairs. In Findings of the Association for Computational Linguistics: ACL 2023, pp. 1314–1326, Toronto, Canada, July 2023b. Association for Computational Linguistics. doi: 10.18653/v1/2023.findings-acl.85. URL https://aclanthology.org/2023.findings-acl.85.
|
| 182 |
+
|
| 183 |
+
# A APPENDIX
|
| 184 |
+
|
| 185 |
+
A.1 TRAINING AND EVALUATION DATASETS
|
| 186 |
+
|
| 187 |
+
A.1.1 DATASET STATISTICS
|
| 188 |
+
|
| 189 |
+
We used the following datasets in this paper:
|
| 190 |
+
|
| 191 |
+
• ChartQA (Masry et al., 2022): A dataset of both human-authored and machine-generated questions about bar, line, and pie charts sourced from Statista (statista.com), The Pew research (pewresearch.org), Our World In Data or OWID (ourworldindata. org), and Organisation for Economic Co-operation and Development or OECD (oecd. org). The training set consists of 7, 398 human-authored questions over 3, 699 charts and 20, 901 machine-generated questions over 15, 474 charts. PlotQA (Methani et al., 2020): A dataset sourced from World Bank Open Data, Open Government Data, Global Terrorism Database which contain statistics about various indicator variables. The data contains positive integers, floating point values, percentages, and values on a linear scale, which range from 0 to $3 . 5 0 \mathrm { e } + 1 5$ . The dataset consists of questions categorized into structural understanding, data retrieval and reasoning over bar plots, line plots, and scatter plots. This dataset does not consider any visual features of a chart (Masry et al., 2022). DVQA (Kafle et al., 2018): A synthetic dataset containing open ended questions about bar charts, where many questions refer to texts specific to corresponding charts.
|
| 192 |
+
• FigureQA (Kahou et al., 2018): A synthetic dataset containing yes/no questions about line graphs, bar and pie charts.
|
| 193 |
+
|
| 194 |
+
Dataset statistics of the test sets used in this paper are reported in the following table. For the synthetic datasets (i.e., PlotQA, DVQA, FigureQA), we randomly sample 10K examples for evaluation.
|
| 195 |
+
|
| 196 |
+
<table><tr><td>Dataset</td><td># Charts</td><td># QA Pairs</td></tr><tr><td>ChartQA (Aug.)</td><td>987</td><td>1250</td></tr><tr><td>ChartQA (Human)</td><td>625</td><td>1250</td></tr><tr><td>PlotQA V1</td><td>8643</td><td>10000</td></tr><tr><td>PlotQA V2</td><td>8252</td><td>10000</td></tr><tr><td>DVQA (reasoning)</td><td>9138</td><td>10000</td></tr><tr><td>FigureQA Val1</td><td>5000</td><td>5000</td></tr><tr><td>FigureQA Val2</td><td>5000</td><td>5000</td></tr></table>
|
| 197 |
+
|
| 198 |
+
# A.1.2 TEMPLATES FOR DATA GENERATION FOR SYSTEM-1
|
| 199 |
+
|
| 200 |
+
We use templates with ChartQA and PlotQA training sets to generate the data for fine-tuning System-1. Tables 5 and 6 show the templates we used and examples of the generated data, respectively.
|
| 201 |
+
|
| 202 |
+
Table 5: Templates for data generation for System-1.
|
| 203 |
+
|
| 204 |
+
<table><tr><td>Atomic Operation</td><td>Template</td><td>Used Data</td></tr><tr><td>Describe</td><td>Let's describe the figure.</td><td>Use general figure info, color, text label and name from original annotations.</td></tr><tr><td>Extract-Point</td><td>Let's extract the data of <entity> BY <entity2>. Let's extract the data of <entity>.</td><td>Retrieve the value of a cell in a table specified by the two entities as row or column.</td></tr><tr><td>Extract-Group</td><td>Let's extract the data of <entity>. Let's extract all the values.</td><td>Use table header with values for the specified entity. If only one entity is present, then extract all values.</td></tr></table>
|
| 205 |
+
|
| 206 |
+
Table 6: Examples of the atomic operations generated using templates for ChartQA and PlotQA.
|
| 207 |
+
|
| 208 |
+
<table><tr><td>Atomic Operation</td><td>Source</td><td>Question</td><td>Answer</td></tr><tr><td>Describe</td><td></td><td>ChartQALet's describe the figure.</td><td>The figure shows the data of: Income in million U.S. dollars (blue).The x-axis shows: Taylor Swift|Kylie Jenner|Kanye West |Lionel Messi |Ed Sheeran |Cristiano Ronaldo|Neymar丨The Eagles|Dr.Phil</td></tr><tr><td>Describe</td><td></td><td>PlotQALet's describe the figure.</td><td>McGraw |Canelo Alvarez. The figure shows the data of: Fragile and conflictaffected situations(grey)Iraq (brown)|Moldova (orange).The x-axis shows:2004|2005丨2006丨2007丨2004</td></tr><tr><td>Extract-Point</td><td>ChartQA</td><td>Let's extract the data of 2015.</td><td>|2005|2006|2007. The data is 296.0.</td></tr><tr><td>Extract-Point</td><td>PlotQA</td><td>Let's extract the data of Canada BY 1965.</td><td>The data is 20.82.</td></tr><tr><td>Extract-Group</td><td>ChartQA</td><td>Let's extract the data of Total market.</td><td>The data is 18 in 2019,20.0 in 2018,22.0 in 2017,23.0 in 2016,24.0 in 2015,25.0 in 2014,26.0 in 2013,27.0 in 2012,26.0 in 2011.</td></tr><tr><td>Extract-Group</td><td>PlotQA</td><td>Let's extract the data of 1994.</td><td>The data is O.16 in Merchandise exports, 0.36 in Merchandise imports.</td></tr></table>
|
| 209 |
+
|
| 210 |
+
Examples of the collected annotated data for System-2 are presented bellow. These examples are from PlotQA. Sentences that are input to the LLM are wrapped with [INST] tags.
|
| 211 |
+
|
| 212 |
+
<table><tr><td>[INST] Q: In how many years,is the value of the bar greater than 851? [/INST] A: Let’s describe the figure. [INST] The figure shows the data of: Neonatal deaths (green). The x-axis shows: 20oo|2001|2002 [2003|2004|2005.[/INST]</td></tr><tr><td>Let's extract the data of Neonatal deaths. [INST] The data is 853 in 2000,847 in 2001,822 in 2002,828 in 2003,818 in 2004,843 in 2005. [/INST]</td></tr><tr><td>The values that are greater than 851 are [853]. So the answer is 1.</td></tr><tr><td>[INST] Q: Across allyears, what is the minimum pupil-teacher ratio in Costa Rica? [/INST] A: Let's describe the figure. [INST] The figure shows the data of: Least developed countries (blue)| Cameroon (purple)| Costa</td></tr><tr><td>Rica (yellow)|Tajikistan (brown).The x-axis shows: 2000|2001|2006|2007|2008|2011.</td></tr><tr><td>[/INST] Let's extract the data of Costa Rica.</td></tr><tr><td>[INST] The data is 18.84 in 2000,19.57 in 2001,17.79 in 2006,17.91 in 2007,15.64 in 2008,14.92 in 2011. [/INST] The minimum value is 14.92 in 2011. So the answer is 14.92.</td></tr></table>
|
| 213 |
+
|
| 214 |
+
# A.2 EVALUATION PROMPTS
|
| 215 |
+
|
| 216 |
+
Below is the 1-shot prompt used by DePlot (Liu et al., 2023a), which includes one table followed by five question and answer pairs:
|
| 217 |
+
|
| 218 |
+
<table><tr><td colspan="4">Readtnetablebelowtoanswerthefollowingquestions. Header: Year丨Democrats 丨Republicans丨Independents</td></tr><tr><td></td><td>Row 1: 2004 |68.1%|45.0%[53.0%</td><td></td><td></td></tr><tr><td></td><td>Row 2: 2006|58.0%|42.0% |53.0%</td><td></td><td></td></tr><tr><td></td><td>Row 3: 2007 |59.0% |38.0%|45.0%</td><td></td><td></td></tr><tr><td>Row 4: 2009| 72.0%</td><td></td><td>49.0% 60.0%</td><td></td></tr><tr><td></td><td>Row 5: 2011 | 71.0% | 51.2%</td><td>58.0%</td><td></td></tr><tr><td></td><td>Row 6: 2012 |70.0%|48.0% |53.0%</td><td></td><td></td></tr><tr><td></td><td></td><td>Row 7: 2013 |72.0%|41.0% |60.0%</td><td></td></tr><tr><td colspan="4"></td></tr><tr><td></td><td></td><td>Q: In which year republicans have the lowest favor rate?</td><td></td></tr><tr><td colspan="4">A: Let's find the column of republicans.Then let's extract the favor rates: [45.0,42.0,38.0, 49.0,</td></tr><tr><td colspan="4">51.2,48.0,41.0]. The smallest number is 38.0,that's Row 3.Row 3 is year 2007. The answeris 2007.</td></tr><tr><td colspan="4">Q: What is the sum of Democrats’ favor rates of 2004,2012,and 2013?</td></tr><tr><td colspan="4"></td></tr><tr><td colspan="4">A: Let's find the rows of years 2004,2012,and 2013.We find Row 1,6,7. The favor dates of Democrats on that 3 rows are 68.1,70.0,and 72.0. 68.1+70.0+72=210.1. The answer is 210.1.</td></tr><tr><td colspan="4"></td></tr><tr><td colspan="4">Q: By how many points do Independents surpass Republicans in the year of 2011?</td></tr><tr><td colspan="4">A: Let's find the row with year = 2011. We find Row 5. We extract Independents and Republicans'</td></tr><tr><td colspan="4">numbers. They are 58.0 and 51.2. 58.0-51.2=6.8. The answer is 6.8.</td></tr><tr><td colspan="4">Q: Which group has the overall worst performance?</td></tr><tr><td colspan="4">A: Let's sample a couple of years.In Row 1, year 2Oo4,we find Republicans having the lowest</td></tr><tr><td colspan="4">favor rate 45.0 (since 45.0<68.1, 45.0<53.0). In year 2006,Row 2, we find Republicans having the</td></tr><tr><td colspan="4">lowest favor rate 42.0 (42.0<58.0, 42.0<53.0). The trend continues to other years. The answer is</td></tr><tr><td colspan="4">Republicans.</td></tr><tr><td colspan="4"></td></tr><tr><td colspan="4">Q: Which party has the second highest favor rates in 2007?</td></tr><tr><td colspan="4">A: Let's find the row of year 20o7,that’s Row 3.Let's extract the numbers on Row 3: [59.0, 38.0,</td></tr><tr><td colspan="4">45.0]. 45.0 is the second highest. 45.0 is the number of Independents.The answer is Independents.</td></tr><tr><td colspan="4"></td></tr><tr><td colspan="4">Read the table below to answer the following questions.</td></tr><tr><td colspan="4"></td></tr><tr><td colspan="4"></td></tr></table>
|
| 219 |
+
|
| 220 |
+
Below is the alternate 5-shot prompt that we used for evaluating DePlot, which includes five tables with one question and answer pair for each:
|
| 221 |
+
|
| 222 |
+
Read the table to answer the following question.
|
| 223 |
+
|
| 224 |
+
Header: Entity | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014
|
| 225 |
+
Row 1: Oman | 183.88 | 233.80 | 210.69 | 195.26 | 196.32 | 154.21 | 153.22
|
| 226 |
+
Row 2: Samoa | 40.72 | 40.04 | 39.21 | 40.63 | 41.47 | 41.76 | 42.77
|
| 227 |
+
Q: In which year the private health expenditure per person in Oman is 210.69?
|
| 228 |
+
A: Let’s find the row of Oman, that’s Row 1. Let’s find the number 210.69, that’s for the year of 2010. The answer is 2010. Header: Year | NET Excellent/ good | NET Only fair/ poor
|
| 229 |
+
Row 1: Feb 2014 | 54 | 39
|
| 230 |
+
Row 2: June 2015 | 55 | 0
|
| 231 |
+
Row 3: Jan 2018 | 45 | 46
|
| 232 |
+
Row 4: Sept. 2018 | 331 | 62
|
| 233 |
+
Q: By how many points does NET Excellent/good surpass NET Only fair/poor in the year of 2014?
|
| 234 |
+
A: Let’s find the row of 2014, that’s Row 1. We extract NET Excellent/good’s and NET Only fair/poor’s numbers. They are 54.00 and 39.00. 54.00-39.00=15.00. The answer is 15.00. Header: Characteristic | Share of respondents
|
| 235 |
+
Row 1: Very positive $1 \%$
|
| 236 |
+
Row 2: Fairly positive $141 \%$
|
| 237 |
+
Row 3: Fairly negative | $50 \%$
|
| 238 |
+
Row 4: Very negative $11 \%$
|
| 239 |
+
Q: How many perceptions have a value below $40 \%$ in America? A: Let’s find the values that are below 40: [4, 11]. The answer is 2.
|
| 240 |
+
|
| 241 |
+
Header: Characteristic | Consoles | PC | Mobile and ancillary | Other
|
| 242 |
+
Row 1: 2020 | 2784 | 2056 | 2559 | 687
|
| 243 |
+
Row 2: 2019 | 1920 | 1718 | 2203 | 648
|
| 244 |
+
Row 3: 2018 | 2538 | 2180 | 2175 607
|
| 245 |
+
Row 4: 2017 | 2389 | 2042 2081 505
|
| 246 |
+
Row 5: 2016 | 2453 | 2124 1674 | 357
|
| 247 |
+
Row 6: 2015 | 2391 | 1499 | 418 | 356
|
| 248 |
+
|
| 249 |
+
Q: In 2020, how much money did Activision Blizzard’s console segment generate in annual revenues in Australia?
|
| 250 |
+
A: Let’s find the row of 2020, that’s Row 1. Let’s find the number for Consoles, that’s 2784. The answer is 2784. Header: Characteristic | Share of respondents
|
| 251 |
+
Row 1: Decreased | $81 \%$
|
| 252 |
+
Row 2: No impact | $16 \%$
|
| 253 |
+
Row 3: Increased $1 3 \%$
|
| 254 |
+
Q: Is the sum of two smallest segments greater than the largest segment?
|
| 255 |
+
A: Let’s extract the numbers of all the rows: [81, 16, 3]. The two smallest numbers are 16 and 3. $1 6 + 3 = 1 9$ , which is smaller than 81. The answer is no.
|
| 256 |
+
|
| 257 |
+
Below is the 5-shot prompt we used for evaluating DOMINO on ChartQA:
|
| 258 |
+
|
| 259 |
+
Answer the following questions step by step.
|
| 260 |
+
Q: In which year the private health expenditure per person in Oman is 210.69? A: Let’s describe the figure. The figure shows the data of: Oman (brown) | Samoa (dark blue). The x-axis shows: 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014.
|
| 261 |
+
Let’s extract the data of Oman.
|
| 262 |
+
The data is 183.88 in 2008, 233.80 in 2009, 210.69 in 2010, 195.26 in 2011, 196.32 in 2012, 154.21 in 2013, 153.22 in 2014.
|
| 263 |
+
The value 210.69 is in year 2010. So the answer is 2010. Q: By how many points does NET Excellent/good surpass NET Only fair/poor in German in the year of 2018?
|
| 264 |
+
A: Let’s describe the figure.
|
| 265 |
+
The figure shows the data of: NET Excellent/ good (blue) | NET Only fair/ poor (orange). The x-axis shows: Brazil, German, Russia, U.S., Japan.
|
| 266 |
+
Let’s extract the data of NET Excellent/ good BY German.
|
| 267 |
+
The data is 54.00.
|
| 268 |
+
Let’s extract the data of NET Only fair/ poor BY German.
|
| 269 |
+
The data is 39.00.
|
| 270 |
+
54.00 surpasses 39.00 by $5 4 . 0 0 - 3 9 . 0 0 { = } 1 5 . 0 0$ . So the answer is 15.00. Q: How many perceptions have a value below $40 \%$ in America?
|
| 271 |
+
A: Let’s describe the figure.
|
| 272 |
+
The figure shows the data of: Share of respondents (blue). The x-axis shows: Very positive, Fairly positive, Fairly negative, Very negative.
|
| 273 |
+
Let’s extract the data of Share of respondents.
|
| 274 |
+
The data is 4.00 in Very positive, 41.00 in Fairly positive, 50.00 in Fairly negative, 11.00 in Very negative. The values that are below 40.00 are [4.00, 11.00]. So the answer is 2. Q: In 2020, how much money did Activision Blizzard’s console segment generate in annual revenues in Australia? A: Let’s describe the figure.
|
| 275 |
+
The figure shows the data of: Consoles (blue) | PC\* (dark blue) | Mobile and ancillary\*\* (grey) | Other (dard red). The x-axis shows: 2019 | 2020 | 2021 | 2022.
|
| 276 |
+
Let’s extract the data of Consoles BY 2020.
|
| 277 |
+
The data is 2784.00.
|
| 278 |
+
The Console segment generated 2784.00 in annual revenues in 2020. So the answer is 2784.00. Q: Is the sum of two smallest segments greater than the largest segment?
|
| 279 |
+
A: Let’s describe the figure.
|
| 280 |
+
The figure shows the data of: Value. The $\mathbf { X }$ -axis shows: Decreased | No impact | Increased. Let’s extract the data of Value.
|
| 281 |
+
The data is 81.00 in Decreased, 16.00 in No impact, 3.00 in Increased.
|
| 282 |
+
Among [81.00, 16.00, 3.00], the two smallest values are 16.00 and 3.00 while the largest value is 8 $1 . 0 0 . \ 1 6 . 0 0 \substack { + 3 . 0 0 = 1 9 . 0 0 }$ , which is smaller than 81.00. So the answer is no.
|
| 283 |
+
|
| 284 |
+
Below is the 5-shot prompt we used for evaluating DOMINO on ChartQA without Describe:
|
| 285 |
+
|
| 286 |
+
Answer the following questions step by step.
|
| 287 |
+
|
| 288 |
+
Q: In which year the private health expenditure per person in Oman is 210.69?
|
| 289 |
+
A: Let’s extract the data of Oman.
|
| 290 |
+
The data is 183.88 in 2008, 233.80 in 2009, 210.69 in 2010, 195.26 in 2011, 196.32 in 2012, 154.21 in 2013, 153.22 in 2014.
|
| 291 |
+
The value 210.69 is in year 2010. So the answer is 2010.
|
| 292 |
+
|
| 293 |
+
Q: By how many points does NET Excellent/good surpass NET Only fair/poor in German in the year of 2018?
|
| 294 |
+
|
| 295 |
+
A: Let’s extract the data of NET Excellent/ good BY German.
|
| 296 |
+
The data is 54.00.
|
| 297 |
+
Let’s extract the data of NET Only fair/ poor BY German.
|
| 298 |
+
The data is 39.00.
|
| 299 |
+
54.00 surpasses 39.00 by $5 4 . 0 0 - 3 9 . 0 0 { = } 1 5 . 0 0$ . So the answer is 15.00. Q: How many perceptions have a value below $40 \%$ in America?
|
| 300 |
+
A: Let’s extract the data of Share of respondents.
|
| 301 |
+
The data is 4.00 in Very positive, 41.00 in Fairly positive, 50.00 in Fairly negative, 11.00 in Very negative. The values that are below 40.00 are [4.00, 11.00]. So the answer is 2.
|
| 302 |
+
|
| 303 |
+
Q: In 2020, how much money did Activision Blizzard’s console segment generate in annual revenues in Australia? A: Let’s extract the data of Consoles BY 2020. The data is 2784.00. The Console segment generated 2784.00 in annual revenues in 2020. So the answer is 2784.00.
|
| 304 |
+
|
| 305 |
+
Q: Is the sum of two smallest segments greater than the largest segment? A: Let’s extract the data of Value. The data is 81.00 in Decreased, 16.00 in No impact, 3.00 in Increased. Among [81.00, 16.00, 3.00], the two smallest values are 16.00 and 3.00 while the largest value is 8 $1 . 0 0 . \ 1 6 . 0 0 + 3 . 0 0 { = } 1 9 . 0 0$ , which is smaller than 81.00. So the answer is no.
|
| 306 |
+
|
| 307 |
+
# A.3 ERROR EXAMPLES
|
| 308 |
+
|
| 309 |
+
Table 7: Number of errors per template type for PlotQA V2 (examples follow). Numbers in parenthesis indicate total number of examples per template type in the 10K sample we evaluated.
|
| 310 |
+
|
| 311 |
+
<table><tr><td>Method</td><td>data retrieval (1379)</td><td>structural (447)</td><td>arithmetic (5147)</td><td>compound (637)</td><td>comparison (1815)</td><td>min-max (575)</td></tr><tr><td>Few-Shot DePlot</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LLaMA-2 (70B)</td><td>547</td><td>275</td><td>3448</td><td>323</td><td>757</td><td>185</td></tr><tr><td>DOMINO (our method)</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LLaMA-2 (70B)</td><td>400</td><td>203</td><td>2928</td><td>193</td><td>312</td><td>64</td></tr><tr><td>Fine-tuned LLaMA-2 (70B)</td><td>388</td><td>189</td><td>1861</td><td>177</td><td>242</td><td>62</td></tr><tr><td>Fine-tuned LLaMA-2 (70B) (SC)</td><td>377</td><td>159</td><td>915</td><td>184</td><td>233</td><td>63</td></tr></table>
|
| 312 |
+
|
| 313 |
+
Example of errors for each template type in PlotQA v2 made by DOMINO with finetuned LLaMA2 (70B) is illustrated in the following table.
|
| 314 |
+
|
| 315 |
+
<table><tr><td>Template</td><td>Question</td><td>Answer</td><td>Prediction</td></tr><tr><td colspan="4">Continued on next page</td></tr></table>
|
| 316 |
+
|
| 317 |
+

|
| 318 |
+
Continued on next page
|
| 319 |
+
|
| 320 |
+

|
| 321 |
+
Continued on next page
|
| 322 |
+
|
| 323 |
+
So the answer is 1.
|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
|
| 327 |
+
Example of errors about task decomposition in ChartQA-human made by DOMINO with finetuned LLaMA-2 (70B) is illustrated in the following table.
|
| 328 |
+
|
| 329 |
+
<table><tr><td>Question</td><td>Answer</td></tr><tr><td colspan="2">Continued on next page</td></tr></table>
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
|
| 333 |
+

|
| 334 |
+
Expenditures on general government outsourcing (%GDP)
|
| 335 |
+
|
| 336 |
+

|
| 337 |
+
|
| 338 |
+
Figure 4: The charts for the case study in $\ S 6$ . The charts are from ChartQA (Masry et al., 2022).
|
parse/test/BWSTBrmRqD/BWSTBrmRqD_content_list.json
ADDED
|
@@ -0,0 +1,767 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "DOMINO: A DUAL-SYSTEM FOR MULTI-STEP VISUAL LANGUAGE REASONING ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"page_idx": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"type": "text",
|
| 10 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 11 |
+
"page_idx": 0
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"type": "text",
|
| 15 |
+
"text": "ABSTRACT ",
|
| 16 |
+
"text_level": 1,
|
| 17 |
+
"page_idx": 0
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"type": "text",
|
| 21 |
+
"text": "Visual language reasoning requires a system to extract text or numbers from information-dense images like charts or plots and perform logical or arithmetic reasoning to arrive at an answer. To tackle this task, existing work relies on either (1) an end-to-end vision-language model trained on a large amount of data, or (2) a two-stage pipeline where a captioning model converts the image into text that is further read by another large language model to deduce the answer. However, the former approach forces the model to answer a complex question with one single step, and the latter approach is prone to inaccurate or distracting information in the converted text that can confuse the language model. In this work, we propose a dual-system for multi-step multimodal reasoning, which consists of a “System-1” step for visual information extraction and a “System-2” step for deliberate reasoning. Given an input, System-2 breaks down the question into atomic sub-steps, each guiding System-1 to extract the information required for reasoning from the image. Experiments on chart and plot datasets show that our method with a pre-trained System-2 module performs competitively compared to prior work on in- and out-of-distribution data. By fine-tuning the System-2 module (LLaMA-2 70B) on only a small amount of data on multi-step reasoning, the accuracy of our method is further improved and surpasses the best fully-supervised end-to-end approach by $5 . 7 \\%$ and a pipeline approach with FlanPaLM (540B) by $7 . 5 \\%$ on a challenging dataset with human-authored questions. ",
|
| 22 |
+
"page_idx": 0
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"type": "text",
|
| 26 |
+
"text": "1 INTRODUCTION ",
|
| 27 |
+
"text_level": 1,
|
| 28 |
+
"page_idx": 0
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"type": "text",
|
| 32 |
+
"text": "Visual language reasoning for tasks such as question answering over charts/plots is computationally challenging: it requires (1) multi-step reasoning to decompose the original complex question, (2) extracting numbers or text from the information-dense images, and (3) performing arithmetic or logical reasoning to derive the final answer. Recent work on visual language reasoning has investigated both end-to-end and pipeline approaches. In the end-to-end approach (Lee et al., 2023; Liu et al., 2023b), a visual transformer is trained on a large amount of labeled data to answer questions based on images with a single step of inference. In the pipeline approach (Liu et al., 2023a), an off-the-shelf captioning model first converts the chart/plot into a linearized table. A text-only large language model (LLM) is then prompted to conduct chain-of-thought reasoning over the linearized table. The first approach empowers a unified model to accommodate both vision and language modalities, but struggles with questions requiring complex reasoning (Hoque et al., 2022). The second approach leverages the multi-step reasoning capabilities of LLMs on the verbalized table information. However, this conversion is prone to loss or distortion of information needed for reasoning (e.g., missing information about colors used in the plot). It also burdens the system unnecessarily as the linearized table is generated regardless of the question and thus may contain irrelevant information. ",
|
| 33 |
+
"page_idx": 0
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"type": "text",
|
| 37 |
+
"text": "Inspired by the dual process theories of reasoning from cognitive science (Evans, 2003), in this work we present a dual-system for multi-step visual language reasoning called DOMINO. In particular, we use the notions of System-1 and System-2 processing in human brain introduced by Kahneman (2011), where System-1 corresponds to intuitive and habitual processing and System-2 refers to deliberate and controlled reasoning (Goyal & Bengio, 2022). Similarly, DOMINO alternates between two key modules, System-1 and System-2, to perform the task. In our context, System-1, realized as a visual reader, is responsible for intuitively extracting visual information from the image. System-2 which is implemented as an LLM reasoner, is responsible for more deliberate inference by conducting multi-step reasoning for task decomposition, commonsense reasoning, and logical or mathematical operations for answer derivation. More specifically, given an image of a chart and a textual question (see Figure 1 for an illustration), System-2 decomposes the task into a sequence of steps (sub-tasks). For certain intermediate steps, System-1 is guided to obtain the visual information from the image. With the intermediate result extracted by System-1, System-2 either performs the next-step reasoning or derives the answer with all the available information. Throughout the process, DOMINO asks System-1 to obtain visual information when needed, instead of captioning the whole image at once, and thus allows more interactions between the two modalities. ",
|
| 38 |
+
"page_idx": 0
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"type": "image",
|
| 42 |
+
"img_path": "images/39c1c698fa95d1bf4c5ff76d5ff24cd285c60df096078ede7d6803f71c541195.jpg",
|
| 43 |
+
"image_caption": [
|
| 44 |
+
"Figure 1: Overview of DOMINO, which alternates between System-2 (a prompted LLM) and System-1 (a visual encoder-text decoder) to answer complex questions over charts. The text in blue callouts are generated by System-2. The text in green callouts are generated by System-1 and appended to the generation sequence of System-2 directly. The chart and the question are from ChartQA (Masry et al., 2022). "
|
| 45 |
+
],
|
| 46 |
+
"image_footnote": [],
|
| 47 |
+
"page_idx": 1
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"type": "text",
|
| 51 |
+
"text": "",
|
| 52 |
+
"page_idx": 1
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"type": "text",
|
| 56 |
+
"text": "We build System-1 based on a pre-trained visual language model Liu et al. (2023a) suited for chart understanding, which takes an image and a query from System-2 as input and returns the intermediate result. To further customize System-1 to the target data domain, we create a synthetic training set that contains different atomic operations over an image of a chart/plot (e.g., extract the value of Macy’s in 2019 from Figure 1) using templates. To implement System-2, we adopt an LLM in order to utilize its emergent reasoning capabilities. To adjust System-2 to conduct visual-language reasoning, we explore both few-shot prompting and fine-tuning with a handful of annotated examples. ",
|
| 57 |
+
"page_idx": 1
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "We conduct experiments on several question answering tasks over charts/plots including ChartQA (Masry et al., 2022), PlotQA (Methani et al., 2020), DVQA (Kafle et al., 2018) and FigureQA (Kahou et al., 2018). The results show that without fine-tuning the LLM, DOMINO outperforms the pipeline approach using few-shot methods on both in- and out-of-distribution data. With only 100 training examples, DOMINO even outperforms the best fully-supervised method by $5 . 7 \\%$ in accuracy on ChartQA that requires more deliberate reasoning. Further analysis shows that: (1) The intermediate results are essential to the success of our method. (2) System-2 benefits more from learning task decomposition when the questions are arbitrary and natural but more from learning answer deduction when the questions are restricted in type. (3) DOMINO is more robust in handling complex charts. (4) Fine-tuning the LLM on interacting with vision is more data-efficient than finetuning the LLM on table reasoning. ",
|
| 62 |
+
"page_idx": 1
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"type": "text",
|
| 66 |
+
"text": "2 RELATED WORK ",
|
| 67 |
+
"text_level": 1,
|
| 68 |
+
"page_idx": 1
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "Visual language reasoning and question answering is an active area of research (Kafle et al., 2018; Kahou et al., 2018; Chaudhry et al., 2019; Methani et al., 2020; Masry et al., 2022). This is a special case of multimodal reasoning tasks that requires understanding an information-intense image and performing multi-step arithmetic or logical reasoning to derive an answer to complex questions. Recent work on visual language question answering focusing on charts/plots has investigated both supervised end-to-end and pipeline approaches. ",
|
| 73 |
+
"page_idx": 1
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"type": "text",
|
| 77 |
+
"text": "Supervised VQA. Among supervised approaches, PReFIL (Kafle et al., 2020) allows for OCR integration and uses different recurrent and dense models to encode text and image inputs separately which are then fused and fed to a classifier for obtaining an answer. More recently, visual transformers are trained on a large amount of labeled data to answer questions based on images with different training objectives. PaLI (Chen et al., 2023b) and PaLI-X (Chen et al., 2023a) use OCR-aware pretraining objectives where the model predicts texts obtained from some OCR system. Similarly, ChartBERT (Akhtar et al., 2023) uses OCR text and positions to train a transformer encoder. Using OCR systems, however, adds computational cost and falls short on cases where the charts/plots do not have numbers and texts written explicitly (Liu et al., 2023b). Pix2Struct (Lee et al., 2023) and MATCHA (Liu et al., 2023b) are end-to-end models for visual language, where Pix2Struct provides generic checkpoints for different visual language tasks and MATCHA further fine-tunes Pix2Struct with new pretraining objects for chart derendering and mathematical reasoning. ChartT5 (Zhou et al., 2023b) learns to interpret table information from chart images via cross-modal pre-training on plot table pairs with masked header prediction and masked value prediction pre-training objectives. UniChart (Masry et al., 2023) also considers an encoder-decoder architecture and considers different pretraining objectives for low-level and high-level tasks. These approaches empower a unified model to accommodate both vision and language modalities, but struggle with questions requiring complex reasoning (Hoque et al., 2022). Unlike the supervised approches that force the model to answer the question with one single step, DOMINO leverages an LLM for multi-step reasoning. ",
|
| 78 |
+
"page_idx": 2
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "Pipelined VQA. The pipeline approach, on the other hand, divides the task into two steps consisting of 1) information extraction or chart derendering and 2) question answering. There are different approaches to extract information from charts: some approaches combine OCR, object detection/segmentation techniques and/or heuristic rules for extracting information (Jung et al., 2017; Balaji et al., 2018; Luo et al., 2021; Akhtar et al., 2023), while others use a deep model to either extract different chart components (Cheng et al., 2023a) or convert the input chart to a textual table (Liu et al., 2023a). The resulting output is then reasoned over for question answering using table-to-text models (Andrejczuk et al., 2022), specialized models (Cheng et al., 2023a), large language models (Chen, 2023; Liu et al., 2023a), or code models combined with program executors (Chen et al., 2022; Cheng et al., 2023b). Different from these approaches, DOMINO interleaves and alternates between information extraction (System-1) and task decomposition and reasoning (System-2). ",
|
| 83 |
+
"page_idx": 2
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"type": "text",
|
| 87 |
+
"text": "3 DOMINO ",
|
| 88 |
+
"text_level": 1,
|
| 89 |
+
"page_idx": 2
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"type": "text",
|
| 93 |
+
"text": "DOMINO is a dual-system for multi-step visual language reasoning. Unlike the end-to-end approach that uses one unified model to answer questions with one single step, DOMINO leverages an LLM to solve questions that require multi-step reasoning. Unlike the few-shot pipeline approach that converts a whole chart into a table, DOMINO only obtains information from the chart contextualized by one reasoning step at a time, thus allowing more interactions between the textual and visual modalities. ",
|
| 94 |
+
"page_idx": 2
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"type": "text",
|
| 98 |
+
"text": "Figure 1 illustrates the workflow of DOMINO. Given an image of the chart $c$ and a textual question $q _ { 0 }$ , DOMINO alternates between both modules to deduce the answer $a$ step by step. Taking the original question $q _ { 0 }$ , and potentially the previous reasoning steps as input, System-2 either generates the next query $q _ { i }$ $( i > 0$ ) to System-1 to obtain an intermediate result $a _ { i }$ or answers the question by synthesizing all the intermediate results $\\left\\{ q _ { i } , a _ { i } \\right\\}$ . Guided by System-2, System-1 takes the chart $c$ and the query $q _ { i }$ as input and returns the intermediate result $a _ { i }$ . We describe each module below. ",
|
| 99 |
+
"page_idx": 2
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"type": "text",
|
| 103 |
+
"text": "3.1 SYSTEM-1 ",
|
| 104 |
+
"text_level": 1,
|
| 105 |
+
"page_idx": 2
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"type": "text",
|
| 109 |
+
"text": "Our System-1 is responsible for the intuitive part of visual language reasoning, i.e., extracting information from the chart/plot. We implement System-1 as a vision encoder-text decoder Transformer model (Lee et al., 2023). Given a chart $c$ and a textual query $q _ { i }$ from System-2, the visual encoder first represents the chart as a sequence of patch embeddings. Then the query $q _ { i }$ is fed as the prefix of the text decoder to guide System-1 to generate the answer $a _ { i }$ by decoding from $P ( a _ { i } | c , q _ { i } )$ . ",
|
| 110 |
+
"page_idx": 2
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"type": "text",
|
| 114 |
+
"text": "Atomic Operations We define the following list of atomic operations that are needed to extract information from charts/plots in general. These operations facilitate the interaction between System",
|
| 115 |
+
"page_idx": 2
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"type": "text",
|
| 119 |
+
"text": "2 and System-1. System-2 can choose to flexibly combine these atomic operations according to the reasoning structure, whereas System-1 can execute these operations individually. ",
|
| 120 |
+
"page_idx": 3
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
"type": "text",
|
| 124 |
+
"text": "Describe: Since System-2 is a text-only LLM and does not access the chart directly, it is challenging for System-2 to generate valid queries that are grounded to the chart. For example, it may ask for a data point that does not exist in the chart. To avoid such hallucinating behavior, we define our first atomic operation Describe, which allows System-2 to get a high-level description of the chart. When receiving this query, System-1 responds with the key elements that are visualized in the chart (see the first green callout from System-1 in Figure 1 for an example). We let System-2 always use Describe as the first reasoning step since it is vital for System-2 to ask valid queries in the following steps. Extract-Point: This atomic operation is designed to allow System-2 to obtain the value of a specific data point, e.g., extract the value of Macy’s in 2019, which is usually required for questions like “What is the difference between Macy’s and Bloomingdale’s in 2019?”. When receiving this query, System-1 only needs to extract one single value from the chart, which is more efficient than the pipeline approach which would extract all values. Extract-Group: The last atomic operation is designed to allow System-2 to obtain the values of a certain group, e.g., extract the value of Macy’s, which is required for questions like “What is the maximum value of Macy’s across all years?”. When receiving this query, System-1 returns all the values of Macy’s. ",
|
| 125 |
+
"page_idx": 3
|
| 126 |
+
},
|
| 127 |
+
{
|
| 128 |
+
"type": "text",
|
| 129 |
+
"text": "Training For each type of atomic operation, we generate the query-answer pairs $\\left\\{ q _ { i } , a _ { i } \\right\\}$ automatically based on available annotated data using templates (detailed in the experiment section). Table 6 in appendix $\\ S \\ \\mathrm { A } . 1 . 2$ shows the examples of these query-answer pairs. We then train System-1 by applying the standard language modeling loss on the answer spans. ",
|
| 130 |
+
"page_idx": 3
|
| 131 |
+
},
|
| 132 |
+
{
|
| 133 |
+
"type": "text",
|
| 134 |
+
"text": "3.2 SYSTEM-2 ",
|
| 135 |
+
"text_level": 1,
|
| 136 |
+
"page_idx": 3
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"type": "text",
|
| 140 |
+
"text": "Answering questions over charts/plots usually involves complex reasoning such as arithmetic and logical operations (taking the sum, finding the maximum, comparing values, etc.) (Masry et al., 2022). Due to their strong capability in step-by-step reasoning Wei et al. (2022), we adopt LLMs as System-2 for task decomposition. ",
|
| 141 |
+
"page_idx": 3
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"type": "text",
|
| 145 |
+
"text": "Workflow Figure 1 illustrates the whole workflow of System-2. Given an originally complex question $q _ { 0 }$ , and optionally the previous reasoning steps $\\{ q _ { i } , a _ { i } \\}$ , System-2 can select one of the atomic operations to ask a further query $q _ { i + 1 }$ from System-1 or deduce the answer $a$ as the final step. If a further query $q _ { i + 1 }$ is generated, e.g., “Let’s extract the value of Bloomingdale’s in 2019.”, we feed $q _ { i + 1 }$ alone to System-1 for obtaining the intermediate result $a _ { i + 1 }$ , e.g., “The value is $5 5 '$ . Then we append $a _ { i + 1 }$ back to the current generation sequence of System-2 which continues to generate the next step. If System-2 acquires all the required information, it would conduct chain-of-thought reasoning to synthesize all the information to deduce the final answer $a$ , e.g., “The difference between ... So the answer is 558.”. ",
|
| 146 |
+
"page_idx": 3
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "text",
|
| 150 |
+
"text": "Learning to Decompose We now describe how to adapt an LLM to compose the atomic operations defined above to collect all the information required for answering a complex question over a chart. We explore both prompting-only and prompting+fine-tuning as two means of adaptation. ",
|
| 151 |
+
"page_idx": 3
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "text",
|
| 155 |
+
"text": "• Prompting-only: We use few-shot prompting to adapt an LLM to conduct visual language reasoning by interacting with System-1. In the prompt, each example consists of a question $q$ , the intermediate reasoning steps $\\left\\{ q _ { i } , a _ { i } \\right\\}$ , and finally a concluding sentence ending with the answer $a$ (see Figure 1 for the format of the prompt and Appendix $\\ S \\ A . 2$ for the full prompt we used). • Prompting $^ +$ fine-tuning: Recent works show that with minor fine-tuning, the reasoning capability of an LLM can be greatly enhanced (Yu et al., 2023; Zhou et al., 2023a). We take inspiration from this observation and study how much we can improve the performance of DOMINO by fine-tuning System-2 with only a few $< = 1 0 0$ ) training examples. Through fine-tuning, we aim to teach System-2 to both (1) decompose the task and (2) deduce the answer. During training, we only apply the language modeling loss on the text that is supposed to be generated by System-2 during the inference time — i.e., the query spans $q _ { i }$ and the final concluding sentence leading to $a$ . This is to avoid teaching System-2 to hallucinate the parts that should be generated by System-1, i.e., the intermediate answers $a _ { i }$ . During inference, we still provide the few-shot prompt to System-2 as we find this leads to a better performance of DOMINO overall. ",
|
| 156 |
+
"page_idx": 3
|
| 157 |
+
},
|
| 158 |
+
{
|
| 159 |
+
"type": "text",
|
| 160 |
+
"text": "",
|
| 161 |
+
"page_idx": 4
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "4 EXPERIMENTAL SETUP ",
|
| 166 |
+
"text_level": 1,
|
| 167 |
+
"page_idx": 4
|
| 168 |
+
},
|
| 169 |
+
{
|
| 170 |
+
"type": "text",
|
| 171 |
+
"text": "4.1 DATASETS ",
|
| 172 |
+
"text_level": 1,
|
| 173 |
+
"page_idx": 4
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "For fine-tuning and evaluation we use the ChartQA (Masry et al., 2022) and PlotQA (Methani et al., 2020) datasets. ChartQA has two subsets. One is machine generated (marked with augmented) and the other is human written (marked with human) which requires more complex reasoning. PlotQA also has two sets: v1 (mostly focused on extractive questions) and v2 (requires more numerical reasoning), both of which are machine generated. Details of each dataset are reported in Appendix A.1. For fine-tuning System-1, we use samples from training sets of these datasets along with templates for each of the Describe, Extract-Point, and Extract-Group atomic operations to generate the training data. See Appendix A.1.2 for examples of templates and generated data. For fine-tuning System-2, we collect 100 high-quality question decomposition and reasoning examples. More specifically, we sample diverse charts/questions from the training sets of ChartQA and PlotQA and ask an annotator to decompose each complex question into atomic operations and deduce the answer. See Appendix A.1.3 for examples of the collected data. ",
|
| 178 |
+
"page_idx": 4
|
| 179 |
+
},
|
| 180 |
+
{
|
| 181 |
+
"type": "text",
|
| 182 |
+
"text": "Since parts of the training sets of ChartQA and PlotQA are used during the fine-tuning stage, we also evaluate DOMINO on two additional datasets that were not used during fine-tuning: DVQA (Kafle et al., 2018) and FigureQA (Kahou et al., 2018). Both of these datasets include chart images from synthetic tables that are randomly generated from limited vocabularies. FigureQA has yes/no answers whereas DVQA contains open ended questions where many refer to texts specific to the corresponding charts. While DVQA only includes bar charts, FigureQA additionally includes line graphs and pie charts. For all synthetic datasets (i.e., PlotQA, DVQA, and FigureQA), we randomly sample 10K examples and use this set for evaluation. ",
|
| 183 |
+
"page_idx": 4
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "4.2 TRAINING DETAILS ",
|
| 188 |
+
"text_level": 1,
|
| 189 |
+
"page_idx": 4
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"type": "text",
|
| 193 |
+
"text": "For System-1, we use DePlot as the backbone visual language model and fine-tune it on the synthetic dataset we created for atomic operations. We generate a total of 774, 019 examples using templates with the ChartQA and PlotQA training sets (17, 014 for Describe, 362, 955 for Extract-Point, and 273, 657 for Extract-Group. In Appendix A.1.2 we have provided some examples of the generated data. We set the batch size as 256, the learning rate as $1 e - 5$ and the training steps as 10K. For System-2, we use the 70B variant of the recently published LLaMA-2 (Touvron et al., 2023) family of models. Since we only use a handful of expert-annotated training examples $\\Longleftarrow 1 0 0$ ), we use a very small batch size of 8 and set the learning rate as $1 e - 6$ . We train for a maximum optimization steps of 20 and apply the language modeling loss on the text generated only by System-2 as discussed in $\\ S 3 . 2$ . ",
|
| 194 |
+
"page_idx": 4
|
| 195 |
+
},
|
| 196 |
+
{
|
| 197 |
+
"type": "text",
|
| 198 |
+
"text": "4.3 BASELINE MODELS AND EVALUATION METRICS ",
|
| 199 |
+
"text_level": 1,
|
| 200 |
+
"page_idx": 4
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"type": "text",
|
| 204 |
+
"text": "To evaluate the ability of DOMINO for answering complex questions about charts/plots, we compare it with several fully-supervised end-to-end approaches as well as the pipeline approach that first converts the chart/plot to a table and then reasons over the table step-by-step. Similar to prior work (e.g., (Liu et al., 2023a)), we report “relaxed accuracy” which computes exact match for textual responses but allows a $5 \\%$ tolerance for numeric answers. We compare DOMINO against the following strong baselines: ",
|
| 205 |
+
"page_idx": 4
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"type": "text",
|
| 209 |
+
"text": "Fully-Supervised We consider the following state-of-the-art supervised approaches which were discussed in $\\ S 2$ : ChartT5 (Zhou et al., 2023b), Pix2Struct (Lee et al., 2023), MATCHA (Liu et al., 2023b), UniChart (Masry et al., 2023), and PaLI-X (Chen et al., 2023a). ",
|
| 210 |
+
"page_idx": 4
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "Few-shot DePlot DePlot (Liu et al., 2023a) is a pipeline approach where a model is first trained to translate an image to a textual table, and then different LLMs are used to reason over the table via few-shot learning with Chain-of-Thought (CoT) prompting (Wei et al., 2022). We compare against this model with the following LLMs: GPT3 (Brown et al., 2020), FlanPaLM (540B) (Chung et al., 2022), LLaMa-2 (70B) (Touvron et al., 2023), and GPT4 (OpenAI, 2023). Following Liu et al. (2023a), we adopt both (1) sampling and (2) self-consistency (SC) decoding (Wang et al., 2023), which samples a set of generations and chooses the majority-voted answer, and use a temperature of 0.4. The 1-Shot prompt used in DePlot consists of 1 table with 5 question-answer pairs. However, this may mislead the LLM to assume that the new question is from the same context since we do not have any tables in the prompt. To align with our method, we also experiment with a 5-Shot prompt consisting of 5 tables, each with 1 question-answer pair (see Appendix A.2). ",
|
| 215 |
+
"page_idx": 4
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"type": "table",
|
| 219 |
+
"img_path": "images/34e7abb6928585327dee7a7f9c6046da3b1053b3fadc5fdf42f7545ed8108c40.jpg",
|
| 220 |
+
"table_caption": [
|
| 221 |
+
"Table 1: Main results of the compared methods on downstream tasks. Best numbers are in bold and second best numbers are underlined. We re-evaluate the DePlot model with GPT-3 on our sampled subsets of PlotQA (marked by ∗). The results for other baselines (if available) are from the papers cited in the table. The 1-Shot prompt used in DePlot consists of 1 table with 5 question-answer pairs, while the 5-Shot prompt we use consists of 5 tables with 1 question-answer pair each. "
|
| 222 |
+
],
|
| 223 |
+
"table_footnote": [],
|
| 224 |
+
"table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">ChartQA</td><td colspan=\"3\">PlotQA</td></tr><tr><td>Aug.</td><td>Human</td><td>Avg.</td><td>V1</td><td>V2</td><td>Avg.</td></tr><tr><td>Fully-Supervised</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ChartT5 (Zhou et al.,2023b)</td><td>74.4</td><td>31.8</td><td>53.2</td><td></td><td>=</td><td>=</td></tr><tr><td>Pix2Struct (Lee et al., 2023)</td><td>81.6</td><td>30.5</td><td>56.1</td><td>73.2</td><td>71.9</td><td>72.6</td></tr><tr><td>MATCHA (Liu et al., 2023b)</td><td>90.2</td><td>38.2</td><td>64.2</td><td>92.3</td><td>90.7</td><td>91.5</td></tr><tr><td>UniChart (Masry et al.,2023)</td><td>88.6</td><td>43.9</td><td>66.2</td><td>1</td><td></td><td></td></tr><tr><td>PaLI-X (Chen et al.,2023a)</td><td>1</td><td></td><td>70.9</td><td>1</td><td>=</td><td>=</td></tr><tr><td>PaLI-X with OCR (Chen et al.,2023a)</td><td>1</td><td>=</td><td>72.3</td><td></td><td>=</td><td>=</td></tr><tr><td>Few-Shot DePlot</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>GPT3 (1-Shot) (Liu et al.,2023a)</td><td>37.3</td><td>36.5</td><td>36.9</td><td>*31.6</td><td>*42.2</td><td>*36.9</td></tr><tr><td>FlanPaLM (540B) (1-Shot) (Liu et al.,2023a)</td><td>76.7</td><td>57.8</td><td>67.3</td><td>51.3</td><td>44.9</td><td>48.1</td></tr><tr><td>FlanPaLM (540B) (1-Shot, SC) (Liu et al.,2023a)</td><td>78.8</td><td>62.2</td><td>70.5</td><td>57.8</td><td>50.1</td><td>53.9</td></tr><tr><td>LLaMA-2 (70B) (1-Shot)</td><td>86.5</td><td>53.5</td><td>70.0</td><td>32.5</td><td>43.4</td><td>37.9</td></tr><tr><td>GPT4 (5-Shot)</td><td>83.8</td><td>61.4</td><td>72.6</td><td></td><td>-</td><td>-</td></tr><tr><td>LLaMA-2 (70B) (5-Shot)</td><td>87.4</td><td>59.4</td><td>73.4</td><td>43.2</td><td>44.7</td><td>43.9</td></tr><tr><td>Other Pipeline Approaches</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ChartReader (Cheng et al., 2023a)</td><td></td><td></td><td>52.6</td><td>78.1</td><td>59.3</td><td>68.7</td></tr><tr><td>DOMINO (our method)</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LLaMA-2 (70B) (5-Shot)</td><td>88.6</td><td>59.3</td><td>74.0</td><td>53.1</td><td>59.0</td><td>56.1</td></tr><tr><td>- without Describe</td><td>77.4</td><td>45.6</td><td>61.5</td><td>40.5</td><td>62.7</td><td>51.6</td></tr><tr><td>LlaMa-2 (70B) (5-Shot, SC)</td><td>90.3</td><td>61.4</td><td>75.8</td><td>57.3</td><td>71.3</td><td>64.3</td></tr><tr><td>Fine-tuned LLaMA-2 (70B) (5-shot)</td><td>91.7</td><td>61.7</td><td>76.7</td><td>55.1</td><td>71.3</td><td>63.2</td></tr><tr><td>Fine-tuned LLaMA-2 (70B) (5-shot, SC)</td><td>91.8</td><td>64.1</td><td>78.0</td><td>58.9</td><td>80.7</td><td>69.8</td></tr></table>",
|
| 225 |
+
"page_idx": 5
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"type": "text",
|
| 229 |
+
"text": "",
|
| 230 |
+
"page_idx": 5
|
| 231 |
+
},
|
| 232 |
+
{
|
| 233 |
+
"type": "text",
|
| 234 |
+
"text": "5 MAIN RESULTS ",
|
| 235 |
+
"text_level": 1,
|
| 236 |
+
"page_idx": 5
|
| 237 |
+
},
|
| 238 |
+
{
|
| 239 |
+
"type": "text",
|
| 240 |
+
"text": "Table 1 reports the results of comparing our method against fully-supervised and pipeline methods on ChartQA and PlotQA. We observe that: (1) Without fine-tuning, DOMINO already outperforms the best fully-supervised method (PaLI-X with OCR) on the ChartQA dataset $( 7 2 . 3 \\% $ $7 5 . 8 \\%$ ), where the questions are more diverse and complex. This demonstrates the effectiveness of DOMINO in handling such questions by leveraging the strong language understanding and task decomposition capabilities of the LLM. The fully-supervised methods do perform better than both DePlot and DOMINO on PlotQA. This is because PlotQA is a synthetic dataset with templatebased and restricted types of questions. The fully-supervised methods can learn the bias in data encoded in the large training set (with over 100M examples) as pointed out by Liu et al. (2023a). (2) DOMINO also outperforms DePlot using either GPT3, LLaMA-2 (70B) or the much larger FlanPaLM (540B) model on both ChartQA and PlotQA, and DePlot with GPT4 on ChartQA1. This demonstrates the benefits of DOMINO which allows more interactions between the language and the vision components, and does not introduce redundant information as DePlot does when converting a chart into a table2. (3) With minor fine-tuning using only a handful of 100 examples annotated with the reasoning process, we can further improve the performance of DOMINO on both ChartQA and PlotQA. We study data efficiency in $\\ S \\ O 6$ . Notably, with self-consistency decoding, DOMINO outperforms the best fully-supervised method by $5 . { \\dot { 7 } } \\%$ in accuracy on ChartQA and we also observe a large performance boost $( 7 1 . 3 \\% 8 0 . 7 \\% )$ ) on PlotQA-V2 which contains more numerical reasoning questions. ",
|
| 241 |
+
"page_idx": 5
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"type": "table",
|
| 245 |
+
"img_path": "images/cc83bab02bab19a75c72a8112adfbde42aa828663775e273e82ee39267b0f31a.jpg",
|
| 246 |
+
"table_caption": [
|
| 247 |
+
"Table 2: Experimental results of the compared methods on the out-of-distribution datasets. Best numbers are in bold and the second best numbers are underlined. Our results are reported on 10K random sample of the corresponding evaluation sets. The results for other baselines are from their papers as cited in the table. "
|
| 248 |
+
],
|
| 249 |
+
"table_footnote": [],
|
| 250 |
+
"table_body": "<table><tr><td>Method</td><td>DVQA</td><td colspan=\"2\">FigureQA</td></tr><tr><td></td><td>Test-Novel (Reasoning)</td><td>Val1</td><td>Val2</td></tr><tr><td colspan=\"4\">Seen at Training</td></tr><tr><td>State-of-the-Art PReFIL (no OCR) (Kafle et al.,2020)</td><td></td><td></td><td></td></tr><tr><td>PReFIL (with OCR) (Kafle et al., 2020)</td><td>49.2 80.7</td><td>=</td><td>一</td></tr><tr><td>ChartReader (Cheng et al., 2023a)</td><td>1</td><td>95.5</td><td>95.8</td></tr><tr><td colspan=\"4\"></td></tr><tr><td colspan=\"4\">Unseen at Training</td></tr><tr><td>Few-Shot DePlot</td><td></td><td></td><td></td></tr><tr><td>LLaMA-2 (1-Shot)</td><td>40.3</td><td>55.6</td><td>55.7</td></tr><tr><td>LLaMA-2 (5-Shot)</td><td>54.2</td><td>61.6</td><td>61.2</td></tr><tr><td>DOMINO (our method)</td><td></td><td>63.2</td><td>62.7</td></tr><tr><td>LLaMA-2 (5-Shot)</td><td>55.2</td><td></td><td></td></tr><tr><td>Fine-tuned LLaMA-2 (5-shot)</td><td>55.4</td><td>64.7</td><td>64.4</td></tr></table>",
|
| 251 |
+
"page_idx": 6
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"type": "text",
|
| 255 |
+
"text": "",
|
| 256 |
+
"page_idx": 6
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"type": "text",
|
| 260 |
+
"text": "In Table 2, we report the results of DePlot and DOMINO on out-of-distribution (OOD) datasets including DVQA and FigureQA, and compare them with fully-supervised methods. Here the OOD setting means that neither System-1 nor System-2 of DOMINO is fine-tuned on the experimented datasets. DOMINO does not outperform the supervised methods due to the synthetic nature of these datasets and the fact that both PReFIL and ChartReader were fine-tuned on the training partitions of DVQA and FigureQA, respectively. However, with regard to few-shot approaches, results show that DOMINO generalizes better than DePlot. Future work could enhance DOMINO with a more advanced vision module to improve generalization capabilities. ",
|
| 261 |
+
"page_idx": 6
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"type": "text",
|
| 265 |
+
"text": "6 ANALYSIS & DISCUSSION ",
|
| 266 |
+
"text_level": 1,
|
| 267 |
+
"page_idx": 6
|
| 268 |
+
},
|
| 269 |
+
{
|
| 270 |
+
"type": "text",
|
| 271 |
+
"text": "Effectiveness of image description in addressing hallucination In this ablation study, we investigate the effectiveness of the Describe operation in providing the initial context to System-2 so that System-2 asks valid queries afterwards. We prompt System-2 with examples where Describe is not used at all. The performance of the resulting DOMINO variant is shown in Table 1 (without Describe). We observe that discarding the Describe step generally leads to a considerable performance drop of DOMINO except on the PlotQA-V2 split. This demonstrates the effectiveness of the Describe step in providing the necessary context for System-2 to generate the right decomposition steps, especially when the questions are flexible in terms of wording and may not provide enough information for reasoning as the synthetic questions from PlotQA-V2 do. ",
|
| 272 |
+
"page_idx": 6
|
| 273 |
+
},
|
| 274 |
+
{
|
| 275 |
+
"type": "text",
|
| 276 |
+
"text": "Skills learnt from fine-tuning System-2 We see significant improvement by fine-tuning System-2 in Table 1 and would like to investigate how the skills learnt from fine-tuning, i.e., task decomposition and answer deduction, contribute differently to the overall performance. We fine-tune System-2 by applying the language modeling loss only on (1) the intermediate queries $\\left\\{ q _ { i } \\right\\}$ or (2) the concluding sentence leading to the final answer $a$ . The results are shown in Table 3, where we have opposite observations on ChartQA and PlotQA, which reveals that the supervision on the intermediate process is not always beneficial. On ChartQA, we see a larger performance drop from fine-tuning ",
|
| 277 |
+
"page_idx": 6
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"type": "table",
|
| 281 |
+
"img_path": "images/623089cf51f791f6087b59ebae84031e5c7650bf9f171e73bfebecfb8b55e0a4.jpg",
|
| 282 |
+
"table_caption": [
|
| 283 |
+
"Table 3: Ablation study on how the task decomposition and answer deduction skills learnt in finetuning contribute differently to the overall performance. Method indicates what the language modeling loss was applied to. "
|
| 284 |
+
],
|
| 285 |
+
"table_footnote": [],
|
| 286 |
+
"table_body": "<table><tr><td rowspan=\"2\">Method</td><td colspan=\"3\">ChartQA</td><td colspan=\"3\">PlotQA</td></tr><tr><td>Aug.</td><td>Human</td><td>Avg.</td><td>V1</td><td>V2</td><td>Avg.</td></tr><tr><td>Fine-tuned LLaMA-2</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Answering Steps</td><td>86.3</td><td>48.1</td><td>67.2</td><td>51.1</td><td>76.8</td><td>64.0</td></tr><tr><td>Decomposition Steps</td><td>87.6</td><td>56.6</td><td>72.1</td><td>48.5</td><td>76.0</td><td>62.3</td></tr><tr><td>Answering and Decomposition Steps</td><td>91.7</td><td>61.7</td><td>76.7</td><td>55.1</td><td>71.3</td><td>63.2</td></tr></table>",
|
| 287 |
+
"page_idx": 7
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"type": "image",
|
| 291 |
+
"img_path": "images/3926c875d52e6e584a0aab49fc27c4d781becb11aef47cf875548c139f6dc8fe.jpg",
|
| 292 |
+
"image_caption": [
|
| 293 |
+
"Figure 2: Performance grouped by the complexity of the underlying tables of the charts. The x-axes show the length of the underlying table of a chart. The left y-axes show the ratios of the questions in each length interval indicated by the green bars. "
|
| 294 |
+
],
|
| 295 |
+
"image_footnote": [],
|
| 296 |
+
"page_idx": 7
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"type": "text",
|
| 300 |
+
"text": "System-2 only on answer deduction. This demonstrates that LLMs struggle with task decomposition more than answer deduction when the questions are more natural. On PlotQA, however, we see a larger performance drop coming from fine-tuning System-2 only on decomposition steps for V1 and even performance gains from fine-tuning System-2 only on answer deduction or decomposition steps for V2. This is because the question types in PlotQA are rather restricted and in this case the LLM benefits more from just learning how to deduce the answer. ",
|
| 301 |
+
"page_idx": 7
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"type": "text",
|
| 305 |
+
"text": "Robustness in handling complex charts We investigate whether the multi-interplay between language and vision allows DOMINO to perform robustly on more complex charts. Here, we use the length of the underlying table of a chart as a measurement of its complexity, and accordingly group the accuracy scores of DePlot and DOMINO (with a frozen or fine-tuned System-2) by the table length as shown in Figure 2. We observe that DOMINO (either frozen or fine-tuned) performs consistently better than DePlot on increasingly complex charts. This verifies the downside of converting charts to tables before reasoning as done in DePlot as it introduces redundant information and is error-prone, especially when the chart is very complex. DOMINO does not have this issue as we only require System-1 to obtain the necessary information required by one reasoning step. ",
|
| 306 |
+
"page_idx": 7
|
| 307 |
+
},
|
| 308 |
+
{
|
| 309 |
+
"type": "text",
|
| 310 |
+
"text": "Data efficiency of reasoning-based fine-tuning We study how DOMINO performs across different amount of training data. As comparison, we also fine-tune the LLM in DePlot on the same examples but annotated with chain-of-thought on tables. The results are shown in Figure 3. We observe that fine-tuned DOMINO generally outperforms fine-tuned DePlot across different numbers of training examples. One thing to note is that we do need sufficient examples to elicit the reasoning capabilities from the LLM so that it can outperform the frozen LLM (over 50 for PlotQA-V1 and over 20 for PlotQA-V2). Meanwhile, fine-tuning System-2 does not hurt DOMINO’s OOD performance on DVQA, regardless of the number of training examples. In comparison, fine-tuning DePlot leads to worse OOD performance when more than 10 training examples are used. ",
|
| 311 |
+
"page_idx": 7
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"type": "text",
|
| 315 |
+
"text": "Inference efficiency Although there may be multiple calls to the vision module in DOMINO, DOMINO is more efficient compared to the few-shot DePlot model due to two reasons: (1) The vision module in DOMINO only needs to generate the required information based on the image while the vision module in DePlot needs to generate the whole table, which can be arbitrarily long. (2) As a result of (1), DOMINO does not need to take as input the whole table sequence which would consume a large part of the context window in the LM of DePlot. ",
|
| 316 |
+
"page_idx": 7
|
| 317 |
+
},
|
| 318 |
+
{
|
| 319 |
+
"type": "image",
|
| 320 |
+
"img_path": "images/ee576c404be8bee82dbd788663132036e1c4b530e10ae0c6351ce96c9d2aebfa.jpg",
|
| 321 |
+
"image_caption": [
|
| 322 |
+
"Figure 3: Ablation study on how number of fine-tuning examples affects performance of the LLM. The LLM in both methods are not fine-tuned when the number of training examples equals to 0. "
|
| 323 |
+
],
|
| 324 |
+
"image_footnote": [],
|
| 325 |
+
"page_idx": 8
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"type": "text",
|
| 329 |
+
"text": "Table 4: Case studies on ChartQA-human. The underlined text represents the errors made by the models. See Appendix A.3 for associated charts. ",
|
| 330 |
+
"page_idx": 8
|
| 331 |
+
},
|
| 332 |
+
{
|
| 333 |
+
"type": "table",
|
| 334 |
+
"img_path": "images/8bb0042fa9364c64167e05bf652f32a6d57c257c831632ef7576db2a399ef9e0.jpg",
|
| 335 |
+
"table_caption": [],
|
| 336 |
+
"table_footnote": [],
|
| 337 |
+
"table_body": "<table><tr><td>Chart Se Whiarstleti dada ndieretageg</td><td>Chart: See Figure 4 right in appendix. Qdstion: Whatisertysofpople inPilipins</td></tr><tr><td rowspan=\"3\">Deplot Generated Table: Country 丨 Expenditures on general government outsourcing (%GDP) Germany 113.4 Norway|9.41 Turkeyi7.54</td><td>DOMINO (frozen)</td></tr><tr><td>Let's describe the figure. The figure shows the data of: Share of people...</td></tr><tr><td>The x-axis shows: Malaysia | Philippines I Ghana | Switzerland. of Share of people...</td></tr><tr><td rowspan=\"3\">Grnerated CoT:Let's find the rowof Turkey, hat'sRow 4.Let’s find the number for Turkey,that's 7.11. The answer is 7.11.X DOMINO (frozen)</td><td></td></tr><tr><td>The data is 27.58. The average share of people in Philippines and Ghana who ... is (27.58+27.58)/2=27.58.So theanswer is 27.58.X</td></tr><tr><td>DOMINO (fine-tuned)</td></tr><tr><td>The figure shows the dataof: Expenditures on general government outsourcing (dark blue). The x-axis shows: Germany |Norway|Turkey Greece.</td><td>... # same description as DOMINO (frozen) Let's extract the data of Share of people who... BY Philippines.</td></tr><tr><td></td><td>The data is 38.92. Let's extract the dataof Share of people who... BY Ghana.</td></tr><tr><td>The data is 7.54.</td><td></td></tr><tr><td>Theanswer is7.54.√</td><td>The data is 27.58. The average is (38.92+27.58)/2=33.25.So the answeris 33.25.√</td></tr></table>",
|
| 338 |
+
"page_idx": 8
|
| 339 |
+
},
|
| 340 |
+
{
|
| 341 |
+
"type": "text",
|
| 342 |
+
"text": "Error Analysis Since PlotQA is a synthetic dataset, we have information about the template types that were used to generate questions. Appendix Table 7 shows the breakdown of errors per template type for the PlotQA-V2 dataset. Across all template types we see that DOMINO yields improvements, but the most significant reductions in errors are for questions that require reasoning (i.e., arithmetic, compound, comparison, min-max) where we see reductions of $4 5 \\%$ to $6 8 \\%$ in errors when comparing the fine-tuned model against the DePlot model. ",
|
| 343 |
+
"page_idx": 8
|
| 344 |
+
},
|
| 345 |
+
{
|
| 346 |
+
"type": "text",
|
| 347 |
+
"text": "To illustrate the difference between different models, Table 4 shows examples from the ChartQAhuman set. Table 4 (left) shows an example where DePlot correctly predicts the underlying table of the chart yet fails to extract the right value from the table due to the redundant information. By contrast, DOMINO only extracts the necessary information by generating a specific query to System-1 and thus answers correctly. Table 4 (right) shows an example where System-2 of DOMINO fails to leverage the information from the previous reasoning step (that Philippines and Ghana are two data groups in the chart) and thus generates an invalid query to System-1. Through fine-tuning, System-2 learns to properly decompose the question and generates the right queries to obtain the intermediate results. ",
|
| 348 |
+
"page_idx": 8
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"type": "text",
|
| 352 |
+
"text": "7 CONCLUSION ",
|
| 353 |
+
"text_level": 1,
|
| 354 |
+
"page_idx": 8
|
| 355 |
+
},
|
| 356 |
+
{
|
| 357 |
+
"type": "text",
|
| 358 |
+
"text": "In this paper, we introduce DOMINO, a dual-system for multi-step multimodal reasoning. DOMINO alternates between two key modules, System-1 for targeted information extraction from images and System-2 for task decomposition and answer generation. We compare our model’s performance against both supervised and pipeline approaches on different chart/plot question answering datasets, and achieve better or comparable results. Further analysis shows that: (1) A general description of the chart helps System-2 better at task decomposition. (2) DOMINO is more robust in terms of handling complex charts. (3) Training System-2 for better performance is data-efficient, but System-2 benefits differently from the skills acquired during fine-tuning. ",
|
| 359 |
+
"page_idx": 8
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"type": "text",
|
| 363 |
+
"text": "ETHICS STATEMENT ",
|
| 364 |
+
"text_level": 1,
|
| 365 |
+
"page_idx": 9
|
| 366 |
+
},
|
| 367 |
+
{
|
| 368 |
+
"type": "text",
|
| 369 |
+
"text": "Step-by-step reasoning to derive an answer from large models builds transparency and trust for users, and eases bug-fixing. In this context, we hope our work builds transparency by providing the intermediate steps used to derive at an answer. However, similar to other works on question answering from charts, our models could possibly be abused to mislead the public about the charts content and implications. Although our models obtain comparable or state-of-the-art results on the datasets we evaluated, we can not guarantee that the output of these models will always be correct. We have shared our hyper-parameter settings in the paper to ensure the reproducibility of our experimental results and we will open source our code to Github. ",
|
| 370 |
+
"page_idx": 9
|
| 371 |
+
},
|
| 372 |
+
{
|
| 373 |
+
"type": "text",
|
| 374 |
+
"text": "REFERENCES \nMubashara Akhtar, Oana Cocarascu, and Elena Simperl. Reading and reasoning over chart images for evidence-based automated fact-checking. In Findings of the Association for Computational Linguistics: EACL 2023, pp. 399–414, Dubrovnik, Croatia, May 2023. Association for Computational Linguistics. URL https://aclanthology.org/2023.findings-eacl.30. \nEwa Andrejczuk, Julian Eisenschlos, Francesco Piccinno, Syrine Krichene, and Yasemin Altun. Table-to-text generation and pre-training with TabT5. In Findings of the Association for Computational Linguistics: EMNLP 2022, pp. 6758–6766, Abu Dhabi, United Arab Emirates, December 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.findings-emnlp.503. URL https://aclanthology.org/2022.findings-emnlp.503. \nAbhijit Balaji, Thuvaarakkesh Ramanathan, and Venkateshwarlu Sonathi. Chart-text: A fully automated chart image descriptor. CoRR, abs/1812.10636, 2018. URL http://arxiv.org/ abs/1812.10636. \nTom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin (eds.), Advances in Neural Information Processing Systems, volume 33, pp. 1877–1901. Curran Associates, Inc., 2020. URL https://proceedings.neurips.cc/paper_files/paper/2020/ file/1457c0d6bfcb4967418bfb8ac142f64a-Paper.pdf. \nRitwick Chaudhry, Sumit Shekhar, Utkarsh Gupta, Pranav Maneriker, Prann Bansal, and Ajay Joshi. Leaf-qa: Locate, encode & attend for figure question answering, 2019. \nMark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Josh Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. Evaluating large language models trained on code, 2021. \nWenhu Chen. Large language models are few(1)-shot table reasoners. In Findings of the Association for Computational Linguistics: EACL 2023, pp. 1120–1130, Dubrovnik, Croatia, May 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.findings-eacl.83. URL https://aclanthology.org/2023.findings-eacl.83. \nWenhu Chen, Xueguang Ma, Xinyi Wang, and William W. Cohen. Program of thoughts prompting: Disentangling computation from reasoning for numerical reasoning tasks, 2022. \nXi Chen, Josip Djolonga, Piotr Padlewski, Basil Mustafa, Soravit Changpinyo, Jialin Wu, Carlos Riquelme Ruiz, Sebastian Goodman, Xiao Wang, Yi Tay, Siamak Shakeri, Mostafa Dehghani, Daniel Salz, Mario Lucic, Michael Tschannen, Arsha Nagrani, Hexiang Hu, Mandar Joshi, Bo Pang, Ceslee Montgomery, Paulina Pietrzyk, Marvin Ritter, AJ Piergiovanni, Matthias Minderer, Filip Pavetic, Austin Waters, Gang Li, Ibrahim Alabdulmohsin, Lucas Beyer, Julien Amelot, Kenton Lee, Andreas Peter Steiner, Yang Li, Daniel Keysers, Anurag Arnab, Yuanzhong Xu, Keran Rong, Alexander Kolesnikov, Mojtaba Seyedhosseini, Anelia Angelova, Xiaohua Zhai, Neil Houlsby, and Radu Soricut. Pali-x: On scaling up a multilingual vision and language model, 2023a. \nXi Chen, Xiao Wang, Soravit Changpinyo, AJ Piergiovanni, Piotr Padlewski, Daniel Salz, Sebastian Goodman, Adam Grycner, Basil Mustafa, Lucas Beyer, Alexander Kolesnikov, Joan Puigcerver, Nan Ding, Keran Rong, Hassan Akbari, Gaurav Mishra, Linting Xue, Ashish V Thapliyal, James Bradbury, Weicheng Kuo, Mojtaba Seyedhosseini, Chao Jia, Burcu Karagol Ayan, Carlos Riquelme Ruiz, Andreas Peter Steiner, Anelia Angelova, Xiaohua Zhai, Neil Houlsby, and Radu Soricut. PaLI: A jointly-scaled multilingual language-image model. In The Eleventh International Conference on Learning Representations, 2023b. URL https: //openreview.net/forum?id $\\equiv$ mWVoBz4W0u. \nZhi-Qi Cheng, Qi Dai, Siyao Li, Jingdong Sun, Teruko Mitamura, and Alexander G. Hauptmann. Chartreader: A unified framework for chart derendering and comprehension without heuristic rules, 2023a. \nZhoujun Cheng, Tianbao Xie, Peng Shi, Chengzu Li, Rahul Nadkarni, Yushi Hu, Caiming Xiong, Dragomir Radev, Mari Ostendorf, Luke Zettlemoyer, Noah A. Smith, and Tao Yu. Binding language models in symbolic languages. In The Eleventh International Conference on Learning Representations, 2023b. URL https://openreview.net/forum?id $=$ lH1PV42cbF. \nHyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Yunxuan Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Alex Castro-Ros, Marie Pellat, Kevin Robinson, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Yu, Vincent Zhao, Yanping Huang, Andrew Dai, Hongkun Yu, Slav Petrov, Ed H. Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. Scaling instruction-finetuned language models, 2022. \nJonathan St BT Evans. In two minds: dual-process accounts of reasoning. Trends in cognitive sciences, 7(10):454–459, 2003. \nAnirudh Goyal and Yoshua Bengio. Inductive biases for deep learning of higher-level cognition, 2022. \nEnamul Hoque, Parsa Kavehzadeh, and Ahmed Masry. Chart question answering: State of the art and future directions. In Computer Graphics Forum, volume 41-3, pp. 555–572. Wiley Online Library, 2022. \nDaekyoung Jung, Wonjae Kim, Hyunjoo Song, Jeongin Hwang, Bongshin Lee, Bo Hyoung Kim, and Jinwook Seo. Chartsense: Interactive data extraction from chart images. Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems, 2017. URL https://api. semanticscholar.org/CorpusID:6242305. \nKushal Kafle, Brian Price, Scott Cohen, and Christopher Kanan. Dvqa: Understanding data visualizations via question answering, 2018. \nKushal Kafle, Robik Shrestha, Brian Price, Scott Cohen, and Christopher Kanan. Answering questions about data visualizations using efficient bimodal fusion, 2020. \nDaniel Kahneman. Thinking, fast and slow. New York, NY: Macmillan, 2011. \nSamira Ebrahimi Kahou, Vincent Michalski, Adam Atkinson, Akos Kadar, Adam Trischler, and Yoshua Bengio. Figureqa: An annotated figure dataset for visual reasoning, 2018. ",
|
| 375 |
+
"page_idx": 9
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "text",
|
| 379 |
+
"text": "",
|
| 380 |
+
"page_idx": 10
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"type": "text",
|
| 384 |
+
"text": "Kenton Lee, Mandar Joshi, Iulia Turc, Hexiang Hu, Fangyu Liu, Julian Eisenschlos, Urvashi Khandelwal, Peter Shaw, Ming-Wei Chang, and Kristina Toutanova. Pix2struct: Screenshot parsing as pretraining for visual language understanding, 2023. ",
|
| 385 |
+
"page_idx": 11
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"type": "text",
|
| 389 |
+
"text": "Fangyu Liu, Julian Martin Eisenschlos, Francesco Piccinno, Syrine Krichene, Chenxi Pang, Kenton Lee, Mandar Joshi, Wenhu Chen, Nigel Collier, and Yasemin Altun. Deplot: One-shot visual language reasoning by plot-to-table translation, 2023a. ",
|
| 390 |
+
"page_idx": 11
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"type": "text",
|
| 394 |
+
"text": "Fangyu Liu, Francesco Piccinno, Syrine Krichene, Chenxi Pang, Kenton Lee, Mandar Joshi, Yasemin Altun, Nigel Collier, and Julian Martin Eisenschlos. Matcha: Enhancing visual language pretraining with math reasoning and chart derendering, 2023b. ",
|
| 395 |
+
"page_idx": 11
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"type": "text",
|
| 399 |
+
"text": "Junyu Luo, Zekun Li, Jinpeng Wang, and Chin-Yew Lin. Chartocr: Data extraction from charts images via a deep hybrid framework. In 2021 IEEE Winter Conference on Applications of Computer Vision (WACV). The Computer Vision Foundation, January 2021. URL https://www.microsoft.com/en-us/research/publication/ chartocr-data-extraction-from-charts-images-via-a-deep-hybrid-frame ",
|
| 400 |
+
"page_idx": 11
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"type": "text",
|
| 404 |
+
"text": "Ahmed Masry, Do Xuan Long, Jia Qing Tan, Shafiq Joty, and Enamul Hoque. Chartqa: A benchmark for question answering about charts with visual and logical reasoning, 2022. ",
|
| 405 |
+
"page_idx": 11
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "text",
|
| 409 |
+
"text": "Ahmed Masry, Parsa Kavehzadeh, Xuan Long Do, Enamul Hoque, and Shafiq Joty. Unichart: A universal vision-language pretrained model for chart comprehension and reasoning, 2023. ",
|
| 410 |
+
"page_idx": 11
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "Nitesh Methani, Pritha Ganguly, Mitesh M. Khapra, and Pratyush Kumar. Plotqa: Reasoning over scientific plots, 2020. ",
|
| 415 |
+
"page_idx": 11
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"type": "text",
|
| 419 |
+
"text": "OpenAI. Gpt-4 technical report, 2023. ",
|
| 420 |
+
"page_idx": 11
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "text",
|
| 424 |
+
"text": "Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel Kloumann, Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov, Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith, Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan, Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, and Thomas Scialom. Llama 2: Open foundation and fine-tuned chat models, 2023. ",
|
| 425 |
+
"page_idx": 11
|
| 426 |
+
},
|
| 427 |
+
{
|
| 428 |
+
"type": "text",
|
| 429 |
+
"text": "Xuezhi Wang, Jason Wei, Dale Schuurmans, Quoc Le, Ed Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models, 2023. ",
|
| 430 |
+
"page_idx": 11
|
| 431 |
+
},
|
| 432 |
+
{
|
| 433 |
+
"type": "text",
|
| 434 |
+
"text": "Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian ichter, Fei Xia, Ed H. Chi, Quoc V Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems, 2022. URL https://openreview.net/ forum?id $=$ _VjQlMeSB_J. ",
|
| 435 |
+
"page_idx": 11
|
| 436 |
+
},
|
| 437 |
+
{
|
| 438 |
+
"type": "text",
|
| 439 |
+
"text": "Ping Yu, Tianlu Wang, Olga Golovneva, Badr AlKhamissi, Siddharth Verma, Zhijing Jin, Gargi Ghosh, Mona Diab, and Asli Celikyilmaz. ALERT: Adapt language models to reasoning tasks. In Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1055–1081, Toronto, Canada, July 2023. Association for Computational Linguistics. doi: 10.18653/v1/2023.acl-long.60. URL https://aclanthology.org/2023. acl-long.60. ",
|
| 440 |
+
"page_idx": 11
|
| 441 |
+
},
|
| 442 |
+
{
|
| 443 |
+
"type": "text",
|
| 444 |
+
"text": "Chunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, et al. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206, 2023a. ",
|
| 445 |
+
"page_idx": 11
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"type": "text",
|
| 449 |
+
"text": "Mingyang Zhou, Yi Fung, Long Chen, Christopher Thomas, Heng Ji, and Shih-Fu Chang. Enhanced chart understanding via visual language pre-training on plot table pairs. In Findings of the Association for Computational Linguistics: ACL 2023, pp. 1314–1326, Toronto, Canada, July 2023b. Association for Computational Linguistics. doi: 10.18653/v1/2023.findings-acl.85. URL https://aclanthology.org/2023.findings-acl.85. ",
|
| 450 |
+
"page_idx": 12
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"type": "text",
|
| 454 |
+
"text": "A APPENDIX ",
|
| 455 |
+
"text_level": 1,
|
| 456 |
+
"page_idx": 12
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "text",
|
| 460 |
+
"text": "A.1 TRAINING AND EVALUATION DATASETS ",
|
| 461 |
+
"page_idx": 12
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "text",
|
| 465 |
+
"text": "A.1.1 DATASET STATISTICS ",
|
| 466 |
+
"page_idx": 12
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"type": "text",
|
| 470 |
+
"text": "We used the following datasets in this paper: ",
|
| 471 |
+
"page_idx": 12
|
| 472 |
+
},
|
| 473 |
+
{
|
| 474 |
+
"type": "text",
|
| 475 |
+
"text": "• ChartQA (Masry et al., 2022): A dataset of both human-authored and machine-generated questions about bar, line, and pie charts sourced from Statista (statista.com), The Pew research (pewresearch.org), Our World In Data or OWID (ourworldindata. org), and Organisation for Economic Co-operation and Development or OECD (oecd. org). The training set consists of 7, 398 human-authored questions over 3, 699 charts and 20, 901 machine-generated questions over 15, 474 charts. PlotQA (Methani et al., 2020): A dataset sourced from World Bank Open Data, Open Government Data, Global Terrorism Database which contain statistics about various indicator variables. The data contains positive integers, floating point values, percentages, and values on a linear scale, which range from 0 to $3 . 5 0 \\mathrm { e } + 1 5$ . The dataset consists of questions categorized into structural understanding, data retrieval and reasoning over bar plots, line plots, and scatter plots. This dataset does not consider any visual features of a chart (Masry et al., 2022). DVQA (Kafle et al., 2018): A synthetic dataset containing open ended questions about bar charts, where many questions refer to texts specific to corresponding charts. \n• FigureQA (Kahou et al., 2018): A synthetic dataset containing yes/no questions about line graphs, bar and pie charts. ",
|
| 476 |
+
"page_idx": 12
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"type": "text",
|
| 480 |
+
"text": "Dataset statistics of the test sets used in this paper are reported in the following table. For the synthetic datasets (i.e., PlotQA, DVQA, FigureQA), we randomly sample 10K examples for evaluation. ",
|
| 481 |
+
"page_idx": 12
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"type": "table",
|
| 485 |
+
"img_path": "images/f5cbf074bf9a1f6414ece740509a0dfc296e5bd08f848672946d40a04f97f23d.jpg",
|
| 486 |
+
"table_caption": [],
|
| 487 |
+
"table_footnote": [],
|
| 488 |
+
"table_body": "<table><tr><td>Dataset</td><td># Charts</td><td># QA Pairs</td></tr><tr><td>ChartQA (Aug.)</td><td>987</td><td>1250</td></tr><tr><td>ChartQA (Human)</td><td>625</td><td>1250</td></tr><tr><td>PlotQA V1</td><td>8643</td><td>10000</td></tr><tr><td>PlotQA V2</td><td>8252</td><td>10000</td></tr><tr><td>DVQA (reasoning)</td><td>9138</td><td>10000</td></tr><tr><td>FigureQA Val1</td><td>5000</td><td>5000</td></tr><tr><td>FigureQA Val2</td><td>5000</td><td>5000</td></tr></table>",
|
| 489 |
+
"page_idx": 12
|
| 490 |
+
},
|
| 491 |
+
{
|
| 492 |
+
"type": "text",
|
| 493 |
+
"text": "A.1.2 TEMPLATES FOR DATA GENERATION FOR SYSTEM-1 ",
|
| 494 |
+
"text_level": 1,
|
| 495 |
+
"page_idx": 12
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"type": "text",
|
| 499 |
+
"text": "We use templates with ChartQA and PlotQA training sets to generate the data for fine-tuning System-1. Tables 5 and 6 show the templates we used and examples of the generated data, respectively. ",
|
| 500 |
+
"page_idx": 12
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"type": "table",
|
| 504 |
+
"img_path": "images/39cdc4eccc5f32a7f3cb249aeac8191fd710ba5846ff85c7a8845d4befe515ec.jpg",
|
| 505 |
+
"table_caption": [
|
| 506 |
+
"Table 5: Templates for data generation for System-1. "
|
| 507 |
+
],
|
| 508 |
+
"table_footnote": [],
|
| 509 |
+
"table_body": "<table><tr><td>Atomic Operation</td><td>Template</td><td>Used Data</td></tr><tr><td>Describe</td><td>Let's describe the figure.</td><td>Use general figure info, color, text label and name from original annotations.</td></tr><tr><td>Extract-Point</td><td>Let's extract the data of <entity> BY <entity2>. Let's extract the data of <entity>.</td><td>Retrieve the value of a cell in a table specified by the two entities as row or column.</td></tr><tr><td>Extract-Group</td><td>Let's extract the data of <entity>. Let's extract all the values.</td><td>Use table header with values for the specified entity. If only one entity is present, then extract all values.</td></tr></table>",
|
| 510 |
+
"page_idx": 13
|
| 511 |
+
},
|
| 512 |
+
{
|
| 513 |
+
"type": "table",
|
| 514 |
+
"img_path": "images/649888dce63f005b01eeb584c952fe42da77ec0f93f772fd1d3e298856f99050.jpg",
|
| 515 |
+
"table_caption": [
|
| 516 |
+
"Table 6: Examples of the atomic operations generated using templates for ChartQA and PlotQA. "
|
| 517 |
+
],
|
| 518 |
+
"table_footnote": [],
|
| 519 |
+
"table_body": "<table><tr><td>Atomic Operation</td><td>Source</td><td>Question</td><td>Answer</td></tr><tr><td>Describe</td><td></td><td>ChartQALet's describe the figure.</td><td>The figure shows the data of: Income in million U.S. dollars (blue).The x-axis shows: Taylor Swift|Kylie Jenner|Kanye West |Lionel Messi |Ed Sheeran |Cristiano Ronaldo|Neymar丨The Eagles|Dr.Phil</td></tr><tr><td>Describe</td><td></td><td>PlotQALet's describe the figure.</td><td>McGraw |Canelo Alvarez. The figure shows the data of: Fragile and conflictaffected situations(grey)Iraq (brown)|Moldova (orange).The x-axis shows:2004|2005丨2006丨2007丨2004</td></tr><tr><td>Extract-Point</td><td>ChartQA</td><td>Let's extract the data of 2015.</td><td>|2005|2006|2007. The data is 296.0.</td></tr><tr><td>Extract-Point</td><td>PlotQA</td><td>Let's extract the data of Canada BY 1965.</td><td>The data is 20.82.</td></tr><tr><td>Extract-Group</td><td>ChartQA</td><td>Let's extract the data of Total market.</td><td>The data is 18 in 2019,20.0 in 2018,22.0 in 2017,23.0 in 2016,24.0 in 2015,25.0 in 2014,26.0 in 2013,27.0 in 2012,26.0 in 2011.</td></tr><tr><td>Extract-Group</td><td>PlotQA</td><td>Let's extract the data of 1994.</td><td>The data is O.16 in Merchandise exports, 0.36 in Merchandise imports.</td></tr></table>",
|
| 520 |
+
"page_idx": 13
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"type": "text",
|
| 524 |
+
"text": "Examples of the collected annotated data for System-2 are presented bellow. These examples are from PlotQA. Sentences that are input to the LLM are wrapped with [INST] tags. ",
|
| 525 |
+
"page_idx": 13
|
| 526 |
+
},
|
| 527 |
+
{
|
| 528 |
+
"type": "table",
|
| 529 |
+
"img_path": "images/e948f346cabe6b1318e727d562d69d701da763f38ef3a1904197b43a760cb2a7.jpg",
|
| 530 |
+
"table_caption": [],
|
| 531 |
+
"table_footnote": [],
|
| 532 |
+
"table_body": "<table><tr><td>[INST] Q: In how many years,is the value of the bar greater than 851? [/INST] A: Let’s describe the figure. [INST] The figure shows the data of: Neonatal deaths (green). The x-axis shows: 20oo|2001|2002 [2003|2004|2005.[/INST]</td></tr><tr><td>Let's extract the data of Neonatal deaths. [INST] The data is 853 in 2000,847 in 2001,822 in 2002,828 in 2003,818 in 2004,843 in 2005. [/INST]</td></tr><tr><td>The values that are greater than 851 are [853]. So the answer is 1.</td></tr><tr><td>[INST] Q: Across allyears, what is the minimum pupil-teacher ratio in Costa Rica? [/INST] A: Let's describe the figure. [INST] The figure shows the data of: Least developed countries (blue)| Cameroon (purple)| Costa</td></tr><tr><td>Rica (yellow)|Tajikistan (brown).The x-axis shows: 2000|2001|2006|2007|2008|2011.</td></tr><tr><td>[/INST] Let's extract the data of Costa Rica.</td></tr><tr><td>[INST] The data is 18.84 in 2000,19.57 in 2001,17.79 in 2006,17.91 in 2007,15.64 in 2008,14.92 in 2011. [/INST] The minimum value is 14.92 in 2011. So the answer is 14.92.</td></tr></table>",
|
| 533 |
+
"page_idx": 14
|
| 534 |
+
},
|
| 535 |
+
{
|
| 536 |
+
"type": "text",
|
| 537 |
+
"text": "A.2 EVALUATION PROMPTS ",
|
| 538 |
+
"text_level": 1,
|
| 539 |
+
"page_idx": 14
|
| 540 |
+
},
|
| 541 |
+
{
|
| 542 |
+
"type": "text",
|
| 543 |
+
"text": "Below is the 1-shot prompt used by DePlot (Liu et al., 2023a), which includes one table followed by five question and answer pairs: ",
|
| 544 |
+
"page_idx": 14
|
| 545 |
+
},
|
| 546 |
+
{
|
| 547 |
+
"type": "table",
|
| 548 |
+
"img_path": "images/cc2407379a39fcb57f61c973fd74d0e338f49c594c1795b38f486f74973d31c3.jpg",
|
| 549 |
+
"table_caption": [],
|
| 550 |
+
"table_footnote": [],
|
| 551 |
+
"table_body": "<table><tr><td colspan=\"4\">Readtnetablebelowtoanswerthefollowingquestions. Header: Year丨Democrats 丨Republicans丨Independents</td></tr><tr><td></td><td>Row 1: 2004 |68.1%|45.0%[53.0%</td><td></td><td></td></tr><tr><td></td><td>Row 2: 2006|58.0%|42.0% |53.0%</td><td></td><td></td></tr><tr><td></td><td>Row 3: 2007 |59.0% |38.0%|45.0%</td><td></td><td></td></tr><tr><td>Row 4: 2009| 72.0%</td><td></td><td>49.0% 60.0%</td><td></td></tr><tr><td></td><td>Row 5: 2011 | 71.0% | 51.2%</td><td>58.0%</td><td></td></tr><tr><td></td><td>Row 6: 2012 |70.0%|48.0% |53.0%</td><td></td><td></td></tr><tr><td></td><td></td><td>Row 7: 2013 |72.0%|41.0% |60.0%</td><td></td></tr><tr><td colspan=\"4\"></td></tr><tr><td></td><td></td><td>Q: In which year republicans have the lowest favor rate?</td><td></td></tr><tr><td colspan=\"4\">A: Let's find the column of republicans.Then let's extract the favor rates: [45.0,42.0,38.0, 49.0,</td></tr><tr><td colspan=\"4\">51.2,48.0,41.0]. The smallest number is 38.0,that's Row 3.Row 3 is year 2007. The answeris 2007.</td></tr><tr><td colspan=\"4\">Q: What is the sum of Democrats’ favor rates of 2004,2012,and 2013?</td></tr><tr><td colspan=\"4\"></td></tr><tr><td colspan=\"4\">A: Let's find the rows of years 2004,2012,and 2013.We find Row 1,6,7. The favor dates of Democrats on that 3 rows are 68.1,70.0,and 72.0. 68.1+70.0+72=210.1. The answer is 210.1.</td></tr><tr><td colspan=\"4\"></td></tr><tr><td colspan=\"4\">Q: By how many points do Independents surpass Republicans in the year of 2011?</td></tr><tr><td colspan=\"4\">A: Let's find the row with year = 2011. We find Row 5. We extract Independents and Republicans'</td></tr><tr><td colspan=\"4\">numbers. They are 58.0 and 51.2. 58.0-51.2=6.8. The answer is 6.8.</td></tr><tr><td colspan=\"4\">Q: Which group has the overall worst performance?</td></tr><tr><td colspan=\"4\">A: Let's sample a couple of years.In Row 1, year 2Oo4,we find Republicans having the lowest</td></tr><tr><td colspan=\"4\">favor rate 45.0 (since 45.0<68.1, 45.0<53.0). In year 2006,Row 2, we find Republicans having the</td></tr><tr><td colspan=\"4\">lowest favor rate 42.0 (42.0<58.0, 42.0<53.0). The trend continues to other years. The answer is</td></tr><tr><td colspan=\"4\">Republicans.</td></tr><tr><td colspan=\"4\"></td></tr><tr><td colspan=\"4\">Q: Which party has the second highest favor rates in 2007?</td></tr><tr><td colspan=\"4\">A: Let's find the row of year 20o7,that’s Row 3.Let's extract the numbers on Row 3: [59.0, 38.0,</td></tr><tr><td colspan=\"4\">45.0]. 45.0 is the second highest. 45.0 is the number of Independents.The answer is Independents.</td></tr><tr><td colspan=\"4\"></td></tr><tr><td colspan=\"4\">Read the table below to answer the following questions.</td></tr><tr><td colspan=\"4\"></td></tr><tr><td colspan=\"4\"></td></tr></table>",
|
| 552 |
+
"page_idx": 14
|
| 553 |
+
},
|
| 554 |
+
{
|
| 555 |
+
"type": "text",
|
| 556 |
+
"text": "Below is the alternate 5-shot prompt that we used for evaluating DePlot, which includes five tables with one question and answer pair for each: ",
|
| 557 |
+
"page_idx": 14
|
| 558 |
+
},
|
| 559 |
+
{
|
| 560 |
+
"type": "text",
|
| 561 |
+
"text": "Read the table to answer the following question. ",
|
| 562 |
+
"page_idx": 15
|
| 563 |
+
},
|
| 564 |
+
{
|
| 565 |
+
"type": "text",
|
| 566 |
+
"text": "Header: Entity | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 \nRow 1: Oman | 183.88 | 233.80 | 210.69 | 195.26 | 196.32 | 154.21 | 153.22 \nRow 2: Samoa | 40.72 | 40.04 | 39.21 | 40.63 | 41.47 | 41.76 | 42.77 \nQ: In which year the private health expenditure per person in Oman is 210.69? \nA: Let’s find the row of Oman, that’s Row 1. Let’s find the number 210.69, that’s for the year of 2010. The answer is 2010. Header: Year | NET Excellent/ good | NET Only fair/ poor \nRow 1: Feb 2014 | 54 | 39 \nRow 2: June 2015 | 55 | 0 \nRow 3: Jan 2018 | 45 | 46 \nRow 4: Sept. 2018 | 331 | 62 \nQ: By how many points does NET Excellent/good surpass NET Only fair/poor in the year of 2014? \nA: Let’s find the row of 2014, that’s Row 1. We extract NET Excellent/good’s and NET Only fair/poor’s numbers. They are 54.00 and 39.00. 54.00-39.00=15.00. The answer is 15.00. Header: Characteristic | Share of respondents \nRow 1: Very positive $1 \\%$ \nRow 2: Fairly positive $141 \\%$ \nRow 3: Fairly negative | $50 \\%$ \nRow 4: Very negative $11 \\%$ \nQ: How many perceptions have a value below $40 \\%$ in America? A: Let’s find the values that are below 40: [4, 11]. The answer is 2. ",
|
| 567 |
+
"page_idx": 15
|
| 568 |
+
},
|
| 569 |
+
{
|
| 570 |
+
"type": "text",
|
| 571 |
+
"text": "",
|
| 572 |
+
"page_idx": 15
|
| 573 |
+
},
|
| 574 |
+
{
|
| 575 |
+
"type": "text",
|
| 576 |
+
"text": "",
|
| 577 |
+
"page_idx": 15
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"type": "text",
|
| 581 |
+
"text": "Header: Characteristic | Consoles | PC | Mobile and ancillary | Other \nRow 1: 2020 | 2784 | 2056 | 2559 | 687 \nRow 2: 2019 | 1920 | 1718 | 2203 | 648 \nRow 3: 2018 | 2538 | 2180 | 2175 607 \nRow 4: 2017 | 2389 | 2042 2081 505 \nRow 5: 2016 | 2453 | 2124 1674 | 357 \nRow 6: 2015 | 2391 | 1499 | 418 | 356 ",
|
| 582 |
+
"page_idx": 15
|
| 583 |
+
},
|
| 584 |
+
{
|
| 585 |
+
"type": "text",
|
| 586 |
+
"text": "Q: In 2020, how much money did Activision Blizzard’s console segment generate in annual revenues in Australia? \nA: Let’s find the row of 2020, that’s Row 1. Let’s find the number for Consoles, that’s 2784. The answer is 2784. Header: Characteristic | Share of respondents \nRow 1: Decreased | $81 \\%$ \nRow 2: No impact | $16 \\%$ \nRow 3: Increased $1 3 \\%$ \nQ: Is the sum of two smallest segments greater than the largest segment? \nA: Let’s extract the numbers of all the rows: [81, 16, 3]. The two smallest numbers are 16 and 3. $1 6 + 3 = 1 9$ , which is smaller than 81. The answer is no. ",
|
| 587 |
+
"page_idx": 15
|
| 588 |
+
},
|
| 589 |
+
{
|
| 590 |
+
"type": "text",
|
| 591 |
+
"text": "",
|
| 592 |
+
"page_idx": 15
|
| 593 |
+
},
|
| 594 |
+
{
|
| 595 |
+
"type": "text",
|
| 596 |
+
"text": "Below is the 5-shot prompt we used for evaluating DOMINO on ChartQA: ",
|
| 597 |
+
"page_idx": 15
|
| 598 |
+
},
|
| 599 |
+
{
|
| 600 |
+
"type": "text",
|
| 601 |
+
"text": "Answer the following questions step by step. \nQ: In which year the private health expenditure per person in Oman is 210.69? A: Let’s describe the figure. The figure shows the data of: Oman (brown) | Samoa (dark blue). The x-axis shows: 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014. \nLet’s extract the data of Oman. \nThe data is 183.88 in 2008, 233.80 in 2009, 210.69 in 2010, 195.26 in 2011, 196.32 in 2012, 154.21 in 2013, 153.22 in 2014. \nThe value 210.69 is in year 2010. So the answer is 2010. Q: By how many points does NET Excellent/good surpass NET Only fair/poor in German in the year of 2018? \nA: Let’s describe the figure. \nThe figure shows the data of: NET Excellent/ good (blue) | NET Only fair/ poor (orange). The x-axis shows: Brazil, German, Russia, U.S., Japan. \nLet’s extract the data of NET Excellent/ good BY German. \nThe data is 54.00. \nLet’s extract the data of NET Only fair/ poor BY German. \nThe data is 39.00. \n54.00 surpasses 39.00 by $5 4 . 0 0 - 3 9 . 0 0 { = } 1 5 . 0 0$ . So the answer is 15.00. Q: How many perceptions have a value below $40 \\%$ in America? \nA: Let’s describe the figure. \nThe figure shows the data of: Share of respondents (blue). The x-axis shows: Very positive, Fairly positive, Fairly negative, Very negative. \nLet’s extract the data of Share of respondents. \nThe data is 4.00 in Very positive, 41.00 in Fairly positive, 50.00 in Fairly negative, 11.00 in Very negative. The values that are below 40.00 are [4.00, 11.00]. So the answer is 2. Q: In 2020, how much money did Activision Blizzard’s console segment generate in annual revenues in Australia? A: Let’s describe the figure. \nThe figure shows the data of: Consoles (blue) | PC\\* (dark blue) | Mobile and ancillary\\*\\* (grey) | Other (dard red). The x-axis shows: 2019 | 2020 | 2021 | 2022. \nLet’s extract the data of Consoles BY 2020. \nThe data is 2784.00. \nThe Console segment generated 2784.00 in annual revenues in 2020. So the answer is 2784.00. Q: Is the sum of two smallest segments greater than the largest segment? \nA: Let’s describe the figure. \nThe figure shows the data of: Value. The $\\mathbf { X }$ -axis shows: Decreased | No impact | Increased. Let’s extract the data of Value. \nThe data is 81.00 in Decreased, 16.00 in No impact, 3.00 in Increased. \nAmong [81.00, 16.00, 3.00], the two smallest values are 16.00 and 3.00 while the largest value is 8 $1 . 0 0 . \\ 1 6 . 0 0 \\substack { + 3 . 0 0 = 1 9 . 0 0 }$ , which is smaller than 81.00. So the answer is no. ",
|
| 602 |
+
"page_idx": 15
|
| 603 |
+
},
|
| 604 |
+
{
|
| 605 |
+
"type": "text",
|
| 606 |
+
"text": "",
|
| 607 |
+
"page_idx": 16
|
| 608 |
+
},
|
| 609 |
+
{
|
| 610 |
+
"type": "text",
|
| 611 |
+
"text": "",
|
| 612 |
+
"page_idx": 16
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "text",
|
| 616 |
+
"text": "",
|
| 617 |
+
"page_idx": 16
|
| 618 |
+
},
|
| 619 |
+
{
|
| 620 |
+
"type": "text",
|
| 621 |
+
"text": "",
|
| 622 |
+
"page_idx": 16
|
| 623 |
+
},
|
| 624 |
+
{
|
| 625 |
+
"type": "text",
|
| 626 |
+
"text": "",
|
| 627 |
+
"page_idx": 16
|
| 628 |
+
},
|
| 629 |
+
{
|
| 630 |
+
"type": "text",
|
| 631 |
+
"text": "Below is the 5-shot prompt we used for evaluating DOMINO on ChartQA without Describe: ",
|
| 632 |
+
"page_idx": 16
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"type": "text",
|
| 636 |
+
"text": "Answer the following questions step by step. ",
|
| 637 |
+
"page_idx": 16
|
| 638 |
+
},
|
| 639 |
+
{
|
| 640 |
+
"type": "text",
|
| 641 |
+
"text": "Q: In which year the private health expenditure per person in Oman is 210.69? \nA: Let’s extract the data of Oman. \nThe data is 183.88 in 2008, 233.80 in 2009, 210.69 in 2010, 195.26 in 2011, 196.32 in 2012, 154.21 in 2013, 153.22 in 2014. \nThe value 210.69 is in year 2010. So the answer is 2010. ",
|
| 642 |
+
"page_idx": 16
|
| 643 |
+
},
|
| 644 |
+
{
|
| 645 |
+
"type": "text",
|
| 646 |
+
"text": "Q: By how many points does NET Excellent/good surpass NET Only fair/poor in German in the year of 2018? ",
|
| 647 |
+
"page_idx": 16
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"type": "text",
|
| 651 |
+
"text": "A: Let’s extract the data of NET Excellent/ good BY German. \nThe data is 54.00. \nLet’s extract the data of NET Only fair/ poor BY German. \nThe data is 39.00. \n54.00 surpasses 39.00 by $5 4 . 0 0 - 3 9 . 0 0 { = } 1 5 . 0 0$ . So the answer is 15.00. Q: How many perceptions have a value below $40 \\%$ in America? \nA: Let’s extract the data of Share of respondents. \nThe data is 4.00 in Very positive, 41.00 in Fairly positive, 50.00 in Fairly negative, 11.00 in Very negative. The values that are below 40.00 are [4.00, 11.00]. So the answer is 2. ",
|
| 652 |
+
"page_idx": 17
|
| 653 |
+
},
|
| 654 |
+
{
|
| 655 |
+
"type": "text",
|
| 656 |
+
"text": "",
|
| 657 |
+
"page_idx": 17
|
| 658 |
+
},
|
| 659 |
+
{
|
| 660 |
+
"type": "text",
|
| 661 |
+
"text": "Q: In 2020, how much money did Activision Blizzard’s console segment generate in annual revenues in Australia? A: Let’s extract the data of Consoles BY 2020. The data is 2784.00. The Console segment generated 2784.00 in annual revenues in 2020. So the answer is 2784.00. ",
|
| 662 |
+
"page_idx": 17
|
| 663 |
+
},
|
| 664 |
+
{
|
| 665 |
+
"type": "text",
|
| 666 |
+
"text": "Q: Is the sum of two smallest segments greater than the largest segment? A: Let’s extract the data of Value. The data is 81.00 in Decreased, 16.00 in No impact, 3.00 in Increased. Among [81.00, 16.00, 3.00], the two smallest values are 16.00 and 3.00 while the largest value is 8 $1 . 0 0 . \\ 1 6 . 0 0 + 3 . 0 0 { = } 1 9 . 0 0$ , which is smaller than 81.00. So the answer is no. ",
|
| 667 |
+
"page_idx": 17
|
| 668 |
+
},
|
| 669 |
+
{
|
| 670 |
+
"type": "text",
|
| 671 |
+
"text": "A.3 ERROR EXAMPLES ",
|
| 672 |
+
"text_level": 1,
|
| 673 |
+
"page_idx": 17
|
| 674 |
+
},
|
| 675 |
+
{
|
| 676 |
+
"type": "table",
|
| 677 |
+
"img_path": "images/fa56ab611045d54749fda79eff54541d0d75b72a5a574a2b2c2702aaea7a3ae8.jpg",
|
| 678 |
+
"table_caption": [
|
| 679 |
+
"Table 7: Number of errors per template type for PlotQA V2 (examples follow). Numbers in parenthesis indicate total number of examples per template type in the 10K sample we evaluated. "
|
| 680 |
+
],
|
| 681 |
+
"table_footnote": [],
|
| 682 |
+
"table_body": "<table><tr><td>Method</td><td>data retrieval (1379)</td><td>structural (447)</td><td>arithmetic (5147)</td><td>compound (637)</td><td>comparison (1815)</td><td>min-max (575)</td></tr><tr><td>Few-Shot DePlot</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LLaMA-2 (70B)</td><td>547</td><td>275</td><td>3448</td><td>323</td><td>757</td><td>185</td></tr><tr><td>DOMINO (our method)</td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>LLaMA-2 (70B)</td><td>400</td><td>203</td><td>2928</td><td>193</td><td>312</td><td>64</td></tr><tr><td>Fine-tuned LLaMA-2 (70B)</td><td>388</td><td>189</td><td>1861</td><td>177</td><td>242</td><td>62</td></tr><tr><td>Fine-tuned LLaMA-2 (70B) (SC)</td><td>377</td><td>159</td><td>915</td><td>184</td><td>233</td><td>63</td></tr></table>",
|
| 683 |
+
"page_idx": 17
|
| 684 |
+
},
|
| 685 |
+
{
|
| 686 |
+
"type": "text",
|
| 687 |
+
"text": "Example of errors for each template type in PlotQA v2 made by DOMINO with finetuned LLaMA2 (70B) is illustrated in the following table. ",
|
| 688 |
+
"page_idx": 17
|
| 689 |
+
},
|
| 690 |
+
{
|
| 691 |
+
"type": "table",
|
| 692 |
+
"img_path": "images/8965973531bb0b694e60f3a3163bc72272b9f79e2653e4a3111211c495073a5e.jpg",
|
| 693 |
+
"table_caption": [],
|
| 694 |
+
"table_footnote": [],
|
| 695 |
+
"table_body": "<table><tr><td>Template</td><td>Question</td><td>Answer</td><td>Prediction</td></tr><tr><td colspan=\"4\">Continued on next page</td></tr></table>",
|
| 696 |
+
"page_idx": 17
|
| 697 |
+
},
|
| 698 |
+
{
|
| 699 |
+
"type": "image",
|
| 700 |
+
"img_path": "images/e0822d9e5f779f41dcf3af1c2d2633d8d9c6a9d24498f9cfbad44d4d0cf1f094.jpg",
|
| 701 |
+
"image_caption": [
|
| 702 |
+
"Continued on next page "
|
| 703 |
+
],
|
| 704 |
+
"image_footnote": [],
|
| 705 |
+
"page_idx": 18
|
| 706 |
+
},
|
| 707 |
+
{
|
| 708 |
+
"type": "image",
|
| 709 |
+
"img_path": "images/893520a1242fe51c39e43b3eaff70bdcfa2bdbe4fee0beb73be20dbaad9ddc5c.jpg",
|
| 710 |
+
"image_caption": [
|
| 711 |
+
"Continued on next page "
|
| 712 |
+
],
|
| 713 |
+
"image_footnote": [],
|
| 714 |
+
"page_idx": 19
|
| 715 |
+
},
|
| 716 |
+
{
|
| 717 |
+
"type": "text",
|
| 718 |
+
"text": "So the answer is 1. ",
|
| 719 |
+
"page_idx": 19
|
| 720 |
+
},
|
| 721 |
+
{
|
| 722 |
+
"type": "image",
|
| 723 |
+
"img_path": "images/0b35fccb3b35921bed1398771975107731e929d2a0884fba143ce7d647e8482d.jpg",
|
| 724 |
+
"image_caption": [],
|
| 725 |
+
"image_footnote": [],
|
| 726 |
+
"page_idx": 20
|
| 727 |
+
},
|
| 728 |
+
{
|
| 729 |
+
"type": "text",
|
| 730 |
+
"text": "Example of errors about task decomposition in ChartQA-human made by DOMINO with finetuned LLaMA-2 (70B) is illustrated in the following table. ",
|
| 731 |
+
"page_idx": 20
|
| 732 |
+
},
|
| 733 |
+
{
|
| 734 |
+
"type": "table",
|
| 735 |
+
"img_path": "images/578b0a2e365c6553c797b882d1ccae0a572c951aa37543ad6cc6cd169e1fccbf.jpg",
|
| 736 |
+
"table_caption": [],
|
| 737 |
+
"table_footnote": [],
|
| 738 |
+
"table_body": "<table><tr><td>Question</td><td>Answer</td></tr><tr><td colspan=\"2\">Continued on next page</td></tr></table>",
|
| 739 |
+
"page_idx": 20
|
| 740 |
+
},
|
| 741 |
+
{
|
| 742 |
+
"type": "image",
|
| 743 |
+
"img_path": "images/027996c4674077312eade4651b8bfe5dba1882ef00d1c076af73cd69c95444ce.jpg",
|
| 744 |
+
"image_caption": [],
|
| 745 |
+
"image_footnote": [],
|
| 746 |
+
"page_idx": 21
|
| 747 |
+
},
|
| 748 |
+
{
|
| 749 |
+
"type": "image",
|
| 750 |
+
"img_path": "images/703802b1afe6a2d64e4de6977006062e7cdc17d578e1acd40691c9fc252e4a3d.jpg",
|
| 751 |
+
"image_caption": [
|
| 752 |
+
"Expenditures on general government outsourcing (%GDP) "
|
| 753 |
+
],
|
| 754 |
+
"image_footnote": [],
|
| 755 |
+
"page_idx": 21
|
| 756 |
+
},
|
| 757 |
+
{
|
| 758 |
+
"type": "image",
|
| 759 |
+
"img_path": "images/1540ec4ad741333d83de05181930817b2c5d4d947bc8f883ae683ff6cc8a88b0.jpg",
|
| 760 |
+
"image_caption": [
|
| 761 |
+
"",
|
| 762 |
+
"Figure 4: The charts for the case study in $\\ S 6$ . The charts are from ChartQA (Masry et al., 2022). "
|
| 763 |
+
],
|
| 764 |
+
"image_footnote": [],
|
| 765 |
+
"page_idx": 21
|
| 766 |
+
}
|
| 767 |
+
]
|
parse/test/BWSTBrmRqD/BWSTBrmRqD_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/BWSTBrmRqD/BWSTBrmRqD_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/FQepisCUWu/FQepisCUWu.md
ADDED
|
@@ -0,0 +1,253 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CHATEVAL: TOWARDS BETTER LLM-BASED EVALUATORS THROUGH MULTI-AGENT DEBATE
|
| 2 |
+
|
| 3 |
+
Chi-Min $\mathbf { C h a n ^ { 1 } }$ , Weize Chen1, Yusheng $\mathbf { S u } ^ { 1 }$ , Jianxuan $\mathbf { Y u } ^ { 1 }$ , Wei $\mathbf { X } \mathbf { u } \mathbf { e } ^ { 2 }$ , Shanghang Zhang3, Jie $\mathbf { F u ^ { 2 } }$ , Zhiyuan $\mathbf { L i u ^ { 1 * } }$
|
| 4 |
+
|
| 5 |
+
1 Tsinghua University
|
| 6 |
+
2 Hong Kong University of Science and Technology
|
| 7 |
+
3 Peking University
|
| 8 |
+
zorowin123@gmail.com
|
| 9 |
+
|
| 10 |
+
# ABSTRACT
|
| 11 |
+
|
| 12 |
+
Text evaluation has historically posed significant challenges, often demanding substantial labor and time cost. With the emergence of large language models (LLMs), researchers have explored LLMs’ potential as alternatives for human evaluation. While these single-agent-based approaches show promise, experimental results suggest that further advancements are needed to bridge the gap between their current effectiveness and human-level evaluation quality. Recognizing that best practices of human evaluation processes often involve multiple human annotators collaborating in the evaluation, we resort to a multi-agent debate framework, moving beyond single-agent prompting strategies. In this paper, we build a multi-agent referee team called ChatEval to autonomously discuss and evaluate the quality of different texts. Our experiments on two benchmarks illustrate that ChatEval delivers superior accuracy and correlation in alignment with human assessment. Furthermore, we find that the diverse role prompts (different personas) are essential in the multi-agent debate process; that is, utilizing the same role description in the prompts can lead to a degradation in performance. Our qualitative analysis also shows that ChatEval transcends mere textual scoring, offering a human-mimicking evaluation process for reliable assessments.
|
| 13 |
+
|
| 14 |
+
# 1 INTRODUCTION
|
| 15 |
+
|
| 16 |
+
Evaluating the quality of text generated by language models or written by humans has long been a challenging endeavor, consistently garnering substantial attention (Celikyilmaz et al., 2020). Traditional methodologies predominantly rely on human annotation of texts (Callison-Burch, 2009), an approach considered overly demanding in terms of time and cost. Automatic evaluation metrics based on n-grams, such as Rouge (Lin, 2004), BLEU (Papineni et al., 2002), and METEOR (Banerjee & Lavie, 2005), have been proposed to tackle this issue (Kondrak, 2005). However, these methods have been shown to exhibit a relatively weak correlation with human judgments, particularly in the context of tasks involving open-ended generation or requiring domain-specific expertise (Novikova et al., 2017).
|
| 17 |
+
|
| 18 |
+
In view of the impressive text understanding and instruction-following capabilities of recent LLMs, a body of literature (Liu et al., 2023b; Chiang & Lee, 2023; Gao et al., 2023; Shen et al., 2023) has adopted LLM as an evaluator to assess the quality of responses to open-ended questions or traditional NLG tasks, including dialogue response generation and summarization. This methodology is dubbed LLM-as-a-judge (Zheng et al., 2023). Findings from these researches indicate that LLM can mimic human behavior and provide evaluations that correspond with human judgments, revealing a potentially scalable and transparent alternative to costly and laborious human evaluations.
|
| 19 |
+
|
| 20 |
+
While a single powerful LLM can already tackle various missions, emerging studies suggest that multiple LLMs can further improve one another through debate and cooperation (Li et al., 2023a; Liang et al., 2023). By incorporating multiple LLMs into an integrated group and designing specific interaction mechanisms, different LLMs can engage in proposing and deliberating unique responses and thought processes across several rounds. This approach leads to enhanced factuality of generated responses (Du et al., 2023) and improvement in the completion of arduous tasks (Li et al., 2023a; Qian et al., 2023). Furthermore, the multi-agent group also addresses and mitigates the Degeneration-of-Thought (DOT) problem (Liang et al., 2023).
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
Figure 1: When several referees participate in the evaluation process, they can discuss with each other and finally give a judgment that is better aligned with human annotators.
|
| 24 |
+
|
| 25 |
+
In the human evaluation processes, relying on a single perspective can introduce bias and instability in the results (Karpinska et al., 2021). Recognizing this, best practices often involve multiple human annotators collaborating in the evaluation (Van Der Lee et al., 2019). Drawing inspiration from this collaborative and iterative human evaluation approach, we propose ChatEval, a system that enables each agent to employ varied communication strategies in collaborative discussion, working towards formulating final judgments. Furthermore, to enrich the evaluation dynamics, every agent within ChatEval is endowed with a unique persona. This deliberate design ensures that each agent focuses on distinct perspectives or brings specific expertise to the table. By doing so, the collective evaluation benefits from a more comprehensive lens, capturing nuances and subtleties that a single perspective might overlook. Another underlying intuition of our work stems from renowned concepts in sociology and biology, including Collective Intelligence(Woolley et al., 2010) and Cognitive Synergy(Luppi et al., 2022), where multiple cognitive processes or systems interact and cooperate in a way that produces a combined effect greater than the sum of their separate effects.
|
| 26 |
+
|
| 27 |
+
To summarize, the main contribution of our work is as follows:
|
| 28 |
+
|
| 29 |
+
1. We propose a multi-agent-based framework called ChatEval that aligns better with human preferences compared with single-agent-based approaches as depicted in Figure 1.
|
| 30 |
+
2. We propose various communication strategies and demonstrate the necessity of diverse role prompts in multi-agent debate scenarios.
|
| 31 |
+
3. In the qualitative study, we demonstrate that our agents exhibit human-like behavior, capitalizing on the richness and complexity of language interaction. This elevates ChatEval from being merely a evaluation tool to an embodiment of interactive natural language dialogue.
|
| 32 |
+
|
| 33 |
+
# 2 METHODOLOGY
|
| 34 |
+
|
| 35 |
+
In this section, we elaborate on the principal components in ChatEval including debater agents, diverse role specification, communication strategy, and provide a detailed overview of each component’s role and functionality.
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 2: The overall schematic diagram of our proposed three different kinds of communication strategy. The direction of the arrows represents the flow of information, meaning that what this person says will be appended to the chat history of the person pointed to by the arrow.
|
| 39 |
+
|
| 40 |
+
Debater Agents. Debater agents are one of the most significant components in our framework. We treat each individual LLM as an agent and ask them to generate their response from the given prompts1. Responses from other agents are served as chat history which will be replaced in the prompt template. After configuring the agents, we then start the group debate where each agent autonomously receives responses from the others and, in turn, delivers its own responses to them. It should be noted that the whole process does not require human intervention.
|
| 41 |
+
|
| 42 |
+
Diverse Role Specification. As presented in Section 1, diverse role specification is necessary for the framework as well. Although all the agents share a common prompt template, we substitute the role description slot with diverse role prompts, specifying distinct personalities for different agents. We take inspiration from Wu et al. (2023) and formulate an analogous role description.
|
| 43 |
+
|
| 44 |
+
Communication Strategy. How to maintain the chat history is another significant issue in ChatEval. In our work, we use a more intuitive term to illustrate the maintenance of the chat history called communication strategy. In a nutshell, different communication strategies can be seen as different approaches to maintaining and manipulating their chat history. As is shown in Figure 2, We primarily design three different communication strategies and the full description and algorithm of the above communication strategies can be found in Appendix C.
|
| 45 |
+
|
| 46 |
+
# 3 EXPERIMENTS
|
| 47 |
+
|
| 48 |
+
We evaluate ChatEval on two benchmarks, FairEval and Topical-Chat which represent the categories of open-ended question answer and dialogue response generation, respectively. For the LLMs in ChatEval, we choose to use ChatGPT(GPT-3.5-turbo) and GPT-4 considering their strong capability shown in the past literature, we also test our frame work on smaller open-sourced model such as Llama2-Chat-7B and Vicuna, the results of which are shown in Appendix D, and the detailed settings for the experiments are discussed in Appendix B.
|
| 49 |
+
|
| 50 |
+
# 3.1 BENCHMARKS
|
| 51 |
+
|
| 52 |
+
The detailed introduction of different categories and benchmarks are listed as follows:
|
| 53 |
+
|
| 54 |
+
Open-ended Question Answer is a key component within the field of NLP and generative AI. It necessitates an AI system to provide comprehensive, detailed, and human-like responses to questions that don’t have a predefined or fixed set of possible answers. The work of Chiang et al. (2023) encompasses a collection of 80 open-ended questions originating from a wide array of categories, including common-sense, counterfactual, coding, etc. We then take the human annotation results from Wu et al. (2023) to conduct the experiments in this paper. For each question, they direct three annotators to evaluate the replies given by Vicuna-13B and ChatGPT through the given rules and finally derive the results by the majority votes among the annotators.
|
| 55 |
+
|
| 56 |
+
Dialogue Response Generation is a task involves creating a coherent and contextually appropriate response to a given input dialogue. We draw upon the Topical-Chat (Gopalakrishnan et al., 2019) dataset for our study. We then take the human annotation results from Mehri & Eskenazi (2020) where they carry out the annotations on 60 dialogue contexts with each response generated by 6 different systems. Human evaluators analyzed these responses based on natural, coherence, engagingness, groundedness, and understandable, where we take the first four dimensions for experiments in our paper following Zhong et al. (2022).
|
| 57 |
+
|
| 58 |
+
# 3.2 BASELINES
|
| 59 |
+
|
| 60 |
+
We evaluate ChatEval against following methods. As the main portion of our comparison, we primarily focuses on the single-agent-based method. Single-Agent means that we directly query an LLM to generate the response towards the evaluation2. Multi-Agent means that we employ multiple LLMs, either in an ensemble or through a debate approach. When we do the ensemble, we apply the single-agent method multiple times using different role prompts across the same instance and then aggregate their results through averaging to derive the final outcome. By default, we configure the communication strategy to one-by-one, agent numbers to 2, and discussion turns to 2 in this section and employ position calibration techniques in both single-agent and multi-agent settings. We will discuss more debate configurations in Section 4 for completeness. For the open-ended question answer task, we also compare our method with a simple ensemble method and FairEval (Wang et al., 2023b). They propose various strategies to improve the evaluation performance of a LLM including Multiple Evidence Calibration (MEC) and Balanced Position Calibration (BPC). For the dialogue response generation task, we also compare our method with G-EVAL (Liu et al., 2023b). They utilize CoT and probability-weighted summation for their method. Additionally, we include results from n-gram-based metrics, such as ROUGE (Lin, 2004), BLEU (Papineni et al., 2002) and embedding-based metrics such as BERTScore (Zhang et al., 2019).
|
| 61 |
+
|
| 62 |
+
# 3.3 RESULTS FOR OPEN-ENDED QUESTION ANSWERS
|
| 63 |
+
|
| 64 |
+
We adopt the same evaluation approach as Wang et al. (2023b) to assess the annotation results produced by different methods and annotators. Specifically, we calculate the Accuracy (Acc.), which measures the proportion of correctly classified instances out of the total instances, and the Kappa correlation coefficient (Kap.) (McHugh, 2012) which gauges the agreement between results from models and human annotators while taking into account the possibility of agreement occurring by chance. Both metrics provide insights into the reliability and consistency of the annotations. We take the human annotation results and FairEval’s (Wang et al., 2023b) best results from their paper. As is shown in Table 1, different annotators can reach a relatively high agreement and perform better than any other LLM-based approach. Still, the average human annotations accuracy which is $7 1 . 7 \%$ shows there exists a certain degree of discrepancy among different unique individuals revealing that text evaluation is absolutely an arduous task. The second part and the third part of Table 1 show the results of FairEval’s method and the results of our proposed method respectively. We find that (1) ChatEval can enhance the performance of the evaluation process, achieving higher alignment with human preference compared with single-agent evaluation. Specifically, the multi-agent-based method improves the accuracy by $6 . 2 \%$ for ChatGPT and $2 . 5 \%$ for GPT-4; (2) ChatEval surpasses FairEval’s best results within both ChatGPT and GPT-4 settings showing the effectiveness of our proposed method; (3) Compared to ChatEval, a basic ensemble fails to markedly improve the evaluator’s performance, highlighting the crucial role of natural language interaction in our framework.
|
| 65 |
+
|
| 66 |
+
# 3.4 RESULTS FOR DIALOGUE RESPONSE GENERATION
|
| 67 |
+
|
| 68 |
+
For the dialogue response generation benchmarks, we align the evaluation method with Zhong et al. (2022), calculating the turn-level Spearman and Kendall-Tau correlation in correspondence with human judgments on four aspects (naturalness, coherence, engagingness and groundedness). Results can be found in Table 2. In the first part of Table 2, we demonstrate that n-gram-based metrics and embedding-based metrics perform overall poorly on all the aspects evaluated illustrating that these methods can hardly reveal human preference. In the second part of Table 2, we show the results from the G-eval (Liu et al., 2023b) paper. They first ask the LLM to generate intermediate thought and finally calculate the weighted summation of the output scores based on the probability. The results show that their method outperforms previous traditional metrics depicting the fact that the LLM-based evaluator is effective and reliable for evaluating the dialogue response generation task. While their method delivers sound results, our proposed approach raises the bar in terms of performance for GPT-4. Specifically, ChatEval improves the average Spearman and KendallTau correlation by 0.096 $( 1 6 . 3 \% )$ and 0.057 $( 1 0 . 0 \% )$ respectively. Additionally, compared with the single-agent method, ChatEval amplifies the performance both for ChatGPT and GPT-4, showing the effectiveness of our method which is aligned with the results in Section 3.3.
|
| 69 |
+
|
| 70 |
+
Table 1: Accuracy (Acc.) and Kappa correlation coefficient (Kap.) of different methods on FairEval. We present our results with average and standard deviation by running the experiment five times.
|
| 71 |
+
|
| 72 |
+
<table><tr><td>Evaluator</td><td>Methods</td><td>Acc.(%)</td><td>Kap.</td></tr><tr><td>Human</td><td></td><td></td><td></td></tr><tr><td>Annotator1</td><td></td><td>68.8</td><td>0.5</td></tr><tr><td>Annotator2</td><td></td><td>76.3</td><td>0.62</td></tr><tr><td>Annotator3</td><td></td><td>70</td><td>0.5</td></tr><tr><td>FairEval</td><td></td><td></td><td></td></tr><tr><td>ChatGPT</td><td>MEC+BPC</td><td>58.7</td><td>0.31</td></tr><tr><td>GPT-4</td><td>MEC+BPC</td><td>62.5</td><td>0.37</td></tr><tr><td>Ours</td><td></td><td></td><td></td></tr><tr><td>ChatGPT</td><td>Single-Agent</td><td>53.7±1.4</td><td>0.27±0.02</td></tr><tr><td>ChatGPT</td><td>Multi-Agent (Ensemble)</td><td>55.5±0.7</td><td>0.29±0.01</td></tr><tr><td>ChatGPT</td><td>Multi-Agent (ChatEval)</td><td>60.0±0.9</td><td>0.30±0.02</td></tr><tr><td>GPT-4</td><td>Single-Agent</td><td>60.8±0.7</td><td>0.36±0.01</td></tr><tr><td>GPT-4</td><td>Multi-Agent (Ensemble)</td><td>61.5±0.5</td><td>0.38±0.01</td></tr><tr><td>GPT-4</td><td>Multi-Agent (ChatEval)</td><td>63.8±0.9</td><td>0.40±0.01</td></tr></table>
|
| 73 |
+
|
| 74 |
+
Table 2: Turn-level Spearman $( \rho )$ and Kendall-Tau $( \tau )$ correlations of different methods on TopicalChat benchmark, SA means Single-Agent, EN means Multi-Agent (Ensemble) and MA means Multi-Agent (ChatEval). Our ChatGPT settings should be compared to G-EVAL-3.5, and GPT-4 settings should be compared to G-EVAL-4.
|
| 75 |
+
|
| 76 |
+
<table><tr><td rowspan="2">Metrics</td><td colspan="2">Naturalness</td><td colspan="2">Coherence</td><td colspan="2">Engagingness</td><td colspan="2">Groundedness</td><td colspan="2">Average</td></tr><tr><td>P</td><td>T</td><td>P</td><td>T</td><td></td><td>T</td><td></td><td>T</td><td>p</td><td>T</td></tr><tr><td>ROUGE-L</td><td>0.146</td><td>0.176</td><td>0.203</td><td>0.193</td><td>0.300</td><td>0.295</td><td>0.327</td><td>0.310</td><td>0.244</td><td>0.244</td></tr><tr><td>BLEU-4</td><td>0.175</td><td>0.180</td><td>0.235</td><td>0.131</td><td>0.316</td><td>0.232</td><td>0.310</td><td>0.213</td><td>0.259</td><td>0.189</td></tr><tr><td>BERTScore</td><td>0.209</td><td>0.226</td><td>0.233</td><td>0.214</td><td>0.335</td><td>0.317</td><td>0.317</td><td>0.291</td><td>0.274</td><td>0.262</td></tr><tr><td>G-EVAL-3.5</td><td>0.539</td><td>0.532</td><td>0.544</td><td>0.519</td><td>0.691</td><td>0.660</td><td>0.567</td><td>0.586</td><td>0.585</td><td>0.574</td></tr><tr><td>G-EVAL-4</td><td>0.565</td><td>0.549</td><td>0.605</td><td>0.594</td><td>0.631</td><td>0.627</td><td>0.551</td><td>0.531</td><td>0.588</td><td>0.575</td></tr><tr><td>ChatGPT(SA)</td><td>0.474</td><td>0.421</td><td>0.527</td><td>0.482</td><td>0.599</td><td>0.549</td><td>0.576</td><td>0.558</td><td>0.544</td><td>0.503</td></tr><tr><td>ChatGPT(EN)</td><td>0.421</td><td>0.359</td><td>0.486</td><td>0.442</td><td>0.611</td><td>0.551</td><td>0.661</td><td>0.628</td><td>0.545</td><td>0.495</td></tr><tr><td>ChatGPT(MA)</td><td>0.441</td><td>0.396</td><td>0.500</td><td>0.454</td><td>0.664</td><td>0.607</td><td>0.602</td><td>0.583</td><td>0.552</td><td>0.510</td></tr><tr><td>GPT-4(SA)</td><td>0.532</td><td>0.483</td><td>0.591</td><td>0.535</td><td>0.734</td><td>0.676</td><td>0.774</td><td>0.750</td><td>0.658</td><td>0.611</td></tr><tr><td>GPT-4(EN)</td><td>0.512</td><td>0.450</td><td>0.607</td><td>0.544</td><td>0.755</td><td>0.693</td><td>0.781</td><td>0.756</td><td>0.664</td><td>0.611</td></tr><tr><td>GPT-4(MA)</td><td>0.630</td><td>0.571</td><td>0.619</td><td>0.561</td><td>0.765</td><td>0.695</td><td>0.722</td><td>0.700</td><td>0.684</td><td>0.632</td></tr></table>
|
| 77 |
+
|
| 78 |
+
# 4 ANALYSIS
|
| 79 |
+
|
| 80 |
+
In this section, we further explore the key components encompassed in ChatEval. We discuss the importance of diverse role prompts in Section 4.1, the effect of different communication strategies in Section 4.2, the impact of role numbers and discussion turns in Section 4.3 and carry out the qualitative study in Section 4.4. If not specified otherwise, we choose the FairEval benchmark and ChatGPT as the backbone LLM for the analysis.
|
| 81 |
+
|
| 82 |
+
Previously in Table 1 and 2, we demonstrate that ChatEval equipped with diverse role configurations can significantly improve the performance of evaluation. We further consider whether it is necessary to design diverse role prompts for the evaluation system. To answer so, we carry out the experiments by replacing all the role prompts with ”You are now an Annotator, one of the referees in the text evaluation task.” and keeping other prompts unchanged. We experiment with the one-byone communication strategy and 2 agents with 2 discussion turns. The results in Table 3 illustrate that ChatEval with the same role prompt design underperforms that with diverse role prompt design and cannot effectively enhance the performance compared with single-agent setting, highlighting the cruciality of diverse role prompt design in the multi-agent debate framework.
|
| 83 |
+
|
| 84 |
+
Based on the findings above, we are convinced that diverse role prompts are crucial for our framework. Furthermore, we delved deeper to study the effects of different portraits assigned to agents. To analyze this, we referred to the categories proposed by Wang et al. (2023b). We designed specific roles for different groups and compared their evaluation quality with our default setting3. We selected four categories from which we could clearly derive specific roles for this experiment. Specifically, the four categories we chose are: generic, coding, writing, and knowledge. As a simple example, when we design the coding group, we recruit experts like Guido van Rossum by specifying ”You are Guido van Rossum. You are the creator of the Python programming language. $I { \ldots } I ^ { \prime \prime }$ in the role prompts. By designating different roles and backgrounds in the role prompts, we can assemble referee teams with specific expertise in various domains.
|
| 85 |
+
|
| 86 |
+
As shown in Figure 3, our specially designed knowledge, writing, and coding groups can outperform or match the evaluations of other groups in corresponding categories. As for the generic group, we found that it performs well overall compared to its counterparts. The results further underscore the effectiveness of the role prompts and reveal potential avenues for further optimizing the framework, such as using mechanisms like dynamic role prompt specification.
|
| 87 |
+
|
| 88 |
+
Table 3: Effect of diverse role specification on FairEval benchmark.
|
| 89 |
+
|
| 90 |
+
<table><tr><td>Evaluator</td><td>Methods</td><td>Acc.(%)</td><td>Kap.</td></tr><tr><td>ChatGPT</td><td>Single-Agent</td><td>53.8</td><td>0.27</td></tr><tr><td>ChatGPT</td><td>Multi-Agent (without Diverse Role Prompts)</td><td>53.8</td><td>0.25</td></tr><tr><td>ChatGPT</td><td>Multi-Agent (with Diverse Role Prompts)</td><td>60</td><td>0.33</td></tr></table>
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 3: Evaluation quality of different groups on different categories.
|
| 94 |
+
|
| 95 |
+
# 4.2 THE STUDY OF COMMUNICATION STRATEGIES
|
| 96 |
+
|
| 97 |
+
As shown in Figure 2, we also design three different communication strategy termed as one-byone, simultaneous-talk, simultaneous-talk-with-summarizer. The detailed descriptions and formal formulations can be found in Appendix C. As depicted in Figure 4, distinct communication strategies exhibit varying behaviors depending on the role-turn configuration. However, they peak at a similar performance range of $6 0 . 0 \% { - } 6 2 . 5 \%$ in accuracy. Furthermore, the simultaneous-talk-withsummarizer strategy appears to offer slightly better scalability, as evidenced by its consistent upward trajectory with increasing role numbers and discussion turns. It is hypothesized that this is because the summarization-style history doesn’t expand rapidly with the context length, thereby preserving the reasoning capability of the LLMs. Meanwhile, variations in performance among three different communication strategies underscore the influence of different strategies on the effectiveness of the evaluation quality, revealing the potential for further exploration and optimization of ChatEval. Thus, future studies could be aimed at a more comprehensive understanding of different communication strategies, and how they could be effectively employed to enhance performance. This could serve as an avenue for substantial improvements and novel insights in the multi-agent debate framework.
|
| 98 |
+
|
| 99 |
+
# 4.3 THE IMPACT OF ROLE NUMBERS AND DISCUSSION TURNS
|
| 100 |
+
|
| 101 |
+
We then study the impact of different role numbers and discussion turns. From Figure 4a, 4b and 4c, a discernible trend is observed in the relationship between the role number and both Acc. and Kap. As the role number increases, there is a corresponding growth in performance, underscoring the effectiveness of incorporating diverse roles.
|
| 102 |
+
|
| 103 |
+
Conversely, no significant upward trend is detected with respect to the increase in discussion turns, as is shown in Figure 4d and 4e. This observation aligns with the findings in Liang et al. (2023); Du et al. (2023), highlighting a consistent phenomenon where continual discussion often leads to stagnation or even degradation of performance. As we mentioned before in Section 4.2, such a trend may be attributed to issues associated with the rapidly ever-increasing context length, which consequently diminishes the performance. These results prompt a more nuanced understanding of the balance needed between role-turn dynamics to optimize the performance of ChatEval.
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 4: Comparison of different configuration of ChatEval on FairEval Benchmark. We use One, Sim and wSum to denote one-by-one, simultaneously-talk and simultaneously-talk-with-summarizer respectively.
|
| 107 |
+
|
| 108 |
+
Figure 5 showcases the debate process towards the evaluation of two assistants’ responses to the open-ended question ”What are the most effective ways to deal with stress?”. We can find that both of the responses produce similar strategies and equally compelling descriptions for dealing with stress, making it challenging to discern significant disparity in terms of quality. It is in this context of nuanced evaluation that the significance of the ChatEval process emerges.
|
| 109 |
+
|
| 110 |
+
We can pinpoint several human-like behaviors exhibited by the agents that can enrich our comprehension of the evaluation process; (1) Opening Statement: Alice initiates the debate with a clear stance, establishing the foundational argument and guiding the trajectory of the subsequent discourse. (2) Alternative Proposal: Bob introduces an alternative viewpoint, emphasizing the need to consider diverse interpretations. This not only broadens the discussion but also stimulates critical thinking. In the context of a debate, the introduction of an alternative proposal prevents the stagnation of thought, challenges pre-existing bias, and uncovers considerations that might otherwise be overlooked, ensuring that the discussions are well-rounded. (3) Stance Maintenance: Alice’s persistent adherence to her initial stance, even when faced with opposing views, exemplifies commitment and challenges other participants to refine their perspectives. This behaviour ensures the conversation remains robust, focused, and continually evolving, driving all participants to a higher level of engagement and critical thinking. (4) Seeking Consensus: The discussion’s climax reveals a collective agreement amongst the participants, which is reached through mutual understanding and compromise, underlining the value of each presented viewpoint.
|
| 111 |
+
|
| 112 |
+
In light of the above, ChatEval stands out not just as a tool for comparison but as an embodiment of interactive natural language dialogue. By simulating human argumentative interactions, it differentiates itself from static, single-presented opinions. This dynamic interaction showcases the richness and complexity of language, capturing nuances often missed in singular viewpoints. As such, ChatEval offers a reliable evaluation process that not only mirrors human discourse but also highlights the transformative power of collaborative dialogue. This positions it uniquely, underscoring its significant potential to execute text evaluation tasks both reliably and effectively.
|
| 113 |
+
|
| 114 |
+

|
| 115 |
+
|
| 116 |
+
Figure 5: An illustrative example from ChatEval presenting a discussion process involving participants Alice $( \frac { \frac { 5 } { 7 } } { 1 5 } )$ , Bob $( \frac { \frac { 4 } { x } } { \frac { 4 } { y } } )$ and Carol $( \mathbf { \Sigma } _ { [ \bar { \tau } ] } ^ { \bar { \tau } } )$ . They initiate a group talk with the purpose of determining the superior response from two assistants. Due to spatial constraints within the layout, we use [...] to omit some redundant text.
|
| 117 |
+
|
| 118 |
+
# 5 RELATED WORK
|
| 119 |
+
|
| 120 |
+
Automatic NLG evaluation In the landscape of NLG, evaluating the quality of texts represents a particularly arduous task. For a significant period, evaluation was primarily dependent on human annotations that is labor-intensive and limited by scalability issues. Automatic NLG evaluation attempts to address these challenges by leveraging computational models to assess the quality of texts. Previous work lies on the following categories: (1) $n$ -gram-based metrics: ROUGE (Lin, 2004) is a set of metrics that compute the amount of overlap between n-grams in the machine-generated summaries and the reference summaries. BLEU (Papineni et al., 2002) compare the generated texts with reference translations, based on the co-occurrence of n-grams in both texts. In spite of being easily and widely used, the above method is incapable of capturing syntactic and semantic similarity (Stent et al., 2005). (2) embedding-based metrics: Word embeddings are vector representations of words that capture their semantic properties. A bunch of work leverages word embeddings to evaluate the semantic similarity between two pieces of texts. BERTScore (Zhang et al., 2019) use contextualized word embeddings from transformer models like BERT (Devlin et al., 2018), BLEURT (Sellam et al., 2020) utilize supervised training data to enhance the performance. MoverScore (Zhao et al., 2019) combine contextualized word embeddings with Earth Mover’s Distance (Rubner et al., 2000). (3) LLM-based metrics: Amidst the flourishing advancement of LLM which embodies a wealth of information derived from extensive training data, using LLM as an evaluator has experienced notable progress. GPTScore (Fu et al., 2023) utilize conditional probability to assign the texts a score representing its quality. Wang et al. (2023a) explore the potential of utilizing ChatGPT as an NLG evaluator by prompting it to score texts directly. Wang et al. (2023c) curate a reliable dataset containing pairwise comparison and evaluation explanation which can be used to train a foundation model making it a better evaluator. Bai et al. (2023) propose decentralized evaluation to provide fairer evaluation results. G-EVAL (Liu et al., 2023b) propose probability-weighted techniques to calibrate the score given by a single LLM.
|
| 121 |
+
|
| 122 |
+
Communicative Agents Most recently, significant attention has been dedicated to the development of communicative agents. These agents, often acted by LLMs like ChatGPT or GPT-4, are designed to interact and communicate effectively with other agents or human users using natural language. The primary goal is to facilitate more productive and efficient interaction and collaboration as different agents can autonomously communicate and negotiate to tackle a more complex task collectively. Several studies have explored various aspects of communicative agents. Li et al. (2023a); Chen et al. (2023) propose a cooperative agent framework enabling agents to autonomously cooperate to solve complex tasks. Park et al. (2023) create a sandbox environment consisting of 25 individual virtual entities endowed with a character description and memory system. Every intelligent agent is capable of autonomously interacting with other agents and the environment simulating reliable human behavior. Dong et al. (2023); Qian et al. (2023) incorporate a waterfall model to manage a multiagent virtual team towards software development. Liu et al. (2023a) utilize a sandbox environment to curate reliable datasets in better alignment with human preference and train a socially-aligned LLM. Liang et al. (2023) and Du et al. (2023) also make use of the multi-agent debate framework in other scenarios such as translation and arithmetic problems resulting in better results. Wang et al. (2023d) propose an alternative method called self-collaboration to enable the communication of agents by utilizing a single LLM prompted by multi-persona descriptions. Mandi et al. (2023) propose a novel framework designed for the collaboration of multiple robots, utilizing multiple LLMs to enhance coordination and strategic planning among the robots. Concurrent with our work, Li et al. (2023b); Zhang et al. (2023) also propose a similar approach. However, they probe different dimensions of improving LLM-based evaluators and do not explore the effectiveness of natural language interaction.
|
| 123 |
+
|
| 124 |
+
# 6 CONCLUSION
|
| 125 |
+
|
| 126 |
+
In this paper, we present evidence that ChatEval contributes to improving the evaluation performance concerning text quality, aligning more closely with human preferences. We emphasize the necessity of the diverse role specification and propose distinct communication strategies as integral components within ChatEval. Our qualitative analysis of the discussion process conveys insightful intuitions about how texts are evaluated by ChatEval and substantiates our approach’s ability to support comprehensive evaluations akin to human judgment, thereby demonstrating the reliability and efficacy of our framework.
|
| 127 |
+
|
| 128 |
+
#
|
| 129 |
+
|
| 130 |
+
REFERENCES
|
| 131 |
+
Yushi Bai, Jiahao Ying, Yixin Cao, Xin Lv, Yuze He, Xiaozhi Wang, Jifan Yu, Kaisheng Zeng, Yijia Xiao, Haozhe Lyu, et al. Benchmarking foundation models with language-model-as-an-examiner. arXiv preprint arXiv:2306.04181, 2023.
|
| 132 |
+
Satanjeev Banerjee and Alon Lavie. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pp. 65–72, 2005.
|
| 133 |
+
Chris Callison-Burch. Fast, cheap, and creative: Evaluating translation quality using amazon’s mechanical turk. In Proceedings of the 2009 conference on empirical methods in natural language processing, pp. 286–295, 2009.
|
| 134 |
+
Asli Celikyilmaz, Elizabeth Clark, and Jianfeng Gao. Evaluation of text generation: A survey. CoRR, abs/2006.14799, 2020. URL https://arxiv.org/abs/2006.14799.
|
| 135 |
+
Weize Chen, Yusheng Su, Jingwei Zuo, Cheng Yang, Chenfei Yuan, Chen Qian, Chi-Min Chan, Yujia Qin, Yaxi Lu, Ruobing Xie, Zhiyuan Liu, Maosong Sun, and Jie Zhou. Agentverse: Facilitating multi-agent collaboration and exploring emergent behaviors in agents, 2023.
|
| 136 |
+
Cheng-Han Chiang and Hung-yi Lee. Can large language models be an alternative to human evaluations? arXiv preprint arXiv:2305.01937, 2023.
|
| 137 |
+
Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E Gonzalez, et al. Vicuna: An open-source chatbot impressing gpt-4 with $9 0 \% *$ chatgpt quality. See https://vicuna. lmsys. org (accessed 14 April 2023), 2023.
|
| 138 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 139 |
+
Yihong Dong, Xue Jiang, Zhi Jin, and Ge Li. Self-collaboration code generation via chatgpt. arXiv preprint arXiv:2304.07590, 2023.
|
| 140 |
+
Yilun Du, Shuang Li, Antonio Torralba, Joshua B Tenenbaum, and Igor Mordatch. Improving factuality and reasoning in language models through multiagent debate. arXiv preprint arXiv:2305.14325, 2023.
|
| 141 |
+
Jinlan Fu, See-Kiong Ng, Zhengbao Jiang, and Pengfei Liu. Gptscore: Evaluate as you desire. arXiv preprint arXiv:2302.04166, 2023.
|
| 142 |
+
Mingqi Gao, Jie Ruan, Renliang Sun, Xunjian Yin, Shiping Yang, and Xiaojun Wan. Human-like summarization evaluation with chatgpt. arXiv preprint arXiv:2304.02554, 2023.
|
| 143 |
+
Karthik Gopalakrishnan, Behnam Hedayatnia, Qinlang Chen, Anna Gottardi, Sanjeev Kwatra, Anushree Venkatesh, Raefer Gabriel, and Dilek Hakkani-Tur. Topical-chat: Towards knowledge- ¨ grounded open-domain conversations. 2019.
|
| 144 |
+
Marzena Karpinska, Nader Akoury, and Mohit Iyyer. The perils of using mechanical turk to evaluate open-ended text generation. arXiv preprint arXiv:2109.06835, 2021.
|
| 145 |
+
Grzegorz Kondrak. N-gram similarity and distance. In International symposium on string processing and information retrieval, pp. 115–126. Springer, 2005.
|
| 146 |
+
Guohao Li, Hasan Abed Al Kader Hammoud, Hani Itani, Dmitrii Khizbullin, and Bernard Ghanem. Camel: Communicative agents for” mind” exploration of large scale language model society. arXiv preprint arXiv:2303.17760, 2023a.
|
| 147 |
+
Ruosen Li, Teerth Patel, and Xinya Du. Prd: Peer rank and discussion improve large language model based evaluations. arXiv preprint arXiv:2307.02762, 2023b.
|
| 148 |
+
Tian Liang, Zhiwei He, Wenxiang Jiao, Xing Wang, Yan Wang, Rui Wang, Yujiu Yang, Zhaopeng Tu, and Shuming Shi. Encouraging divergent thinking in large language models through multiagent debate. arXiv preprint arXiv:2305.19118, 2023.
|
| 149 |
+
Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pp. 74–81, 2004.
|
| 150 |
+
Ruibo Liu, Ruixin Yang, Chenyan Jia, Ge Zhang, Denny Zhou, Andrew M Dai, Diyi Yang, and Soroush Vosoughi. Training socially aligned language models in simulated human society. arXiv preprint arXiv:2305.16960, 2023a.
|
| 151 |
+
Yang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. Gpteval: Nlg evaluation using gpt-4 with better human alignment. arXiv preprint arXiv:2303.16634, 2023b.
|
| 152 |
+
Andrea I Luppi, Pedro AM Mediano, Fernando E Rosas, Negin Holland, Tim D Fryer, John T O’Brien, James B Rowe, David K Menon, Daniel Bor, and Emmanuel A Stamatakis. A synergistic core for human brain evolution and cognition. Nature Neuroscience, 25(6):771–782, 2022.
|
| 153 |
+
Zhao Mandi, Shreeya Jain, and Shuran Song. Roco: Dialectic multi-robot collaboration with large language models. arXiv preprint arXiv:2307.04738, 2023.
|
| 154 |
+
Mary L McHugh. Interrater reliability: the kappa statistic. Biochemia medica, 22(3):276–282, 2012.
|
| 155 |
+
Shikib Mehri and Maxine Eskenazi. Usr: An unsupervised and reference free evaluation metric for dialog generation. arXiv preprint arXiv:2005.00456, 2020.
|
| 156 |
+
Jekaterina Novikova, Ondˇrej Dusek, Amanda Cercas Curry, and Verena Rieser. Why we need ˇ new evaluation metrics for NLG. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2241–2252, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/D17-1238. URL https:// aclanthology.org/D17-1238.
|
| 157 |
+
Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pp. 311–318, 2002.
|
| 158 |
+
Joon Sung Park, Joseph C O’Brien, Carrie J Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein. Generative agents: Interactive simulacra of human behavior. arXiv preprint arXiv:2304.03442, 2023.
|
| 159 |
+
Chen Qian, Xin Cong, Cheng Yang, Weize Chen, Yusheng Su, Juyuan Xu, Zhiyuan Liu, and Maosong Sun. Communicative agents for software development. arXiv preprint arXiv:2307.07924, 2023.
|
| 160 |
+
Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover’s distance as a metric for image retrieval. International journal of computer vision, 40:99–121, 2000.
|
| 161 |
+
Thibault Sellam, Dipanjan Das, and Ankur P Parikh. Bleurt: Learning robust metrics for text generation. arXiv preprint arXiv:2004.04696, 2020.
|
| 162 |
+
Chenhui Shen, Liying Cheng, Yang You, and Lidong Bing. Are large language models good evaluators for abstractive summarization? arXiv preprint arXiv:2305.13091, 2023.
|
| 163 |
+
Amanda Stent, Matthew Marge, and Mohit Singhai. Evaluating evaluation methods for generation in the presence of variation. In International conference on intelligent text processing and computational linguistics, pp. 341–351. Springer, 2005.
|
| 164 |
+
Chris Van Der Lee, Albert Gatt, Emiel Van Miltenburg, Sander Wubben, and Emiel Krahmer. Best practices for the human evaluation of automatically generated text. In Proceedings of the 12th International Conference on Natural Language Generation, pp. 355–368, 2019.
|
| 165 |
+
Jiaan Wang, Yunlong Liang, Fandong Meng, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. Is chatgpt a good nlg evaluator? a preliminary study. arXiv preprint arXiv:2303.04048, 2023a.
|
| 166 |
+
Peiyi Wang, Lei Li, Liang Chen, Dawei Zhu, Binghuai Lin, Yunbo Cao, Qi Liu, Tianyu Liu, and Zhifang Sui. Large language models are not fair evaluators. arXiv preprint arXiv:2305.17926, 2023b.
|
| 167 |
+
Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, et al. Pandalm: An automatic evaluation benchmark for llm instruction tuning optimization. arXiv preprint arXiv:2306.05087, 2023c.
|
| 168 |
+
Zhenhailong Wang, Shaoguang Mao, Wenshan Wu, Tao Ge, Furu Wei, and Heng Ji. Unleashing cognitive synergy in large language models: A task-solving agent through multi-persona selfcollaboration. arXiv preprint arXiv:2307.05300, 2023d.
|
| 169 |
+
Anita Williams Woolley, Christopher F Chabris, Alex Pentland, Nada Hashmi, and Thomas W Malone. Evidence for a collective intelligence factor in the performance of human groups. science, 330(6004):686–688, 2010.
|
| 170 |
+
Ning Wu, Ming Gong, Linjun Shou, Shining Liang, and Daxin Jiang. Large language models are diverse role-players for summarization evaluation. arXiv preprint arXiv:2303.15078, 2023.
|
| 171 |
+
Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675, 2019.
|
| 172 |
+
Xinghua Zhang, Bowen Yu, Haiyang Yu, Yangyu Lv, Tingwen Liu, Fei Huang, Hongbo Xu, and Yongbin Li. Wider and deeper llm networks are fairer llm evaluators, 2023.
|
| 173 |
+
Wei Zhao, Maxime Peyrard, Fei Liu, Yang Gao, Christian M Meyer, and Steffen Eger. Moverscore: Text generation evaluating with contextualized embeddings and earth mover distance. arXiv preprint arXiv:1909.02622, 2019.
|
| 174 |
+
Lianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. Judging llm-as-a-judge with mt-bench and chatbot arena. arXiv preprint arXiv:2306.05685, 2023.
|
| 175 |
+
Ming Zhong, Yang Liu, Da Yin, Yuning Mao, Yizhu Jiao, Pengfei Liu, Chenguang Zhu, Heng Ji, and Jiawei Han. Towards a unified multi-dimensional evaluator for text generation. arXiv preprint arXiv:2210.07197, 2022.
|
| 176 |
+
|
| 177 |
+
# A PROMPT TEMPLATE AND DIVERSE ROLE PROMPTS
|
| 178 |
+
|
| 179 |
+
The overall prompt template is shown in Table 4, we draw inspiration from Wu et al. (2023) and design several different role descriptions as follows.
|
| 180 |
+
|
| 181 |
+
General Public You are now General Public, one of the referees in this task. You are interested in the story and looking for updates on the investigation. Please think critically by yourself and note that it’s your responsibility to choose one of which is the better first.
|
| 182 |
+
|
| 183 |
+
Critic You are now Critic, one of the referees in this task. You will check fluent writing, clear sentences, and good wording in summary writing. Your job is to question others judgment to make sure their judgment is well-considered and offer an alternative solution if two responses are at the same level.
|
| 184 |
+
|
| 185 |
+
News Author You are News Author, one of the referees in this task. You will focus on the consistency with the original article. Please help other people to determine which response is the better one.
|
| 186 |
+
|
| 187 |
+
Psychologist You are Psychologist, one of the referees in this task. You will study human behavior and mental processes in order to understand and explain human behavior. Please help other people to determine which response is the better one.
|
| 188 |
+
|
| 189 |
+
Scientist You are Scientist, one of the referees in this task. You are a professional engaged in systematic study who possesses a strong background in the scientific method, critical thinking, and problem-solving abilities. Please help other people to determine which response is the better one.
|
| 190 |
+
|
| 191 |
+
# B IMPLEMENTATION DETAILS
|
| 192 |
+
|
| 193 |
+
We choose to utilize models from OpenAI’s GPT family as our LLMs in ChatEval, including GPT-4 and ChatGPT (GPT-3.5-turbo) and set the temperature to 0 to ensure reproducibility. The rationale
|
| 194 |
+
|
| 195 |
+
[Question]
|
| 196 |
+
{source text}
|
| 197 |
+
[The Start of Assistant 1’s Answer]
|
| 198 |
+
{compared text one}
|
| 199 |
+
[The End of Assistant 1’s Answer]
|
| 200 |
+
[The Start of Assistant 2’s Answer]
|
| 201 |
+
{compared text two}
|
| 202 |
+
[The End of Assistant 2’s Answer]
|
| 203 |
+
[System]
|
| 204 |
+
We would like to request your feedback on the performance of two AI assistants in response to the user question displayed above.
|
| 205 |
+
Please consider the helpfulness, relevance, accuracy, and level of detail of their responses. Each assistant receives an overall score on a scale of 1 to 10, where a higher score indicates better overall performance.
|
| 206 |
+
There are a few other referees assigned the same task, it’s your responsibility to discuss with them and think critically before you make your final judgment.
|
| 207 |
+
Here is your discussion history:
|
| 208 |
+
{chat history}
|
| 209 |
+
{role description}
|
| 210 |
+
Now it’s your time to talk, please make your talk short and clear, {agent name}
|
| 211 |
+
|
| 212 |
+
Table 4: The prompt template for FairEval Dataset. We replace the colored slot with real text before querying the LLMs. Note that we use the same template when conducting single-agent-based experiments and ignore the chat history and role description slot.
|
| 213 |
+
|
| 214 |
+
behind this selection is the exceptional performance these models offer, being among the most advanced and powerful in the world. Additionally, their accessibility and ease of use through APIs enable us to directly call and interact with the models during our research, significantly simplifying the process. In our current research, we focus on homogeneous groups of LLMs. That is, within a given multi-agent group, all LLMs belong to the same GPT family model, either all GPT-4 or all ChatGPT. We acknowledge the potential of heterogeneous groups for future research, which could provide fascinating insights into how strong models and weak models can cooperate in a multi-agent setting. Additionally, unlike previous work like Du et al. (2023), we do not explicitly ask the debater agents to reach a consensus at the end of the debate. In situations where the response format relies on direct comparison, we derive the final results from the majority vote among various annotators. Conversely, if the response format requires a direct score, we calculate the average score obtained from multiple annotators. This methodological approach ensures the impartiality and balance of our evaluation process.
|
| 215 |
+
|
| 216 |
+
# C FORMAL DEPICTION OF DIFFERENT COMMUNICATION STRATEGY
|
| 217 |
+
|
| 218 |
+
In this paper, we predominantly adopt the following three different communication strategies, which are:
|
| 219 |
+
|
| 220 |
+
1. One-By-One. During each round of the debate, the debater agents take turns in a set order to generate their response based on the current observation. When it’s time for a debater agent to respond, we directly concatenate what previous other agents have said into its chat history slot. Please refer to Algorithm 1.
|
| 221 |
+
2. Simultaneous-Talk. Unlike the one-by-one strategy, we carry out an alternative communication strategy called simultaneous-talk, where debater agents are prompted to asynchronously generate responses in each iteration of the discussion to nullify the impact of the speaking order. Please refer to Algorithm 2.
|
| 222 |
+
3. Simultaneous-Talk-with-Summarizer. The main difference between this strategy and simultaneous-talk is that we additionally employ another LLM as a summarizer. At the end of each iteration of the debate, we prompt this extra LLM to summarize the messages
|
| 223 |
+
|
| 224 |
+
conveyed so far and we replace the chat history slots of all debater agents with this summarization. Please refer to Algorithm 3.
|
| 225 |
+
|
| 226 |
+
# Algorithm 1: One-by-One
|
| 227 |
+
|
| 228 |
+
input : agents number $N$ , discuss turn $T$ , a group of debate agents $[ D _ { 1 } , \cdots , D _ { N } ]$ , chat history of each agent $[ H _ { 1 } , \cdots , H _ { N } ]$ , answer extracter (either majority vote or average score) EXT output: Final results for text evaluation $A N S$ 1 for $t \gets 0$ to $T$ do 2 for $n \gets 1$ to $N$ do 3 $h _ { n } \gets D _ { n } ( H _ { n } )$ ; // utilize agents to generate responses 4 for $m \gets n$ to $N$ do 5 if $m > { I }$ then 6 $H _ { m } \gets H _ { m } + h _ { n } ;$ ; // concatenate current response to later agents’ chat history 7 end 8 end 9 end 10 end 11 $A N S \gets E X T ( [ H _ { 1 } , \cdot \cdot \cdot , H _ { N } ] )$ ; 12 return $A N S$ ;
|
| 229 |
+
|
| 230 |
+
# Algorithm 2: Simultaneous-Talk
|
| 231 |
+
|
| 232 |
+
input : agents number $N$ , discuss turn $T$ , a group of debate agents $[ D _ { 1 } , \cdots , D _ { N } ]$ , chat history of each agent $[ H _ { 1 } , \cdots , H _ { N } ]$ , answer extracter (either majority vote or average score) $E X T$ , buffer $B U F$ output: Final results for text evaluation $A N S$ 1 for $t \gets 0$ to $T$ do 2 for $n \gets 1$ to $N$ do 3 $h _ { n } \gets D _ { n } ( H _ { n } )$ ; // utilize agents to generate responses 4 $b u f b u f + h _ { n } ;$ ; // add the responses in current turn to the buffer 5 end 6 for $n \gets 1$ to $N$ do 7 $H _ { n } \gets H _ { n } + b u f$ ; // add the buffer to all agents’ chat history 8 end 9 end 10 $A N S \gets E X T ( [ H _ { 1 } , \cdot \cdot \cdot , H _ { N } ] ) ;$ ; 11 return AN S;
|
| 233 |
+
|
| 234 |
+
# D GENERALIZATION TO SMALLER MODELS
|
| 235 |
+
|
| 236 |
+
Our primary focus in the paper is on the framework implemented with the most powerful LLMs such as ChatGPT and GPT-4. However, we also carry out the experiments on Llama2-Chat-7b and Vicuna-7b-v1.5. As indicated in the Table 5, Llama2-Chat achieves only marginal performance under single-agent CoT methods. Despite reaching an accuracy of $3 7 . 5 \%$ , the negative kappa coefficient suggests that the observed agreement is less than what would be expected by chance. However, it is noteworthy that through the application of a multi-agent debate, Llama2-Chat demonstrates a modest improvement, albeit still marginally above chance levels.
|
| 237 |
+
|
| 238 |
+
input : agents number $N$ , discuss turn $T$ , a group of debate agents $[ D _ { 1 } , \cdots , D _ { N } ]$ , chat history of each agent $[ H _ { 1 } , \cdots , H _ { N } ]$ , answer extracter (either majority vote or average score) $E X T$ , buffer $B U F$ , summarizer $S U M$ output: Final results for text evaluation $A N S$ 1 for $t \gets 0$ to $T$ do 2 for $n \gets 1$ to $N$ do 3 $h _ { n } \gets D _ { n } ( H _ { n } )$ ; // utilize agents to generate responses 4 $b u f b u f + h _ { n } $ ; // add the responses in current turn to the buffer 5 end 6 for $n \gets 1$ to $N$ do 7 $H _ { n } \gets H _ { n } + S U M ( B U F )$ ; // add the summarized buffer to all agents’ chat history 8 end 9 end 10 $A N S \gets E X T ( [ H _ { 1 } , \cdot \cdot \cdot , H _ { N } ] ) ;$ ; 11 return $A N S$ ;
|
| 239 |
+
|
| 240 |
+
In contrast, Vicuna exhibits more robust performance improvement compared to Llama2-Chat. ChatEval notably enhances its capabilities, achieving an accuracy of $5 2 . 3 \%$ and a kappa coefficient of 0.19, indicative of fair agreement beyond chance. While both models show limitations in their performance, these results demonstrate the effectiveness of ChatEval and underscore its positive impact.
|
| 241 |
+
|
| 242 |
+
Algorithm 3: Simultaneous-Talk-with-Summarizer
|
| 243 |
+
Table 6: Average Cost on FairEval.
|
| 244 |
+
|
| 245 |
+
<table><tr><td>Evaluator</td><td>Cost</td><td>Time</td></tr><tr><td></td><td colspan="2"></td></tr><tr><td>Human GPT-4(SA)</td><td>$90 $2.90</td><td>240min 10min</td></tr><tr><td>GPT-4(EN)</td><td>$8.70</td><td>10min</td></tr><tr><td>GPT-4(MA)</td><td>$12.30</td><td>36min</td></tr><tr><td>ChatGPT(SA)</td><td></td><td></td></tr><tr><td></td><td>$0.11</td><td>3min</td></tr><tr><td>ChatGPT(EN)</td><td>$0.33</td><td>3min</td></tr><tr><td>ChatGPT(MA)</td><td>$0.41</td><td>11min</td></tr><tr><td>G-EVAL-3.5</td><td>$2.20</td><td>3min</td></tr><tr><td>G-EVAL-4</td><td>$58</td><td>10min</td></tr><tr><td>FairEval-ChatGPT</td><td>$0.34</td><td>3min</td></tr><tr><td>FairEval-GPT-4</td><td>$6.38</td><td>10min</td></tr></table>
|
| 246 |
+
|
| 247 |
+
Table 5: Accuracy (Acc.) and Kappa correlation coefficient (Kap.) of smaller models on FairEval.
|
| 248 |
+
|
| 249 |
+
<table><tr><td>Evaluator</td><td>Acc. (%)</td><td>Kap.</td></tr><tr><td>Llama2-Chat-7B (SA)</td><td>37.5±1.3</td><td>-0.01±0.01</td></tr><tr><td>Llama2-Chat-7B (MA)</td><td>40.0±1.1</td><td>0.05±0.01</td></tr><tr><td>Vicuna-7B-v1.5 (SA)</td><td>45.0±1.5</td><td>0.12±0.01</td></tr><tr><td>Vicuna-7B-v1.5 (MA)</td><td>52.3±1.3</td><td>0.19±0.01</td></tr></table>
|
| 250 |
+
|
| 251 |
+
# E AVERAGE COST
|
| 252 |
+
|
| 253 |
+
We release the average cost of our framework and other methods against with employing human evaluators. In the Table 6, it is evident that the evaluator based on LLMs significantly reduces both time and financial expenditures. Although the ChatEval framework incurs higher costs than the SA and MA ensemble methods due to multiple inference rounds necessary for final judgment derivation, it remains more cost-effective than employing human evaluators. We consider this an acceptable trade-off for the benefits provided.
|
parse/test/FQepisCUWu/FQepisCUWu_content_list.json
ADDED
|
@@ -0,0 +1,523 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "CHATEVAL: TOWARDS BETTER LLM-BASED EVALUATORS THROUGH MULTI-AGENT DEBATE ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"page_idx": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"type": "text",
|
| 10 |
+
"text": "Chi-Min $\\mathbf { C h a n ^ { 1 } }$ , Weize Chen1, Yusheng $\\mathbf { S u } ^ { 1 }$ , Jianxuan $\\mathbf { Y u } ^ { 1 }$ , Wei $\\mathbf { X } \\mathbf { u } \\mathbf { e } ^ { 2 }$ , Shanghang Zhang3, Jie $\\mathbf { F u ^ { 2 } }$ , Zhiyuan $\\mathbf { L i u ^ { 1 * } }$ ",
|
| 11 |
+
"page_idx": 0
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"type": "text",
|
| 15 |
+
"text": "1 Tsinghua University \n2 Hong Kong University of Science and Technology \n3 Peking University \nzorowin123@gmail.com ",
|
| 16 |
+
"page_idx": 0
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"type": "text",
|
| 20 |
+
"text": "ABSTRACT ",
|
| 21 |
+
"text_level": 1,
|
| 22 |
+
"page_idx": 0
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"type": "text",
|
| 26 |
+
"text": "Text evaluation has historically posed significant challenges, often demanding substantial labor and time cost. With the emergence of large language models (LLMs), researchers have explored LLMs’ potential as alternatives for human evaluation. While these single-agent-based approaches show promise, experimental results suggest that further advancements are needed to bridge the gap between their current effectiveness and human-level evaluation quality. Recognizing that best practices of human evaluation processes often involve multiple human annotators collaborating in the evaluation, we resort to a multi-agent debate framework, moving beyond single-agent prompting strategies. In this paper, we build a multi-agent referee team called ChatEval to autonomously discuss and evaluate the quality of different texts. Our experiments on two benchmarks illustrate that ChatEval delivers superior accuracy and correlation in alignment with human assessment. Furthermore, we find that the diverse role prompts (different personas) are essential in the multi-agent debate process; that is, utilizing the same role description in the prompts can lead to a degradation in performance. Our qualitative analysis also shows that ChatEval transcends mere textual scoring, offering a human-mimicking evaluation process for reliable assessments. ",
|
| 27 |
+
"page_idx": 0
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"type": "text",
|
| 31 |
+
"text": "1 INTRODUCTION ",
|
| 32 |
+
"text_level": 1,
|
| 33 |
+
"page_idx": 0
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"type": "text",
|
| 37 |
+
"text": "Evaluating the quality of text generated by language models or written by humans has long been a challenging endeavor, consistently garnering substantial attention (Celikyilmaz et al., 2020). Traditional methodologies predominantly rely on human annotation of texts (Callison-Burch, 2009), an approach considered overly demanding in terms of time and cost. Automatic evaluation metrics based on n-grams, such as Rouge (Lin, 2004), BLEU (Papineni et al., 2002), and METEOR (Banerjee & Lavie, 2005), have been proposed to tackle this issue (Kondrak, 2005). However, these methods have been shown to exhibit a relatively weak correlation with human judgments, particularly in the context of tasks involving open-ended generation or requiring domain-specific expertise (Novikova et al., 2017). ",
|
| 38 |
+
"page_idx": 0
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"type": "text",
|
| 42 |
+
"text": "In view of the impressive text understanding and instruction-following capabilities of recent LLMs, a body of literature (Liu et al., 2023b; Chiang & Lee, 2023; Gao et al., 2023; Shen et al., 2023) has adopted LLM as an evaluator to assess the quality of responses to open-ended questions or traditional NLG tasks, including dialogue response generation and summarization. This methodology is dubbed LLM-as-a-judge (Zheng et al., 2023). Findings from these researches indicate that LLM can mimic human behavior and provide evaluations that correspond with human judgments, revealing a potentially scalable and transparent alternative to costly and laborious human evaluations. ",
|
| 43 |
+
"page_idx": 0
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"type": "text",
|
| 47 |
+
"text": "While a single powerful LLM can already tackle various missions, emerging studies suggest that multiple LLMs can further improve one another through debate and cooperation (Li et al., 2023a; Liang et al., 2023). By incorporating multiple LLMs into an integrated group and designing specific interaction mechanisms, different LLMs can engage in proposing and deliberating unique responses and thought processes across several rounds. This approach leads to enhanced factuality of generated responses (Du et al., 2023) and improvement in the completion of arduous tasks (Li et al., 2023a; Qian et al., 2023). Furthermore, the multi-agent group also addresses and mitigates the Degeneration-of-Thought (DOT) problem (Liang et al., 2023). ",
|
| 48 |
+
"page_idx": 0
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"type": "image",
|
| 52 |
+
"img_path": "images/6891816948da77ae69213da388df9af179d20e41e6fdf89ae80137c4977d27b9.jpg",
|
| 53 |
+
"image_caption": [
|
| 54 |
+
"Figure 1: When several referees participate in the evaluation process, they can discuss with each other and finally give a judgment that is better aligned with human annotators. "
|
| 55 |
+
],
|
| 56 |
+
"image_footnote": [],
|
| 57 |
+
"page_idx": 1
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "",
|
| 62 |
+
"page_idx": 1
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"type": "text",
|
| 66 |
+
"text": "In the human evaluation processes, relying on a single perspective can introduce bias and instability in the results (Karpinska et al., 2021). Recognizing this, best practices often involve multiple human annotators collaborating in the evaluation (Van Der Lee et al., 2019). Drawing inspiration from this collaborative and iterative human evaluation approach, we propose ChatEval, a system that enables each agent to employ varied communication strategies in collaborative discussion, working towards formulating final judgments. Furthermore, to enrich the evaluation dynamics, every agent within ChatEval is endowed with a unique persona. This deliberate design ensures that each agent focuses on distinct perspectives or brings specific expertise to the table. By doing so, the collective evaluation benefits from a more comprehensive lens, capturing nuances and subtleties that a single perspective might overlook. Another underlying intuition of our work stems from renowned concepts in sociology and biology, including Collective Intelligence(Woolley et al., 2010) and Cognitive Synergy(Luppi et al., 2022), where multiple cognitive processes or systems interact and cooperate in a way that produces a combined effect greater than the sum of their separate effects. ",
|
| 67 |
+
"page_idx": 1
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "To summarize, the main contribution of our work is as follows: ",
|
| 72 |
+
"page_idx": 1
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"type": "text",
|
| 76 |
+
"text": "1. We propose a multi-agent-based framework called ChatEval that aligns better with human preferences compared with single-agent-based approaches as depicted in Figure 1. \n2. We propose various communication strategies and demonstrate the necessity of diverse role prompts in multi-agent debate scenarios. \n3. In the qualitative study, we demonstrate that our agents exhibit human-like behavior, capitalizing on the richness and complexity of language interaction. This elevates ChatEval from being merely a evaluation tool to an embodiment of interactive natural language dialogue. ",
|
| 77 |
+
"page_idx": 1
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"type": "text",
|
| 81 |
+
"text": "2 METHODOLOGY ",
|
| 82 |
+
"text_level": 1,
|
| 83 |
+
"page_idx": 1
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"type": "text",
|
| 87 |
+
"text": "In this section, we elaborate on the principal components in ChatEval including debater agents, diverse role specification, communication strategy, and provide a detailed overview of each component’s role and functionality. ",
|
| 88 |
+
"page_idx": 1
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"type": "image",
|
| 92 |
+
"img_path": "images/7f6924c3829230d2139cec214721489128c1190a649fa650ccfd1dd9fe26bbe9.jpg",
|
| 93 |
+
"image_caption": [
|
| 94 |
+
"Figure 2: The overall schematic diagram of our proposed three different kinds of communication strategy. The direction of the arrows represents the flow of information, meaning that what this person says will be appended to the chat history of the person pointed to by the arrow. "
|
| 95 |
+
],
|
| 96 |
+
"image_footnote": [],
|
| 97 |
+
"page_idx": 2
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"type": "text",
|
| 101 |
+
"text": "Debater Agents. Debater agents are one of the most significant components in our framework. We treat each individual LLM as an agent and ask them to generate their response from the given prompts1. Responses from other agents are served as chat history which will be replaced in the prompt template. After configuring the agents, we then start the group debate where each agent autonomously receives responses from the others and, in turn, delivers its own responses to them. It should be noted that the whole process does not require human intervention. ",
|
| 102 |
+
"page_idx": 2
|
| 103 |
+
},
|
| 104 |
+
{
|
| 105 |
+
"type": "text",
|
| 106 |
+
"text": "Diverse Role Specification. As presented in Section 1, diverse role specification is necessary for the framework as well. Although all the agents share a common prompt template, we substitute the role description slot with diverse role prompts, specifying distinct personalities for different agents. We take inspiration from Wu et al. (2023) and formulate an analogous role description. ",
|
| 107 |
+
"page_idx": 2
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"type": "text",
|
| 111 |
+
"text": "Communication Strategy. How to maintain the chat history is another significant issue in ChatEval. In our work, we use a more intuitive term to illustrate the maintenance of the chat history called communication strategy. In a nutshell, different communication strategies can be seen as different approaches to maintaining and manipulating their chat history. As is shown in Figure 2, We primarily design three different communication strategies and the full description and algorithm of the above communication strategies can be found in Appendix C. ",
|
| 112 |
+
"page_idx": 2
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"type": "text",
|
| 116 |
+
"text": "3 EXPERIMENTS ",
|
| 117 |
+
"text_level": 1,
|
| 118 |
+
"page_idx": 2
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"type": "text",
|
| 122 |
+
"text": "We evaluate ChatEval on two benchmarks, FairEval and Topical-Chat which represent the categories of open-ended question answer and dialogue response generation, respectively. For the LLMs in ChatEval, we choose to use ChatGPT(GPT-3.5-turbo) and GPT-4 considering their strong capability shown in the past literature, we also test our frame work on smaller open-sourced model such as Llama2-Chat-7B and Vicuna, the results of which are shown in Appendix D, and the detailed settings for the experiments are discussed in Appendix B. ",
|
| 123 |
+
"page_idx": 2
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"type": "text",
|
| 127 |
+
"text": "3.1 BENCHMARKS ",
|
| 128 |
+
"text_level": 1,
|
| 129 |
+
"page_idx": 2
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"type": "text",
|
| 133 |
+
"text": "The detailed introduction of different categories and benchmarks are listed as follows: ",
|
| 134 |
+
"page_idx": 2
|
| 135 |
+
},
|
| 136 |
+
{
|
| 137 |
+
"type": "text",
|
| 138 |
+
"text": "Open-ended Question Answer is a key component within the field of NLP and generative AI. It necessitates an AI system to provide comprehensive, detailed, and human-like responses to questions that don’t have a predefined or fixed set of possible answers. The work of Chiang et al. (2023) encompasses a collection of 80 open-ended questions originating from a wide array of categories, including common-sense, counterfactual, coding, etc. We then take the human annotation results from Wu et al. (2023) to conduct the experiments in this paper. For each question, they direct three annotators to evaluate the replies given by Vicuna-13B and ChatGPT through the given rules and finally derive the results by the majority votes among the annotators. ",
|
| 139 |
+
"page_idx": 2
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "Dialogue Response Generation is a task involves creating a coherent and contextually appropriate response to a given input dialogue. We draw upon the Topical-Chat (Gopalakrishnan et al., 2019) dataset for our study. We then take the human annotation results from Mehri & Eskenazi (2020) where they carry out the annotations on 60 dialogue contexts with each response generated by 6 different systems. Human evaluators analyzed these responses based on natural, coherence, engagingness, groundedness, and understandable, where we take the first four dimensions for experiments in our paper following Zhong et al. (2022). ",
|
| 144 |
+
"page_idx": 2
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"type": "text",
|
| 148 |
+
"text": "",
|
| 149 |
+
"page_idx": 3
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"type": "text",
|
| 153 |
+
"text": "3.2 BASELINES",
|
| 154 |
+
"text_level": 1,
|
| 155 |
+
"page_idx": 3
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"type": "text",
|
| 159 |
+
"text": "We evaluate ChatEval against following methods. As the main portion of our comparison, we primarily focuses on the single-agent-based method. Single-Agent means that we directly query an LLM to generate the response towards the evaluation2. Multi-Agent means that we employ multiple LLMs, either in an ensemble or through a debate approach. When we do the ensemble, we apply the single-agent method multiple times using different role prompts across the same instance and then aggregate their results through averaging to derive the final outcome. By default, we configure the communication strategy to one-by-one, agent numbers to 2, and discussion turns to 2 in this section and employ position calibration techniques in both single-agent and multi-agent settings. We will discuss more debate configurations in Section 4 for completeness. For the open-ended question answer task, we also compare our method with a simple ensemble method and FairEval (Wang et al., 2023b). They propose various strategies to improve the evaluation performance of a LLM including Multiple Evidence Calibration (MEC) and Balanced Position Calibration (BPC). For the dialogue response generation task, we also compare our method with G-EVAL (Liu et al., 2023b). They utilize CoT and probability-weighted summation for their method. Additionally, we include results from n-gram-based metrics, such as ROUGE (Lin, 2004), BLEU (Papineni et al., 2002) and embedding-based metrics such as BERTScore (Zhang et al., 2019). ",
|
| 160 |
+
"page_idx": 3
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"type": "text",
|
| 164 |
+
"text": "3.3 RESULTS FOR OPEN-ENDED QUESTION ANSWERS ",
|
| 165 |
+
"text_level": 1,
|
| 166 |
+
"page_idx": 3
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"type": "text",
|
| 170 |
+
"text": "We adopt the same evaluation approach as Wang et al. (2023b) to assess the annotation results produced by different methods and annotators. Specifically, we calculate the Accuracy (Acc.), which measures the proportion of correctly classified instances out of the total instances, and the Kappa correlation coefficient (Kap.) (McHugh, 2012) which gauges the agreement between results from models and human annotators while taking into account the possibility of agreement occurring by chance. Both metrics provide insights into the reliability and consistency of the annotations. We take the human annotation results and FairEval’s (Wang et al., 2023b) best results from their paper. As is shown in Table 1, different annotators can reach a relatively high agreement and perform better than any other LLM-based approach. Still, the average human annotations accuracy which is $7 1 . 7 \\%$ shows there exists a certain degree of discrepancy among different unique individuals revealing that text evaluation is absolutely an arduous task. The second part and the third part of Table 1 show the results of FairEval’s method and the results of our proposed method respectively. We find that (1) ChatEval can enhance the performance of the evaluation process, achieving higher alignment with human preference compared with single-agent evaluation. Specifically, the multi-agent-based method improves the accuracy by $6 . 2 \\%$ for ChatGPT and $2 . 5 \\%$ for GPT-4; (2) ChatEval surpasses FairEval’s best results within both ChatGPT and GPT-4 settings showing the effectiveness of our proposed method; (3) Compared to ChatEval, a basic ensemble fails to markedly improve the evaluator’s performance, highlighting the crucial role of natural language interaction in our framework. ",
|
| 171 |
+
"page_idx": 3
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"type": "text",
|
| 175 |
+
"text": "3.4 RESULTS FOR DIALOGUE RESPONSE GENERATION ",
|
| 176 |
+
"text_level": 1,
|
| 177 |
+
"page_idx": 3
|
| 178 |
+
},
|
| 179 |
+
{
|
| 180 |
+
"type": "text",
|
| 181 |
+
"text": "For the dialogue response generation benchmarks, we align the evaluation method with Zhong et al. (2022), calculating the turn-level Spearman and Kendall-Tau correlation in correspondence with human judgments on four aspects (naturalness, coherence, engagingness and groundedness). Results can be found in Table 2. In the first part of Table 2, we demonstrate that n-gram-based metrics and embedding-based metrics perform overall poorly on all the aspects evaluated illustrating that these methods can hardly reveal human preference. In the second part of Table 2, we show the results from the G-eval (Liu et al., 2023b) paper. They first ask the LLM to generate intermediate thought and finally calculate the weighted summation of the output scores based on the probability. The results show that their method outperforms previous traditional metrics depicting the fact that the LLM-based evaluator is effective and reliable for evaluating the dialogue response generation task. While their method delivers sound results, our proposed approach raises the bar in terms of performance for GPT-4. Specifically, ChatEval improves the average Spearman and KendallTau correlation by 0.096 $( 1 6 . 3 \\% )$ and 0.057 $( 1 0 . 0 \\% )$ respectively. Additionally, compared with the single-agent method, ChatEval amplifies the performance both for ChatGPT and GPT-4, showing the effectiveness of our method which is aligned with the results in Section 3.3. ",
|
| 182 |
+
"page_idx": 3
|
| 183 |
+
},
|
| 184 |
+
{
|
| 185 |
+
"type": "table",
|
| 186 |
+
"img_path": "images/557119435b99d79921a207aa026d61f706501291d42de1febfc0d42113ed0f3f.jpg",
|
| 187 |
+
"table_caption": [
|
| 188 |
+
"Table 1: Accuracy (Acc.) and Kappa correlation coefficient (Kap.) of different methods on FairEval. We present our results with average and standard deviation by running the experiment five times. "
|
| 189 |
+
],
|
| 190 |
+
"table_footnote": [],
|
| 191 |
+
"table_body": "<table><tr><td>Evaluator</td><td>Methods</td><td>Acc.(%)</td><td>Kap.</td></tr><tr><td>Human</td><td></td><td></td><td></td></tr><tr><td>Annotator1</td><td></td><td>68.8</td><td>0.5</td></tr><tr><td>Annotator2</td><td></td><td>76.3</td><td>0.62</td></tr><tr><td>Annotator3</td><td></td><td>70</td><td>0.5</td></tr><tr><td>FairEval</td><td></td><td></td><td></td></tr><tr><td>ChatGPT</td><td>MEC+BPC</td><td>58.7</td><td>0.31</td></tr><tr><td>GPT-4</td><td>MEC+BPC</td><td>62.5</td><td>0.37</td></tr><tr><td>Ours</td><td></td><td></td><td></td></tr><tr><td>ChatGPT</td><td>Single-Agent</td><td>53.7±1.4</td><td>0.27±0.02</td></tr><tr><td>ChatGPT</td><td>Multi-Agent (Ensemble)</td><td>55.5±0.7</td><td>0.29±0.01</td></tr><tr><td>ChatGPT</td><td>Multi-Agent (ChatEval)</td><td>60.0±0.9</td><td>0.30±0.02</td></tr><tr><td>GPT-4</td><td>Single-Agent</td><td>60.8±0.7</td><td>0.36±0.01</td></tr><tr><td>GPT-4</td><td>Multi-Agent (Ensemble)</td><td>61.5±0.5</td><td>0.38±0.01</td></tr><tr><td>GPT-4</td><td>Multi-Agent (ChatEval)</td><td>63.8±0.9</td><td>0.40±0.01</td></tr></table>",
|
| 192 |
+
"page_idx": 4
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"type": "table",
|
| 196 |
+
"img_path": "images/6a81e44e6c52adae02c197e0bbaeeb32961d25c4d8a007ec974008d6831b6e98.jpg",
|
| 197 |
+
"table_caption": [
|
| 198 |
+
"Table 2: Turn-level Spearman $( \\rho )$ and Kendall-Tau $( \\tau )$ correlations of different methods on TopicalChat benchmark, SA means Single-Agent, EN means Multi-Agent (Ensemble) and MA means Multi-Agent (ChatEval). Our ChatGPT settings should be compared to G-EVAL-3.5, and GPT-4 settings should be compared to G-EVAL-4. "
|
| 199 |
+
],
|
| 200 |
+
"table_footnote": [],
|
| 201 |
+
"table_body": "<table><tr><td rowspan=\"2\">Metrics</td><td colspan=\"2\">Naturalness</td><td colspan=\"2\">Coherence</td><td colspan=\"2\">Engagingness</td><td colspan=\"2\">Groundedness</td><td colspan=\"2\">Average</td></tr><tr><td>P</td><td>T</td><td>P</td><td>T</td><td></td><td>T</td><td></td><td>T</td><td>p</td><td>T</td></tr><tr><td>ROUGE-L</td><td>0.146</td><td>0.176</td><td>0.203</td><td>0.193</td><td>0.300</td><td>0.295</td><td>0.327</td><td>0.310</td><td>0.244</td><td>0.244</td></tr><tr><td>BLEU-4</td><td>0.175</td><td>0.180</td><td>0.235</td><td>0.131</td><td>0.316</td><td>0.232</td><td>0.310</td><td>0.213</td><td>0.259</td><td>0.189</td></tr><tr><td>BERTScore</td><td>0.209</td><td>0.226</td><td>0.233</td><td>0.214</td><td>0.335</td><td>0.317</td><td>0.317</td><td>0.291</td><td>0.274</td><td>0.262</td></tr><tr><td>G-EVAL-3.5</td><td>0.539</td><td>0.532</td><td>0.544</td><td>0.519</td><td>0.691</td><td>0.660</td><td>0.567</td><td>0.586</td><td>0.585</td><td>0.574</td></tr><tr><td>G-EVAL-4</td><td>0.565</td><td>0.549</td><td>0.605</td><td>0.594</td><td>0.631</td><td>0.627</td><td>0.551</td><td>0.531</td><td>0.588</td><td>0.575</td></tr><tr><td>ChatGPT(SA)</td><td>0.474</td><td>0.421</td><td>0.527</td><td>0.482</td><td>0.599</td><td>0.549</td><td>0.576</td><td>0.558</td><td>0.544</td><td>0.503</td></tr><tr><td>ChatGPT(EN)</td><td>0.421</td><td>0.359</td><td>0.486</td><td>0.442</td><td>0.611</td><td>0.551</td><td>0.661</td><td>0.628</td><td>0.545</td><td>0.495</td></tr><tr><td>ChatGPT(MA)</td><td>0.441</td><td>0.396</td><td>0.500</td><td>0.454</td><td>0.664</td><td>0.607</td><td>0.602</td><td>0.583</td><td>0.552</td><td>0.510</td></tr><tr><td>GPT-4(SA)</td><td>0.532</td><td>0.483</td><td>0.591</td><td>0.535</td><td>0.734</td><td>0.676</td><td>0.774</td><td>0.750</td><td>0.658</td><td>0.611</td></tr><tr><td>GPT-4(EN)</td><td>0.512</td><td>0.450</td><td>0.607</td><td>0.544</td><td>0.755</td><td>0.693</td><td>0.781</td><td>0.756</td><td>0.664</td><td>0.611</td></tr><tr><td>GPT-4(MA)</td><td>0.630</td><td>0.571</td><td>0.619</td><td>0.561</td><td>0.765</td><td>0.695</td><td>0.722</td><td>0.700</td><td>0.684</td><td>0.632</td></tr></table>",
|
| 202 |
+
"page_idx": 4
|
| 203 |
+
},
|
| 204 |
+
{
|
| 205 |
+
"type": "text",
|
| 206 |
+
"text": "",
|
| 207 |
+
"page_idx": 4
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"type": "text",
|
| 211 |
+
"text": "4 ANALYSIS ",
|
| 212 |
+
"text_level": 1,
|
| 213 |
+
"page_idx": 4
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"type": "text",
|
| 217 |
+
"text": "In this section, we further explore the key components encompassed in ChatEval. We discuss the importance of diverse role prompts in Section 4.1, the effect of different communication strategies in Section 4.2, the impact of role numbers and discussion turns in Section 4.3 and carry out the qualitative study in Section 4.4. If not specified otherwise, we choose the FairEval benchmark and ChatGPT as the backbone LLM for the analysis. ",
|
| 218 |
+
"page_idx": 4
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "text",
|
| 222 |
+
"text": "Previously in Table 1 and 2, we demonstrate that ChatEval equipped with diverse role configurations can significantly improve the performance of evaluation. We further consider whether it is necessary to design diverse role prompts for the evaluation system. To answer so, we carry out the experiments by replacing all the role prompts with ”You are now an Annotator, one of the referees in the text evaluation task.” and keeping other prompts unchanged. We experiment with the one-byone communication strategy and 2 agents with 2 discussion turns. The results in Table 3 illustrate that ChatEval with the same role prompt design underperforms that with diverse role prompt design and cannot effectively enhance the performance compared with single-agent setting, highlighting the cruciality of diverse role prompt design in the multi-agent debate framework. ",
|
| 223 |
+
"page_idx": 5
|
| 224 |
+
},
|
| 225 |
+
{
|
| 226 |
+
"type": "text",
|
| 227 |
+
"text": "Based on the findings above, we are convinced that diverse role prompts are crucial for our framework. Furthermore, we delved deeper to study the effects of different portraits assigned to agents. To analyze this, we referred to the categories proposed by Wang et al. (2023b). We designed specific roles for different groups and compared their evaluation quality with our default setting3. We selected four categories from which we could clearly derive specific roles for this experiment. Specifically, the four categories we chose are: generic, coding, writing, and knowledge. As a simple example, when we design the coding group, we recruit experts like Guido van Rossum by specifying ”You are Guido van Rossum. You are the creator of the Python programming language. $I { \\ldots } I ^ { \\prime \\prime }$ in the role prompts. By designating different roles and backgrounds in the role prompts, we can assemble referee teams with specific expertise in various domains. ",
|
| 228 |
+
"page_idx": 5
|
| 229 |
+
},
|
| 230 |
+
{
|
| 231 |
+
"type": "text",
|
| 232 |
+
"text": "As shown in Figure 3, our specially designed knowledge, writing, and coding groups can outperform or match the evaluations of other groups in corresponding categories. As for the generic group, we found that it performs well overall compared to its counterparts. The results further underscore the effectiveness of the role prompts and reveal potential avenues for further optimizing the framework, such as using mechanisms like dynamic role prompt specification. ",
|
| 233 |
+
"page_idx": 5
|
| 234 |
+
},
|
| 235 |
+
{
|
| 236 |
+
"type": "table",
|
| 237 |
+
"img_path": "images/b64c9acfdd136737f78cd029b08b143a9595c011af0e8ae9897ef6d9851a8675.jpg",
|
| 238 |
+
"table_caption": [
|
| 239 |
+
"Table 3: Effect of diverse role specification on FairEval benchmark. "
|
| 240 |
+
],
|
| 241 |
+
"table_footnote": [],
|
| 242 |
+
"table_body": "<table><tr><td>Evaluator</td><td>Methods</td><td>Acc.(%)</td><td>Kap.</td></tr><tr><td>ChatGPT</td><td>Single-Agent</td><td>53.8</td><td>0.27</td></tr><tr><td>ChatGPT</td><td>Multi-Agent (without Diverse Role Prompts)</td><td>53.8</td><td>0.25</td></tr><tr><td>ChatGPT</td><td>Multi-Agent (with Diverse Role Prompts)</td><td>60</td><td>0.33</td></tr></table>",
|
| 243 |
+
"page_idx": 5
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"type": "image",
|
| 247 |
+
"img_path": "images/0318955c3bae9471146fce8e22450f64e6575d30eaeaf76b239fcc25a8e36e00.jpg",
|
| 248 |
+
"image_caption": [
|
| 249 |
+
"Figure 3: Evaluation quality of different groups on different categories. "
|
| 250 |
+
],
|
| 251 |
+
"image_footnote": [],
|
| 252 |
+
"page_idx": 5
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "text",
|
| 256 |
+
"text": "4.2 THE STUDY OF COMMUNICATION STRATEGIES ",
|
| 257 |
+
"text_level": 1,
|
| 258 |
+
"page_idx": 6
|
| 259 |
+
},
|
| 260 |
+
{
|
| 261 |
+
"type": "text",
|
| 262 |
+
"text": "As shown in Figure 2, we also design three different communication strategy termed as one-byone, simultaneous-talk, simultaneous-talk-with-summarizer. The detailed descriptions and formal formulations can be found in Appendix C. As depicted in Figure 4, distinct communication strategies exhibit varying behaviors depending on the role-turn configuration. However, they peak at a similar performance range of $6 0 . 0 \\% { - } 6 2 . 5 \\%$ in accuracy. Furthermore, the simultaneous-talk-withsummarizer strategy appears to offer slightly better scalability, as evidenced by its consistent upward trajectory with increasing role numbers and discussion turns. It is hypothesized that this is because the summarization-style history doesn’t expand rapidly with the context length, thereby preserving the reasoning capability of the LLMs. Meanwhile, variations in performance among three different communication strategies underscore the influence of different strategies on the effectiveness of the evaluation quality, revealing the potential for further exploration and optimization of ChatEval. Thus, future studies could be aimed at a more comprehensive understanding of different communication strategies, and how they could be effectively employed to enhance performance. This could serve as an avenue for substantial improvements and novel insights in the multi-agent debate framework. ",
|
| 263 |
+
"page_idx": 6
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "text",
|
| 267 |
+
"text": "4.3 THE IMPACT OF ROLE NUMBERS AND DISCUSSION TURNS ",
|
| 268 |
+
"text_level": 1,
|
| 269 |
+
"page_idx": 6
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"type": "text",
|
| 273 |
+
"text": "We then study the impact of different role numbers and discussion turns. From Figure 4a, 4b and 4c, a discernible trend is observed in the relationship between the role number and both Acc. and Kap. As the role number increases, there is a corresponding growth in performance, underscoring the effectiveness of incorporating diverse roles. ",
|
| 274 |
+
"page_idx": 6
|
| 275 |
+
},
|
| 276 |
+
{
|
| 277 |
+
"type": "text",
|
| 278 |
+
"text": "Conversely, no significant upward trend is detected with respect to the increase in discussion turns, as is shown in Figure 4d and 4e. This observation aligns with the findings in Liang et al. (2023); Du et al. (2023), highlighting a consistent phenomenon where continual discussion often leads to stagnation or even degradation of performance. As we mentioned before in Section 4.2, such a trend may be attributed to issues associated with the rapidly ever-increasing context length, which consequently diminishes the performance. These results prompt a more nuanced understanding of the balance needed between role-turn dynamics to optimize the performance of ChatEval. ",
|
| 279 |
+
"page_idx": 6
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"type": "image",
|
| 283 |
+
"img_path": "images/513a4d53b3cc31c9a25c519e45bc8832c0bdb65e8ce3114b20b4ff8b2caa4184.jpg",
|
| 284 |
+
"image_caption": [
|
| 285 |
+
"Figure 4: Comparison of different configuration of ChatEval on FairEval Benchmark. We use One, Sim and wSum to denote one-by-one, simultaneously-talk and simultaneously-talk-with-summarizer respectively. "
|
| 286 |
+
],
|
| 287 |
+
"image_footnote": [],
|
| 288 |
+
"page_idx": 6
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"type": "text",
|
| 292 |
+
"text": "Figure 5 showcases the debate process towards the evaluation of two assistants’ responses to the open-ended question ”What are the most effective ways to deal with stress?”. We can find that both of the responses produce similar strategies and equally compelling descriptions for dealing with stress, making it challenging to discern significant disparity in terms of quality. It is in this context of nuanced evaluation that the significance of the ChatEval process emerges. ",
|
| 293 |
+
"page_idx": 7
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "text",
|
| 297 |
+
"text": "We can pinpoint several human-like behaviors exhibited by the agents that can enrich our comprehension of the evaluation process; (1) Opening Statement: Alice initiates the debate with a clear stance, establishing the foundational argument and guiding the trajectory of the subsequent discourse. (2) Alternative Proposal: Bob introduces an alternative viewpoint, emphasizing the need to consider diverse interpretations. This not only broadens the discussion but also stimulates critical thinking. In the context of a debate, the introduction of an alternative proposal prevents the stagnation of thought, challenges pre-existing bias, and uncovers considerations that might otherwise be overlooked, ensuring that the discussions are well-rounded. (3) Stance Maintenance: Alice’s persistent adherence to her initial stance, even when faced with opposing views, exemplifies commitment and challenges other participants to refine their perspectives. This behaviour ensures the conversation remains robust, focused, and continually evolving, driving all participants to a higher level of engagement and critical thinking. (4) Seeking Consensus: The discussion’s climax reveals a collective agreement amongst the participants, which is reached through mutual understanding and compromise, underlining the value of each presented viewpoint. ",
|
| 298 |
+
"page_idx": 7
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "text",
|
| 302 |
+
"text": "In light of the above, ChatEval stands out not just as a tool for comparison but as an embodiment of interactive natural language dialogue. By simulating human argumentative interactions, it differentiates itself from static, single-presented opinions. This dynamic interaction showcases the richness and complexity of language, capturing nuances often missed in singular viewpoints. As such, ChatEval offers a reliable evaluation process that not only mirrors human discourse but also highlights the transformative power of collaborative dialogue. This positions it uniquely, underscoring its significant potential to execute text evaluation tasks both reliably and effectively. ",
|
| 303 |
+
"page_idx": 7
|
| 304 |
+
},
|
| 305 |
+
{
|
| 306 |
+
"type": "image",
|
| 307 |
+
"img_path": "images/63178f8d061914bcb42b074a2b04035781d6cceb1e44691f01c52413ec70c60a.jpg",
|
| 308 |
+
"image_caption": [],
|
| 309 |
+
"image_footnote": [],
|
| 310 |
+
"page_idx": 7
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "Figure 5: An illustrative example from ChatEval presenting a discussion process involving participants Alice $( \\frac { \\frac { 5 } { 7 } } { 1 5 } )$ , Bob $( \\frac { \\frac { 4 } { x } } { \\frac { 4 } { y } } )$ and Carol $( \\mathbf { \\Sigma } _ { [ \\bar { \\tau } ] } ^ { \\bar { \\tau } } )$ . They initiate a group talk with the purpose of determining the superior response from two assistants. Due to spatial constraints within the layout, we use [...] to omit some redundant text. ",
|
| 315 |
+
"page_idx": 7
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "5 RELATED WORK ",
|
| 320 |
+
"text_level": 1,
|
| 321 |
+
"page_idx": 8
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "Automatic NLG evaluation In the landscape of NLG, evaluating the quality of texts represents a particularly arduous task. For a significant period, evaluation was primarily dependent on human annotations that is labor-intensive and limited by scalability issues. Automatic NLG evaluation attempts to address these challenges by leveraging computational models to assess the quality of texts. Previous work lies on the following categories: (1) $n$ -gram-based metrics: ROUGE (Lin, 2004) is a set of metrics that compute the amount of overlap between n-grams in the machine-generated summaries and the reference summaries. BLEU (Papineni et al., 2002) compare the generated texts with reference translations, based on the co-occurrence of n-grams in both texts. In spite of being easily and widely used, the above method is incapable of capturing syntactic and semantic similarity (Stent et al., 2005). (2) embedding-based metrics: Word embeddings are vector representations of words that capture their semantic properties. A bunch of work leverages word embeddings to evaluate the semantic similarity between two pieces of texts. BERTScore (Zhang et al., 2019) use contextualized word embeddings from transformer models like BERT (Devlin et al., 2018), BLEURT (Sellam et al., 2020) utilize supervised training data to enhance the performance. MoverScore (Zhao et al., 2019) combine contextualized word embeddings with Earth Mover’s Distance (Rubner et al., 2000). (3) LLM-based metrics: Amidst the flourishing advancement of LLM which embodies a wealth of information derived from extensive training data, using LLM as an evaluator has experienced notable progress. GPTScore (Fu et al., 2023) utilize conditional probability to assign the texts a score representing its quality. Wang et al. (2023a) explore the potential of utilizing ChatGPT as an NLG evaluator by prompting it to score texts directly. Wang et al. (2023c) curate a reliable dataset containing pairwise comparison and evaluation explanation which can be used to train a foundation model making it a better evaluator. Bai et al. (2023) propose decentralized evaluation to provide fairer evaluation results. G-EVAL (Liu et al., 2023b) propose probability-weighted techniques to calibrate the score given by a single LLM. ",
|
| 326 |
+
"page_idx": 8
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "text",
|
| 330 |
+
"text": "Communicative Agents Most recently, significant attention has been dedicated to the development of communicative agents. These agents, often acted by LLMs like ChatGPT or GPT-4, are designed to interact and communicate effectively with other agents or human users using natural language. The primary goal is to facilitate more productive and efficient interaction and collaboration as different agents can autonomously communicate and negotiate to tackle a more complex task collectively. Several studies have explored various aspects of communicative agents. Li et al. (2023a); Chen et al. (2023) propose a cooperative agent framework enabling agents to autonomously cooperate to solve complex tasks. Park et al. (2023) create a sandbox environment consisting of 25 individual virtual entities endowed with a character description and memory system. Every intelligent agent is capable of autonomously interacting with other agents and the environment simulating reliable human behavior. Dong et al. (2023); Qian et al. (2023) incorporate a waterfall model to manage a multiagent virtual team towards software development. Liu et al. (2023a) utilize a sandbox environment to curate reliable datasets in better alignment with human preference and train a socially-aligned LLM. Liang et al. (2023) and Du et al. (2023) also make use of the multi-agent debate framework in other scenarios such as translation and arithmetic problems resulting in better results. Wang et al. (2023d) propose an alternative method called self-collaboration to enable the communication of agents by utilizing a single LLM prompted by multi-persona descriptions. Mandi et al. (2023) propose a novel framework designed for the collaboration of multiple robots, utilizing multiple LLMs to enhance coordination and strategic planning among the robots. Concurrent with our work, Li et al. (2023b); Zhang et al. (2023) also propose a similar approach. However, they probe different dimensions of improving LLM-based evaluators and do not explore the effectiveness of natural language interaction. ",
|
| 331 |
+
"page_idx": 8
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"type": "text",
|
| 335 |
+
"text": "6 CONCLUSION ",
|
| 336 |
+
"text_level": 1,
|
| 337 |
+
"page_idx": 8
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"type": "text",
|
| 341 |
+
"text": "In this paper, we present evidence that ChatEval contributes to improving the evaluation performance concerning text quality, aligning more closely with human preferences. We emphasize the necessity of the diverse role specification and propose distinct communication strategies as integral components within ChatEval. Our qualitative analysis of the discussion process conveys insightful intuitions about how texts are evaluated by ChatEval and substantiates our approach’s ability to support comprehensive evaluations akin to human judgment, thereby demonstrating the reliability and efficacy of our framework. ",
|
| 342 |
+
"page_idx": 8
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"type": "text",
|
| 346 |
+
"text": "",
|
| 347 |
+
"text_level": 1,
|
| 348 |
+
"page_idx": 9
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"type": "text",
|
| 352 |
+
"text": "REFERENCES \nYushi Bai, Jiahao Ying, Yixin Cao, Xin Lv, Yuze He, Xiaozhi Wang, Jifan Yu, Kaisheng Zeng, Yijia Xiao, Haozhe Lyu, et al. Benchmarking foundation models with language-model-as-an-examiner. arXiv preprint arXiv:2306.04181, 2023. \nSatanjeev Banerjee and Alon Lavie. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pp. 65–72, 2005. \nChris Callison-Burch. Fast, cheap, and creative: Evaluating translation quality using amazon’s mechanical turk. In Proceedings of the 2009 conference on empirical methods in natural language processing, pp. 286–295, 2009. \nAsli Celikyilmaz, Elizabeth Clark, and Jianfeng Gao. Evaluation of text generation: A survey. CoRR, abs/2006.14799, 2020. URL https://arxiv.org/abs/2006.14799. \nWeize Chen, Yusheng Su, Jingwei Zuo, Cheng Yang, Chenfei Yuan, Chen Qian, Chi-Min Chan, Yujia Qin, Yaxi Lu, Ruobing Xie, Zhiyuan Liu, Maosong Sun, and Jie Zhou. Agentverse: Facilitating multi-agent collaboration and exploring emergent behaviors in agents, 2023. \nCheng-Han Chiang and Hung-yi Lee. Can large language models be an alternative to human evaluations? arXiv preprint arXiv:2305.01937, 2023. \nWei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E Gonzalez, et al. Vicuna: An open-source chatbot impressing gpt-4 with $9 0 \\% *$ chatgpt quality. See https://vicuna. lmsys. org (accessed 14 April 2023), 2023. \nJacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018. \nYihong Dong, Xue Jiang, Zhi Jin, and Ge Li. Self-collaboration code generation via chatgpt. arXiv preprint arXiv:2304.07590, 2023. \nYilun Du, Shuang Li, Antonio Torralba, Joshua B Tenenbaum, and Igor Mordatch. Improving factuality and reasoning in language models through multiagent debate. arXiv preprint arXiv:2305.14325, 2023. \nJinlan Fu, See-Kiong Ng, Zhengbao Jiang, and Pengfei Liu. Gptscore: Evaluate as you desire. arXiv preprint arXiv:2302.04166, 2023. \nMingqi Gao, Jie Ruan, Renliang Sun, Xunjian Yin, Shiping Yang, and Xiaojun Wan. Human-like summarization evaluation with chatgpt. arXiv preprint arXiv:2304.02554, 2023. \nKarthik Gopalakrishnan, Behnam Hedayatnia, Qinlang Chen, Anna Gottardi, Sanjeev Kwatra, Anushree Venkatesh, Raefer Gabriel, and Dilek Hakkani-Tur. Topical-chat: Towards knowledge- ¨ grounded open-domain conversations. 2019. \nMarzena Karpinska, Nader Akoury, and Mohit Iyyer. The perils of using mechanical turk to evaluate open-ended text generation. arXiv preprint arXiv:2109.06835, 2021. \nGrzegorz Kondrak. N-gram similarity and distance. In International symposium on string processing and information retrieval, pp. 115–126. Springer, 2005. \nGuohao Li, Hasan Abed Al Kader Hammoud, Hani Itani, Dmitrii Khizbullin, and Bernard Ghanem. Camel: Communicative agents for” mind” exploration of large scale language model society. arXiv preprint arXiv:2303.17760, 2023a. \nRuosen Li, Teerth Patel, and Xinya Du. Prd: Peer rank and discussion improve large language model based evaluations. arXiv preprint arXiv:2307.02762, 2023b. \nTian Liang, Zhiwei He, Wenxiang Jiao, Xing Wang, Yan Wang, Rui Wang, Yujiu Yang, Zhaopeng Tu, and Shuming Shi. Encouraging divergent thinking in large language models through multiagent debate. arXiv preprint arXiv:2305.19118, 2023. \nChin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pp. 74–81, 2004. \nRuibo Liu, Ruixin Yang, Chenyan Jia, Ge Zhang, Denny Zhou, Andrew M Dai, Diyi Yang, and Soroush Vosoughi. Training socially aligned language models in simulated human society. arXiv preprint arXiv:2305.16960, 2023a. \nYang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. Gpteval: Nlg evaluation using gpt-4 with better human alignment. arXiv preprint arXiv:2303.16634, 2023b. \nAndrea I Luppi, Pedro AM Mediano, Fernando E Rosas, Negin Holland, Tim D Fryer, John T O’Brien, James B Rowe, David K Menon, Daniel Bor, and Emmanuel A Stamatakis. A synergistic core for human brain evolution and cognition. Nature Neuroscience, 25(6):771–782, 2022. \nZhao Mandi, Shreeya Jain, and Shuran Song. Roco: Dialectic multi-robot collaboration with large language models. arXiv preprint arXiv:2307.04738, 2023. \nMary L McHugh. Interrater reliability: the kappa statistic. Biochemia medica, 22(3):276–282, 2012. \nShikib Mehri and Maxine Eskenazi. Usr: An unsupervised and reference free evaluation metric for dialog generation. arXiv preprint arXiv:2005.00456, 2020. \nJekaterina Novikova, Ondˇrej Dusek, Amanda Cercas Curry, and Verena Rieser. Why we need ˇ new evaluation metrics for NLG. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2241–2252, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/D17-1238. URL https:// aclanthology.org/D17-1238. \nKishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pp. 311–318, 2002. \nJoon Sung Park, Joseph C O’Brien, Carrie J Cai, Meredith Ringel Morris, Percy Liang, and Michael S Bernstein. Generative agents: Interactive simulacra of human behavior. arXiv preprint arXiv:2304.03442, 2023. \nChen Qian, Xin Cong, Cheng Yang, Weize Chen, Yusheng Su, Juyuan Xu, Zhiyuan Liu, and Maosong Sun. Communicative agents for software development. arXiv preprint arXiv:2307.07924, 2023. \nYossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover’s distance as a metric for image retrieval. International journal of computer vision, 40:99–121, 2000. \nThibault Sellam, Dipanjan Das, and Ankur P Parikh. Bleurt: Learning robust metrics for text generation. arXiv preprint arXiv:2004.04696, 2020. \nChenhui Shen, Liying Cheng, Yang You, and Lidong Bing. Are large language models good evaluators for abstractive summarization? arXiv preprint arXiv:2305.13091, 2023. \nAmanda Stent, Matthew Marge, and Mohit Singhai. Evaluating evaluation methods for generation in the presence of variation. In International conference on intelligent text processing and computational linguistics, pp. 341–351. Springer, 2005. \nChris Van Der Lee, Albert Gatt, Emiel Van Miltenburg, Sander Wubben, and Emiel Krahmer. Best practices for the human evaluation of automatically generated text. In Proceedings of the 12th International Conference on Natural Language Generation, pp. 355–368, 2019. \nJiaan Wang, Yunlong Liang, Fandong Meng, Haoxiang Shi, Zhixu Li, Jinan Xu, Jianfeng Qu, and Jie Zhou. Is chatgpt a good nlg evaluator? a preliminary study. arXiv preprint arXiv:2303.04048, 2023a. \nPeiyi Wang, Lei Li, Liang Chen, Dawei Zhu, Binghuai Lin, Yunbo Cao, Qi Liu, Tianyu Liu, and Zhifang Sui. Large language models are not fair evaluators. arXiv preprint arXiv:2305.17926, 2023b. \nYidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, et al. Pandalm: An automatic evaluation benchmark for llm instruction tuning optimization. arXiv preprint arXiv:2306.05087, 2023c. \nZhenhailong Wang, Shaoguang Mao, Wenshan Wu, Tao Ge, Furu Wei, and Heng Ji. Unleashing cognitive synergy in large language models: A task-solving agent through multi-persona selfcollaboration. arXiv preprint arXiv:2307.05300, 2023d. \nAnita Williams Woolley, Christopher F Chabris, Alex Pentland, Nada Hashmi, and Thomas W Malone. Evidence for a collective intelligence factor in the performance of human groups. science, 330(6004):686–688, 2010. \nNing Wu, Ming Gong, Linjun Shou, Shining Liang, and Daxin Jiang. Large language models are diverse role-players for summarization evaluation. arXiv preprint arXiv:2303.15078, 2023. \nTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with bert. arXiv preprint arXiv:1904.09675, 2019. \nXinghua Zhang, Bowen Yu, Haiyang Yu, Yangyu Lv, Tingwen Liu, Fei Huang, Hongbo Xu, and Yongbin Li. Wider and deeper llm networks are fairer llm evaluators, 2023. \nWei Zhao, Maxime Peyrard, Fei Liu, Yang Gao, Christian M Meyer, and Steffen Eger. Moverscore: Text generation evaluating with contextualized embeddings and earth mover distance. arXiv preprint arXiv:1909.02622, 2019. \nLianmin Zheng, Wei-Lin Chiang, Ying Sheng, Siyuan Zhuang, Zhanghao Wu, Yonghao Zhuang, Zi Lin, Zhuohan Li, Dacheng Li, Eric Xing, et al. Judging llm-as-a-judge with mt-bench and chatbot arena. arXiv preprint arXiv:2306.05685, 2023. \nMing Zhong, Yang Liu, Da Yin, Yuning Mao, Yizhu Jiao, Pengfei Liu, Chenguang Zhu, Heng Ji, and Jiawei Han. Towards a unified multi-dimensional evaluator for text generation. arXiv preprint arXiv:2210.07197, 2022. ",
|
| 353 |
+
"page_idx": 9
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"type": "text",
|
| 357 |
+
"text": "",
|
| 358 |
+
"page_idx": 10
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"type": "text",
|
| 362 |
+
"text": "",
|
| 363 |
+
"page_idx": 11
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"type": "text",
|
| 367 |
+
"text": "A PROMPT TEMPLATE AND DIVERSE ROLE PROMPTS ",
|
| 368 |
+
"text_level": 1,
|
| 369 |
+
"page_idx": 11
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"type": "text",
|
| 373 |
+
"text": "The overall prompt template is shown in Table 4, we draw inspiration from Wu et al. (2023) and design several different role descriptions as follows. ",
|
| 374 |
+
"page_idx": 11
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "text",
|
| 378 |
+
"text": "General Public You are now General Public, one of the referees in this task. You are interested in the story and looking for updates on the investigation. Please think critically by yourself and note that it’s your responsibility to choose one of which is the better first. ",
|
| 379 |
+
"page_idx": 11
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"type": "text",
|
| 383 |
+
"text": "Critic You are now Critic, one of the referees in this task. You will check fluent writing, clear sentences, and good wording in summary writing. Your job is to question others judgment to make sure their judgment is well-considered and offer an alternative solution if two responses are at the same level. ",
|
| 384 |
+
"page_idx": 11
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"type": "text",
|
| 388 |
+
"text": "News Author You are News Author, one of the referees in this task. You will focus on the consistency with the original article. Please help other people to determine which response is the better one. ",
|
| 389 |
+
"page_idx": 11
|
| 390 |
+
},
|
| 391 |
+
{
|
| 392 |
+
"type": "text",
|
| 393 |
+
"text": "Psychologist You are Psychologist, one of the referees in this task. You will study human behavior and mental processes in order to understand and explain human behavior. Please help other people to determine which response is the better one. ",
|
| 394 |
+
"page_idx": 11
|
| 395 |
+
},
|
| 396 |
+
{
|
| 397 |
+
"type": "text",
|
| 398 |
+
"text": "Scientist You are Scientist, one of the referees in this task. You are a professional engaged in systematic study who possesses a strong background in the scientific method, critical thinking, and problem-solving abilities. Please help other people to determine which response is the better one. ",
|
| 399 |
+
"page_idx": 11
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"type": "text",
|
| 403 |
+
"text": "B IMPLEMENTATION DETAILS ",
|
| 404 |
+
"text_level": 1,
|
| 405 |
+
"page_idx": 11
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"type": "text",
|
| 409 |
+
"text": "We choose to utilize models from OpenAI’s GPT family as our LLMs in ChatEval, including GPT-4 and ChatGPT (GPT-3.5-turbo) and set the temperature to 0 to ensure reproducibility. The rationale ",
|
| 410 |
+
"page_idx": 11
|
| 411 |
+
},
|
| 412 |
+
{
|
| 413 |
+
"type": "text",
|
| 414 |
+
"text": "[Question] \n{source text} \n[The Start of Assistant 1’s Answer] \n{compared text one} \n[The End of Assistant 1’s Answer] \n[The Start of Assistant 2’s Answer] \n{compared text two} \n[The End of Assistant 2’s Answer] \n[System] \nWe would like to request your feedback on the performance of two AI assistants in response to the user question displayed above. \nPlease consider the helpfulness, relevance, accuracy, and level of detail of their responses. Each assistant receives an overall score on a scale of 1 to 10, where a higher score indicates better overall performance. \nThere are a few other referees assigned the same task, it’s your responsibility to discuss with them and think critically before you make your final judgment. \nHere is your discussion history: \n{chat history} \n{role description} \nNow it’s your time to talk, please make your talk short and clear, {agent name} ",
|
| 415 |
+
"page_idx": 12
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"type": "text",
|
| 419 |
+
"text": "Table 4: The prompt template for FairEval Dataset. We replace the colored slot with real text before querying the LLMs. Note that we use the same template when conducting single-agent-based experiments and ignore the chat history and role description slot. ",
|
| 420 |
+
"page_idx": 12
|
| 421 |
+
},
|
| 422 |
+
{
|
| 423 |
+
"type": "text",
|
| 424 |
+
"text": "behind this selection is the exceptional performance these models offer, being among the most advanced and powerful in the world. Additionally, their accessibility and ease of use through APIs enable us to directly call and interact with the models during our research, significantly simplifying the process. In our current research, we focus on homogeneous groups of LLMs. That is, within a given multi-agent group, all LLMs belong to the same GPT family model, either all GPT-4 or all ChatGPT. We acknowledge the potential of heterogeneous groups for future research, which could provide fascinating insights into how strong models and weak models can cooperate in a multi-agent setting. Additionally, unlike previous work like Du et al. (2023), we do not explicitly ask the debater agents to reach a consensus at the end of the debate. In situations where the response format relies on direct comparison, we derive the final results from the majority vote among various annotators. Conversely, if the response format requires a direct score, we calculate the average score obtained from multiple annotators. This methodological approach ensures the impartiality and balance of our evaluation process. ",
|
| 425 |
+
"page_idx": 12
|
| 426 |
+
},
|
| 427 |
+
{
|
| 428 |
+
"type": "text",
|
| 429 |
+
"text": "C FORMAL DEPICTION OF DIFFERENT COMMUNICATION STRATEGY ",
|
| 430 |
+
"text_level": 1,
|
| 431 |
+
"page_idx": 12
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"type": "text",
|
| 435 |
+
"text": "In this paper, we predominantly adopt the following three different communication strategies, which are: ",
|
| 436 |
+
"page_idx": 12
|
| 437 |
+
},
|
| 438 |
+
{
|
| 439 |
+
"type": "text",
|
| 440 |
+
"text": "1. One-By-One. During each round of the debate, the debater agents take turns in a set order to generate their response based on the current observation. When it’s time for a debater agent to respond, we directly concatenate what previous other agents have said into its chat history slot. Please refer to Algorithm 1. \n2. Simultaneous-Talk. Unlike the one-by-one strategy, we carry out an alternative communication strategy called simultaneous-talk, where debater agents are prompted to asynchronously generate responses in each iteration of the discussion to nullify the impact of the speaking order. Please refer to Algorithm 2. \n3. Simultaneous-Talk-with-Summarizer. The main difference between this strategy and simultaneous-talk is that we additionally employ another LLM as a summarizer. At the end of each iteration of the debate, we prompt this extra LLM to summarize the messages ",
|
| 441 |
+
"page_idx": 12
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"type": "text",
|
| 445 |
+
"text": "conveyed so far and we replace the chat history slots of all debater agents with this summarization. Please refer to Algorithm 3. ",
|
| 446 |
+
"page_idx": 13
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"type": "text",
|
| 450 |
+
"text": "Algorithm 1: One-by-One ",
|
| 451 |
+
"text_level": 1,
|
| 452 |
+
"page_idx": 13
|
| 453 |
+
},
|
| 454 |
+
{
|
| 455 |
+
"type": "text",
|
| 456 |
+
"text": "input : agents number $N$ , discuss turn $T$ , a group of debate agents $[ D _ { 1 } , \\cdots , D _ { N } ]$ , chat history of each agent $[ H _ { 1 } , \\cdots , H _ { N } ]$ , answer extracter (either majority vote or average score) EXT output: Final results for text evaluation $A N S$ 1 for $t \\gets 0$ to $T$ do 2 for $n \\gets 1$ to $N$ do 3 $h _ { n } \\gets D _ { n } ( H _ { n } )$ ; // utilize agents to generate responses 4 for $m \\gets n$ to $N$ do 5 if $m > { I }$ then 6 $H _ { m } \\gets H _ { m } + h _ { n } ;$ ; // concatenate current response to later agents’ chat history 7 end 8 end 9 end 10 end 11 $A N S \\gets E X T ( [ H _ { 1 } , \\cdot \\cdot \\cdot , H _ { N } ] )$ ; 12 return $A N S$ ; ",
|
| 457 |
+
"page_idx": 13
|
| 458 |
+
},
|
| 459 |
+
{
|
| 460 |
+
"type": "text",
|
| 461 |
+
"text": "Algorithm 2: Simultaneous-Talk ",
|
| 462 |
+
"text_level": 1,
|
| 463 |
+
"page_idx": 13
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"type": "text",
|
| 467 |
+
"text": "input : agents number $N$ , discuss turn $T$ , a group of debate agents $[ D _ { 1 } , \\cdots , D _ { N } ]$ , chat history of each agent $[ H _ { 1 } , \\cdots , H _ { N } ]$ , answer extracter (either majority vote or average score) $E X T$ , buffer $B U F$ output: Final results for text evaluation $A N S$ 1 for $t \\gets 0$ to $T$ do 2 for $n \\gets 1$ to $N$ do 3 $h _ { n } \\gets D _ { n } ( H _ { n } )$ ; // utilize agents to generate responses 4 $b u f b u f + h _ { n } ;$ ; // add the responses in current turn to the buffer 5 end 6 for $n \\gets 1$ to $N$ do 7 $H _ { n } \\gets H _ { n } + b u f$ ; // add the buffer to all agents’ chat history 8 end 9 end 10 $A N S \\gets E X T ( [ H _ { 1 } , \\cdot \\cdot \\cdot , H _ { N } ] ) ;$ ; 11 return AN S; ",
|
| 468 |
+
"page_idx": 13
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "text",
|
| 472 |
+
"text": "D GENERALIZATION TO SMALLER MODELS ",
|
| 473 |
+
"text_level": 1,
|
| 474 |
+
"page_idx": 13
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "Our primary focus in the paper is on the framework implemented with the most powerful LLMs such as ChatGPT and GPT-4. However, we also carry out the experiments on Llama2-Chat-7b and Vicuna-7b-v1.5. As indicated in the Table 5, Llama2-Chat achieves only marginal performance under single-agent CoT methods. Despite reaching an accuracy of $3 7 . 5 \\%$ , the negative kappa coefficient suggests that the observed agreement is less than what would be expected by chance. However, it is noteworthy that through the application of a multi-agent debate, Llama2-Chat demonstrates a modest improvement, albeit still marginally above chance levels. ",
|
| 479 |
+
"page_idx": 13
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "text",
|
| 483 |
+
"text": "input : agents number $N$ , discuss turn $T$ , a group of debate agents $[ D _ { 1 } , \\cdots , D _ { N } ]$ , chat history of each agent $[ H _ { 1 } , \\cdots , H _ { N } ]$ , answer extracter (either majority vote or average score) $E X T$ , buffer $B U F$ , summarizer $S U M$ output: Final results for text evaluation $A N S$ 1 for $t \\gets 0$ to $T$ do 2 for $n \\gets 1$ to $N$ do 3 $h _ { n } \\gets D _ { n } ( H _ { n } )$ ; // utilize agents to generate responses 4 $b u f b u f + h _ { n } $ ; // add the responses in current turn to the buffer 5 end 6 for $n \\gets 1$ to $N$ do 7 $H _ { n } \\gets H _ { n } + S U M ( B U F )$ ; // add the summarized buffer to all agents’ chat history 8 end 9 end 10 $A N S \\gets E X T ( [ H _ { 1 } , \\cdot \\cdot \\cdot , H _ { N } ] ) ;$ ; 11 return $A N S$ ; ",
|
| 484 |
+
"page_idx": 14
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"type": "text",
|
| 488 |
+
"text": "In contrast, Vicuna exhibits more robust performance improvement compared to Llama2-Chat. ChatEval notably enhances its capabilities, achieving an accuracy of $5 2 . 3 \\%$ and a kappa coefficient of 0.19, indicative of fair agreement beyond chance. While both models show limitations in their performance, these results demonstrate the effectiveness of ChatEval and underscore its positive impact. ",
|
| 489 |
+
"page_idx": 14
|
| 490 |
+
},
|
| 491 |
+
{
|
| 492 |
+
"type": "table",
|
| 493 |
+
"img_path": "images/329c2f2116dd4dae787ccd14385f4be8f5bea96b14f943df0de01b3ea7472244.jpg",
|
| 494 |
+
"table_caption": [
|
| 495 |
+
"Algorithm 3: Simultaneous-Talk-with-Summarizer ",
|
| 496 |
+
"Table 6: Average Cost on FairEval. "
|
| 497 |
+
],
|
| 498 |
+
"table_footnote": [],
|
| 499 |
+
"table_body": "<table><tr><td>Evaluator</td><td>Cost</td><td>Time</td></tr><tr><td></td><td colspan=\"2\"></td></tr><tr><td>Human GPT-4(SA)</td><td>$90 $2.90</td><td>240min 10min</td></tr><tr><td>GPT-4(EN)</td><td>$8.70</td><td>10min</td></tr><tr><td>GPT-4(MA)</td><td>$12.30</td><td>36min</td></tr><tr><td>ChatGPT(SA)</td><td></td><td></td></tr><tr><td></td><td>$0.11</td><td>3min</td></tr><tr><td>ChatGPT(EN)</td><td>$0.33</td><td>3min</td></tr><tr><td>ChatGPT(MA)</td><td>$0.41</td><td>11min</td></tr><tr><td>G-EVAL-3.5</td><td>$2.20</td><td>3min</td></tr><tr><td>G-EVAL-4</td><td>$58</td><td>10min</td></tr><tr><td>FairEval-ChatGPT</td><td>$0.34</td><td>3min</td></tr><tr><td>FairEval-GPT-4</td><td>$6.38</td><td>10min</td></tr></table>",
|
| 500 |
+
"page_idx": 14
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"type": "table",
|
| 504 |
+
"img_path": "images/9c022abfec471159b2b48355568af8deaabf287c42551cb5995d3913203ad597.jpg",
|
| 505 |
+
"table_caption": [
|
| 506 |
+
"Table 5: Accuracy (Acc.) and Kappa correlation coefficient (Kap.) of smaller models on FairEval. "
|
| 507 |
+
],
|
| 508 |
+
"table_footnote": [],
|
| 509 |
+
"table_body": "<table><tr><td>Evaluator</td><td>Acc. (%)</td><td>Kap.</td></tr><tr><td>Llama2-Chat-7B (SA)</td><td>37.5±1.3</td><td>-0.01±0.01</td></tr><tr><td>Llama2-Chat-7B (MA)</td><td>40.0±1.1</td><td>0.05±0.01</td></tr><tr><td>Vicuna-7B-v1.5 (SA)</td><td>45.0±1.5</td><td>0.12±0.01</td></tr><tr><td>Vicuna-7B-v1.5 (MA)</td><td>52.3±1.3</td><td>0.19±0.01</td></tr></table>",
|
| 510 |
+
"page_idx": 14
|
| 511 |
+
},
|
| 512 |
+
{
|
| 513 |
+
"type": "text",
|
| 514 |
+
"text": "E AVERAGE COST ",
|
| 515 |
+
"text_level": 1,
|
| 516 |
+
"page_idx": 14
|
| 517 |
+
},
|
| 518 |
+
{
|
| 519 |
+
"type": "text",
|
| 520 |
+
"text": "We release the average cost of our framework and other methods against with employing human evaluators. In the Table 6, it is evident that the evaluator based on LLMs significantly reduces both time and financial expenditures. Although the ChatEval framework incurs higher costs than the SA and MA ensemble methods due to multiple inference rounds necessary for final judgment derivation, it remains more cost-effective than employing human evaluators. We consider this an acceptable trade-off for the benefits provided. ",
|
| 521 |
+
"page_idx": 14
|
| 522 |
+
}
|
| 523 |
+
]
|
parse/test/FQepisCUWu/FQepisCUWu_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/FQepisCUWu/FQepisCUWu_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/MLBdiWu4Fw/MLBdiWu4Fw.md
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# INTERNVID: A LARGE-SCALE VIDEO-TEXT DATASET FOR MULTIMODAL UNDERSTANDING AND GENERATION
|
| 2 |
+
|
| 3 |
+
Yi Wang∗1, Yinan $\mathbf { H e ^ { * 1 } }$ , Yizhuo $\mathbf { L i } ^ { * 4 , 1 }$ , Kunchang $\mathbf { L i } ^ { 6 , 1 }$ , Jiashuo $\mathbf { Y u } ^ { 1 }$ , Xin $\mathbf { M a } ^ { 3 , 1 }$ Xinhao $\mathbf { L i } ^ { 2 , 1 }$ , Guo Chen2,1, Xinyuan Chen1, Yaohui Wang1, Ping Luo4,1, Ziwei Liu5,1 Yali Wang†6,1, Limin Wang†2,1, Yu Qiao†1 1OpenGVLab, Shanghai AI Laboratory 2Nanjing University 3Monash University 4The University of Hong Kong 5Nanyang Technological University 6Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences https://github.com/OpenGVLab/InternVideo/tree/main/Data/InternVid
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
This paper introduces InternVid, a large-scale video-centric multimodal dataset that enables learning powerful and transferable video-text representations for multimodal understanding and generation. InternVid contains over 7 million videos lasting nearly 760K hours, yielding 234M video clips accompanied by detailed descriptions of total 4.1B words. Our core contribution is to develop a scalable approach to autonomously build a high-quality video-text dataset with large language models (LLM), thereby showcasing its efficacy in learning video-language representation at scale. Specifically, we utilize a multi-scale approach to generate video-related descriptions. Furthermore, we introduce ViCLIP, a video-text representation learning model based on ViT-L. Learned on InternVid via contrastive learning, this model demonstrates leading zero-shot action recognition and competitive video retrieval performance. Beyond basic video understanding tasks like recognition and retrieval, our dataset and model have broad applications. They are particularly beneficial for generating interleaved video-text data for learning a video-centric dialogue system, advancing video-to-text and text-to-video generation research. These proposed resources provide a tool for researchers and practitioners interested in multimodal video understanding and generation.
|
| 8 |
+
|
| 9 |
+

|
| 10 |
+
Figure 1: Examples (we give three frames of each video clip), the corresponding generated captions, and ASR transcripts in InternVid. In the captions, we highlight nouns in blue and verbs in green. Non-English transcripts are translated to English using LLM (Brown et al., 2020).
|
| 11 |
+
|
| 12 |
+
# 1 INTRODUCTION
|
| 13 |
+
|
| 14 |
+
Learning transferable video-text representations is both challenging and essential for video understanding in various real-world applications, such as autonomous driving, intelligent surveillance, human-computer interaction, to name a few. While contrastive learning using web-scale data has been successful in image-text representation, it remains underexplored in the video-text domain.
|
| 15 |
+
|
| 16 |
+
A key reason for this limited exploration is the lack of a high quality video-language dataset for pretraining at scale. Current research relies on datasets like HowTo100M (Miech et al., 2019), HD-VILA (Xue et al., 2022), and YT-Temporal (Zellers et al., 2021; 2022), whose texts are generated using automatic speech recognition (ASR). Despite their large scale, these datasets often have low semantic correlations between the videos and corresponding textual descriptions (Miech et al., 2019; Xue et al., 2022; Zellers et al., 2021; 2022). Empirical studies demonstrate that improving this correlation (e.g. aligning videos with subtitles to improve their matching) significantly benefits downstream tasks such as video retrieval and video question answering (Bain et al., 2021). Recent works have utilized WebVid10M (Bain et al., 2021), a dataset with higher-quality alt-texts, to address the low video-text correlation issue. However, its limited scale and dynamics hinder its use in current data and model scaling studies. Specifically, only 10M video-text pairs are provided, and the depicted scenes contain relatively few actions or activities.
|
| 17 |
+
|
| 18 |
+
We propose a large-scale video-centric dataset InternVid to address the challenge of scaling up videolanguage modeling while maintaining high video-text correspondence. Visual examples are given in Figure 1. Note the ASR transcripts barely depict visual elements in videos while the generated captions do. The dataset contains highly-correlated video-text pairs and includes over 7 million videos, totaling 760,000 hours and resulting in 234 million video clips, with various subsets for different needs. These videos cover 16 scenarios and around 6 thousand motion descriptions. To improve video-text matching, we generate captions using a multiscale approach. In the coarse scale, we caption the middle frame of each video and use the description as the video caption. In the fine scale, we produce and summarize frame-by-frame captions with a language model.
|
| 19 |
+
|
| 20 |
+
Leveraging InternVid, we scale a video-language transformer (ViT-L) in contrastive learning from a data perspective, and its experiments prove InternVid enables learning scalable video-text models. We introduce video masking to the model to accelerate the whole learning without compromising its effectiveness. The video and text encoders are initialized from the CLIP pretrained model with the same scale. With InternVid, we learn a video-text model for several epochs, achieving impressive zero-shot performance. Compared with previous Video CLIP variants, our proposed ViCLIP shows notable performance improvement, especially in zero-shot settings.
|
| 21 |
+
|
| 22 |
+
In addition to large-scale video-language contrastive pretraining, we discover its effectiveness in producing interleaved video-text data for learning a video-centric dialogue system like Flamingo (Alayrac et al., 2022; Awadalla et al., 2023), and advancing video generation. Since the text-annotated clips are extracted from videos, we naturally collect clips and their corresponding text based on the sampling locations. This results in approximately 7 million interleaved data pieces, suitable for instruction tuning as multi-turn video-centric dialogue. For video generation, we filter the core set and obtain 18 million video clips. Alongside WebVid-10M, InternVid can significantly improve a stable-diffusion based video generation model to new heights.
|
| 23 |
+
|
| 24 |
+
In summary, our contributions are threefold.
|
| 25 |
+
|
| 26 |
+
• We introduce a new web-scale video-language dataset InternVid. This dataset, aimed at advancing video-related multimodal understanding and generation at scale, is created using a multi-scale video captioning approach powered by LLM, ensuring high-quality video-text data with minimal human intervention. It includes computational features (video-text correlation and visual aesthetics) across the whole dataset and gives way to diverse subsets to cater to varying training needs. • We learn a new video-language model, ViCLIP, which is trained on InternVid using ViT-L. It incorporates both contrastive learning and mask modeling, allowing for efficient learning of transferrable video-language representation. This model achieves state-of-the-art zero-shot action recognition in Kinetics, scoring 75.7, 73.5, and 66.4 on K400, K600, and K700 with the average top1 and top5 accuracies, respectively. It gets competitive performance on video retrieval, setting a new baseline for video-text understanding. • InternVid fosters the development of multimodal dialogue systems and text-to-video generation. ViCLIP learned on InternVid could serve as a backbone of video-centric dialogue systems (Zhu et al., 2023a; Li et al., 2023c; Liu et al., 2023), conducting tasks as action recognition, temporal understanding, reasoning, and creativity within an open-ended environment. Furthermore, we provide a subset, InternVid-Aes, aiding in generating high-resolution watermark-free videos. Utilizing InternVid-Aes, both visual and quantitative outcomes of a text-to-video baseline can be noticeably enhanced (FVD: $7 0 5 . 3 6 1 6 . 5$ ).
|
| 27 |
+
|
| 28 |
+
<table><tr><td></td><td>Dataset Caption</td><td>Domain</td><td>#Videos</td><td></td><td>#Clips</td><td>Lenclip</td><td>Lencap</td><td>Dur(h)</td><td>Res</td></tr><tr><td>MSR-VTT (Xu et al.,2016)</td><td></td><td>Manual</td><td>open</td><td>7.2K</td><td>10K</td><td>15.0</td><td>9.3</td><td>40</td><td>240P</td></tr><tr><td>DideMo (Anne Hendricks et al.,2017)</td><td></td><td>Manual</td><td>Flickr</td><td>10.5K</td><td>27K</td><td>6.9</td><td>8.0</td><td>87</td><td>=</td></tr><tr><td>LSMDC (Rohrbach et al., 2017)</td><td></td><td>Manual</td><td>movie</td><td>200</td><td>118K</td><td>4.8</td><td>7.0</td><td>158</td><td>1080P</td></tr><tr><td>YouCook2 (Zhou et al., 2018)</td><td></td><td>Manual</td><td>cooking</td><td>2K</td><td>14K</td><td>19.6</td><td>8.8</td><td>176</td><td>=</td></tr><tr><td>How2 (Sanabria et al., 2018)</td><td></td><td>Manual</td><td>instruct</td><td>13.2K</td><td>80K</td><td>90.0</td><td>20.0</td><td>2K</td><td></td></tr><tr><td>ANet Caption (Krishna et al., 2017)</td><td></td><td>Manual</td><td>action</td><td>20K</td><td>100K</td><td>36.0</td><td>13.5</td><td>849</td><td></td></tr><tr><td>VideoCC3M(Nagrani et al., 2022)</td><td></td><td>Transfer</td><td>open</td><td>6.3M</td><td>10.3M</td><td>10</td><td>/</td><td>17.5K</td><td>=</td></tr><tr><td>WebVid10M(Bain et al.,2021)</td><td></td><td>Alt-text</td><td>open</td><td>10.7M</td><td>10.7M</td><td>18.0</td><td>12.0</td><td>52K</td><td>360P</td></tr><tr><td>WTS70M (Stroud et al., 2020)</td><td></td><td>Metadata</td><td>action</td><td>70M</td><td>70M</td><td>10</td><td>-</td><td>194K</td><td>-</td></tr><tr><td>HowTol00M (Miech et al.,2019)</td><td></td><td>ASR</td><td>instruct</td><td>1.2M</td><td>136M</td><td>3.6</td><td>4.0</td><td>134.5K</td><td>240P</td></tr><tr><td>HD-VILA-100M (Xue et al., 2022)</td><td></td><td>ASR</td><td>open</td><td>3.3M</td><td>103M</td><td>13.4</td><td>32.5</td><td>371.5K</td><td>720P</td></tr><tr><td>YT-Temporal-180M (Zellers et al.,2021)</td><td></td><td>ASR</td><td>open</td><td>6M</td><td>180M</td><td>-</td><td></td><td>=</td><td>=</td></tr><tr><td></td><td>InternVid (ours)</td><td>Generated</td><td>open</td><td>7.1M</td><td>234M</td><td>11.7</td><td>17.6</td><td>760.3K</td><td>720P</td></tr></table>
|
| 29 |
+
|
| 30 |
+
Table 1: Statistics of InternVid and its comparison with existing video-language datasets.
|
| 31 |
+
|
| 32 |
+
# 2 RELATED WORK
|
| 33 |
+
|
| 34 |
+
Multimodal Datasets. Vision-text data are necessary to enable crossmodal learning. To learn visonlanguage representation effectively, these datasets should be large at scale and high at vision-text correlations. To this end, researches usually leverage existing web images with alt-text (Thomee et al., 2016; Sharma et al., 2018; Changpinyo et al., 2021; Hu et al., 2022; Desai et al., 2021; Schuhmann et al., 2022) and videos with ASR transcriptions (Miech et al., 2019; Zellers et al., 2021; 2022; Xue et al., 2022; Bain et al., 2021; Srinivasan et al., 2021) for scalable learning.
|
| 35 |
+
|
| 36 |
+
For video-centric multimodal datasets, HowTo100M (Miech et al., 2019) collected instructional YouTube videos and exploited the corresponding ASR subtitles for learning joint representations. Nagrani et al. (2022) proposed VideoCC3M by transferring image-text datasets to video ones. Zellers et al. (2021; 2022) and Xue et al. (2022) proposed YT-Temporal and HD-VILA for Audio-Visual-Text joint learning and high-resolution video crossmodal learning, respectively. On the other hand, Bain et al. (2021) found video-text alignment matters more than their quantities, so they produced WebVid (Bain et al., 2021) where 10M videos with the corresponding alt-texts. This is frequently employed in recent video-language pretraining approaches (Li et al., 2023d; Cheng et al., 2023).
|
| 37 |
+
|
| 38 |
+
Video Understanding. Pretraining large-scale video-text models and fine-tuning them for downstream tasks has become the norm in the video-language field (Miech et al., 2020; Li & Wang, 2020; Xu et al., 2021; Li et al., 2023d; 2022a; Xu et al., 2021; Hu et al., 2022; Dou et al., 2022; Shen et al., 2021; Yao et al., 2021; Sun et al., 2019; Zhu & Yang, 2020; Wang et al., 2022b; Chen et al., 2022; Zellers et al., 2021; 2022; Zeng et al., 2023b;a; Chen et al., 2023a;b; He et al., 2023; Chen et al., 2023c). Early techniques (Sun et al., 2019; Zhu & Yang, 2020) used pretrained visual and language encoders to obtain offline video and text features, but recent methods (Li & Wang, 2020; Miech et al., 2020; Hu et al., 2022; Dou et al., 2022; Tong et al., 2022; Wang et al., 2023) highlight the advantages of end-to-end training. Common practices include two or three pretraining tasks, such as masked language modeling (Li et al., 2022b), video-text matching (Wang et al., 2022a), video-text contrastive learning (Xu et al., 2021; Wang et al., 2022b), masked video modeling (Tong et al., 2022; Wang et al., 2023; 2022b), and video-text masked modeling (Fu et al., 2021).
|
| 39 |
+
|
| 40 |
+
In the multimodal video context, VIOLET (Fu et al., 2021) combined masked language and video modeling, while All-in-one (Wang et al., 2022a) proposed a unified pretraining with a shared backbone. LAVENDER (Li et al., 2022b) unified tasks through masked language modeling. Despite their success in multimodal benchmarks, these methods’ reliance on limited video-text data hampers performance in video-only tasks like action recognition. Conversely, InternVideo (Wang et al., 2022b) and UMT (Li et al., 2023d) combined masked modeling with crossmodal contrastive learning, leading to competitive performance in both video-only and video-language tasks. MERLOT Reserve (Zellers et al., 2022) exploited 20 million video-text-audio pairs for training joint video representations using contrastive matching, setting new standards in video recognition and visual commonsense reasoning. To address modality entanglement in crossmodal learning, mPLUG-2 (Xu et al., 2023) introduced a shared module across image, video, and text to encourage modality collaboration while reserving modality-specific modules for their differences.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 2: The proposed multiscale video caption pipeline. The captions in coarse and fine scales are marked in green and blue, respectively.
|
| 44 |
+
|
| 45 |
+
# 3 INTERNVID: A VIDEO-CENTRIC MULTIMODAL DATASET
|
| 46 |
+
|
| 47 |
+
A high-quality video-text dataset at scale is a premise to conduct large-scale video-language learning and associated tasks. We build this dataset considering three factors: substantial temporal dynamics, rich and diverse semantics, and strong video-text correlations. To improve the temporal dynamics in the dataset, we gather videos retrieved using action/activity-based query words. For rich and varied semantics, we not only crawl trending videos across various categories but also deliberately increase the proportion of data consciously collected from various countries and languages. To strengthen video-text correlations, we employ image captioning and language models to generate video descriptions from frame-specific annotations. Next, we elaborate the dataset construction process and discuss its characteristics.
|
| 48 |
+
|
| 49 |
+
# 3.1 DATA CURATION
|
| 50 |
+
|
| 51 |
+
We collect videos from YouTube considering the diversity and richness of its data, and its support for academic usage. We obtain 7 million public YouTube videos with an average duration of 6.4 minutes, covering 16 topics. To avoid the overlap with the existing datasets, we acquire videos by creating a database of YouTube video IDs and excluding any videos already present in publicly available datasets (released prior to April 2023). The data curation strategies are two-fold. On one hand, We select popular channels and the corresponding hot or high-rated videos from the categories e.g. news, gaming, etc., resulting in 2 million videos. On the other hand, we create a list of motion descriptions. With it, we obtain 5.1 million videos by choosing the top retrieved ones.
|
| 52 |
+
|
| 53 |
+
Defining Actions for Queries. We define around 6K action phrases from American Time Use Survey (ATUS), public video datasets, and text corpus. Then they are refined both manually and automatically. We employ actions from ATUS from 2017 to 2022 (Heilbron et al., 2015), merging them and removing the duplicates. For the used video datasets, we leverage Kinetics (Carreira & Zisserman, 2017), SomethingSomething (Goyal et al., 2017; Mahdisoltani et al., 2018), UCF101 (Soomro et al., 2012), and so on. This provides us with 1103 action labels. Moreover, we access several visual grounding corpus (Song et al., 2021; Yang et al., 2022; Li et al., 2017). A language model (Brown et al., 2020) is employed to extract actions and their corresponding targets (if exist) to form phrases from the corpus, leading to 5001 actions with manual checking. Totally, we collect 6104 action queries for searching videos.
|
| 54 |
+
|
| 55 |
+
Collection Strategies. For quality control, we establish crawling rules. We collect videos that are between 10 seconds and 30 minutes in duration and have resolutions ranging from 360P to 720P. Videos with resolutions above 720P are processed to 720P. To enrich the dataset descriptions, we gather videos with their audio, subtitles, titles, summaries, and other metadata.
|
| 56 |
+
|
| 57 |
+
Trimming. We segment videos into clips using scene variance. We directly employ the corresponding filter in PySceneDetect with a threshold as 27. During this procedure, we also filter out clips in still or extreme dynamics (e.g. a browse of a photo gallery). After the filtering, we get 234M clips.
|
| 58 |
+
|
| 59 |
+
# 3.2 MULTISCALE VIDEO CAPTIONING
|
| 60 |
+
|
| 61 |
+
To generate video captions that are scalable, rich, and diverse, we employ a multiscale method with two distinct captioning strategies, as depicted in Figure 2. On the finer scale, we simplify the video captioning process by concentrating on the common objects, actions, and scene descriptions within the video clip. We deliberately overlook intricate details such as subtle facial expressions & movements, and other nuanced elements. On the coarser scale, we adopt the single-frame bias assumption from
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
|
| 65 |
+
Figure 3: Video statistics in InternVid. It encompasses a diverse set of categories, gathered from multiple countries and averaging a duration of five minutes.
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
Figure 4: Clip statistics in InternVid. InternVid contains a diverse distribution of clip durations and caption lengths. It also offers aesthetic scores and multimodal similarity scores for each clip.
|
| 69 |
+
|
| 70 |
+
(Lei et al., 2022) and exclusively caption the central frame of the video. Given our focus on brief clips (around 10 seconds) filtered via scene segmentation, most videos predominantly display consistent objects without substantial appearance alterations. This circumvents the identity-preserving issue when dealing with videos from image perspectives. We employ the lightweight image captioning model Tag2Text (Huang et al., 2023b) for the finer scale, which describes videos at low fps in a frame-by-frame manner. These individual image captions are then synthesized into a comprehensive video description using a pretrained language model T5-summary (Raffel et al., 2020; Chiang et al., 2023). At the coarser scale, we use BLIP2 (Li et al., 2023b) to caption the middle frame of the clip.
|
| 71 |
+
|
| 72 |
+
# 3.3 STATISTICS AND FEATURES
|
| 73 |
+
|
| 74 |
+
We present the statistics of InternVid with other video-language datasets in Table 1. We collected videos from 16 mainstream categories, as in Figure 3. Unlike prior studies (Miech et al., 2019; Xue et al., 2022; Zellers et al., 2021), we emphasize diversity by selecting videos from countries with different languages instead of only English. In terms of duration, every video lasts 351.9s on average. Almost half $(49 \% )$ of the videos are five minutes or less, while a quarter $( 2 6 \% )$ fall between five and ten minutes. Among the curated videos, $85 \%$ were high-resolution (720P), while the remaining $15 \%$ had lower resolutions ranging from 360P to 720P. Though the lower-resolution videos may not support high-quality video generation, they can still be useful in video-text representation learning.
|
| 75 |
+
|
| 76 |
+
InternVid exhibits diverse clip durations and caption lengths at the clip level. The aesthetic scores and clip-caption similarities are distributed uniformly, as shown in Figure 4. The majority of clips are 0-10 seconds in length, accounting for $85 \%$ of all clips (Figure 4: left). Approximately half of the clips have captions with 10-20 words. The statistics of the captions and transcripts is given in App. C.
|
| 77 |
+
|
| 78 |
+
We measured the aesthetic scores and clip-caption similarity of all clips using the models in (Schuhmann et al., 2022) and (Li et al., 2023d), respectively, as given in Figure 4: right. Based on these scores, we can build different versions of InternVid for various purposes. We uniformly sampled four frames of each clip, calculated their aesthetic scores, and took the maximum score as the video aesthetic score. For clip-caption similarity, we computed the cosine similarity between video embeddings and text ones, again using a uniform sampling of four frames for each clip. Most clips score around 4-6 in aesthetics, accounting for approximately $7 5 \%$ of the data. For UMT-SIM 1, over $80 \%$ of the clips scored between 0.3-0.4.
|
| 79 |
+
|
| 80 |
+
# 3.4 INTERLEAVED VIDEO-TEXT DATA GENERATION
|
| 81 |
+
|
| 82 |
+
Utilizing video-caption data, we can develop an interleaved video-text dataset for generative multimodal pretraining. Previous researches (Alayrac et al., 2022; Awadalla et al., 2023; Huang et al., $2 0 2 3 \mathrm { a }$ ; Zhu et al., 2023b) confirm that pretraining on the interleaved image-text sequences results in significant multimodal in-context abilities. Our work makes the initial step in creating a large-scale interleaved video-text dataset InternVid-ICL, containing 7.1M interleaved video-text data pairs. We give three methods for organizing clips and their captions: (1): Arrange clips and their descriptions sequentially based on their temporal order within the same video, as illustrated in Figure 5 (a). (2): Enhance diversity in interleaved video-text items by assigning ASR text to a used clip in addition to its caption, as demonstrated in Figure 5 (b). (3): Extend method (1) by concatenating two interleaved multimodal items, creating a video-centric dialogue simulating user queries involving multiple videos (Figure 5 (c)). One visual example of these arrangements is provided in Table 8.
|
| 83 |
+
|
| 84 |
+

|
| 85 |
+
Figure 5: Interleaved video-text data generation in InternVid with three formats.
|
| 86 |
+
|
| 87 |
+

|
| 88 |
+
Figure 6: Framework of ViCLIP.
|
| 89 |
+
|
| 90 |
+
# 4 VICLIP: LEARNING VIDEO-TEXT REPRESENTATION AT SCALE
|
| 91 |
+
|
| 92 |
+
Built upon CLIP (Radford et al., 2021), we make a simple video-text pretraining baseline ViCLIP. It consists of a video encoder (ViT) (Dosovitskiy et al., 2021) and a text encoder, as given in Figure 6. Both modules are initialized from the corresponding CLIP components. We update the native attention in the video encoder to spatiotemporal attention while maintaining other designs. For efficient learning, we apply masking to videos in pre-training. The optimization target is the contrastive loss between input video and text embeddings.
|
| 93 |
+
|
| 94 |
+
Video & Text Encoders with Masking Learning. Our video encoder uses a ViT with spatiotemporal attention. We apply random patch masking following MAE-based methods (Tong et al., 2022; Wang et al., 2023) to the input videos. It significantly alleviates the computational burden. The used text encoder is also a transformer followed by (Radford et al., 2021; Schuhmann et al., 2022).
|
| 95 |
+
|
| 96 |
+
Unmasked Video-Text Pretraining. We feed all visual tokens into the video transformer instead of just the masked ones towards the end of the pretraining process. This helps bridge the gap between pretraining and downstream applications where the full video is used as input. We perform unmasked training for 0.5 epochs with a learning rate of 4e-6.
|
| 97 |
+
|
| 98 |
+
Training Objectives. Our framework optimizes video-text alignment. It minimizes InfoNCE loss (Oord et al., 2018) using global video and text features, as
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\mathcal { L } _ { \mathbf { C } } = \mathcal { L } _ { \mathbf { C } } ^ { \mathbf { V } \mathbf { T } } + \mathcal { L } _ { \mathbf { C } } ^ { \mathbf { T } \mathbf { V } } = - \sum _ { i = 1 } ^ { N } \log \frac { \exp ( \sin ( f _ { i } ^ { \mathbf { V } } , f _ { i } ^ { \mathbf { T } } ) / \tau ) } { \sum _ { j = 1 } ^ { N } \exp ( \sin ( f _ { i } ^ { \mathbf { V } } , f _ { j } ^ { \mathbf { T } } ) / \tau ) } - \sum _ { i = 1 } ^ { N } \log \frac { \exp ( \sin ( f _ { i } ^ { \mathbf { T } } , f _ { i } ^ { \mathbf { V } } ) / \tau ) } { \sum _ { j = 1 } ^ { N } \exp ( \sin ( f _ { i } ^ { \mathbf { T } } , f _ { j } ^ { \mathbf { V } } ) / \tau ) } ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where $f ^ { \mathbf { V } }$ and $f ^ { \mathbf { T } }$ denote the learned video and text embeddings, respectively. $\mathrm { s i m } ( \cdot )$ computes the cosine similarity between two features. $\tau$ is the learnable temperature.
|
| 105 |
+
|
| 106 |
+
# 5 EXPERIMENTS
|
| 107 |
+
|
| 108 |
+
We learn ViCLIP on subsets of InternVid and evaluated its performance on video-related benchmarks using full-finetuned and zero-shot settings. We sample subsets InternVid-10M, InternVid-50M, and InternVid-200M randomly. Sampling details are given in App. E.1.
|
| 109 |
+
|
| 110 |
+
Table 2: Zero-shot action recognition results on Kinetics 400/600/700.
|
| 111 |
+
|
| 112 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Training Data</td><td colspan="2">top-1(4AVG (t) top-1 (6AVG(↑) +p-1 7AVG (t)</td><td colspan="2"></td><td colspan="2"></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>CLIP400M (Radford et al., 2021)</td><td>58.42</td><td>70.14</td><td>55.11</td><td>67.16</td><td>46.12</td><td>58.38</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>DataComp-1B (Gadre et al.,2023)</td><td>56.14</td><td>67.67</td><td>54.15</td><td>65.83</td><td>45.36</td><td>57.01</td></tr><tr><td>EVA-CLIP-L (Sun et al.,2023)Merged-2B (Sun et al.,2023)</td><td></td><td>=</td><td>65.00</td><td>=</td><td>64.90</td><td>-</td><td>59.10</td></tr><tr><td></td><td>EVA-CLIP-E(Sun et al.,2023)LAION-2B(Schuhmann et al.,222)</td><td></td><td>69.80</td><td>-</td><td>69.30</td><td>=</td><td>63.40</td></tr><tr><td>ViCLIP</td><td>+WebVid10M (Bain et al.,2021)</td><td>59.88</td><td>71.03</td><td>58.66</td><td>69.84</td><td>50.23</td><td>61.86</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M</td><td>56.68</td><td>68.17</td><td>54.67</td><td>66.28</td><td>46.53</td><td>58.73</td></tr><tr><td>ViCLIP</td><td>+InternVid-50M</td><td>57.18</td><td>68.93</td><td>55.36</td><td>67.07</td><td>47.00</td><td>59.36</td></tr><tr><td>ViCLIP</td><td>+InternVid-200M</td><td>59.80</td><td>71.09</td><td>57.80</td><td>69.34</td><td>49.30</td><td>61.25</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M-DIV</td><td>63.00</td><td>74.15</td><td>60.68</td><td>72.07</td><td>52.50</td><td>64.59</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M-FLT</td><td>64.80</td><td>75.70</td><td>62.20</td><td>73.53</td><td>54.30</td><td>66.38</td></tr></table>
|
| 113 |
+
|
| 114 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Training Data</td><td colspan="2">top-1 (K400p5(t)</td><td colspan="2">top-1 SthSthy2-5 (t)</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>CLIP400M (Radford et al., 2021)</td><td>86.7</td><td>97.2</td><td>70.1</td><td>92.5</td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>DataComp-1B (Gadre et al., 2023)</td><td>85.6</td><td>96.8</td><td>68.9</td><td>91.8</td></tr><tr><td>ViCLIP</td><td>+WebVidi0M (Bain et al.,2021)</td><td>85.0</td><td>96.8</td><td>68.7</td><td>91.9</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M-FLT</td><td>86.8</td><td>97.5</td><td>71.2</td><td>93.2</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M-FLT+K710</td><td>88.0</td><td>97.8</td><td>71.8</td><td>93.6</td></tr><tr><td>ViCLIP</td><td>+InternVid-200M</td><td>87.9</td><td>97.9</td><td>73.6</td><td>94.9</td></tr><tr><td>ViCLIP</td><td>+InternVid-200M+K710</td><td>88.7</td><td>98.2</td><td>74.2</td><td>95.0</td></tr></table>
|
| 115 |
+
|
| 116 |
+
Table 3: Fine-tuned action recognition results on Kinetics 400 and SomethingSomethingV2.
|
| 117 |
+
|
| 118 |
+
# 5.1 TRANSFERABLE VIDEO REPRESENTATION PERFORMANCE
|
| 119 |
+
|
| 120 |
+
Action Recognition. In addition to OpenAI’s CLIP-L (CLIP400M (Radford et al., 2021)) and LAION (DataComp-1B (Gadre et al., 2023)), we also include EVA-CLIP-L/14 and EVA-CLIP-E/14 (Sun et al., 2023) for comparison. More experimental settings are given in App. E.2.
|
| 121 |
+
|
| 122 |
+
Zero-Shot. Table 2 shows that when trained on InternVid-10M-FLT, ViCLIP outperforms all other methods, including EVA-CLIP-E. This result validates InternVid’s effectiveness in learning videotext embeddings. Note that ViCLIP with InternVid-10M-FLT sets new records on zero-shot action recognition in Kinetics 400/600/700, demonstrating a significant performance boost compared to ViCLIP with WebVid10M or other models. Moreover, ViCLIP trained on InternVid-10M-FLT exceeds its performance on InternVid-200M. Normally, we would expect the model trained on InternVid-200M to perform better than those on -10M-DIV or -FLT, given that the latter two subsets derive from the former. Unless this discrepancy results from improper learning, we conjecture that false negative samples could severely impede video-text contrastive learning if we don’t purposefully reduce the number of clips taken from the same video. Specifically, we hypothesize that clips from the same video share similar representations and captions. Contrastive learning, however, assumes these clips to be different. This situation also undermines the significance of using a large batch size in current training since it increases the probability of encountering more false negatives.
|
| 123 |
+
|
| 124 |
+
Fine-tuned. In Table 3, note when comparing ViCLIP trained on InternVid with image CLIP models or ViCLIP trained with WebVid, there is a clear increase in accuracy. Unlike the zero-shot results, when ViCLIP is pretrained with a larger number (200M) of video-text data pairs, it achieves higher accuracy in fine-tuned recognition tasks $( 8 7 . 9 \%$ in K400 and $7 3 . 6 \%$ in SthSthV2) compared to when pretrained $8 6 . 8 \%$ in K400 and $7 1 . 2 \%$ in SthSthV2) with fewer data (10M). This suggests that InternVid provides greater benefits for fine-tuned action-related tasks. The decrease in performance of ViCLIP with WebVid highlights the importance of addressing the distribution gap between WebVid and the action videos used for evaluation, emphasizing the need to collect videos with evident temporal dynamics.
|
| 125 |
+
|
| 126 |
+
Video-Text Retrieval. We evaluate the video retrieval performance of baselines and ViCLIP using different pretraining datasets on five popular benchmarks (Heilbron et al., 2015; Xu et al., 2016; Rohrbach et al., 2015; Anne Hendricks et al., 2017; Chen & Dolan, 2011), as shown in Table 4 and 5. We uniformly sample eight frames from the input videos. For the CLIP models from OpenAI (Radford et al., 2021) and LAION (Schuhmann et al., 2022), we utilize their officially released ViT-L models and extract video embeddings by averaging the computed frame-wise image embeddings. Our ViCLIP directly predicts video embeddings. For evaluating retrieval performance, we report $R @ { \cal I }$ scores for both text-to-video (t2v) and video-to-text (v2t) tasks in 4 and 5.
|
| 127 |
+
|
| 128 |
+
Both Table 4 and 5 demonstrate that video-language pretraining is crucial for enhancing fine-tuned and zero-shot retrieval performance. This point is substantiated by the comparison between CLIP and ViCLIP using InternVid-50M. Table 4 exhibits a boost of nearly 4-10 points across different benchmarks in the zero-shot setting. Meanwhile, Table 5 shows an increase of approximately 10 points across all $\mathbb { R } \ @ 1$ scores in the fine-tuned setting.
|
| 129 |
+
|
| 130 |
+
Table 4: Results of zero-shot video retrieval on MSR-VTT, LSMDC, DiDeMo, MSVD, and ANet.
|
| 131 |
+
|
| 132 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">MSR-VTT</td><td colspan="2">TLSMDCT</td><td colspan="2">DiDeM2T</td><td colspan="2">T2MSVD2T</td><td colspan="2">T2ANev2T</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>CLIP400M (Radford et al., 2021)</td><td>29.0</td><td>25.8</td><td>13.9</td><td>15.2</td><td>11.5</td><td>19.1</td><td>37.9</td><td>60.0</td><td>8.3</td><td>12.2</td></tr><tr><td>CLIP (Radford et al.,2021)</td><td>DataComp-1B(Gadre et al.,2023)</td><td>30.4</td><td>24.2</td><td>13.9</td><td>11.9</td><td>12.7</td><td>18.7</td><td>40.5</td><td>57.2</td><td>9.1</td><td>13.2</td></tr><tr><td>CLIP4Clip (Luo et al.,2022)</td><td>+HowTo100M(Miech et al.,2019)</td><td>32.0</td><td>-</td><td>15.1</td><td>=</td><td></td><td>-</td><td>38.5</td><td>-</td><td></td><td>-</td></tr><tr><td>ViCLIP</td><td>+Web Vid10M (Bain et al.,2021)</td><td>35.6</td><td>33.1</td><td>16.5</td><td>13.4</td><td>14.5</td><td>23.3</td><td>45.3</td><td>69.0</td><td>12.4</td><td>19.0</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M</td><td>36.4</td><td>37.1</td><td>17.1</td><td>15.0</td><td>16.4</td><td>25.9</td><td>45.2</td><td>69.8</td><td>13.5</td><td>23.4</td></tr><tr><td>ViCLIP</td><td>+InternVid-50M</td><td>39.7</td><td>40.7</td><td>18.0</td><td>16.7</td><td>16.7</td><td>26.4</td><td>46.5</td><td>72.2</td><td>13.6</td><td>23.2</td></tr><tr><td>ViCLIP</td><td>+InternVid-200M</td><td>39.3</td><td>39.5</td><td>18.3</td><td>16.6</td><td>17.1</td><td>25.5</td><td>47.3</td><td>70.0</td><td>13.7</td><td>21.6</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M-DIV</td><td>41.5</td><td>41.6</td><td>18.5</td><td>17.4</td><td>17.7</td><td>26.2</td><td>48.6</td><td>71.9</td><td>14.8</td><td>23.4</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M-FLT</td><td>42.4</td><td>41.3</td><td>20.1</td><td>16.9</td><td>18.4</td><td>27.9</td><td>49.1</td><td>75.1</td><td>15.1</td><td>24.0</td></tr></table>
|
| 133 |
+
|
| 134 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">MSR-VTTTLSMDCT</td><td colspan="2"></td><td colspan="2">DiDeM2T</td><td colspan="2">TMSVD2T</td><td colspan="2">T2ANv2T</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>CLIP (Radford et al., 2021)</td><td>CLIP400M (Radford et al.,021)</td><td>38.2</td><td>38.7</td><td>22.5</td><td>22.6</td><td>32.2</td><td>33.9</td><td>67.3</td><td>69.9</td><td>26.1</td><td>26.9</td></tr><tr><td>CLIP (Radford et al.,2021)</td><td>DataComp-1B(Gadre et al.,2023)</td><td>37.2</td><td>37.5</td><td>18.7</td><td>18.5</td><td>33.5</td><td>34.2</td><td>66.3</td><td>70.2</td><td>24.5</td><td>25.8</td></tr><tr><td>CLIP4Clip (Luo et al.,2022)</td><td>+HowTo100M Miech et al. (2019)</td><td>45.6</td><td>45.9</td><td>24.3</td><td>23.8</td><td>43.0</td><td>43.6</td><td>45.2</td><td>48.4</td><td>40.3</td><td>41.6</td></tr><tr><td>ViCLIP</td><td>+WebVid10M(Bain et al.,2021)</td><td>50.8</td><td>49.3</td><td>27.3</td><td>28.4</td><td>48.1</td><td>48.5</td><td>76.7</td><td>81.2</td><td>44.5</td><td>43.2</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M</td><td>51.8</td><td>49.7</td><td>28.5</td><td>29.4</td><td>49.5</td><td>50.6</td><td>77.2</td><td>80.0</td><td>49.7</td><td>48.4</td></tr><tr><td>ViCLIP</td><td>+InternVid-50M</td><td>52.8</td><td>52.2</td><td>30.9</td><td>30.9</td><td>49.4</td><td>48.7</td><td>78.1</td><td>80.0</td><td>49.7</td><td>49.0</td></tr><tr><td>ViCLIP</td><td>+InternVid-200M</td><td>53.7</td><td>53.4</td><td>29.3</td><td>31.3</td><td>51.1</td><td>50.8</td><td>79.9</td><td>78.4</td><td>52.8</td><td>51.1</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M-DIV</td><td>55.0</td><td>53.3</td><td>32.0</td><td>30.0</td><td>51.7</td><td>52.1</td><td>75.8</td><td>77.8</td><td>50.4</td><td>48.9</td></tr><tr><td>ViCLIP</td><td>+InternVid-10M-FLT</td><td>52.5</td><td>51.8</td><td>33.0</td><td>32.5</td><td>49.4</td><td>50.2</td><td>77.2</td><td>79.0</td><td>49.8</td><td>48.1</td></tr></table>
|
| 135 |
+
|
| 136 |
+
Table 5: Results of fine-tuned video retrieval on MSR-VTT, LSMDC, DiDeMo, MSVD, and ANet.
|
| 137 |
+
|
| 138 |
+
Zero-Shot. Table 4 reveals InternVid-10M outperforms WebVid when employing the same method, ViCLIP, with an average increase of $6 . 3 \%$ in $\mathbb { R } \ @ 1$ across nearly all benchmarks. This improvement can be further amplified by diversifying the training clips used, as InternVid-10M-DIV and -FLT surpass WebVid on ViCLIP with gains in $\mathbf { R } \ @ 1$ of $1 4 . 0 \%$ and $1 7 . 1 \%$ , respectively. These results underline, once again, the effectiveness of the correspondence between our generated video captions and their corresponding videos. Comparing CLIP4Clip using HowTo100M with ViCLIP using WebVid10M or InternVid-10M shows that the correlation between video and text influences performance more significantly than their quantity. Moreover, the zero-shot performance demonstrates that the video-text representation learned using InternVid is transferable. This claim is supported by its superior performance across multiple video retrieval benchmarks.
|
| 139 |
+
|
| 140 |
+
Fine-Tuned. Table 5 exhibits a noticeable improvement when transitioning from InternVid-10M to WebVid10M while using ViCLIP for both $\mathbf { \Omega } ^ { \mathsf { t 2 v } }$ and v2t retrieval across almost all datasets. On average, there is a $3 . 7 \%$ increase in t2v $\mathbf { R } \ @ 1$ across all benchmarks, with particularly significant rise observed in ActivityNet (an increase of over $1 1 . 9 \%$ ). However, ViCLIP using WebVid10M yields better v2t $\mathbf { R } \ @ 1$ scores than when using InternVid-10M (81.2 vs. 80.0). We believe this does not alter the overall trend that InternVid-10M generally provides more advantage to ViCLIP than WebVid10M does.
|
| 141 |
+
|
| 142 |
+
The benefits of used video data become even more apparent when comparing InternVid-10M-DIV or InternVid-10M-FLT with WebVid10M. Their overall increases are $5 . 8 \%$ and $5 . 1 \%$ , respectively. Despite these improvements, issues related to data diversity persist.
|
| 143 |
+
|
| 144 |
+
Data Scaling and Issues. Figure 7 and 8 illustrate how ViCLIP’s performance changes in zeroshot and fine-tuning settings when varying the scale of InternVid. In both scenarios, increasing the data scale results in significant increases in performance. As shown in Figure 7, ViCLIP’s discriminative ability linearly increases with the increasing volume of training videos used $1 0 \mathbf { M } $ 200M). Meanwhile, Figure 8 shows that the retrieval performance increase becomes marginal when scaling the training data beyond 50M. It’s vital to note our model is trained using only contrastive loss without employing popular designs such as matching head and its corresponding loss. Consequently, this retrieval result doesn’t allow for any definitive conclusions about whether there exists a turning point after which scaling up the training videos becomes less beneficial currently. More explorations are necessary in these retrieval experiments. However, these findings generally suggest that enhancing the scale of pretraining data can improve the transferability of the learned representation.
|
| 145 |
+
|
| 146 |
+
# 5.2 OTHER APPLICATIONS
|
| 147 |
+
|
| 148 |
+
Text-to-Video Generation. Our InternVid dataset improves existing text-to-video (t2v) generation models by providing high-quality video-text pairs. We extend spatiotemporal modeling on the latent space of a text-to-image diffusion model (Rombach et al., 2022) as a t2v baseline. We train the baseline with two settings: one using WebVid10M, and the other using InternVid-Aes-18M in addition to WebVid10M. InternVid-Aes-18M is a subset of InternVid consisting of clips with an aesthetic score of at least 4. Quantitative (Table 6) and qualitative (Figure 12) evaluations demonstrate the effectiveness of InternVid in video generation tasks. Evaluation protocols are given in App. E.3.
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Figure 7: Zero-shot action recognition (top-1 ac-Figure 8: Video retrieval average performance curacy) on Kinetics-400 / -600 / -700. (text-to-video $\mathbb { R } \ @ 1$ ) across five datasets.
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
|
| 155 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Training Data</td><td colspan="3">FIUCF-101</td><td rowspan="2">CMSRMTT</td></tr><tr><td>IS (↑)</td><td></td><td>FVD (↓)</td></tr><tr><td></td><td>VideoCrafter²WebVid10M(Bain et al.,2021)18.26</td><td></td><td>66.95</td><td>910.87</td><td>0.2875</td></tr><tr><td></td><td>VideoFusion³WebVid10M(Bain et al.,2021)17.49</td><td></td><td>75.77</td><td>639.90</td><td>0.2795</td></tr><tr><td>t2v baseline</td><td>WebVid10M(Bain et al.,2021) 13.97</td><td></td><td>98.25</td><td>705.25</td><td>0.2657</td></tr><tr><td>t2v baseline</td><td>WebVid10M+InternVid18M</td><td></td><td></td><td></td><td>21.04+7.07 60.25-38.00 616.51-88.740.2951+0.0294</td></tr></table>
|
| 156 |
+
|
| 157 |
+
Table 6: Zero-shot text-to-video generation performance.
|
| 158 |
+
|
| 159 |
+
In Table 6, we observe that t2v baseline trained on WebVid10M performs poorly in terms of IS, FID, and CLIPSIM when compared to other approaches. However, with the addition of InternVid-Aes, t2v baseline demonstrates significant improvements in these metrics and outperforms other methods by a considerable margin. In Figure 12, we observe that the t2v baseline using both WebVid10M and InternVid-Aes-18M significantly outperforms others in visual quality and temporal coherence. These results demonstrate the potential of InternVid for high-quality video generation.
|
| 160 |
+
|
| 161 |
+
Video-Centric Dialogue System. Inspired by recent vision-centric dialogue systems (Li et al., 2023c; Muhammad Maaz & Khan, 2023; Li et al., 2023a), we integrate our pretrained ViCLIP (with InternVid) into VideoChat (Li et al., 2023c) to show how our data and model can empower multimodal dialogue methods with effective video modeling capability. In implementation, we inherit nearly all designs of VideoChat-Embed, just replacing its visual encoder with our ViCLIP (trained on InternVid). We evaluate VideoChat-ViCLIP in spatial understanding (Figure 13), action recognition (Figure 14), temporal understanding (Figure 15), video reasoning (Figure 16), and video creative (Figure 17) tasks. Our qualitative evaluations demonstrate its decent video-to-text capabilities.
|
| 162 |
+
|
| 163 |
+
Table 7: Performance benchmarking of text generation models.
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Evaluation Aspect</td><td>Correormeation</td><td>Drientation</td><td> Conestading</td><td> Temprading</td><td>Consistency</td><td>Avg</td></tr><tr><td>VideoChat (Eva-g)</td><td>2.23</td><td>2.50</td><td>2.53</td><td>1.94</td><td>2.24</td><td>2.29</td></tr><tr><td>Video-ChatGPT</td><td>2.40</td><td>2.52</td><td>2.62</td><td>1.98</td><td>2.37</td><td>2.38</td></tr><tr><td>VideoChat-ViCLIP</td><td>2.86</td><td>2.52</td><td>3.08</td><td>2.36</td><td>2.40</td><td>2.64</td></tr></table>
|
| 166 |
+
|
| 167 |
+
In terms of quantitative comparison, as shown in Table 5.2, VideoChat-ViCLIP notably outperforms the vanilla VideoChat (using Eva- $\mathbf { g }$ as the vision encoder) and others across all evaluation aspects of the video conversation evaluation in the work of Muhammad Maaz & Khan (2023). Specifically, the model shows remarkable improvements in the correctness of information (from 2.23 to 2.86), contextual understanding (from 2.53 to 3.08), and temporal understanding (from 1.94 to 2.36). The average score also increases from 2.29 to 2.64, showing an overall performance gain.
|
| 168 |
+
|
| 169 |
+
# 6 CONCLUSION
|
| 170 |
+
|
| 171 |
+
Our dataset, InternVid, is designed for multimodal research (both understanding and generation) focused on videos. It consists of over 200 million video clips sourced from 7 million high-resolution YouTube videos. We use existing models with a multiscale approach to generate clip-level descriptions. Our studies confirm the efficacy of captions, and the large volume of video-text data enables crossmodal learning and text-to-video generation at scale. By training with our data, we develop a video-text representation baseline ViCLIP using ViT-L and analyze briefly how the data scale affects learned crossmodal embeddings. In addition to perception tasks, we show that InternVid improves text-to-video generation and supports multimodal dialogue systems. With its data, annotations, metadata, and computed scores, we believe InternVid can fuel a variety of studies and applications.
|
| 172 |
+
|
| 173 |
+
# ACKNOWLEDGEMENTS
|
| 174 |
+
|
| 175 |
+
This work is partially supported by the National Key R&D Program of China (No. 2022ZD0160101), National Natural Science Foundation of China (No. 62076119, No. 61921006)), the Science and Technology Commission of Shanghai Municipality under Grant No. 23QD1400800 and No. 23YF1461900, and the Ministry of Education, Singapore, under its MOE AcRF Tier 2 (MOET2EP20221- 0012) and NTU NAP.
|
| 176 |
+
|
| 177 |
+
# REFERENCES
|
| 178 |
+
|
| 179 |
+
Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katie Millican, Malcolm Reynolds, Roman Ring, Eliza Rutherford, Serkan Cabi, Tengda Han, Zhitao Gong, Sina Samangooei, Marianne Monteiro, Jacob Menick, Sebastian Borgeaud, Andy Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Binkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zisserman, and Karen Simonyan. Flamingo: a visual language model for few-shot learning. ArXiv, abs/2204.14198, 2022.
|
| 180 |
+
Lisa Anne Hendricks, Oliver Wang, Eli Shechtman, Josef Sivic, Trevor Darrell, and Bryan Russell. Localizing moments in video with natural language. In ICCV, pp. 5803–5812, 2017.
|
| 181 |
+
Anas Awadalla, Irena Gao, Joshua Gardner, Jack Hessel, Yusuf Hanafy, Wanrong Zhu, Kalyani Marathe, Yonatan Bitton, Samir Gadre, Jenia Jitsev, et al. Openflamingo, 2023.
|
| 182 |
+
Max Bain, Arsha Nagrani, Gul Varol, and Andrew Zisserman. Frozen in time: A joint video and ¨ image encoder for end-to-end retrieval. In ICCV, pp. 1728–1738, 2021.
|
| 183 |
+
Andreas Blattmann, Robin Rombach, Huan Ling, Tim Dockhorn, Seung Wook Kim, Sanja Fidler, and Karsten Kreis. Align your latents: High-resolution video synthesis with latent diffusion models. In CVPR, pp. 22563–22575, 2023.
|
| 184 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. NeurIPS, 33:1877–1901, 2020.
|
| 185 |
+
Joao Carreira and Andrew Zisserman. Quo vadis, action recognition? a new model and the kinetics dataset. In CVPR, 2017.
|
| 186 |
+
Soravit Changpinyo, Piyush Sharma, Nan Ding, and Radu Soricut. Conceptual $1 2 \mathrm { m }$ : Pushing web-scale image-text pre-training to recognize long-tail visual concepts. In CVPR, pp. 3558–3568, 2021.
|
| 187 |
+
David L Chen and William B Dolan. Collecting highly parallel data for paraphrase evaluation. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies-Volume 1, pp. 190–200. Association for Computational Linguistics, 2011.
|
| 188 |
+
Guo Chen, Sen Xing, Zhe Chen, Yi Wang, Kunchang Li, Yizhuo Li, Yi Liu, Jiahao Wang, YinDong Zheng, Bingkun Huang, et al. Internvideo-ego4d: A pack of champion solutions to ego4d challenges. arXiv preprint arXiv:2211.09529, 2022.
|
| 189 |
+
Guo Chen, Yin-Dong Zheng, Jiahao Wang, Jilan Xu, Yifei Huang, Junting Pan, Yi Wang, Yali Wang, Yu Qiao, Tong Lu, et al. Videollm: Modeling video sequence with large language models. arXiv preprint arXiv:2305.13292, 2023a.
|
| 190 |
+
Sihan Chen, Xingjian He, Longteng Guo, Xinxin Zhu, Weining Wang, Jinhui Tang, and Jing Liu. Valor: Vision-audio-language omni-perception pretraining model and dataset. arXiv preprint arXiv:2304.08345, 2023b.
|
| 191 |
+
Sihan Chen, Handong Li, Qunbo Wang, Zijia Zhao, Mingzhen Sun, Xinxin Zhu, and Jing Liu. Vast: A vision-audio-subtitle-text omni-modality foundation model and dataset. arXiv preprint arXiv:2305.18500, 2023c.
|
| 192 |
+
Feng Cheng, Xizi Wang, Jie Lei, David Crandall, Mohit Bansal, and Gedas Bertasius. Vindlu: A recipe for effective video-and-language pretraining. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 10739–10750, 2023.
|
| 193 |
+
Wei-Lin Chiang, Zhuohan Li, Zi Lin, Ying Sheng, Zhanghao Wu, Hao Zhang, Lianmin Zheng, Siyuan Zhuang, Yonghao Zhuang, Joseph E. Gonzalez, Ion Stoica, and Eric P. Xing. Vicuna: An open-source chatbot impressing gpt-4 with $9 0 \% *$ chatgpt quality, March 2023. URL https: //lmsys.org/blog/2023-03-30-vicuna/.
|
| 194 |
+
Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Re. Flashattention: Fast and memory- ´ efficient exact attention with io-awareness. NeurIPS, 35:16344–16359, 2022.
|
| 195 |
+
Karan Desai, Gaurav Kaul, Zubin Aysola, and Justin Johnson. Redcaps: Web-curated image-text data created by the people, for the people. arXiv preprint arXiv:2111.11431, 2021.
|
| 196 |
+
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2021.
|
| 197 |
+
Zi-Yi Dou, Yichong Xu, Zhe Gan, Jianfeng Wang, Shuohang Wang, Lijuan Wang, Chenguang Zhu, Pengchuan Zhang, Lu Yuan, Nanyun Peng, et al. An empirical study of training end-to-end vision-and-language transformers. In CVPR, 2022.
|
| 198 |
+
Tsu-Jui Fu, Linjie Li, Zhe Gan, Kevin Lin, William Yang Wang, Lijuan Wang, and Zicheng Liu. Violet: End-to-end video-language transformers with masked visual-token modeling. arXiv preprint arXiv:2111.12681, 2021.
|
| 199 |
+
Samir Yitzhak Gadre, Gabriel Ilharco, Alex Fang, Jonathan Hayase, Georgios Smyrnis, Thao Nguyen, Ryan Marten, Mitchell Wortsman, Dhruba Ghosh, Jieyu Zhang, et al. Datacomp: In search of the next generation of multimodal datasets. arXiv preprint arXiv:2304.14108, 2023.
|
| 200 |
+
Songwei Ge, Thomas Hayes, Harry Yang, Xi Yin, Guan Pang, David Jacobs, Jia-Bin Huang, and Devi Parikh. Long video generation with time-agnostic vqgan and time-sensitive transformer. In Computer Vision–ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XVII, pp. 102–118. Springer, 2022.
|
| 201 |
+
Raghav Goyal, Samira Ebrahimi Kahou, Vincent Michalski, Joanna Materzynska, Susanne Westphal, Heuna Kim, Valentin Haenel, Ingo Fruend, Peter Yianilos, Moritz Mueller-Freitag, et al. The” something something” video database for learning and evaluating visual common sense. In ICCV, pp. 5842–5850, 2017.
|
| 202 |
+
Xingjian He, Sihan Chen, Fan Ma, Zhicheng Huang, Xiaojie Jin, Zikang Liu, Dongmei Fu, Yi Yang, Jing Liu, and Jiashi Feng. Vlab: Enhancing video language pre-training by feature adapting and blending. arXiv preprint arXiv:2305.13167, 2023.
|
| 203 |
+
Fabian Caba Heilbron, Victor Escorcia, Bernard Ghanem, and Juan Carlos Niebles. Activitynet: A large-scale video benchmark for human activity understanding. In 2015 IEEE conference on computer vision and pattern recognition (CVPR), pp. 961–970. IEEE, 2015.
|
| 204 |
+
Xiaowei Hu, Zhe Gan, Jianfeng Wang, Zhengyuan Yang, Zicheng Liu, Yumao Lu, and Lijuan Wang. Scaling up vision-language pre-training for image captioning. In CVPR, pp. 17980–17989, 2022.
|
| 205 |
+
Shaohan Huang, Li Dong, Wenhui Wang, Yaru Hao, Saksham Singhal, Shuming Ma, Tengchao Lv, Lei Cui, Owais Khan Mohammed, Qiang Liu, et al. Language is not all you need: Aligning perception with language models. arXiv preprint arXiv:2302.14045, 2023a.
|
| 206 |
+
Xinyu Huang, Youcai Zhang, Jinyu Ma, Weiwei Tian, Rui Feng, Yuejie Zhang, Yaqian Li, Yandong Guo, and Lei Zhang. Tag2text: Guiding vision-language model via image tagging. arXiv preprint arXiv:2303.05657, 2023b.
|
| 207 |
+
Ranjay Krishna, Kenji Hata, Frederic Ren, Li Fei-Fei, and Juan Carlos Niebles. Dense-captioning events in videos. In ICCV, pp. 706–715, 2017.
|
| 208 |
+
|
| 209 |
+
Jie Lei, Tamara L Berg, and Mohit Bansal. Revealing single frame bias for video-and-language learning. arXiv preprint arXiv:2206.03428, 2022.
|
| 210 |
+
|
| 211 |
+
Bo Li, Yuanhan Zhang, Liangyu Chen, Jinghao Wang, Fanyi Pu, Jingkang Yang, Chunyuan Li, and Ziwei Liu. Mimic-it: Multi-modal in-context instruction tuning. arXiv preprint arXiv:2306.05425, 2023a.
|
| 212 |
+
Junnan Li, Dongxu Li, Silvio Savarese, and Steven Hoi. Blip-2: Bootstrapping language-image pretraining with frozen image encoders and large language models. arXiv preprint arXiv:2301.12597, 2023b.
|
| 213 |
+
Kunchang Li, Yali Wang, Yinan He, Yizhuo Li, Yi Wang, Limin Wang, and Yu Qiao. Uniformerv2: Spatiotemporal learning by arming image vits with video uniformer. arXiv preprint arXiv:2211.09552, 2022a.
|
| 214 |
+
KunChang Li, Yinan He, Yi Wang, Yizhuo Li, Wenhai Wang, Ping Luo, Yali Wang, Limin Wang, and Yu Qiao. Videochat: Chat-centric video understanding. arXiv preprint arXiv:2305.06355, 2023c.
|
| 215 |
+
Kunchang Li, Yali Wang, Yizhuo Li, Yi Wang, Yinan He, Limin Wang, and Yu Qiao. Unmasked teacher: Towards training-efficient video foundation models. arXiv preprint arXiv:2303.16058, 2023d.
|
| 216 |
+
Linjie Li, Zhe Gan, Kevin Lin, Chung-Ching Lin, Zicheng Liu, Ce Liu, and Lijuan Wang. Lavender: Unifying video-language understanding as masked language modeling. arXiv preprint arXiv:2206.07160, 2022b.
|
| 217 |
+
Tianhao Li and Limin Wang. Learning spatiotemporal features via video and text pair discrimination. CoRR, abs/2001.05691, 2020. URL https://arxiv.org/abs/2001.05691.
|
| 218 |
+
Zhenyang Li, Ran Tao, Efstratios Gavves, Cees G. M. Snoek, and Arnold W. M. Smeulders. Tracking by natural language specification. CVPR, 2017.
|
| 219 |
+
Zhaoyang Liu, Yinan He, Wenhai Wang, Weiyun Wang, Yi Wang, Shoufa Chen, Qinglong Zhang, Yang Yang, Qingyun Li, Jiashuo Yu, et al. Internchat: Solving vision-centric tasks by interacting with chatbots beyond language. arXiv preprint arXiv:2305.05662, 2023.
|
| 220 |
+
Huaishao Luo, Lei Ji, Ming Zhong, Yang Chen, Wen Lei, Nan Duan, and Tianrui Li. Clip4clip: An empirical study of clip for end to end video clip retrieval and captioning. Neurocomputing, 2022.
|
| 221 |
+
Zhengxiong Luo, Dayou Chen, Yingya Zhang, Yan Huang, Liang Wang, Yujun Shen, Deli Zhao, Jingren Zhou, and Tieniu Tan. Videofusion: Decomposed diffusion models for high-quality video generation. In CVPR, pp. 10209–10218, 2023.
|
| 222 |
+
Farzaneh Mahdisoltani, Guillaume Berger, Waseem Gharbieh, David Fleet, and Roland Memisevic. On the effectiveness of task granularity for transfer learning. arXiv preprint arXiv:1804.09235, 2018.
|
| 223 |
+
Antoine Miech, Dimitri Zhukov, Jean-Baptiste Alayrac, Makarand Tapaswi, Ivan Laptev, and Josef Sivic. Howto $1 0 0 \mathrm { m }$ : Learning a text-video embedding by watching hundred million narrated video clips. In ICCV, pp. 2630–2640, 2019.
|
| 224 |
+
Antoine Miech, Jean-Baptiste Alayrac, Lucas Smaira, Ivan Laptev, Josef Sivic, and Andrew Zisserman. End-to-end learning of visual representations from uncurated instructional videos. In CVPR, 2020.
|
| 225 |
+
Salman Khan Muhammad Maaz, Hanoona Rasheed and Fahad Khan. Video-chatgpt: Towards detailed video understanding via large vision and language models. ArXiv 2306.05424, 2023.
|
| 226 |
+
Arsha Nagrani, Paul Hongsuck Seo, Bryan Seybold, Anja Hauth, Santiago Manen, Chen Sun, and Cordelia Schmid. Learning audio-video modalities from image captions. In ECCV, pp. 407–426. Springer, 2022.
|
| 227 |
+
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 228 |
+
|
| 229 |
+
Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In ICML, pp. 8748–8763. PMLR, 2021.
|
| 230 |
+
|
| 231 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. JMLR, 21(1):5485–5551, 2020.
|
| 232 |
+
Anna Rohrbach, Marcus Rohrbach, Niket Tandon, and Bernt Schiele. A dataset for movie description. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3202–3212, 2015.
|
| 233 |
+
Anna Rohrbach, Atousa Torabi, Marcus Rohrbach, Niket Tandon, Christopher Pal, Hugo Larochelle, Aaron Courville, and Bernt Schiele. Movie description. IJCV, 123:94–120, 2017.
|
| 234 |
+
Robin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser, and Bjorn Ommer. High- ¨ resolution image synthesis with latent diffusion models. In CVPR, pp. 10684–10695, 2022.
|
| 235 |
+
Ramon Sanabria, Ozan Caglayan, Shruti Palaskar, Desmond Elliott, Lo¨ıc Barrault, Lucia Specia, and Florian Metze. How2: a large-scale dataset for multimodal language understanding. arXiv preprint arXiv:1811.00347, 2018.
|
| 236 |
+
Christoph Schuhmann, Romain Beaumont, Richard Vencu, Cade Gordon, Ross Wightman, Mehdi Cherti, Theo Coombes, Aarush Katta, Clayton Mullis, Mitchell Wortsman, et al. Laion-5b: An open large-scale dataset for training next generation image-text models. arXiv preprint arXiv:2210.08402, 2022.
|
| 237 |
+
Piyush Sharma, Nan Ding, Sebastian Goodman, and Radu Soricut. Conceptual captions: A cleaned, hypernymed, image alt-text dataset for automatic image captioning. In ACL, pp. 2556–2565, 2018.
|
| 238 |
+
Sheng Shen, Liunian Harold Li, Hao Tan, Mohit Bansal, Anna Rohrbach, Kai-Wei Chang, Zhewei Yao, and Kurt Keutzer. How much can clip benefit vision-and-language tasks? arXiv preprint arXiv:2107.06383, 2021.
|
| 239 |
+
Sijie Song, Xudong Lin, Jiaying Liu, Zongming Guo, and Shih-Fu Chang. Co-grounding networks with semantic attention for referring expression comprehension in videos. In CVPR, June 2021.
|
| 240 |
+
Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.
|
| 241 |
+
Krishna Srinivasan, Karthik Raman, Jiecao Chen, Michael Bendersky, and Marc Najork. Wit: Wikipedia-based image text dataset for multimodal multilingual machine learning. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, pp. 2443–2449, 2021.
|
| 242 |
+
Jonathan C Stroud, Zhichao Lu, Chen Sun, Jia Deng, Rahul Sukthankar, Cordelia Schmid, and David A Ross. Learning video representations from textual web supervision. arXiv preprint arXiv:2007.14937, 2020.
|
| 243 |
+
Chen Sun, Austin Myers, Carl Vondrick, Kevin P. Murphy, and Cordelia Schmid. Videobert: A joint model for video and language representation learning. ICCV, 2019.
|
| 244 |
+
Quan Sun, Yuxin Fang, Ledell Wu, Xinlong Wang, and Yue Cao. Eva-clip: Improved training techniques for clip at scale. arXiv preprint arXiv:2303.15389, 2023.
|
| 245 |
+
Bart Thomee, David A Shamma, Gerald Friedland, Benjamin Elizalde, Karl Ni, Douglas Poland, Damian Borth, and Li-Jia Li. Yfcc100m: The new data in multimedia research. Communications of the ACM, 59(2):64–73, 2016.
|
| 246 |
+
Zhan Tong, Yibing Song, Jue Wang, and Limin Wang. Videomae: Masked autoencoders are dataefficient learners for self-supervised video pre-training. In NeurIPS, 2022. doi: 10.48550/arXiv. 2203.12602. URL https://doi.org/10.48550/arXiv.2203.12602.
|
| 247 |
+
Alex Jinpeng Wang, Yixiao Ge, Rui Yan, Yuying Ge, Xudong Lin, Guanyu Cai, Jianping Wu, Ying Shan, Xiaohu Qie, and Mike Zheng Shou. All in one: Exploring unified video-language pre-training. arXiv preprint arXiv:2203.07303, 2022a.
|
| 248 |
+
Limin Wang, Bingkun Huang, Zhiyu Zhao, Zhan Tong, Yinan He, Yi Wang, Yali Wang, and Yu Qiao. Videomae v2: Scaling video masked autoencoders with dual masking. In CVPR, 2023.
|
| 249 |
+
Yi Wang, Kunchang Li, Yizhuo Li, Yinan He, Bingkun Huang, Zhiyu Zhao, Hongjie Zhang, Jilan Xu, Yi Liu, Zun Wang, Sen Xing, Guo Chen, Junting Pan, Jiashuo Yu, Yali Wang, Limin Wang, and Yu Qiao. Internvideo: General video foundation models via generative and discriminative learning. arXiv preprint arXiv:2212.03191, 2022b.
|
| 250 |
+
Jay Zhangjie Wu, Yixiao Ge, Xintao Wang, Weixian Lei, Yuchao Gu, Wynne Hsu, Ying Shan, Xiaohu Qie, and Mike Zheng Shou. Tune-a-video: One-shot tuning of image diffusion models for text-to-video generation. arXiv preprint arXiv:2212.11565, 2022.
|
| 251 |
+
Haiyang Xu, Qinghao Ye, Ming Yan, Yaya Shi, Jiabo Ye, Yuanhong Xu, Chenliang Li, Bin Bi, Qi Qian, Wei Wang, et al. mplug-2: A modularized multi-modal foundation model across text, image and video. arXiv preprint arXiv:2302.00402, 2023.
|
| 252 |
+
Hu Xu, Gargi Ghosh, Po-Yao Huang, Dmytro Okhonko, Armen Aghajanyan, Florian Metze, Luke Zettlemoyer, and Christoph Feichtenhofer. Videoclip: Contrastive pre-training for zero-shot video-text understanding. arXiv preprint arXiv:2109.14084, 2021.
|
| 253 |
+
Jun Xu, Tao Mei, Ting Yao, and Yong Rui. Msr-vtt: A large video description dataset for bridging video and language. In CVPR, pp. 5288–5296, 2016.
|
| 254 |
+
Hongwei Xue, Tiankai Hang, Yanhong Zeng, Yuchong Sun, Bei Liu, Huan Yang, Jianlong Fu, and Baining Guo. Advancing high-resolution video-language representation with large-scale video transcriptions. In CVPR, pp. 5036–5045, 2022.
|
| 255 |
+
Antoine Yang, Antoine Miech, Josef Sivic, Ivan Laptev, and Cordelia Schmid. Tubedetr: Spatiotemporal video grounding with transformers. In CVPR, pp. 16442–16453, 2022.
|
| 256 |
+
Lewei Yao, Runhui Huang, Lu Hou, Guansong Lu, Minzhe Niu, Hang Xu, Xiaodan Liang, Zhenguo Li, Xin Jiang, and Chunjing Xu. Filip: Fine-grained interactive language-image pre-training. arXiv preprint arXiv:2111.07783, 2021.
|
| 257 |
+
Rowan Zellers, Ximing Lu, Jack Hessel, Youngjae Yu, Jae Sung Park, Jize Cao, Ali Farhadi, and Yejin Choi. Merlot: Multimodal neural script knowledge models. NeurIPS, 34:23634–23651, 2021.
|
| 258 |
+
Rowan Zellers, Jiasen Lu, Ximing Lu, Youngjae Yu, Yanpeng Zhao, Mohammadreza Salehi, Aditya Kusupati, Jack Hessel, Ali Farhadi, and Yejin Choi. Merlot reserve: Neural script knowledge through vision and language and sound. In CVPR, pp. 16375–16387, 2022.
|
| 259 |
+
Ziyun Zeng, Yixiao Ge, Zhan Tong, Xihui Liu, Shu-Tao Xia, and Ying Shan. Tvtsv2: Learning out-of-the-box spatiotemporal visual representations at scale. arXiv preprint arXiv:2305.14173, 2023a.
|
| 260 |
+
Ziyun Zeng, Yuying Ge, Xihui Liu, Bin Chen, Ping Luo, Shu-Tao Xia, and Yixiao Ge. Learning transferable spatiotemporal representations from natural script knowledge. In CVPR, pp. 23079– 23089, 2023b.
|
| 261 |
+
Luowei Zhou, Chenliang Xu, and Jason Corso. Towards automatic learning of procedures from web instructional videos. In AAAI, 2018.
|
| 262 |
+
Deyao Zhu, Jun Chen, Xiaoqian Shen, Xiang Li, and Mohamed Elhoseiny. Minigpt-4: Enhancing vision-language understanding with advanced large language models. arXiv preprint arXiv:2304.10592, 2023a.
|
| 263 |
+
Linchao Zhu and Yi Yang. Actbert: Learning global-local video-text representations. CVPR, 2020.
|
| 264 |
+
Wanrong Zhu, Jack Hessel, Anas Awadalla, Samir Yitzhak Gadre, Jesse Dodge, Alex Fang, Youngjae Yu, Ludwig Schmidt, William Yang Wang, and Yejin Choi. Multimodal c4: An open, billion-scale corpus of images interleaved with text. arXiv preprint arXiv:2304.06939, 2023b.
|
| 265 |
+
|
| 266 |
+
tt
|
| 267 |
+
|
| 268 |
+

|
| 269 |
+
Figure 9: The word cloud (Top-200) of the generated captions in the InternVid dataset reveals that the captions predominantly highlight the rich actions of the objects.
|
| 270 |
+
Figure 10: The word clouds of the ASR transcripts of four different languages (English, Chinese, Korean, and German). We collect videos from various countries or regions with 11 different languages. Here we list four of them to show how these transcripts are distributed in words.
|
| 271 |
+
|
| 272 |
+
# A DATA AVAILABILITY STATEMENT
|
| 273 |
+
|
| 274 |
+
We are committed to maintaining transparency and compliance in our data collection and sharing methods. In accordance with these principles, please note the following:
|
| 275 |
+
|
| 276 |
+
Publicly Available Data: The data utilized in our studies is publicly available. We do not use any exclusive or private data sources.
|
| 277 |
+
|
| 278 |
+
Data Sharing Policy: Our data sharing policy builds upon the precedent set by prior works like Kinetics, HD-VILA, and others. Instead of providing the original raw data, we only supply the YouTube video IDs necessary for downloading the respective content.
|
| 279 |
+
|
| 280 |
+
Usage Rights: The data released by us is intended exclusively for research purposes. Any potential commercial usage is not sanctioned under this agreement.
|
| 281 |
+
|
| 282 |
+
Compliance with YouTube Policies: Our data collection and release practices are strictly in accord with YouTube’s data privacy policies. We ensure that no user data or privacy rights are violated during the process.
|
| 283 |
+
|
| 284 |
+
Data Licence: We employ the protocol of CC BY 4.0.
|
| 285 |
+
|
| 286 |
+
# B LIMITATIONS & SOCIETAL IMPACT
|
| 287 |
+
|
| 288 |
+
All video data used in our research are downloaded from YouTube using Safe for Work (SFW) queries and channels. To ensure appropriate content, we employ a simple NSFW filter: a binary classifier designed to recognize and exclude non-ethical videos. For privacy considerations and in respect of data sharing practices, we share only the YouTube ID of the videos, similar to previous academic works. This approach aligns with YouTube’s data protocols and ensures no violation of privacy or data usage rules. Despite these precautions, our work has some limitations, primarily related to data diversity and representativeness. Although YouTube is an extensive source encompassing a wide range of video categories, certain specific types of footage may be excluded or scarcely collected, including: public area surveillance, sports competitions, movies, documentaries, etc. The exclusion of such categories is often due to copyright restrictions or other limits imposed by the platform. Therefore, while our dataset provides a broad view of everyday video content, its coverage does not extend to every possible category or type of video. These limitations should be taken into account when considering the generalizability of our results across all types of video data.
|
| 289 |
+
|
| 290 |
+
# C MORE STATISTICS IN INTERNVID
|
| 291 |
+
|
| 292 |
+
Actionness. InternVid contains way more verbs than the WebVid10M. We used NLTK toolkit to analyze the number of verbs in captions, focusing on tagging all unique verbs. We found a total of 109,485 verbs in the WebVid10M, while InternVid contained 212,155 ones. While the counts may not be that accurate due to our simple counting, we believe they provide a rough indication of the actionness of the two datasets.
|
| 293 |
+
|
| 294 |
+
Video Caption and Transcript Distribution. To analyze the word distribution of our generated captions and multilingual (ASR) transcripts, we compute their distributions. The resulting word distribution of the captions is presented in Figure 9, which includes objects (tv, car, door, plant, etc.), attributes (green, young, large, long, etc.), locations (middle, behind, south, next, etc.), scenes (room, stage, kitchen, office, etc.), actions/events (walking, eating, cutting, holding, etc.), and more.
|
| 295 |
+
|
| 296 |
+
We also include four word distributions of different languages in Figure 10, reflecting trends in different countries and offering potential data customization along with the provided metadata.
|
| 297 |
+
|
| 298 |
+
Aesthetic Scores and Clip-Caption Similarity. We uniformly sampled four frames of each clip, calculated their aesthetic scores, and took the maximum score as the video aesthetic score. For clip-caption similarity, we computed the cosine similarity between video embeddings and text ones, again using a uniform sampling of four frames for each clip.
|
| 299 |
+
|
| 300 |
+
Potential Biases. We focus on age, gender, and race distributions, as these are commonly recognized areas where bias can occur. Our methodology consisted of counting keywords related to these categories in the generated video captions. It’s important to note that these synthetic captions may not fully reflect the truth of the corresponding videos, thereby creating a gap between our analysis and the actual reality.Here are the results of our analysis:
|
| 301 |
+
|
| 302 |
+
• Age distribution: We counted nouns related to children, grown-ups, and the elderly. We found that $3 0 . 7 1 \%$ of the video captions contained such descriptions. Within this subset, the majority were about adults $( 8 4 . 5 9 \% )$ , followed by children $( 1 5 . 3 1 \% )$ and barely any mentions of senior citizens $( 0 . 0 8 \% )$ .
|
| 303 |
+
• Gender distribution: We counted nouns specifically related to males and females. According to our findings, $3 3 . 7 \%$ of video captions contained some form of gender-related text. Among these, $6 4 . 2 7 \%$ pertained to men and $3 5 . 7 3 \%$ pertained to women.
|
| 304 |
+
• Race distribution: Only around $2 . 5 1 \%$ of video captions contained descriptions related to race. This could be due to the limitations of our captioning pipeline, which might not be capable of capturing such attributes accurately. Further exploration using a dedicated race recognition model is needed for more accurate statistics.
|
| 305 |
+
|
| 306 |
+
# D INTERNVID-ICL: INTERLEAVED VIDEO-TEXT FOR IN-CONTEXT VIDEO LEARNING
|
| 307 |
+
|
| 308 |
+

|
| 309 |
+
Table 8: Interleaved video-text data format (b) in InternVid. The caption and ASR transcript of each clip is shown in black and gray, respectively. We can achieve interleaved video-text data format (a) by abandoning ASR transcripts. To obtain data format (c), we concatenate multiple videos with interleaved video-text data (a).
|
| 310 |
+
|
| 311 |
+
Visual Examples. As given in the paper, we provide examples video+text interleaved entries for in-cntext learning as Flamingo. Table 8 gives an example about format (a): arrange clips and their descriptions sequentially based on their temporal order within the same video. Note the videos are randomly dropped with a probability (0.3) for constructing richer text context compared with the original video-text pair combinations in sequential.
|
| 312 |
+
|
| 313 |
+
# E IMPLEMENTATION DETAILS
|
| 314 |
+
|
| 315 |
+
# E.1 DIVERSITY SAMPLING IN CONSTRUCTING INTERNVID SUBSETS
|
| 316 |
+
|
| 317 |
+
For DIV (diversity sampling), we aim to sample video clips from all long videos available to maximize data diversity. This was done by counting the frequencies of long videos in the segmented clip pool and sampling clips with probabilities inverse to these frequencies. Here is a pseudocode example of this process:
|
| 318 |
+
|
| 319 |
+
from collections import Counter import json import random import numpy as np data $=$ json.load(open("/path/to/to_sample")) 6 video_id $=$ set([x["video"].split("/")[-1][:11] for x in data]) video_id_counter $=$ Counter([x["video"].split("/")[-1][:11] for x in data ]) sampling_weights $=$ [1.0 / video_id_counter[x["video"].split("/") [-1][:11]] for $\mathbf { x }$ in data] np.random.seed(42) 10 sampling_weights $=$ np.array(sampling_weights)
|
| 320 |
+
|
| 321 |
+
Table 9: Video-text retrieval fine-tuning settings.
|
| 322 |
+
|
| 323 |
+
<table><tr><td>config</td><td colspan="4">MSRVTT DiDeMo ANet LSMDC MSVD</td></tr><tr><td>optimizer optimizer momentum weight decay</td><td colspan="4">AdamW β1, β2=0.9,0.999 0.02</td></tr><tr><td>learning rate schedule learning rate batch size</td><td>2e-5</td><td>cosine decay 4e-5 2e-5 256</td><td>2e-5</td><td>4e-5</td></tr><tr><td>warmup epochs total epochs</td><td>7</td><td>1 8 5 12</td><td>10</td><td>20</td></tr><tr><td>input frame max text length</td><td>32 0.3</td><td>96 64 0.2 0.3</td><td>64 0.3</td><td>150 0.2</td></tr><tr><td>drop path flip augmentation</td><td colspan="4"></td></tr><tr><td>augmentation</td><td colspan="5">yes MultiScaleCrop [0.5,1]</td></tr></table>
|
| 324 |
+
|
| 325 |
+
sampling_weights $=$ sampling_weights / sampling_weights.sum() sampled_index $=$ np.random.choice(len(data), 10647458, replace=False, p= sampling_weights) 13 data $=$ [data[i] for i in sampled_index] 14 json.dump(data, open("/path/to/sampled", "w"))
|
| 326 |
+
|
| 327 |
+
For FLT (filtering), we applied a series of filtering strategies to video data alongside DIV sampling. These included: a) Removing video clips shorter than 1s (approximately $2 3 . 1 5 \%$ of the total) or longer than 120s (around $0 . 8 4 \%$ of the total). b) Computing CLIPScore for each video clip using a randomly sampled frame from the clip with OpenAI’s CLIP-ViT-L/14, then selecting clips within the top $30 \%$ of CLIPScores. c) Sampling 10M out of the remaining clips using DIV sampling.
|
| 328 |
+
|
| 329 |
+
# E.2 VICLIP
|
| 330 |
+
|
| 331 |
+
Implementation. ViCLIP is learned with 64 NVIDIA A100 GPUs for 3 days with 50M video-text pairs. We introduce DeepSpeed and FlashAttention (Dao et al., 2022) for training and inference.
|
| 332 |
+
|
| 333 |
+
Action Recognition. In the zero-shot action recognition, we sample 8 frames in each video. Following the settings in CLIP and EVA-CLIP, we report the mean of top-1 and top-5 accuracy for Kinetics-400 / -600 / -700. In Section 5.1, we show ViCLIP learnt on WebVid or InternVid is an effective zero-shot action recognition model.
|
| 334 |
+
|
| 335 |
+
In the full fine-tuned setting, we conduct two experiments with two receipts. In Table 3, for the experiments where the training data excluded K710, we followed the common practice of finetuning the pretrained ViCLIP with the training data from the evaluation dataset. On the other hand, for the experiments where the training data included K710, we adopted a training trick inspired by (Li et al., 2022a). We first finetuned the pretrained ViCLIP with K710 (Li et al., 2022a), and then proceeded with the common supervised finetuning setting. By incorporating the supervised finetuning with K710, ViCLIP demonstrated better performance in the fine-tuned tasks compared to experiments that did not include K710.
|
| 336 |
+
|
| 337 |
+
Video Retrieval. In the full-finetuning setting, we tune the pretrained ViCLIP with not only video-text contrastive loss but also video-text matching loss on the training data of the evaluated benchmarks. During both training and testing, we sample 12 frames. Detailed hyper-parameters are given in Table 9. In the zero-shot setting, we sample only 8 frames for evaluations.
|
| 338 |
+
|
| 339 |
+
# E.3 VIDEO GENERATION BASELINE
|
| 340 |
+
|
| 341 |
+
We used the spatiotemporal modeling approach from (Wu et al., 2022) and built our text-to-video generation baseline on the work of (Rombach et al., 2022). Our approach consists of a U-Net with a transformer that models its latents, using interleaved spatiotemporal attention (ST-Attn), cross-attention for visual-text, a feed-forward network (FFN), and temporal attention (T-Attn), as illustrated in Figure 11. To adapt the 2D convolutional layers in (Rombach et al., 2022) to 3D, we extended $3 \times 3$ kernels into $1 \times 3 \times 3$ ones. We also extended the original spatial attentions to spatiotemporal ones. We initialized our baseline using all text-to-image diffusion model parameters, while the newly added temporal attention layers used default parameters.
|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
Figure 11: Framework of our text-to-video generation baseline.
|
| 345 |
+
|
| 346 |
+
<table><tr><td rowspan="3">Captioning</td><td colspan="4">Retrieval</td><td colspan="6">Action Recognition</td></tr><tr><td colspan="2">Zero-Shot MSR-VTT</td><td colspan="2">Fine-Tuned MSR-VTT</td><td colspan="2">K400</td><td colspan="2">Zero-Shot K600</td><td colspan="2">K700</td></tr><tr><td>T2V</td><td>V2T</td><td>T2V</td><td>V2T</td><td>top-1</td><td>AVG</td><td>top-1</td><td>AVG</td><td>top-1</td><td>AVG</td></tr><tr><td rowspan="2">VideoChat Ours</td><td>33.9</td><td>32.3</td><td></td><td></td><td>54.68</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>38.6</td><td>38.5</td><td>46.6 49.0</td><td>47.1 49.2</td><td>58.52</td><td>67.74 71.11</td><td>51.70 55.37</td><td>64.91 68.27</td><td>43.67 47.09</td><td>56.51 59.98</td></tr></table>
|
| 347 |
+
|
| 348 |
+
Table 10: Video retrieval and action recognition results of ViCLIP-B trained on InternVid-FLT-10M with the captions generated by VideoChat and our captioning approach.
|
| 349 |
+
|
| 350 |
+
For the ST-Attn implementation, we used frame embeddings from the U-Net encoder instead of video embeddings as in (Wu et al., 2022). We concatenated the embeddings of the previous and current frame for values and keys in attention, while using the current frame embedding alone as queries. The rest of the implementation remained the same as the original.
|
| 351 |
+
|
| 352 |
+
Text-to-Video Evaluation. To evaluate our text-to-video model, we conducted zero-shot experiments on the UCF-101 and MSRVTT datasets, following the method from (Blattmann et al., 2023). For UCF-101, we used the class names as text prompts and generated 20 samples per class (total of 2,020 videos). For MSRVTT, we randomly selected one caption per video from the official test set (total of 2,990 videos). To ensure a fair comparison, we used the official implementation of VideoCrafter and VideoFusion (Luo et al., 2023) to generate the same number of videos with the same text prompts. During video sampling and evaluation, we generated 16 frames per video.
|
| 353 |
+
|
| 354 |
+
We assess the overall quality of the synthesized results on UCF-101 using framewise-FID, FVD, and Inception Score (IS), and evaluate the text-video semantic similarity on MSRVTT using clip similarity (CLIPSIM). For framewise-FID and IS, we use the pretrained Inceptionv3 network weights as our image encoder. For FVD, we use the pretrained InceptionI3d model and followed the TATS method (Ge et al., 2022). To compute CLIPSIM, we calculate the clip text-image similarity for each frame with respect to the given text prompts and computed the average score. We use the ViT-B-32 clip model as the backbone, consistent with previous work (Blattmann et al., 2023).
|
| 355 |
+
|
| 356 |
+
# F MORE RESULTS
|
| 357 |
+
|
| 358 |
+
# F.1 EFFECTIVENESS OF OUR MULTISCALE CAPTIONING APPROACH
|
| 359 |
+
|
| 360 |
+
To further validate the effectiveness of our proposed captioning method, we establish a video caption baseline using the video multimodal model VideoChat (Li et al., 2023c) for comparison. We input the video clip into the model with the prompt "Please describe the content in the given video." and apply it to InternVid-10M-FLT, resulting in 10 million new captions generated by VideoChat. Subsequently, we train two versions of ViCLIP-Base using InternVid-10M-FLT, each version trained with one of the two types of captions.
|
| 361 |
+
|
| 362 |
+
Table 10 demonstrates that ViCLIP-B trained using our captions outperforms the version trained using captions from VideoChat in both video retrieval (MSR-VTT) and action recognition (K400/600/700). These results are particularly noteworthy considering that the only difference in training lies in the captions generated by the two different approaches. Therefore, these findings further confirm the superior performance of our proposed captioning method compared to the baseline VideoChat.
|
| 363 |
+
|
| 364 |
+
Table 11: Zero-shot action recognition results of ViCLIP using different captions on Kinetics 400/600/700.
|
| 365 |
+
|
| 366 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">top-K40AVG</td><td colspan="2">top-K60AVG</td><td colspan="2">top-K70AVG</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ViCLIP</td><td>+InternVid-2M</td><td>51.70</td><td>64.69</td><td>49.20</td><td>62.34</td><td>40.90</td><td>53.70</td></tr><tr><td>ViCLIP</td><td>+InternVid-2M-BLIP2</td><td>38.40</td><td>51.58</td><td>36.40</td><td>49.19</td><td>29.10</td><td>40.68</td></tr></table>
|
| 367 |
+
|
| 368 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">MSR-VTT TLSMD2TDVDeV2T T2VVT T2VNV2T</td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ViCLIP</td><td>+InternVid-2M</td><td>31.8</td><td>33.7</td><td>14.312.7</td><td></td><td></td><td>13.6 21.5 39.6 62.5</td><td></td><td></td><td>9.9</td><td>16.8</td></tr><tr><td></td><td>ViCLIP +InternVid-2M-BLIP2 21.7</td><td></td><td>21.9</td><td>5.2</td><td>5.1</td><td>7.1</td><td></td><td>12.7 24.6 42.1</td><td></td><td>6.4</td><td>10.2</td></tr></table>
|
| 369 |
+
|
| 370 |
+
Table 12: Results of zero-shot video retrieval from ViCLIPusing different captions on MSR-VTT, LSMDC, DiDeMo, MSVD, and ActivityNet.
|
| 371 |
+
|
| 372 |
+
We also ablate the necessary of including fine-level captions (by tag2text) more than only using coarse ones (by BLIP2). Specifically, an ablation is performed on two subsets of the dataset (InternVid-2M and InternVid-2MBLIP), each having 2 million video-text pairs. InternVid-2M utilized fused captions, combining both coarseand fine-level ones. In contrast, InternVid-2M-BLIP only used the coarse-level captions produced by BLIP2 on the central frames. For the mentioned using fine-level captions, concatenating the framewise captions from tag2text as the video captions is not a promising opinion as these captions are quite long and full of reptitions, unsuitable for contrastive learning. Thus, we do not include this setting in experiments.
|
| 373 |
+
|
| 374 |
+
Zero-shot experiments are conducted on these models. Due to computational constraints, the ViCLIP-B is trained with a batch size of 4096 using 8 A100 GPUs, with a mask ratio set to 0.9. All remaining training parameters were consistent with those in the main paper. Contrasting the results from Table 11 and 12, it’s evident that the use of combined coarse and fine-level captions in video-text contrastive learning rendered superior zero-shot performance than utilizing the coarse level ones alone. It shows the effectiveness of our given video captioning pipeline.
|
| 375 |
+
|
| 376 |
+
How the LM impacts motion-related words when summarizing framewise captions into video ones. From a statistical perspective, generating video captions from frame-level captions using a language model has a negligible effect on the number of motion-related words captured for video-based understanding. To illustrate this, we counted the unique verbs (using nltk package) in the captions from a $1 0 \mathrm { m }$ subset of InternVid under two settings: 1) In the first setting, the captions are video captions generated by the language model. 2) In the second setting, the captions are frame-wise ones from BLIP2 and tag2text. We found that the number of unique verbs in the video captions is 109859, whereas for the frame-wise captions it is slightly higher at 109895. This small discrepancy suggests that almost no motion-related words are lost during the caption generation process by LM. Therefore, we believe our approach maintains most of the important motion-related information needed for video understanding.
|
| 377 |
+
|
| 378 |
+
# F.2 MODEL SCALING
|
| 379 |
+
|
| 380 |
+
We provide a comparison between two versions of ViCLIP, -L (300M) and -B (80M), when trained on InternVid in Tables 13, 14, and 15. These tables distinctly demonstrate that moving from the base to large model, ViCLIP’s zero-shot and finetuned video retrieval performance, as well as zero-shot action recognition, can be consistently improved. These tables clearly demonstrate the benefits of model scaling, and we aim to explore this area further in future work as resources permit.
|
| 381 |
+
|
| 382 |
+
# F.3 LINEAR PROBING
|
| 383 |
+
|
| 384 |
+
we present the linear action recognition results on Kinetics-400 in Table 16. It’s noteworthy that ViCLIP, trained on InternVid-10M-FLT/-200M, delivers a much higher top-1 accuracy compared to when trained on WebVid-10M (with a more than 10-point increase), mirroring our findings in fine-tuned action recognition settings. Comparing with other approaches, ViCLIP-L offers performance close to TVTSv2-H/-B, which incorporate extra learnable parameters for spatiotemporal modeling. Moreover, it significantly outperforms VideoMAEv2-H. This result can be attributed to the fact that MAE-based methodologies generally underperform in linear evaluations.
|
| 385 |
+
|
| 386 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">MSR-VTT TLSMD2T DiDeM2T T2VSVDT T2VNV2T</td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ViCLIP-B</td><td>+InternVid-200M</td><td>37.436.1</td><td></td><td></td><td></td><td></td><td></td><td></td><td>16.5 15.2 16.6 22.6 44.3 67.0 13.3 21.7</td><td></td><td></td></tr><tr><td>ViCLIP-L</td><td>+InternVid-200M</td><td>39.339.5</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>18.316.617.1 25.5 47.3 70.0 13.7 21.6</td></tr><tr><td></td><td>ViCLIP-B +InternVid-10M-FLT 38.6 38.5</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td>18.517.0 16.3 25.0 44.8 67.2 13.0 21.8</td></tr><tr><td></td><td>ViCLIP-L +InternVid-10M-FLT 42.4 41.3 20.1 16.9 18.4 27.9 49.1 75.1 15.1 24.0</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 387 |
+
|
| 388 |
+
Table 13: Scaling model in zero-shot video retrieval on MSR-VTT, LSMDC, DiDeMo, MSVD, and ActivityNet.
|
| 389 |
+
|
| 390 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">MSV-VTT T2SMD2T DiVeM2T T2VSVDT T2ANV2T</td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ViCLIP-B</td><td>+InternVid-200M</td><td>50.7 49.4 25.3 25.4 41.1 40.8 69.0 69.3 37.7 35.8</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ViCLIP-L</td><td>+InternVid-200M</td><td>53.7 53.4 29.3 29.3 51.1 50.879.978.4 52.8 51.1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>ViCLIP-B +IntermVid-10M-FLT 49.0 49.2 24.4 23.7 40.0 41.4 72.2 73.7 38.3 37.0</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>ViCLIP-L +IntermVid-10M-FLT 52.5 51.8 33.0 33.0 49.4 50.2 77.2 79.049.8 48.1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 391 |
+
|
| 392 |
+
Table 14: Scaling model in fine-tuned video retrieval on MSR-VTT, LSMDC, DiDeMo, MSVD, and ActivityNet.
|
| 393 |
+
|
| 394 |
+
# F.4 IMPACT OF VIDEOS FROM DIFFERENT LANGUAGE SOURCES
|
| 395 |
+
|
| 396 |
+
Unlike previous models that are benchmarked mostly on English-based datasets, InternVid encompasses clips from a variety of languages. This necessitates a further analysis to determine the potential impact this diversity might have. Currently, we hypothesize that the language of the video may not significantly impact the generated captions as our deployed image caption models generate English descriptions based purely on input frames. However, in terms of video distributions, there may exist differences (such as in behaviors, activities, and events) between videos stemming from different countries due to varied cultural backgrounds.
|
| 397 |
+
|
| 398 |
+
To examine this hypothesis, we select two 2 million subsets of InternVid: one consisting of only English videos (InternVid-2M-EN) and another with only Chinese videos (InternVid-2M-CN). It’s important to note that whether the videos are in English or Chinese, we generate captions in English. Our ViCLIP-B model is pretrained on these subsets, and we conduct zero-shot experiments as described below. Due to resource constraints, we trained the ViCLIP-B with a batchsize of 4096 using 8 A100 GPUs with a mask ratio set to 0.9. The remaining training settings were kept consistent with those outlined in the paper. As given in Table 17 and 18, we find that the model pretrained with InternVid-2M-EN outperformed that with InternVid-2M-CN notably in both zero-shot action recognition on K400/600/700 and video retrieval. This result can be attributed to the fact that InternVid-2M-EN has a data distribution much closer to downstream task data than InternVid-2M-CN, as all used task videos are sourced from English sources.
|
| 399 |
+
|
| 400 |
+
# F.5 TEXT-TO-VIDEO GENERATION
|
| 401 |
+
|
| 402 |
+
In Figure 12, we observe that the t2v baseline using both WebVid10M and InternVid-Aes-18M significantly outperforms others in visual quality and temporal coherence. Note that the t2v baseline using InternVid does not contain watermarks, which is a data bias in WebVid10M. We give more visual comparisons between our baseline and other approaches in the supp.
|
| 403 |
+
|
| 404 |
+
# F.6 VIDEO-CENTRIC DIALOGUE SYSTEM
|
| 405 |
+
|
| 406 |
+
We give qualitative evaluations of VideoChat-ViCLIP in spatial understanding (Figure 13), action recognition (Figure 14), temporal understanding (Figure 15), video reasoning (Figure 16), and video creative (Figure 17) tasks.
|
| 407 |
+
|
| 408 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">K400</td><td colspan="2">K600</td><td colspan="2">K700</td></tr><tr><td>top-1</td><td>AVG</td><td>top-1</td><td>AVG</td><td>top-1</td><td>AVG</td></tr><tr><td>ViCLIP-B</td><td>+InternVid-200M</td><td>56.58</td><td>69.20</td><td>53.57</td><td>66.20</td><td>45.82</td><td>58.28</td></tr><tr><td>ViCLIP-L</td><td>+InternVid-200M</td><td>59.80</td><td>71.09</td><td>57.80</td><td>69.34</td><td>49.30</td><td>61.25</td></tr><tr><td>ViCLIP-B</td><td>+InternVid-10M-FLT</td><td>58.52</td><td>71.11</td><td>55.37</td><td>68.27</td><td>47.09</td><td>59.98</td></tr><tr><td>ViCLIP-L</td><td>+InternVid-10M-FLT</td><td>64.80</td><td>75.70</td><td>62.20</td><td>73.53</td><td>54.30</td><td>66.38</td></tr></table>
|
| 409 |
+
|
| 410 |
+
Table 15: Scaling model in zero-shot action recognition results on Kinetics 400/600/700.
|
| 411 |
+
|
| 412 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">K400</td></tr><tr><td>top-1</td><td>AVG</td></tr><tr><td>VideoMAE-B (Tong et al., 2022)</td><td>Kinetics-400</td><td>20.4</td><td>=</td></tr><tr><td>VideoMAEv2-H(Wang et al.,2023)</td><td>Kinetics+SthSth+AVA+WebVid2M</td><td>25.8</td><td>=</td></tr><tr><td>TVTS-B (Zeng et al.,2023b)</td><td>+YT-Temporal-180M</td><td>60.8</td><td>=</td></tr><tr><td>TVTSv2-B (Zeng et al., 2023a)</td><td>+YT-Temporal-180M+WebVid-2M</td><td>70.1</td><td></td></tr><tr><td>TVTSv2-H (Zeng et al., 2023a)</td><td>+YT-Temporal-180M+WebVid-2M</td><td>73.1</td><td>=</td></tr><tr><td>ViCLIP-L</td><td>+WebVid-10M</td><td>60.0</td><td>82.9</td></tr><tr><td>ViCLIP-L</td><td>+InternVid-10M-FLT</td><td>71.1</td><td>90.4</td></tr><tr><td>ViCLIP-L</td><td>+InternVid-200M</td><td>71.7</td><td>90.9</td></tr></table>
|
| 413 |
+
|
| 414 |
+
Table 16: Linear action recognition results on Kinetics-400.
|
| 415 |
+
|
| 416 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2">top-K40AVG</td><td colspan="2">top-K60AVG</td><td colspan="2">top-K70AVG</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>ViCLIP</td><td>+InternVid-2M-EN</td><td>40.20</td><td>53.68</td><td>37.40</td><td>51.00</td><td>29.60</td><td>42.06</td></tr><tr><td>ViCLIP</td><td>+InternVid-2M-CN</td><td>35.9</td><td>49.73</td><td>33.70</td><td>47.05</td><td>26.90</td><td>39.02</td></tr></table>
|
| 417 |
+
|
| 418 |
+
Table 17: Zero-shot action recognition results of ViCLIP using different pretraining sources on Kinetics 400/600/700.
|
| 419 |
+
|
| 420 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Data</td><td colspan="2"></td><td colspan="2">MSR-V2T T2SMDCDiDeM2T T2VSVDT T2AN2T</td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>ViCLIP +InternVid-2M-EN 24.1 24.1</td><td></td><td></td><td>9.8</td><td>9.1</td><td></td><td></td><td></td><td>10.3 15.6 31.4 50.57.1</td><td></td><td>12.0</td></tr><tr><td></td><td>ViCLIP +IntermVid-2M-CN 22.2 22.2</td><td></td><td></td><td>8.4</td><td>8.7</td><td>9.9</td><td></td><td></td><td>15.1 29.6 48.55.7</td><td></td><td>9.7</td></tr></table>
|
| 421 |
+
|
| 422 |
+
Table 18: Results of zero-shot video retrieval of ViCLIP using different pretraining sources on MSR-VTT, LSMDC, DiDeMo, MSVD, and ActivityNet.
|
| 423 |
+
|
| 424 |
+

|
| 425 |
+
Figure 12: Comparison of samples from t2v baseline to others. We provide zero-shot text-to-video generation results of different methods trained on both WebVid10M and the additional InternVid-Aes18M. The used prompt is: a bald man in a black t-shirt is playing a guitar.
|
| 426 |
+
|
| 427 |
+

|
| 428 |
+
Figure 13: Video spatial understanding task. This figure demonstrates the spatial understanding and temporal localization capabilities of VideoChat-ViCLIP trained with our dataset.
|
| 429 |
+
|
| 430 |
+

|
| 431 |
+
Figure 14: Video action recognition task. The video comes from Kinetics-400, with the label ”playing guitar”.
|
| 432 |
+
|
| 433 |
+

|
| 434 |
+
Figure 15: Temporal understanding task. VideoChat-ViCLIP can easily handle temporal understanding tasks and make predictions based on these temporal sequences due to its training on rich temporal information on InternVid.
|
| 435 |
+
|
| 436 |
+

|
| 437 |
+
Figure 16: Video reasoning task. Our dialogue system has the ability to understand common sense and make causal inferences based on the contents of the video.
|
| 438 |
+
|
| 439 |
+

|
| 440 |
+
Figure 17: Video creative task. This figure shows the performance of VideoChat-ViCLIP on creative and generative tasks within our dataset, like generating poetry based on video content.
|
parse/test/MLBdiWu4Fw/MLBdiWu4Fw_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/MLBdiWu4Fw/MLBdiWu4Fw_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/MLBdiWu4Fw/MLBdiWu4Fw_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/TrloAXEJ2B/TrloAXEJ2B.md
ADDED
|
@@ -0,0 +1,301 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LoraHub: Efficient Cross-Task Generalization via Dynamic LoRA Composition
|
| 2 |
+
|
| 3 |
+
Chengsong Huang $\mathbf { \Delta } \mathbf { \dag \ S \mathrm { \ s \mathrm { \ s } } }$ , Qian Liu†∗, Bill Yuchen $\mathbf { L i n } ^ { \bigotimes * }$ , Tianyu Pang†, Chao ${ { \mathbf { D } } { { \mathbf { u } } } ^ { \dag } }$ , Min Lin† †Sea AI Lab, Singapore §Washington University in St. Louis, MO, USA ♢Allen Institute for AI, Seattle, WA, USA
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Low-rank adaptations (LoRA) are often employed to fine-tune large language models (LLMs) for new tasks. This paper investigates LoRA composability for cross-task generalization and introduces LoraHub, a simple framework devised for the purposive assembly of LoRA modules trained on diverse given tasks, with the objective of achieving adaptable performance on unseen tasks. With just a few examples from a new task, LoraHub can fluidly combine multiple LoRA modules, eliminating the need for human expertise and assumptions. Notably, the composition requires neither additional model parameters nor gradients. Empirical results on the Big-Bench Hard benchmark suggest that LoraHub, while not surpassing the performance of in-context learning, offers a notable performanceefficiency trade-off in few-shot scenarios by employing a significantly reduced number of tokens per example during inference. Notably, LoraHub establishes a better upper bound compared to in-context learning when paired with different demonstration examples, demonstrating its potential for future development. Our vision is to establish a platform for LoRA modules, empowering users to share their trained LoRA modules. This collaborative approach facilitates the seamless application of LoRA modules to novel tasks, contributing to an adaptive ecosystem. Our code is available at github.com/sail-sg/lorahub, and all the pre-trained LoRA modules are released at huggingface.co/lorahub.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+

|
| 12 |
+
Figure 1: The illustration of zero-shot learning, few-shot in-context learning and few-shot LoraHub learning (ours). Note that the Compose procedure is conducted per task rather than per example. Our method achieves similar inference throughput as zero-shot learning, yet approaches the performance of in-context learning on the BIG-Bench Hard (BBH) benchmark.
|
| 13 |
+
|
| 14 |
+
Recent progress in natural language processing (NLP) has been largely fueled by large language models (LLMs) such as OpenAI GPT (Brown et al., 2020), FLAN-T5 (Chung et al., 2022), and LLaMA (Touvron et al., 2023). These models demonstrate top-tier performance across different NLP tasks. However, their enormous parameter size presents issues regarding computational efficiency and memory usage during fine-tuning. To mitigate these challenges, Low-Rank Adaptation (LoRA) (Hu et al., 2022) has emerged as a parameterefficient fine-tuning technique (Lester et al., 2021; He et al., 2022; An et al., 2022). By reducing memory demands and computational costs, it speeds up LLM training. LoRA achieves this by freezing the base model parameters (that is, an LLM) and training a lightweight module, which regularly delivers high performance on target tasks.
|
| 15 |
+
|
| 16 |
+
While prior research has targeted the efficiency enhancement facilitated by LoRA, there is a dearth of investigation into the inherent modularity and composability of LoRA modules. Typically, previous methods train LoRA modules to specialize in individual tasks. Yet, the intrinsic modularity of LoRA modules presents an intriguing research question: Would it be possible to compose LoRA modules to generalize to novel tasks in an efficient manner? In this paper, we tap into the potential of LoRA modularity for broad task generalization, going beyond single-task training to meticulously compose LoRA modules for malleable performance on unknown tasks. Crucially, our method enables an automatic assembling of LoRA modules, eliminating dependency on manual design or human expertise. With just a handful of examples from new tasks (e.g., 5), our approach can autonomously compose compatible LoRA modules without human intrusion. We do not make assumptions about which LoRA modules trained on particular tasks can be combined, allowing for flexibility in amalgamating any modules as long as they conform to the specification (e.g., using the same LLM). As our approach leverages several available LoRA modules, we refer to it as LoraHub and denote our learning method as LoraHub learning.
|
| 17 |
+
|
| 18 |
+
To validate the efficiency of our proposed methods, we test our approaches using the widely recognized BBH benchmark with FLAN-T5 (Chung et al., 2022) serving as the base LLM. The results underline the effectiveness of the LoRA module composition for unfamiliar tasks through a few-shot LoraHub learning process. Notably, our methodology achieves an average performance that closely matches that of few-shot in-context learning, while demonstrating a superior upper bound, particularly when using different demonstration examples. Additionally, our method substantially reduces the inference cost compared to in-context learning, eliminating the requirement of examples as inputs for the LLM. With fewer tokens per example during inference, our method significantly reduces computational overhead and enables faster responses. It aligns with a broader research trend, where recent studies are actively exploring approaches to reduce the number of input tokens (Zhou et al., 2023; Ge et al., 2023; Chevalier et al., 2023; Jiang et al., 2023a; Li et al., 2023; Jiang et al., 2023b). Our learning procedure is also notable for its computational efficiency, using a gradient-free approach to obtain the coefficients of LoRA modules and requiring only a handful of inference steps for unseen tasks. For example, when applied to a new task in BBH, our methodology can deliver superior performance in less than a minute using a single A100 card.
|
| 19 |
+
|
| 20 |
+
Importantly, LoraHub learning can feasibly be accomplished with a CPU-only machine, requiring proficiency solely for processing LLM inference. In our pursuit to democratize artificial intelligence, we are taking an important step forward by envisioning the establishment of the LoRA platform. The platform would serve as a marketplace where users can seamlessly share and access well-trained LoRA modules for diverse applications. LoRA providers have the flexibility to freely share or sell their modules on the platform without compromising data privacy. Users, equipped with CPU capability, can leverage trained LoRA modules contributed by others through automated distribution and composition algorithms. This platform not only cultivates a repository of reusable LoRA modules with a myriad of capabilities but also sets the stage for cooperative AI development. It empowers the community to collectively enrich the LLM’s capabilities through dynamic LoRA composition.
|
| 21 |
+
|
| 22 |
+
# 2 Problem Statement
|
| 23 |
+
|
| 24 |
+
Large Language Models We assume that a large language model $M _ { \theta }$ is based on Transformer architecture (Vaswani et al., 2017) and has been pre-trained on a large-scale text corpus. The model architecture can be either encoder-decoder (Raffel et al., 2020) or decoderonly (Brown et al., 2020). Also, $M _ { \theta }$ could also have been fine-tuned with a large set of instruction-following datasets such as Flan Colleciton (Longpre et al., 2023) and PromptSource (Bach et al., 2022).
|
| 25 |
+
|
| 26 |
+
Cross-Task Generalization In real-world situations, users often desire an LLM to perform novel tasks that it has not encountered before — an ability widely known as cross-task generalization. Generally, cross-task generalization falls into two categories: zero-shot learning (Mishra et al., 2022; Sanh et al., 2022; Chung et al., 2022; OpenAI, 2022; Lin et al., 2022), which necessitates no labeled examples of the new task, and few-shot learning (Ye et al., 2021; Min et al., 2022) which demands a handful of labeled examples. Assume we have $N$ distinct upstream tasks that the LLM has been trained on, denoted as $\mathbb { T } = \{ \mathcal { T } _ { 1 } , . . . , \mathcal { T } _ { N } \}$ . Our paper primarily focuses on the latter category, where for an unseen target task $\mathcal { T } ^ { \prime } \notin \mathbb { T } ,$ , users can only provide a limited set of labeled examples, Q. Our aim is to modify the model $M _ { \theta }$ to adapt it to task $\tau ^ { \prime }$ using only $Q$ . An intuitive method would be to fine-tune the weights of ${ \mathrm { { \dot { M } } } } _ { \theta }$ based on $Q ,$ yielding an updated model $M _ { \phi }$ with enhanced performance on $\tau ^ { \prime }$ . However, this approach is inefficient, time-consuming, and unstable when $Q$ is small.
|
| 27 |
+
|
| 28 |
+
LoRA Tuning LoRA is a parameter-efficient fine-tuning method (Hu et al., 2022), facilitates the adaptation of LLMs using lightweight modules, eliminating the need for finetuning the entire weights. LoRA tuning involves keeping the original model weights frozen while introducing trainable low-rank decomposition matrices as adapter modules into each layer of the model. Compared to the base LLM, this module possesses significantly fewer trainable parameters, paving the way for rapid adaptation using minimal examples. As such, LoRA tuning presents a resource-efficient technique to quickly adapt LLMs for new tasks with restricted training data. However, traditional LoRA methods primarily concentrate on training and testing within the same tasks (Gema et al., 2023), rather than venturing into few-shot cross-task generalization.
|
| 29 |
+
|
| 30 |
+
# 3 Methodology
|
| 31 |
+
|
| 32 |
+
In this section, we provide an overview of our proposed method. We then explain the LoRA tuning procedure in detail. Last, we introduce the procedure of our LoraHub learning, which consists of the COMPOSE stage and the ADAPT stage.
|
| 33 |
+
|
| 34 |
+
# 3.1 Method Overview
|
| 35 |
+
|
| 36 |
+
As depicted in Figure 2, we initially train LoRA modules on a variety of upstream tasks. Specifically, for $N$ distinct upstream tasks, we separately train $N$ LoRA modules, each represented as $m _ { i }$ for task $\mathscr { T } _ { i } \in \mathbf { \hat { T } }$ . Subsequently, for a new task $\mathcal { T } ^ { \prime } \notin \mathbb { T } ,$ , such as Boolean Expressions represented in Figure 2, its examples $Q$ are utilized to steer the LoraHub learning process. The LoraHub learning encapsulates two main phases: the COMPOSE phase and the ADAPT phase. In the COMPOSE phase, all available LoRA modules are combined into a single integrated module $\hat { m } _ { - }$ , using $\left\{ w _ { 1 } , w _ { 2 } , \dots , w _ { N } \right\}$ as coefficients. Each $w _ { i }$ is a scalar value that can take on positive or negative values, and the combination can be done in different ways. During the ADAPT phase, the combined LoRA module $\hat { m }$ is amalgamated with the LLM $M _ { \theta }$ , and its performance on few-shot examples from the new task $\mathbf { \breve { { \mathbf { \nabla } } } } _ { \mathbf { \mathbf { \mathbf { \mathbf { \mathcal { T } } } } } ^ { \prime } }$ is assessed. A gradient-free algorithm is subsequently deployed to update $w _ { . }$ , enhancing mˆ ’s performance (e.g., loss) on the few-shot examples $Q$ . Finally, after iterating through $K$ steps, the optimum performing LoRA module is applied to the LLM $M _ { \theta }$ , yielding the final LLM $M _ { \phi } = \mathrm { L o R A } ( \hat { M } _ { \theta } , \hat { m } )$ . This serves as an effectively adjusted model for the unseen task $\tau ^ { \prime }$ , which will then be deployed and not updated anymore.
|
| 37 |
+
|
| 38 |
+
# 3.2 LoRA tuning on upstream tasks
|
| 39 |
+
|
| 40 |
+
LoRA effectively minimizes the number of trainable parameters through the process of decomposing the attention weight matrix update of the LLM, denoted as $W _ { 0 } \in \bar { R } ^ { d \times k } ,$ , into low-rank matrices. In more specific terms, LoRA exhibits the updated weight matrix in the form $W _ { 0 } + \delta W = W _ { 0 } + A B ,$ where $A \in \mathbb { R } ^ { d \times r }$ and $B \in \mathbb { R } ^ { r \times k }$ are trainable low-rank matrices with rank $r ,$ a dimension significantly smaller than those of $d$ and $k$ . In this context, the product $A B$ defines the LoRA module $m ,$ , as previously elaborated. By leveraging the low-rank decomposition, LoRA substantially reduces the number of trainable parameters needed to adapt the weights of LLMs duriing fine-tuning.
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 2: Our method encompasses two stages: the COMPOSE stage and the ADAPT stage. During the COMPOSE stage, existing LoRA modules are integrated into one unified module, employing a set of coefficients, denoted as $w$ . In the ADAPT stage, the combined LoRA module is evaluated on a few examples from the unseen task. Subsequently, a gradient-free algorithm is applied to refine $w$ . After executing $K$ iterations, a highly adapted combined LoRA module is produced, which can be incorporated with the LLM to perform the intended task.
|
| 44 |
+
|
| 45 |
+
# 3.3 COMPOSE: Element-wise composition of LoRA modules
|
| 46 |
+
|
| 47 |
+
Within the COMPOSE stage, we implement an element-wise method to combine LoRA modules. This process integrates the corresponding parameters of the LoRA modules, requiring the modules being combined to have the same rank $r$ to properly align the structures. Given that $m _ { i } = A _ { i } B _ { i } ,$ the combined LoRA module $\hat { m }$ can be obtained by:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\hat { m } = ( w _ { 1 } A _ { 1 } + w _ { 2 } A _ { 2 } + \cdot \cdot \cdot + w _ { N } A _ { N } ) ( w _ { 1 } B _ { 1 } + w _ { 2 } B _ { 2 } + \cdot \cdot \cdot + w _ { N } B _ { N } ) .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
Notbly, as we show in Sec. 5, combining too many LoRA modules at once can expand the search space exponentially, which may destabilize the LoraHub learning process and prevent optimal performance. To mitigate this, we employ random selection to prune the candidate space, and more advanced pre-filtering algorithms could be explored in the future.
|
| 54 |
+
|
| 55 |
+
# 3.4 ADAPT: Weight optimization via gradient-free methods
|
| 56 |
+
|
| 57 |
+
During the ADAPT stage, our goal is to modify the coefficients $w$ to boost the model’s performace on the examples from an unseen task. One might think of using gradient descent to optimize $w ,$ following standard backpropagation methods. However, this approach demands constructing a hypernetwork for all LoRA modules, similar to differentiable architecture search methods (Zhang et al., 2019). Constructing these hypernetworks demands for substantial GPU memory and time, posing a challenge. Given that $w$ consists of a relatively small number of parameters, we opted for gradient-free methods for optimization instead of gradient descent.
|
| 58 |
+
|
| 59 |
+
Inspired by previous work (Sun et al., 2022), we utilize a black-box optimization technique to find the optimal $w$ . The optimization process is steered by the cross-entropy loss, setting the goal to locate the best set $\left\{ w _ { 1 } , w _ { 2 } , \ldots , w _ { N } \right\}$ that reduces the loss $L$ on the few-shot examples $Q$ . Furthermore, we incorporate L1 regularization to penalize the sum of the absolute values of $w _ { . }$ , helping to prevent obtaining extreme values. Consequently, the final objective of LoraHub is to minimize $\begin{array} { r } { L + \alpha \cdot \sum _ { i = 1 } ^ { N } | \dot { w } _ { i } | , } \end{array}$ , where $\alpha$ serves as a hyperparameter.
|
| 60 |
+
|
| 61 |
+
In terms of the gradient-free method, we leverage Shiwa, a combinatorial optimization approach (Liu et al., 2020). Shiwa offers a variety of algorithms and chooses the most suitable optimization algorithm for different circumstances. In most of the forthcoming experimental setups, we primarily employ the Covariance Matrix Adaptive Evolution Strategies (CMA-ES) (Hansen & Ostermeier, 1996). CMA-ES, as a stochastic and population-based optimization algorithm, offers versatility in addressing a broad spectrum of optimization challenges. It dynamically adjusts a search distribution, which is defined by a covariance matrix. During each iteration, CMA-ES systematically updates both the mean and covariance of this distribution to optimize the target function. In our application, we employ this algorithm to mold the search space for w. Ultimately, we use it to identify the optimal $w$ by evaluating their performance on the few-shot examples from an unseen task.
|
| 62 |
+
|
| 63 |
+
# 4 Experimental Results
|
| 64 |
+
|
| 65 |
+
In this section, we provide details on our main experiments. First, we give an overview of the experimental setup and implementation details. Next, we present our findings along with the results.
|
| 66 |
+
|
| 67 |
+
# 4.1 Experimental setup
|
| 68 |
+
|
| 69 |
+
Large Language Model In our main experiments, we employ FLAN-T5 (Chung et al., 2022), particularly FLAN-T5-large, as the base LLM. The model has shown impressive abilities to perform zero-shot and few-shot learning.
|
| 70 |
+
|
| 71 |
+
Candidate LoRA Modules Our methodology requires a compendium of LoRA modules trained on preceding tasks. For parity with FLAN, we adopt the tasks utilized to instruct FLAN-T5, thereby incorporating nearly 200 distinct tasks and their corresponding instructions. Following this, we trained several LoRA modules as potential candidates. During each experimental sequence, we randomly select 20 LoRA modules from them as the candidate for our LoraHub learning.
|
| 72 |
+
|
| 73 |
+
Dataset and evaluation Our method is evaluated using the Big-Bench Hard (BBH) benchmark, a well-established standard that consists of multiple-choice questions from a variety of domains. The benchmark consists of 27 different tasks, which are regarded to be challenging for language models. For all tasks, we employ the exact match (EM) as our evaluation metric.
|
| 74 |
+
|
| 75 |
+
Baseline Setup To enhance the demonstration of our method’s performance, we expanded our comparisons beyond the zero-shot and in-context learning settings. We specifically chose three representative gradient-based methods for comparison: full fine-tuning (FFT), LoRA tuning (LoRA) (Hu et al., 2022), and IA3 fine-tuning (IA3) (Liu et al., 2022). For all gradient-based methods, for a fair comparsion, we train for 40 epochs on the same three runs of 5 examples employed in our methods. In the case of FFT, a learning rate of 3e-5 is employed, whereas for IA3 and LoRA, we adopt a learning rate of 2e-4. We report the performance of each method on the test set at the end of training (averaged over three runs) without any model selection to avoid potential selection bias.
|
| 76 |
+
|
| 77 |
+
# 4.2 Main results
|
| 78 |
+
|
| 79 |
+
As shown in Table 1, our experimental results demonstarte the superior efficacy of our method in comparison to zero-shot learning while closely resembling the performance of in-context learning (ICL) in few-shot scenarios. This observation is derived from an average performance of three runs, each leveraging different few-shot examples. Importantly, our model utilizes an equivalent number of tokens as the zero-shot method, notably fewer than the count used by ICL. Although occasional performance fluctuations, our method consistently outperforms zero-shot learning in most tasks. In the era of LLMs, the input length is directly proportional to the inference cost, and thus LoraHub’s ability to economize on input tokens while approaching the peak performance grows increasingly significant. Moreover, as shown in Appendix Table 4, the upper bound performance of our method across these runs can surpass ICL on 18 tasks, demonstrating its potential for future development.
|
| 80 |
+
|
| 81 |
+
Table 1: Experimental results of zero-shot learning (Zero), few-shot in-context learning (ICL), IA3 fine-tuning (IA3), LoRA tuning (LoRA), full fine-tuning (FFT) and our proposed few-shot LoraHub learning (LoraHub) on the BBH benchmark with FLAN-T5-large as the base LLM. We denote algorithmic tasks with the superscript $\ S$ following previous work (Wu et al., 2023b). Note that we employ three runs, each leveraging different 5-shot examples per task, as demonstrations for all few-shot methods. The average performance of all methods is reported below, and the best performance of each few-shot method can be found in the Appendix B.
|
| 82 |
+
|
| 83 |
+
<table><tr><td>Task</td><td>Zero</td><td>ICLavg</td><td>IA3avg</td><td>LoRAavg</td><td>FFTavg</td><td>LoraHubavg</td></tr><tr><td>Boolean Expressions</td><td>54.0</td><td>59.6</td><td>56.2</td><td>56.0</td><td>62.2</td><td>55.5</td></tr><tr><td>Causal Judgement</td><td>57.5</td><td>59.4</td><td>60.2</td><td>55.6</td><td>57.5</td><td>54.3</td></tr><tr><td>Date Understanding</td><td>15.3</td><td>20.4</td><td>20.0</td><td>35.8</td><td>59.3</td><td>32.9</td></tr><tr><td>Disambiguation</td><td>0.0</td><td>69.1</td><td>0.0</td><td>68.0</td><td>68.2</td><td>45.2</td></tr><tr><td>Dyck Languages</td><td>1.3</td><td>0.9</td><td>4.2</td><td>22.2</td><td>19.5</td><td>1.0</td></tr><tr><td>Formal Fallacies</td><td>51.3</td><td>55.3</td><td>51.5</td><td>53.6</td><td>54.0</td><td>52.8</td></tr><tr><td>Geometric Shapes</td><td>6.7</td><td>19.6</td><td>14.7</td><td>24</td><td>31.1</td><td>7.4</td></tr><tr><td>Hyperbaton</td><td>6.7</td><td>71.8</td><td>49.3</td><td>55.3</td><td>77.3</td><td>62.8</td></tr><tr><td>Logical DeductionS (five objects)</td><td>21.3</td><td>39.1</td><td>32.7</td><td>40.0</td><td>42.2</td><td>36.1</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>12.7</td><td>40.7</td><td>33.8</td><td>37.3</td><td>44.9</td><td>36.8</td></tr><tr><td>Logical DeductionS (three objects)</td><td>0.0</td><td>51.6</td><td>8.5</td><td>53.6</td><td>52.9</td><td>45.7</td></tr><tr><td>Movie Recommendation</td><td>62.7</td><td>55.8</td><td>61.8</td><td>51.5</td><td>66.0</td><td>55.3</td></tr><tr><td>Multistep Arithmetic</td><td>0.7</td><td>0.7</td><td>0.7</td><td>0.2</td><td>0.0</td><td>0.4</td></tr><tr><td>Navigate</td><td>47.3</td><td>45.3</td><td>46.2</td><td>48.0</td><td>48.0</td><td>47.1</td></tr><tr><td>Object Counting</td><td>34.7</td><td>32.4</td><td>35.1</td><td>38.7</td><td>35.6</td><td>33.7</td></tr><tr><td>Penguins in a Table</td><td>43.5</td><td>41.3</td><td>45.0</td><td>36.2</td><td>31.9</td><td>35.9</td></tr><tr><td>Reasoning about Colored Objects</td><td>32.0</td><td>40.2</td><td>40.7</td><td>39.6</td><td>37.6</td><td>40.0</td></tr><tr><td>Ruin Names</td><td>23.3</td><td>19.3</td><td>24.4</td><td>37.8</td><td>61.3</td><td>24.4</td></tr><tr><td>Salient Translation Error Detection</td><td>37.3</td><td>47.3</td><td>37.1</td><td>16.0</td><td>16.2</td><td>36.0</td></tr><tr><td>Snarks</td><td>50.0</td><td>54.2</td><td>53.9</td><td>55.6</td><td>66.7</td><td>56.9</td></tr><tr><td>Sports Understanding</td><td>56.0</td><td>54.7</td><td>55.1</td><td>56.5</td><td>54.0</td><td>56.7</td></tr><tr><td> Temporal Sequences</td><td>16.7</td><td>25.1</td><td>18.2</td><td>25.1</td><td>37.8</td><td>18.2</td></tr><tr><td>Tracking Shuffled ObjectsS (five objects)</td><td>12.0</td><td>12.0</td><td>12.0</td><td>13.8</td><td>16.9</td><td>12.3</td></tr><tr><td>Tracking Shuffled Objects (seven objects)</td><td>6.7</td><td>6.7</td><td>6.7</td><td>10.0</td><td>9.8</td><td>7.7</td></tr><tr><td>Tracking Shuffled ObjectsS (three objects)</td><td>24.7</td><td>31.1</td><td>30.7</td><td>30.9</td><td>32.0</td><td>29.2</td></tr><tr><td>Web of Lies</td><td>54.0</td><td>53.8</td><td>54.2</td><td>52.7</td><td>48.2</td><td>50.1</td></tr><tr><td>Word Sorting</td><td>1.3</td><td>0.5</td><td>1.3</td><td>4.9</td><td>4.9</td><td>1.1</td></tr><tr><td>Avg Performance Per Task</td><td>27.0</td><td>37.3</td><td>31.6</td><td>37.7</td><td>42.1</td><td>34.7</td></tr><tr><td>Avg Tokens Per Example</td><td>111.6</td><td>597.8</td><td>111.6</td><td>111.6</td><td>111.6</td><td>111.6</td></tr><tr><td>Gradient-based Training</td><td>No</td><td>No</td><td>Yes</td><td>Yes</td><td>Yes</td><td>No</td></tr></table>
|
| 84 |
+
|
| 85 |
+
Even when compared to certain gradient-based optimization methods, our approach consistently demonstrates competitive performance. For example, as depicted in Table 1, our method exhibits a notable improvement of $3 . 1 \%$ on average in contrast to the promising IA3 method. Nevertheless, we acknowledge that our approach still falls behind LoRA tuning and full fine-tuning, especially in tasks that exhibit significant deviation from the upstream task. Taking Dyck Languages as an example, both LoraHub and ICL achieve only an average performance of nearly $1 . 0 \%$ on these tasks, while LoRA and FFT methods showcase impressive results with only 5 examples.
|
| 86 |
+
|
| 87 |
+
# 4.3 Discussion
|
| 88 |
+
|
| 89 |
+
LoraHub addresses the challenge of reducing inference costs by eliminating the need for processing additional tokens, resulting in a noticeable reduction in overall inference expenses. However, it introduces an inherent cost during the ADAPT stage, necessitating extra inference steps, such as the 40 steps employed in our experiments. This introduces a trade-off between choosing the ICL approach and LoraHub, with the decision typically hinging on the nature of the situation.
|
| 90 |
+
|
| 91 |
+
For one-time ad-hoc tasks, the ICL approach should be more pragmatic due to LoraHub’s additional inference step costs. In such scenarios, where immediate, single-use solutions are preferred, the simplicity and efficiency of ICL might outweigh the benefits of potential savings offered by LoraHub. Conversely, for recurring or similar tasks, LoraHub emerges as a compelling option. Despite the added inference step cost, LoraHub’s ability to efficiently handle repetitive tasks, often occurring thousands of times, while concurrently reducing overall expenses, positions it as a viable option in such kind of situations.
|
| 92 |
+
|
| 93 |
+
In summary, our intention is not to replace $\scriptstyle { \mathrm { I C L } } ,$ but to present LoraHub as a complementary strategy with performance-efficiency trade-offs. Thus, we encourage a careful consideration of specific use cases and requirements when choosing between ICL and LoraHub, recognizing that the optimal solution may vary based on the nature and frequency of the tasks at hand.
|
| 94 |
+
|
| 95 |
+
# 5 Experimental Analysis
|
| 96 |
+
|
| 97 |
+
In this section, we thoroughly examine the characteristics of our proposed method and uncover several insightful findings. If not specified, we use FLAN-T5-large for all analysis.
|
| 98 |
+
|
| 99 |
+
Does composing LoRA modules extend beyond the single module’s benefits?
|
| 100 |
+
|
| 101 |
+
We acknowledge the investigation of cross-task performance in prior work (Jang et al., 2023), which delved into the capabilities of LoRA and proposed a novel method centered around LoRA module retrieval. In order to ensure a fair comparison, we conducted an experiment where we
|
| 102 |
+
|
| 103 |
+
Table 2: The average performance of various methods across all tasks in the benchmark BBH.
|
| 104 |
+
|
| 105 |
+
<table><tr><td>LoRA Retrieval</td><td>LoraHub avg</td><td>LoraHub best</td></tr><tr><td>31.7</td><td>34.7</td><td>41.2</td></tr></table>
|
| 106 |
+
|
| 107 |
+
designed a LoRA retrieval mechanism based on the loss derived from few-shot examples. Specifically, we ranked all LoRA module candidates according to this loss and evaluated the best candidate on the test set of the unseen task. As depicted in Table 2, the performance of LoRA retrieval is notably impressive, positioning it as a strong baseline. However, in comparison to LoraHub, the performance of LoRA retrieval is relatively less favorable
|
| 108 |
+
|
| 109 |
+
How effective is the gradient-free optimization method?
|
| 110 |
+
|
| 111 |
+
To assess the effectiveness of our gradient-free optimization method in correctly identifying the most suitable LoRA module for a given downstream task, we carried out an empirical study using the WikiTableQuestions (Pasupat & Liang, 2015) (WTQ) dataset. We strategically included a LoRA module that was specifically trained on the WTQ dataset into our pool of LoRA candidate modules, which originally stemmed from tasks exclusive to the Flan Collection. Subsequently, we designated WTQ as the targeted downstream task and computed the weights consistent with the methods employed in LoraHub learning. As an end result, the WTQ-specific LoRA module was awarded the highest weight, exemplifying the algorithm’s success in recognizing it as the most relevant. Moreover, the combined LoRA module demonstrated marginal superiority over the WTQ LoRA module. This underscores the claim that the gradient-free optimization method has the ability to proficiently select the optimal upstream LoRA module for an unseen task.
|
| 112 |
+
|
| 113 |
+
Can LoraHub work well on non-instruction-tuning models?
|
| 114 |
+
|
| 115 |
+
In previous investigations, we primarily focused on models with zero-shot capabilities that were trained with instruction tuning. However, for models like T5 without zero-shot abilities, where training has a larger effect on parameters, it was unclear if LoraHub could still effectively manage and improve them. Our experiments show that although these models perform worse than FLAN-T5, LoraHub learning can still enable them to effectively generlize to unseen tasks. See Appendix C for more details.
|
| 116 |
+
|
| 117 |
+
Will the rank of LoRA modules impact the performance of LoraHub learning?
|
| 118 |
+
|
| 119 |
+
The parameter rank plays a crucial role in the LoRA framework, directly influencing the number of trainable parameters utilized during LoRA tuning. This prompts an intriguing question: does the variation in rank values influence the outcomes observed within the LoraHub learning? Our analysis indicates that, for FLAN-T5, the choice of rank has minimal impact. However, for T5, it still exerts some influence. Empirical findings reveal that, in comparison to rank values of 4 or 64, a rank value of 16 consistently demonstrates superior performance across different runs, both in terms of average and optimal values. Additional results are available in Appendix C.
|
| 120 |
+
|
| 121 |
+
Does more LoRA modules lead to better results?
|
| 122 |
+
|
| 123 |
+
In our main experiments, we randomly selected 20 LoRA modules for LoraHub learning. Therefore, we conducted experiments to investigate the effect of using different numbers of LoRA modules. The results demonstrate that as we increased the number of LoRA modules, the variance in performance increased. However, the maximum achievable performance also improved. More analysis on the variance and the detailed results can be found in Appendix H.
|
| 124 |
+
|
| 125 |
+
How much computational resource can be saved?
|
| 126 |
+
|
| 127 |
+
We follow to the memory test settings from the LoRA-FA (Zhang et al., 2023b) study for an accurate benchmark. In this context, full fine-tuning required about 40GB of memory, whereas LoRA fine-tuning used around 34GB. Remarkably, LoraHub only utilized about 5GB of memory, illustrating its efficiency due to the inference-only mode, which eliminates the need for storing gradients and optimization states.
|
| 128 |
+
|
| 129 |
+
# 6 Related work
|
| 130 |
+
|
| 131 |
+
Model Merging Our method substantially draws on the concept of LoRA module composition, and thus, aligns with the significant thread of research in model merging. This research focus is broadly categorized based on the ultimate objectives of model merging.
|
| 132 |
+
|
| 133 |
+
The first category focuses on merging entire models, and the goal is to combine individually trained models to approximate the performance benefits of model ensembling or multi-task learning. Prior works (Matena & Raffel, 2021; Jin et al., 2023; Yadav et al., 2023; Wu et al., 2023a) operated under the assumption of shared model architectures. For example, Matena & Raffel (2021) amalgamates models by approximating Gaussian posterior distributions garnered from Fisher information, while Yadav et al. (2023) merges models via resolving model interferences. Another approach is merging models with different architectures. For instance, Ainsworth et al. (2023) configures weights of different models prior to their merger. Following this objective, Stoica et al. (2023) merges models operating on varying tasks by identifying common features, without requiring additional training. Unlike these works, our work focuses on merging models for better cross-task generalization.
|
| 134 |
+
|
| 135 |
+
The second category most closely aligns with our research, stemming from a shared motivation of module composition. Various scholars have made advances in this line of research: Kingetsu et al. (2021) decomposes and recomposes modules on the basis of their functionality; Ilharco et al. (2023) proposes modulating model behavior using task vectors; Lv et al. (2023) amalgamates parameter-efficient modules weighted according to task similarity; Zhang et al. (2023a) crafts modules by employing specific arithmetic operations; Sun et al. (2023) improves few-shot performance of unseen tasks by multi-task pre-training of prompts; Chronopoulou et al. (2023) averages adapter weights intended for transfer; Ponti et al. (2023) focuses on jointly learning adapters and a routing function that allocates skills to each task; and Muqeeth et al. (2023) concentrates on amalgamating experts in mixture of experts models; However, these methods generally necessitate multi-task training or human prior on module selection for the downstream task. In contrast, our method does not impose any special training requirements and simply employs vanilla LoRA tuning. Additionally, the module selection for downstream tasks is entirely data-driven without human prior knowledge. This design gives the advantage of easily adding new LoRA modules for reuse, allowing our method to flexibly scale up the number of LoRA module candidates in the future.
|
| 136 |
+
|
| 137 |
+
Mixture of Experts The Mixture of Experts (MoE) is an ensemble method, often visualized as a collection of sub-modules, or “experts”, each specializing in processing different types of input data. Each expert in this system is controlled by a unique gating network, activated based on the distinct nature of the input data. For every token in these input sequences, this network identifies and engages the most suitable experts to process the data. As a result, the performance is superior compared to relying on a single, generic model for all types of input. This technique has proven instrumental in numerous domains, such as natural language processing and computer vision (Jacobs et al., 1991; Shazeer et al., 2017; Du et al., 2022; Zhang et al., 2022; Wang et al., 2022; crumb, 2023). Our methodology displays similarities to MoE, wherein upstream-trained LoRA modules can be aligned with MoE’s expert design. A noteworthy distinguishing factor is that our approach mechanism does not require any specialized manipulation of LoRAs during training while facilitating dynamic LoRA module assembly at any scale, each pre-tuned to different tasks. In contrast, MoE mandates a predetermined count of experts during both the training and testing phases. Recent studies on the interrelation between MoE and instruction tuning have demonstrated that the simultaneous application of both approaches enhances the effectiveness of each individually (Shen et al., 2023).
|
| 138 |
+
|
| 139 |
+
Cross-Task generalization Recent advancements like CrossFit (Ye et al., 2021), ExT5 (Aribandi et al., 2022), FLAN (Wei et al., 2022), T0 (Sanh et al., 2022), InstructGPT (Ouyang et al., 2022), and ReCross (Lin et al., 2022) have been striving to foster a vastly multi-task model’s generalization across different tasks, very much aligned with the objectives of our research. Among this cohort, the connections of CrossFit and ReCross with LoraHub are particularly noteworthy. The CrossFit framework (Ye et al., 2021) mandates a minimal number of labeled examples of the target task for few-shot fine-tuning. However, its limitation lies in the application of task names as hard prefixes in templates, posing challenges in the task’s generalization. On the other hand, while ReCross mitigates the need for labels in few-shot examples for retrieval, it necessitates a fine-tuning process using the retrieved data. This procedure appears time-consuming when compared to LoraHub’s approach. Through the deployment of few-shot labeled examples and a gradientfree optimization process, LoraHub facilitates an iterative update of weights to compose the LoRA modules. The resultant method is more efficient and cost-effective relative to previous work. Overall, LoraHub offers a more practical and viable solution to the optimization process.
|
| 140 |
+
|
| 141 |
+
# 7 Conclusion
|
| 142 |
+
|
| 143 |
+
In this work, we have introduced LoraHub, a strategic framework for composing LoRA modules trained on diverse tasks in order to achieve adaptable performance on new tasks. Our approach enables the fluid combination of multiple LoRA modules using just a few examples from a novel task, without requiring additional model parameters or human expertise. The empirical results on the BBH benchmark demonstrate that LoraHub can effectively match the performance of in-context learning in few-shot scenarios, removing the need for in-context examples during inference. Overall, our work shows the promise of strategic LoRA composability for rapidly adapting LLMs to diverse tasks. By fostering reuse and combination of LoRA modules, we can work towards more general and adaptable LLMs while minimizing training costs.
|
| 144 |
+
|
| 145 |
+
# Reproducibility Statement
|
| 146 |
+
|
| 147 |
+
The authors have made great efforts to ensure the reproducibility of the empirical results reported in this paper. Firstly, the experiment settings, evaluation metrics, and datasets were described in detail in Section 4.1. Secondly, the codes and script for reproduce the result will be opensource after accepted. Second, the source code implementing the proposed method and experiments will be made publicly available at upon acceptance of the paper. Third, pre-trained LoRA modules from this work along with their configuration files and weights will be shared. These allow reproduction without retraining the LoRA modules, enabling quick testing and verification.
|
| 148 |
+
|
| 149 |
+
# References
|
| 150 |
+
|
| 151 |
+
Samuel Ainsworth, Jonathan Hayase, and Siddhartha Srinivasa. Git re-basin: Merging models modulo permutation symmetries. In The Eleventh International Conference on Learning Representations, 2023.
|
| 152 |
+
Shengnan An, Yifei Li, Zeqi Lin, Qian Liu, Bei Chen, Qiang Fu, Weizhu Chen, Nanning Zheng, and Jian-Guang Lou. Input-tuning: Adapting unfamiliar inputs to frozen pretrained models. ArXiv preprint, 2022.
|
| 153 |
+
Vamsi Aribandi, Yi Tay, Tal Schuster, Jinfeng Rao, Huaixiu Steven Zheng, Sanket Vaibhav Mehta, Honglei Zhuang, Vinh Q. Tran, Dara Bahri, Jianmo Ni, Jai Prakash Gupta, Kai Hui, Sebastian Ruder, and Donald Metzler. Ext5: Towards extreme multi-task scaling for transfer learning. In Proc. of ICLR, 2022.
|
| 154 |
+
Stephen Bach, Victor Sanh, Zheng Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-david, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Fries, Maged Al-shaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Dragomir Radev, Mike Tian-jian Jiang, and Alexander Rush. PromptSource: An integrated development environment and repository for natural language prompts. In Proc. of ACL, 2022.
|
| 155 |
+
Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, MariaFlorina Balcan, and Hsuan-Tien Lin (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
|
| 156 |
+
|
| 157 |
+
Alexis Chevalier, Alexander Wettig, Anirudh Ajith, and Danqi Chen. Adapting language models to compress contexts. CoRR, abs/2305.14788, 2023. doi: 10.48550/ARXIV.2305. 14788. URL https://doi.org/10.48550/arXiv.2305.14788.
|
| 158 |
+
|
| 159 |
+
Alexandra Chronopoulou, Matthew Peters, Alexander Fraser, and Jesse Dodge. AdapterSoup: Weight averaging to improve generalization of pretrained language models. In Findings of the Association for Computational Linguistics: EACL 2023, 2023.
|
| 160 |
+
|
| 161 |
+
Hyung Won Chung, Le Hou, S. Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Wei Yu, Vincent Zhao, Yanping Huang, Andrew M. Dai, Hongkun Yu, Slav Petrov, Ed Huai hsin Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. Scaling instruction-finetuned language models. ArXiv preprint, 2022.
|
| 162 |
+
crumb. Llama-2, mixutre of lora. https://crumbly.medium.com/ llama-2-molora-f5f909434711, 2023.
|
| 163 |
+
Nan Du, Yanping Huang, Andrew M. Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan Firat, Barret Zoph, Liam Fedus, Maarten P. Bosma, Zongwei Zhou, Tao Wang, Yu Emma Wang, Kellie Webster, Marie Pellat, Kevin Robinson, Kathleen S. Meier-Hellstern, Toju Duke, Lucas Dixon, Kun Zhang, Quoc V. Le, Yonghui Wu, Zhifeng Chen, and Claire Cui. Glam: Efficient scaling of language models with mixture-of-experts. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), ´ International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, Proceedings of Machine Learning Research, 2022.
|
| 164 |
+
Tao Ge, Jing Hu, Xun Wang, Si-Qing Chen, and Furu Wei. In-context autoencoder for context compression in a large language model. CoRR, abs/2307.06945, 2023. doi: 10. 48550/ARXIV.2307.06945. URL https://doi.org/10.48550/arXiv.2307.06945.
|
| 165 |
+
Aryo Pradipta Gema, Luke Daines, Pasquale Minervini, and Beatrice Alex. Parameterefficient fine-tuning of llama for the clinical domain. ArXiv preprint, 2023.
|
| 166 |
+
Nikolaus Hansen and Andreas Ostermeier. Adapting arbitrary normal mutation distributions in evolution strategies: the covariance matrix adaptation. Proceedings of IEEE International Conference on Evolutionary Computation, 1996.
|
| 167 |
+
Junxian He, Chunting Zhou, Xuezhe Ma, Taylor Berg-Kirkpatrick, and Graham Neubig. Towards a unified view of parameter-efficient transfer learning. In Proc. of ICLR, 2022.
|
| 168 |
+
Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. In Proc. of ICLR, 2022.
|
| 169 |
+
Gabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Ludwig Schmidt, Hannaneh Hajishirzi, and Ali Farhadi. Editing models with task arithmetic. In The Eleventh International Conference on Learning Representations, 2023.
|
| 170 |
+
Robert A. Jacobs, Michael I. Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. Adaptive mixtures of local experts. Neural Computation, 1991.
|
| 171 |
+
Joel Jang, Seungone Kim, Seonghyeon Ye, Doyoung Kim, Lajanugen Logeswaran, Moontae Lee, Kyungjae Lee, and Minjoon Seo. Exploring the benefits of training expert language models over instruction tuning. In International Conference on Machine Learning, 2023. URL https://api.semanticscholar.org/CorpusID:256627673.
|
| 172 |
+
Huiqiang Jiang, Qianhui Wu, Chin-Yew Lin, Yuqing Yang, and Lili Qiu. Llmlingua: Compressing prompts for accelerated inference of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, December 2023a. URL https://arxiv.org/abs/2310.05736.
|
| 173 |
+
|
| 174 |
+
Huiqiang Jiang, Qianhui Wu, Xufang Luo, Dongsheng Li, Chin-Yew Lin, Yuqing Yang, and Lili Qiu. Longllmlingua: Accelerating and enhancing llms in long context scenarios via prompt compression. CoRR, abs/2310.06839, 2023b. doi: 10.48550/ARXIV.2310.06839. URL https://doi.org/10.48550/arXiv.2310.06839.
|
| 175 |
+
|
| 176 |
+
Xisen Jin, Xiang Ren, Daniel Preotiuc-Pietro, and Pengxiang Cheng. Dataless knowledge fusion by merging weights of language models. In The Eleventh International Conference on Learning Representations, 2023.
|
| 177 |
+
Hiroaki Kingetsu, Kenichi Kobayashi, and Taiji Suzuki. Neural network module decomposition and recomposition. ArXiv preprint, 2021.
|
| 178 |
+
Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In Proc. of EMNLP, 2021.
|
| 179 |
+
Yucheng Li, Bo Dong, Chenghua Lin, and Frank Guerin. Compressing context to enhance inference efficiency of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, December 2023. URL https://arxiv.org/abs/2310.06201.
|
| 180 |
+
Bill Yuchen Lin, Kangmin Tan, Chris Miller, Beiwen Tian, and Xiang Ren. Unsupervised cross-task generalization via retrieval augmentation. In NeurIPS, 2022.
|
| 181 |
+
Haokun Liu, Derek Tam, Mohammed Muqeeth, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin Raffel. Few-shot parameter-efficient fine-tuning is better and cheaper than incontext learning. ArXiv, abs/2205.05638, 2022. URL https://api.semanticscholar.org/ CorpusID:248693283.
|
| 182 |
+
Jialin Liu, A. Moreau, Mike Preuss, Baptiste Roziere, J \` er´ emy Rapin, Fabien Teytaud, and ´ Olivier Teytaud. Versatile black-box optimization. Proceedings of the 2020 Genetic and Evolutionary Computation Conference, 2020.
|
| 183 |
+
Shayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V. Le, Barret Zoph, Jason Wei, and Adam Roberts. The flan collection: Designing data and methods for effective instruction tuning, 2023.
|
| 184 |
+
Xingtai Lv, Ning Ding, Yujia Qin, Zhiyuan Liu, and Maosong Sun. Parameter-efficient weight ensembling facilitates task-level knowledge transfer. In Annual Meeting of the Association for Computational Linguistics, 2023.
|
| 185 |
+
Sourab Mangrulkar, Sylvain Gugger, Lysandre Debut, Younes Belkada, and Sayak Paul. Peft: State-of-the-art parameter-efficient fine-tuning methods. https://github.com/ huggingface/peft, 2022.
|
| 186 |
+
Michael Matena and Colin Raffel. Merging models with fisher-weighted averaging. ArXiv preprint, 2021.
|
| 187 |
+
Sewon Min, Mike Lewis, Luke Zettlemoyer, and Hannaneh Hajishirzi. MetaICL: Learning to learn in context. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2022.
|
| 188 |
+
Swaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. Cross-task generalization via natural language crowdsourcing instructions. In Proc. of ACL, 2022.
|
| 189 |
+
Mohammed Muqeeth, Haokun Liu, and Colin Raffel. Soft merging of experts with adaptive routing. ArXiv preprint, 2023.
|
| 190 |
+
OpenAI. ChatGPT. 2022. URL https://openai.com/blog/chatgpt.
|
| 191 |
+
Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke E. Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Francis Christiano, Jan Leike, and Ryan J. Lowe. Training language models to follow instructions with human feedback. ArXiv preprint, 2022.
|
| 192 |
+
|
| 193 |
+
Panupong Pasupat and Percy Liang. Compositional semantic parsing on semi-structured tables. In Proc. of ACL, 2015.
|
| 194 |
+
|
| 195 |
+
Edoardo Maria Ponti, Alessandro Sordoni, Yoshua Bengio, and Siva Reddy. Combining parameter-efficient modules for task-level generalisation. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, 2023.
|
| 196 |
+
|
| 197 |
+
Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 2020.
|
| 198 |
+
|
| 199 |
+
J. Rapin and O. Teytaud. Nevergrad - A gradient-free optimization platform. https:// GitHub.com/FacebookResearch/Nevergrad, 2018.
|
| 200 |
+
|
| 201 |
+
Victor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal V. Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Teven Le Scao, Stella Biderman, Leo Gao, ´ Thomas Wolf, and Alexander M. Rush. Multitask prompted training enables zero-shot task generalization. In Proc. of ICLR, 2022.
|
| 202 |
+
|
| 203 |
+
Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc V. Le, Geoffrey E. Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixtureof-experts layer. In Proc. of ICLR, 2017.
|
| 204 |
+
|
| 205 |
+
Sheng Shen, Le Hou, Yanqi Zhou, Nan Du, Shayne Longpre, Jason Wei, Hyung Won Chung, Barret Zoph, William Fedus, Xinyun Chen, Tu Vu, Yuexin Wu, Wuyang Chen, Albert Webson, Yunxuan Li, Vincent Zhao, Hongkun Yu, Kurt Keutzer, Trevor Darrell, and Denny Zhou. Mixture-of-experts meets instruction tuning:a winning combination for large language models, 2023.
|
| 206 |
+
|
| 207 |
+
George Stoica, Daniel Bolya, Jakob Bjorner, Taylor Hearn, and Judy Hoffman. Zipit! merging models from different tasks without training. arXiv, 2023.
|
| 208 |
+
|
| 209 |
+
Tianxiang Sun, Yunfan Shao, Hong Qian, Xuanjing Huang, and Xipeng Qiu. Black-box tuning for language-model-as-a-service. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), ´ International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, Proceedings of Machine Learning Research, 2022.
|
| 210 |
+
|
| 211 |
+
Tianxiang Sun, Zhengfu He, Qin Zhu, Xipeng Qiu, and Xuanjing Huang. Multitask pretraining of modular prompt for Chinese few-shot learning. In Proc. of ACL, 2023.
|
| 212 |
+
|
| 213 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozi ´ ere, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien \` Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models. ArXiv preprint, 2023.
|
| 214 |
+
|
| 215 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett (eds.), Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, 2017.
|
| 216 |
+
|
| 217 |
+
Yaqing Wang, Sahaj Agarwal, Subhabrata Mukherjee, Xiaodong Liu, Jing Gao, Ahmed Hassan Awadallah, and Jianfeng Gao. AdaMix: Mixture-of-adaptations for parameter-efficient model tuning. In Proc. of EMNLP, 2022.
|
| 218 |
+
|
| 219 |
+
Jason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V. Le. Finetuned language models are zero-shot learners. In Proc. of ICLR, 2022.
|
| 220 |
+
Chengyue Wu, Teng Wang, Yixiao Ge, Zeyu Lu, Ruisong Zhou, Ying Shan, and Ping Luo. $\pi$ -tuning: Transferring multimodal foundation models with optimal multi-task interpolation. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pp. 37713–37727. PMLR, 2023a. URL https://proceedings.mlr. press/v202/wu23t.html.
|
| 221 |
+
Shijie Wu, Ozan Irsoy, Steven Lu, Vadim Dabravolski, Mark Dredze, Sebastian Gehrmann, Prabhanjan Kambadur, David S. Rosenberg, and Gideon Mann. Bloomberggpt: A large language model for finance. CoRR, abs/2303.17564, 2023b. doi: 10.48550/arXiv.2303. 17564. URL https://doi.org/10.48550/arXiv.2303.17564.
|
| 222 |
+
Prateek Yadav, Derek Tam, Leshem Choshen, Colin Raffel, and Mohit Bansal. TIESmerging: Resolving interference when merging models. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id= xtaX3WyCj1.
|
| 223 |
+
Qinyuan Ye, Bill Yuchen Lin, and Xiang Ren. CrossFit: A few-shot learning challenge for cross-task generalization in NLP. In Proc. of EMNLP, 2021.
|
| 224 |
+
Chris Zhang, Mengye Ren, and Raquel Urtasun. Graph hypernetworks for neural architecture search. In Proc. of ICLR, 2019.
|
| 225 |
+
Fan Zhang, Duyu Tang, Yong Dai, Cong Zhou, Shuangzhi Wu, and Shuming Shi. Skillnetnlu: A sparsely activated model for general-purpose natural language understanding, 2022.
|
| 226 |
+
Jinghan Zhang, Shiqi Chen, Junteng Liu, and Junxian He. Composing parameter-efficient modules with arithmetic operations. ArXiv preprint, 2023a.
|
| 227 |
+
Longteng Zhang, Lin Zhang, Shaohuai Shi, Xiaowen Chu, and Bo Li. Lora-fa: Memory-efficient low-rank adaptation for large language models fine-tuning. ArXiv, abs/2308.03303, 2023b. URL https://api.semanticscholar.org/CorpusID:260683267.
|
| 228 |
+
Wangchunshu Zhou, Yuchen Eleanor Jiang, Ryan Cotterell, and Mrinmaya Sachan. Efficient prompting via dynamic in-context learning. CoRR, abs/2305.11170, 2023. doi: 10.48550/ARXIV.2305.11170. URL https://doi.org/10.48550/arXiv.2305.11170.
|
| 229 |
+
|
| 230 |
+
Table 3: The top five beneficial LoRA modules for BBH tasks and their associated upstream tasks, the average weight values and the average performance on all BBH tasks.
|
| 231 |
+
|
| 232 |
+
<table><tr><td>Rank</td><td>Dataset: Task</td><td>Weight</td><td>Perf</td><td>Task Description</td></tr><tr><td>1</td><td>WIQA: Last Process</td><td>0.72</td><td>28.1</td><td> Identifying the last step of a given process.</td></tr><tr><td>2</td><td>RACE: Is this the Right Answer</td><td>0.68</td><td>30.8</td><td>Determining if given answer is correct.</td></tr><tr><td>3</td><td>WIQA: First Process</td><td>0.63</td><td>28.1</td><td> Identifying the first step of a given process.</td></tr><tr><td>4</td><td>AdversarialQA: BiDAF</td><td>0.61</td><td>25.1</td><td>Aserialmode-in-the-eby an</td></tr><tr><td>5</td><td>WebQuestions: What is the Answer</td><td>0.58</td><td>27.0</td><td> Asweringrqomesten based oninformation</td></tr></table>
|
| 233 |
+
|
| 234 |
+
# A More Analysis
|
| 235 |
+
|
| 236 |
+
Which LoRA modules are most effective for BBH tasks?
|
| 237 |
+
|
| 238 |
+
We hypothesized that the amalgamation of LoRA modules could incorporate skills and insights from a variety of specific tasks. To evaluate this, we examined the extent of influence a single LoRA module had amongst all tasks from the BBH benchmark. We measured the impact of each isolated task by calculating the average absolute weight. The top five modules, presented in Table 3, were found to have substantial influence, as indicated by their maximum average weights, which suggested that they were notably more effective in cross-task transfer. Remarkably, a common feature among these top five modules was their association with tasks requiring reading comprehension and reasoning skills—attributes indicative of higher cognitive complexity. However, it is worth noting that none of the modules exhibited consistent improvement across all BBH tasks, as reflected in their average performance on all BBH tasks, which did not show a significant improvement compared to the original FLAN-T5-large, except for the Rank 2. The results underscore the advantages of composing diverse modules in LoraHub.
|
| 239 |
+
|
| 240 |
+
How effective is the gradient-free optimization method?
|
| 241 |
+
|
| 242 |
+
To assess the effectiveness of our gradient-free optimization method in correctly identifying the most suitable LoRA module for a given downstream task, we carried out an empirical study using the WikiTableQuestions (Pasupat & Liang, 2015) (WTQ) dataset. We strategically included a LoRA module that was specifically trained on the WTQ dataset into our pool of LoRA candidate modules, which originally stemmed from tasks exclusive to the Flan Collection. Subsequently, we designated WTQ as the targeted downstream task and computed the weights consistent with the methods employed in LoraHub learning. As an end result, the WTQ-specific LoRA module was awarded the highest weight, exemplifying the algorithm’s success in recognizing it as the most relevant. Moreover, the combined LoRA module demonstrated marginal superiority over the WTQ LoRA module. This underscores the claim that the gradient-free optimization method has the ability to proficiently select the optimal upstream LoRA module for an unseen task.
|
| 243 |
+
|
| 244 |
+
# B Result of Best Results
|
| 245 |
+
|
| 246 |
+
As shown in Table 4, compared to gradient-based parameter-efficient training methods like LoRA and IA3, our approach demonstrates superior performance in terms of best results over experimental runs. While it exhibits a noticeable lag behind the fully fine-tuning (FFT) method, which updates all parameters during training, this observation suggests that our proposed method has a promising upper limit. We anticipate that future research efforts can contribute to accelerating the optimization speed and further enhancing the efficacy of our approach.
|
| 247 |
+
|
| 248 |
+
Table 4: Experimental results of several few-shot methods, including in-context learning (ICL), IA3 fine-tuning (IA3), LoRA tuning (LoRA), full fine-tuning (FFT) and our LoraHub learning (LoraHub) on the BBH benchmark with FLAN-T5-large as the base LLM. We denote algorithmic tasks with the superscript $\ S$ following previous work (Wu et al., 2023b). Note that we use 5 examples per task as the demonstration for all methods. The best (best) performance is reported as the maximum value obtained across three runs.
|
| 249 |
+
|
| 250 |
+
<table><tr><td>Task</td><td>ICLbest</td><td>IA3best</td><td>LoRAbest</td><td>FFTbest</td><td>LoraHubbest</td></tr><tr><td>Boolean Expressions</td><td>62.7</td><td>58.0</td><td>60.7</td><td>65.3</td><td>60.7</td></tr><tr><td>Causal Judgement</td><td>59.8</td><td>62.1</td><td>57.5</td><td>60.9</td><td>63.2</td></tr><tr><td>Date Understanding</td><td>21.3</td><td>20.7</td><td>40.7</td><td>67.3</td><td>45.3</td></tr><tr><td>Disambiguation</td><td>69.3</td><td>0.0</td><td>68.7</td><td>70.7</td><td>68.0</td></tr><tr><td>Dyck Languages</td><td>2.0</td><td>4.7</td><td>25.3</td><td>33.3</td><td>2.7</td></tr><tr><td>Formal Fallacies</td><td>59.3</td><td>52.0</td><td>56.7</td><td>56.0</td><td>59.3</td></tr><tr><td>Geometric Shapes</td><td>20.0</td><td>15.3</td><td>28.7</td><td>39.3</td><td>18.7</td></tr><tr><td>Hyperbaton</td><td>72.7</td><td>49.3</td><td>57.3</td><td>82.0</td><td>72.7</td></tr><tr><td>Logical DeductionS (five objects)</td><td>39.3</td><td>32.7</td><td>41.3</td><td>43.3</td><td>40.0</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>42.0</td><td>34.0</td><td>42.7</td><td>46.0</td><td>46.0</td></tr><tr><td>LogicalDrectjoets)</td><td>52.7</td><td>8.7</td><td>56.7</td><td>60.7</td><td>52.7</td></tr><tr><td>Movie Recommendation</td><td>56.7</td><td>62.0</td><td>64.5</td><td>70.7</td><td>62.0</td></tr><tr><td>Multistep Arithmetic</td><td>0.7</td><td>0.7</td><td>0.7</td><td>0.0</td><td>1.3</td></tr><tr><td>Navigate</td><td>46.7</td><td>47.3</td><td>50.7</td><td>50.0</td><td>51.3</td></tr><tr><td>Object Counting</td><td>34.7</td><td>35.3</td><td>42.0</td><td>38.0</td><td>36.7</td></tr><tr><td>Penguins in a Table</td><td>43.5</td><td>45.7</td><td>41.3</td><td>37.0</td><td>47.8</td></tr><tr><td>Reasoning about Colored Objects</td><td>41.3</td><td>41.3</td><td>40.7</td><td>38.7</td><td>44.7</td></tr><tr><td>Ruin Names</td><td>20.7</td><td>25.3</td><td>42.0</td><td>66.0</td><td>28.7</td></tr><tr><td>Salient Translation Error Detection</td><td>48.0</td><td>37.3</td><td>17.3</td><td>21.3</td><td>42.7</td></tr><tr><td>Snarks</td><td>55.1</td><td>56.4</td><td>59.0</td><td>69.2</td><td>61.5</td></tr><tr><td>Sports Understanding</td><td>56.7</td><td>55.3</td><td>58.7</td><td>58.7</td><td>62.7</td></tr><tr><td>Temporal Sequences</td><td>26.7</td><td>18.7</td><td>31.3</td><td>48.7</td><td>21.3</td></tr><tr><td>Tracking Shuffled ObjectsS (five objects)</td><td>12.0</td><td>12.0</td><td>16.0</td><td>20.0</td><td>16.7</td></tr><tr><td>Tracking Shuffled ObjectsS (seven objects)</td><td>6.7</td><td>6.7</td><td>12.0</td><td>10.0</td><td>15.3</td></tr><tr><td>Tracking Shuffled ObjectsS (three objects)</td><td>31.3</td><td>30.7</td><td>32.0</td><td>36.0</td><td>31.3</td></tr><tr><td>Web of Lies</td><td>54.0</td><td>54.7</td><td>55.3</td><td>54.0</td><td>57.3</td></tr><tr><td>Word Sorting</td><td>0.7</td><td>1.3</td><td>5.3</td><td>6.0</td><td>1.3</td></tr><tr><td>Best Performance (Average)</td><td>38.4</td><td>32.1</td><td>40.9</td><td>46.2</td><td>41.2</td></tr></table>
|
| 251 |
+
|
| 252 |
+
# C Result of non-instrcution-tuned models
|
| 253 |
+
|
| 254 |
+
Table 5: Comparsion among different ranks for few-shot LoraHub learning with the backbone T5-large (Raffel et al., 2020) on the BBH benchmark. Note that the T5-large model achieved $0 . { \bar { 0 } } \%$ on all tasks under the zero-shot setting except Dyck Languages, where it scored $0 . 6 7 \%$ .
|
| 255 |
+
|
| 256 |
+
<table><tr><td>Task ↓ Rank →</td><td></td><td>4best 4avg</td><td>16avg</td><td>16best</td><td>64avg</td><td>64best</td></tr><tr><td>Boolean Expressions</td><td></td><td>52.13 57.33</td><td>50.67</td><td>58.00</td><td>47.47</td><td>58.00</td></tr><tr><td>Causal Judgement</td><td>52.41</td><td>55.17</td><td>49.66</td><td>54.02</td><td>50.80</td><td>54.02</td></tr><tr><td>Date Understanding</td><td>0.40</td><td>2.00</td><td>14.40</td><td>29.33</td><td>4.53</td><td>10.00</td></tr><tr><td>Disambiguation</td><td>10.00</td><td>31.33</td><td>26.93</td><td>42.00</td><td>1.73</td><td>4.67</td></tr><tr><td>Dyck Languages</td><td>0.40</td><td>0.67</td><td>0.40</td><td>0.67</td><td>0.40</td><td>2.00</td></tr><tr><td>Formal Fallacies</td><td>48.40</td><td>54.00</td><td>46.93</td><td>51.33</td><td>46.93</td><td>50.00</td></tr><tr><td>Geometric Shapes</td><td>0.00</td><td>0.00</td><td>6.53</td><td>32.67</td><td>1.47</td><td>7.33</td></tr><tr><td>Hyperbaton</td><td>30.13</td><td>50.00</td><td>39.07</td><td> 57.33</td><td>32.93</td><td>48.00</td></tr><tr><td>Logical DeductionS (five objects)</td><td>5.20</td><td>14.67</td><td>8.80</td><td>19.33</td><td>1.33</td><td>6.67</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>6.40</td><td>17.33</td><td>9.33</td><td>19.33</td><td>3.47</td><td>16.00</td></tr><tr><td>Logical DeductionS</td><td>14.40</td><td>32.00</td><td>21.73</td><td>34.67</td><td>6.93</td><td>15.33</td></tr><tr><td>(three objects) Movie Recommendation</td><td>7.07</td><td>18.67</td><td>7.87</td><td>22.00</td><td>1.20</td><td>6.00</td></tr><tr><td>Multistep Arithmetic two</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>Navigate</td><td>49.60</td><td>54.67</td><td>52.27</td><td>56.67</td><td>49.87</td><td>52.00</td></tr><tr><td>Object Counting</td><td>7.20</td><td>18.00</td><td>16.00</td><td>21.33</td><td>13.73</td><td>26.67</td></tr><tr><td>Penguins ina Table</td><td>6.52</td><td>13.04</td><td>10.43</td><td>17.39</td><td>0.43</td><td>2.17</td></tr><tr><td>Reasoning about Colored Objects</td><td>6.27</td><td>10.00</td><td>5.07</td><td>16.67</td><td>0.53</td><td>2.67</td></tr><tr><td>Ruin Names</td><td>7.73</td><td>13.33</td><td>13.20</td><td>28.00</td><td>5.73</td><td>15.33</td></tr><tr><td>Salient Translation Error Detection</td><td>0.00</td><td>0.00</td><td>1.73</td><td>8.67</td><td>0.00</td><td>0.00</td></tr><tr><td>Snarks</td><td>21.28</td><td>42.31</td><td>49.49</td><td>60.26</td><td>16.15</td><td>38.46</td></tr><tr><td> Sports Understanding</td><td>46.53</td><td>58.67</td><td>46.80</td><td>58.67</td><td>46.53</td><td>58.67</td></tr><tr><td>Temporal Sequences</td><td>3.07</td><td>13.33</td><td>6.53</td><td>26.67</td><td>2.40</td><td>12.00</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>5.20</td><td>14.00</td><td>4.13</td><td>9.33</td><td>0.13</td><td>0.67</td></tr><tr><td>(five objects) Tracking Shuffled ObjectsS (seven objects)</td><td>2.67</td><td>10.00</td><td>2.80</td><td>14.00</td><td>3.20</td><td>8.00</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>3.73</td><td>17.33</td><td>16.27</td><td>34.67</td><td>5.87</td><td>26.67</td></tr><tr><td>(three objects) Web of Lies</td><td>48.53</td><td>54.00</td><td></td><td></td><td></td><td> 57.33</td></tr><tr><td>Word Sorting</td><td>0.40</td><td>0.67</td><td>54.00 0.13</td><td>56.00 0.67</td><td>54.67 0.00</td><td>0.00</td></tr><tr><td></td><td></td><td></td><td>20.78</td><td></td><td></td><td></td></tr><tr><td>Average Performance per Task</td><td>16.14</td><td>24.17</td><td></td><td>30.73</td><td>14.76</td><td>21.43</td></tr></table>
|
| 257 |
+
|
| 258 |
+
# D Result of larger model
|
| 259 |
+
|
| 260 |
+
Table 6: Experimental results of zero-shot learning (Zero) and our few-shot LoraHub learning (LoraHub) on the BBH benchmark with FLAN-T5-xl as the base LLM. Note that we use 5 examples per task as the demonstration for both ICL and LoraHub. The average $( a v g )$ performance of LoraHub is computed over 5 runs with different random seeds, while the best (best) performance is reported as the maximum value obtained across these runs. We can see the trend of the results are similar to FLAN-T5-large.
|
| 261 |
+
|
| 262 |
+
<table><tr><td>Task</td><td>Zero</td><td>LoraHub avg</td><td>LoraHub best</td></tr><tr><td>Boolean Expressions</td><td>52.0</td><td>58.7</td><td>63.3</td></tr><tr><td>Causal Judgement</td><td>62.1</td><td>53.8</td><td>59.8</td></tr><tr><td>Date Understanding</td><td>38.0</td><td>37.6</td><td>38.0</td></tr><tr><td>Disambiguation Qa</td><td>0.0</td><td>20.5</td><td> 54.7</td></tr><tr><td>Dyck Languages</td><td>1.3</td><td>0.9</td><td>2.0</td></tr><tr><td>Formal Fallacies</td><td>56.0</td><td>56.0</td><td>56.0</td></tr><tr><td>Geometric Shapes</td><td>8.7</td><td>17.5</td><td>28.0</td></tr><tr><td>Hyperbaton</td><td>45.3</td><td>53.5</td><td>56.7</td></tr><tr><td>Logical DeductionS (five objects)</td><td>1.3</td><td>42.7</td><td>48.7</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>8.7</td><td>44.3</td><td>50.0</td></tr><tr><td>Logical DeductionS (three objects)</td><td>0.7</td><td>56.4</td><td>61.3</td></tr><tr><td>Movie Recommendation</td><td>2.0</td><td>62.8</td><td>66.0</td></tr><tr><td>Multistep Arithmetic Two</td><td>0.0</td><td>0.4</td><td>0.7</td></tr><tr><td>Navigate</td><td>50.7</td><td>50.7</td><td>50.7</td></tr><tr><td>Object Counting</td><td>39.3</td><td>40.7</td><td>48.0</td></tr><tr><td>Penguins In A Table</td><td>17.4</td><td>40.9</td><td>45.7</td></tr><tr><td> Reasoning About Colored Objects</td><td>46.7</td><td>47.3</td><td>50.7</td></tr><tr><td>Ruin Names</td><td>18.0</td><td>35.6</td><td>44.7</td></tr><tr><td>Salient Translation Error Detection</td><td>44.7</td><td>45.1</td><td>48.7</td></tr><tr><td>Snarks</td><td>60.3</td><td>60.8</td><td>61.5</td></tr><tr><td>Sports Understanding</td><td>56.7</td><td>51.3</td><td>53.3</td></tr><tr><td>Temporal Sequences</td><td>21.3</td><td>21.5</td><td>22.0</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>3.3</td><td>9.9</td><td>13.3</td></tr><tr><td>(five objects) Tracking Shuffled ObjectsS (seven objects)</td><td>5.3</td><td>7.3</td><td>8.7</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>7.3</td><td>21.7</td><td>31.3</td></tr><tr><td>(three objects) Web Of Lies</td><td>54.7</td><td>47.1</td><td>48.7</td></tr><tr><td>Word Sorting</td><td>1.3</td><td>1.5</td><td>2.0</td></tr><tr><td>Average Performance per Task</td><td>25.8</td><td>36.5</td><td>41.3</td></tr></table>
|
| 263 |
+
|
| 264 |
+
# E Improving the Robustness of LoraHub
|
| 265 |
+
|
| 266 |
+
In order to enhance the robustness of LoraHub, we explored a straightforward approach in the selection of LoRA module candidates. Specifically, we first identified 20 LoRA module candidates with the lowest loss on the few-shot examples. Our findings indicate a slight improvement in overall performance after applying the pre-filtering startegy. Since the primary instability in our approach arises from the selection of LoRA candidates. This method involves choosing a fixed set of LoRA candidates to ensure the stability of our approach.
|
| 267 |
+
|
| 268 |
+
Table 7: The experimental results of loss-based pre-filtering.
|
| 269 |
+
|
| 270 |
+
<table><tr><td>Task</td><td>LoraHubavg</td><td>LoraHubfilter</td></tr><tr><td>Boolean Expressions</td><td>55.5</td><td>60.00</td></tr><tr><td>Causal Judgement</td><td>54.3</td><td>52.9</td></tr><tr><td> Date Understanding</td><td>32.9</td><td>33.3</td></tr><tr><td>Disambiguation</td><td>45.2</td><td>62.7</td></tr><tr><td>Dyck Languages</td><td>1.0</td><td>0.0</td></tr><tr><td>Formal Fallacies</td><td>52.8</td><td>54.0</td></tr><tr><td>Geometric Shapes</td><td>7.4</td><td>4.0</td></tr><tr><td>Hyperbaton</td><td>62.8</td><td>64.0</td></tr><tr><td>Logical DeductionS (five objects)</td><td>36.1</td><td>37.3</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>36.8</td><td>22.0</td></tr><tr><td>Logical DeductionS (three objects)</td><td>45.7</td><td>56.0</td></tr><tr><td>Movie Recommendation</td><td>55.3</td><td>68.0</td></tr><tr><td>Multistep Arithmetic</td><td>0.4</td><td>0.7</td></tr><tr><td>Navigate</td><td>47.1</td><td>49.3</td></tr><tr><td>Object Counting</td><td>33.7</td><td>38.7</td></tr><tr><td>Penguins in a Table</td><td>35.9</td><td>37.0</td></tr><tr><td>Reasoning about Colored Objects</td><td>40.0</td><td>33.3</td></tr><tr><td>Ruin Names</td><td>24.4</td><td>22.0</td></tr><tr><td>Salient Translation Error Detection</td><td>36.0</td><td>24.0</td></tr><tr><td>Snarks</td><td>56.9</td><td>52.66</td></tr><tr><td> Sports Understanding</td><td>56.7</td><td>58.0</td></tr><tr><td> Temporal Sequences</td><td>18.2</td><td>27.3</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>12.3</td><td>11.3</td></tr><tr><td>(five objects) Tracking Shuffled ObjectsS</td><td>7.7</td><td>8.0</td></tr><tr><td>(seven objects) Tracking Shuffled ObjectsS</td><td>29.2</td><td>32.7</td></tr><tr><td>(three objects) Web of Lies</td><td>50.1</td><td>46.0</td></tr><tr><td>Word Sorting</td><td>1.1</td><td>1.3</td></tr><tr><td></td><td>34.7</td><td>35.4</td></tr><tr><td>Avg Performance Per Task</td><td></td><td></td></tr></table>
|
| 271 |
+
|
| 272 |
+
# F Performance on General Important Task
|
| 273 |
+
|
| 274 |
+
In our research, we have identified specific LoRA modules that exhibit significant impact when integrated into merged LoRAs. Our focus lies in assessing the performance of the top five task-related LoRAs on the BBH benchmark. The results indicate that these top LoRAs perform similarly or even worse than zero-shot in most cases. Only one of them stands out as significantly better than zero-shot. However, it’s worth noting that this performance is not as impressive as Lorahub. These findings support the idea that the merging process can improve overall performance.
|
| 275 |
+
|
| 276 |
+
Table 8: Detailed experimental results of top five LoRA modules shown in Table 3 on BBH tasks.
|
| 277 |
+
|
| 278 |
+
<table><tr><td>Task</td><td>WIQA: Last</td><td>RACE: Right</td><td>WIQA: First</td><td>ADQA</td><td>WebQA</td></tr><tr><td>Boolean Expressions</td><td>52.67</td><td>58.00</td><td>52.67</td><td>54.67</td><td>53.33</td></tr><tr><td>Causal Judgement</td><td>55.17</td><td>63.22</td><td>55.17</td><td>57.47</td><td>57.47</td></tr><tr><td>Date Understanding</td><td>17.33</td><td>19.33</td><td>17.33</td><td>16.67</td><td>15.33</td></tr><tr><td>Disambiguation</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>Dyck Languages</td><td>0.67</td><td>0.67</td><td>0.67</td><td>1.33</td><td>1.33</td></tr><tr><td>Formal Fallacies</td><td>51.33</td><td>51.33</td><td>51.33</td><td>51.33</td><td>51.33</td></tr><tr><td>Geometric Shapes</td><td>8.00</td><td>13.33</td><td>8.00</td><td>6.67</td><td>7.33</td></tr><tr><td>Hyperbaton</td><td>16.67</td><td>44.00</td><td>16.67</td><td>1.33</td><td>6.00</td></tr><tr><td>Logical Ded uctionts)</td><td>23.33</td><td>28.00</td><td>23.33</td><td>19.33</td><td>20.67</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>22.00</td><td>26.00</td><td>22.00</td><td>10.67</td><td>12.00</td></tr><tr><td>Logical DeductionS (three objects)</td><td>0.67</td><td>9.33</td><td>0.67</td><td>0.00</td><td>0.00</td></tr><tr><td>Movie Recommendation</td><td>63.33</td><td>62.67</td><td>63.33</td><td>56.67</td><td>63.33</td></tr><tr><td>Multistep Arithmetic</td><td>0.67</td><td>0.67</td><td>0.67</td><td>0.67</td><td>0.67</td></tr><tr><td>Navigate</td><td>47.33</td><td>50.00</td><td>47.33</td><td>47.33</td><td>47.33</td></tr><tr><td>Object Counting</td><td>34.67</td><td>34.00</td><td>34.67</td><td>35.33</td><td>35.33</td></tr><tr><td>Penguins in a Table</td><td>45.65</td><td>41.30</td><td>45.65</td><td>39.13</td><td>43.48</td></tr><tr><td>Reasoning about Colored Objects</td><td>40.00</td><td>37.33</td><td>40.00</td><td>31.33</td><td>30.67</td></tr><tr><td>Ruin Names</td><td>22.00</td><td>21.33</td><td>22.00</td><td>17.33</td><td>22.67</td></tr><tr><td>Salient Translation Error Detection</td><td>36.67</td><td>34.67</td><td>36.67</td><td>32.67</td><td>37.33</td></tr><tr><td>Snarks</td><td>52.56</td><td>55.13</td><td>52.56</td><td>47.44</td><td>52.56</td></tr><tr><td>Sports Understanding</td><td>56.00</td><td>58.67</td><td>56.00</td><td>55.33</td><td></td></tr><tr><td>Temporal Sequences</td><td>16.67</td><td>17.33</td><td>16.67</td><td>12.67</td><td>55.33 17.33</td></tr><tr><td>Tracking Shuffled ObjectsS (five objects)</td><td>12.00</td><td>12.00</td><td>12.00</td><td>10.67</td><td>12.00</td></tr><tr><td>Tracking Shuffled ObjectsS (seven objects)</td><td>6.67</td><td>6.67</td><td>6.67</td><td>6.67</td><td>6.67</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>20.67</td><td>30.67</td><td>20.67</td><td>10.67</td><td>25.33</td></tr><tr><td>(three objects) Web of Lies</td><td>54.67</td><td>54.00</td><td>54.67</td><td>54.00</td><td></td></tr><tr><td>Word Sorting</td><td>1.33</td><td>1.33</td><td>1.33</td><td>1.33</td><td>54.00 1.33</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Avg Performance per Task △ FLAN-T5-large</td><td>28.10 1.10</td><td>30.78 3.78</td><td>28.10 1.10</td><td>25.14 -1.86</td><td>27.04 0.04</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 279 |
+
|
| 280 |
+

|
| 281 |
+
Figure 3: The influence of number of LoRA modules on 15 tasks from BBH, and each box is obtained from 5 separate runs. The horizontal axis shows the number of LoRA modules to be composed in LoraHub learning.
|
| 282 |
+
|
| 283 |
+
# G Implementation details
|
| 284 |
+
|
| 285 |
+
We implemented LoRA tuning using the Huggingface PEFT library (Mangrulkar et al., 2022), with the rank being set as 16. The gradient-free method was implemented using the open-source Nevergrad optimization library (Rapin & Teytaud, 2018), with a constraint that the absolute value of LoRA weights should not exceed 1.5. Originally, all coefficients of LoRA modules were set at zero.
|
| 286 |
+
|
| 287 |
+
In our standard settings, we set the maximum number of iterations $K$ as 40. The same 5 examples were used during our LoraHub learning and the few-shot in-context learning. The hyperparameter $\alpha$ is set as 0.05. Regarding the hyperparameters for training candidate LoRA modules, we maintained consistency across all modules, setting the batch size at 64, the learning rate at $1 e - 4 ,$ and the number of training epochs at 10.
|
| 288 |
+
|
| 289 |
+
# H Influence of Number of LoRA modules
|
| 290 |
+
|
| 291 |
+
As shown in Figure 3, with an increase in the number of LoRA module candidates, there is a corresponding increase in the performance variance. Based on our in-depth analysis, the primary source of variance is not related to gradient-free optimization algorithms but rather associated with the LoRA candidate modules. In other words, once the candidates are determined, random seeds have minimal impact on the final performance. Hence, we posit that the observed instability primarily arises from the inherent challenge of balancing the quantity and quality of the LoRA module candidates.
|
| 292 |
+
|
| 293 |
+
# I The Impact of Threshold
|
| 294 |
+
|
| 295 |
+
In this section, we omitted the threshold in our implementation, and the results are summarized in Table 9. Our observations indicate that the removal of the threshold had minimal impact on the majority of tasks, underscoring the robustness of the gradient-free optimization algorithm itself in most cases. The algorithm efficiently identified reasonable ranges even without specific upper and lower bounds. However, three tasks, namely Date Understanding, Disambiguation and Hyperbaton, exhibited notable effects. The resulting performance decline led to an average decrease of $1 . 2 \%$ compared to the setting with threshold.
|
| 296 |
+
|
| 297 |
+
This highlights the significance of establishing a reasonable threshold to mitigate extreme scenarios.
|
| 298 |
+
|
| 299 |
+
Table 9: The comparsion between LoraHub and LoraHub without threshold.
|
| 300 |
+
|
| 301 |
+
<table><tr><td>Task</td><td>LoraHubavg with threshold</td><td>LoraHubavg without threshold</td></tr><tr><td>Boolean Expressions</td><td>55.5</td><td>54.0</td></tr><tr><td>Causal Judgement</td><td>54.3</td><td>54.8</td></tr><tr><td>Date Understanding</td><td>32.9</td><td>17.7</td></tr><tr><td>Disambiguation</td><td>45.2</td><td>40.6</td></tr><tr><td>Dyck Languages</td><td>1.0</td><td>1.1</td></tr><tr><td>Formal Fallacies</td><td>52.8</td><td>51.7</td></tr><tr><td>Geometric Shapes</td><td>7.4</td><td>6.7</td></tr><tr><td>Hyperbaton</td><td>62.8</td><td>55.5</td></tr><tr><td>Logical DeductionS (five objects)</td><td>36.1</td><td>36.5</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>36.8</td><td>35.6</td></tr><tr><td>Logical DeductionS</td><td>45.7</td><td></td></tr><tr><td>(three objects) Movie Recommendation</td><td></td><td>49.9</td></tr><tr><td>Multistep Arithmetic</td><td>55.3</td><td>59.3</td></tr><tr><td>Navigate</td><td>0.4</td><td>0.7</td></tr><tr><td>Object Counting</td><td>47.1</td><td>47.6</td></tr><tr><td></td><td>33.7</td><td>34.7</td></tr><tr><td>Penguins in a Table</td><td>35.9</td><td>33.8</td></tr><tr><td>Reasoning about Colored Objects</td><td>40.0</td><td>37.9</td></tr><tr><td>Ruin Names</td><td>24.4</td><td>24.0</td></tr><tr><td>Salient Translation Error Detection</td><td>36.0</td><td>37.1</td></tr><tr><td>Snarks</td><td>56.9</td><td>51.6</td></tr><tr><td>Sports Understanding</td><td>56.7</td><td>55.9</td></tr><tr><td>Temporal Sequences</td><td>18.2</td><td>16.7</td></tr><tr><td>Tracking Shuffled ObjectsS (five objects)</td><td>12.3</td><td>12.3</td></tr><tr><td>Tracking Shuffled ObjectsS (seven objects)</td><td>7.7</td><td>8.5</td></tr><tr><td>Tracking Shuffled ObjectsS (three objects)</td><td>29.2</td><td>29.8</td></tr><tr><td>Web of Lies</td><td>50.1</td><td>50.3</td></tr><tr><td>Word Sorting</td><td>1.1</td><td>1.3</td></tr><tr><td>Avg Performance Per Task</td><td>34.7</td><td>33.5</td></tr></table>
|
parse/test/TrloAXEJ2B/TrloAXEJ2B_content_list.json
ADDED
|
@@ -0,0 +1,726 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "LoraHub: Efficient Cross-Task Generalization via Dynamic LoRA Composition ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"page_idx": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"type": "text",
|
| 10 |
+
"text": "Chengsong Huang $\\mathbf { \\Delta } \\mathbf { \\dag \\ S \\mathrm { \\ s \\mathrm { \\ s } } }$ , Qian Liu†∗, Bill Yuchen $\\mathbf { L i n } ^ { \\bigotimes * }$ , Tianyu Pang†, Chao ${ { \\mathbf { D } } { { \\mathbf { u } } } ^ { \\dag } }$ , Min Lin† †Sea AI Lab, Singapore §Washington University in St. Louis, MO, USA ♢Allen Institute for AI, Seattle, WA, USA ",
|
| 11 |
+
"page_idx": 0
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"type": "text",
|
| 15 |
+
"text": "Abstract ",
|
| 16 |
+
"text_level": 1,
|
| 17 |
+
"page_idx": 0
|
| 18 |
+
},
|
| 19 |
+
{
|
| 20 |
+
"type": "text",
|
| 21 |
+
"text": "Low-rank adaptations (LoRA) are often employed to fine-tune large language models (LLMs) for new tasks. This paper investigates LoRA composability for cross-task generalization and introduces LoraHub, a simple framework devised for the purposive assembly of LoRA modules trained on diverse given tasks, with the objective of achieving adaptable performance on unseen tasks. With just a few examples from a new task, LoraHub can fluidly combine multiple LoRA modules, eliminating the need for human expertise and assumptions. Notably, the composition requires neither additional model parameters nor gradients. Empirical results on the Big-Bench Hard benchmark suggest that LoraHub, while not surpassing the performance of in-context learning, offers a notable performanceefficiency trade-off in few-shot scenarios by employing a significantly reduced number of tokens per example during inference. Notably, LoraHub establishes a better upper bound compared to in-context learning when paired with different demonstration examples, demonstrating its potential for future development. Our vision is to establish a platform for LoRA modules, empowering users to share their trained LoRA modules. This collaborative approach facilitates the seamless application of LoRA modules to novel tasks, contributing to an adaptive ecosystem. Our code is available at github.com/sail-sg/lorahub, and all the pre-trained LoRA modules are released at huggingface.co/lorahub. ",
|
| 22 |
+
"page_idx": 0
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"type": "text",
|
| 26 |
+
"text": "1 Introduction ",
|
| 27 |
+
"text_level": 1,
|
| 28 |
+
"page_idx": 0
|
| 29 |
+
},
|
| 30 |
+
{
|
| 31 |
+
"type": "image",
|
| 32 |
+
"img_path": "images/95e2ddec39022b4d6452e07a5b9cddb6f0b9d45a3c19a11a7273387b6b7e1205.jpg",
|
| 33 |
+
"image_caption": [
|
| 34 |
+
"Figure 1: The illustration of zero-shot learning, few-shot in-context learning and few-shot LoraHub learning (ours). Note that the Compose procedure is conducted per task rather than per example. Our method achieves similar inference throughput as zero-shot learning, yet approaches the performance of in-context learning on the BIG-Bench Hard (BBH) benchmark. "
|
| 35 |
+
],
|
| 36 |
+
"image_footnote": [],
|
| 37 |
+
"page_idx": 0
|
| 38 |
+
},
|
| 39 |
+
{
|
| 40 |
+
"type": "text",
|
| 41 |
+
"text": "Recent progress in natural language processing (NLP) has been largely fueled by large language models (LLMs) such as OpenAI GPT (Brown et al., 2020), FLAN-T5 (Chung et al., 2022), and LLaMA (Touvron et al., 2023). These models demonstrate top-tier performance across different NLP tasks. However, their enormous parameter size presents issues regarding computational efficiency and memory usage during fine-tuning. To mitigate these challenges, Low-Rank Adaptation (LoRA) (Hu et al., 2022) has emerged as a parameterefficient fine-tuning technique (Lester et al., 2021; He et al., 2022; An et al., 2022). By reducing memory demands and computational costs, it speeds up LLM training. LoRA achieves this by freezing the base model parameters (that is, an LLM) and training a lightweight module, which regularly delivers high performance on target tasks. ",
|
| 42 |
+
"page_idx": 0
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"type": "text",
|
| 46 |
+
"text": "",
|
| 47 |
+
"page_idx": 1
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"type": "text",
|
| 51 |
+
"text": "While prior research has targeted the efficiency enhancement facilitated by LoRA, there is a dearth of investigation into the inherent modularity and composability of LoRA modules. Typically, previous methods train LoRA modules to specialize in individual tasks. Yet, the intrinsic modularity of LoRA modules presents an intriguing research question: Would it be possible to compose LoRA modules to generalize to novel tasks in an efficient manner? In this paper, we tap into the potential of LoRA modularity for broad task generalization, going beyond single-task training to meticulously compose LoRA modules for malleable performance on unknown tasks. Crucially, our method enables an automatic assembling of LoRA modules, eliminating dependency on manual design or human expertise. With just a handful of examples from new tasks (e.g., 5), our approach can autonomously compose compatible LoRA modules without human intrusion. We do not make assumptions about which LoRA modules trained on particular tasks can be combined, allowing for flexibility in amalgamating any modules as long as they conform to the specification (e.g., using the same LLM). As our approach leverages several available LoRA modules, we refer to it as LoraHub and denote our learning method as LoraHub learning. ",
|
| 52 |
+
"page_idx": 1
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"type": "text",
|
| 56 |
+
"text": "To validate the efficiency of our proposed methods, we test our approaches using the widely recognized BBH benchmark with FLAN-T5 (Chung et al., 2022) serving as the base LLM. The results underline the effectiveness of the LoRA module composition for unfamiliar tasks through a few-shot LoraHub learning process. Notably, our methodology achieves an average performance that closely matches that of few-shot in-context learning, while demonstrating a superior upper bound, particularly when using different demonstration examples. Additionally, our method substantially reduces the inference cost compared to in-context learning, eliminating the requirement of examples as inputs for the LLM. With fewer tokens per example during inference, our method significantly reduces computational overhead and enables faster responses. It aligns with a broader research trend, where recent studies are actively exploring approaches to reduce the number of input tokens (Zhou et al., 2023; Ge et al., 2023; Chevalier et al., 2023; Jiang et al., 2023a; Li et al., 2023; Jiang et al., 2023b). Our learning procedure is also notable for its computational efficiency, using a gradient-free approach to obtain the coefficients of LoRA modules and requiring only a handful of inference steps for unseen tasks. For example, when applied to a new task in BBH, our methodology can deliver superior performance in less than a minute using a single A100 card. ",
|
| 57 |
+
"page_idx": 1
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"type": "text",
|
| 61 |
+
"text": "Importantly, LoraHub learning can feasibly be accomplished with a CPU-only machine, requiring proficiency solely for processing LLM inference. In our pursuit to democratize artificial intelligence, we are taking an important step forward by envisioning the establishment of the LoRA platform. The platform would serve as a marketplace where users can seamlessly share and access well-trained LoRA modules for diverse applications. LoRA providers have the flexibility to freely share or sell their modules on the platform without compromising data privacy. Users, equipped with CPU capability, can leverage trained LoRA modules contributed by others through automated distribution and composition algorithms. This platform not only cultivates a repository of reusable LoRA modules with a myriad of capabilities but also sets the stage for cooperative AI development. It empowers the community to collectively enrich the LLM’s capabilities through dynamic LoRA composition. ",
|
| 62 |
+
"page_idx": 1
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"type": "text",
|
| 66 |
+
"text": "2 Problem Statement ",
|
| 67 |
+
"text_level": 1,
|
| 68 |
+
"page_idx": 1
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "Large Language Models We assume that a large language model $M _ { \\theta }$ is based on Transformer architecture (Vaswani et al., 2017) and has been pre-trained on a large-scale text corpus. The model architecture can be either encoder-decoder (Raffel et al., 2020) or decoderonly (Brown et al., 2020). Also, $M _ { \\theta }$ could also have been fine-tuned with a large set of instruction-following datasets such as Flan Colleciton (Longpre et al., 2023) and PromptSource (Bach et al., 2022). ",
|
| 73 |
+
"page_idx": 1
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"type": "text",
|
| 77 |
+
"text": "",
|
| 78 |
+
"page_idx": 2
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "Cross-Task Generalization In real-world situations, users often desire an LLM to perform novel tasks that it has not encountered before — an ability widely known as cross-task generalization. Generally, cross-task generalization falls into two categories: zero-shot learning (Mishra et al., 2022; Sanh et al., 2022; Chung et al., 2022; OpenAI, 2022; Lin et al., 2022), which necessitates no labeled examples of the new task, and few-shot learning (Ye et al., 2021; Min et al., 2022) which demands a handful of labeled examples. Assume we have $N$ distinct upstream tasks that the LLM has been trained on, denoted as $\\mathbb { T } = \\{ \\mathcal { T } _ { 1 } , . . . , \\mathcal { T } _ { N } \\}$ . Our paper primarily focuses on the latter category, where for an unseen target task $\\mathcal { T } ^ { \\prime } \\notin \\mathbb { T } ,$ , users can only provide a limited set of labeled examples, Q. Our aim is to modify the model $M _ { \\theta }$ to adapt it to task $\\tau ^ { \\prime }$ using only $Q$ . An intuitive method would be to fine-tune the weights of ${ \\mathrm { { \\dot { M } } } } _ { \\theta }$ based on $Q ,$ yielding an updated model $M _ { \\phi }$ with enhanced performance on $\\tau ^ { \\prime }$ . However, this approach is inefficient, time-consuming, and unstable when $Q$ is small. ",
|
| 83 |
+
"page_idx": 2
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"type": "text",
|
| 87 |
+
"text": "LoRA Tuning LoRA is a parameter-efficient fine-tuning method (Hu et al., 2022), facilitates the adaptation of LLMs using lightweight modules, eliminating the need for finetuning the entire weights. LoRA tuning involves keeping the original model weights frozen while introducing trainable low-rank decomposition matrices as adapter modules into each layer of the model. Compared to the base LLM, this module possesses significantly fewer trainable parameters, paving the way for rapid adaptation using minimal examples. As such, LoRA tuning presents a resource-efficient technique to quickly adapt LLMs for new tasks with restricted training data. However, traditional LoRA methods primarily concentrate on training and testing within the same tasks (Gema et al., 2023), rather than venturing into few-shot cross-task generalization. ",
|
| 88 |
+
"page_idx": 2
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"type": "text",
|
| 92 |
+
"text": "3 Methodology ",
|
| 93 |
+
"text_level": 1,
|
| 94 |
+
"page_idx": 2
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"type": "text",
|
| 98 |
+
"text": "In this section, we provide an overview of our proposed method. We then explain the LoRA tuning procedure in detail. Last, we introduce the procedure of our LoraHub learning, which consists of the COMPOSE stage and the ADAPT stage. ",
|
| 99 |
+
"page_idx": 2
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"type": "text",
|
| 103 |
+
"text": "3.1 Method Overview ",
|
| 104 |
+
"text_level": 1,
|
| 105 |
+
"page_idx": 2
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"type": "text",
|
| 109 |
+
"text": "As depicted in Figure 2, we initially train LoRA modules on a variety of upstream tasks. Specifically, for $N$ distinct upstream tasks, we separately train $N$ LoRA modules, each represented as $m _ { i }$ for task $\\mathscr { T } _ { i } \\in \\mathbf { \\hat { T } }$ . Subsequently, for a new task $\\mathcal { T } ^ { \\prime } \\notin \\mathbb { T } ,$ , such as Boolean Expressions represented in Figure 2, its examples $Q$ are utilized to steer the LoraHub learning process. The LoraHub learning encapsulates two main phases: the COMPOSE phase and the ADAPT phase. In the COMPOSE phase, all available LoRA modules are combined into a single integrated module $\\hat { m } _ { - }$ , using $\\left\\{ w _ { 1 } , w _ { 2 } , \\dots , w _ { N } \\right\\}$ as coefficients. Each $w _ { i }$ is a scalar value that can take on positive or negative values, and the combination can be done in different ways. During the ADAPT phase, the combined LoRA module $\\hat { m }$ is amalgamated with the LLM $M _ { \\theta }$ , and its performance on few-shot examples from the new task $\\mathbf { \\breve { { \\mathbf { \\nabla } } } } _ { \\mathbf { \\mathbf { \\mathbf { \\mathbf { \\mathcal { T } } } } } ^ { \\prime } }$ is assessed. A gradient-free algorithm is subsequently deployed to update $w _ { . }$ , enhancing mˆ ’s performance (e.g., loss) on the few-shot examples $Q$ . Finally, after iterating through $K$ steps, the optimum performing LoRA module is applied to the LLM $M _ { \\theta }$ , yielding the final LLM $M _ { \\phi } = \\mathrm { L o R A } ( \\hat { M } _ { \\theta } , \\hat { m } )$ . This serves as an effectively adjusted model for the unseen task $\\tau ^ { \\prime }$ , which will then be deployed and not updated anymore. ",
|
| 110 |
+
"page_idx": 2
|
| 111 |
+
},
|
| 112 |
+
{
|
| 113 |
+
"type": "text",
|
| 114 |
+
"text": "3.2 LoRA tuning on upstream tasks ",
|
| 115 |
+
"text_level": 1,
|
| 116 |
+
"page_idx": 2
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"type": "text",
|
| 120 |
+
"text": "LoRA effectively minimizes the number of trainable parameters through the process of decomposing the attention weight matrix update of the LLM, denoted as $W _ { 0 } \\in \\bar { R } ^ { d \\times k } ,$ , into low-rank matrices. In more specific terms, LoRA exhibits the updated weight matrix in the form $W _ { 0 } + \\delta W = W _ { 0 } + A B ,$ where $A \\in \\mathbb { R } ^ { d \\times r }$ and $B \\in \\mathbb { R } ^ { r \\times k }$ are trainable low-rank matrices with rank $r ,$ a dimension significantly smaller than those of $d$ and $k$ . In this context, the product $A B$ defines the LoRA module $m ,$ , as previously elaborated. By leveraging the low-rank decomposition, LoRA substantially reduces the number of trainable parameters needed to adapt the weights of LLMs duriing fine-tuning. ",
|
| 121 |
+
"page_idx": 2
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"type": "image",
|
| 125 |
+
"img_path": "images/fdc28d30d1864590ed2196198df1e30168cf83fc2b25e930c617edf738bdbc3b.jpg",
|
| 126 |
+
"image_caption": [
|
| 127 |
+
"Figure 2: Our method encompasses two stages: the COMPOSE stage and the ADAPT stage. During the COMPOSE stage, existing LoRA modules are integrated into one unified module, employing a set of coefficients, denoted as $w$ . In the ADAPT stage, the combined LoRA module is evaluated on a few examples from the unseen task. Subsequently, a gradient-free algorithm is applied to refine $w$ . After executing $K$ iterations, a highly adapted combined LoRA module is produced, which can be incorporated with the LLM to perform the intended task. "
|
| 128 |
+
],
|
| 129 |
+
"image_footnote": [],
|
| 130 |
+
"page_idx": 3
|
| 131 |
+
},
|
| 132 |
+
{
|
| 133 |
+
"type": "text",
|
| 134 |
+
"text": "",
|
| 135 |
+
"page_idx": 3
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"type": "text",
|
| 139 |
+
"text": "3.3 COMPOSE: Element-wise composition of LoRA modules ",
|
| 140 |
+
"text_level": 1,
|
| 141 |
+
"page_idx": 3
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"type": "text",
|
| 145 |
+
"text": "Within the COMPOSE stage, we implement an element-wise method to combine LoRA modules. This process integrates the corresponding parameters of the LoRA modules, requiring the modules being combined to have the same rank $r$ to properly align the structures. Given that $m _ { i } = A _ { i } B _ { i } ,$ the combined LoRA module $\\hat { m }$ can be obtained by: ",
|
| 146 |
+
"page_idx": 3
|
| 147 |
+
},
|
| 148 |
+
{
|
| 149 |
+
"type": "equation",
|
| 150 |
+
"img_path": "images/622ebc57ca6de9adfd25eb29ad01864fdee3e77678a974073dcd3f51edc1c592.jpg",
|
| 151 |
+
"text": "$$\n\\hat { m } = ( w _ { 1 } A _ { 1 } + w _ { 2 } A _ { 2 } + \\cdot \\cdot \\cdot + w _ { N } A _ { N } ) ( w _ { 1 } B _ { 1 } + w _ { 2 } B _ { 2 } + \\cdot \\cdot \\cdot + w _ { N } B _ { N } ) .\n$$",
|
| 152 |
+
"text_format": "latex",
|
| 153 |
+
"page_idx": 3
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"type": "text",
|
| 157 |
+
"text": "Notbly, as we show in Sec. 5, combining too many LoRA modules at once can expand the search space exponentially, which may destabilize the LoraHub learning process and prevent optimal performance. To mitigate this, we employ random selection to prune the candidate space, and more advanced pre-filtering algorithms could be explored in the future. ",
|
| 158 |
+
"page_idx": 3
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "text",
|
| 162 |
+
"text": "3.4 ADAPT: Weight optimization via gradient-free methods ",
|
| 163 |
+
"text_level": 1,
|
| 164 |
+
"page_idx": 3
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"type": "text",
|
| 168 |
+
"text": "During the ADAPT stage, our goal is to modify the coefficients $w$ to boost the model’s performace on the examples from an unseen task. One might think of using gradient descent to optimize $w ,$ following standard backpropagation methods. However, this approach demands constructing a hypernetwork for all LoRA modules, similar to differentiable architecture search methods (Zhang et al., 2019). Constructing these hypernetworks demands for substantial GPU memory and time, posing a challenge. Given that $w$ consists of a relatively small number of parameters, we opted for gradient-free methods for optimization instead of gradient descent. ",
|
| 169 |
+
"page_idx": 3
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"type": "text",
|
| 173 |
+
"text": "Inspired by previous work (Sun et al., 2022), we utilize a black-box optimization technique to find the optimal $w$ . The optimization process is steered by the cross-entropy loss, setting the goal to locate the best set $\\left\\{ w _ { 1 } , w _ { 2 } , \\ldots , w _ { N } \\right\\}$ that reduces the loss $L$ on the few-shot examples $Q$ . Furthermore, we incorporate L1 regularization to penalize the sum of the absolute values of $w _ { . }$ , helping to prevent obtaining extreme values. Consequently, the final objective of LoraHub is to minimize $\\begin{array} { r } { L + \\alpha \\cdot \\sum _ { i = 1 } ^ { N } | \\dot { w } _ { i } | , } \\end{array}$ , where $\\alpha$ serves as a hyperparameter. ",
|
| 174 |
+
"page_idx": 3
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"type": "text",
|
| 178 |
+
"text": "In terms of the gradient-free method, we leverage Shiwa, a combinatorial optimization approach (Liu et al., 2020). Shiwa offers a variety of algorithms and chooses the most suitable optimization algorithm for different circumstances. In most of the forthcoming experimental setups, we primarily employ the Covariance Matrix Adaptive Evolution Strategies (CMA-ES) (Hansen & Ostermeier, 1996). CMA-ES, as a stochastic and population-based optimization algorithm, offers versatility in addressing a broad spectrum of optimization challenges. It dynamically adjusts a search distribution, which is defined by a covariance matrix. During each iteration, CMA-ES systematically updates both the mean and covariance of this distribution to optimize the target function. In our application, we employ this algorithm to mold the search space for w. Ultimately, we use it to identify the optimal $w$ by evaluating their performance on the few-shot examples from an unseen task. ",
|
| 179 |
+
"page_idx": 4
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"type": "text",
|
| 183 |
+
"text": "4 Experimental Results ",
|
| 184 |
+
"text_level": 1,
|
| 185 |
+
"page_idx": 4
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"type": "text",
|
| 189 |
+
"text": "In this section, we provide details on our main experiments. First, we give an overview of the experimental setup and implementation details. Next, we present our findings along with the results. ",
|
| 190 |
+
"page_idx": 4
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"type": "text",
|
| 194 |
+
"text": "4.1 Experimental setup ",
|
| 195 |
+
"text_level": 1,
|
| 196 |
+
"page_idx": 4
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"type": "text",
|
| 200 |
+
"text": "Large Language Model In our main experiments, we employ FLAN-T5 (Chung et al., 2022), particularly FLAN-T5-large, as the base LLM. The model has shown impressive abilities to perform zero-shot and few-shot learning. ",
|
| 201 |
+
"page_idx": 4
|
| 202 |
+
},
|
| 203 |
+
{
|
| 204 |
+
"type": "text",
|
| 205 |
+
"text": "Candidate LoRA Modules Our methodology requires a compendium of LoRA modules trained on preceding tasks. For parity with FLAN, we adopt the tasks utilized to instruct FLAN-T5, thereby incorporating nearly 200 distinct tasks and their corresponding instructions. Following this, we trained several LoRA modules as potential candidates. During each experimental sequence, we randomly select 20 LoRA modules from them as the candidate for our LoraHub learning. ",
|
| 206 |
+
"page_idx": 4
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "text",
|
| 210 |
+
"text": "Dataset and evaluation Our method is evaluated using the Big-Bench Hard (BBH) benchmark, a well-established standard that consists of multiple-choice questions from a variety of domains. The benchmark consists of 27 different tasks, which are regarded to be challenging for language models. For all tasks, we employ the exact match (EM) as our evaluation metric. ",
|
| 211 |
+
"page_idx": 4
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"type": "text",
|
| 215 |
+
"text": "Baseline Setup To enhance the demonstration of our method’s performance, we expanded our comparisons beyond the zero-shot and in-context learning settings. We specifically chose three representative gradient-based methods for comparison: full fine-tuning (FFT), LoRA tuning (LoRA) (Hu et al., 2022), and IA3 fine-tuning (IA3) (Liu et al., 2022). For all gradient-based methods, for a fair comparsion, we train for 40 epochs on the same three runs of 5 examples employed in our methods. In the case of FFT, a learning rate of 3e-5 is employed, whereas for IA3 and LoRA, we adopt a learning rate of 2e-4. We report the performance of each method on the test set at the end of training (averaged over three runs) without any model selection to avoid potential selection bias. ",
|
| 216 |
+
"page_idx": 4
|
| 217 |
+
},
|
| 218 |
+
{
|
| 219 |
+
"type": "text",
|
| 220 |
+
"text": "4.2 Main results ",
|
| 221 |
+
"text_level": 1,
|
| 222 |
+
"page_idx": 4
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"type": "text",
|
| 226 |
+
"text": "As shown in Table 1, our experimental results demonstarte the superior efficacy of our method in comparison to zero-shot learning while closely resembling the performance of in-context learning (ICL) in few-shot scenarios. This observation is derived from an average performance of three runs, each leveraging different few-shot examples. Importantly, our model utilizes an equivalent number of tokens as the zero-shot method, notably fewer than the count used by ICL. Although occasional performance fluctuations, our method consistently outperforms zero-shot learning in most tasks. In the era of LLMs, the input length is directly proportional to the inference cost, and thus LoraHub’s ability to economize on input tokens while approaching the peak performance grows increasingly significant. Moreover, as shown in Appendix Table 4, the upper bound performance of our method across these runs can surpass ICL on 18 tasks, demonstrating its potential for future development. ",
|
| 227 |
+
"page_idx": 4
|
| 228 |
+
},
|
| 229 |
+
{
|
| 230 |
+
"type": "table",
|
| 231 |
+
"img_path": "images/7ec4211137da396567e2ee2f253ff7f1eb99abc5b9e489998bc8f304dfdfbc78.jpg",
|
| 232 |
+
"table_caption": [
|
| 233 |
+
"Table 1: Experimental results of zero-shot learning (Zero), few-shot in-context learning (ICL), IA3 fine-tuning (IA3), LoRA tuning (LoRA), full fine-tuning (FFT) and our proposed few-shot LoraHub learning (LoraHub) on the BBH benchmark with FLAN-T5-large as the base LLM. We denote algorithmic tasks with the superscript $\\ S$ following previous work (Wu et al., 2023b). Note that we employ three runs, each leveraging different 5-shot examples per task, as demonstrations for all few-shot methods. The average performance of all methods is reported below, and the best performance of each few-shot method can be found in the Appendix B. "
|
| 234 |
+
],
|
| 235 |
+
"table_footnote": [],
|
| 236 |
+
"table_body": "<table><tr><td>Task</td><td>Zero</td><td>ICLavg</td><td>IA3avg</td><td>LoRAavg</td><td>FFTavg</td><td>LoraHubavg</td></tr><tr><td>Boolean Expressions</td><td>54.0</td><td>59.6</td><td>56.2</td><td>56.0</td><td>62.2</td><td>55.5</td></tr><tr><td>Causal Judgement</td><td>57.5</td><td>59.4</td><td>60.2</td><td>55.6</td><td>57.5</td><td>54.3</td></tr><tr><td>Date Understanding</td><td>15.3</td><td>20.4</td><td>20.0</td><td>35.8</td><td>59.3</td><td>32.9</td></tr><tr><td>Disambiguation</td><td>0.0</td><td>69.1</td><td>0.0</td><td>68.0</td><td>68.2</td><td>45.2</td></tr><tr><td>Dyck Languages</td><td>1.3</td><td>0.9</td><td>4.2</td><td>22.2</td><td>19.5</td><td>1.0</td></tr><tr><td>Formal Fallacies</td><td>51.3</td><td>55.3</td><td>51.5</td><td>53.6</td><td>54.0</td><td>52.8</td></tr><tr><td>Geometric Shapes</td><td>6.7</td><td>19.6</td><td>14.7</td><td>24</td><td>31.1</td><td>7.4</td></tr><tr><td>Hyperbaton</td><td>6.7</td><td>71.8</td><td>49.3</td><td>55.3</td><td>77.3</td><td>62.8</td></tr><tr><td>Logical DeductionS (five objects)</td><td>21.3</td><td>39.1</td><td>32.7</td><td>40.0</td><td>42.2</td><td>36.1</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>12.7</td><td>40.7</td><td>33.8</td><td>37.3</td><td>44.9</td><td>36.8</td></tr><tr><td>Logical DeductionS (three objects)</td><td>0.0</td><td>51.6</td><td>8.5</td><td>53.6</td><td>52.9</td><td>45.7</td></tr><tr><td>Movie Recommendation</td><td>62.7</td><td>55.8</td><td>61.8</td><td>51.5</td><td>66.0</td><td>55.3</td></tr><tr><td>Multistep Arithmetic</td><td>0.7</td><td>0.7</td><td>0.7</td><td>0.2</td><td>0.0</td><td>0.4</td></tr><tr><td>Navigate</td><td>47.3</td><td>45.3</td><td>46.2</td><td>48.0</td><td>48.0</td><td>47.1</td></tr><tr><td>Object Counting</td><td>34.7</td><td>32.4</td><td>35.1</td><td>38.7</td><td>35.6</td><td>33.7</td></tr><tr><td>Penguins in a Table</td><td>43.5</td><td>41.3</td><td>45.0</td><td>36.2</td><td>31.9</td><td>35.9</td></tr><tr><td>Reasoning about Colored Objects</td><td>32.0</td><td>40.2</td><td>40.7</td><td>39.6</td><td>37.6</td><td>40.0</td></tr><tr><td>Ruin Names</td><td>23.3</td><td>19.3</td><td>24.4</td><td>37.8</td><td>61.3</td><td>24.4</td></tr><tr><td>Salient Translation Error Detection</td><td>37.3</td><td>47.3</td><td>37.1</td><td>16.0</td><td>16.2</td><td>36.0</td></tr><tr><td>Snarks</td><td>50.0</td><td>54.2</td><td>53.9</td><td>55.6</td><td>66.7</td><td>56.9</td></tr><tr><td>Sports Understanding</td><td>56.0</td><td>54.7</td><td>55.1</td><td>56.5</td><td>54.0</td><td>56.7</td></tr><tr><td> Temporal Sequences</td><td>16.7</td><td>25.1</td><td>18.2</td><td>25.1</td><td>37.8</td><td>18.2</td></tr><tr><td>Tracking Shuffled ObjectsS (five objects)</td><td>12.0</td><td>12.0</td><td>12.0</td><td>13.8</td><td>16.9</td><td>12.3</td></tr><tr><td>Tracking Shuffled Objects (seven objects)</td><td>6.7</td><td>6.7</td><td>6.7</td><td>10.0</td><td>9.8</td><td>7.7</td></tr><tr><td>Tracking Shuffled ObjectsS (three objects)</td><td>24.7</td><td>31.1</td><td>30.7</td><td>30.9</td><td>32.0</td><td>29.2</td></tr><tr><td>Web of Lies</td><td>54.0</td><td>53.8</td><td>54.2</td><td>52.7</td><td>48.2</td><td>50.1</td></tr><tr><td>Word Sorting</td><td>1.3</td><td>0.5</td><td>1.3</td><td>4.9</td><td>4.9</td><td>1.1</td></tr><tr><td>Avg Performance Per Task</td><td>27.0</td><td>37.3</td><td>31.6</td><td>37.7</td><td>42.1</td><td>34.7</td></tr><tr><td>Avg Tokens Per Example</td><td>111.6</td><td>597.8</td><td>111.6</td><td>111.6</td><td>111.6</td><td>111.6</td></tr><tr><td>Gradient-based Training</td><td>No</td><td>No</td><td>Yes</td><td>Yes</td><td>Yes</td><td>No</td></tr></table>",
|
| 237 |
+
"page_idx": 5
|
| 238 |
+
},
|
| 239 |
+
{
|
| 240 |
+
"type": "text",
|
| 241 |
+
"text": "",
|
| 242 |
+
"page_idx": 5
|
| 243 |
+
},
|
| 244 |
+
{
|
| 245 |
+
"type": "text",
|
| 246 |
+
"text": "Even when compared to certain gradient-based optimization methods, our approach consistently demonstrates competitive performance. For example, as depicted in Table 1, our method exhibits a notable improvement of $3 . 1 \\%$ on average in contrast to the promising IA3 method. Nevertheless, we acknowledge that our approach still falls behind LoRA tuning and full fine-tuning, especially in tasks that exhibit significant deviation from the upstream task. Taking Dyck Languages as an example, both LoraHub and ICL achieve only an average performance of nearly $1 . 0 \\%$ on these tasks, while LoRA and FFT methods showcase impressive results with only 5 examples. ",
|
| 247 |
+
"page_idx": 5
|
| 248 |
+
},
|
| 249 |
+
{
|
| 250 |
+
"type": "text",
|
| 251 |
+
"text": "",
|
| 252 |
+
"page_idx": 6
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "text",
|
| 256 |
+
"text": "4.3 Discussion ",
|
| 257 |
+
"text_level": 1,
|
| 258 |
+
"page_idx": 6
|
| 259 |
+
},
|
| 260 |
+
{
|
| 261 |
+
"type": "text",
|
| 262 |
+
"text": "LoraHub addresses the challenge of reducing inference costs by eliminating the need for processing additional tokens, resulting in a noticeable reduction in overall inference expenses. However, it introduces an inherent cost during the ADAPT stage, necessitating extra inference steps, such as the 40 steps employed in our experiments. This introduces a trade-off between choosing the ICL approach and LoraHub, with the decision typically hinging on the nature of the situation. ",
|
| 263 |
+
"page_idx": 6
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "text",
|
| 267 |
+
"text": "For one-time ad-hoc tasks, the ICL approach should be more pragmatic due to LoraHub’s additional inference step costs. In such scenarios, where immediate, single-use solutions are preferred, the simplicity and efficiency of ICL might outweigh the benefits of potential savings offered by LoraHub. Conversely, for recurring or similar tasks, LoraHub emerges as a compelling option. Despite the added inference step cost, LoraHub’s ability to efficiently handle repetitive tasks, often occurring thousands of times, while concurrently reducing overall expenses, positions it as a viable option in such kind of situations. ",
|
| 268 |
+
"page_idx": 6
|
| 269 |
+
},
|
| 270 |
+
{
|
| 271 |
+
"type": "text",
|
| 272 |
+
"text": "In summary, our intention is not to replace $\\scriptstyle { \\mathrm { I C L } } ,$ but to present LoraHub as a complementary strategy with performance-efficiency trade-offs. Thus, we encourage a careful consideration of specific use cases and requirements when choosing between ICL and LoraHub, recognizing that the optimal solution may vary based on the nature and frequency of the tasks at hand. ",
|
| 273 |
+
"page_idx": 6
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "text",
|
| 277 |
+
"text": "5 Experimental Analysis ",
|
| 278 |
+
"text_level": 1,
|
| 279 |
+
"page_idx": 6
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"type": "text",
|
| 283 |
+
"text": "In this section, we thoroughly examine the characteristics of our proposed method and uncover several insightful findings. If not specified, we use FLAN-T5-large for all analysis. ",
|
| 284 |
+
"page_idx": 6
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"type": "text",
|
| 288 |
+
"text": "Does composing LoRA modules extend beyond the single module’s benefits? ",
|
| 289 |
+
"page_idx": 6
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"text": "We acknowledge the investigation of cross-task performance in prior work (Jang et al., 2023), which delved into the capabilities of LoRA and proposed a novel method centered around LoRA module retrieval. In order to ensure a fair comparison, we conducted an experiment where we ",
|
| 294 |
+
"page_idx": 6
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"type": "table",
|
| 298 |
+
"img_path": "images/50cfa3a8aba9701a20f931b84cb7087e21caaca64b4ee5f70bf22283760d4739.jpg",
|
| 299 |
+
"table_caption": [
|
| 300 |
+
"Table 2: The average performance of various methods across all tasks in the benchmark BBH. "
|
| 301 |
+
],
|
| 302 |
+
"table_footnote": [],
|
| 303 |
+
"table_body": "<table><tr><td>LoRA Retrieval</td><td>LoraHub avg</td><td>LoraHub best</td></tr><tr><td>31.7</td><td>34.7</td><td>41.2</td></tr></table>",
|
| 304 |
+
"page_idx": 6
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "designed a LoRA retrieval mechanism based on the loss derived from few-shot examples. Specifically, we ranked all LoRA module candidates according to this loss and evaluated the best candidate on the test set of the unseen task. As depicted in Table 2, the performance of LoRA retrieval is notably impressive, positioning it as a strong baseline. However, in comparison to LoraHub, the performance of LoRA retrieval is relatively less favorable ",
|
| 309 |
+
"page_idx": 6
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"type": "text",
|
| 313 |
+
"text": "How effective is the gradient-free optimization method? ",
|
| 314 |
+
"page_idx": 6
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"type": "text",
|
| 318 |
+
"text": "To assess the effectiveness of our gradient-free optimization method in correctly identifying the most suitable LoRA module for a given downstream task, we carried out an empirical study using the WikiTableQuestions (Pasupat & Liang, 2015) (WTQ) dataset. We strategically included a LoRA module that was specifically trained on the WTQ dataset into our pool of LoRA candidate modules, which originally stemmed from tasks exclusive to the Flan Collection. Subsequently, we designated WTQ as the targeted downstream task and computed the weights consistent with the methods employed in LoraHub learning. As an end result, the WTQ-specific LoRA module was awarded the highest weight, exemplifying the algorithm’s success in recognizing it as the most relevant. Moreover, the combined LoRA module demonstrated marginal superiority over the WTQ LoRA module. This underscores the claim that the gradient-free optimization method has the ability to proficiently select the optimal upstream LoRA module for an unseen task. ",
|
| 319 |
+
"page_idx": 6
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"type": "text",
|
| 323 |
+
"text": "",
|
| 324 |
+
"page_idx": 7
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"type": "text",
|
| 328 |
+
"text": "Can LoraHub work well on non-instruction-tuning models? ",
|
| 329 |
+
"page_idx": 7
|
| 330 |
+
},
|
| 331 |
+
{
|
| 332 |
+
"type": "text",
|
| 333 |
+
"text": "In previous investigations, we primarily focused on models with zero-shot capabilities that were trained with instruction tuning. However, for models like T5 without zero-shot abilities, where training has a larger effect on parameters, it was unclear if LoraHub could still effectively manage and improve them. Our experiments show that although these models perform worse than FLAN-T5, LoraHub learning can still enable them to effectively generlize to unseen tasks. See Appendix C for more details. ",
|
| 334 |
+
"page_idx": 7
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "text",
|
| 338 |
+
"text": "Will the rank of LoRA modules impact the performance of LoraHub learning? ",
|
| 339 |
+
"page_idx": 7
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"type": "text",
|
| 343 |
+
"text": "The parameter rank plays a crucial role in the LoRA framework, directly influencing the number of trainable parameters utilized during LoRA tuning. This prompts an intriguing question: does the variation in rank values influence the outcomes observed within the LoraHub learning? Our analysis indicates that, for FLAN-T5, the choice of rank has minimal impact. However, for T5, it still exerts some influence. Empirical findings reveal that, in comparison to rank values of 4 or 64, a rank value of 16 consistently demonstrates superior performance across different runs, both in terms of average and optimal values. Additional results are available in Appendix C. ",
|
| 344 |
+
"page_idx": 7
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "text",
|
| 348 |
+
"text": "Does more LoRA modules lead to better results? ",
|
| 349 |
+
"page_idx": 7
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"type": "text",
|
| 353 |
+
"text": "In our main experiments, we randomly selected 20 LoRA modules for LoraHub learning. Therefore, we conducted experiments to investigate the effect of using different numbers of LoRA modules. The results demonstrate that as we increased the number of LoRA modules, the variance in performance increased. However, the maximum achievable performance also improved. More analysis on the variance and the detailed results can be found in Appendix H. ",
|
| 354 |
+
"page_idx": 7
|
| 355 |
+
},
|
| 356 |
+
{
|
| 357 |
+
"type": "text",
|
| 358 |
+
"text": "How much computational resource can be saved? ",
|
| 359 |
+
"page_idx": 7
|
| 360 |
+
},
|
| 361 |
+
{
|
| 362 |
+
"type": "text",
|
| 363 |
+
"text": "We follow to the memory test settings from the LoRA-FA (Zhang et al., 2023b) study for an accurate benchmark. In this context, full fine-tuning required about 40GB of memory, whereas LoRA fine-tuning used around 34GB. Remarkably, LoraHub only utilized about 5GB of memory, illustrating its efficiency due to the inference-only mode, which eliminates the need for storing gradients and optimization states. ",
|
| 364 |
+
"page_idx": 7
|
| 365 |
+
},
|
| 366 |
+
{
|
| 367 |
+
"type": "text",
|
| 368 |
+
"text": "6 Related work ",
|
| 369 |
+
"text_level": 1,
|
| 370 |
+
"page_idx": 7
|
| 371 |
+
},
|
| 372 |
+
{
|
| 373 |
+
"type": "text",
|
| 374 |
+
"text": "Model Merging Our method substantially draws on the concept of LoRA module composition, and thus, aligns with the significant thread of research in model merging. This research focus is broadly categorized based on the ultimate objectives of model merging. ",
|
| 375 |
+
"page_idx": 7
|
| 376 |
+
},
|
| 377 |
+
{
|
| 378 |
+
"type": "text",
|
| 379 |
+
"text": "The first category focuses on merging entire models, and the goal is to combine individually trained models to approximate the performance benefits of model ensembling or multi-task learning. Prior works (Matena & Raffel, 2021; Jin et al., 2023; Yadav et al., 2023; Wu et al., 2023a) operated under the assumption of shared model architectures. For example, Matena & Raffel (2021) amalgamates models by approximating Gaussian posterior distributions garnered from Fisher information, while Yadav et al. (2023) merges models via resolving model interferences. Another approach is merging models with different architectures. For instance, Ainsworth et al. (2023) configures weights of different models prior to their merger. Following this objective, Stoica et al. (2023) merges models operating on varying tasks by identifying common features, without requiring additional training. Unlike these works, our work focuses on merging models for better cross-task generalization. ",
|
| 380 |
+
"page_idx": 7
|
| 381 |
+
},
|
| 382 |
+
{
|
| 383 |
+
"type": "text",
|
| 384 |
+
"text": "",
|
| 385 |
+
"page_idx": 8
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"type": "text",
|
| 389 |
+
"text": "The second category most closely aligns with our research, stemming from a shared motivation of module composition. Various scholars have made advances in this line of research: Kingetsu et al. (2021) decomposes and recomposes modules on the basis of their functionality; Ilharco et al. (2023) proposes modulating model behavior using task vectors; Lv et al. (2023) amalgamates parameter-efficient modules weighted according to task similarity; Zhang et al. (2023a) crafts modules by employing specific arithmetic operations; Sun et al. (2023) improves few-shot performance of unseen tasks by multi-task pre-training of prompts; Chronopoulou et al. (2023) averages adapter weights intended for transfer; Ponti et al. (2023) focuses on jointly learning adapters and a routing function that allocates skills to each task; and Muqeeth et al. (2023) concentrates on amalgamating experts in mixture of experts models; However, these methods generally necessitate multi-task training or human prior on module selection for the downstream task. In contrast, our method does not impose any special training requirements and simply employs vanilla LoRA tuning. Additionally, the module selection for downstream tasks is entirely data-driven without human prior knowledge. This design gives the advantage of easily adding new LoRA modules for reuse, allowing our method to flexibly scale up the number of LoRA module candidates in the future. ",
|
| 390 |
+
"page_idx": 8
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"type": "text",
|
| 394 |
+
"text": "Mixture of Experts The Mixture of Experts (MoE) is an ensemble method, often visualized as a collection of sub-modules, or “experts”, each specializing in processing different types of input data. Each expert in this system is controlled by a unique gating network, activated based on the distinct nature of the input data. For every token in these input sequences, this network identifies and engages the most suitable experts to process the data. As a result, the performance is superior compared to relying on a single, generic model for all types of input. This technique has proven instrumental in numerous domains, such as natural language processing and computer vision (Jacobs et al., 1991; Shazeer et al., 2017; Du et al., 2022; Zhang et al., 2022; Wang et al., 2022; crumb, 2023). Our methodology displays similarities to MoE, wherein upstream-trained LoRA modules can be aligned with MoE’s expert design. A noteworthy distinguishing factor is that our approach mechanism does not require any specialized manipulation of LoRAs during training while facilitating dynamic LoRA module assembly at any scale, each pre-tuned to different tasks. In contrast, MoE mandates a predetermined count of experts during both the training and testing phases. Recent studies on the interrelation between MoE and instruction tuning have demonstrated that the simultaneous application of both approaches enhances the effectiveness of each individually (Shen et al., 2023). ",
|
| 395 |
+
"page_idx": 8
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"type": "text",
|
| 399 |
+
"text": "Cross-Task generalization Recent advancements like CrossFit (Ye et al., 2021), ExT5 (Aribandi et al., 2022), FLAN (Wei et al., 2022), T0 (Sanh et al., 2022), InstructGPT (Ouyang et al., 2022), and ReCross (Lin et al., 2022) have been striving to foster a vastly multi-task model’s generalization across different tasks, very much aligned with the objectives of our research. Among this cohort, the connections of CrossFit and ReCross with LoraHub are particularly noteworthy. The CrossFit framework (Ye et al., 2021) mandates a minimal number of labeled examples of the target task for few-shot fine-tuning. However, its limitation lies in the application of task names as hard prefixes in templates, posing challenges in the task’s generalization. On the other hand, while ReCross mitigates the need for labels in few-shot examples for retrieval, it necessitates a fine-tuning process using the retrieved data. This procedure appears time-consuming when compared to LoraHub’s approach. Through the deployment of few-shot labeled examples and a gradientfree optimization process, LoraHub facilitates an iterative update of weights to compose the LoRA modules. The resultant method is more efficient and cost-effective relative to previous work. Overall, LoraHub offers a more practical and viable solution to the optimization process. ",
|
| 400 |
+
"page_idx": 8
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"type": "text",
|
| 404 |
+
"text": "7 Conclusion ",
|
| 405 |
+
"text_level": 1,
|
| 406 |
+
"page_idx": 9
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"type": "text",
|
| 410 |
+
"text": "In this work, we have introduced LoraHub, a strategic framework for composing LoRA modules trained on diverse tasks in order to achieve adaptable performance on new tasks. Our approach enables the fluid combination of multiple LoRA modules using just a few examples from a novel task, without requiring additional model parameters or human expertise. The empirical results on the BBH benchmark demonstrate that LoraHub can effectively match the performance of in-context learning in few-shot scenarios, removing the need for in-context examples during inference. Overall, our work shows the promise of strategic LoRA composability for rapidly adapting LLMs to diverse tasks. By fostering reuse and combination of LoRA modules, we can work towards more general and adaptable LLMs while minimizing training costs. ",
|
| 411 |
+
"page_idx": 9
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "text",
|
| 415 |
+
"text": "Reproducibility Statement ",
|
| 416 |
+
"text_level": 1,
|
| 417 |
+
"page_idx": 9
|
| 418 |
+
},
|
| 419 |
+
{
|
| 420 |
+
"type": "text",
|
| 421 |
+
"text": "The authors have made great efforts to ensure the reproducibility of the empirical results reported in this paper. Firstly, the experiment settings, evaluation metrics, and datasets were described in detail in Section 4.1. Secondly, the codes and script for reproduce the result will be opensource after accepted. Second, the source code implementing the proposed method and experiments will be made publicly available at upon acceptance of the paper. Third, pre-trained LoRA modules from this work along with their configuration files and weights will be shared. These allow reproduction without retraining the LoRA modules, enabling quick testing and verification. ",
|
| 422 |
+
"page_idx": 9
|
| 423 |
+
},
|
| 424 |
+
{
|
| 425 |
+
"type": "text",
|
| 426 |
+
"text": "References ",
|
| 427 |
+
"text_level": 1,
|
| 428 |
+
"page_idx": 9
|
| 429 |
+
},
|
| 430 |
+
{
|
| 431 |
+
"type": "text",
|
| 432 |
+
"text": "Samuel Ainsworth, Jonathan Hayase, and Siddhartha Srinivasa. Git re-basin: Merging models modulo permutation symmetries. In The Eleventh International Conference on Learning Representations, 2023. \nShengnan An, Yifei Li, Zeqi Lin, Qian Liu, Bei Chen, Qiang Fu, Weizhu Chen, Nanning Zheng, and Jian-Guang Lou. Input-tuning: Adapting unfamiliar inputs to frozen pretrained models. ArXiv preprint, 2022. \nVamsi Aribandi, Yi Tay, Tal Schuster, Jinfeng Rao, Huaixiu Steven Zheng, Sanket Vaibhav Mehta, Honglei Zhuang, Vinh Q. Tran, Dara Bahri, Jianmo Ni, Jai Prakash Gupta, Kai Hui, Sebastian Ruder, and Donald Metzler. Ext5: Towards extreme multi-task scaling for transfer learning. In Proc. of ICLR, 2022. \nStephen Bach, Victor Sanh, Zheng Xin Yong, Albert Webson, Colin Raffel, Nihal V. Nayak, Abheesht Sharma, Taewoon Kim, M Saiful Bari, Thibault Fevry, Zaid Alyafeai, Manan Dey, Andrea Santilli, Zhiqing Sun, Srulik Ben-david, Canwen Xu, Gunjan Chhablani, Han Wang, Jason Fries, Maged Al-shaibani, Shanya Sharma, Urmish Thakker, Khalid Almubarak, Xiangru Tang, Dragomir Radev, Mike Tian-jian Jiang, and Alexander Rush. PromptSource: An integrated development environment and repository for natural language prompts. In Proc. of ACL, 2022. \nTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, MariaFlorina Balcan, and Hsuan-Tien Lin (eds.), Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. ",
|
| 433 |
+
"page_idx": 9
|
| 434 |
+
},
|
| 435 |
+
{
|
| 436 |
+
"type": "text",
|
| 437 |
+
"text": "Alexis Chevalier, Alexander Wettig, Anirudh Ajith, and Danqi Chen. Adapting language models to compress contexts. CoRR, abs/2305.14788, 2023. doi: 10.48550/ARXIV.2305. 14788. URL https://doi.org/10.48550/arXiv.2305.14788. ",
|
| 438 |
+
"page_idx": 10
|
| 439 |
+
},
|
| 440 |
+
{
|
| 441 |
+
"type": "text",
|
| 442 |
+
"text": "Alexandra Chronopoulou, Matthew Peters, Alexander Fraser, and Jesse Dodge. AdapterSoup: Weight averaging to improve generalization of pretrained language models. In Findings of the Association for Computational Linguistics: EACL 2023, 2023. ",
|
| 443 |
+
"page_idx": 10
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"type": "text",
|
| 447 |
+
"text": "Hyung Won Chung, Le Hou, S. Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, Albert Webson, Shixiang Shane Gu, Zhuyun Dai, Mirac Suzgun, Xinyun Chen, Aakanksha Chowdhery, Dasha Valter, Sharan Narang, Gaurav Mishra, Adams Wei Yu, Vincent Zhao, Yanping Huang, Andrew M. Dai, Hongkun Yu, Slav Petrov, Ed Huai hsin Chi, Jeff Dean, Jacob Devlin, Adam Roberts, Denny Zhou, Quoc V. Le, and Jason Wei. Scaling instruction-finetuned language models. ArXiv preprint, 2022. \ncrumb. Llama-2, mixutre of lora. https://crumbly.medium.com/ llama-2-molora-f5f909434711, 2023. \nNan Du, Yanping Huang, Andrew M. Dai, Simon Tong, Dmitry Lepikhin, Yuanzhong Xu, Maxim Krikun, Yanqi Zhou, Adams Wei Yu, Orhan Firat, Barret Zoph, Liam Fedus, Maarten P. Bosma, Zongwei Zhou, Tao Wang, Yu Emma Wang, Kellie Webster, Marie Pellat, Kevin Robinson, Kathleen S. Meier-Hellstern, Toju Duke, Lucas Dixon, Kun Zhang, Quoc V. Le, Yonghui Wu, Zhifeng Chen, and Claire Cui. Glam: Efficient scaling of language models with mixture-of-experts. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), ´ International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, Proceedings of Machine Learning Research, 2022. \nTao Ge, Jing Hu, Xun Wang, Si-Qing Chen, and Furu Wei. In-context autoencoder for context compression in a large language model. CoRR, abs/2307.06945, 2023. doi: 10. 48550/ARXIV.2307.06945. URL https://doi.org/10.48550/arXiv.2307.06945. \nAryo Pradipta Gema, Luke Daines, Pasquale Minervini, and Beatrice Alex. Parameterefficient fine-tuning of llama for the clinical domain. ArXiv preprint, 2023. \nNikolaus Hansen and Andreas Ostermeier. Adapting arbitrary normal mutation distributions in evolution strategies: the covariance matrix adaptation. Proceedings of IEEE International Conference on Evolutionary Computation, 1996. \nJunxian He, Chunting Zhou, Xuezhe Ma, Taylor Berg-Kirkpatrick, and Graham Neubig. Towards a unified view of parameter-efficient transfer learning. In Proc. of ICLR, 2022. \nEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. In Proc. of ICLR, 2022. \nGabriel Ilharco, Marco Tulio Ribeiro, Mitchell Wortsman, Ludwig Schmidt, Hannaneh Hajishirzi, and Ali Farhadi. Editing models with task arithmetic. In The Eleventh International Conference on Learning Representations, 2023. \nRobert A. Jacobs, Michael I. Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. Adaptive mixtures of local experts. Neural Computation, 1991. \nJoel Jang, Seungone Kim, Seonghyeon Ye, Doyoung Kim, Lajanugen Logeswaran, Moontae Lee, Kyungjae Lee, and Minjoon Seo. Exploring the benefits of training expert language models over instruction tuning. In International Conference on Machine Learning, 2023. URL https://api.semanticscholar.org/CorpusID:256627673. \nHuiqiang Jiang, Qianhui Wu, Chin-Yew Lin, Yuqing Yang, and Lili Qiu. Llmlingua: Compressing prompts for accelerated inference of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, December 2023a. URL https://arxiv.org/abs/2310.05736. ",
|
| 448 |
+
"page_idx": 10
|
| 449 |
+
},
|
| 450 |
+
{
|
| 451 |
+
"type": "text",
|
| 452 |
+
"text": "Huiqiang Jiang, Qianhui Wu, Xufang Luo, Dongsheng Li, Chin-Yew Lin, Yuqing Yang, and Lili Qiu. Longllmlingua: Accelerating and enhancing llms in long context scenarios via prompt compression. CoRR, abs/2310.06839, 2023b. doi: 10.48550/ARXIV.2310.06839. URL https://doi.org/10.48550/arXiv.2310.06839. ",
|
| 453 |
+
"page_idx": 11
|
| 454 |
+
},
|
| 455 |
+
{
|
| 456 |
+
"type": "text",
|
| 457 |
+
"text": "Xisen Jin, Xiang Ren, Daniel Preotiuc-Pietro, and Pengxiang Cheng. Dataless knowledge fusion by merging weights of language models. In The Eleventh International Conference on Learning Representations, 2023. \nHiroaki Kingetsu, Kenichi Kobayashi, and Taiji Suzuki. Neural network module decomposition and recomposition. ArXiv preprint, 2021. \nBrian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In Proc. of EMNLP, 2021. \nYucheng Li, Bo Dong, Chenghua Lin, and Frank Guerin. Compressing context to enhance inference efficiency of large language models. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, December 2023. URL https://arxiv.org/abs/2310.06201. \nBill Yuchen Lin, Kangmin Tan, Chris Miller, Beiwen Tian, and Xiang Ren. Unsupervised cross-task generalization via retrieval augmentation. In NeurIPS, 2022. \nHaokun Liu, Derek Tam, Mohammed Muqeeth, Jay Mohta, Tenghao Huang, Mohit Bansal, and Colin Raffel. Few-shot parameter-efficient fine-tuning is better and cheaper than incontext learning. ArXiv, abs/2205.05638, 2022. URL https://api.semanticscholar.org/ CorpusID:248693283. \nJialin Liu, A. Moreau, Mike Preuss, Baptiste Roziere, J \\` er´ emy Rapin, Fabien Teytaud, and ´ Olivier Teytaud. Versatile black-box optimization. Proceedings of the 2020 Genetic and Evolutionary Computation Conference, 2020. \nShayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V. Le, Barret Zoph, Jason Wei, and Adam Roberts. The flan collection: Designing data and methods for effective instruction tuning, 2023. \nXingtai Lv, Ning Ding, Yujia Qin, Zhiyuan Liu, and Maosong Sun. Parameter-efficient weight ensembling facilitates task-level knowledge transfer. In Annual Meeting of the Association for Computational Linguistics, 2023. \nSourab Mangrulkar, Sylvain Gugger, Lysandre Debut, Younes Belkada, and Sayak Paul. Peft: State-of-the-art parameter-efficient fine-tuning methods. https://github.com/ huggingface/peft, 2022. \nMichael Matena and Colin Raffel. Merging models with fisher-weighted averaging. ArXiv preprint, 2021. \nSewon Min, Mike Lewis, Luke Zettlemoyer, and Hannaneh Hajishirzi. MetaICL: Learning to learn in context. In Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, 2022. \nSwaroop Mishra, Daniel Khashabi, Chitta Baral, and Hannaneh Hajishirzi. Cross-task generalization via natural language crowdsourcing instructions. In Proc. of ACL, 2022. \nMohammed Muqeeth, Haokun Liu, and Colin Raffel. Soft merging of experts with adaptive routing. ArXiv preprint, 2023. \nOpenAI. ChatGPT. 2022. URL https://openai.com/blog/chatgpt. \nLong Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke E. Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Francis Christiano, Jan Leike, and Ryan J. Lowe. Training language models to follow instructions with human feedback. ArXiv preprint, 2022. ",
|
| 458 |
+
"page_idx": 11
|
| 459 |
+
},
|
| 460 |
+
{
|
| 461 |
+
"type": "text",
|
| 462 |
+
"text": "Panupong Pasupat and Percy Liang. Compositional semantic parsing on semi-structured tables. In Proc. of ACL, 2015. ",
|
| 463 |
+
"page_idx": 12
|
| 464 |
+
},
|
| 465 |
+
{
|
| 466 |
+
"type": "text",
|
| 467 |
+
"text": "Edoardo Maria Ponti, Alessandro Sordoni, Yoshua Bengio, and Siva Reddy. Combining parameter-efficient modules for task-level generalisation. In Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, 2023. ",
|
| 468 |
+
"page_idx": 12
|
| 469 |
+
},
|
| 470 |
+
{
|
| 471 |
+
"type": "text",
|
| 472 |
+
"text": "Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 2020. ",
|
| 473 |
+
"page_idx": 12
|
| 474 |
+
},
|
| 475 |
+
{
|
| 476 |
+
"type": "text",
|
| 477 |
+
"text": "J. Rapin and O. Teytaud. Nevergrad - A gradient-free optimization platform. https:// GitHub.com/FacebookResearch/Nevergrad, 2018. ",
|
| 478 |
+
"page_idx": 12
|
| 479 |
+
},
|
| 480 |
+
{
|
| 481 |
+
"type": "text",
|
| 482 |
+
"text": "Victor Sanh, Albert Webson, Colin Raffel, Stephen H. Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal V. Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Teven Le Scao, Stella Biderman, Leo Gao, ´ Thomas Wolf, and Alexander M. Rush. Multitask prompted training enables zero-shot task generalization. In Proc. of ICLR, 2022. ",
|
| 483 |
+
"page_idx": 12
|
| 484 |
+
},
|
| 485 |
+
{
|
| 486 |
+
"type": "text",
|
| 487 |
+
"text": "Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc V. Le, Geoffrey E. Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gated mixtureof-experts layer. In Proc. of ICLR, 2017. ",
|
| 488 |
+
"page_idx": 12
|
| 489 |
+
},
|
| 490 |
+
{
|
| 491 |
+
"type": "text",
|
| 492 |
+
"text": "Sheng Shen, Le Hou, Yanqi Zhou, Nan Du, Shayne Longpre, Jason Wei, Hyung Won Chung, Barret Zoph, William Fedus, Xinyun Chen, Tu Vu, Yuexin Wu, Wuyang Chen, Albert Webson, Yunxuan Li, Vincent Zhao, Hongkun Yu, Kurt Keutzer, Trevor Darrell, and Denny Zhou. Mixture-of-experts meets instruction tuning:a winning combination for large language models, 2023. ",
|
| 493 |
+
"page_idx": 12
|
| 494 |
+
},
|
| 495 |
+
{
|
| 496 |
+
"type": "text",
|
| 497 |
+
"text": "George Stoica, Daniel Bolya, Jakob Bjorner, Taylor Hearn, and Judy Hoffman. Zipit! merging models from different tasks without training. arXiv, 2023. ",
|
| 498 |
+
"page_idx": 12
|
| 499 |
+
},
|
| 500 |
+
{
|
| 501 |
+
"type": "text",
|
| 502 |
+
"text": "Tianxiang Sun, Yunfan Shao, Hong Qian, Xuanjing Huang, and Xipeng Qiu. Black-box tuning for language-model-as-a-service. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato (eds.), ´ International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, Proceedings of Machine Learning Research, 2022. ",
|
| 503 |
+
"page_idx": 12
|
| 504 |
+
},
|
| 505 |
+
{
|
| 506 |
+
"type": "text",
|
| 507 |
+
"text": "Tianxiang Sun, Zhengfu He, Qin Zhu, Xipeng Qiu, and Xuanjing Huang. Multitask pretraining of modular prompt for Chinese few-shot learning. In Proc. of ACL, 2023. ",
|
| 508 |
+
"page_idx": 12
|
| 509 |
+
},
|
| 510 |
+
{
|
| 511 |
+
"type": "text",
|
| 512 |
+
"text": "Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothee Lacroix, Baptiste Rozi ´ ere, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien \\` Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Llama: Open and efficient foundation language models. ArXiv preprint, 2023. ",
|
| 513 |
+
"page_idx": 12
|
| 514 |
+
},
|
| 515 |
+
{
|
| 516 |
+
"type": "text",
|
| 517 |
+
"text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett (eds.), Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, 2017. ",
|
| 518 |
+
"page_idx": 12
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "text",
|
| 522 |
+
"text": "Yaqing Wang, Sahaj Agarwal, Subhabrata Mukherjee, Xiaodong Liu, Jing Gao, Ahmed Hassan Awadallah, and Jianfeng Gao. AdaMix: Mixture-of-adaptations for parameter-efficient model tuning. In Proc. of EMNLP, 2022. ",
|
| 523 |
+
"page_idx": 12
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"type": "text",
|
| 527 |
+
"text": "Jason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V. Le. Finetuned language models are zero-shot learners. In Proc. of ICLR, 2022. \nChengyue Wu, Teng Wang, Yixiao Ge, Zeyu Lu, Ruisong Zhou, Ying Shan, and Ping Luo. $\\pi$ -tuning: Transferring multimodal foundation models with optimal multi-task interpolation. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett (eds.), International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pp. 37713–37727. PMLR, 2023a. URL https://proceedings.mlr. press/v202/wu23t.html. \nShijie Wu, Ozan Irsoy, Steven Lu, Vadim Dabravolski, Mark Dredze, Sebastian Gehrmann, Prabhanjan Kambadur, David S. Rosenberg, and Gideon Mann. Bloomberggpt: A large language model for finance. CoRR, abs/2303.17564, 2023b. doi: 10.48550/arXiv.2303. 17564. URL https://doi.org/10.48550/arXiv.2303.17564. \nPrateek Yadav, Derek Tam, Leshem Choshen, Colin Raffel, and Mohit Bansal. TIESmerging: Resolving interference when merging models. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id= xtaX3WyCj1. \nQinyuan Ye, Bill Yuchen Lin, and Xiang Ren. CrossFit: A few-shot learning challenge for cross-task generalization in NLP. In Proc. of EMNLP, 2021. \nChris Zhang, Mengye Ren, and Raquel Urtasun. Graph hypernetworks for neural architecture search. In Proc. of ICLR, 2019. \nFan Zhang, Duyu Tang, Yong Dai, Cong Zhou, Shuangzhi Wu, and Shuming Shi. Skillnetnlu: A sparsely activated model for general-purpose natural language understanding, 2022. \nJinghan Zhang, Shiqi Chen, Junteng Liu, and Junxian He. Composing parameter-efficient modules with arithmetic operations. ArXiv preprint, 2023a. \nLongteng Zhang, Lin Zhang, Shaohuai Shi, Xiaowen Chu, and Bo Li. Lora-fa: Memory-efficient low-rank adaptation for large language models fine-tuning. ArXiv, abs/2308.03303, 2023b. URL https://api.semanticscholar.org/CorpusID:260683267. \nWangchunshu Zhou, Yuchen Eleanor Jiang, Ryan Cotterell, and Mrinmaya Sachan. Efficient prompting via dynamic in-context learning. CoRR, abs/2305.11170, 2023. doi: 10.48550/ARXIV.2305.11170. URL https://doi.org/10.48550/arXiv.2305.11170. ",
|
| 528 |
+
"page_idx": 13
|
| 529 |
+
},
|
| 530 |
+
{
|
| 531 |
+
"type": "table",
|
| 532 |
+
"img_path": "images/8025498f3c910dbeea940a1ac3d7d18dc6c8a3edff07b8bec4d71d0b1464157c.jpg",
|
| 533 |
+
"table_caption": [
|
| 534 |
+
"Table 3: The top five beneficial LoRA modules for BBH tasks and their associated upstream tasks, the average weight values and the average performance on all BBH tasks. "
|
| 535 |
+
],
|
| 536 |
+
"table_footnote": [],
|
| 537 |
+
"table_body": "<table><tr><td>Rank</td><td>Dataset: Task</td><td>Weight</td><td>Perf</td><td>Task Description</td></tr><tr><td>1</td><td>WIQA: Last Process</td><td>0.72</td><td>28.1</td><td> Identifying the last step of a given process.</td></tr><tr><td>2</td><td>RACE: Is this the Right Answer</td><td>0.68</td><td>30.8</td><td>Determining if given answer is correct.</td></tr><tr><td>3</td><td>WIQA: First Process</td><td>0.63</td><td>28.1</td><td> Identifying the first step of a given process.</td></tr><tr><td>4</td><td>AdversarialQA: BiDAF</td><td>0.61</td><td>25.1</td><td>Aserialmode-in-the-eby an</td></tr><tr><td>5</td><td>WebQuestions: What is the Answer</td><td>0.58</td><td>27.0</td><td> Asweringrqomesten based oninformation</td></tr></table>",
|
| 538 |
+
"page_idx": 14
|
| 539 |
+
},
|
| 540 |
+
{
|
| 541 |
+
"type": "text",
|
| 542 |
+
"text": "A More Analysis ",
|
| 543 |
+
"text_level": 1,
|
| 544 |
+
"page_idx": 14
|
| 545 |
+
},
|
| 546 |
+
{
|
| 547 |
+
"type": "text",
|
| 548 |
+
"text": "Which LoRA modules are most effective for BBH tasks? ",
|
| 549 |
+
"page_idx": 14
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"type": "text",
|
| 553 |
+
"text": "We hypothesized that the amalgamation of LoRA modules could incorporate skills and insights from a variety of specific tasks. To evaluate this, we examined the extent of influence a single LoRA module had amongst all tasks from the BBH benchmark. We measured the impact of each isolated task by calculating the average absolute weight. The top five modules, presented in Table 3, were found to have substantial influence, as indicated by their maximum average weights, which suggested that they were notably more effective in cross-task transfer. Remarkably, a common feature among these top five modules was their association with tasks requiring reading comprehension and reasoning skills—attributes indicative of higher cognitive complexity. However, it is worth noting that none of the modules exhibited consistent improvement across all BBH tasks, as reflected in their average performance on all BBH tasks, which did not show a significant improvement compared to the original FLAN-T5-large, except for the Rank 2. The results underscore the advantages of composing diverse modules in LoraHub. ",
|
| 554 |
+
"page_idx": 14
|
| 555 |
+
},
|
| 556 |
+
{
|
| 557 |
+
"type": "text",
|
| 558 |
+
"text": "How effective is the gradient-free optimization method? ",
|
| 559 |
+
"page_idx": 14
|
| 560 |
+
},
|
| 561 |
+
{
|
| 562 |
+
"type": "text",
|
| 563 |
+
"text": "To assess the effectiveness of our gradient-free optimization method in correctly identifying the most suitable LoRA module for a given downstream task, we carried out an empirical study using the WikiTableQuestions (Pasupat & Liang, 2015) (WTQ) dataset. We strategically included a LoRA module that was specifically trained on the WTQ dataset into our pool of LoRA candidate modules, which originally stemmed from tasks exclusive to the Flan Collection. Subsequently, we designated WTQ as the targeted downstream task and computed the weights consistent with the methods employed in LoraHub learning. As an end result, the WTQ-specific LoRA module was awarded the highest weight, exemplifying the algorithm’s success in recognizing it as the most relevant. Moreover, the combined LoRA module demonstrated marginal superiority over the WTQ LoRA module. This underscores the claim that the gradient-free optimization method has the ability to proficiently select the optimal upstream LoRA module for an unseen task. ",
|
| 564 |
+
"page_idx": 14
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"type": "text",
|
| 568 |
+
"text": "B Result of Best Results ",
|
| 569 |
+
"text_level": 1,
|
| 570 |
+
"page_idx": 14
|
| 571 |
+
},
|
| 572 |
+
{
|
| 573 |
+
"type": "text",
|
| 574 |
+
"text": "As shown in Table 4, compared to gradient-based parameter-efficient training methods like LoRA and IA3, our approach demonstrates superior performance in terms of best results over experimental runs. While it exhibits a noticeable lag behind the fully fine-tuning (FFT) method, which updates all parameters during training, this observation suggests that our proposed method has a promising upper limit. We anticipate that future research efforts can contribute to accelerating the optimization speed and further enhancing the efficacy of our approach. ",
|
| 575 |
+
"page_idx": 14
|
| 576 |
+
},
|
| 577 |
+
{
|
| 578 |
+
"type": "table",
|
| 579 |
+
"img_path": "images/95c66e826a893a9a4a0a9da3fa42a7b74e1324af47f01994c7ebe53ba5447ca0.jpg",
|
| 580 |
+
"table_caption": [
|
| 581 |
+
"Table 4: Experimental results of several few-shot methods, including in-context learning (ICL), IA3 fine-tuning (IA3), LoRA tuning (LoRA), full fine-tuning (FFT) and our LoraHub learning (LoraHub) on the BBH benchmark with FLAN-T5-large as the base LLM. We denote algorithmic tasks with the superscript $\\ S$ following previous work (Wu et al., 2023b). Note that we use 5 examples per task as the demonstration for all methods. The best (best) performance is reported as the maximum value obtained across three runs. "
|
| 582 |
+
],
|
| 583 |
+
"table_footnote": [],
|
| 584 |
+
"table_body": "<table><tr><td>Task</td><td>ICLbest</td><td>IA3best</td><td>LoRAbest</td><td>FFTbest</td><td>LoraHubbest</td></tr><tr><td>Boolean Expressions</td><td>62.7</td><td>58.0</td><td>60.7</td><td>65.3</td><td>60.7</td></tr><tr><td>Causal Judgement</td><td>59.8</td><td>62.1</td><td>57.5</td><td>60.9</td><td>63.2</td></tr><tr><td>Date Understanding</td><td>21.3</td><td>20.7</td><td>40.7</td><td>67.3</td><td>45.3</td></tr><tr><td>Disambiguation</td><td>69.3</td><td>0.0</td><td>68.7</td><td>70.7</td><td>68.0</td></tr><tr><td>Dyck Languages</td><td>2.0</td><td>4.7</td><td>25.3</td><td>33.3</td><td>2.7</td></tr><tr><td>Formal Fallacies</td><td>59.3</td><td>52.0</td><td>56.7</td><td>56.0</td><td>59.3</td></tr><tr><td>Geometric Shapes</td><td>20.0</td><td>15.3</td><td>28.7</td><td>39.3</td><td>18.7</td></tr><tr><td>Hyperbaton</td><td>72.7</td><td>49.3</td><td>57.3</td><td>82.0</td><td>72.7</td></tr><tr><td>Logical DeductionS (five objects)</td><td>39.3</td><td>32.7</td><td>41.3</td><td>43.3</td><td>40.0</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>42.0</td><td>34.0</td><td>42.7</td><td>46.0</td><td>46.0</td></tr><tr><td>LogicalDrectjoets)</td><td>52.7</td><td>8.7</td><td>56.7</td><td>60.7</td><td>52.7</td></tr><tr><td>Movie Recommendation</td><td>56.7</td><td>62.0</td><td>64.5</td><td>70.7</td><td>62.0</td></tr><tr><td>Multistep Arithmetic</td><td>0.7</td><td>0.7</td><td>0.7</td><td>0.0</td><td>1.3</td></tr><tr><td>Navigate</td><td>46.7</td><td>47.3</td><td>50.7</td><td>50.0</td><td>51.3</td></tr><tr><td>Object Counting</td><td>34.7</td><td>35.3</td><td>42.0</td><td>38.0</td><td>36.7</td></tr><tr><td>Penguins in a Table</td><td>43.5</td><td>45.7</td><td>41.3</td><td>37.0</td><td>47.8</td></tr><tr><td>Reasoning about Colored Objects</td><td>41.3</td><td>41.3</td><td>40.7</td><td>38.7</td><td>44.7</td></tr><tr><td>Ruin Names</td><td>20.7</td><td>25.3</td><td>42.0</td><td>66.0</td><td>28.7</td></tr><tr><td>Salient Translation Error Detection</td><td>48.0</td><td>37.3</td><td>17.3</td><td>21.3</td><td>42.7</td></tr><tr><td>Snarks</td><td>55.1</td><td>56.4</td><td>59.0</td><td>69.2</td><td>61.5</td></tr><tr><td>Sports Understanding</td><td>56.7</td><td>55.3</td><td>58.7</td><td>58.7</td><td>62.7</td></tr><tr><td>Temporal Sequences</td><td>26.7</td><td>18.7</td><td>31.3</td><td>48.7</td><td>21.3</td></tr><tr><td>Tracking Shuffled ObjectsS (five objects)</td><td>12.0</td><td>12.0</td><td>16.0</td><td>20.0</td><td>16.7</td></tr><tr><td>Tracking Shuffled ObjectsS (seven objects)</td><td>6.7</td><td>6.7</td><td>12.0</td><td>10.0</td><td>15.3</td></tr><tr><td>Tracking Shuffled ObjectsS (three objects)</td><td>31.3</td><td>30.7</td><td>32.0</td><td>36.0</td><td>31.3</td></tr><tr><td>Web of Lies</td><td>54.0</td><td>54.7</td><td>55.3</td><td>54.0</td><td>57.3</td></tr><tr><td>Word Sorting</td><td>0.7</td><td>1.3</td><td>5.3</td><td>6.0</td><td>1.3</td></tr><tr><td>Best Performance (Average)</td><td>38.4</td><td>32.1</td><td>40.9</td><td>46.2</td><td>41.2</td></tr></table>",
|
| 585 |
+
"page_idx": 15
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"type": "text",
|
| 589 |
+
"text": "C Result of non-instrcution-tuned models ",
|
| 590 |
+
"text_level": 1,
|
| 591 |
+
"page_idx": 16
|
| 592 |
+
},
|
| 593 |
+
{
|
| 594 |
+
"type": "table",
|
| 595 |
+
"img_path": "images/0a96643f4a27749431647c2c4c4281dfc58fdf816ad0790812621e1af017102a.jpg",
|
| 596 |
+
"table_caption": [
|
| 597 |
+
"Table 5: Comparsion among different ranks for few-shot LoraHub learning with the backbone T5-large (Raffel et al., 2020) on the BBH benchmark. Note that the T5-large model achieved $0 . { \\bar { 0 } } \\%$ on all tasks under the zero-shot setting except Dyck Languages, where it scored $0 . 6 7 \\%$ . "
|
| 598 |
+
],
|
| 599 |
+
"table_footnote": [],
|
| 600 |
+
"table_body": "<table><tr><td>Task ↓ Rank →</td><td></td><td>4best 4avg</td><td>16avg</td><td>16best</td><td>64avg</td><td>64best</td></tr><tr><td>Boolean Expressions</td><td></td><td>52.13 57.33</td><td>50.67</td><td>58.00</td><td>47.47</td><td>58.00</td></tr><tr><td>Causal Judgement</td><td>52.41</td><td>55.17</td><td>49.66</td><td>54.02</td><td>50.80</td><td>54.02</td></tr><tr><td>Date Understanding</td><td>0.40</td><td>2.00</td><td>14.40</td><td>29.33</td><td>4.53</td><td>10.00</td></tr><tr><td>Disambiguation</td><td>10.00</td><td>31.33</td><td>26.93</td><td>42.00</td><td>1.73</td><td>4.67</td></tr><tr><td>Dyck Languages</td><td>0.40</td><td>0.67</td><td>0.40</td><td>0.67</td><td>0.40</td><td>2.00</td></tr><tr><td>Formal Fallacies</td><td>48.40</td><td>54.00</td><td>46.93</td><td>51.33</td><td>46.93</td><td>50.00</td></tr><tr><td>Geometric Shapes</td><td>0.00</td><td>0.00</td><td>6.53</td><td>32.67</td><td>1.47</td><td>7.33</td></tr><tr><td>Hyperbaton</td><td>30.13</td><td>50.00</td><td>39.07</td><td> 57.33</td><td>32.93</td><td>48.00</td></tr><tr><td>Logical DeductionS (five objects)</td><td>5.20</td><td>14.67</td><td>8.80</td><td>19.33</td><td>1.33</td><td>6.67</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>6.40</td><td>17.33</td><td>9.33</td><td>19.33</td><td>3.47</td><td>16.00</td></tr><tr><td>Logical DeductionS</td><td>14.40</td><td>32.00</td><td>21.73</td><td>34.67</td><td>6.93</td><td>15.33</td></tr><tr><td>(three objects) Movie Recommendation</td><td>7.07</td><td>18.67</td><td>7.87</td><td>22.00</td><td>1.20</td><td>6.00</td></tr><tr><td>Multistep Arithmetic two</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>Navigate</td><td>49.60</td><td>54.67</td><td>52.27</td><td>56.67</td><td>49.87</td><td>52.00</td></tr><tr><td>Object Counting</td><td>7.20</td><td>18.00</td><td>16.00</td><td>21.33</td><td>13.73</td><td>26.67</td></tr><tr><td>Penguins ina Table</td><td>6.52</td><td>13.04</td><td>10.43</td><td>17.39</td><td>0.43</td><td>2.17</td></tr><tr><td>Reasoning about Colored Objects</td><td>6.27</td><td>10.00</td><td>5.07</td><td>16.67</td><td>0.53</td><td>2.67</td></tr><tr><td>Ruin Names</td><td>7.73</td><td>13.33</td><td>13.20</td><td>28.00</td><td>5.73</td><td>15.33</td></tr><tr><td>Salient Translation Error Detection</td><td>0.00</td><td>0.00</td><td>1.73</td><td>8.67</td><td>0.00</td><td>0.00</td></tr><tr><td>Snarks</td><td>21.28</td><td>42.31</td><td>49.49</td><td>60.26</td><td>16.15</td><td>38.46</td></tr><tr><td> Sports Understanding</td><td>46.53</td><td>58.67</td><td>46.80</td><td>58.67</td><td>46.53</td><td>58.67</td></tr><tr><td>Temporal Sequences</td><td>3.07</td><td>13.33</td><td>6.53</td><td>26.67</td><td>2.40</td><td>12.00</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>5.20</td><td>14.00</td><td>4.13</td><td>9.33</td><td>0.13</td><td>0.67</td></tr><tr><td>(five objects) Tracking Shuffled ObjectsS (seven objects)</td><td>2.67</td><td>10.00</td><td>2.80</td><td>14.00</td><td>3.20</td><td>8.00</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>3.73</td><td>17.33</td><td>16.27</td><td>34.67</td><td>5.87</td><td>26.67</td></tr><tr><td>(three objects) Web of Lies</td><td>48.53</td><td>54.00</td><td></td><td></td><td></td><td> 57.33</td></tr><tr><td>Word Sorting</td><td>0.40</td><td>0.67</td><td>54.00 0.13</td><td>56.00 0.67</td><td>54.67 0.00</td><td>0.00</td></tr><tr><td></td><td></td><td></td><td>20.78</td><td></td><td></td><td></td></tr><tr><td>Average Performance per Task</td><td>16.14</td><td>24.17</td><td></td><td>30.73</td><td>14.76</td><td>21.43</td></tr></table>",
|
| 601 |
+
"page_idx": 16
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"type": "text",
|
| 605 |
+
"text": "D Result of larger model ",
|
| 606 |
+
"text_level": 1,
|
| 607 |
+
"page_idx": 17
|
| 608 |
+
},
|
| 609 |
+
{
|
| 610 |
+
"type": "text",
|
| 611 |
+
"text": "Table 6: Experimental results of zero-shot learning (Zero) and our few-shot LoraHub learning (LoraHub) on the BBH benchmark with FLAN-T5-xl as the base LLM. Note that we use 5 examples per task as the demonstration for both ICL and LoraHub. The average $( a v g )$ performance of LoraHub is computed over 5 runs with different random seeds, while the best (best) performance is reported as the maximum value obtained across these runs. We can see the trend of the results are similar to FLAN-T5-large. ",
|
| 612 |
+
"page_idx": 17
|
| 613 |
+
},
|
| 614 |
+
{
|
| 615 |
+
"type": "table",
|
| 616 |
+
"img_path": "images/0ab8ee9f98ef9b7388aa22dd0aeb88c7626414f78e70ff4407066b0bb2b27a06.jpg",
|
| 617 |
+
"table_caption": [],
|
| 618 |
+
"table_footnote": [],
|
| 619 |
+
"table_body": "<table><tr><td>Task</td><td>Zero</td><td>LoraHub avg</td><td>LoraHub best</td></tr><tr><td>Boolean Expressions</td><td>52.0</td><td>58.7</td><td>63.3</td></tr><tr><td>Causal Judgement</td><td>62.1</td><td>53.8</td><td>59.8</td></tr><tr><td>Date Understanding</td><td>38.0</td><td>37.6</td><td>38.0</td></tr><tr><td>Disambiguation Qa</td><td>0.0</td><td>20.5</td><td> 54.7</td></tr><tr><td>Dyck Languages</td><td>1.3</td><td>0.9</td><td>2.0</td></tr><tr><td>Formal Fallacies</td><td>56.0</td><td>56.0</td><td>56.0</td></tr><tr><td>Geometric Shapes</td><td>8.7</td><td>17.5</td><td>28.0</td></tr><tr><td>Hyperbaton</td><td>45.3</td><td>53.5</td><td>56.7</td></tr><tr><td>Logical DeductionS (five objects)</td><td>1.3</td><td>42.7</td><td>48.7</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>8.7</td><td>44.3</td><td>50.0</td></tr><tr><td>Logical DeductionS (three objects)</td><td>0.7</td><td>56.4</td><td>61.3</td></tr><tr><td>Movie Recommendation</td><td>2.0</td><td>62.8</td><td>66.0</td></tr><tr><td>Multistep Arithmetic Two</td><td>0.0</td><td>0.4</td><td>0.7</td></tr><tr><td>Navigate</td><td>50.7</td><td>50.7</td><td>50.7</td></tr><tr><td>Object Counting</td><td>39.3</td><td>40.7</td><td>48.0</td></tr><tr><td>Penguins In A Table</td><td>17.4</td><td>40.9</td><td>45.7</td></tr><tr><td> Reasoning About Colored Objects</td><td>46.7</td><td>47.3</td><td>50.7</td></tr><tr><td>Ruin Names</td><td>18.0</td><td>35.6</td><td>44.7</td></tr><tr><td>Salient Translation Error Detection</td><td>44.7</td><td>45.1</td><td>48.7</td></tr><tr><td>Snarks</td><td>60.3</td><td>60.8</td><td>61.5</td></tr><tr><td>Sports Understanding</td><td>56.7</td><td>51.3</td><td>53.3</td></tr><tr><td>Temporal Sequences</td><td>21.3</td><td>21.5</td><td>22.0</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>3.3</td><td>9.9</td><td>13.3</td></tr><tr><td>(five objects) Tracking Shuffled ObjectsS (seven objects)</td><td>5.3</td><td>7.3</td><td>8.7</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>7.3</td><td>21.7</td><td>31.3</td></tr><tr><td>(three objects) Web Of Lies</td><td>54.7</td><td>47.1</td><td>48.7</td></tr><tr><td>Word Sorting</td><td>1.3</td><td>1.5</td><td>2.0</td></tr><tr><td>Average Performance per Task</td><td>25.8</td><td>36.5</td><td>41.3</td></tr></table>",
|
| 620 |
+
"page_idx": 17
|
| 621 |
+
},
|
| 622 |
+
{
|
| 623 |
+
"type": "text",
|
| 624 |
+
"text": "E Improving the Robustness of LoraHub ",
|
| 625 |
+
"text_level": 1,
|
| 626 |
+
"page_idx": 18
|
| 627 |
+
},
|
| 628 |
+
{
|
| 629 |
+
"type": "text",
|
| 630 |
+
"text": "In order to enhance the robustness of LoraHub, we explored a straightforward approach in the selection of LoRA module candidates. Specifically, we first identified 20 LoRA module candidates with the lowest loss on the few-shot examples. Our findings indicate a slight improvement in overall performance after applying the pre-filtering startegy. Since the primary instability in our approach arises from the selection of LoRA candidates. This method involves choosing a fixed set of LoRA candidates to ensure the stability of our approach. ",
|
| 631 |
+
"page_idx": 18
|
| 632 |
+
},
|
| 633 |
+
{
|
| 634 |
+
"type": "table",
|
| 635 |
+
"img_path": "images/d6f6dad37f46055044f3fa33031ace9323de2344f42ee9318d2484d1ab05748f.jpg",
|
| 636 |
+
"table_caption": [
|
| 637 |
+
"Table 7: The experimental results of loss-based pre-filtering. "
|
| 638 |
+
],
|
| 639 |
+
"table_footnote": [],
|
| 640 |
+
"table_body": "<table><tr><td>Task</td><td>LoraHubavg</td><td>LoraHubfilter</td></tr><tr><td>Boolean Expressions</td><td>55.5</td><td>60.00</td></tr><tr><td>Causal Judgement</td><td>54.3</td><td>52.9</td></tr><tr><td> Date Understanding</td><td>32.9</td><td>33.3</td></tr><tr><td>Disambiguation</td><td>45.2</td><td>62.7</td></tr><tr><td>Dyck Languages</td><td>1.0</td><td>0.0</td></tr><tr><td>Formal Fallacies</td><td>52.8</td><td>54.0</td></tr><tr><td>Geometric Shapes</td><td>7.4</td><td>4.0</td></tr><tr><td>Hyperbaton</td><td>62.8</td><td>64.0</td></tr><tr><td>Logical DeductionS (five objects)</td><td>36.1</td><td>37.3</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>36.8</td><td>22.0</td></tr><tr><td>Logical DeductionS (three objects)</td><td>45.7</td><td>56.0</td></tr><tr><td>Movie Recommendation</td><td>55.3</td><td>68.0</td></tr><tr><td>Multistep Arithmetic</td><td>0.4</td><td>0.7</td></tr><tr><td>Navigate</td><td>47.1</td><td>49.3</td></tr><tr><td>Object Counting</td><td>33.7</td><td>38.7</td></tr><tr><td>Penguins in a Table</td><td>35.9</td><td>37.0</td></tr><tr><td>Reasoning about Colored Objects</td><td>40.0</td><td>33.3</td></tr><tr><td>Ruin Names</td><td>24.4</td><td>22.0</td></tr><tr><td>Salient Translation Error Detection</td><td>36.0</td><td>24.0</td></tr><tr><td>Snarks</td><td>56.9</td><td>52.66</td></tr><tr><td> Sports Understanding</td><td>56.7</td><td>58.0</td></tr><tr><td> Temporal Sequences</td><td>18.2</td><td>27.3</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>12.3</td><td>11.3</td></tr><tr><td>(five objects) Tracking Shuffled ObjectsS</td><td>7.7</td><td>8.0</td></tr><tr><td>(seven objects) Tracking Shuffled ObjectsS</td><td>29.2</td><td>32.7</td></tr><tr><td>(three objects) Web of Lies</td><td>50.1</td><td>46.0</td></tr><tr><td>Word Sorting</td><td>1.1</td><td>1.3</td></tr><tr><td></td><td>34.7</td><td>35.4</td></tr><tr><td>Avg Performance Per Task</td><td></td><td></td></tr></table>",
|
| 641 |
+
"page_idx": 18
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"type": "text",
|
| 645 |
+
"text": "F Performance on General Important Task ",
|
| 646 |
+
"text_level": 1,
|
| 647 |
+
"page_idx": 19
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"type": "text",
|
| 651 |
+
"text": "In our research, we have identified specific LoRA modules that exhibit significant impact when integrated into merged LoRAs. Our focus lies in assessing the performance of the top five task-related LoRAs on the BBH benchmark. The results indicate that these top LoRAs perform similarly or even worse than zero-shot in most cases. Only one of them stands out as significantly better than zero-shot. However, it’s worth noting that this performance is not as impressive as Lorahub. These findings support the idea that the merging process can improve overall performance. ",
|
| 652 |
+
"page_idx": 19
|
| 653 |
+
},
|
| 654 |
+
{
|
| 655 |
+
"type": "table",
|
| 656 |
+
"img_path": "images/a5a978a9e175ac55d980958495a1a7e775eca792910cb318c11e008479f07afe.jpg",
|
| 657 |
+
"table_caption": [
|
| 658 |
+
"Table 8: Detailed experimental results of top five LoRA modules shown in Table 3 on BBH tasks. "
|
| 659 |
+
],
|
| 660 |
+
"table_footnote": [],
|
| 661 |
+
"table_body": "<table><tr><td>Task</td><td>WIQA: Last</td><td>RACE: Right</td><td>WIQA: First</td><td>ADQA</td><td>WebQA</td></tr><tr><td>Boolean Expressions</td><td>52.67</td><td>58.00</td><td>52.67</td><td>54.67</td><td>53.33</td></tr><tr><td>Causal Judgement</td><td>55.17</td><td>63.22</td><td>55.17</td><td>57.47</td><td>57.47</td></tr><tr><td>Date Understanding</td><td>17.33</td><td>19.33</td><td>17.33</td><td>16.67</td><td>15.33</td></tr><tr><td>Disambiguation</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td><td>0.00</td></tr><tr><td>Dyck Languages</td><td>0.67</td><td>0.67</td><td>0.67</td><td>1.33</td><td>1.33</td></tr><tr><td>Formal Fallacies</td><td>51.33</td><td>51.33</td><td>51.33</td><td>51.33</td><td>51.33</td></tr><tr><td>Geometric Shapes</td><td>8.00</td><td>13.33</td><td>8.00</td><td>6.67</td><td>7.33</td></tr><tr><td>Hyperbaton</td><td>16.67</td><td>44.00</td><td>16.67</td><td>1.33</td><td>6.00</td></tr><tr><td>Logical Ded uctionts)</td><td>23.33</td><td>28.00</td><td>23.33</td><td>19.33</td><td>20.67</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>22.00</td><td>26.00</td><td>22.00</td><td>10.67</td><td>12.00</td></tr><tr><td>Logical DeductionS (three objects)</td><td>0.67</td><td>9.33</td><td>0.67</td><td>0.00</td><td>0.00</td></tr><tr><td>Movie Recommendation</td><td>63.33</td><td>62.67</td><td>63.33</td><td>56.67</td><td>63.33</td></tr><tr><td>Multistep Arithmetic</td><td>0.67</td><td>0.67</td><td>0.67</td><td>0.67</td><td>0.67</td></tr><tr><td>Navigate</td><td>47.33</td><td>50.00</td><td>47.33</td><td>47.33</td><td>47.33</td></tr><tr><td>Object Counting</td><td>34.67</td><td>34.00</td><td>34.67</td><td>35.33</td><td>35.33</td></tr><tr><td>Penguins in a Table</td><td>45.65</td><td>41.30</td><td>45.65</td><td>39.13</td><td>43.48</td></tr><tr><td>Reasoning about Colored Objects</td><td>40.00</td><td>37.33</td><td>40.00</td><td>31.33</td><td>30.67</td></tr><tr><td>Ruin Names</td><td>22.00</td><td>21.33</td><td>22.00</td><td>17.33</td><td>22.67</td></tr><tr><td>Salient Translation Error Detection</td><td>36.67</td><td>34.67</td><td>36.67</td><td>32.67</td><td>37.33</td></tr><tr><td>Snarks</td><td>52.56</td><td>55.13</td><td>52.56</td><td>47.44</td><td>52.56</td></tr><tr><td>Sports Understanding</td><td>56.00</td><td>58.67</td><td>56.00</td><td>55.33</td><td></td></tr><tr><td>Temporal Sequences</td><td>16.67</td><td>17.33</td><td>16.67</td><td>12.67</td><td>55.33 17.33</td></tr><tr><td>Tracking Shuffled ObjectsS (five objects)</td><td>12.00</td><td>12.00</td><td>12.00</td><td>10.67</td><td>12.00</td></tr><tr><td>Tracking Shuffled ObjectsS (seven objects)</td><td>6.67</td><td>6.67</td><td>6.67</td><td>6.67</td><td>6.67</td></tr><tr><td>Tracking Shuffled ObjectsS</td><td>20.67</td><td>30.67</td><td>20.67</td><td>10.67</td><td>25.33</td></tr><tr><td>(three objects) Web of Lies</td><td>54.67</td><td>54.00</td><td>54.67</td><td>54.00</td><td></td></tr><tr><td>Word Sorting</td><td>1.33</td><td>1.33</td><td>1.33</td><td>1.33</td><td>54.00 1.33</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Avg Performance per Task △ FLAN-T5-large</td><td>28.10 1.10</td><td>30.78 3.78</td><td>28.10 1.10</td><td>25.14 -1.86</td><td>27.04 0.04</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>",
|
| 662 |
+
"page_idx": 19
|
| 663 |
+
},
|
| 664 |
+
{
|
| 665 |
+
"type": "image",
|
| 666 |
+
"img_path": "images/f08459cc633da4d25e332908058acffc5a55cf3fadee5264d074582bf20749f5.jpg",
|
| 667 |
+
"image_caption": [
|
| 668 |
+
"Figure 3: The influence of number of LoRA modules on 15 tasks from BBH, and each box is obtained from 5 separate runs. The horizontal axis shows the number of LoRA modules to be composed in LoraHub learning. "
|
| 669 |
+
],
|
| 670 |
+
"image_footnote": [],
|
| 671 |
+
"page_idx": 20
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "text",
|
| 675 |
+
"text": "G Implementation details ",
|
| 676 |
+
"text_level": 1,
|
| 677 |
+
"page_idx": 20
|
| 678 |
+
},
|
| 679 |
+
{
|
| 680 |
+
"type": "text",
|
| 681 |
+
"text": "We implemented LoRA tuning using the Huggingface PEFT library (Mangrulkar et al., 2022), with the rank being set as 16. The gradient-free method was implemented using the open-source Nevergrad optimization library (Rapin & Teytaud, 2018), with a constraint that the absolute value of LoRA weights should not exceed 1.5. Originally, all coefficients of LoRA modules were set at zero. ",
|
| 682 |
+
"page_idx": 20
|
| 683 |
+
},
|
| 684 |
+
{
|
| 685 |
+
"type": "text",
|
| 686 |
+
"text": "In our standard settings, we set the maximum number of iterations $K$ as 40. The same 5 examples were used during our LoraHub learning and the few-shot in-context learning. The hyperparameter $\\alpha$ is set as 0.05. Regarding the hyperparameters for training candidate LoRA modules, we maintained consistency across all modules, setting the batch size at 64, the learning rate at $1 e - 4 ,$ and the number of training epochs at 10. ",
|
| 687 |
+
"page_idx": 20
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"type": "text",
|
| 691 |
+
"text": "H Influence of Number of LoRA modules ",
|
| 692 |
+
"text_level": 1,
|
| 693 |
+
"page_idx": 20
|
| 694 |
+
},
|
| 695 |
+
{
|
| 696 |
+
"type": "text",
|
| 697 |
+
"text": "As shown in Figure 3, with an increase in the number of LoRA module candidates, there is a corresponding increase in the performance variance. Based on our in-depth analysis, the primary source of variance is not related to gradient-free optimization algorithms but rather associated with the LoRA candidate modules. In other words, once the candidates are determined, random seeds have minimal impact on the final performance. Hence, we posit that the observed instability primarily arises from the inherent challenge of balancing the quantity and quality of the LoRA module candidates. ",
|
| 698 |
+
"page_idx": 20
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"type": "text",
|
| 702 |
+
"text": "I The Impact of Threshold ",
|
| 703 |
+
"text_level": 1,
|
| 704 |
+
"page_idx": 20
|
| 705 |
+
},
|
| 706 |
+
{
|
| 707 |
+
"type": "text",
|
| 708 |
+
"text": "In this section, we omitted the threshold in our implementation, and the results are summarized in Table 9. Our observations indicate that the removal of the threshold had minimal impact on the majority of tasks, underscoring the robustness of the gradient-free optimization algorithm itself in most cases. The algorithm efficiently identified reasonable ranges even without specific upper and lower bounds. However, three tasks, namely Date Understanding, Disambiguation and Hyperbaton, exhibited notable effects. The resulting performance decline led to an average decrease of $1 . 2 \\%$ compared to the setting with threshold. ",
|
| 709 |
+
"page_idx": 20
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"type": "text",
|
| 713 |
+
"text": "This highlights the significance of establishing a reasonable threshold to mitigate extreme scenarios. ",
|
| 714 |
+
"page_idx": 21
|
| 715 |
+
},
|
| 716 |
+
{
|
| 717 |
+
"type": "table",
|
| 718 |
+
"img_path": "images/522e1fa23ba78543a5afefbbeddc87850fa222239fd245c96bbb6d9c91774129.jpg",
|
| 719 |
+
"table_caption": [
|
| 720 |
+
"Table 9: The comparsion between LoraHub and LoraHub without threshold. "
|
| 721 |
+
],
|
| 722 |
+
"table_footnote": [],
|
| 723 |
+
"table_body": "<table><tr><td>Task</td><td>LoraHubavg with threshold</td><td>LoraHubavg without threshold</td></tr><tr><td>Boolean Expressions</td><td>55.5</td><td>54.0</td></tr><tr><td>Causal Judgement</td><td>54.3</td><td>54.8</td></tr><tr><td>Date Understanding</td><td>32.9</td><td>17.7</td></tr><tr><td>Disambiguation</td><td>45.2</td><td>40.6</td></tr><tr><td>Dyck Languages</td><td>1.0</td><td>1.1</td></tr><tr><td>Formal Fallacies</td><td>52.8</td><td>51.7</td></tr><tr><td>Geometric Shapes</td><td>7.4</td><td>6.7</td></tr><tr><td>Hyperbaton</td><td>62.8</td><td>55.5</td></tr><tr><td>Logical DeductionS (five objects)</td><td>36.1</td><td>36.5</td></tr><tr><td>Logical DeductionS (seven objects)</td><td>36.8</td><td>35.6</td></tr><tr><td>Logical DeductionS</td><td>45.7</td><td></td></tr><tr><td>(three objects) Movie Recommendation</td><td></td><td>49.9</td></tr><tr><td>Multistep Arithmetic</td><td>55.3</td><td>59.3</td></tr><tr><td>Navigate</td><td>0.4</td><td>0.7</td></tr><tr><td>Object Counting</td><td>47.1</td><td>47.6</td></tr><tr><td></td><td>33.7</td><td>34.7</td></tr><tr><td>Penguins in a Table</td><td>35.9</td><td>33.8</td></tr><tr><td>Reasoning about Colored Objects</td><td>40.0</td><td>37.9</td></tr><tr><td>Ruin Names</td><td>24.4</td><td>24.0</td></tr><tr><td>Salient Translation Error Detection</td><td>36.0</td><td>37.1</td></tr><tr><td>Snarks</td><td>56.9</td><td>51.6</td></tr><tr><td>Sports Understanding</td><td>56.7</td><td>55.9</td></tr><tr><td>Temporal Sequences</td><td>18.2</td><td>16.7</td></tr><tr><td>Tracking Shuffled ObjectsS (five objects)</td><td>12.3</td><td>12.3</td></tr><tr><td>Tracking Shuffled ObjectsS (seven objects)</td><td>7.7</td><td>8.5</td></tr><tr><td>Tracking Shuffled ObjectsS (three objects)</td><td>29.2</td><td>29.8</td></tr><tr><td>Web of Lies</td><td>50.1</td><td>50.3</td></tr><tr><td>Word Sorting</td><td>1.1</td><td>1.3</td></tr><tr><td>Avg Performance Per Task</td><td>34.7</td><td>33.5</td></tr></table>",
|
| 724 |
+
"page_idx": 21
|
| 725 |
+
}
|
| 726 |
+
]
|
parse/test/TrloAXEJ2B/TrloAXEJ2B_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/TrloAXEJ2B/TrloAXEJ2B_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/bx24KpJ4Eb/bx24KpJ4Eb.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/bx24KpJ4Eb/bx24KpJ4Eb_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/bx24KpJ4Eb/bx24KpJ4Eb_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/bx24KpJ4Eb/bx24KpJ4Eb_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/mw1PWNSWZP/mw1PWNSWZP_content_list.json
ADDED
|
@@ -0,0 +1,498 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "OCTOPACK: INSTRUCTION TUNING CODE LARGELANGUAGE MODELS",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"page_idx": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"type": "text",
|
| 10 |
+
"text": "Niklas Muennighoff Qian Liu Armel Zebaze Qinkai Zheng Binyuan Hui Terry Yue Zhuo Swayam Singh Xiangru Tang Leandro von Werra Shayne Longpre ",
|
| 11 |
+
"page_idx": 0
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"type": "text",
|
| 15 |
+
"text": "n.muennighoff@gmail.com ",
|
| 16 |
+
"page_idx": 0
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"type": "text",
|
| 20 |
+
"text": "ABSTRACT ",
|
| 21 |
+
"text_level": 1,
|
| 22 |
+
"page_idx": 0
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"type": "text",
|
| 26 |
+
"text": "Finetuning large language models (LLMs) on instructions leads to vast performance improvements on natural language tasks. We apply instruction tuning using code, leveraging the natural structure of Git commits, which pair code changes with human instructions. We compile COMMITPACK: 4 terabytes of Git commits across 350 programming languages. We benchmark COMMITPACK against other natural and synthetic code instructions (xP3x, Self-Instruct, OASST) on the 16B parameter StarCoder model, and achieve state-of-the-art performance among models not trained on OpenAI outputs, on the HumanEval Python benchmark $4 6 . 2 \\%$ pass $@ 1$ ). We further introduce HUMANEVALPACK, expanding the HumanEval benchmark to a total of 3 coding tasks (Code Repair, Code Explanation, Code Synthesis) across 6 languages (Python, JavaScript, Java, Go, $\\mathrm { C } { + + }$ , Rust). Our models, OCTOCODER and OCTOGEEX, achieve the best performance across HUMANEVALPACK among all permissive models, demonstrating COMMITPACK’s benefits in generalizing to a wider set of languages and natural coding tasks. Code, models and data are freely available at https://github.com/bigcode-project/octopack. ",
|
| 27 |
+
"page_idx": 0
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"type": "text",
|
| 31 |
+
"text": "1) CommitPack ",
|
| 32 |
+
"text_level": 1,
|
| 33 |
+
"page_idx": 0
|
| 34 |
+
},
|
| 35 |
+
{
|
| 36 |
+
"type": "image",
|
| 37 |
+
"img_path": "images/d6e2f0317fe1f5c5a898b6e2f7ba52759e4e57d2cd393f17abef1d6f00a3dce4.jpg",
|
| 38 |
+
"image_caption": [
|
| 39 |
+
"Figure 1: OCTOPACK Overview. 1) Sample from our 4TB dataset, COMMITPACK. 2) Performance of OCTOCODER, OCTOGEEX and other code models including non-permissive ones (WizardCoder, GPT-4) on HUMANEVALPACK spanning 3 coding tasks and 6 programming languages. "
|
| 40 |
+
],
|
| 41 |
+
"image_footnote": [],
|
| 42 |
+
"page_idx": 0
|
| 43 |
+
},
|
| 44 |
+
{
|
| 45 |
+
"type": "text",
|
| 46 |
+
"text": "1 INTRODUCTION ",
|
| 47 |
+
"text_level": 1,
|
| 48 |
+
"page_idx": 1
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"type": "text",
|
| 52 |
+
"text": "Finetuning large language models (LLMs) on a variety of language tasks explained via instructions (instruction tuning) has been shown to improve model usability and general performance (Wei et al., 2022; Sanh et al., 2022; Min et al., 2022; Ouyang et al., 2022). The instruction tuning paradigm has also proven successful for models trained on visual (Liu et al., 2023a; Li et al., 2023a), audio (Zhang et al., 2023b) and multilingual (Muennighoff et al., 2022b; Wang et al., 2022b) data. ",
|
| 53 |
+
"page_idx": 1
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"type": "text",
|
| 57 |
+
"text": "In this work, we instruction tune LLMs on the coding modality. While Code LLMs can already be indirectly instructed to generate desired code using code comments, this procedure is brittle and does not work when the desired output is natural language, such as explaining code. Explicit instructing tuning of Code LLMs may improve their steerability and enable their application to more tasks. Concurrently to our work, three instruction tuned Code LLMs have been proposed: PanGu-Coder2 (Shen et al., 2023), WizardCoder (Luo et al., 2023) and InstructCodeT $^ { \\circ + }$ (Wang et al., 2023c). These models rely on more capable and closed models from the OpenAI $\\mathrm { \\bf A P I ^ { 1 } }$ to create their instruction training data. This approach is problematic as (1) closed-source APIs keep changing and have unpredictable availability (Pozzobon et al., 2023; Chen et al., 2023a), (2) it relies on the assumption that a more capable model exists (3) it can reinforce model hallucination (Gudibande et al., 2023) and (4), depending on legal interpretation, OpenAI’s terms of use2 forbid such models: “...You may not...use output from the Services to develop models that compete with OpenAI...”. Thus, we consider models trained on OpenAI outputs not usable for commercial purposes in practice and classify them as non-permissive in this work. ",
|
| 58 |
+
"page_idx": 1
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "We focus on more permissively licensed data and avoid using a closed-source model to generate synthetic data. We benchmark four popular sources of code instruction data: (1) xP3x (Muennighoff et al., 2022b), which contains data from common code benchmarks, (2) Self-Instruct (Wang et al., 2023a) data we create using a permissive Code LLM, (3) OASST (Köpf et al., 2023), which contains mostly natural language data and few code examples and (4) COMMITPACK, our new 4TB dataset of Git commits. Instruction tuning’s primary purpose is to expand models’ generalization abilities to a wide variety of tasks and settings. Thus, we extend the code synthesis benchmark, HumanEval (Chen et al., 2021; Zheng et al., 2023), to create HUMANEVALPACK: A code benchmark covering code synthesis, code repair, and code explanation across six programming languages. ",
|
| 63 |
+
"page_idx": 1
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"type": "text",
|
| 67 |
+
"text": "Instruction tuning StarCoder (Li et al., 2023b) on a filtered variant of COMMITPACK and OASST leads to our best model, OCTOCODER, which surpasses all other openly licensed models (Figure 1), but falls short of the much larger GPT-4 (OpenAI, 2023). GPT-4 is close to maximum performance on the code synthesis variant, notably with a pass $@ 1$ score of $8 6 . 6 \\%$ on Python HumanEval. However, it performs significantly worse on the code fixing and explanation variants of HUMANEVALPACK, which we introduce. This suggests that the original HumanEval benchmark may soon cease to be useful due to models reaching close to the maximum performance. Our more challenging evaluation variants provide room for future LLMs to improve on the performance of the current state-of-the-art. ",
|
| 68 |
+
"page_idx": 1
|
| 69 |
+
},
|
| 70 |
+
{
|
| 71 |
+
"type": "text",
|
| 72 |
+
"text": "In summary, we contribute: ",
|
| 73 |
+
"page_idx": 1
|
| 74 |
+
},
|
| 75 |
+
{
|
| 76 |
+
"type": "text",
|
| 77 |
+
"text": "• COMMITPACK and COMMITPACKFT: 4TB of permissively licensed code commits across 350 programming languages for pretraining and a filtered 2GB variant containing highquality code instructions used for finetuning \n• HUMANEVALPACK: A benchmark for Code LLM generalization, spanning three scenarios (Code Repair, Code Explanation, Code Synthesis) and 6 programming languages (Python, JavaScript, Java, Go, $\\mathrm { C } { + } { + }$ , Rust) \n• OCTOCODER and OCTOGEEX: The best permissive Code LLMs ",
|
| 78 |
+
"page_idx": 1
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"type": "text",
|
| 82 |
+
"text": "2 COMMITPACK: CODE INSTRUCTION DATA",
|
| 83 |
+
"text_level": 1,
|
| 84 |
+
"page_idx": 1
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"type": "text",
|
| 88 |
+
"text": "Prior work has shown that models can generalize to languages included in pretraining, but absent during instruction tuning (Muennighoff et al., 2022b). However, they also show that including such languages during instruction tuning boosts their performance further. We hypothesize that code data exhibits the same behavior. To improve performance on code-related tasks, we thus construct a code instruction dataset leveraging the natural structure of Git commits. ",
|
| 89 |
+
"page_idx": 1
|
| 90 |
+
},
|
| 91 |
+
{
|
| 92 |
+
"type": "image",
|
| 93 |
+
"img_path": "images/f8a8e303f102a5f63ef80413dd5919ebd952287ec3d6ab6d2436276e818cedc6.jpg",
|
| 94 |
+
"image_caption": [
|
| 95 |
+
"Figure 2: Overview of COMMITPACK and COMMITPACKFT. Top: Language distribution of the full commit data (COMMITPACK) and the variant filtered for high-quality instructions (COMMITPACKFT). See Appendix C for the full distribution. Bottom: Task distribution of commits on the Python subset of COMMITPACKFT (59K samples) according to GPT-4. "
|
| 96 |
+
],
|
| 97 |
+
"image_footnote": [],
|
| 98 |
+
"page_idx": 2
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"type": "table",
|
| 102 |
+
"img_path": "images/1c94b81ace3ba432443ca158753bd7813f718e7de03e992be81e9c78a0bfe104.jpg",
|
| 103 |
+
"table_caption": [
|
| 104 |
+
"Table 1: Statistics of code instruction data we consider. We display the number of programming languages, total samples, and fraction of samples that contain code for permissive instruction datasets. For finetuning on these datasets, we use small subsets with around 5,000 samples each. "
|
| 105 |
+
],
|
| 106 |
+
"table_footnote": [],
|
| 107 |
+
"table_body": "<table><tr><td></td><td colspan=\"3\">Base dataset</td><td colspan=\"3\">Subset</td></tr><tr><td>Dataset (↓)</td><td>Lang.</td><td>Samples</td><td>Code fraction</td><td>Lang.</td><td>Samples</td><td>Code fraction</td></tr><tr><td>xP3x</td><td>8</td><td>532,107,156</td><td>0.67%</td><td>8</td><td>5,000</td><td>100%</td></tr><tr><td>StarCoder Self-Instruct</td><td>12</td><td>5,003</td><td>100%</td><td>12</td><td>5,003</td><td>100%</td></tr><tr><td>OASST</td><td>49</td><td>161,443</td><td>0.9%</td><td>28</td><td>8,587</td><td>2.5%</td></tr><tr><td>COMMITPACKFT</td><td>277</td><td>742,273</td><td>100%</td><td>6</td><td>5,000</td><td>100%</td></tr></table>",
|
| 108 |
+
"page_idx": 2
|
| 109 |
+
},
|
| 110 |
+
{
|
| 111 |
+
"type": "text",
|
| 112 |
+
"text": "",
|
| 113 |
+
"page_idx": 2
|
| 114 |
+
},
|
| 115 |
+
{
|
| 116 |
+
"type": "text",
|
| 117 |
+
"text": "COMMITPACK To create the dataset, we use commit metadata from the GitHub action dump on Google BigQuery.3 We apply quality filters, filter for commercially friendly licenses, and discard commits that affect more than a single file to ensure commit messages are very specific and to avoid additional complexity from dealing with multiple files. We use the filtered metadata to scrape the affected code files prior to and after the commit from GitHub. This leads to almost 4 terabytes of data covering 350 programming languages (COMMITPACK). As instruction tuning does not require so much data (Zhou et al., 2023a; Touvron et al., 2023), we apply several strict filters to reduce the dataset to 2 gigabytes and 277 languages (COMMITPACKFT). These include filtering for samples where the commit message has specific words in uppercase imperative form at the start (e.g. \"Verify ...\"), consists of multiple words, and does not contain external references. All filters are detailed in Appendix D. Figure 2 depicts the distribution of both datasets and the tasks contained in COMMITPACKFT. For instruction tuning our models, we select 5,000 random samples from COMMITPACKFT across the 6 programming languages that we evaluate on. In Appendix G, we also experiment with pretraining on the entirety of COMMITPACK. ",
|
| 118 |
+
"page_idx": 2
|
| 119 |
+
},
|
| 120 |
+
{
|
| 121 |
+
"type": "text",
|
| 122 |
+
"text": "",
|
| 123 |
+
"page_idx": 3
|
| 124 |
+
},
|
| 125 |
+
{
|
| 126 |
+
"type": "text",
|
| 127 |
+
"text": "Alternatives We consider three additional datasets for instruction tuning presented in Table 1. xP3x: xP3x is a large-scale collection of multilingual instruction data with around 532 million samples (Muennighoff et al., 2022b). We focus only on the code subset of xP3x, excluding NeuralCodeSearch (Li et al., 2019) which is not licensed permissively, and select 5,000 samples. ",
|
| 128 |
+
"page_idx": 3
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "Self-Instruct: Using the Self-Instruct method (Wang et al., 2022a) and the StarCoder model (Li et al., 2023b), we create 5,003 synthetic instructions and corresponding answers. ",
|
| 133 |
+
"page_idx": 3
|
| 134 |
+
},
|
| 135 |
+
{
|
| 136 |
+
"type": "text",
|
| 137 |
+
"text": "OASST: OASST is a diverse dataset of multi-turn chat dialogues (Köpf et al., 2023). Only a few of the dialogues contain code. We reuse a filtered variant from prior work (Dettmers et al., 2023) and additionally filter out moralizing assistant answers (Appendix D) leading to 8,587 samples. ",
|
| 138 |
+
"page_idx": 3
|
| 139 |
+
},
|
| 140 |
+
{
|
| 141 |
+
"type": "text",
|
| 142 |
+
"text": "3 HUMANEVALPACK: EVALUATING INSTRUCTION TUNED CODE MODELS ",
|
| 143 |
+
"text_level": 1,
|
| 144 |
+
"page_idx": 3
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"type": "image",
|
| 148 |
+
"img_path": "images/6d4237dbeea9dce08c47c00b28420e174e150d6eae786187a47d3411b344f93b.jpg",
|
| 149 |
+
"image_caption": [
|
| 150 |
+
"Figure 3: HUMANEVALPACK overview. The first HumanEval problem is depicted across the three scenarios for Python. The bug for HUMANEVALFIX consists of a missing \"abs\" statement. "
|
| 151 |
+
],
|
| 152 |
+
"image_footnote": [],
|
| 153 |
+
"page_idx": 3
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"type": "text",
|
| 157 |
+
"text": "When instruction tuning LLMs using natural language (NL) data, the input is an NL instruction with optional NL context and the target output is the NL answer to the task (Wei et al., 2022). When instruction tuning with code (C) data, code may either appear only in the input alongside the NL instruction $\\mathrm { N L + C \\mathrm { \\to N L } }$ , e.g. code explanation), only in the output $\\mathrm { N L } { } \\mathrm { C }$ , e.g. code synthesis), or in both input and output $( { \\mathrm { N L } } { + } { \\mathrm { C } } { } { \\mathrm { C } } ,$ , e.g. code modifications like bug fixing). While prior benchmarks commonly only cover variants of code synthesis, users may want to use models in all three scenarios. Thus, we expand the code synthesis benchmark HumanEval (Chen et al., 2021; Zheng et al., 2023) to cover all three input-output combinations for six languages (Figure 3). ",
|
| 158 |
+
"page_idx": 3
|
| 159 |
+
},
|
| 160 |
+
{
|
| 161 |
+
"type": "text",
|
| 162 |
+
"text": "HUMANEVALFIX $( \\mathbf { N L + C } { \\boldsymbol { } } \\mathbf { C } )$ Given an incorrect code function with a subtle bug and accompanying unit tests, the model is tasked to fix the function. We manually add a bug to each of the 164 HumanEval solutions across all 6 languages (984 total bugs). For a given sample, the bugs are as similar as possible across the 6 languages enabling meaningful comparison of scores across languages. Bugs are written such that the code still runs but produces an incorrect result leading to at least one unit test failing. Bug statistics and examples are in Appendix L. We also evaluate an easier variant of this task where instead of unit tests, models are provided with the correct function docstring as the source of truth to fix bugs, see Appendix K. ",
|
| 163 |
+
"page_idx": 4
|
| 164 |
+
},
|
| 165 |
+
{
|
| 166 |
+
"type": "text",
|
| 167 |
+
"text": "HUMANEVALEXPLAIN $( \\mathbf { N L + C } { } \\mathbf { N L }$ ) Given a correct code function, the model is tasked to generate an explanation of the code. Subsequently, the same model is tasked to regenerate the code given only its own explanation. The second step allows us to score this task via code execution and measure pass $@ k$ (Chen et al., 2021) instead of evaluating the explanation itself using heuristic-based metrics like BLEU (Papineni et al., 2002) or ROUGE (Lin, 2004) which have major limitations (Reiter, 2018; Schluter, 2017; Eghbali & Pradel, 2022; Zhou et al., 2023b). To prevent models from copying the solution into the description, we remove any solution overlap of at least 20 characters from the description. We further enforce a character length limit on the model-generated explanation equivalent to the length of the docstring describing the function. This limit is specified in the prompt for the model. Note that the function docstring itself is never provided to the model for this task. ",
|
| 168 |
+
"page_idx": 4
|
| 169 |
+
},
|
| 170 |
+
{
|
| 171 |
+
"type": "text",
|
| 172 |
+
"text": "HUMANEVALSYNTHESIZE $( \\mathbf { N L } { } \\mathbf { C } )$ ) Given a natural language docstring or comment describing the desired code, the model is tasked to synthesize the correct code. This task corresponds to the original HumanEval benchmark (Chen et al., 2021). For instruction tuned models, we add an explicit instruction to the input explaining what the model should do. For models that have only gone through language model pretraining, we follow Chen et al. (2021) and provide the model with the function header and docstring to evaluate its completion of the function. ",
|
| 173 |
+
"page_idx": 4
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "For all tasks we execute the code generations to compute performance using the pass $@ k$ metric (Chen et al., 2021): a problem is considered solved if any of $k$ code generations passes every test case. We focus on the simplest version of pass $@ k$ , which is pass $@ 1$ : the likelihood that the model solves a problem in a single attempt. Like Chen et al. (2021), we use a sampling temperature of 0.2 and $t o p _ { p } = 0 . 9 5$ to estimate pass $@ 1$ . We generate $n = 2 0$ samples, which is enough to get reliable pass $@ 1$ estimates (Li et al., 2023b). For GPT-4, we generate $n = 1$ samples. Using $n = 1$ instead of $n = 2 0$ for GPT-4 only changed scores from $7 5 . 0 \\%$ to $7 5 . 2 \\%$ pass $@ 1$ on HUMANEVALSYNTHESIZE Python while providing 20x cost savings. ",
|
| 178 |
+
"page_idx": 4
|
| 179 |
+
},
|
| 180 |
+
{
|
| 181 |
+
"type": "text",
|
| 182 |
+
"text": "Python HumanEval is the most widely used code benchmark and many training datasets have already been decontaminated for it (Kocetkov et al., 2022). By manually extending HumanEval, we ensure existing decontamination remains valid to enable fair evaluation. However, this may not hold for all models (e.g. GPT-4), thus results should be interpreted carefully. ",
|
| 183 |
+
"page_idx": 4
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "4 OCTOCODER: BEST COMMERCIALLY LICENSED CODE LLM ",
|
| 188 |
+
"text_level": 1,
|
| 189 |
+
"page_idx": 4
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"type": "text",
|
| 193 |
+
"text": "4.1 ABLATING INSTRUCTION DATA CHOICES ",
|
| 194 |
+
"text_level": 1,
|
| 195 |
+
"page_idx": 4
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "We instruction tune the pretrained StarCoder model (Li et al., 2023b) on different combinations of our instruction datasets (§2). We evaluate all models on the Python subset of HUMANEVALPACK as depicted in Figure 4. Similar to prior work (Taori et al., 2023), we format all instructions into a consistent schema to distinguish question and answer (see Figure 18). ",
|
| 200 |
+
"page_idx": 4
|
| 201 |
+
},
|
| 202 |
+
{
|
| 203 |
+
"type": "text",
|
| 204 |
+
"text": "COMMITPACKFT enables CodeLLMs to fix bugs COMMITPACKFT is critical for the performance boost on code repair (HUMANEVALFIX), where instruction tuning on only OASST or other variants results in a significantly lower score. This is likely due to COMMITPACKFT including around $20 \\%$ of bug fixes among other code-related tasks (Figure 2). ",
|
| 205 |
+
"page_idx": 4
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"type": "text",
|
| 209 |
+
"text": "Importance of samples with natural language targets The pretrained StarCoder model, as well as the Self-Instruct variant, perform poorly on code explanation (HUMANEVALEXPLAIN). This is because both models are only conditioned to write code instead of natural language. We find that to perform well at explaining code, it is necessary to include samples with natural language as the target output during instruction tuning. Only relying on data with code as the target, such as the Self-Instruct data, will lead to models always outputting code even if the question requires a natural language output. Thus, we mix all other ablations with OASST, which contains many natural language targets. While the $\\bf { \\Phi } _ { X } \\bf { P } 3 \\bf { x }$ subset also contains samples with natural language output, many of its target outputs are short, which leads to models with a bias for short answers. This is impractical for the explanation task leading to the comparatively low score of mixing xP3x with OASST. ",
|
| 210 |
+
"page_idx": 4
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "image",
|
| 214 |
+
"img_path": "images/26e4eb35762381651ff22b6fd3132055d1c85e3d9a50f03e670d8a3b73231f0d.jpg",
|
| 215 |
+
"image_caption": [
|
| 216 |
+
"Figure 4: Comparing permissively licensed instruction datasets by instruction tuning StarCoder. Models are evaluated on the Python subset of HUMANEVALPACK. "
|
| 217 |
+
],
|
| 218 |
+
"image_footnote": [],
|
| 219 |
+
"page_idx": 5
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"type": "text",
|
| 223 |
+
"text": "",
|
| 224 |
+
"page_idx": 5
|
| 225 |
+
},
|
| 226 |
+
{
|
| 227 |
+
"type": "text",
|
| 228 |
+
"text": "COMMITPACKFT $^ +$ OASST yields best performance All instruction datasets provide similar boosts for code synthesis (HUMANEVALSYNTHESIZE), which has been the focus of all prior work on code instruction models (Wang et al., 2023c; Luo et al., 2023; Muennighoff et al., 2022b). We achieve the best average score by instruction tuning on COMMITPACKFT mixed with our filtered OASST data yielding an absolute $23 \\%$ improvement over StarCoder. Thus, we select COMMITPACKFT $^ +$ OASST for our final model dubbed OCTOCODER. Using the same data, we also instruction tune the 6 billion parameter CodeGeeX2 (Zheng et al., 2023) to create OCTOGEEX. Training hyperparameters for both models are in Appendix P. ",
|
| 229 |
+
"page_idx": 5
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"type": "text",
|
| 233 |
+
"text": "4.2 COMPARING WITH OTHER MODELS ",
|
| 234 |
+
"text_level": 1,
|
| 235 |
+
"page_idx": 5
|
| 236 |
+
},
|
| 237 |
+
{
|
| 238 |
+
"type": "text",
|
| 239 |
+
"text": "We benchmark OCTOCODER and OCTOGEEX with state-of-the-art Code LLMs on HUMANEVALPACK in Table 2. For all models, we use the prompt put forward by the model creators if applicable or else a simple intuitive prompt, see Appendix Q. ",
|
| 240 |
+
"page_idx": 5
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"type": "text",
|
| 244 |
+
"text": "OCTOCODER performs best among permissive models OCTOCODER has the highest average score across all three evaluation scenarios among all permissive models. With just 6 billion parameters, OCTOGEEX is the smallest model benchmarked, but still outperforms all prior permissive Code LLMs. GPT-4 (OpenAI, 2023) performs best among all models benchmarked with a significant margin. However, GPT-4 is closed-source and likely much larger than all other models evaluated. ",
|
| 245 |
+
"page_idx": 5
|
| 246 |
+
},
|
| 247 |
+
{
|
| 248 |
+
"type": "text",
|
| 249 |
+
"text": "Instruction tuning generalizes to unseen programming languages Trained primarily on natural language, not code, BLOOMZ (Muennighoff et al., 2022b) performs worse than other models despite having 176 billion parameters. Go and Rust are not contained in BLOOMZ’s instruction data, yet it performs much better than the random baseline of 0.0 for these two languages across most tasks. This confirms our hypothesis that models are capable of generalizing instructions to programming languages only seen at pretraining, similar to crosslingual generalization for natural languages (Muennighoff et al., 2022b). To improve programming language generalization further, we tune OCTOCODER and OCTOGEEX on many languages from COMMITPACKFT, and this generalization improvement is reflected in the performance on HUMANEVALPACK’s new languages. ",
|
| 250 |
+
"page_idx": 5
|
| 251 |
+
},
|
| 252 |
+
{
|
| 253 |
+
"type": "text",
|
| 254 |
+
"text": "Pretraining weight correlates with programming language performance after instruction tuning Prior work has shown that the performance on natural languages after instruction tuning is correlated with the weight of these languages during pretraining (Muennighoff et al., 2022b). The more weight during pretraining, the better the performance after instruction tuning. We find the same to be the case for programming languages. Python, Java, and JavaScript collectively make up around $30 \\%$ of the pretraining data of StarCoder (Li et al., 2023b). After instruction tuning StarCoder to produce OCTOCODER, we see the best performance among these three languages, especially for HUMANEVALSYNTHESIZE. OCTOCODER performs weakest on Rust, which is the lowest resource language of StarCoder among the languages we benchmark ( $1 . 2 \\%$ of pretraining data). ",
|
| 255 |
+
"page_idx": 5
|
| 256 |
+
},
|
| 257 |
+
{
|
| 258 |
+
"type": "table",
|
| 259 |
+
"img_path": "images/05a2c332d0d8e98c3a3011afc60ffc3d0fe0f377399b1feda85b51c007f031e7.jpg",
|
| 260 |
+
"table_caption": [],
|
| 261 |
+
"table_footnote": [],
|
| 262 |
+
"table_body": "<table><tr><td>Model (↓)</td><td>Python</td><td> JavaScript</td><td>Java</td><td>Go</td><td>C++</td><td></td><td>Rust|Avg.</td></tr><tr><td colspan=\"8\">HUMANEVALFIX</td></tr><tr><td colspan=\"8\">Non-permissive models</td></tr><tr><td rowspan=\"4\">InstructCodeT5+t WizardCodert GPT-4</td><td>2.7</td><td></td><td></td><td></td><td></td><td>0.5</td><td>1.8</td></tr><tr><td>31.8</td><td>1.2 29.5</td><td>4.3 30.7</td><td>2.1 30.4</td><td>0.2 18.7</td><td>13.0</td><td>25.7</td></tr><tr><td>47.0</td><td>48.2</td><td>50.0</td><td>50.6</td><td>47.6</td><td>43.3</td><td>47.8</td></tr><tr><td colspan=\"7\">Permissive models</td></tr><tr><td colspan=\"8\"></td></tr><tr><td>BLOOMZ</td><td>16.6</td><td>15.5</td><td>15.2</td><td>16.4</td><td>6.7</td><td>5.7</td><td>12.5</td></tr><tr><td>StarChat-β</td><td>18.1</td><td>18.1</td><td>24.1</td><td>18.1</td><td>8.2</td><td>3.6</td><td>11.2</td></tr><tr><td>CodeGeeX2*</td><td>15.9</td><td>14.7</td><td>18.0</td><td>13.6</td><td>4.3</td><td>6.1</td><td>12.1</td></tr><tr><td>StarCoder</td><td>8.7</td><td>15.7</td><td>13.3</td><td>20.1</td><td>15.6</td><td>6.7</td><td>13.4</td></tr><tr><td>OCTOGEEX*</td><td>28.1</td><td>27.7</td><td>30.4</td><td>27.6</td><td>22.9</td><td>9.6</td><td>24.4</td></tr><tr><td>OCTOCODER</td><td>30.4</td><td>28.4</td><td>30.6</td><td>30.2</td><td>26.1</td><td>16.5</td><td>27.0</td></tr></table>",
|
| 263 |
+
"page_idx": 6
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "table",
|
| 267 |
+
"img_path": "images/e03a16fc59d2d1155334d6c924613b3b28df82ea57469401eb8807ce6ab3b7da.jpg",
|
| 268 |
+
"table_caption": [
|
| 269 |
+
"HUMANEVALEXPLAIN "
|
| 270 |
+
],
|
| 271 |
+
"table_footnote": [],
|
| 272 |
+
"table_body": "<table><tr><td colspan=\"8\">Non-permissive models</td></tr><tr><td rowspan=\"2\">InstructCodeT5+† WizardCodert GPT-4</td><td>20.8</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.1</td><td>0.0</td><td>3.5</td></tr><tr><td>32.5 64.6</td><td>33.0 57.3</td><td>27.4 51.2</td><td>26.7 58.5</td><td>28.2 38.4</td><td>16.9 42.7</td><td>27.5 52.1</td></tr><tr><td colspan=\"8\"></td></tr><tr><td colspan=\"8\">Permissive models</td></tr><tr><td>BLOOMZ</td><td>14.7</td><td>8.8</td><td>12.1</td><td>8.5</td><td>0.6</td><td>0.0</td><td>7.5</td></tr><tr><td>StarChat-β</td><td>25.4</td><td>21.5</td><td>24.5</td><td>18.4</td><td>17.6</td><td>13.2</td><td>20.1</td></tr><tr><td>CodeGeeX2*</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td></tr><tr><td>StarCoder</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td><td>0.0</td></tr><tr><td>OCTOGEEX*</td><td>30.4</td><td>24.0</td><td>24.7</td><td>21.7</td><td>21.0</td><td>15.9</td><td>22.9</td></tr><tr><td>OCTOCODER</td><td>35.1</td><td>24.5</td><td>27.3</td><td>21.1</td><td>24.1</td><td>14.8</td><td>24.5</td></tr></table>",
|
| 273 |
+
"page_idx": 6
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "table",
|
| 277 |
+
"img_path": "images/085edfd48897c54ba4810d3d8cc5d2758ca1d7430a2953ee48afb5e9dd105dcc.jpg",
|
| 278 |
+
"table_caption": [
|
| 279 |
+
"HUMANEVALSYNTHESIZE ",
|
| 280 |
+
"Table 2: Zero-shot pass $@ 1$ $( \\% )$ performance across HUMANEVALPACK. InstructCodeT $^ { 5 + }$ , WizardCoder, StarChat- $\\boldsymbol { \\cdot } \\beta$ , StarCoder and OCTOCODER have 16B parameters. CodeGeeX2 and OCTOGEEX have 6B parameters. BLOOMZ has 176B parameters. In this work, we call models \"permissive\" if weights are freely accessible and usable for commercial purposes. ⇤: Commercial license available after submitting a form. $\\dagger$ : Trained on data that may not be used “to develop models that compete with OpenAI” thus we classify them as non-permissive in this work (see $\\ S 1$ ). "
|
| 281 |
+
],
|
| 282 |
+
"table_footnote": [],
|
| 283 |
+
"table_body": "<table><tr><td colspan=\"8\">Non-permissive models</td></tr><tr><td rowspan=\"2\">InstructCodeT5+† WizardCodert GPT-4</td><td>37.0</td><td>18.9</td><td>17.4</td><td>9.5</td><td>19.8</td><td>0.3</td><td>17.1</td></tr><tr><td>57.3 86.6</td><td>49.5 82.9</td><td>36.1 81.7</td><td>36.4 72.6</td><td>40.9 78.7</td><td>20.2 67.1</td><td>40.1 78.3</td></tr><tr><td colspan=\"8\">Permissive models</td></tr><tr><td colspan=\"8\"></td></tr><tr><td>BLOOMZ StarChat-β</td><td>15.6 33.5</td><td>14.8 31.4</td><td>18.4 26.7</td><td>8.4 25.5</td><td>6.5 26.6</td><td>5.5 14.0</td><td>11.5 26.3</td></tr><tr><td>CodeGeeX2*</td><td>35.9</td><td>32.2</td><td>30.8</td><td>22.5</td><td>29.3</td><td>18.1</td><td>28.1</td></tr><tr><td>StarCoder</td><td>33.6</td><td>30.8</td><td>30.2</td><td>17.6</td><td>31.6</td><td>21.8</td><td>27.6</td></tr><tr><td>OCTOGEEX*</td><td>44.7</td><td>33.8</td><td>36.9</td><td>21.9</td><td>32.3</td><td>15.7</td><td>30.9</td></tr><tr><td>OCTOCODER</td><td>46.2</td><td>39.2</td><td>38.2</td><td>30.4</td><td>35.6</td><td>23.4</td><td>35.5</td></tr></table>",
|
| 284 |
+
"page_idx": 6
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"type": "text",
|
| 288 |
+
"text": "",
|
| 289 |
+
"page_idx": 7
|
| 290 |
+
},
|
| 291 |
+
{
|
| 292 |
+
"type": "text",
|
| 293 |
+
"text": "Models struggle with small targeted changes HUMANEVALFIX is the most challenging task for most models. They commonly regenerate the buggy function without making any change (e.g. WizardCoder in Figure 34) or they introduce new bugs (e.g. GPT-4 in Figure 33). We analyze model performance by bug type in Appendix M and find bugs that require removing excess code are the most challenging. OCTOCODER performs comparatively well across all languages. Instruction tuning on COMMITPACKFT has likely taught OCTOCODER to make small, targeted changes to fix bugs. ",
|
| 294 |
+
"page_idx": 7
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"type": "text",
|
| 298 |
+
"text": "Models struggle switching between code and text Some models fail at HUMANEVALEXPLAIN, as they do not generate natural language explanations. We manually inspect explanations for the first ten samples of the Python split and disqualify a model if none of them are explanations. This is the case for StarCoder and CodeGeeX2, which generate code instead of natural language explanations. BLOOMZ and InstructCode $^ { \\mathrm { 7 5 + } }$ also occasionally generate code. Other models exclusively generate natural language explanations, not containing any code for inspected samples. ",
|
| 299 |
+
"page_idx": 7
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"type": "text",
|
| 303 |
+
"text": "Models struggle adhering to a specified output length HUMANEVALEXPLAIN instructs models to fit their explanation within a given character limit (§3). Current models appear to have no understanding of how many characters they are generating. They commonly write very short and thus underspecified explanations (e.g. BLOOMZ in Figure 35) or excessively long explanations that end up being cut off (e.g. StarChat- $\\beta$ in Figure 38). Future work could investigate how to enable models to be aware of their generated output length to improve HUMANEVALEXPLAIN performance. ",
|
| 304 |
+
"page_idx": 7
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
"type": "text",
|
| 308 |
+
"text": "HumanEval code synthesis is close to saturation Pure code synthesis on HUMANEVALSYNTHESIZE is the easiest task for all models. With a pass rate of $8 6 . 6 \\%$ for a single solution, GPT-4 is close to fully saturating the Python subset. GPT-4 was originally found to score $67 \\%$ on Python HumanEval (OpenAI, 2023) and $81 \\%$ in later work (Bubeck et al., 2023). Our score for GPT-4 is significantly higher, possibly due to improvements made to the API by OpenAI, contamination of HumanEval in GPT-4 training, or slightly different prompting and evaluation. An example of our prompt is depicted in Figure 3 (right). We perform very careful evaluation to ensure every generation is correctly processed. We reproduce the HumanEval score of WizardCoder (Luo et al., 2023; $\\mathrm { X u }$ et al., 2023a) and find it to also perform well across other languages. For BLOOMZ and InstructCodeT $^ { 5 + }$ our evaluation leads to a higher Python score than they reported, likely because of our more careful processing of generations. OCTOCODER has the highest performance for every language among permissively licensed models. With a pass $@ 1$ of $4 6 . 2 \\%$ on the original Python split, OCTOCODER improves by a relative $38 \\%$ over its base model, StarCoder. ",
|
| 309 |
+
"page_idx": 7
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"type": "text",
|
| 313 |
+
"text": "5 RELATED WORK ",
|
| 314 |
+
"text_level": 1,
|
| 315 |
+
"page_idx": 7
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"type": "text",
|
| 319 |
+
"text": "5.1 CODE MODELS ",
|
| 320 |
+
"text_level": 1,
|
| 321 |
+
"page_idx": 7
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "text",
|
| 325 |
+
"text": "There has been extensive work on code models tailored to a specific coding task, such as code summarization (Iyer et al., 2016; Ahmad et al., 2020; Zhang et al., 2022a; Shi et al., 2022) or code editing (Drain et al., 2021; Zhang et al., 2022c; He et al., 2022; Zhang et al., 2022b; Wei et al., 2023; Prenner & Robbes, 2023; Fakhoury et al., 2023; Skreta et al., 2023) (also see work on edit models more generally (Reid & Neubig, 2022; Schick et al., 2022; Dwivedi-Yu et al., 2022; Raheja et al., 2023)). These works use task-specific heuristics that limit the applicability of their methods to other tasks. In contrast, we aim to build models applicable to all kinds of tasks related to code and beyond. ",
|
| 326 |
+
"page_idx": 7
|
| 327 |
+
},
|
| 328 |
+
{
|
| 329 |
+
"type": "text",
|
| 330 |
+
"text": "Through large-scale pretraining more generally applicable code models have been developed (Nijkamp et al., 2022; 2023; Xu et al., 2022a; Christopoulou et al., 2022; Gunasekar et al., 2023; Li et al., 2023b; Bui et al., 2023; Scao et al., 2022a;b). However, these models only continue code making them hard to use for tasks such as explaining code with natural language (HUMANEVALEXPLAIN). Teaching them to follow human instructions is critical to make them applicable to diverse tasks. ",
|
| 331 |
+
"page_idx": 7
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"type": "text",
|
| 335 |
+
"text": "5.2 INSTRUCTION MODELS ",
|
| 336 |
+
"text_level": 1,
|
| 337 |
+
"page_idx": 8
|
| 338 |
+
},
|
| 339 |
+
{
|
| 340 |
+
"type": "text",
|
| 341 |
+
"text": "Training models to follow instructions has led to new capabilities in text (Ouyang et al., 2022; Wang et al., 2022b; Chung et al., 2022) and visual modalities (Xu et al., 2023b; OpenAI, 2023). Prior work has shown its benefits for traditional language tasks (Wei et al., 2022; Longpre et al., 2023a; Iyer et al., 2022), multilingual tasks (Muennighoff et al., 2022b; 2024; Yong et al., 2022; Üstün et al., 2024), and dialog (Köpf et al., 2023; Bai et al., 2022; Ganguli et al., 2022). For coding applications, PanGu-Coder2 (Shen et al., 2023), WizardCoder (Luo et al., 2023) and InstructCode $\\mathrm { T } 5 +$ (Wang et al., 2023c) are recent models trained with coding instructions. However, they all use the CodeAlpaca dataset (Chaudhary, 2023), which is synthetically generated from OpenAI models. Using data from powerful closed-source models provides a strong advantage, but limits the model use and has other limitations highlighted in $\\ S 1$ . CoEditor (Wei et al., 2023) proposes an “auto-editing” task, trained on 1650 python commit history repositories. Our work expands this to more general coding tasks via instructions, more languages, and orders of magnitude more commit data. ",
|
| 342 |
+
"page_idx": 8
|
| 343 |
+
},
|
| 344 |
+
{
|
| 345 |
+
"type": "text",
|
| 346 |
+
"text": "5.3 CODE BENCHMARKS ",
|
| 347 |
+
"text_level": 1,
|
| 348 |
+
"page_idx": 8
|
| 349 |
+
},
|
| 350 |
+
{
|
| 351 |
+
"type": "text",
|
| 352 |
+
"text": "Many code synthesis benchmarks have been proposed (Wang et al., 2022d;c; Yu et al., 2023; Lai et al., 2023; Du et al., 2023). HumanEval (Chen et al., 2021; Liu et al., 2023b) has emerged as the standard for this task. Prior work has extended HumanEval to new programming languages via automatic translation mechanisms (Athiwaratkun et al., 2022; Cassano et al., 2023; Orlanski et al., 2023). These approaches are error-prone and only translate tests, not the actual solutions, which are needed for tasks like code explanation. Thus, we rely only on humans to create all parts of HUMANEVALPACK including test cases, correct solutions, buggy solutions, and other metadata across 6 languages. ",
|
| 353 |
+
"page_idx": 8
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"type": "text",
|
| 357 |
+
"text": "Code repair is commonly evaluated on Quixbugs (Lin et al., 2017; Prenner & Robbes, 2021; Ye et al., 2021; Xia & Zhang, 2023; Jiang et al., 2023; Sobania et al., 2023) or Python bugs (He et al., 2022; Bradley et al., 2023). The latter does not support code execution, which limits its utility. While Quixbugs supports execution with unit tests, it only contains 40 samples in Python and Java. Further, the problems in Quixbugs are generic functions, such as bucket sort. This makes them easy to solve and hard to decontaminate training data for. Our benchmark, HUMANEVALFIX, contains 164 buggy functions for six languages with solutions and unit tests. Further, our coding problems, derived from HumanEval, are very specific, such as keeping track of a bank account balance (see Figure 14). ",
|
| 358 |
+
"page_idx": 8
|
| 359 |
+
},
|
| 360 |
+
{
|
| 361 |
+
"type": "text",
|
| 362 |
+
"text": "Prior work on evaluating code explanations (Lu et al., 2021; Cui et al., 2022) has relied on metrics such as METEOR (Banerjee & Lavie, 2005) or BLEU (Papineni et al., 2002). By chaining code explanation with code synthesis, we can evaluate this task using the execution-based pass $@ k$ metric overcoming the major limitations of BLEU and other heuristics-based metrics (Reiter, 2018). ",
|
| 363 |
+
"page_idx": 8
|
| 364 |
+
},
|
| 365 |
+
{
|
| 366 |
+
"type": "text",
|
| 367 |
+
"text": "Large-scale benchmarking has proven useful in many areas of natural language processing (Wang et al., 2019; Kiela et al., 2021; Srivastava et al., 2022; Muennighoff et al., 2022a). By producing 18 scores (6 languages across 3 tasks) for 9 models, we take a step towards large-scale benchmarking of code models. However, we lack many models capable of generating code (Black et al., 2021; Fried et al., 2022; Black et al., 2022; Wang & Komatsuzaki, 2021; Biderman et al., 2023b). Future work may consider more models or extending HUMANEVALPACK to new languages or tasks, such as code efficiency (Madaan et al., 2023a; Yetistiren et al., 2022) or code classification (Khan et al., 2023). ",
|
| 368 |
+
"page_idx": 8
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"type": "text",
|
| 372 |
+
"text": "6 CONCLUSION ",
|
| 373 |
+
"text_level": 1,
|
| 374 |
+
"page_idx": 8
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "text",
|
| 378 |
+
"text": "This work studies training and evaluation of Code LLMs that follow instructions. We introduce COMMITPACK, a 4TB dataset of Git commits covering 350 programming languages. We filter this large-scale dataset to create COMMITPACKFT, 2GB of high-quality code with commit messages that assimilate instructions. To enable a comprehensive evaluation of instruction code models, we construct HUMANEVALPACK, a human-written benchmark covering 3 different tasks for 6 programming languages. We ablate several instruction datasets and find that COMMITPACKFT combined with natural language data leads to the best performance. While our models, OCTOCODER and OCTOGEEX, are the best permissively licensed Code LLMs available, they are outperformed by closed-source models such as GPT-4. In addition to improving the instruction tuning paradigm, future work should consider training more capable base models. ",
|
| 379 |
+
"page_idx": 8
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"type": "text",
|
| 383 |
+
"text": "ACKNOWLEDGEMENTS ",
|
| 384 |
+
"text_level": 1,
|
| 385 |
+
"page_idx": 9
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"type": "text",
|
| 389 |
+
"text": "We thank Hugging Face for providing compute instances. We are extremely grateful to Rodrigo Garcia for the Rust translations, Dimitry Ageev and Calum Bird for help with GPT-4 evaluation, Loubna Ben Allal for help on evaluation, Arjun Guha for insightful discussions on chaining evaluation tasks to avoid evaluating with BLEU, Lewis Tunstall for help on the OASST data, Victor Sanh and Nadav Timor for discussions, Jiaxi Yang for logo editing and domain classification prompting design, Ghosal et al. (2023); Zeng et al. (2023) for design inspiration, Harm de Vries for feedback and all members of BigCode for general support. Finally, we thank every programmer who takes the time to write informative commit messages. ",
|
| 390 |
+
"page_idx": 9
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"type": "text",
|
| 394 |
+
"text": "REFERENCES ",
|
| 395 |
+
"text_level": 1,
|
| 396 |
+
"page_idx": 9
|
| 397 |
+
},
|
| 398 |
+
{
|
| 399 |
+
"type": "text",
|
| 400 |
+
"text": "Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. A transformer-based approach for source code summarization. arXiv preprint arXiv:2005.00653, 2020. \nLoubna Ben Allal, Raymond Li, Denis Kocetkov, Chenghao Mou, Christopher Akiki, Carlos Munoz Ferrandis, Niklas Muennighoff, Mayank Mishra, Alex Gu, Manan Dey, et al. Santacoder: don’t reach for the stars! arXiv preprint arXiv:2301.03988, 2023. \nBen Athiwaratkun, Sanjay Krishna Gouda, Zijian Wang, Xiaopeng Li, Yuchen Tian, Ming Tan, Wasi Uddin Ahmad, Shiqi Wang, Qing Sun, Mingyue Shang, et al. Multi-lingual evaluation of code generation models. arXiv preprint arXiv:2210.14868, 2022. \nJacob Austin, Augustus Odena, Maxwell Nye, Maarten Bosma, Henryk Michalewski, David Dohan, Ellen Jiang, Carrie Cai, Michael Terry, Quoc Le, et al. Program synthesis with large language models. arXiv preprint arXiv:2108.07732, 2021. \nHannah McLean Babe, Sydney Nguyen, Yangtian Zi, Arjun Guha, Molly Q Feldman, and Carolyn Jane Anderson. Studenteval: A benchmark of student-written prompts for large language models of code. arXiv preprint arXiv:2306.04556, 2023. \nYuntao Bai, Andy Jones, Kamal Ndousse, Amanda Askell, Anna Chen, Nova DasSarma, Dawn Drain, Stanislav Fort, Deep Ganguli, Tom Henighan, et al. Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862, 2022. URL https://arxiv.org/abs/2204.05862. \nSatanjeev Banerjee and Alon Lavie. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization, pp. 65–72, 2005. \nAntonio Valerio Miceli Barone and Rico Sennrich. A parallel corpus of python functions and documentation strings for automated code documentation and code generation. arXiv preprint arXiv:1707.02275, 2017. \nMohammad Bavarian, Heewoo Jun, Nikolas A. Tezak, John Schulman, Christine McLeavey, Jerry Tworek, and Mark Chen. Efficient training of language models to fill in the middle. arXiv preprint arXiv:2207.14255, 2022. \nLoubna Ben Allal, Niklas Muennighoff, Logesh Kumar Umapathi, Ben Lipkin, and Leandro von Werra. A framework for the evaluation of code generation models. https://github.com/b igcode-project/bigcode-evaluation-harness, 2022. \nStella Biderman, USVSN Sai Prashanth, Lintang Sutawika, Hailey Schoelkopf, Quentin Anthony, Shivanshu Purohit, and Edward Raf. Emergent and predictable memorization in large language models. arXiv preprint arXiv:2304.11158, 2023a. \nStella Biderman, Hailey Schoelkopf, Quentin Gregory Anthony, Herbie Bradley, Kyle O’Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, et al. Pythia: A suite for analyzing large language models across training and scaling. In International Conference on Machine Learning, pp. 2397–2430. PMLR, 2023b. ",
|
| 401 |
+
"page_idx": 9
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"type": "text",
|
| 405 |
+
"text": "Sid Black, Leo Gao, Phil Wang, Connor Leahy, and Stella Biderman. Gpt-neo: Large scale autoregressive language modeling with mesh-tensorflow. If you use this software, please cite it using these metadata, 58, 2021. ",
|
| 406 |
+
"page_idx": 10
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"type": "text",
|
| 410 |
+
"text": "Sid Black, Stella Biderman, Eric Hallahan, Quentin Anthony, Leo Gao, Laurence Golding, Horace He, Connor Leahy, Kyle McDonell, Jason Phang, et al. Gpt-neox-20b: An open-source autoregressive language model. arXiv preprint arXiv:2204.06745, 2022. \nHerbie Bradley, Honglu Fan, Harry Saini, Reshinth Adithyan, Shivanshu Purohit, and Joel Lehman. Diff models - a new way to edit code. CarperAI Blog, Jan 2023. URL https://carper.ai/ diff-model/. \nTom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D. Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Conference on Neural Information Processing Systems (NeurIPS), 2020. URL https://papers.nips.cc/paper/2020/hash/1457c0d6bfcb4967418bfb8ac 142f64a-Abstract.html. \nSébastien Bubeck, Varun Chandrasekaran, Ronen Eldan, Johannes Gehrke, Eric Horvitz, Ece Kamar, Peter Lee, Yin Tat Lee, Yuanzhi Li, Scott Lundberg, et al. Sparks of artificial general intelligence: Early experiments with gpt-4. arXiv preprint arXiv:2303.12712, 2023. \nNghi DQ Bui, Hung Le, Yue Wang, Junnan Li, Akhilesh Deepak Gotmare, and Steven CH Hoi. Codetf: One-stop transformer library for state-of-the-art code llm. arXiv preprint arXiv:2306.00029, 2023. \nFederico Cassano, John Gouwar, Daniel Nguyen, Sydney Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q Feldman, et al. Multipl-e: a scalable and polyglot approach to benchmarking neural code generation. IEEE Transactions on Software Engineering, 2023. \nSahil Chaudhary. Code alpaca: An instruction-following llama model for code generation. https: //github.com/sahil280114/codealpaca, 2023. \nBei Chen, Fengji Zhang, Anh Nguyen, Daoguang Zan, Zeqi Lin, Jian-Guang Lou, and Weizhu Chen. Codet: Code generation with generated tests. arXiv preprint arXiv:2207.10397, 2022. \nLingjiao Chen, Matei Zaharia, and James Zou. How is chatgpt’s behavior changing over time?, 2023a. \nMark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. \nShouyuan Chen, Sherman Wong, Liangjian Chen, and Yuandong Tian. Extending context window of large language models via positional interpolation. arXiv preprint arXiv:2306.15595, 2023b. \nXinyun Chen, Maxwell Lin, Nathanael Schärli, and Denny Zhou. Teaching large language models to self-debug. arXiv preprint arXiv:2304.05128, 2023c. \nPaul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences. Advances in neural information processing systems, 30, 2017. \nFenia Christopoulou, Gerasimos Lampouras, Milan Gritta, Guchun Zhang, Yinpeng Guo, Zhongqi Li, Qi Zhang, Meng Xiao, Bo Shen, Lin Li, et al. Pangu-coder: Program synthesis with function-level language modeling. arXiv preprint arXiv:2207.11280, 2022. \nHyung Won Chung, Le Hou, Shayne Longpre, Barret Zoph, Yi Tay, William Fedus, Eric Li, Xuezhi Wang, Mostafa Dehghani, Siddhartha Brahma, et al. Scaling instruction-finetuned language models. arXiv preprint arXiv:2210.11416, 2022. URL https://arxiv.org/abs/2210.11416. \nHaotian Cui, Chenglong Wang, Junjie Huang, Jeevana Priya Inala, Todd Mytkowicz, Bo Wang, Jianfeng Gao, and Nan Duan. Codeexp: Explanatory code document generation. arXiv preprint arXiv:2211.15395, 2022. ",
|
| 411 |
+
"page_idx": 10
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "text",
|
| 415 |
+
"text": "Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V Le, and Ruslan Salakhutdinov. Transformer-xl: Attentive language models beyond a fixed-length context. arXiv preprint arXiv:1901.02860, 2019. ",
|
| 416 |
+
"page_idx": 11
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"type": "text",
|
| 420 |
+
"text": "Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. Flashattention: Fast and memoryefficient exact attention with io-awareness. Advances in Neural Information Processing Systems, 35:16344–16359, 2022. \nTim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. arXiv preprint arXiv:2305.14314, 2023. \nKaustubh D Dhole, Varun Gangal, Sebastian Gehrmann, Aadesh Gupta, Zhenhao Li, Saad Mahamood, Abinaya Mahendiran, Simon Mille, Ashish Srivastava, Samson Tan, et al. Nl-augmenter: A framework for task-sensitive natural language augmentation. arXiv preprint arXiv:2112.02721, 2021. \nYangruibo Ding, Zijian Wang, Wasi Uddin Ahmad, Murali Krishna Ramanathan, Ramesh Nallapati, Parminder Bhatia, Dan Roth, and Bing Xiang. Cocomic: Code completion by jointly modeling in-file and cross-file context. arXiv preprint arXiv:2212.10007, 2022. \nYihong Dong, Xue Jiang, Zhi Jin, and Ge Li. Self-collaboration code generation via chatgpt. arXiv preprint arXiv:2304.07590, 2023. \nDawn Drain, Colin B Clement, Guillermo Serrato, and Neel Sundaresan. Deepdebug: Fixing python bugs using stack traces, backtranslation, and code skeletons. arXiv preprint arXiv:2105.09352, 2021. \nXueying Du, Mingwei Liu, Kaixin Wang, Hanlin Wang, Junwei Liu, Yixuan Chen, Jiayi Feng, Chaofeng Sha, Xin Peng, and Yiling Lou. Classeval: A manually-crafted benchmark for evaluating llms on class-level code generation. arXiv preprint arXiv:2308.01861, 2023. \nJane Dwivedi-Yu, Timo Schick, Zhengbao Jiang, Maria Lomeli, Patrick Lewis, Gautier Izacard, Edouard Grave, Sebastian Riedel, and Fabio Petroni. Editeval: An instruction-based benchmark for text improvements. arXiv preprint arXiv:2209.13331, 2022. \nAryaz Eghbali and Michael Pradel. Crystalbleu: precisely and efficiently measuring the similarity of code. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering, pp. 1–12, 2022. \nKawin Ethayarajh, Winnie Xu, Niklas Muennighoff, Dan Jurafsky, and Douwe Kiela. Kto: Model alignment as prospect theoretic optimization, 2024. \nSarah Fakhoury, Saikat Chakraborty, Madan Musuvathi, and Shuvendu K Lahiri. Towards generating functionally correct code edits from natural language issue descriptions. arXiv preprint arXiv:2304.03816, 2023. \nDaniel Fried, Armen Aghajanyan, Jessy Lin, Sida Wang, Eric Wallace, Freda Shi, Ruiqi Zhong, Wen-tau Yih, Luke Zettlemoyer, and Mike Lewis. Incoder: A generative model for code infilling and synthesis. arXiv preprint arXiv:2204.05999, 2022. \nJinlan Fu, See-Kiong Ng, Zhengbao Jiang, and Pengfei Liu. Gptscore: Evaluate as you desire. arXiv preprint arXiv:2302.04166, 2023. \nDeep Ganguli, Liane Lovitt, Jackson Kernion, Amanda Askell, Yuntao Bai, Saurav Kadavath, Ben Mann, Ethan Perez, Nicholas Schiefer, Kamal Ndousse, et al. Red teaming language models to reduce harms: Methods, scaling behaviors, and lessons learned. arXiv preprint arXiv:2209.07858, 2022. \nLeo Gao, Jonathan Tow, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Kyle McDonell, Niklas Muennighoff, Jason Phang, Laria Reynolds, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. A framework for few-shot language model evaluation, 2021. URL https://doi.org/10.5281/zenodo.5371628. ",
|
| 421 |
+
"page_idx": 11
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "Luyu Gao, Aman Madaan, Shuyan Zhou, Uri Alon, Pengfei Liu, Yiming Yang, Jamie Callan, and Graham Neubig. Pal: Program-aided language models. In International Conference on Machine Learning, pp. 10764–10799. PMLR, 2023. ",
|
| 426 |
+
"page_idx": 12
|
| 427 |
+
},
|
| 428 |
+
{
|
| 429 |
+
"type": "text",
|
| 430 |
+
"text": "Deepanway Ghosal, Yew Ken Chia, Navonil Majumder, and Soujanya Poria. Flacuna: Unleashing the problem solving power of vicuna using flan fine-tuning. arXiv preprint arXiv:2307.02053, 2023. \nZhibin Gou, Zhihong Shao, Yeyun Gong, Yelong Shen, Yujiu Yang, Nan Duan, and Weizhu Chen. Critic: Large language models can self-correct with tool-interactive critiquing. arXiv preprint arXiv:2305.11738, 2023. \nDirk Groeneveld, Iz Beltagy, Pete Walsh, Akshita Bhagia, Rodney Kinney, Oyvind Tafjord, A. Jha, Hamish Ivison, Ian Magnusson, Yizhong Wang, Shane Arora, David Atkinson, Russell Authur, Khyathi Raghavi Chandu, Arman Cohan, Jennifer Dumas, Yanai Elazar, Yuling Gu, Jack Hessel, Tushar Khot, William Merrill, Jacob Daniel Morrison, Niklas Muennighoff, Aakanksha Naik, Crystal Nam, Matthew E. Peters, Valentina Pyatkin, Abhilasha Ravichander, Dustin Schwenk, Saurabh Shah, Will Smith, Emma Strubell, Nishant Subramani, Mitchell Wortsman, Pradeep Dasigi, Nathan Lambert, Kyle Richardson, Luke Zettlemoyer, Jesse Dodge, Kyle Lo, Luca Soldaini, Noah A. Smith, and Hanna Hajishirzi. Olmo: Accelerating the science of language models. 2024. URL https://api.semanticscholar.org/CorpusID:267365485. \nArnav Gudibande, Eric Wallace, Charlie Snell, Xinyang Geng, Hao Liu, Pieter Abbeel, Sergey Levine, and Dawn Song. The false promise of imitating proprietary llms. arXiv preprint arXiv:2305.15717, 2023. \nSuriya Gunasekar, Yi Zhang, Jyoti Aneja, Caio César Teodoro Mendes, Allie Del Giorno, Sivakanth Gopi, Mojan Javaheripi, Piero Kauffmann, Gustavo de Rosa, Olli Saarikivi, et al. Textbooks are all you need. arXiv preprint arXiv:2306.11644, 2023. \nJingxuan He, Luca Beurer-Kellner, and Martin Vechev. On distribution shift in learning-based bug detectors. In International Conference on Machine Learning, pp. 8559–8580. PMLR, 2022. \nVincent J Hellendoorn, Charles Sutton, Rishabh Singh, Petros Maniatis, and David Bieber. Global relational models of source code. In International conference on learning representations, 2019. \nDan Hendrycks, Steven Basart, Saurav Kadavath, Mantas Mazeika, Akul Arora, Ethan Guo, Collin Burns, Samir Puranik, Horace He, Dawn Song, et al. Measuring coding challenge competence with apps. arXiv preprint arXiv:2105.09938, 2021. \nEdward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021. \nYi Hu, Haotong Yang, Zhouchen Lin, and Muhan Zhang. Code prompting: a neural symbolic method for complex reasoning in large language models. arXiv preprint arXiv:2305.18507, 2023. \nSrinivasan Iyer, Ioannis Konstas, Alvin Cheung, and Luke Zettlemoyer. Summarizing source code using a neural attention model. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 2073–2083, 2016. \nSrinivasan Iyer, Xi Victoria Lin, Ramakanth Pasunuru, Todor Mihaylov, Daniel Simig, Ping Yu, Kurt Shuster, Tianlu Wang, Qing Liu, Punit Singh Koura, Xian Li, Brian O’Horo, Gabriel Pereyra, Jeff Wang, Christopher Dewan, Asli Celikyilmaz, Luke Zettlemoyer, and Ves Stoyanov. Opt-iml: Scaling language model instruction meta learning through the lens of generalization. arXiv preprint arXiv:2212.12017, 2022. URL https://arxiv.org/abs/2212.12017. \nMingi Jeon, Seung-Yeop Baik, Joonghyuk Hahn, Yo-Sub Han, and Sang-Ki Ko. Deep Learning-based Code Complexity Prediction. openreview, 2022. ",
|
| 431 |
+
"page_idx": 12
|
| 432 |
+
},
|
| 433 |
+
{
|
| 434 |
+
"type": "text",
|
| 435 |
+
"text": "Nan Jiang, Kevin Liu, Thibaud Lutellier, and Lin Tan. Impact of code language models on automated program repair. arXiv preprint arXiv:2302.05020, 2023. ",
|
| 436 |
+
"page_idx": 12
|
| 437 |
+
},
|
| 438 |
+
{
|
| 439 |
+
"type": "text",
|
| 440 |
+
"text": "Tae-Hwan Jung. Commitbert: Commit message generation using pre-trained programming language model. arXiv preprint arXiv:2105.14242, 2021. ",
|
| 441 |
+
"page_idx": 13
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"type": "text",
|
| 445 |
+
"text": "Mohammad Abdullah Matin Khan, M Saiful Bari, Xuan Long Do, Weishi Wang, Md Rizwan Parvez, and Shafiq Joty. xcodeeval: A large scale multilingual multitask benchmark for code understanding, generation, translation and retrieval. arXiv preprint arXiv:2303.03004, 2023. \nDouwe Kiela, Hamed Firooz, Aravind Mohan, Vedanuj Goswami, Amanpreet Singh, Casey A Fitzpatrick, Peter Bull, Greg Lipstein, Tony Nelli, Ron Zhu, et al. The hateful memes challenge: Competition report. In NeurIPS 2020 Competition and Demonstration Track, pp. 344–360. PMLR, 2021. \nDenis Kocetkov, Raymond Li, Loubna Ben Allal, Jia Li, Chenghao Mou, Carlos Muñoz Ferrandis, Yacine Jernite, Margaret Mitchell, Sean Hughes, Thomas Wolf, et al. The stack: 3 tb of permissively licensed source code. arXiv preprint arXiv:2211.15533, 2022. \nAndreas Köpf, Yannic Kilcher, Dimitri von Rütte, Sotiris Anagnostidis, Zhi-Rui Tam, Keith Stevens, Abdullah Barhoum, Nguyen Minh Duc, Oliver Stanley, Richárd Nagyfi, et al. Openassistant conversations–democratizing large language model alignment. arXiv preprint arXiv:2304.07327, 2023. \nYuhang Lai, Chengxi Li, Yiming Wang, Tianyi Zhang, Ruiqi Zhong, Luke Zettlemoyer, Wen-tau Yih, Daniel Fried, Sida Wang, and Tao Yu. Ds-1000: A natural and reliable benchmark for data science code generation. In International Conference on Machine Learning, pp. 18319–18345. PMLR, 2023. \nHugo Laurençon, Lucile Saulnier, Thomas Wang, Christopher Akiki, Albert Villanova del Moral, Teven Le Scao, Leandro Von Werra, Chenghao Mou, Eduardo González Ponferrada, Huu Nguyen, et al. The bigscience roots corpus: A 1.6 tb composite multilingual dataset. Advances in Neural Information Processing Systems, 35:31809–31826, 2022. \nJoel Lehman, Jonathan Gordon, Shawn Jain, Kamal Ndousse, Cathy Yeh, and Kenneth O Stanley. Evolution through large models. arXiv preprint arXiv:2206.08896, 2022. \nBo Li, Yuanhan Zhang, Liangyu Chen, Jinghao Wang, Jingkang Yang, and Ziwei Liu. Otter: A multi-modal model with in-context instruction tuning. arXiv preprint arXiv:2305.03726, 2023a. \nHongyu Li, Seohyun Kim, and Satish Chandra. Neural code search evaluation dataset. arXiv preprint arXiv:1908.09804, 2019. \nRaymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, et al. Starcoder: may the source be with you! arXiv preprint arXiv:2305.06161, 2023b. \nXueyang Li, Shangqing Liu, Ruitao Feng, Guozhu Meng, Xiaofei Xie, Kai Chen, and Yang Liu. Transrepair: Context-aware program repair for compilation errors. In Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering, pp. 1–13, 2022a. \nYujia Li, David Choi, Junyoung Chung, Nate Kushman, Julian Schrittwieser, Rémi Leblond, Tom Eccles, James Keeling, Felix Gimeno, Agustin Dal Lago, et al. Competition-level code generation with alphacode. Science, 378(6624):1092–1097, 2022b. \nChin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In Text summarization branches out, pp. 74–81, 2004. \nDerrick Lin, James Koppel, Angela Chen, and Armando Solar-Lezama. Quixbugs: A multi-lingual program repair benchmark set based on the quixey challenge. In Proceedings Companion of the 2017 ACM SIGPLAN international conference on systems, programming, languages, and applications: software for humanity, pp. 55–56, 2017. \nHaotian Liu, Chunyuan Li, Qingyang Wu, and Yong Jae Lee. Visual instruction tuning. arXiv preprint arXiv:2304.08485, 2023a. \nJiawei Liu, Chunqiu Steven Xia, Yuyao Wang, and Lingming Zhang. Is your code generated by chatgpt really correct? rigorous evaluation of large language models for code generation. arXiv preprint arXiv:2305.01210, 2023b. \nNelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. Lost in the middle: How language models use long contexts. arXiv preprint arXiv:2307.03172, 2023c. \nTianyang Liu, Canwen Xu, and Julian McAuley. Repobench: Benchmarking repository-level code auto-completion systems. arXiv preprint arXiv:2306.03091, 2023d. \nYang Liu, Dan Iter, Yichong Xu, Shuohang Wang, Ruochen Xu, and Chenguang Zhu. Gpteval: Nlg evaluation using gpt-4 with better human alignment. arXiv preprint arXiv:2303.16634, 2023e. \nShayne Longpre, Le Hou, Tu Vu, Albert Webson, Hyung Won Chung, Yi Tay, Denny Zhou, Quoc V Le, Barret Zoph, Jason Wei, et al. The flan collection: Designing data and methods for effective instruction tuning. arXiv preprint arXiv:2301.13688, 2023a. \nShayne Longpre, Gregory Yauney, Emily Reif, Katherine Lee, Adam Roberts, Barret Zoph, Denny Zhou, Jason Wei, Kevin Robinson, David Mimno, et al. A pretrainer’s guide to training data: Measuring the effects of data age, domain coverage, quality, & toxicity. arXiv preprint arXiv:2305.13169, 2023b. \nShuai Lu, Daya Guo, Shuo Ren, Junjie Huang, Alexey Svyatkovskiy, Ambrosio Blanco, Colin Clement, Dawn Drain, Daxin Jiang, Duyu Tang, et al. Codexglue: A machine learning benchmark dataset for code understanding and generation. arXiv preprint arXiv:2102.04664, 2021. \nZiyang Luo, Can Xu, Pu Zhao, Qingfeng Sun, Xiubo Geng, Wenxiang Hu, Chongyang Tao, Jing Ma, Qingwei Lin, and Daxin Jiang. Wizardcoder: Empowering code large language models with evol-instruct. arXiv preprint arXiv:2306.08568, 2023. \nAman Madaan, Alexander Shypula, Uri Alon, Milad Hashemi, Parthasarathy Ranganathan, Yiming Yang, Graham Neubig, and Amir Yazdanbakhsh. Learning performance-improving code edits. arXiv preprint arXiv:2302.07867, 2023a. \nAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan, Luyu Gao, Sarah Wiegreffe, Uri Alon, Nouha Dziri, Shrimai Prabhumoye, Yiming Yang, et al. Self-refine: Iterative refinement with self-feedback. arXiv preprint arXiv:2303.17651, 2023b. \nSewon Min, Mike Lewis, Luke Zettlemoyer, and Hannaneh Hajishirzi. MetaICL: Learning to learn in context. Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), 2022. URL https://arxiv.org/abs/2110.15943. \nMartin Monperrus, Matias Martinez, He Ye, Fernanda Madeiral, Thomas Durieux, and Zhongxing Yu. Megadiff: A dataset of 600k java source code changes categorized by diff size. arXiv preprint arXiv:2108.04631, 2021. \nNiklas Muennighoff. Sgpt: Gpt sentence embeddings for semantic search. arXiv preprint arXiv:2202.08904, 2022. \nNiklas Muennighoff, Nouamane Tazi, Loïc Magne, and Nils Reimers. Mteb: Massive text embedding benchmark. arXiv preprint arXiv:2210.07316, 2022a. doi: 10.48550/ARXIV.2210.07316. URL https://arxiv.org/abs/2210.07316. \nNiklas Muennighoff, Thomas Wang, Lintang Sutawika, Adam Roberts, Stella Biderman, Teven Le Scao, M Saiful Bari, Sheng Shen, Zheng-Xin Yong, Hailey Schoelkopf, et al. Crosslingual generalization through multitask finetuning. arXiv preprint arXiv:2211.01786, 2022b. \nNiklas Muennighoff, Alexander M Rush, Boaz Barak, Teven Le Scao, Aleksandra Piktus, Nouamane Tazi, Sampo Pyysalo, Thomas Wolf, and Colin Raffel. Scaling data-constrained language models. arXiv preprint arXiv:2305.16264, 2023. \nNiklas Muennighoff, Hongjin Su, Liang Wang, Nan Yang, Furu Wei, Tao Yu, Amanpreet Singh, and Douwe Kiela. Generative representational instruction tuning, 2024. ",
|
| 446 |
+
"page_idx": 13
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"type": "text",
|
| 450 |
+
"text": "",
|
| 451 |
+
"page_idx": 14
|
| 452 |
+
},
|
| 453 |
+
{
|
| 454 |
+
"type": "text",
|
| 455 |
+
"text": "Ansong Ni, Srini Iyer, Dragomir Radev, Veselin Stoyanov, Wen-tau Yih, Sida Wang, and Xi Victoria Lin. Lever: Learning to verify language-to-code generation with execution. In International Conference on Machine Learning, pp. 26106–26128. PMLR, 2023. ",
|
| 456 |
+
"page_idx": 15
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "text",
|
| 460 |
+
"text": "Erik Nijkamp, Bo Pang, Hiroaki Hayashi, Lifu Tu, Huan Wang, Yingbo Zhou, Silvio Savarese, and Caiming Xiong. Codegen: An open large language model for code with multi-turn program synthesis. arXiv preprint arXiv:2203.13474, 2022. ",
|
| 461 |
+
"page_idx": 15
|
| 462 |
+
},
|
| 463 |
+
{
|
| 464 |
+
"type": "text",
|
| 465 |
+
"text": "Erik Nijkamp, Hiroaki Hayashi, Caiming Xiong, Silvio Savarese, and Yingbo Zhou. Codegen2: Lessons for training llms on programming and natural languages. arXiv preprint arXiv:2305.02309, 2023. ",
|
| 466 |
+
"page_idx": 15
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"type": "text",
|
| 470 |
+
"text": "Maxwell Nye, Anders Johan Andreassen, Guy Gur-Ari, Henryk Michalewski, Jacob Austin, David Bieber, David Dohan, Aitor Lewkowycz, Maarten Bosma, David Luan, et al. Show your work: Scratchpads for intermediate computation with language models. arXiv preprint arXiv:2112.00114, 2021. URL https://openreview.net/forum?id ${ . } = { }$ iedYJm92o0a. \nOpenAI. Gpt-4 technical report, 2023. \nGabriel Orlanski, Kefan Xiao, Xavier Garcia, Jeffrey Hui, Joshua Howland, Jonathan Malmaud, Jacob Austin, Rishah Singh, and Michele Catasta. Measuring the impact of programming language distribution. arXiv preprint arXiv:2302.01973, 2023. \nLong Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. In Conference on Neural Information Processing Systems (NeurIPS), 2022. URL https://arxiv.org/abs/2203.02155. \nKishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th annual meeting of the Association for Computational Linguistics, pp. 311–318, 2002. \nBo Peng, Eric Alcaide, Quentin Anthony, Alon Albalak, Samuel Arcadinho, Huanqi Cao, Xin Cheng, Michael Chung, Matteo Grella, Kranthi Kiran GV, et al. Rwkv: Reinventing rnns for the transformer era. arXiv preprint arXiv:2305.13048, 2023. \nEthan Perez, Douwe Kiela, and Kyunghyun Cho. True few-shot learning with language models. Advances in Neural Information Processing Systems, 34:11054–11070, 2021. \nLuiza Amador Pozzobon, Beyza Ermis, Patrick Lewis, and Sara Hooker. On the challenges of using black-box apis for toxicity evaluation in research. In ICLR 2023 Workshop on Trustworthy and Reliable Large-Scale Machine Learning Models, 2023. \nJulian Aron Prenner and Romain Robbes. Automatic program repair with openai’s codex: Evaluating quixbugs. arXiv preprint arXiv:2111.03922, 2021. \nJulian Aron Prenner and Romain Robbes. Runbugrun–an executable dataset for automated program repair. arXiv preprint arXiv:2304.01102, 2023. \nOfir Press, Noah A Smith, and Mike Lewis. Train short, test long: Attention with linear biases enables input length extrapolation. arXiv preprint arXiv:2108.12409, 2021. \nRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D Manning, Stefano Ermon, and Chelsea Finn. Direct preference optimization: Your language model is secretly a reward model. Advances in Neural Information Processing Systems, 36, 2024. \nVipul Raheja, Dhruv Kumar, Ryan Koo, and Dongyeop Kang. Coedit: Text editing by task-specific instruction tuning. arXiv preprint arXiv:2305.09857, 2023. \nMachel Reid and Graham Neubig. Learning to model editing processes. arXiv preprint arXiv:2205.12374, 2022. \nEhud Reiter. A structured review of the validity of bleu. Computational Linguistics, 44(3):393–401, 2018. \nVictor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Teven Le Scao, Arun Raja, et al. Multitask prompted training enables zero-shot task generalization. International Conference on Learning Representations (ICLR), 2022. URL https://openreview.net/forum?id $=$ 9Vrb9D0WI4. \nTeven Le Scao, Angela Fan, Christopher Akiki, Ellie Pavlick, Suzana Ilic, Daniel Hesslow, Roman ´ Castagné, Alexandra Sasha Luccioni, François Yvon, Matthias Gallé, et al. Bloom: A 176bparameter open-access multilingual language model. arXiv preprint arXiv:2211.05100, 2022a. \nTeven Le Scao, Thomas Wang, Daniel Hesslow, Lucile Saulnier, Stas Bekman, M Saiful Bari, Stella Bideman, Hady Elsahar, Niklas Muennighoff, Jason Phang, et al. What language model to train if you have one million gpu hours? arXiv preprint arXiv:2210.15424, 2022b. \nTimo Schick, Jane Dwivedi-Yu, Zhengbao Jiang, Fabio Petroni, Patrick Lewis, Gautier Izacard, Qingfei You, Christoforos Nalmpantis, Edouard Grave, and Sebastian Riedel. Peer: A collaborative language model. arXiv preprint arXiv:2208.11663, 2022. \nNatalie Schluter. The limits of automatic summarisation according to rouge. In Proceedings of the 15th Conference of the European Chapter of the Association for Computational Linguistics, pp. 41–45. Association for Computational Linguistics, 2017. \nNoam M. Shazeer. Fast transformer decoding: One write-head is all you need. arXiv preprint arXiv:1911.02150, 2019. \nBo Shen, Jiaxin Zhang, Taihong Chen, Daoguang Zan, Bing Geng, An Fu, Muhan Zeng, Ailun Yu, Jichuan Ji, Jingyang Zhao, Yuenan Guo, and Qianxiang Wang. Pangu-coder2: Boosting large language models for code with ranking feedback, 2023. \nEnsheng Shi, Yanlin Wang, Lun Du, Junjie Chen, Shi Han, Hongyu Zhang, Dongmei Zhang, and Hongbin Sun. On the evaluation of neural code summarization. In Proceedings of the 44th International Conference on Software Engineering, pp. 1597–1608, 2022. \nDisha Shrivastava, Denis Kocetkov, Harm de Vries, Dzmitry Bahdanau, and Torsten Scholak. Repofusion: Training code models to understand your repository. arXiv preprint arXiv:2306.10998, 2023a. \nDisha Shrivastava, Hugo Larochelle, and Daniel Tarlow. Repository-level prompt generation for large language models of code. In International Conference on Machine Learning, pp. 31693–31715. PMLR, 2023b. \nShivalika Singh, Freddie Vargus, Daniel Dsouza, Börje F Karlsson, Abinaya Mahendiran, Wei-Yin Ko, Herumb Shandilya, Jay Patel, Deividas Mataciunas, Laura OMahony, et al. Aya dataset: An open-access collection for multilingual instruction tuning. arXiv preprint arXiv:2402.06619, 2024. \nMarta Skreta, Naruki Yoshikawa, Sebastian Arellano-Rubach, Zhi Ji, Lasse Bjørn Kristensen, Kourosh Darvish, Alán Aspuru-Guzik, Florian Shkurti, and Animesh Garg. Errors are useful prompts: Instruction guided task programming with verifier-assisted iterative prompting. arXiv preprint arXiv:2303.14100, 2023. \nDominik Sobania, Martin Briesch, Carol Hanna, and Justyna Petke. An analysis of the automatic bug fixing performance of chatgpt. arXiv preprint arXiv:2301.08653, 2023. \nLuca Soldaini, Rodney Kinney, Akshita Bhagia, Dustin Schwenk, David Atkinson, Russell Authur, Ben Bogin, Khyathi Raghavi Chandu, Jennifer Dumas, Yanai Elazar, Valentin Hofmann, A. Jha, Sachin Kumar, Li Lucy, Xinxi Lyu, Nathan Lambert, Ian Magnusson, Jacob Daniel Morrison, Niklas Muennighoff, Aakanksha Naik, Crystal Nam, Matthew E. Peters, Abhilasha Ravichander, Kyle Richardson, Zejiang Shen, Emma Strubell, Nishant Subramani, Oyvind Tafjord, Pete Walsh, Luke Zettlemoyer, Noah A. Smith, Hanna Hajishirzi, Iz Beltagy, Dirk Groeneveld, Jesse Dodge, and Kyle Lo. Dolma: an open corpus of three trillion tokens for language model pretraining research. 2024. URL https://api.semanticscholar.org/CorpusID:267364861. ",
|
| 471 |
+
"page_idx": 15
|
| 472 |
+
},
|
| 473 |
+
{
|
| 474 |
+
"type": "text",
|
| 475 |
+
"text": "",
|
| 476 |
+
"page_idx": 16
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"type": "text",
|
| 480 |
+
"text": "Aarohi Srivastava, Abhinav Rastogi, Abhishek Rao, Abu Awal Md Shoeb, Abubakar Abid, Adam Fisch, Adam R Brown, Adam Santoro, Aditya Gupta, Adrià Garriga-Alonso, et al. Beyond the imitation game: Quantifying and extrapolating the capabilities of language models, 2022. URL https://arxiv.org/abs/2206.04615. ",
|
| 481 |
+
"page_idx": 17
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"type": "text",
|
| 485 |
+
"text": "Simeng Sun, Kalpesh Krishna, Andrew Mattarella-Micke, and Mohit Iyyer. Do long-range language models actually use long-range context? ArXiv, abs/2109.09115, 2021. URL https://api. semanticscholar.org/CorpusID:237572264. \nRohan Taori, Ishaan Gulrajani, Tianyi Zhang, Yann Dubois, Xuechen Li, Carlos Guestrin, Percy Liang, and Tatsunori B. Hashimoto. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca, 2023. \nRoss Taylor, Marcin Kardas, Guillem Cucurull, Thomas Scialom, Anthony Hartshorn, Elvis Saravia, Andrew Poulton, Viktor Kerkez, and Robert Stojnic. Galactica: A large language model for science. arXiv preprint arXiv:2211.09085, 2022. \nHugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava, Shruti Bhosale, et al. Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288, 2023. \nLewis Tunstall, Nathan Lambert, Nazneen Rajani, Edward Beeching, Teven Le Scao, Leandro von Werra, Sheon Han, Philipp Schmid, and Alexander Rush. Creating a coding assistant with starcoder. Hugging Face Blog, 2023. https://huggingface.co/blog/starchat. \nAhmet Üstün, Viraat Aryabumi, Zheng-Xin Yong, Wei-Yin Ko, Daniel D’souza, Gbemileke Onilude, Neel Bhandari, Shivalika Singh, Hui-Lee Ooi, Amr Kayid, et al. Aya model: An instruction finetuned open-access multilingual language model. arXiv preprint arXiv:2402.07827, 2024. \nAlex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. SuperGLUE: A stickier benchmark for general-purpose language understanding systems. Conference on Neural Information Processing Systems (NeurIPS), 2019. URL https://arxiv.org/abs/1905.00537. \nBen Wang and Aran Komatsuzaki. Gpt-j-6b: A 6 billion parameter autoregressive language model, 2021. \nXuezhi Wang, Jason Wei, Dale Schuurmans, Quoc V Le, Ed H. Chi, Sharan Narang, Aakanksha Chowdhery, and Denny Zhou. Self-consistency improves chain of thought reasoning in language models. In International Conference on Learning Representations (ICLR), 2023a. URL https: //openreview.net/forum?id $\\underline { { \\underline { { \\mathbf { \\Pi } } } } }$ 1PL1NIMMrw. \nYizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A Smith, Daniel Khashabi, and Hannaneh Hajishirzi. Self-instruct: Aligning language model with self generated instructions. arXiv preprint arXiv:2212.10560, 2022a. \nYizhong Wang, Swaroop Mishra, Pegah Alipoormolabashi, Yeganeh Kordi, Amirreza Mirzaei, Anjana Arunkumar, Arjun Ashok, Arut Selvan Dhanasekaran, Atharva Naik, David Stap, et al. Super-naturalinstructions: Generalization via declarative instructions on $1 6 0 0 +$ nlp tasks. arXiv preprint arXiv:2204.07705, 2022b. \nYizhong Wang, Hamish Ivison, Pradeep Dasigi, Jack Hessel, Tushar Khot, Khyathi Raghavi Chandu, David Wadden, Kelsey MacMillan, Noah A Smith, Iz Beltagy, et al. How far can camels go? exploring the state of instruction tuning on open resources. arXiv preprint arXiv:2306.04751, 2023b. \nYue Wang, Hung Le, Akhilesh Deepak Gotmare, Nghi DQ Bui, Junnan Li, and Steven CH Hoi. Codet5 $^ +$ : Open code large language models for code understanding and generation. arXiv preprint arXiv:2305.07922, 2023c. \nZhiruo Wang, Grace Cuenca, Shuyan Zhou, Frank F Xu, and Graham Neubig. Mconala: a benchmark for code generation from multiple natural languages. arXiv preprint arXiv:2203.08388, 2022c. \nZhiruo Wang, Shuyan Zhou, Daniel Fried, and Graham Neubig. Execution-based evaluation for open-domain code generation. arXiv preprint arXiv:2212.10481, 2022d. \nJason Wei, Maarten Bosma, Vincent Y. Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V. Le. Finetuned language models are zero-shot learners. International Conference on Learning Representations (ICLR), 2022. URL https://openreview.net/f orum?id ${ . } = { }$ gEZrGCozdqR. \nJiayi Wei, Greg Durrett, and Isil Dillig. Coeditor: Leveraging contextual changes for multi-round code auto-editing. arXiv preprint arXiv:2305.18584, 2023. \nMinghao Wu and Alham Fikri Aji. Style over substance: Evaluation biases for large language models. arXiv preprint arXiv:2307.03025, 2023. \nChunqiu Steven Xia and Lingming Zhang. Conversational automated program repair. arXiv preprint arXiv:2301.13246, 2023. \nMengzhou Xia, Mikel Artetxe, Chunting Zhou, Xi Victoria Lin, Ramakanth Pasunuru, Danqi Chen, Luke Zettlemoyer, and Ves Stoyanov. Training trajectories of language models across scales. arXiv preprint arXiv:2212.09803, 2022. \nCan Xu, Qingfeng Sun, Kai Zheng, Xiubo Geng, Pu Zhao, Jiazhan Feng, Chongyang Tao, and Daxin Jiang. Wizardlm: Empowering large language models to follow complex instructions. arXiv preprint arXiv:2304.12244, 2023a. \nFrank F Xu, Uri Alon, Graham Neubig, and Vincent Josua Hellendoorn. A systematic evaluation of large language models of code. In Proceedings of the 6th ACM SIGPLAN International Symposium on Machine Programming, pp. 1–10, 2022a. \nShengbin Xu, Yuan Yao, Feng Xu, Tianxiao Gu, and Hanghang Tong. Combining code context and fine-grained code difference for commit message generation. In Proceedings of the 13th Asia-Pacific Symposium on Internetware, pp. 242–251, 2022b. \nZhiyang Xu, Ying Shen, and Lifu Huang. Multiinstruct: Improving multi-modal zero-shot learning via instruction tuning, 2023b. \nMichihiro Yasunaga and Percy Liang. Break-it-fix-it: Unsupervised learning for program repair. In International Conference on Machine Learning, pp. 11941–11952. PMLR, 2021. \nHe Ye, Matias Martinez, Thomas Durieux, and Martin Monperrus. A comprehensive study of automatic program repair on the quixbugs benchmark. Journal of Systems and Software, 171: 110825, 2021. \nBurak Yetistiren, Isik Ozsoy, and Eray Tuzun. Assessing the quality of github copilot’s code generation. In Proceedings of the 18th International Conference on Predictive Models and Data Analytics in Software Engineering, pp. 62–71, 2022. \nPengcheng Yin, Bowen Deng, Edgar Chen, Bogdan Vasilescu, and Graham Neubig. Learning to mine aligned code and natural language pairs from stack overflow. In International Conference on Mining Software Repositories, MSR, pp. 476–486. ACM, 2018. doi: https://doi.org/10.1145/3196 398.3196408. \nZheng-Xin Yong, Hailey Schoelkopf, Niklas Muennighoff, Alham Fikri Aji, David Ifeoluwa Adelani, Khalid Almubarak, M Saiful Bari, Lintang Sutawika, Jungo Kasai, Ahmed Baruwa, et al. Bloom+ 1: Adding language support to bloom for zero-shot prompting. arXiv preprint arXiv:2212.09535, 2022. \nHao Yu, Bo Shen, Dezhi Ran, Jiaxin Zhang, Qi Zhang, Yuchi Ma, Guangtai Liang, Ying Li, Tao Xie, and Qianxiang Wang. Codereval: A benchmark of pragmatic code generation with generative pre-trained models. arXiv preprint arXiv:2302.00288, 2023. \nYan Zeng, Hanbo Zhang, Jiani Zheng, Jiangnan Xia, Guoqiang Wei, Yang Wei, Yuchen Zhang, and Tao Kong. What matters in training a gpt4-style language model with multimodal inputs? arXiv preprint arXiv:2307.02469, 2023. \nChunyan Zhang, Junchao Wang, Qinglei Zhou, Ting Xu, Ke Tang, Hairen Gui, and Fudong Liu. A survey of automatic source code summarization. Symmetry, 14(3):471, 2022a. \nFengji Zhang, Bei Chen, Yue Zhang, Jin Liu, Daoguang Zan, Yi Mao, Jian-Guang Lou, and Weizhu Chen. Repocoder: Repository-level code completion through iterative retrieval and generation. arXiv preprint arXiv:2303.12570, 2023a. \nHang Zhang, Xin Li, and Lidong Bing. Video-llama: An instruction-tuned audio-visual language model for video understanding. arXiv preprint arXiv:2306.02858, 2023b. \nJialu Zhang, José Cambronero, Sumit Gulwani, Vu Le, Ruzica Piskac, Gustavo Soares, and Gust Verbruggen. Repairing bugs in python assignments using large language models. arXiv preprint arXiv:2209.14876, 2022b. \nJiyang Zhang, Sheena Panthaplackel, Pengyu Nie, Junyi Jessy Li, and Milos Gligoric. Coditt5: Pretraining for source code and natural language editing. In 37th IEEE/ACM International Conference on Automated Software Engineering, pp. 1–12, 2022c. \nTianyi Zhang, Tao Yu, Tatsunori Hashimoto, Mike Lewis, Wen-tau Yih, Daniel Fried, and Sida Wang. Coder reviewer reranking for code generation. In International Conference on Machine Learning, pp. 41832–41846. PMLR, 2023c. \nQinkai Zheng, Xiao Xia, Xu Zou, Yuxiao Dong, Shan Wang, Yufei Xue, Zihan Wang, Lei Shen, Andi Wang, Yang Li, et al. Codegeex: A pre-trained model for code generation with multilingual evaluations on humaneval-x. arXiv preprint arXiv:2303.17568, 2023. \nChunting Zhou, Pengfei Liu, Puxin Xu, Srini Iyer, Jiao Sun, Yuning Mao, Xuezhe Ma, Avia Efrat, Ping Yu, Lili Yu, et al. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206, 2023a. \nShuyan Zhou, Uri Alon, Sumit Agarwal, and Graham Neubig. Codebertscore: Evaluating code generation with pretrained models of code. arXiv preprint arXiv:2302.05527, 2023b. \nYongchao Zhou, Andrei Ioan Muresanu, Ziwen Han, Keiran Paster, Silviu Pitis, Harris Chan, and Jimmy Ba. Large language models are human-level prompt engineers. arXiv preprint arXiv:2211.01910, 2022. \nMing Zhu, Aneesh Jain, Karthik Suresh, Roshan Ravindran, Sindhu Tipirneni, and Chandan K Reddy. Xlcost: A benchmark dataset for cross-lingual code intelligence. arXiv preprint arXiv:2206.08474, 2022. \nTerry Yue Zhuo. Large language models are state-of-the-art evaluators of code generation. arXiv preprint arXiv:2304.14317, 2023. \nTerry Yue Zhuo, Armel Zebaze, Nitchakarn Suppattarachai, Leandro von Werra, Harm de Vries, Qian Liu, and Niklas Muennighoff. Astraios: Parameter-efficient instruction tuning code large language models. arXiv preprint arXiv:2401.00788, 2024. ",
|
| 486 |
+
"page_idx": 17
|
| 487 |
+
},
|
| 488 |
+
{
|
| 489 |
+
"type": "text",
|
| 490 |
+
"text": "",
|
| 491 |
+
"page_idx": 18
|
| 492 |
+
},
|
| 493 |
+
{
|
| 494 |
+
"type": "text",
|
| 495 |
+
"text": "",
|
| 496 |
+
"page_idx": 19
|
| 497 |
+
}
|
| 498 |
+
]
|
parse/test/mw1PWNSWZP/mw1PWNSWZP_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/mw1PWNSWZP/mw1PWNSWZP_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/rp5vfyp5Np/rp5vfyp5Np.md
ADDED
|
@@ -0,0 +1,543 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# BATTLE: TOWARDS BEHAVIOR-ORIENTED ADVERSARIAL ATTACKS AGAINST DEEP REINFORCEMENT LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Evaluating the performance of deep reinforcement learning (DRL) agents under adversarial attacks that aim to induce specific behaviors, i.e., behavior-oriented adversarial attacks, is crucial for understanding the robustness of DRL agents. Prior research primarily focuses on directing agents towards pre-determined states or policies, lacking generality and flexibility. Therefore, it is important to devise universal attacks that target inducing specific behaviors in a victim. In this work, we propose BATTLE, a universal behavior-oriented adversarial attack method. In BATTLE, an intention policy is trained to align with human preferences for flexible behavior orientation, while the adversary is trained to guide the victim policy to imitate the intention policy. To improve the attack performance, we introduce a weighting function that assigns importance weights over each state. Our empirical results over several manipulation tasks of Meta-world show the superiority of BATTLE in behavior-oriented adversarial attack settings, outperforming current adversarial attack algorithms. Furthermore, we also demonstrate that BATTLE can improve the robustness of agents under strong attacks by training with adversary. Lastly, we showcase the strong behavior-inducing capability of BATTLE by guiding Decision Transformer agents to act in line with human preferences across various MuJoCo tasks. Our videos are available in https://sites.google.com/ view/jj9uxjgmba5lr3g.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Reinforcement learning (RL) (Sutton & Barto, 2018) combined with deep neural networks (DNN) (LeCun et al., 2015) shows extraordinary capabilities of allowing agents to master complex behaviors in various domains. However, recent findings (Huang et al., 2017; Pattanaik et al., 2018; Zhang et al., 2020) reveal that well-trained RL agents parameterized by DNN suffer from vulnerability against test-time attacks, raising concerns in high-risk or safety-critical situations. To understand adversarial attacks on learning algorithms and enhance the robustness of DRL agents, it is crucial to evaluate the performance of the agents under any potential adversarial attacks with certain constraints. In other words, identifying a universal and strong adversary is essential.
|
| 12 |
+
|
| 13 |
+
Two main challenges persist in devising effective universal and strong attacks. Firstly, existing strategies, which primarily aim at diminishing cumulative rewards, fall short in specifying explicit attack targets. Prior research (Zhang et al., 2020; 2021; Sun et al., 2022) considers training strong adversary by perturbing state observations of victim to obtain the worst case expected return. Nevertheless, it might be more practical to setup both a reward function and constraints, rather than encoding the complex safety requirements directly into rewards (Achiam et al., 2017; Gu et al., 2022; Vamplew et al., 2022), for many applications of RL. Therefore, only quantifying the decrease in cumulative reward can be too generic and result in limited attack performance when adversaries target specific safety attacks. Consider the scenario depicted in Figure 1, where a robot is tasked with collecting coins. Previous attack methods aim at inducing the robot away from the coins by minimizing the expected return. In contrast, it might be interested in causing specific unsafe behaviors, such as inducing the robot to collide with a bomb. Secondly, Predefined targets are usually rigid and inefficient. Another line of work (Hussenot et al., 2019a; Lin et al., 2017b) primarily focuses on misleading the agent towards a predetermined goal state or target policy, overlooking specific behaviors. Additionally, the difficulty and expense of providing a well-designed targeted policy result in these methods lacking generality and flexibility. In a broader sense, these adversarial attacks are incapable of controlling the behaviors of agents as a form of universal attack.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: An example illustrating the distinction between our approach and generic attacks.
|
| 17 |
+
|
| 18 |
+
To tackle these challenges, we present a novel adversarial attack method, namely BATTLE, which focuses on Behavior-oriented Adversarial aTTacks against deep rEinforcement learning agents. At its core, BATTLE employs an adversary to perturb the victim agent’s observations while leveraging an intention policy for step-by-step guidance for the victim to imitate. Instead of relying on a predefined target policy, the intention policy is trained to align with human intent as a flexible behavior orientation during adversary training. Furthermore, we incorporate a weighting function to capture remarkable moments through state re-weighting, improving overall performance and efficiency. Benefiting from recent progress in preference-based reinforcement learning (PbRL) (Lee et al., 2021a; Park et al., 2022; Liang et al., 2022; Liu et al., 2022), our method facilitates the behavior of victim agent to be aligned with human intentions. Consequently, BATTLE’s adversary effectively leads the victim into executing human-desired behaviors through iterative refinement.
|
| 19 |
+
|
| 20 |
+
In summary, our contributions fall into four categories. Firstly, we propose a universal behaviororiented adversarial attack method against DRL agents, designed to effectively induce specific behaviors in a victim agent. Secondly, we theoretically analyze BATTLE and provide a convergence guarantee under only mild conditions. Thirdly, we test in multiple scenarios and experiments on Meta-world that demonstrate BATTLE outperforms the baselines by a large margin. Empirical results demonstrate that both online and offline RL agents are vulnerable to our proposed adversarial attacks, including the most recent Decision Transformer. Finally, we considerably enhance the robustness of DRL agents by learning with BATTLE attacker in adversarial training.
|
| 21 |
+
|
| 22 |
+
# 2 RELATED WORK
|
| 23 |
+
|
| 24 |
+
Previous works on adversarial attacks study the vulnerability of a DRL agent. Huang et al. (2017) computes adversarial perturbations via utilizing the technique of FGSM (Goodfellow et al., 2015) to mislead the victim policy, not to choose the optimal action. Pattanaik et al. (2018) presents an approach that leads the victim to select the worst action based on the Q-function of the victim. Gleave et al. (2020) conducts adversarial attacks under the two-player Markov game instead of perturbing the agent’s observation. Zhang et al. (2020) proposes the state-adversarial MDP (SA-MDP) and develops two adversarial attack methods named Robust Sarsa (RS) and Maximal Action Difference (MAD). SA-RL (Zhang et al., 2021) directly optimizes the adversary to perturb state in the form of end-to-end RL. PA-AD (Sun et al., 2022) designs an RL-based “director” to find the optimal policy perturbing direction and construct an optimized-based “actor” to craft perturbed states according to the given direction. While untargeted adversarial attacks aim to cause the victim policy to fail, our method emphasizes manipulating the behaviors of the victim. In other words, the perturbed behaviors of the victim align with the manipulator’s preferences. Another line of works (Pinto et al., 2017; Mandlekar et al., 2017; Pattanaik et al., 2018) consider using adversarial examples to improve the robustness of policies, although it is out of the scope of this paper.
|
| 25 |
+
|
| 26 |
+
There are a few prior works that focus on inducing DRL agents to pre-determined states or policies. Lin et al. (2017a) first proposes a targeted adversarial attack method against DRL agents, which attacks the agent to reach a targeted state. Buddareddygari et al. (2022) also present a strategy to mislead the agent towards to a specific state by placing an object in the environment. The hijacking attack (Boloor et al., 2020) is proposed to attack agents to perform targeted actions on autonomous driving systems. Hussenot et al. (2019b) provides a new perspective that attacks the agent to imitate a target policy. Lee et al. (2021b) investigates targeted adversarial attacks against the action space of the agent. Our method differs that we train an intention policy to serve as flexible behavior orientation, rather than relying on a predetermined target state or policy. Consequently, BATTLE can effectively lead the victim policy to perform human desired behaviors.
|
| 27 |
+
|
| 28 |
+
Training agents with human feedback has been investigated in several works. PbRL provides an effective way to utilize human preferences for agent learning. Christiano et al. (2017) proposes a basic learning framework for PbRL. To further improve feedback efficiency, Ibarz et al. (2018) additionally utilizes expert demonstrations to initialize the policy besides learning the reward model from human preferences. However, previous methods need plenty of human feedback, which is usually impractical. Many recent works have proposed to tackle this problem. Lee et al. (2021a) presents a feedbackefficient PbRL algorithm, which benefits from unsupervised exploration and reward relabeling. Park et al. (2022) further improves feedback efficiency by semi-supervised reward learning and data augmentation, while Liang et al. (2022) proposes an intrinsic reward to enhance exploration. Liu et al. (2022) continues to improve the feedback efficiency by aligning the Q-function with human preferences. To the best of our knowledge, our method is the first to conduct a behavior-oriented adversarial attack against DRL agents through PbRL.
|
| 29 |
+
|
| 30 |
+
# 3 PROBLEM SETUP
|
| 31 |
+
|
| 32 |
+
The Victim Policy. In RL, agent learning can be modeled as a finite horizon Markov Decision Process (MDP) defined as a tuple $( S , { \mathcal { A } } , { \mathcal { R } } , { \mathcal { P } } , \gamma )$ . $s$ and $\mathcal { A }$ denote state and action space, respectively. $\mathcal { R } : \mathcal { S } { \times } \mathcal { A } { \times } \mathcal { S } \mathbb { R }$ is the reward function and $\gamma \in ( 0 , 1 )$ is the discount factor. $\mathcal { P } : \bar { \mathcal { S } } { \times } \bar { \mathcal { A } } { \times } \bar { \mathcal { S } } [ 0 , \bar { 1 } ]$ denotes the transition dynamics, which determines the probability of transferring to $\mathbf { s } ^ { \prime }$ given state s and action a. We denote the stationary policy $\pi _ { \nu } : { \mathcal { S } } \to { \mathcal { P } } ( { \mathcal { A } } )$ , where $\nu$ are parameters of the victim. We suppose the victim policy is fixed and uses the approximator.
|
| 33 |
+
|
| 34 |
+
The Adversarial Policy. To study behavior-oriented adversarial attack with human preferences, we formulate it as rewarded state-adversarial Markov Decision Process (RSA-MDP). Formally, a RSA-MDP is a tuple $( S , { \mathcal { A } } , B , { \widehat { \mathcal { R } } } , { \mathcal { P } } , \gamma )$ . The adversary $\pi _ { \alpha } : S \to { \mathcal { P } } ( S )$ perturbs the states before the victim observes them, where $\alpha$ are parameters of the adversary. The adversary perturbs the state s into ˜s restricted by $B ( \mathbf { s } )$ (i.e., $\tilde { \mathbf { s } } \in B ( \mathbf { s } ) .$ ). $B ( \mathbf { s } )$ is defined as a small set $\big \{ \tilde { \mathbf { s } } \in \mathcal { S } : \| \mathbf { s } - \tilde { \mathbf { s } } \| _ { p } \leq \epsilon \big \}$ , which limits the attack power of the adversary and $\epsilon$ is attack budget. Since directly generating $\tilde { \mathbf { s } } \in B ( \mathbf { s } )$ is hard, the adversary learns to produce a Gaussian noise $\Delta$ with $\ell _ { \infty } ( \Delta )$ less than 1, and we obtain the perturbed state through $\tilde { \mathbf { s } } = \mathbf { s } + \Delta * \boldsymbol { \epsilon }$ . The victim takes action according to the observed ˜s, while true states in the environment are not changed. $\pi _ { \nu \circ \alpha }$ denotes the perturbed policy, which is victim policy under the adversarial attack. Unlike SA-MDP (Zhang et al., 2020), RSA-MDP introduces $\widehat { \mathcal { R } }$ , which learns from human preferences. The target of RSA-MDP is to solve the optimal adversary $\pi _ { \alpha } ^ { * }$ , which enables the victim to achieve the maximum cumulative reward (i.e., from $\widehat { \mathcal { R } }$ ) over all states. Lemma C.1 shows that solving the optimal adversary in RSA-MDP is equivalent to finding the optimal policy in MDP $\hat { \mathcal { M } } = ( S , \bar { \mathcal { A } } , \widehat { \mathcal { R } } , \bar { \mathcal { P } } , \gamma )$ , where $\hat { \cal A } = { \cal S }$ and $\widehat { \mathcal P }$ is the transition dynamics of the adversary.
|
| 35 |
+
|
| 36 |
+
# 4 METHOD
|
| 37 |
+
|
| 38 |
+
In this section, we introduce our method BATTLE. The core idea of BATTLE is twofold: firstly, it learns an intention policy that acts as the learning target for the adversarial policy, effectively guiding the victim towards behaving human-desired behavior. Secondly, we introduce a weighting function to enhance the adversary’s performance and formulate BATTLE as a bi-level optimization problem. The framework of BATTLE is shown in Figure 2 and detailed procedure is summarized in Appendix A.
|
| 39 |
+
|
| 40 |
+

|
| 41 |
+
Figure 2: Overview of BATTLE. BATTLE jointly learns an intention policy $\pi _ { \theta }$ , an adversary $\pi _ { \alpha }$ and a weighting function $h _ { \omega }$ under bi-level optimization framework. In the inner-level, the adversary is optimized such that $\pi _ { \nu \circ \alpha }$ approaches the intention policy which learns via PbRL. In the outer-level, the weighting function is updated to improve the performance of the adversary evaluated by the outer loss $J _ { \pi }$ . $\pi _ { \nu \circ \alpha }$ denotes the perturbed policy, which is victim policy under the adversarial attack.
|
| 42 |
+
|
| 43 |
+
# 4.1 LEARNING INTENTION POLICY
|
| 44 |
+
|
| 45 |
+
BATTLE aims to find the optimal adversary that manipulates the victim’s behaviors to be consistent with human intentions. However, the victim policy is pre-trained for a specific task, directly learning an adversary suffer from exploration problem caused by the restriction of victim policy, making it hard to find an optimal adversary efficiently. Therefore, we introduce an intention policy $\pi _ { \theta }$ which has unrestricted exploration space to guide adversarial policy training.
|
| 46 |
+
|
| 47 |
+
To conduct targeted attack and avoid reward engineering, we align the intention policy with human intent via PbRL, which is shown in Figure 3. In PbRL, the agent have no access to the ground-truth reward function. Humans provide preference labels between two agent trajectories and the reward function $\widehat { r } _ { \psi }$ learns to align bwith the preferences (Christiano et al., 2017).
|
| 48 |
+
|
| 49 |
+
Formally, a segment $\sigma$ of length $k$ is denoted as a sequence of states and actions $\left\{ \mathbf { s } _ { t + 1 } , \mathbf { a } _ { t + 1 } , \cdot \cdot \cdot , \mathbf { s } _ { t + k } , \mathbf { a } _ { t + k } \right\}$ . Given a pair of segments $( \sigma ^ { 0 } , \sigma ^ { 1 } )$ , human indicate which segment is preferred, where $y ~ \in ~ \{ ( 0 , 1 ) , ( 1 , 0 ) , ( 0 . 5 , 0 . 5 ) \}$ . Following Bradley-Terry model (Bradley & Terry, 1952), a preference predictor is constructed in (1):
|
| 50 |
+
|
| 51 |
+

|
| 52 |
+
Figure 3: Diagram of preference-based RL.
|
| 53 |
+
|
| 54 |
+
$$
|
| 55 |
+
P _ { \psi } [ \sigma ^ { 0 } \succ \sigma ^ { 1 } ] = \frac { \exp { \sum _ { t } { \widehat r _ { \psi } } ( \mathbf { s } _ { t } ^ { 0 } , \mathbf { a } _ { t } ^ { 0 } ) } } { \sum _ { i \in \{ 0 , 1 \} } \exp { \sum _ { t } { \widehat r _ { \psi } } ( \mathbf { s } _ { t } ^ { i } , \mathbf { a } _ { t } ^ { i } ) } } ,
|
| 56 |
+
$$
|
| 57 |
+
|
| 58 |
+
where $\sigma ^ { 0 } \succ \sigma ^ { 1 }$ denotes $\sigma ^ { 0 }$ is preferred to $\sigma ^ { 1 }$ . This predictor indicates the probability that a segment is preferred is proportional to its exponential return. Then, the reward function is optimized by aligning the predicted preference labels with human preferences through cross-entropy loss:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\mathcal { L } ( \psi ) = - \underset { ( \sigma ^ { 0 } , \sigma ^ { 1 } , y ) \sim \mathcal { D } } { \mathbb { E } } \Big [ y ( 0 ) \log P _ { \psi } [ \sigma ^ { 0 } \succ \sigma ^ { 1 } ] + y ( 1 ) \log P _ { \psi } [ \sigma ^ { 1 } \succ \sigma ^ { 0 } ] \Big ] ,
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
where $\mathcal { D }$ is a dataset of triplets $( \sigma ^ { 0 } , \sigma ^ { 1 } , y )$ consisting of segment pairs and human preference labels. By minimizing (2), we obtain a reward function estimator $\widehat { r } _ { \psi }$ , which is used to provide estimated brewards for agent learning via any RL algorithms. Following PEBBLE (Lee et al., 2021a), we use an off-policy actor-critic method SAC (Haarnoja et al., 2018) to learn a well-performing policy. Specifically, the Q-function $Q _ { \phi }$ is optimized by minimizing the Bellman residual:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
J _ { Q } ( \phi ) = \underset { \tau _ { t } \sim \mathcal { B } } { \mathbb { E } } \left[ \left( Q _ { \phi } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) - \widehat { r } _ { t } - \gamma \bar { V } ( \mathbf { s } _ { t + 1 } ) \right) ^ { 2 } \right] ,
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $\begin{array} { r } { \bar { V } ( \mathbf { s } _ { t } ) = \mathbb { E } _ { \mathbf { a } _ { t } \sim \pi _ { \theta } } \left[ Q _ { \bar { \phi } } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) - \mu \log \pi _ { \theta } ( \mathbf { a } _ { t } | \mathbf { s } _ { t } ) \right] , \tau _ { t } = ( \mathbf { s } _ { t } , \mathbf { a } _ { t } , \widehat { r } _ { t } , \mathbf { s } _ { t + 1 } ) . } \end{array}$ is the transition at time step $t , \bar { \phi }$ is the parameter of the target soft Q-function. The policy $\pi _ { \theta }$ is updated by minimizing (4):
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
J _ { \pi } ( \theta ) = \mathbb { E } _ { \mathbf { s } _ { t } \sim \mathcal { B } , \mathbf { a } _ { t } \sim \pi _ { \theta } } \Big [ \mu \log \pi _ { \theta } ( \mathbf { a } _ { t } | \mathbf { s } _ { t } ) - Q _ { \phi } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) \Big ] ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $\mu$ is the temperature parameter. By learning an intention policy, BATTLE tackles restricted exploration problem and provides an attack target for the following adversary training.
|
| 77 |
+
|
| 78 |
+
# 4.2 LEARNING ADVERSARIAL POLICY AND WEIGHTING FUNCTION
|
| 79 |
+
|
| 80 |
+
To make the victim policy perform human desired behaviors, BATTLE learns the adversary by minimizing the KL divergence between the perturbed policy $\pi _ { \nu \circ \alpha }$ and the intention policy $\pi _ { \theta }$ However, different states may have various importance to induce the victim policy to the target. To stabilize training process and improve the performance of the adversary, we introduce a weighting function $h _ { \omega }$ to re-weight states in adversary training.
|
| 81 |
+
|
| 82 |
+
We formulate BATTLE as a bi-level optimization algorithm, which alternately updates the adversarial policy $\pi _ { \alpha }$ and the weighting function $h _ { \omega }$ through inner and outer optimization. In the inner level, BATTLE optimizes parameters $\alpha$ with the importance weights outputted by a weighting function $h _ { \omega }$ , and optimizes parameters $\omega$ in the outer level according to the performance of the adversary. Intuitively, the adversary is optimized such that $\pi _ { \nu \circ \alpha }$ approaches the intention policy in the inner level, while the weighting function learns to improve the adversary performance by evaluating the performance of the adversary through a meta-level loss $J _ { \pi }$ in (7). The whole objective of BATTLE is:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r l } { \underset { \omega } { \operatorname* { m i n } } } & { { } J _ { \pi } ( \alpha ( \omega ) ) , } \\ { \mathrm { s . t . } } & { { } \alpha ( \omega ) = \arg \underset { \alpha } { \operatorname* { m i n } } \mathcal { L } _ { \mathrm { a t t } } ( \alpha ; \omega , \theta ) . } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
Inner-level Optimization: Training adversarial policy $\pi _ { \alpha }$ . In the inner-level optimization, given the intention policy $\pi _ { \theta }$ and the weighting function $h _ { \omega }$ , we hope to find the optimal adversarial policy by minimizing the re-weighted KL divergence between $\pi _ { \nu \circ \alpha }$ and $\pi _ { \theta }$ in (6):
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\mathcal { L } _ { \mathrm { a t t } } ( \alpha ; \omega , \boldsymbol { \theta } ) = \underset { \mathbf { s } \sim \boldsymbol { B } } { \mathbb { E } } \Big [ h _ { \omega } ( \mathbf { s } ) D _ { \mathrm { K L } } \left( \pi _ { \nu \circ \alpha } ( \mathbf { s } ) \parallel \pi _ { \boldsymbol { \theta } } ( \mathbf { s } ) \right) \Big ] ,
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where $h _ { \omega } ( \mathbf { s } )$ is the importance weights outputted by the weighting function $h _ { \omega }$ . Intuitively, the adversarial policy is optimized to make the perturbed policy be close to the intention policy, while $h _ { \omega }$ assigns different weights to states of various importance. With the collaborative assistance of the intention policy and the weighting function, BATTLE efficiently learns an optimal adversarial policy.
|
| 95 |
+
|
| 96 |
+
Outer-level Optimization: Training weighting function $h _ { \omega }$ . In the outer-level optimization, we need to find a precise weighting function to balance the state distribution and assign proper weights to propel adversary learning. The weighting function is trained to distinguish the importance of states by evaluating the performance of the perturbed policy. Specifically, the perturbed policy $\pi _ { \nu \circ \alpha }$ is evaluated using a policy loss in (7), which is adapted from the policy loss in (4):
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
J _ { \pi } ( \alpha ( \omega ) ) = \mathbb { E } _ { \mathbf { s } _ { t } \sim B , \mathbf { a } _ { t } \sim \pi _ { \nu \circ \alpha ( \omega ) } } \big [ \mu \log \pi _ { \nu \circ \alpha ( \omega ) } ( \mathbf { a } _ { t } | \mathbf { s } _ { t } ) - Q _ { \phi } ( \mathbf { s } _ { t } , \mathbf { a } _ { t } ) \big ] ,
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
where $\alpha ( \omega )$ denotes $\alpha$ implicitly depends on $\omega$ . Therefore, BATTLE calculates the implicit derivative of $J _ { \pi } ( \alpha ( \omega ) )$ with respect to $\omega$ and finds the optimal $\omega ^ { * }$ by optimizing (7). To make it feasible, we make an approximation of $\mathrm { a r g } \operatorname* { m i n } _ { \alpha }$ with the one-step gradient update. (8) obtains an estimated arg $\operatorname* { m i n } _ { \alpha }$ with one-step updating and builds a connection between $\alpha$ and $\omega$ :
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\begin{array} { r } { \hat { \alpha } ( \omega ) \approx \alpha _ { t } - \eta _ { t } \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha ; \omega , \theta ) | _ { \alpha _ { t } } . } \end{array}
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
According to the chain rule, the gradient of the outer loss with respect to $\omega$ can be expressed as:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\begin{array} { r l } { \nabla _ { \omega } J _ { \pi } ( \alpha ( \omega ) ) | _ { \omega _ { t } } = \nabla _ { \hat { \alpha } } J _ { \pi } ( \hat { \alpha } ( \omega ) ) | _ { \hat { \alpha } _ { t } } \nabla _ { \omega } \hat { \alpha } _ { t } ( \omega ) | _ { \omega _ { t } } } & { } \\ { = \displaystyle \sum _ { \mathbf s } f ( \mathbf s ) \cdot \nabla _ { \omega } h ( \mathbf s ) | _ { \omega _ { t } } , } \end{array}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where $\boldsymbol { f } ( \mathbf { s } ) = - \eta _ { t } \cdot ( \nabla _ { \hat { \alpha } } J _ { \pi } ( \alpha ( \omega ) ) ) ^ { \top } \nabla _ { \alpha } D _ { \mathrm { K L } } ( \pi _ { \nu \circ \alpha } ( \mathbf { s } ) \parallel \pi _ { \boldsymbol { \theta } } ( \mathbf { s } ) )$ and detailed derivation can be found in Appendix B. The key to obtain this meta gradient is building and computing the relationship between $\alpha$ and $\omega$ . Obtaining the implicit derivative, BATTLE updates the parameters of the weighting function by taking gradient descent with outer learning rate.
|
| 115 |
+
|
| 116 |
+
In addition, we theoretically analyze the convergence of BATTLE in Theorem D.2 and D.4. In Theorem D.2, we demonstrate the convergence rate of the outer loss, i.e. the gradient of the outer loss with respect to $\omega$ will convergence to zero. Thus BATTLE learns a more powerful adversary using importance weights outputted by the optimal weighting function. In Theorem D.4, we prove the convergence of the inner loss. The inner loss of BATTLE algorithm converges to critical points under some mild conditions, which ensures the parameters of the adversary can converge to the optimal parameters. Theorems and proofs can be found in Appendix D.
|
| 117 |
+
|
| 118 |
+
# 5 EXPERIMENTS
|
| 119 |
+
|
| 120 |
+
In this section, we evaluate our method on several robotic simulated manipulation tasks from Metaworld (Yu et al., 2020) and continuous locomotion tasks from MuJoCo (Todorov et al., 2012). Specifically, our experiment contains two essential phases. In the first phase, we verify the efficacy of the proposed method through two scenarios: manipulation and opposite behaviors. Furthermore, we show the capability of our approach by fooling a popular offline RL method, Decision Transformer (Chen et al., 2021), into acting specific behaviors in the second phase. The detailed description of experiments is provided in Appendix F.
|
| 121 |
+
|
| 122 |
+
# 5.1 SETUP
|
| 123 |
+
|
| 124 |
+
Compared Methods. Random attack and two state-of-the-art evasion attack methods are used for comparison.
|
| 125 |
+
|
| 126 |
+
• Random: a baseline that samples random perturbed observations via a uniform distribution.
|
| 127 |
+
• SA-RL (Zhang et al., 2021): this method learns an adversarial policy in the form of end-to-end RL formulation.
|
| 128 |
+
• PA-AD (Sun et al., 2022): this method combines RL-based “director” and non-RL “actor” to find state perturbations, which is the state-of-the-art adversarial attack algorithm against DRL.
|
| 129 |
+
• BATTLE: our proposed method, which collaboratively learns adversarial policy and weighting function with the guidance of intention policy.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 4: Training curves of different methods on various tasks in the manipulation scenario. The solid line and shaded area denote the mean and the standard deviation of success rate, respectively, over ten runs. The blue line (our method) outperforms all the baselines in PbRL setting and even exceeds most baselines in oracle setting.
|
| 133 |
+
|
| 134 |
+
Implementation Settings. We compare BATTLE with existing state-of-the-art adversarial attack methods. To achieve fair comparison, we make simple adjustments for SA-RL and PA-AD to suit our settings in the experiments. In their original version, both of these two methods use the negative value of the reward obtained by the victim to train an adversary. We replace it with the same estimated reward function $\widehat { r } _ { \psi }$ as our method uses, which means they also learn from human preferences. bFollowing the settings in PEBBLE (Lee et al., 2021a), we use a scripted teacher that provides ground truth preference labels. More details of scripted teacher and preference collection can be found in Appendix E. For the implementation of SA-RL1 and $\mathrm { P A } { \cdot } \mathrm { A D } ^ { 2 }$ , we use the released official codebase. For fair comparison, all methods learned via PbRL are given the same number of preference labels. In the manipulation scenario, we use 9000 labels for all tasks. In the opposite behaviors scenario, we use 1000 for Window Close, 3000 for Drawer Close, 5000 for Faucet Open, Faucet Close and Window Open, 7000 for Drawer Open, Door Lock and Door Unlock. Also, to reduce the impact of PbRL, we additionally add oracle versions of SA-RL and PA-AD, which uses the ground-truth rewards of the targeted task.
|
| 135 |
+
|
| 136 |
+
We use the same experimental settings (i.e., hyper-parameters, neural networks) concerning reward learning for all methods. We quantitatively evaluate all methods by comparing the success rate of final manipulation, which is well-defined in Meta-world (Yu et al., 2020) for the opposite behaviors scenario, and we rigorously design for the manipulation scenario. As in most existing research (Zhang et al., 2020; 2021; Sun et al., 2022), we consider using state attacks with $L ^ { \infty }$ norm in our experiments, and we report the mean and standard deviation across ten runs for all experiments. We also provide detailed hyper-parameter settings, implementation details and scenario design in Appendix F.
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
Figure 5: Training curves of all methods on various tasks in the opposite behaviors scenario. The solid line and shaded area denote the mean and the standard deviation of success rate over ten runs. In this scenario, the blue line (our method) outperforms all the baselines in both PbRL setting and oracle setting, which demonstrates the effectiveness of BATTLE.
|
| 140 |
+
|
| 141 |
+
# 5.2 MANIPULATION ON DRL AGENTS
|
| 142 |
+
|
| 143 |
+
We study the efficacy of our method compared to adversarial attack algorithms, which are adapted to our setting with minimal changes. Specifically, we devise two distinct scenarios on various simulated robotic manipulation tasks. Each victim agent is well-trained for a specific manipulation task.
|
| 144 |
+
|
| 145 |
+
Scenarios on Manipulation. In this scenario, we expect the robotic arm to reach a target coordinates instead of completing the original task. Figure 4 shows the training curves of baselines and our method on eight manipulation tasks. It shows that the performance of BATTLE surpasses that of the baselines by a large margin based on preference labels. To eliminate the influence of PbRL and further demonstrate the advantages of BATTLE, we additionally train the baseline methods with the ground-truth reward function and denote them as “oracle”. We notice that the performance of SA-RL (oracle) greatly improves on several tasks over the preference-based version. However, BATTLE still outperforms SA-RL with oracle rewards on most tasks. These results demonstrate that BATTLE enables the agent to efficiently learn adversarial policy with human preferences. We also observe that PA-AD is incapable of mastering manipulation, even using the ground-truth rewards.
|
| 146 |
+
|
| 147 |
+
Scenarios on Opposite Behaviors. In the real world, robotic manipulation has good application values. Therefore, we design this scenario to quantitatively evaluate the vulnerability of these agents that masters various manipulation skills. Specifically, we expect each victim to complete the opposite task under the attack of the manipulator. For example, the victim which masters the skill of opening windows will close windows under targeted attack. As shown in Figure 5, BATTLE presents excellent performance and marginally shows obvious advantages over baseline methods on all tasks. The result again indicates that BATTLE is effective for a wide range of tasks and can efficiently learn adversarial policy with human preferences.
|
| 148 |
+
|
| 149 |
+
# 5.3 MANIPULATION ON THE POPULAR OFFLINE RL AGENTS
|
| 150 |
+
|
| 151 |
+
In this experiment, we show the vulnerability of offline RL agents and demonstrate BATTLE can fool them into acting human desired behaviors. As for the implementation, we choose some online models3 as victims, which are well-trained by official implementation with D4RL. We choose two tasks, Cheetah and Walker, using expert-level Decision Transformer agents as the victims. As shown in Figure 6, Decision Transformer shows exploitable weaknesses and is misled to perform human desired behavior instead of the original task. Under the adversarial manipulation, the Cheetah agent runs backwards quickly in Figure 6a, and does 90 degree push-up in Figure 6c. The Walker agent stands on one foot for superior balance in Figure 6b, and dances with one leg lifted in Figure 6d. The results show that BATTLE can manipulate these victims to act behaviors consistent with human preferences and embodied agents are extremely vulnerable to these well-trained adversaries. We hope this experiment can inspire future work on the robustness of offline RL agents and embodied AI.
|
| 152 |
+
|
| 153 |
+

|
| 154 |
+
Figure 6: Human desired behaviors behaved by the Decision Transformer under the attack of BATTLE.
|
| 155 |
+
|
| 156 |
+
# 5.4 ROBUST AGENTS TRAINING AND EVALUATING
|
| 157 |
+
|
| 158 |
+
An intuitive application of BATTLE lies in evaluating the robustness of a given model or enhancing an agent’s robustness through adversarial training. ATLA (Zhang et al., 2021) is a general training framework for robustness improvement, which alternately trains an agent and an adversary. Motivated by this, we introduce BATTLE-ATLA which trains an agent and a BATTLE attacker alternately. Table 1 shows that the performance of BATTLE-ATLA for a SAC agent, in comparison with state-of-the-art robust training methods. The experimental results summarize two aspects: firstly, BATTLE-ATLA significantly enhances the robustness of agents, and secondly, BATTLE can conduct stronger attacks on robust agents.
|
| 159 |
+
|
| 160 |
+
Table 1: Average episode rewards $\pm$ standard deviation of robust agents under different attack methods, and results are averaged across 100 episodes.
|
| 161 |
+
|
| 162 |
+
<table><tr><td>Task</td><td>Model</td><td>BATTLE</td><td>PA-AD</td><td>SA-RL</td><td>Average Reward</td></tr><tr><td rowspan="3">Door Lock</td><td>BATTLE-ATLA</td><td>874±444</td><td>628±486</td><td>503±120</td><td>668</td></tr><tr><td>PAAD-ATLA</td><td>491±133</td><td>483±15</td><td>517±129</td><td>497</td></tr><tr><td>SARL-ATLA</td><td>469±11</td><td>629±455</td><td>583±173</td><td>545</td></tr><tr><td rowspan="3">Door Unlock</td><td>BATTLE-ATLA</td><td>477±203</td><td>745±75</td><td>623±60</td><td>615</td></tr><tr><td>PAAD-ATLA</td><td>398±12</td><td>381±11</td><td>398±79</td><td>389</td></tr><tr><td>SARL-ATLA</td><td>393±36</td><td>377±8</td><td>385±26</td><td>385</td></tr></table>
|
| 163 |
+
|
| 164 |
+
# 5.5 ABLATION STUDY
|
| 165 |
+
|
| 166 |
+
Contribution of Each Component. We conduct additional experiments to investigate the effect of each component in BATTLE on Drawer Open, Drawer Close for the manipulation scenario and on Faucet Open, Faucet Close for the opposite behavior scenario. BATTLE contains three critical components: the weight function $h _ { \omega }$ , the intention policy $\pi _ { \theta }$ , and the combined policy. Table 2 shows that the intention policy plays an essential role in the BATTLE. As shown in Figure 7d, the intention policy can mitigate exploration difficulty caused by the restriction of victim policy and improve the exploration ability of BATTLE leading to a better adversary. We also observe that the combined policy balances the discrepancy between $\pi _ { \theta }$ and $\pi _ { \nu \circ \alpha }$ on the state distribution and improves the adversary’s performance. In addition, we can economically train the weighting function to distinguish state importance by formulating the adversary learning as a bi-level optimization. It can further improve the asymptotic performance of BATTLE. These empirical results show that key ingredients of BATTLE are fruitfully wed and contribute to the BATTLE’s success. To verify the restricted exploration problem, we visualize the exploration space of BATTLE and BATTLE without intention policy. Figure 7d shows that the intention policy significantly improve the exploration ability of BATTLE.
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 7: (a) A visualization of the weights of trajectories of different qualities by five different policies. (b) Trajectory weights generated by the weighting function from different policies are extracted and visualized with t-SNE. (c) A heat map showing the weight distribution and the trajectory of the perturbed agent in 2D coordinates. The red point denotes the start position and the yellow star indicates the targeted position. (d) A visualization of the exploration space of BATTLE (red) and BATTLE without intention policy (blue). The green point denotes the start and the yellow star denotes the target position.
|
| 170 |
+
|
| 171 |
+
Table 2: Effects of each component. The success rate on four simulated robotic manipulation tasks from Meta-world. The results are the average success rate across five runs.
|
| 172 |
+
|
| 173 |
+
<table><tr><td>Task Type</td><td>Task</td><td>BATTLE</td><td>BATTLE w/o hw</td><td>BATTLE w/0 π0</td><td>BATTLE w/o combination</td></tr><tr><td rowspan="2">Manipulation</td><td>Drawer Cpe</td><td>99.1%</td><td>91.3%</td><td>21.7%</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>8.0%</td></tr><tr><td rowspan="2">Opposite</td><td>Faucet Open</td><td>84</td><td>9.%</td><td>1.0%</td><td>57.0%</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 174 |
+
|
| 175 |
+
Effects of the Weighting Function. To further understand the weighting function proposed in Section 4, we conduct experimental data analysis and visualization from multiple perspectives. Five perturbed policies are uniformly sampled with performance increase sequentially before BATTLE convergence. For each policy, we roll out 100 trajectories and obtain the trajectory weight vectors via the weighting function. By leveraging the technique of t-SNE (van der Maaten & Hinton, 2008), the weight vectors of different policies are visualized in Figure 7a. From the figure, we can observe clear boundaries between the trajectory weights of various policies, suggesting that the weighting function can distinguish trajectories of different qualities. In Figure 7b, the darker color indicates trajectories with higher success rates of manipulation. The result shows that the weighting function gives higher weights to better trajectories for improving the adversarial policy performance. To further illustrate the effect of the weighting function, we present a heat map of the weight distribution in 2D coordinates and annotate part of the trajectories of the perturbed policy. As Figure 7c shows, the weighting function scores the surrounding states in trajectories from the perturbed policy higher, especially in the early stage before reaching the target point.
|
| 176 |
+
|
| 177 |
+
Extensive experiments are conducted to analyze and discuss the impact of feedback amount, attack budgets on the performance of BATTLE and quality of learned reward functions in the Appendix G.
|
| 178 |
+
|
| 179 |
+
# 6 CONCLUSION
|
| 180 |
+
|
| 181 |
+
In this paper, we propose BATTLE, a behavior-oriented adversarial attack approach against DRL learners, which can manipulate the victim to perform desired behaviors of human. BATTLE involves an adversary adding imperceptible perturbations on the observations of the victim, an intention policy learned through PbRL as a flexible behavior orientation, and a weighting function to identify essential states for the efficient adversarial attack. We analyze the convergence of BATTLE and prove that BATTLE converges to critical points under some mild conditions. Empirically, we design two scenarios on several manipulation tasks of Meta-world, and the results demonstrate that BATTLE outperforms the baselines under the targeted adversarial setting. Additionally, BATTLE can enhance the robustness of agents by training with adversary. We further show embodied agents’ vulnerability by attacking Decision Transformer on some MuJoCo tasks.
|
| 182 |
+
|
| 183 |
+
# ETHICS STATEMENT
|
| 184 |
+
|
| 185 |
+
Preference-based RL provides an effective way to train agents without a carefully designed reward function. However, learning from human preferences means humans need to provide labeled data which inevitably has biases introducing systematic error. While there are possible negative impacts when malicious people attack other policies using our methods. However, our approach also makes other researchers aware of the vulnerability of policies for AI safety. Furthermore, our method might serve as a red teaming tool to evaluate DRL agents for potential unsafe behaviors.
|
| 186 |
+
|
| 187 |
+
# REPRODUCIBILITY STATEMENT
|
| 188 |
+
|
| 189 |
+
The details of experiment settings are provided in Section 4. We provide detailed proofs of theoretical analysis in Appendix D. A more detailed description and implementation setting can be found in Appendix F. Meanwhile, we present the link of our videos in the abstract and we will provide source code during rebuttal.
|
| 190 |
+
|
| 191 |
+
# REFERENCES
|
| 192 |
+
|
| 193 |
+
Joshua Achiam, David Held, Aviv Tamar, and Pieter Abbeel. Constrained policy optimization. In doina Precup and Yee Whye Teh (eds.), Proceedings of the 34th International Conference on Machine Learning (ICML), volume 70, pp. 22–31. PMLR, 06–11 Aug 2017.
|
| 194 |
+
Adith Boloor, Karthik Garimella, Xin He, Christopher Gill, Yevgeniy Vorobeychik, and Xuan Zhang. Attacking vision-based perception in end-to-end autonomous driving models. Journal of Systems Architecture, 110:101766, 2020.
|
| 195 |
+
Ralph Allan Bradley and Milton E. Terry. Rank analysis of incomplete block designs: I. the method of paired comparisons. Biometrika, 39(3/4):324–345, 1952.
|
| 196 |
+
Prasanth Buddareddygari, Travis Zhang, Yezhou Yang, and Yi Ren. Targeted attack on deep rl-based autonomous driving with learned visual patterns. In International Conference on Robotics and Automation (ICRA), pp. 10571–10577, 2022.
|
| 197 |
+
Lili Chen, Kevin Lu, Aravind Rajeswaran, Kimin Lee, Aditya Grover, Misha Laskin, Pieter Abbeel, Aravind Srinivas, and Igor Mordatch. Decision transformer: Reinforcement learning via sequence modeling. In Advances in Neural Information Processing Systems (NeurIPS), volume 34, pp. 15084–15097. Curran Associates, Inc., 2021.
|
| 198 |
+
Paul F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei. Deep reinforcement learning from human preferences. In Advances in Neural Information Processing Systems (NeurIPS), volume 30. Curran Associates, Inc., 2017.
|
| 199 |
+
Adam Gleave, Michael Dennis, Cody Wild, Neel Kant, Sergey Levine, and Stuart Russell. Adversarial policies: Attacking deep reinforcement learning. In International Conference on Learning Representations (ICLR), 2020. URL https://openreview.net/forum?id=HJgEMpVFwB.
|
| 200 |
+
Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In International Conference on Learning Representations (ICLR), 2015.
|
| 201 |
+
Shangding Gu, Long Yang, Yali Du, Guang Chen, Florian Walter, Jun Wang, Yaodong Yang, and Alois Knoll. A review of safe reinforcement learning: Methods, theory and applications. arXiv preprint arXiv:2205.10330, 2022.
|
| 202 |
+
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In International Conference on Machine Learning (ICML), volume 80, pp. 1861–1870, 2018.
|
| 203 |
+
Sandy H. Huang, Nicolas Papernot, Ian J. Goodfellow, Yan Duan, and Pieter Abbeel. Adversarial attacks on neural network policies. In International Conference on Learning Representations (ICLR), 2017.
|
| 204 |
+
Léonard Hussenot, Matthieu Geist, and Olivier Pietquin. Targeted attacks on deep reinforcement learning agents through adversarial observations. abs/1905.12282, 2019a.
|
| 205 |
+
|
| 206 |
+
Léonard Hussenot, Matthieu Geist, and Olivier Pietquin. Targeted attacks on deep reinforcement learning agents through adversarial observations. CoRR, abs/1905.12282, 2019b. URL http: //arxiv.org/abs/1905.12282.
|
| 207 |
+
|
| 208 |
+
Borja Ibarz, Jan Leike, Tobias Pohlen, Geoffrey Irving, Shane Legg, and Dario Amodei. Reward learning from human preferences and demonstrations in atari. In Advances in Neural Information Processing Systems (NeurIPS), volume 31. Curran Associates, Inc., 2018.
|
| 209 |
+
Michael Janner, Justin Fu, Marvin Zhang, and Sergey Levine. When to trust your model: Model-based policy optimization. In Advances in Neural Information Processing Systems (NeurIPS), volume 32, 2019.
|
| 210 |
+
Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
|
| 211 |
+
Kimin Lee, Laura M Smith, and Pieter Abbeel. Pebble: Feedback-efficient interactive reinforcement learning via relabeling experience and unsupervised pre-training. In International Conference on Machine Learning (ICML), volume 139, pp. 6152–6163, 2021a.
|
| 212 |
+
Xian Yeow Lee, Yasaman Esfandiari, Kai Liang Tan, and Soumik Sarkar. Query-based targeted action-space adversarial policies on deep reinforcement learning agents. In Proceedings of the ACM/IEEE 12th International Conference on Cyber-Physical Systems, pp. 87–97, 2021b.
|
| 213 |
+
Xinran Liang, Katherine Shu, Kimin Lee, and Pieter Abbeel. Reward uncertainty for exploration in preference-based reinforcement learning. In International Conference on Learning Representations (ICLR), 2022.
|
| 214 |
+
Yen-Chen Lin, Zhang-Wei Hong, Yuan-Hong Liao, Meng-Li Shih, Ming-Yu Liu, and Min Sun. Tactics of adversarial attack on deep reinforcement learning agents. In IJCAI, pp. 3756–3762, 2017a. URL https://doi.org/10.24963/ijcai.2017/525.
|
| 215 |
+
Yen-Chen Lin, Zhang-Wei Hong, Yuan-Hong Liao, Meng-Li Shih, Ming-Yu Liu, and Min Sun. Tactics of adversarial attack on deep reinforcement learning agents. In International Joint Conference on Artificial Intelligence (IJCAI), pp. 3756–3762, 2017b.
|
| 216 |
+
Runze Liu, Fengshuo Bai, Yali Du, and Yaodong Yang. Meta-reward-net: Implicitly differentiable reward learning for preference-based reinforcement learning. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho (eds.), Advances in Neural Information Processing Systems (NeurIPS), 2022.
|
| 217 |
+
Julien Mairal. Stochastic majorization-minimization algorithms for large-scale optimization. In Advances in Neural Information Processing Systems (NeurIPS), volume 26, 2013.
|
| 218 |
+
Ajay Mandlekar, Yuke Zhu, Animesh Garg, Li Fei-Fei, and Silvio Savarese. Adversarially robust policy learning: Active construction of physically-plausible perturbations. In International Conference on Intelligent Robots and Systems (IROS), pp. 3932–3939, 2017.
|
| 219 |
+
Yu Nesterov. Introductory lectures on convex programming, 1998.
|
| 220 |
+
Jongjin Park, Younggyo Seo, Jinwoo Shin, Honglak Lee, Pieter Abbeel, and Kimin Lee. SURF: Semi-supervised reward learning with data augmentation for feedback-efficient preference-based reinforcement learning. In International Conference on Learning Representations (ICLR), 2022.
|
| 221 |
+
Anay Pattanaik, Zhenyi Tang, Shuijing Liu, Gautham Bommannan, and Girish Chowdhary. Robust deep reinforcement learning with adversarial attacks. In International Conference on Autonomous Agents and MultiAgent Systems (AAMAS). International Foundation for Autonomous Agents and Multiagent Systems, 2018.
|
| 222 |
+
Lerrel Pinto, James Davidson, Rahul Sukthankar, and Abhinav Gupta. Robust adversarial reinforcement learning. In International Conference on Machine Learning (ICML), volume 70 of Proceedings of Machine Learning Research, pp. 2817–2826. PMLR, 06–11 Aug 2017.
|
| 223 |
+
|
| 224 |
+
Yanchao Sun, Ruijie Zheng, Yongyuan Liang, and Furong Huang. Who is the strongest enemy? towards optimal and efficient evasion attacks in deep RL. In International Conference on Learning Representations (ICLR), 2022. URL https://openreview.net/forum?id= JM2kFbJvvI.
|
| 225 |
+
|
| 226 |
+
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
|
| 227 |
+
|
| 228 |
+
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In International Conference on Intelligent Robots and Systems (IROS), pp. 5026–5033, 2012.
|
| 229 |
+
|
| 230 |
+
Peter Vamplew, Benjamin J Smith, Johan Källström, Gabriel Ramos, Roxana Radulescu, Diederik M ˘ Roijers, Conor F Hayes, Fredrik Heintz, Patrick Mannion, Pieter JK Libin, et al. Scalar reward is not enough: A response to silver, singh, precup and sutton (2021). Autonomous Agents and Multi-Agent Systems (AAMAS), 36(2):41, 2022.
|
| 231 |
+
|
| 232 |
+
Laurens van der Maaten and Geoffrey Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(86):2579–2605, 2008.
|
| 233 |
+
|
| 234 |
+
Tianhe Yu, Deirdre Quillen, Zhanpeng He, Ryan Julian, Karol Hausman, Chelsea Finn, and Sergey Levine. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In Conference on Robot Learning (CoRL), volume 100 of Proceedings of Machine Learning Research, pp. 1094–1100. PMLR, 2020.
|
| 235 |
+
|
| 236 |
+
Huan Zhang, Hongge Chen, Chaowei Xiao, Bo Li, Mingyan Liu, Duane Boning, and Cho-Jui Hsieh. Robust deep reinforcement learning against adversarial perturbations on state observations. In Advances in Neural Information Processing Systems (NeurIPS), volume 33, pp. 21024–21037. Curran Associates, Inc., 2020.
|
| 237 |
+
|
| 238 |
+
Huan Zhang, Hongge Chen, Duane S Boning, and Cho-Jui Hsieh. Robust reinforcement learning on state observations with learned optimal adversary. In International Conference on Learning Representations (ICLR), 2021.
|
| 239 |
+
|
| 240 |
+
# A THE FULL PROCEDURE OF BATTLE
|
| 241 |
+
|
| 242 |
+
The Combined Policy. In order to address the inefficiency caused by the discrepancy between $\pi _ { \theta }$ and $\pi _ { \nu \circ \alpha }$ in the state distribution, we propose a strategy to construct the behavior policy $\pi$ for data collection in our practical implementation. Inspired by Branched rollout (Janner et al., 2019), we combine the intention policy $\pi _ { \theta }$ with the perturbed policy $\pi _ { \nu \circ \alpha }$ . Specifically, we define $\pi ^ { 1 : h } = \pi _ { \nu \circ \alpha } ^ { 1 : h }$ $\pi ^ { h + 1 : H } = \pi _ { \theta } ^ { h + 1 : \bar { H } }$ πh+1:Hθ , where h is sampled from a uniform distribution U (0, H) and H represents the task horizon. The resulting combined policy $\pi$ is responsible for data collection, which is then stored in the replay buffer during the learning process.
|
| 243 |
+
|
| 244 |
+
We present the detailed procedures of our proposed method in Algorithm 1. Our method, referred to as BATTLE, is built upon the well-established preference-based RL algorithm PEBBLE (Lee et al., 2021a).
|
| 245 |
+
|
| 246 |
+
# Algorithm 1 BATTLE
|
| 247 |
+
|
| 248 |
+
Input: a fixed victim policy $\pi _ { \nu }$ , frequency of human feedback $K$ , outer loss updating frequency $M$
|
| 249 |
+
task horizon $H$
|
| 250 |
+
1: Initialize parameters of $Q _ { \phi }$ , $\pi _ { \theta }$ , $\widehat { r } _ { \psi }$ , $\pi _ { \alpha }$ and $h _ { \omega }$
|
| 251 |
+
2: Initialize $\boldsymbol { B }$ and $\pi _ { \theta }$ bwith unsupervised exploration
|
| 252 |
+
3: Initialize preference data set $\mathcal { D } \emptyset$
|
| 253 |
+
4: for each iteration do
|
| 254 |
+
5: // Construct the combined policy $\pi$
|
| 255 |
+
6: if episode is done then
|
| 256 |
+
7: $\bar { h } \sim U ( 0 , H )$
|
| 257 |
+
8: h = π1:hν◦α and πh+1:H $\pi ^ { h + 1 : H } = \pi _ { \theta } ^ { h + 1 : H }$
|
| 258 |
+
9: end if
|
| 259 |
+
10: Take action $a _ { t } \sim \pi$ and collect $s _ { t + 1 }$
|
| 260 |
+
11: Store transition into dataset $\stackrel { } { } \stackrel { } { } \cup \big \{ \big ( s _ { t } , a _ { t } , \widehat r _ { \psi } \big ( s _ { t } \big ) , s _ { t + 1 } \big ) \big \}$
|
| 261 |
+
12: b// Query preference and Reward learning
|
| 262 |
+
13: if iteration $\%$ $K = = 0$ then
|
| 263 |
+
14: for each query step do
|
| 264 |
+
15: Sample pair of trajectories $( \sigma ^ { 0 } , \sigma ^ { 1 } )$
|
| 265 |
+
16: Query preference $_ y$ from manipulator
|
| 266 |
+
17: Store preference data into dataset ${ \mathcal { D } } { \mathcal { D } } \cup \{ ( \sigma ^ { 0 } , \sigma ^ { 1 } , y ) \}$
|
| 267 |
+
18: end for
|
| 268 |
+
19: for each gradient step do
|
| 269 |
+
20: Sample batch $\{ ( \sigma ^ { \mathrm { { 0 } } } , \sigma ^ { \mathrm { { 1 } } } , y ) _ { i } \} _ { i = 1 } ^ { n }$ from $\mathcal { D }$
|
| 270 |
+
21: Optimize (2) to update $\widehat { r } _ { \psi }$
|
| 271 |
+
22: end for
|
| 272 |
+
23: end if
|
| 273 |
+
24: // Inner loss optimization
|
| 274 |
+
25: for each gradient step do
|
| 275 |
+
26: Sample random mini-batch transitions from $\boldsymbol { B }$
|
| 276 |
+
27: Optimize $\pi _ { \alpha }$ : minimize (6) with respect to $\alpha$
|
| 277 |
+
28: end for
|
| 278 |
+
29: // Outer loss optimization
|
| 279 |
+
30: if iteration $7 o \ M = = 0$ then
|
| 280 |
+
31: Sample random mini-batch transitions from $\boldsymbol { B }$
|
| 281 |
+
32: Optimize $h _ { \omega }$ : minimize (7) with respect to $\omega$
|
| 282 |
+
33: end if
|
| 283 |
+
34: // Intention policy learning
|
| 284 |
+
35: Update $Q _ { \phi }$ and $\pi \theta$ according to (3) and (4), respectively.
|
| 285 |
+
36: end for
|
| 286 |
+
Output: adversarial policy $\pi _ { \alpha }$
|
| 287 |
+
|
| 288 |
+
# B DERIVATION OF THE GRADIENT OF THE OUTER-LEVEL LOSS
|
| 289 |
+
|
| 290 |
+
In this section, we present detailed derivation of the gradient of the outer loss $J _ { \pi }$ with respect to the parameters of the weighting function $\omega$ . According to the chain rule, we can derive that
|
| 291 |
+
|
| 292 |
+
$$
|
| 293 |
+
\begin{array} { r l } & { \quad \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } ( \omega ) ) | _ { \omega _ { t } } } \\ & { = \frac { \partial J _ { \pi } ( \hat { \alpha } ( \omega ) ) } { \partial \hat { \alpha } ( \omega ) } | _ { \hat { \alpha } _ { t } } \frac { \partial \hat { \alpha } _ { t } ( \omega ) } { \partial \omega } | _ { \omega _ { t } } } \\ & { = \frac { \partial J _ { \pi } ( \hat { \alpha } ( \omega ) ) } { \partial \hat { \alpha } ( \omega ) } | _ { \hat { \alpha } _ { t } } \frac { \partial \hat { \alpha } _ { t } ( \omega ) } { \partial h ( s ; \omega ) } | _ { \omega _ { t } } \frac { \partial h ( \mathbf { s } ; \omega ) } { \partial \omega } | _ { \omega _ { t } } } \\ & { = - \eta _ { t } \frac { \partial J _ { \pi } ( \hat { \alpha } ( \omega ) ) } { \partial \hat { \alpha } ( \omega ) } | _ { \hat { \alpha } _ { t } \underset { \mathrm { s w a x } } { \sum } } \frac { \partial D _ { \mathrm { K L } } ( \pi _ { \nu \infty } ( \mathbf { s } ) \parallel \pi _ { \theta } ( \mathbf { s } ) ) } { \partial \alpha } | _ { \alpha _ { t } } \frac { \partial h ( \mathbf { s } ; \omega ) } { \partial \omega } | _ { \omega _ { t } } } \\ & { = - \eta _ { t } \biggr [ \frac { \partial J _ { \pi } ( \hat { \alpha } ( \omega ) ) } { \partial \hat { \alpha } ( \omega ) } \Bigr | _ { \hat { \alpha } _ { t } } \frac { \partial } { \partial \hat { \alpha } } \frac { D _ { \mathrm { K L } } ( \pi _ { \nu \infty } ( \mathbf { s } ) \parallel \pi _ { \theta } ( \mathbf { s } ) ) } { \partial \alpha } \Bigr | _ { \alpha _ { t } } \biggr ) \frac { \partial h ( \mathbf { s } ; \omega ) } { \partial \omega } | _ { \omega _ { t } } . } \end{array}
|
| 294 |
+
$$
|
| 295 |
+
|
| 296 |
+
For brevity of expression, we let:
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
f ( \mathbf { s } ) = \frac { \partial J _ { \pi } ( \hat { \alpha } ( \omega ) ) } { \partial \hat { \alpha } ( \omega ) } \Big \vert _ { \hat { \alpha } _ { t } } ^ { \top } \frac { \partial D _ { \mathrm { K L } } \left( \pi _ { \nu \circ \alpha } ( \mathbf { s } ) \parallel \pi _ { \theta } ( \mathbf { s } ) \right) } { \partial \hat { \alpha } } \Big \vert _ { \alpha _ { t } } .
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
The gradient of outer-level optimization loss with respect to parameters $\omega$ is:
|
| 303 |
+
|
| 304 |
+
$$
|
| 305 |
+
\nabla _ { \omega } J _ { \pi } ( \hat { \alpha } ( \omega ) ) | _ { \omega _ { t } } = - \eta _ { t } \sum _ { \mathbf { s } \sim \mathcal { B } } f ( \mathbf { s } ) \cdot \frac { \partial h ( \mathbf { s } ; \omega ) } { \partial \omega } \Big | _ { \omega _ { t } } .
|
| 306 |
+
$$
|
| 307 |
+
|
| 308 |
+
# C CONNECTION BETWEEN RSA-MDP AND MDP
|
| 309 |
+
|
| 310 |
+
Lemma C.1. Given a RSA-MDP $\mathcal { M } = ( \mathcal { S } , \mathcal { A } , \mathcal { B } , \widehat { \mathcal { R } } , \mathcal { P } , \gamma )$ and a fixed victim policy $\pi _ { \nu }$ , there exists a MDP $\hat { \mathcal { M } } = ( S , \hat { \mathcal { A } } , \widehat { \mathcal { R } } , \widehat { \mathcal { P } } , \gamma )$ such that the optimal policy of $\hat { \mathcal { M } }$ is equivalent to the optimal adversary $\pi _ { \alpha }$ in RSA-MDP given a fixed victim, where $\widehat { A } = { \cal S }$ and
|
| 311 |
+
|
| 312 |
+
$$
|
| 313 |
+
\widehat { \mathcal { P } } ( \mathbf { s } ^ { \prime } | \mathbf { s } , \mathbf { a } ) = \sum _ { \mathbf { a } \in \mathcal { A } } \pi _ { \nu } ( \mathbf { a } | \widehat { \mathbf { a } } ) \mathcal { P } ( \mathbf { s } ^ { \prime } | \mathbf { s } , \mathbf { a } ) \quad f o r \mathbf { s } , \mathbf { s } ^ { \prime } \in \mathcal { S } a n d \widehat { \mathbf { a } } \in \widehat { \mathcal { A } } .
|
| 314 |
+
$$
|
| 315 |
+
|
| 316 |
+
D THEORETICAL ANALYSIS AND PROOFS
|
| 317 |
+
|
| 318 |
+
D.1 THEOREM 1: CONVERGENCE RATE OF THE OUTER LOSS
|
| 319 |
+
|
| 320 |
+
Lemma D.1. (Lemma 1.2.3 in Nesterov (1998)) If function $f ( x )$ is Lipschitz smooth on $\mathbb { R } ^ { n }$ with constant $L$ , then $\forall x , y \in \mathbb { R } ^ { n }$ , we have
|
| 321 |
+
|
| 322 |
+
$$
|
| 323 |
+
\left| f ( y ) - f ( x ) - f ^ { \prime } ( x ) ^ { \top } ( y - x ) \right| \leq \frac { L } { 2 } \left. y - x \right. ^ { 2 } .
|
| 324 |
+
$$
|
| 325 |
+
|
| 326 |
+
Proof. $\forall x , y \in \mathbb { R } ^ { n }$ , we have
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
\begin{array} { l } { f ( y ) = f ( x ) + \displaystyle \int _ { 0 } ^ { 1 } f ^ { \prime } ( x + \tau ( y - x ) ) ^ { \top } ( y - x ) d \tau } \\ { \displaystyle \qquad = f ( x ) + f ^ { \prime } ( x ) ^ { \top } ( y - x ) + \displaystyle \int _ { 0 } ^ { 1 } [ f ^ { \prime } ( x + \tau ( y - x ) ) - f ^ { \prime } ( x ) ] ^ { \top } ( y - x ) d \tau . } \end{array}
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
Then we can derive that
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\begin{array} { r l } { \displaystyle \left. f ( y ) - f ( x ) - f ^ { \prime } ( x ) ^ { \top } ( y - x ) \right. = \displaystyle \left. \int _ { 0 } ^ { 1 } [ f ^ { \prime } ( x + \tau ( y - x ) ) - f ^ { \prime } ( x ) ] ^ { \top } ( y - x ) d \tau \right. } & { } \\ { \displaystyle } & { \le \displaystyle \int _ { 0 } ^ { 1 } \left. [ f ^ { \prime } ( x + \tau ( y - x ) ) - f ^ { \prime } ( x ) ] ^ { \top } ( y - x ) \right. d \tau } \\ { \displaystyle } & { \le \displaystyle \int _ { 0 } ^ { 1 } \left. f ^ { \prime } ( x + \tau ( y - x ) ) - f ^ { \prime } ( x ) \right. \cdot \left. y - x \right. d \tau } \\ { \displaystyle } & { \le \displaystyle \int _ { 0 } ^ { 1 } \tau L \left. y - x \right. ^ { 2 } d \tau = \displaystyle \frac { L } { 2 } \left. y - x \right. ^ { 2 } , } \end{array}
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
where the first inequality holds for $\begin{array} { r } { \left| \int _ { a } ^ { b } f ( x ) d x \right| \le \int _ { a } ^ { b } | f ( x ) | d x } \end{array}$ , the second inequality holds for Cauchy-Schwarz inequality, and the last inequality holds for the definition of Lipschitz smoothness.
|
| 339 |
+
|
| 340 |
+
Theorem D.2. Suppose $J _ { \pi }$ is Lipschitz-smooth with constant $L$ , the gradient of $J _ { \pi }$ and $\mathcal { L } _ { a t t }$ is bounded by $\rho$ . Let the training iterations be $T$ , the inner-level optimization learning rate $\begin{array} { r } { \eta _ { t } = \operatorname* { m i n } \{ 1 , \frac { c _ { 1 } } { T } \} } \end{array}$ for some constant $c _ { 1 } > 0$ where $\begin{array} { r } { \frac { c _ { 1 } } { T } < 1 } \end{array}$ . Let the outer-level optimization learning rate $\begin{array} { r } { \beta _ { t } = \operatorname* { m i n } \{ \frac { 1 } { L } , \frac { c _ { 2 } } { \sqrt { T } } \} } \end{array}$ for so constant $c _ { 2 } > 0$ where $\begin{array} { r } { c _ { 2 } \leq \frac { \sqrt { T } } { L } } \end{array}$ , and $\begin{array} { r } { \sum _ { t = 1 } ^ { \infty } \beta _ { t } \leq \infty , \sum _ { t = 1 } ^ { \infty } \beta _ { t } ^ { 2 } \leq \infty } \end{array}$ . The convergence $J _ { \pi }$
|
| 341 |
+
|
| 342 |
+
$$
|
| 343 |
+
\operatorname* { m i n } _ { 1 \leq t \leq T } \mathbb { E } \left[ \left\| \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \right\| ^ { 2 } \right] \leq \mathcal { O } \left( \frac { 1 } { \sqrt { T } } \right) .
|
| 344 |
+
$$
|
| 345 |
+
|
| 346 |
+
Proof. First,
|
| 347 |
+
|
| 348 |
+
$$
|
| 349 |
+
\begin{array} { r l } & { \quad J _ { \pi } \big ( \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) \big ) - J _ { \pi } \big ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) \big ) } \\ & { = \{ J _ { \pi } \big ( \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) \big ) - J _ { \pi } \big ( \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) \big ) \} + \{ J _ { \pi } \big ( \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) \big ) - J _ { \pi } \big ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) \big ) \} . } \end{array}
|
| 350 |
+
$$
|
| 351 |
+
|
| 352 |
+
Then we separately derive the two terms of (17). For the first term,
|
| 353 |
+
|
| 354 |
+
$$
|
| 355 |
+
\begin{array} { r l } & { \quad J _ { \pi } ( \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) ) - J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) ) } \\ & { \le \nabla _ { \hat { \alpha } } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) ) ^ { \top } ( \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) - \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) ) + \displaystyle \frac { L } { 2 } \left\| \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) - \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) \right\| ^ { 2 } } \\ & { \le \| \nabla _ { \hat { \alpha } } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) ) \| \cdot \| \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) - \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) \| + \displaystyle \frac { L } { 2 } \left\| \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) - \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) \right\| ^ { 2 } } \\ & { \le \rho \cdot \| - \eta _ { t + 1 } \nabla _ { \hat { \alpha } } \mathcal { L } _ { \mathrm { a t } } ( \hat { \alpha } _ { t + 1 } ) \| + \displaystyle \frac { L } { 2 } \left\| - \eta _ { t + 1 } \nabla _ { \hat { \alpha } } \mathcal { L } _ { \mathrm { a t } } ( \hat { \alpha } _ { t + 1 } ) \right\| ^ { 2 } } \\ & { \le \eta _ { t + 1 } \rho ^ { 2 } + \displaystyle \frac { L } { 2 } \eta _ { t + 1 } ^ { 2 } \rho ^ { 2 } , } \end{array}
|
| 356 |
+
$$
|
| 357 |
+
|
| 358 |
+
where $\hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) - \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) = - \eta _ { t + 1 } \nabla _ { \hat { \alpha } } \mathcal { L } _ { \mathrm { a t t } } ( \hat { \alpha } _ { t + 1 } )$ , the first inequality holds for Lemma D.1, the second inequality holds for Cauchy-Schwarz inequality, the third inequality holds for $\| \nabla _ { \hat { \alpha } } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) ) \| \leq \rho$ , and the last inequality holds for $\| \nabla _ { \hat { \alpha } } \mathcal { L } _ { \mathrm { a t t } } ( \hat { \alpha } _ { t + 1 } ) \| \leq \rho$ . It can be proved that the gradient of $\omega$ with respect to $J _ { \pi }$ is Lipschitz continuous and we assume the Lipschitz constant is $L$ . Therefore, for the second term,
|
| 359 |
+
|
| 360 |
+
$$
|
| 361 |
+
\begin{array} { r l } & { \quad J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t + 1 } ) ) - J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) } \\ & { \le \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) ^ { \top } ( \omega _ { t + 1 } - \omega _ { t } ) + \displaystyle \frac { L } { 2 } \left\| \omega _ { t + 1 } - \omega _ { t } \right\| ^ { 2 } } \\ & { = - \beta _ { t } \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) ^ { \top } \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) + \displaystyle \frac { L \beta _ { t } ^ { 2 } } { 2 } \left\| \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) \right\| ^ { 2 } } \\ & { = - \left( \beta _ { t } - \displaystyle \frac { L \beta _ { t } ^ { 2 } } { 2 } \right) \left\| \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) \right\| ^ { 2 } , } \end{array}
|
| 362 |
+
$$
|
| 363 |
+
|
| 364 |
+
where $\omega _ { t + 1 } - \omega _ { t } = - \beta _ { t } \nabla _ { \omega } J _ { \pi } \big ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) \big )$ , and the first inequality holds for Lemma D.1. Therefore, (17) becomes
|
| 365 |
+
|
| 366 |
+
$$
|
| 367 |
+
J _ { \pi } ( \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) ) - J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) \leq \eta _ { t + 1 } \rho ^ { 2 } + \frac { L } { 2 } \eta _ { t + 1 } ^ { 2 } \rho ^ { 2 } - ( \beta _ { t } - \frac { L \beta _ { t } ^ { 2 } } { 2 } ) \left\| \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) \right\| ^ { 2 } .
|
| 368 |
+
$$
|
| 369 |
+
|
| 370 |
+
Rearranging the terms of (20), we obtain
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
( \beta _ { t } - \frac { L \beta _ { t } ^ { 2 } } { 2 } ) \left\| \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) \right\| ^ { 2 } \leq J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) - J _ { \pi } ( \hat { \alpha } _ { t + 2 } ( \omega _ { t + 1 } ) ) + \eta _ { t + 1 } \rho ^ { 2 } + \frac { L } { 2 } \eta _ { t + 1 } ^ { 2 } \rho ^ { 2 } .
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
Then, we sum up both sides of (21),
|
| 377 |
+
|
| 378 |
+
$$
|
| 379 |
+
\begin{array} { r l } & { \quad \displaystyle \sum _ { t = 1 } ^ { T } ( \beta _ { t } - \frac { L \beta _ { t } ^ { 2 } } { 2 } ) \| \nabla _ { \omega } J _ { \pi } ( \hat { \alpha } _ { t + 1 } ( \omega _ { t } ) ) \| ^ { 2 } } \\ & { \leq J _ { \pi } ( \hat { \alpha } _ { 2 } ( \omega _ { 1 } ) ) - J _ { \pi } ( \hat { \alpha } _ { T + 2 } ( \omega _ { T + 1 } ) ) + \displaystyle \sum _ { t = 1 } ^ { T } ( \eta _ { t + 1 } \rho ^ { 2 } + \frac { L } { 2 } \eta _ { t + 1 } ^ { 2 } \rho ^ { 2 } ) } \\ & { \leq J _ { \pi } ( \hat { \alpha } _ { 2 } ( \omega _ { 1 } ) ) + \displaystyle \sum _ { t = 1 } ^ { T } ( \eta _ { t + 1 } \rho ^ { 2 } + \frac { L } { 2 } \eta _ { t + 1 } ^ { 2 } \rho ^ { 2 } ) . } \end{array}
|
| 380 |
+
$$
|
| 381 |
+
|
| 382 |
+
Therefore,
|
| 383 |
+
|
| 384 |
+
$$
|
| 385 |
+
\begin{array} { r l } & { \quad \underset { \leq \frac { 1 } { 2 } \leq n } { \sum \frac { \| \nabla B \| } { n } } \mathbb { E } \left[ \| \nabla _ { x } x _ { t } ( \hat { \alpha } _ { t + ( \lambda ) } ) \| ^ { 2 } \right] } \\ & { \leq \frac { \sum _ { i = 1 } ^ { n } \big ( \lambda _ { i } - \frac { B _ { i } ^ { 2 } } { 2 } \big ) \| \nabla _ { x } x _ { t } ( \hat { \alpha } _ { t + ( \lambda ) } ) \| ^ { 2 } } { \sum _ { i = 1 } ^ { n } ( \lambda _ { i } - \frac { B _ { i } ^ { 2 } } { 2 } ) } } \\ & { \leq \frac { \sum _ { i = 1 } ^ { n } \big ( \lambda _ { i } - \frac { B _ { i } ^ { 2 } } { 2 } \big ) \big ( \sum _ { i } ( \lambda _ { i } - \frac { B _ { i } ^ { 2 } } { 2 } ) \big ) } { \sum _ { i = 1 } ^ { n } ( \lambda _ { i } ) } \Bigg [ 2 ( \lambda _ { i } + \frac { B _ { i } ^ { 2 } } { 2 } ) + \lambda _ { i } ^ { 2 } u _ { i + ( \lambda ) } ^ { 2 } } \\ & { \leq \frac { 1 } { \sum _ { i = 1 } ^ { n } ( \lambda _ { i } ) } \Bigg [ 2 ( \lambda _ { i } + \frac { B _ { i } ^ { 2 } } { 2 } ) \Bigg ] } \\ & { \leq \frac { 1 } { \sum _ { i = 1 } ^ { n } \lambda _ { i } } \Bigg [ 2 ( \lambda _ { i } + \frac { B _ { i } ^ { 2 } } { 2 } ) + \lambda _ { i } ^ { 2 } u _ { i + ( \lambda ) } ^ { 2 } + \lambda _ { i + ( \lambda ) } ^ { 2 } \Bigg ] } \\ & { \leq \frac { 1 } { \sum _ { i = 1 } ^ { n } \lambda _ { i } } \Bigg [ 2 ( \lambda _ { i } ( \alpha _ { t + ( \lambda ) } ) + \mathcal { T } _ { 1 1 } + u ^ { 2 } ) + 2 \lambda _ { i } \Bigg ] } \\ & { \quad - 2 \int _ { \lambda } ( \alpha _ { t + ( \lambda ) } ) + \frac { \beta _ { t } \beta _ { t } ^ { 2 } ( 2 \lambda _ { t } ) } { \delta _ { t } \lambda _ { t } } } \\ & \quad - 2 \int _ { \lambda } ( \lambda _ { i } ^ { 2 } ) + \frac \beta _ { t } \beta _ { t } ^ { 2 } ( 2 \lambda _ { t } \end{array}
|
| 386 |
+
$$
|
| 387 |
+
|
| 388 |
+
$\begin{array} { r } { \sum _ { t = 1 } ^ { T } \left( 2 \beta _ { t } - L \beta _ { t } ^ { 2 } \right) \geq \sum _ { t = 1 } ^ { \hat { T } } \beta _ { t } } \end{array}$ holds according to (22), the third inequality holds for.
|
| 389 |
+
|
| 390 |
+
# D.2 THEOREM 2: CONVERGENCE OF THE INNER LOSS
|
| 391 |
+
|
| 392 |
+
a D.3. (Les such thsuch that (2013)) Let diverges, thThen, the seq $( a _ { n } ) _ { n \geq 1 } , ( b _ { n } ) _ { n \geq 1 }$ e two nconvergerges to n-negative real se-s, and there exists. $\textstyle \sum _ { n = 1 } ^ { \infty } a _ { n }$ $\textstyle \sum _ { n = 1 } ^ { \infty } { \bar { a _ { n } } } b _ { n }$ $C > 0$ $| b _ { n + 1 } - b _ { n } | \leq { \bar { C } } { \bar { a } } _ { n }$ $\left( b _ { n } \right) _ { n \geq 1 }$ $O$
|
| 393 |
+
|
| 394 |
+
Theorem D.4. Suppose $J _ { \pi }$ is Lipschitz-smooth with constant $L ,$ , the gradient of $J _ { \pi }$ and $\mathcal { L } _ { a t t }$ is bounded by $\rho$ . Let the training iterations be $T$ , the inner-level optimization learning rate $\begin{array} { r } { \eta _ { t } = \operatorname* { m i n } \{ 1 , \frac { c _ { 1 } } { T } \} } \end{array}$ for some constant $c _ { 1 } > 0$ where $\begin{array} { r } { \frac { c _ { 1 } } { T } < 1 } \end{array}$ . Let the outer-level optimization learning rate $\begin{array} { r } { \beta _ { t } = \operatorname* { m i n } \{ \frac { 1 } { L } , \frac { c _ { 2 } } { \sqrt { T } } \} } \end{array}$ for some constant $c _ { 2 } > 0$ where $\begin{array} { r } { c _ { 2 } \leq \frac { \sqrt { T } } { L } } \end{array}$ , and $\begin{array} { r } { \sum _ { t = 1 } ^ { \infty } \beta _ { t } \leq \infty , \sum _ { t = 1 } ^ { \infty } \beta _ { t } ^ { 2 } \leq \infty } \end{array}$ . $\mathcal { L } _ { a t t }$ achieves
|
| 395 |
+
|
| 396 |
+
$$
|
| 397 |
+
\operatorname* { l i m } _ { t \to \infty } \mathbb { E } \left[ \left\| \nabla _ { \alpha } \mathcal { L } _ { a t t } ( \alpha _ { t } ; \omega _ { t } ) \right\| ^ { 2 } \right] = 0 .
|
| 398 |
+
$$
|
| 399 |
+
|
| 400 |
+
Proof. First,
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
\begin{array} { r l } & { \quad \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) - \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) } \\ & { = \{ \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) - \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) \} + \{ \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) - \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \} . } \end{array}
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
For the first term in (25),
|
| 407 |
+
|
| 408 |
+
$$
|
| 409 |
+
\begin{array} { r l } & { \quad \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) - \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) } \\ & { \leq \nabla _ { \omega } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) ^ { \top } ( \omega _ { t + 1 } - \omega _ { t } ) + \displaystyle \frac { L } { 2 } \left\| \omega _ { t + 1 } - \omega _ { t } \right\| ^ { 2 } } \\ & { = - \beta _ { t } \nabla _ { \omega } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) ^ { \top } \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) + \displaystyle \frac { L \beta _ { t } ^ { 2 } } { 2 } \left\| \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \right\| ^ { 2 } . } \end{array}
|
| 410 |
+
$$
|
| 411 |
+
|
| 412 |
+
where $\omega _ { t + 1 } - \omega _ { t } = - \beta _ { t } \nabla _ { \omega } J _ { \pi } \big ( \alpha _ { t + 1 } ( \omega _ { t } ) \big )$ , and the first inequality holds according to Lemma D.1. For the second term in (25),
|
| 413 |
+
|
| 414 |
+
$$
|
| 415 |
+
\begin{array} { r l } & { \quad \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) - \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) } \\ & { \le \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) ^ { \top } ( \alpha _ { t + 1 } - \alpha _ { t } ) + \displaystyle \frac { L } { 2 } \| \alpha _ { t + 1 } - \alpha _ { t } \| ^ { 2 } } \\ & { = - \eta _ { t } \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) ^ { \top } \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) + \displaystyle \frac { L \eta _ { t } ^ { 2 } } { 2 } \| \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \| ^ { 2 } } \\ & { = - ( \eta _ { t } - \frac { L \eta _ { t } ^ { 2 } } { 2 } ) \| \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \| ^ { 2 } . } \end{array}
|
| 416 |
+
$$
|
| 417 |
+
|
| 418 |
+
where $\alpha _ { t + 1 } - \alpha _ { t } = - \eta _ { t } \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } )$ , and the first inequality holds according to Lemma (D.1). Therefore, (25) becomes
|
| 419 |
+
|
| 420 |
+
$$
|
| 421 |
+
\begin{array} { r l } & { \quad \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) - \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) } \\ & { \leq - \beta _ { t } \nabla _ { \omega } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) ^ { \top } \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) + \frac { L \beta _ { t } ^ { 2 } } { 2 } \left\| \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \right\| ^ { 2 } } \\ & { \quad - \left( \eta _ { t } - \frac { L \eta _ { t } ^ { 2 } } { 2 } \right) \left\| \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \right\| ^ { 2 } . } \end{array}
|
| 422 |
+
$$
|
| 423 |
+
|
| 424 |
+
Taking expectation of both sides of (28) and rearranging the terms, we obtain
|
| 425 |
+
|
| 426 |
+
$$
|
| 427 |
+
\begin{array} { r l } & { \quad \eta _ { t } \mathbb { E } \left[ \left\| \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \right\| ^ { 2 } \right] + \beta _ { t } \mathbb { E } \left[ \left\| \nabla _ { \omega } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) \right\| \cdot \left\| \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \right\| \right] } \\ & { \leq \mathbb { E } \left[ \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \right] - \mathbb { E } \left[ \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) \right] + \frac { L \beta _ { t } ^ { 2 } } { 2 } \mathbb { E } \left[ \left\| \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \right\| ^ { 2 } \right] } \\ & { \quad + \frac { L \eta _ { t } ^ { 2 } } { 2 } \mathbb { E } \left[ \left\| \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \right\| ^ { 2 } \right] . } \end{array}
|
| 428 |
+
$$
|
| 429 |
+
|
| 430 |
+
Summing up both sides of (29) from $t = 1$ to $\infty$
|
| 431 |
+
|
| 432 |
+
$$
|
| 433 |
+
\begin{array} { r l } & { \displaystyle \sum _ { t = 1 } ^ { \infty } \eta _ { t } \mathbb { E } \left[ \| \nabla _ { \alpha } \mathcal { L } _ { \mathfrak { a u } } ( \alpha _ { t } ; \omega _ { t } ) \| ^ { 2 } \right] + \displaystyle \sum _ { t = 1 } ^ { \infty } \beta _ { t } \mathbb { E } \left[ \| \nabla _ { \omega } \mathcal { L } _ { \mathfrak { a u } } ( \alpha _ { t + 1 } ; \omega _ { t } ) \| \cdot \| \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \| \right] } \\ & { \le \mathbb { E } \left[ \mathcal { L } _ { \mathfrak { a u } } ( \alpha _ { 1 } ; \omega _ { 1 } ) \right] - \displaystyle \operatorname* { l i m } _ { t \to \infty } \mathbb { E } \left[ \mathcal { L } _ { \mathfrak { a u } } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) \right] + \displaystyle \sum _ { t = 1 } ^ { \infty } \frac { L \beta _ { t } ^ { 2 } } { 2 } \mathbb { E } \left[ \| \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \| ^ { 2 } \right] } \\ & { \quad + \displaystyle \sum _ { t = 1 } ^ { \infty } \frac { L \eta _ { t } ^ { 2 } } { 2 } \mathbb { E } \left[ \| \nabla _ { \alpha } \mathcal { L } _ { \mathfrak { a u } } ( \alpha _ { t } ; \omega _ { t } ) \| ^ { 2 } \right] } \\ & { \le \displaystyle \sum _ { t = 1 } ^ { \infty } \frac { L ( \eta _ { t } ^ { 2 } + \beta _ { t } ^ { 2 } ) \rho ^ { 2 } } { 2 } + \mathbb { E } \left[ \mathcal { L } _ { \mathfrak { a u } } ( \alpha _ { 1 } ; \omega _ { 1 } ) \right] \le \infty , } \end{array}
|
| 434 |
+
$$
|
| 435 |
+
|
| 436 |
+
where the second inequality holds for $\textstyle \sum _ { t = 1 } ^ { \infty } \eta _ { t } ^ { 2 } \leq \infty$ , $\textstyle \sum _ { t = 1 } ^ { \infty } \beta _ { t } ^ { 2 } \ \leq \ \infty$ , $\| \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \| \le \rho$ $\lVert \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \rVert \leq \bar { \rho }$ . Since
|
| 437 |
+
|
| 438 |
+
$$
|
| 439 |
+
\sum _ { t = 1 } ^ { \infty } \beta _ { t } \mathbb { E } \left[ \| \nabla _ { \omega } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t + 1 } ; \omega _ { t } ) \| \cdot \| \nabla _ { \omega } J _ { \pi } ( \alpha _ { t + 1 } ( \omega _ { t } ) ) \| \right] \leq L \rho \sum _ { t = 1 } ^ { \infty } \beta _ { t } \leq \infty .
|
| 440 |
+
$$
|
| 441 |
+
|
| 442 |
+
Therefore, we have
|
| 443 |
+
|
| 444 |
+
$$
|
| 445 |
+
\sum _ { t = 1 } ^ { \infty } \eta _ { t } \mathbb { E } \left[ \left\| \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \right\| ^ { 2 } \right] < \infty .
|
| 446 |
+
$$
|
| 447 |
+
|
| 448 |
+
Since $| ( \| a \| + \| b \| ) ( \| a \| - \| b \| ) | \leq \| a + b \| \| a - b \|$ , we can derive that
|
| 449 |
+
|
| 450 |
+
$$
|
| 451 |
+
\begin{array} { r l } & { \left| \mathbb { E } \left[ \left\| \nabla _ { \alpha } \alpha _ { \alpha } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) \right\| ^ { 2 } \right] - \mathbb { E } \left[ \left\| \nabla _ { \alpha } \alpha _ { \alpha } ( \alpha _ { t } ; \omega _ { t + 1 } ) \right\| ^ { 2 } \right] \right| } \\ & { = \mathbb { E } \left[ \left( \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) \right\| + \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t + 1 } ) \right\| \right) + \left( \mathbb { E } \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) \right) \right] - \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t + 1 } ) \right\| } \\ & { \leq \mathbb { E } \left[ \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) \right\| + \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t + 1 } ) \right\| \right] \left\| \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t + 1 } ; \omega _ { t + 1 } ) \right\| - \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t } ) \right\| \right] \right| } \\ & { \leq \mathbb { E } \left[ \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) + \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t } ) \right\| \right] \cdot \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t + 1 } ) - \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t } ) \right\| \right] } \\ & \leq \mathbb { E } \left[ \left( \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) \right\| + \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ { t + 1 } ) \right\| \right) \left\| \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t + 1 } ; \omega _ { t + 1 } ) - \nabla _ { \alpha } C _ { \alpha } ( \alpha _ { t } ; \omega _ \end{array}
|
| 452 |
+
$$
|
| 453 |
+
|
| 454 |
+
$\textstyle \sum _ { t = 1 } ^ { \infty } \eta _ { t } = \infty$
|
| 455 |
+
|
| 456 |
+
$$
|
| 457 |
+
\operatorname* { l i m } _ { t \to \infty } \mathbb { E } \left[ \| \nabla _ { \alpha } \mathcal { L } _ { \mathrm { a t t } } ( \alpha _ { t } ; \omega _ { t } ) \| ^ { 2 } \right] = 0 .
|
| 458 |
+
$$
|
| 459 |
+
|
| 460 |
+
# E DETAILS OF PBRL
|
| 461 |
+
|
| 462 |
+
In this section, we present details of the scripted teacher and preference collection. It is a crucial part of the PbRL, and BATTLE follows these settings as Lee et al. (2021a).
|
| 463 |
+
|
| 464 |
+
Scripted Teacher. To evaluate the performance systemically, a useful way is to consider a scripted teacher that provides preferences between a pair of agent’s trajectory segments according to the oracle reward function. Leveraging the preference labels from the human teacher is ideal, while it is hard to evaluate algorithms quantitatively and quickly. Specifically, the scripted teacher can immediately provide ground truth rewards based on the state s and action a. It is a function designed to approximate the human’s intention.
|
| 465 |
+
|
| 466 |
+
Preference Collection. During training, we need to query human preference labels at regular intervals. It samples a batch of segment pairs and calculates the cumulative reward of each segment with rewards provided by the scripted teacher. For a specific segment pair, human prefers the segment with a larger cumulative reward. The segment with a larger cumulative reward is labelled with 1, and the smaller one is labelled with 0. As for the computational cost, we assume that $M$ preference labels are required, the segment length is $N$ in a run, and the time complexity is $\mathcal { O } ( M N )$ . However, it is negligible compared with adversary training, which involves complex gradient computation.
|
| 467 |
+
|
| 468 |
+
# F EXPERIMENTAL DETAILS
|
| 469 |
+
|
| 470 |
+
In this section, we provide a concrete description of our experiments and detailed hyper-parameters of BATTLE. For each run of experiments, we run on a single Nvidia Tesla V100 GPUs and 16 CPU cores (Intel Xeon Gold 6230 CPU $\textcircled { a } 2 . 1 0 \mathrm { G H z }$ ) for training.
|
| 471 |
+
|
| 472 |
+
# F.1 TASKS
|
| 473 |
+
|
| 474 |
+
In phase one of our experiments, we evaluate our method on eight robotic manipulation tasks obtained from Meta-world (Yu et al., 2020). These tasks serve as a representative set for testing the effectiveness of our approach. In phase two, we further assess our method on two locomotion tasks sourced from Mujoco (Todorov et al., 2012). By including tasks from both domains, we aim to demonstrate the versatility and generalizability of our approach across different task types. The specific tasks we utilize in our experiments are as follows:
|
| 475 |
+
|
| 476 |
+
# Meta-world
|
| 477 |
+
|
| 478 |
+
• Door Lock: An agent controls a simulated Sawyer arm to lock the door.
|
| 479 |
+
• Door Unlock: An agent controls a simulated Sawyer arm to unlock the door.
|
| 480 |
+
• Drawer Open: An agent controls a simulated Sawyer arm to open the drawer to a target position.
|
| 481 |
+
• Drawer Close: An agent controls a simulated Sawyer arm to close the drawer to a target position.
|
| 482 |
+
• Faucet Open: An agent controls a simulated Sawyer arm to open the faucet to a target position.
|
| 483 |
+
• Faucet Close: An agent controls a simulated Sawyer arm to close the faucet to a target position.
|
| 484 |
+
• Window Open: An agent controls a simulated Sawyer arm to open the window to a target position.
|
| 485 |
+
• Window Close: An agent controls a simulated Sawyer arm to close the window to a target position.
|
| 486 |
+
|
| 487 |
+
#
|
| 488 |
+
|
| 489 |
+
• Half Cheetah: A 2-dimensional robot with nine links and eight joints aims to learn to run forward (right) as fast as possible. • Walker: A 2-dimensional two-legged robot aims to move in the forward (right).
|
| 490 |
+
|
| 491 |
+
# F.2 HYPER-PARAMETERS SETTING
|
| 492 |
+
|
| 493 |
+
We adopt the PEBBLE algorithm as our baseline approach for SA-RL (Zhang et al., 2021), and we keep the same parameter settings and neural network structure as described in their work. The specific hyperparameters for SA-RL are provided in Table 4. Similarly, for PA-AD (Sun et al., 2022), we use identical hyperparameter values to those of SA-RL, ensuring a fair comparison between the two methods.
|
| 494 |
+
|
| 495 |
+
Table 3: Hyper-parameters of BATTLE for adversary training.
|
| 496 |
+
|
| 497 |
+
<table><tr><td>Hyper-parameter</td><td>Value</td><td> Hyper-parameter</td><td>Value</td></tr><tr><td>Number of layers</td><td>3</td><td>Hidden units of each layer</td><td>256 1024</td></tr><tr><td>Learning rate</td><td>0.0003 50</td><td>Batch size Number of reward functions</td><td>3</td></tr><tr><td>Length of segment</td><td></td><td></td><td>128</td></tr><tr><td>Frequency of feedback</td><td>5000</td><td>Feedback batch size</td><td></td></tr><tr><td>Adversarial budget</td><td>0.1</td><td>(β1,β2)</td><td>(0.9,0.999)</td></tr></table>
|
| 498 |
+
|
| 499 |
+
Table 4: Hyper-parameters of SA-RL for adversary training.
|
| 500 |
+
|
| 501 |
+
<table><tr><td>Hyper-parameter</td><td>Value</td><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Number of layers</td><td>3</td><td>Hidden units of each layer</td><td>256</td></tr><tr><td>Learning rate</td><td>0.00005</td><td>Mini-Batch size</td><td>32</td></tr><tr><td>Length of segment</td><td>50</td><td>Number of reward functions</td><td>3</td></tr><tr><td>Frequency of feedback</td><td>5000</td><td>Feedback batch size</td><td>128</td></tr><tr><td>Adversarial budget</td><td>0.1</td><td>Entropy coefficient</td><td>0.0</td></tr><tr><td>Clipping parameter</td><td>0.2</td><td>Discount γ</td><td>0.99</td></tr><tr><td>GAE lambda</td><td>0.95</td><td>KL divergence target</td><td>0.01</td></tr></table>
|
| 502 |
+
|
| 503 |
+
# F.3 VICTIM SETTING
|
| 504 |
+
|
| 505 |
+
Our experiment is divided into two phases. In the first phase, we conduct experiments using a variety of simulated robotic manipulation tasks from the Meta-world environment. In the second phase, we shift our focus to two continuous control environments from the OpenAI Gym MuJoCo suite.
|
| 506 |
+
|
| 507 |
+
Meta-world. We train the victim models on the Meta-world tasks using the SAC (Soft Actor-Critic) algorithm proposed by Haarnoja et al. (2018). We employ a fully connected neural network as the
|
| 508 |
+
|
| 509 |
+
policy network for the SAC algorithm. The detailed hyperparameters used in our experiments are provided in Table 5.
|
| 510 |
+
|
| 511 |
+
Table 5: Hyper-parameters of SAC for victim training.
|
| 512 |
+
|
| 513 |
+
<table><tr><td>Hyper-parameter</td><td>Value</td><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Number of layers</td><td>3</td><td> Initial temperature</td><td>0.1</td></tr><tr><td>Hidden units of each layer</td><td>256</td><td>Optimizer</td><td>Adam</td></tr><tr><td>Learning rate</td><td>0.0001</td><td>Critic target update freq</td><td>2</td></tr><tr><td>Discount γ</td><td>0.99</td><td>Critic EMA T</td><td>0.005</td></tr><tr><td>Batch size</td><td>1024</td><td>(β1,β2)</td><td>(0.9,0.999)</td></tr><tr><td>Steps of unsupervised pre-training</td><td>9000</td><td>Discount γ</td><td>0.99</td></tr></table>
|
| 514 |
+
|
| 515 |
+
Mujoco. We directly utilize the well-trained model for demonstrating the vulnerability of the Decision Transformer. Specifically, we use the Cheetah agent4 and the Walker agent5 with expert-level.
|
| 516 |
+
|
| 517 |
+
# F.4 SCENARIO DESIGNING
|
| 518 |
+
|
| 519 |
+
To validate the effectiveness of our approach, we carefully designed two experimental scenarios: the Manipulation Scenario and the Opposite Behavior Scenario. In the Manipulation Scenario, the victim policy is a well-trained policy on robotic tasks. The objective of the adversary is to manipulate the agent’s behavior through targeted adversarial attacks, causing the agent to grasp objects that are far from the original target location. The successful execution of such grasping actions indicates the success of the adversarial attack. In the Opposite Behavior Scenario, the victim policy is a well-trained policy on simulated robotic manipulation tasks. The goal of the attacker is to redirect the agent’s behavior towards tasks that are opposite in nature to the original objective. For instance, if the victim policy is designed to open windows, the attacker aims to modify the agent’s behavior to close the windows instead.
|
| 520 |
+
|
| 521 |
+
Table 6: Success rate of different methods with varying numbers of preference labels on the Drawer Open task in the manipulation scenario and the Faucet Close task in the opposite behavior scenario. The success rate is reported as the mean and standard deviation over 30 episodes.
|
| 522 |
+
|
| 523 |
+
<table><tr><td>Environment</td><td>Feedback</td><td>BATTLE (ours)</td><td>PA-AD</td><td>SA-RL</td></tr><tr><td rowspan="4">Drawer Open (manipulation)</td><td>3000</td><td>65.7%±37.1%</td><td>0.0%±0.0%</td><td>8.3%±13.2%</td></tr><tr><td>5000</td><td>86.7% ±18.1%</td><td>0.0%±0.0%</td><td>21.3%± 18.9%</td></tr><tr><td>7000</td><td>95.7% ±13.6%</td><td>0.0%±0.0%</td><td>28.0%± 28.1%</td></tr><tr><td>9000</td><td>97.0%±6.9%</td><td>0.0%±0.0%</td><td>13.0%±18.5%</td></tr><tr><td rowspan="4">Faucet Close (opposite behavior)</td><td>1000</td><td>69.7% ±35.2%</td><td>16.7% ± 9.4%</td><td>2.0%±6.0%</td></tr><tr><td>3000</td><td>79.0% ±16.2%</td><td>29.0% ±14.0%</td><td>6.0%± 11.7%</td></tr><tr><td>5000</td><td>95.3%±9.2%</td><td>21.3%±12.8%</td><td>3.3% ± 12.7%</td></tr><tr><td>7000</td><td>95.3%± 7.6%</td><td>22.7%±12.4%</td><td>4.0%± 7.1%</td></tr></table>
|
| 524 |
+
|
| 525 |
+
# G EXTENSIVE EXPERIMENTS
|
| 526 |
+
|
| 527 |
+
Impact of Feedback Amount. We evaluate the performance of BATTLE using different numbers of preference labels. Table 6 presents the results of all methods with varying numbers of labels: 3000, 5000, 7000, 9000 for the Drawer Open task in the manipulation scenario and 1000, 3000, 5000, 7000 for the Faucet Close task in the opposite behavior scenario. Based on the experimental results shown in Table 6, we conclude that providing an adequate amount of human feedback improves the performance of our method, leading to a stronger adversary and a more stable attack success rate. We observe that the performance of BATTLE consistently improves as the number of preference labels increases, highlighting the crucial impact of the number of preference labels on adversary learning. In contrast, SA-RL and PA-AD exhibit poor performance even with a sufficient amount of human feedback, with PA-AD failing entirely in the manipulation scenario. This can be attributed to the limited exploration space of these methods, which is constrained by the fixed victim policy. In contrast, BATTLE achieves better exploration by incorporating an intention policy, resulting in improved performance.
|
| 528 |
+
|
| 529 |
+

|
| 530 |
+
Figure 8: Training curves of success rate with different adversarial budgets on Drawer Open for the manipulation scenario and Faucet Close for the opposite behavior scenario. The solid line and shaded area denote the mean and the standard deviation of the success rate across five runs.
|
| 531 |
+
|
| 532 |
+

|
| 533 |
+
Figure 9: Time series of the normalized learned reward (blue) and the ground truth reward (orange). These rewards are obtained from rollouts generated by a policy optimized using BATTLE.
|
| 534 |
+
|
| 535 |
+
Impact of Different Attack Budgets. We also investigate the impact of the attack budget on the performance. To gain further insights, we conduct additional experiments with different attack budgets: 0.05, 0.075, 0.1, 0.15 for the Drawer Open task and 0.02, 0.05, 0.075, 0.1 for the Faucet Close task in the respective scenarios. In Figure 8, we present the performance of the baseline method and BATTLE with different attack budgets. The experimental results demonstrate that the performance of all methods improves with an increase in the attack budget.
|
| 536 |
+
|
| 537 |
+
Quality of learned reward functions. We further analyze the quality of the reward functions learned by BATTLE compared to the true reward function. In Figure 9, we present four time series plots that depict the normalized learned reward (blue) and the ground truth reward (orange). These plots represent two scenarios: opposite behaviors and manipulation tasks. The results indicate that the learned reward function aligns well with the true reward function derived from human feedback. This alignment is achieved by capturing various human intentions through the preference data.
|
| 538 |
+
|
| 539 |
+
Robust Agents Training and Evaluating. An intuitive application of BATTLE is in evaluating the robustness of a given model or enhancing the robustness of an agent through adversarial training. ATLA (Zhang et al., 2021) is a general training framework for improving robustness, which involves alternating training between an agent and an adversary. Building upon this concept, we introduce BATTLE-ATLA, which combines BATTLE with the ATLA framework by training an agent and a BATTLE attacker alternately. The robustness performance of BATTLE-ATLA for a SAC agent is presented in Table 7 and compared with state-of-the-art robust training methods. The experimental results provide two key insights: firstly, BATTLE-ATLA significantly enhances the robustness of agents, demonstrating its effectiveness in improving agent resilience to adversarial attacks. Secondly, BATTLE exhibits the capability to launch stronger attacks on robust agents, highlighting its effectiveness as an adversary in the adversarial training process.
|
| 540 |
+
|
| 541 |
+
Table 7: Average episode rewards $\pm$ standard deviation of robust agents under different attack methods, and results are averaged across 100 episodes.
|
| 542 |
+
|
| 543 |
+
<table><tr><td>Task</td><td>Model</td><td>BATTLE</td><td>PA-AD</td><td>SA-RL</td><td>Average Reward</td></tr><tr><td rowspan="3">Door Lock</td><td>BATTLE-ATLA</td><td>874±444</td><td>628±486</td><td>503±120</td><td>668</td></tr><tr><td>PAAD-ATLA</td><td>491±133</td><td>483±15</td><td>517±129</td><td>497</td></tr><tr><td>SARL-ATLA</td><td>469±11</td><td>629±455</td><td>583±173</td><td>545</td></tr><tr><td rowspan="3">Door Unlock</td><td>BATTLE-ATLA</td><td>477±203</td><td>745±75</td><td>623±60</td><td>615</td></tr><tr><td>PAAD-ATLA</td><td>398±12</td><td>381±11</td><td>398±79</td><td>389</td></tr><tr><td>SARL-ATLA</td><td>393±36</td><td>377±8</td><td>385±26</td><td>385</td></tr><tr><td rowspan="3">Faucet Open</td><td>BATTLE-ATLA</td><td>442±167</td><td>451±96</td><td>504±55</td><td>465</td></tr><tr><td>PAAD-ATLA</td><td>438±53</td><td>588±222</td><td>373±32</td><td>466</td></tr><tr><td>SARL-ATLA</td><td>610±293</td><td>523±137</td><td>495±305</td><td>522</td></tr><tr><td rowspan="3">Faucet Close</td><td>BATTLE-ATLA</td><td>1048±343</td><td>1223±348</td><td>570±453</td><td>947</td></tr><tr><td>PAAD-ATLA</td><td>661±279</td><td>371±65</td><td>704±239</td><td>538</td></tr><tr><td>SARL-ATLA</td><td>1362±149</td><td>688±196</td><td>426±120</td><td>825</td></tr></table>
|
parse/test/rp5vfyp5Np/rp5vfyp5Np_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/rp5vfyp5Np/rp5vfyp5Np_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/rp5vfyp5Np/rp5vfyp5Np_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/rzQGHXNReU/rzQGHXNReU.md
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RAFT: Adapting Language Model to Domain Specific RAG
|
| 2 |
+
|
| 3 |
+
Tianjun Zhang \*
|
| 4 |
+
Department of Computer Science
|
| 5 |
+
UC Berkeley
|
| 6 |
+
Berkeley, CA 94720, USA
|
| 7 |
+
{tianjunz}@berkeley.edu
|
| 8 |
+
Shishir G. Patil, Naman Jain, Sheng Shen
|
| 9 |
+
Department of Computer Science
|
| 10 |
+
UC Berkeley
|
| 11 |
+
Berkeley, CA 94720, USA
|
| 12 |
+
{shishirpatil,naman_jain,sheng.s}@berkeley.edu
|
| 13 |
+
Matei Zaharia, Ion Stoica, Joseph E. Gonzalez
|
| 14 |
+
Department of Computer Science
|
| 15 |
+
UC Berkeley
|
| 16 |
+
Berkeley, CA 94720, USA
|
| 17 |
+
{matei,istoica,jegonzal}@berkeley.edu
|
| 18 |
+
|
| 19 |
+
# Abstract
|
| 20 |
+
|
| 21 |
+
Pretraining Large Language Models (LLMs) on large corpora of textual data is now a standard paradigm. When using these LLMs for many downstream applications, it is common to additionally incorporate new information into the pretrained model either through RAG-based-prompting, or finetuning. However, the best methodology to incorporate information remains an open question. In this paper, we present Retrieval Augmented Fine Tuning (RAFT), a training recipe which improves the model’s ability to answer questions in "open-book" in-domain settings. In training RAFT, given a question, and a set of retrieved documents, we train the model to ignore those documents that don’t help in answering the question, which we call, distractor documents. RAFT accomplishes this by citing verbatim the right sequence from the relevant document to help answer the question. This coupled with RAFT’s chain-of-thought-style response helps improve the model’s ability to reason. In domain specific RAG, RAFT consistently improves the model’s performance across PubMed, HotpotQA, and Gorilla datasets, presenting a post-training recipe to improve pre-trained LLMs to in-domain RAG.
|
| 22 |
+
|
| 23 |
+
# 1 Introduction
|
| 24 |
+
|
| 25 |
+
Trained on vast quantities of public data, Large Language Models LLMs have achieved significant advances in a wide range of general knowledge reasoning tasks Brown et al. (2020); Wei et al. (2022). However, increasingly LLMs are being employed in specialized domains to support tasks ranging from code completion for specific software frameworks to question answering on specific document collections (e.g., legal or medical documents). In these settings, general knowledge reasoning is less critical and instead the primary goal is to maximize accuracy based on a given set of documents. Indeed, adapting LLMs to the specialized domains (e.g., recent news, enterprise private documents, or program resources constructed after the training cutoff) is essential to many emerging applications (Vu et al., 2023; Lazaridou et al., 2022) and is the focus of this work.
|
| 26 |
+
|
| 27 |
+
This paper studies the following question – How do we adapt pre-trained LLMs for Retrieval Augmented Generation (RAG) in specialized domains?
|
| 28 |
+
|
| 29 |
+
When it comes to adapting LLMs to specialized domains, we consider the following two candidates: in-context learning through Retrieval-Augmented Generation (RAG) and supervised fine-tuning. RAG based methods allow the LLM to reference the documents when answering questions. However, RAG based in-context learning methods fail to leverage the learning opportunity afforded by the fixed domain setting and early access to the test documents. Alternatively, supervised fine-tuning offers the opportunity to learn more general patterns in the documents and better align to end tasks and user preferences Zhou et al. (2023). However, existing fine-tuning based approaches either fail to leverage the documents at test time (don’t incorporate RAG) or fail to account for the imperfections in retrieval process during training.
|
| 30 |
+
|
| 31 |
+

|
| 32 |
+
Figure 1: How best to prepare for an Exam?(a) Fine-tuning based approaches implement "studying" by either directly "memorizing" the input documents or answering practice QA without referencing the documents. (b) Alternatively, in-context retrieval methods fail to leverage the learning opportunity afforded by the fixed domain and are equivalent to taking an open-book exam without studying. In contrast, our approach (c) RAFT leverages fine-tuning with question-answer pairs while referencing the documents in a simulated imperfect retrieval setting — thereby effectively preparing for the open-book exam setting.
|
| 33 |
+
|
| 34 |
+
We can draw an analogy to an open-book exam. Existing in-context retrieval methods are equivalent to taking an open-book exam without studying. Alternatively, existing finetuning based approaches implement “studying" by either directly “memorizing" Xiong et al. (2023) the input documents or answering practice questions Wang et al. (2022) without referencing the documents. While these approaches leverage in-domain learning they fail to prepare for the open-book nature of the test setting.
|
| 35 |
+
|
| 36 |
+
In this paper, we study how to combine instruction fine-tuning (IFT) with retrieval augmented generation (RAG). We propose a novel adaptation strategy – Retrieval-Augmented Fine Tuning (RAFT). RAFT specifically addresses the challenge of fine-tuning LLMs to both incorporate domain knowledge while also improving in-domain RAG performance. RAFT aims to not only enable models to learn domain-specific knowledge through fine-tuning, but also to ensure robustness against distracting retrieved information. This is achieved by training the models to understand the dynamics between the question (prompt), the domain-specific documents retrieved, and the right answer. Going back to our analogy to the open book exam, our approach is analogous to studying for an open-book exam by recognizing relevant, and irrelevant retrieved documents.
|
| 37 |
+
|
| 38 |
+
In RAFT, we train the model to answer the question (Q) from Document(s) $( \mathrm { D ^ { * } } )$ to generate answer $( \mathrm { A } ^ { * } )$ , where $\mathsf { A } ^ { * }$ includes chain-of-thought reasoning Wei et al. (2022); Anthropic (2023), and in the presence of distractor documents $( D _ { k } )$ . We explain the methodology in Section 3 and analyze the sensitivity to the number of distractor documents $( k )$ at train- and test- time in Section 5. RAFT consistently outperforms Supervised-finetuning both withand without- RAG across PubMed Dernoncourt & Lee (2017), HotPot QA Yang et al. (2018), and HuggingFace Hub, Torch Hub, and Tensorflow Hub Gorilla datasets Patil et al. (2023), presenting a novel, yet simple technique to improve pre-trained LLMs for in-domain RAG. Our code is available at https://github.com/ShishirPatil/gorilla.
|
| 39 |
+
|
| 40 |
+
# 2 LLMs for Open-Book Exam
|
| 41 |
+
|
| 42 |
+
To understand our goal better, we expand on our analogy between training an LLM with the real-world setting of prepararing for an exam.
|
| 43 |
+
|
| 44 |
+
Closed-Book Exam A closed book exam often refers to the scenario where the LLMs do not have access to any additional documents or references to answer the questions during the exam. For LLMs, this is equivalent to the scenario, for example, in which the LLM is used as a chatbot. In this scenario the LLM draws from the knowledge baked in during pre-training and supervised-finetuning to respond to the users’ prompt.
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
Figure 2: Overview of our RAFT method. The top-left figure depicts our approach of adapting LLMs to reading solution from a set of positive and distractor documents in contrast to standard RAG setup where models are trained based on the retriever outputs, which is a mixture of both memorization and reading. At test time, all methods follow the standard RAG setting, provided with a top-k retrieved documents in the context.
|
| 48 |
+
|
| 49 |
+
Open Book Exam In contrast, we liken the open-book exam setting to the scenario in which the LLM can refer to external sources of information (e.g., a website or a book chapter). In such scenarios, typically, the LLM is paired with retriever which retrieves $^ { \prime } \mathbf { k } ^ { \prime }$ documents (or specific segments of the document) which are appended to the users’ prompt. It is only through these documents retrieved that the LLM gains access to “domain-specific information”. As a result, we argue that the LLM’s performance in these settings, where it is trained as a general-purpose LLM is largely dependent on the quality of the retriever and how accurately the retriever can identify the most relevant piece of information.
|
| 50 |
+
|
| 51 |
+
Domain-Specific Open-Book Exam In this paper, we focus on the narrower but increasingly popular domain than the general open book exam, which we call the domain-specific open-book exam. Here, we know apriori the domain in which the LLM will be tested. The LLM can respond to the users’ prompt using use any and all information from this specific domain, which it has been fine-tuned on. Examples of domain specific examples include enterprise documents, code repositories belonging to an organization, etc. In all these scenarios, the LLM will be used to respond to the questions, whose answers can be found within a collection of documents. The retrieval technique itself has little to no-impact on the mechanism (though it may impact the accuracy). This paper studies the domain-specific open-book setting and how to adapt a pretrained LLM to this specific domain, including how to make it more robust to a varying number of retrieved documents and distractors.
|
| 52 |
+
|
| 53 |
+
# 3 RAFT
|
| 54 |
+
|
| 55 |
+
In this section, we present RAFT, a novel way of training LLMs for domain-specific openbook exams. We first introduce the classical technique of supervised fine-tuning, followed with the key takeaways from our experiments. Then, we introduce RAFT , a modified version of general instruction tuning. Lastly, we provide an overview of the experiments to expect in the later sections.
|
| 56 |
+
|
| 57 |
+
# Supervised Finetuning
|
| 58 |
+
|
| 59 |
+
Consider the supervised fine-tuning (SFT) setting for a Question-Answer dataset. The formulation consists of the Dataset $( \bar { D } )$ from which a set of Question (Q) and corresponding answer $( A )$ pairs are derived or already available. In the classical SFT setting, the model is trained to improve it’s ability to answer the questions based on it’s knowledge - obtained either during pre-training, or during the SFT training phase. The model so trained can also
|
| 60 |
+
|
| 61 |
+
Figure 3: RAFT prompt to help LLM evaluate its own generated reasoning and answers, contrasting them with the correct reasoning and answers. The LLM is prompted to identify errors in its reasoning and extract key insights for improvement. This figure specifically represents the ‘GenerateExplanation‘ step in the RAFT algorithm (Section 3).
|
| 62 |
+
|
| 63 |
+
be used at test-time with Retrieval Augmented Generation (RAG) setting, where additional documents can be introduced in the prompt to help the model answer the question. This can be represented as follows:
|
| 64 |
+
|
| 65 |
+
{Train: $\mathbf Q \to \mathbf A _ { \mathrm { j } } ^ { \prime }$ , {0-shot Inference: $\mathbf Q \to \mathbf A \}$ , {RAG Inference: $\mathbf { Q } + \mathbf { D } \mathbf { A } \}$
|
| 66 |
+
|
| 67 |
+
RAFT: Retrieval Augmented Fine-Tuning (RAFT), presents a novel recipe to prepare finetuning data to tailor the models for domain-specific open-book setting, equivalent to indomain RAG In RAFT, we prepare the training data such that each data point contains a question $( Q )$ , a set of documents $( D _ { k } )$ , and a corresponding Chain-of-though style answer $( \hat { \boldsymbol { A } } ^ { * } )$ generated from one of the document $( D ^ { * } )$ . We differentiate between two types of documents: ‘golden’ documents $( D * )$ i.e. the documents from which the answer to the question can be deduced, and ‘distractor’ documents $( D _ { i } )$ that do not contain answerrelevant information. As an implementation detail, the ‘golden’ document doesn’t need to be a single document, but can be more than one document, as is the case in HotpotQA Yang et al. (2018). Then, for $P$ fraction of the questions $( q _ { i } )$ in the dataset, we retain the golden document $( d _ { i } ^ { * } )$ along with distractor documents $( d _ { k - 1 } )$ . For $( 1 - P )$ fraction of the questions $( q _ { i } )$ in the dataset, we include no golden document and only include distractor documents $( d _ { k } )$ . We then fine-tune the language model using standard supervised training (SFT) technique, training it to generate answers from the provided documents and question. Fig. 2 illustrates the high-level design principal for RAFT .
|
| 68 |
+
|
| 69 |
+
We demonstrate that our RAG approach trains the model to perform better RAG on the set of documents it is trained on i.e., in-domain. By removing the golden documents in some instances, we are compelling the model to memorize answers instead of deriving them from the context. The training data for RAFT is as follows, and an example training data can be seen in Fig. 3:
|
| 70 |
+
|
| 71 |
+
$\mathbf { P } \%$ of data: $\mathbf { Q } + \mathbf { D } ^ { * } + \mathbf { D } _ { 1 } + \mathbf { D } _ { 2 } + \ldots + \mathbf { D } _ { k } \mathbf { A } *$ $( 1 - \mathbf { P } ) \%$ of data: $\mathbf { Q } + \mathbf { D } _ { 1 } + \mathbf { D } _ { 2 } + \ldots + \mathbf { D } _ { k } \mathbf { A } *$
|
| 72 |
+
|
| 73 |
+
Subsequently, for the test scenario, the model is provided with the Q and top-k documents retrieved by the RAG pipeline. Note that RAFT is independent of the retriever used.
|
| 74 |
+
|
| 75 |
+
A key factor in enhancing training quality is the generation of a reasoning process, such as Chain-of-Thought, to explain the provided answers. RAFT approach is similar: we demonstrate that creating a full reasoning chain and in-addition, clearly citing sources enhances the model’s accuracy in answering questions. In Fig. 3, we illustrate this setup. Generating the training data in this fashion, involves presenting the model with a question, context, and verified answers, and then requesting it to form a reasoning chain that appropriately references the original context.
|
| 76 |
+
|
| 77 |
+
For all the datasets in our experiments, we generate the answers using the technique described above. Note that the Gorilla APIBench dataset, already includes reasoning in the answers. We provide an example of the generation step in Fig. 3, the detailed reasoning answer includes a citation from the original context inside ##begin_quote## and ##end_quote## as well as the detailed explanation on how to reach the conclusion based on the citations. We demonstrate that adding detailed reasoning paragraphs can help boost the model’s performance in our experiment section.
|
| 78 |
+
|
| 79 |
+
Table 1: RAFT improves RAG performance for all specialized domains: Across PubMed, HotPot, HuggingFace, Torch Hub, and Tensorflow Hub, we see that Domain-specific Finetuning improves significantly of the performance of the base model, RAFT consistently outperforms the existing domain-specific finetuning method with or without RAG. This suggests the need to train the model with context. We compare our model with LLaMA finetuning receipes, and provide GPT-3.5 for reference.
|
| 80 |
+
|
| 81 |
+
<table><tr><td></td><td>PubMed</td><td>HotPot</td><td>HuggingFace</td><td>Torch Hub</td><td>TensorFlow</td></tr><tr><td>GPT-3.5 + RAG</td><td>71.60</td><td>41.5</td><td>29.08</td><td>60.21</td><td>65.59</td></tr><tr><td>LLaMA2-7B</td><td>56.5</td><td>0.54</td><td>0.22</td><td>0</td><td>0</td></tr><tr><td>LLaMA2-7B + RAG</td><td>58.8</td><td>0.03</td><td>26.43</td><td>08.60</td><td>43.06</td></tr><tr><td>DSF</td><td>59.7</td><td>6.38</td><td>61.06</td><td>84.94</td><td>86.56</td></tr><tr><td>DSF + RAG</td><td>71.6</td><td>4.41</td><td>42.59</td><td>82.80</td><td>60.29</td></tr><tr><td>RAFT (LLaMA2-7B)</td><td>73.30</td><td>35.28</td><td>74.00</td><td>84.95</td><td>86.86</td></tr></table>
|
| 82 |
+
|
| 83 |
+
# 4 Evaluation
|
| 84 |
+
|
| 85 |
+
We design our experiments to study how well RAFT performs compared to various baselines. We find that the RAFT-7B model (a finetuned version of LlaMA-2) is better at reading and extracting information from in-domain documents, than domain-specific finetuned model, and general-purpose model with RAG. As an ablation, we also demonstrate how important it is for the model to learn with Chain-of-Thought responses. In this section, we will first introduce all the datasets we used in the experiments, then all the baseline model/fine-tuning techniques that we benchmark against.
|
| 86 |
+
|
| 87 |
+
Datasets In our experiments, we use the following datasets to evaluate our model and all baselines. We selected these datasets to represent both popular and diverse domains including Wikipedia, Coding/API documents, and question-answering on medical documents. Natural Questions (NQ) Kwiatkowski et al. (2019), Trivia QA Joshi et al. (2017) and HotpotQA Yang et al. (2018) are the open-domain question-answers based on Wikipedia, mainly focused on common knowledge (e.g., movies, sports, etc). HuggingFace, Torch Hub, and TensorFlow Hub are from the APIBench Patil et al. (2023) proposed in the Gorilla paper. These benchmarks measure how to generate the correct, functional, and executable API calls based on the documentation. PubMed QA Jin et al. (2019) is a question-answering dataset tailored only for biomedical-research question-answering. It mainly focuses on answering medical and biology questions based on a given set of documents. We would like to highlight that $( \mathrm { N Q } ,$ Trivia $\{ \hat { \mathrm { Q A } } ,$ and HotpotQA) are relatively general domain whereas the latter two domains are on domain-specific documents.
|
| 88 |
+
|
| 89 |
+
Baselines We consider the following baselines for our experiments:
|
| 90 |
+
|
| 91 |
+
• LlaMA2-7B-chat model with 0-shot prompting: this is the commonly used instruction-finetuned model for QA tasks, where we provide clearly written instructions, but no reference documentation.
|
| 92 |
+
• LlaMA2-7B-chat model with RAG (Llama2 $^ +$ RAG): similar to the previous setting, except here we include reference documents. This is a popular technique when dealing with domain-specific QA tasks. Domain-Specific Finetuning with 0-shot prompting (DSF): Standard supervisedfinetuning, without documents in context. We find that its mostly useful to align the answering style of the model as well as get familiar with the domain context.
|
| 93 |
+
Domain-Specific Finetuning with RAG $( \mathrm { D S F } + \mathrm { R A G } )$ ): Equip a domain-specific finetuned-model with external knowledge using RAG. So, for the “knowledge” the model does not know, it can still refer to the context.
|
| 94 |
+
|
| 95 |
+
Table 2: Ablation on Chain-of-Thought: The numbers of RAFT and RAFT without CoT. Results on various datasets show that adding CoT can significantly improve the performance of the finetuned model. With a gains of $9 . 6 6 \%$ and $1 \bar { 4 } . 9 3 \%$ in the Hotpot QA and HuggingFace datasets respectively.
|
| 96 |
+
|
| 97 |
+
<table><tr><td></td><td>PubMed</td><td>HotpotQA</td><td>HuggingFace</td><td>Torch Hub</td><td>TensorFlow</td></tr><tr><td>RAFT w.0 CoT</td><td>68.30</td><td>25.62</td><td>59.07</td><td>86.56</td><td>83.21</td></tr><tr><td>RAFT</td><td>73.30</td><td>35.28</td><td>74.00</td><td>84.95</td><td>86.86</td></tr></table>
|
| 98 |
+
|
| 99 |
+
# 4.1 Results
|
| 100 |
+
|
| 101 |
+
Using the above datasets and baselines, we evaluate our model RAFT and demonstrate the effectiveness of RAFT in Tab. 1. We see that RAFT consistently and significantly outperforms the baselines. Compared with the base Llama-2 instruction-tuned model, RAFT with RAG does much better in terms of extracting information as well as being robust towards distractors. The gain can be as big as $3 5 . 2 5 \%$ on Hotpot QA and $7 6 . 3 5 \%$ on Torch Hub evaluation. Compared with DSF on the specific dataset, our model does better at relying on the provided context to solve the problem. RAFT does much better on the tasks like Hotpot and HuggingFace datasets $( 3 0 . { \bar { 8 } } 7 \%$ on Hotpot and $3 1 . 4 1 \%$ on HuggingFace). Note that for PubMed QA, since it is a binary yes/no question, we don’t observe significant gains when we compare our model with $\mathrm { D } \mathbf { \dot { S } } \mathbf { \dot { F } } + \mathbf { R } \mathbf { A } \mathbf { G }$ . Even compared with a much larger and better model GPT-3.5, RAFT demonstrates significant advantages.
|
| 102 |
+
|
| 103 |
+
Overall, the LLaMA-7B model, both with and without the RAG, performs poorly due to its answering style not aligning with the ground truth. By applying domain-specific tuning, we significantly enhance its performance. This process enables the model to learn and adopt the appropriate style of answering. However, introducing RAG to a domain-specifically fine-tuned (DSF) model doesn’t invariably lead to better outcomes. This might indicate that the model lacks training in context processing and extracting useful information from it. By incorporating our method, RAFT , we train the model not only to match its answering style with that required but also to improve its document processing capabilities. Consequently, our approach outperforms all others.
|
| 104 |
+
|
| 105 |
+
# 4.2 Effect of CoT
|
| 106 |
+
|
| 107 |
+
We also conduct an analysis to evaluate the effectiveness of the Chain-of-Thought approach in enhancing the model’s performance. As indicated in Table 2, simply providing the answer to a question may not always be adequate. This approach can lead to a rapid decrease in loss, resulting in the model beginning to overfit. Incorporating a reasoning chain that not only guides the model to the answer but also enriches the model’s understanding can improve the overall accuracy and prevent overfitting to concise answers. In our experiments, integrating the Chain-of-Thought significantly enhances training robustness. We employ GPT-4-1106 to generate our Chain-of-Thought prompts and include an example of the prompt we used in Figure 3.
|
| 108 |
+
|
| 109 |
+
# 4.3 Qualitative Analysis
|
| 110 |
+
|
| 111 |
+
To illustrate the potential advantages of RAFT over the domain-specifically fine-tuned (DSF) approach, we present a comparative example in Figure 4. This example qualitatively demonstrates a scenario where the DSF model becomes confused by a question asking for the identity of a screenwriter. Instead of providing the correct name, it mistakenly cites one of the films written by the screenwriter. In contrast, the RAFT model accurately answers the question. This discrepancy suggests that training a model solely with question-answer pairs may impair its ability to derive relevant context from provided documents. The comparison underscores the importance of incorporating both standard instructional tuning and context comprehension into the training dataset to preserve and enhance the model’s ability to process text effectively.
|
| 112 |
+
|
| 113 |
+
# HotPot QA
|
| 114 |
+
|
| 115 |
+
Question: What screenwriter with credits for “Evolution”[0/1879]e a film starring Nicolas Cage and Téa Leoni?
|
| 116 |
+
Documents: . . . David Weissman is a screenwriter and director. His film credits include “The Family Man” (2000), “Evolution” (2001), and “When in Rome” (2010). The Family Man is a 2000 American romantic comedy-drama film directed by Brett Ratner, written by David Diamond and David Weissman, and starring Nicolas Cage and Téa Leoni.
|
| 117 |
+
|
| 118 |
+

|
| 119 |
+
Figure 4: Comparison of RAFT and DSF: On the HotPot QA dataset, we can see that DSF model extracts the wrong information from the context when the question is asking who is the screen writer and it answers a film name. RAFT manages to get the accurate results .
|
| 120 |
+
|
| 121 |
+
4.4 Should we train the LLM always with the golden context for RAG?
|
| 122 |
+
|
| 123 |
+
In our exploration of whether large language models (LLMs) should always be trained with the golden context for Retrieval-Augmented Generation (RAG), we address a key question: what proportion $( \mathrm { p \% ) }$ of the training data should include golden documents? Intuitively, one might assume that for effective training in reading and extracting information from context (e.g., RAG tasks), the golden document should always be included during training $\mathrm { ( P = 1 0 0 \% }$ ). However, our findings challenge this assumption: incorporating a portion of the training data without the golden document in the context $\mathrm { ( P = 8 0 \% }$ ) appears to enhance the model’s performance on RAG tasks.
|
| 124 |
+
|
| 125 |
+
Figure 5 presents our investigation into the hyperparameter $\mathrm { P \% }$ , which represents the percentage of training instances that should include golden documents. We find that the optimal proportion varies across datasets, with $\mathrm { P \% }$ ranging from $4 0 \%$ , $6 0 \% ,$ and $1 0 0 \%$ . This indicates that training your LLM without the correct corresponding context at times can be beneficial for the downstream task of answering questions related to the documents. In our training setup, we include four distractor documents alongside the golden document, and at test time, we maintain this format by providing the golden document with four distractors. Our findings suggest that, for domain-specific RAG tasks, including a certain percentage of training data without the golden documents in the context proves to be advantageous.
|
| 126 |
+
|
| 127 |
+
# 5 RAFT Generalizes to Top-K RAG
|
| 128 |
+
|
| 129 |
+
We now study another important problem: How does the number of distractor documents in RAFT affect the model’s performance when augmented with top-k RAG results during evaluation? Previous research has highlighted the vulnerability of LLMs to irrelevant text (see studies (Shi et al., 2023a; Weston & Sukhbaatar, 2023; Liu et al., 2023)). This issue is particularly critical for LLMs $^ +$ RAG since top-k RAG is frequently employed at test time to ensure high recall. Such a scenario necessitates the model to have the ability to discern and disregard irrelevant content, focusing solely on pertinent information.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
Figure 5: How many golden documents to involve? We study the hyperparameter $\mathrm { P \% }$ where it indicates how much portion of training data is with golden document. Results on NQ, TQA and HotpotQA suggest that mixing some amount of data that the golden document is not put in the context is helpful for in-domain RAG.
|
| 133 |
+
|
| 134 |
+
# 5.1 Making Model Robust to top-K RAG
|
| 135 |
+
|
| 136 |
+
To tackle the challenge of enhancing large language models’ (LLMs) ability to sift through irrelevant text within the retrieval pipeline, our analysis revealed that training solely with golden (highly relevant) documents can inadvertently diminish the model’s ability to discern and disregard irrelevant information. To address this, our algorithm, RAFT , adopts a strategy that integrates golden documents with a mix of irrelevant ones. This methodology prompts us to investigate the ideal fraction of distractor (irrelevant) documents to incorporate throughout the training process and to assess how well this training approach adapts to different volumes of documents encountered by the Retrieval-Augmented Generation (RAG) during the test phase. Our aim is to refine the balance between relevant and irrelevant information to strenghten the model’s efficiency in identifying and utilizing pertinent content. Notice that Sec 4.4 looked what what $\mathrm { P \% }$ of training data should include distractors, while in this section, we study test-time scenarios.
|
| 137 |
+
|
| 138 |
+
Training with Distractor Documents To enhance the robustness of LLMs against irrelevant text in retrieved documents, we adopted a finetuning approach that incorporates both golden (highly relevant) documents and distractor (irrelevant) documents. The model was trained with varying numbers of distractor documents, but consistently evaluated using the top-3 documents obtained from the retriever - not to be confused with $p$ . Our findings, detailed in Fig. 6, reveal that finetuning with only the golden document frequently results in inferior performance compared to configurations that include a greater number of distractor documents. As we can see in the figure, the better performance for Natural Questions is training with $D ^ { * } + 3 D$ and it is $D ^ { * } + 1 D$ documents with Hotpot QA. This insight has been particularly beneficial for our algorithm, RAFT . In our experiments, we consistently employ a training setup consisting of one golden document alongside four distractor documents.
|
| 139 |
+
|
| 140 |
+
Generalization to a variable number of test-time documents. We extended our research to examine the impact of different quantities of test-time documents on the model’s performance. Specifically, our experiments focused on assessing how models, trained with varying numbers of distractor documents, respond to changes in the number of documents presented at test time. The results, illustrated in Fig. 6, confirm that the inclusion of distractor documents during training indeed makes the model more resilient to fluctuations in the number of documents encountered during testing. This ability to maintain consistent performance despite variations in test-time document numbers further validates the robustness of our approach, RAFT . This finding underscores the importance of a well-calibrated training environment to prepare the model for a range of scenarios it may encounter in real-world.
|
| 141 |
+
|
| 142 |
+
# 6 Related Works
|
| 143 |
+
|
| 144 |
+
Retrieval-Augmented Language Models Retrieval-Augmented Language Models (RALMs) enhance LLMs by integrating a retrieval module that sources relevant information from external knowledge bases, significantly improving performance across various NLP tasks, including language modeling (Guu et al., 2020; Borgeaud et al., 2022; Khandelwal et al.,
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 6: Test-Time Documents Varying: To analyze how robust RAFT is to varying number of test-time documents, we study three domains – NQ, Trivia QA and HotPot QA. In ${ \mathrm { N Q } } ,$ we find that training with 4 documents leads to optimal performance, and this changes to 3 and 2 for for Trivia QA and HotPot QA respectively. However, we see that training with only golden documents leads to poor performance.
|
| 148 |
+
|
| 149 |
+
2019; Shi et al., 2023d; Lin et al., 2023b; Shi et al., 2023c; Asai et al., 2023; Xu et al., 2023; Wang et al., 2023) and open-domain question answering (Izacard et al., 2023; Lewis et al., 2020). For instance, Atlas (Izacard et al., 2023) fine-tunes T5 models with the retriever, treating documents as latent variables, while RETRO (Borgeaud et al., 2022) modifies the decoder-only architecture to include retrieved texts and conducts pre-training from scratch. kNN-LM (Khandelwal et al., 2019) interpolates between the LM’s next token distribution and distributions computed from retrieved tokens at inference. (Shi et al., 2023d; Ram et al., 2023) assume black-box access to an LLM, combining it with either off-the-shelf or fine-tuned retriever.
|
| 150 |
+
|
| 151 |
+
Memorization A key question around large neural language models is whether they truly “understand” text (Feldman, 2020; Power et al., 2022) or simply rely on surface pattern memorization (Carlini et al., 2019; Tänzer et al., 2022). (Feldman, 2020; Carlini et al., 2019; 2022) develop methodologies to quantify the extent of memorization in neural models. (Brown et al., 2020; Power et al., 2022; Liu et al., 2022) further explored how memorization impacts the models’ generalization capabilities. (Carlini et al., 2021; Shi et al., 2023b) demonstrated the ability of language models to memorize and regurgitate training data, raising significant privacy concerns (Kandpal et al., 2022; Pan et al., 2020).
|
| 152 |
+
|
| 153 |
+
Finetuning for RAG More recently, several papers have been exploring the idea of finetuning a pretrained LLM to be better at RAG tasks (Lin et al., 2023a; Wang et al., 2023; Xu et al., 2023; Liu et al., 2024). These works focus on constructing a combination of finetuning dataset for RAG and train a model to perform well on these tasks. In particular, in their settings, at test time, the domain or documents can be different than the training time; whereas our paper studies a slightly opposite scenario where we only care about testing the LLM on the same set of documents.
|
| 154 |
+
|
| 155 |
+
# 7 Conclusion
|
| 156 |
+
|
| 157 |
+
RAFT is a training strategy designed to enhance the model’s performance in answering questions within a specific domain, in "open-book" settings. We highlight several crucial design decisions, such as training the model alongside distractor documents, organizing the dataset so a portion lacks golden documents in their context, and formulating answers in a chain-of-thought manner with direct quotations from the relevant text. Our evaluations on PubMed, HotpotQA, and Gorilla API Bench underline RAFT’s significant potential.
|
| 158 |
+
|
| 159 |
+
# References
|
| 160 |
+
|
| 161 |
+
Anthropic. Prompt engineering for claude’s long context window. 2023.
|
| 162 |
+
|
| 163 |
+
Asai, A., Wu, Z., Wang, Y., Sil, A., and Hajishirzi, H. Self-rag: Learning to retrieve, generate, and critique through self-reflection. arXiv preprint arXiv:2310.11511, 2023.
|
| 164 |
+
|
| 165 |
+
Borgeaud, S., Mensch, A., Hoffmann, J., Cai, T., Rutherford, E., Millican, K., Van Den Driessche, G. B., Lespiau, J.-B., Damoc, B., Clark, A., et al. Improving language models by retrieving from trillions of tokens. In International conference on machine learning, pp. 2206–2240. PMLR, 2022.
|
| 166 |
+
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020.
|
| 167 |
+
Carlini, N., Liu, C., Erlingsson, Ú., Kos, J., and Song, D. The secret sharer: Evaluating and testing unintended memorization in neural networks. In 28th USENIX Security Symposium (USENIX Security 19), pp. 267–284, 2019.
|
| 168 |
+
Carlini, N., Tramer, F., Wallace, E., Jagielski, M., Herbert-Voss, A., Lee, K., Roberts, A., Brown, T., Song, D., Erlingsson, U., et al. Extracting training data from large language models. In 30th USENIX Security Symposium (USENIX Security 21), pp. 2633–2650, 2021.
|
| 169 |
+
Carlini, N., Ippolito, D., Jagielski, M., Lee, K., Tramer, F., and Zhang, C. Quantifying memorization across neural language models. In The Eleventh International Conference on Learning Representations, 2022.
|
| 170 |
+
Dernoncourt, F. and Lee, J. Y. Pubmed 200k rct: a dataset for sequential sentence classification in medical abstracts. arXiv preprint arXiv:1710.06071, 2017.
|
| 171 |
+
Feldman, V. Does learning require memorization? a short tale about a long tail. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, pp. 954–959, 2020.
|
| 172 |
+
Guu, K., Lee, K., Tung, Z., Pasupat, P., and Chang, M. Retrieval augmented language model pre-training. In International conference on machine learning, pp. 3929–3938. PMLR, 2020.
|
| 173 |
+
Izacard, G., Lewis, P., Lomeli, M., Hosseini, L., Petroni, F., Schick, T., Dwivedi-Yu, J., Joulin, A., Riedel, S., and Grave, E. Atlas: Few-shot learning with retrieval augmented language models. Journal of Machine Learning Research, 24(251):1–43, 2023. URL http: //jmlr.org/papers/v24/23-0037.html.
|
| 174 |
+
Jin, Q., Dhingra, B., Liu, Z., Cohen, W. W., and Lu, X. Pubmedqa: A dataset for biomedical research question answering. arXiv preprint arXiv:1909.06146, 2019.
|
| 175 |
+
Joshi, M., Choi, E., Weld, D. S., and Zettlemoyer, L. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. arXiv preprint arXiv:1705.03551, 2017.
|
| 176 |
+
Kandpal, N., Wallace, E., and Raffel, C. Deduplicating training data mitigates privacy risks in language models. In International Conference on Machine Learning, pp. 10697–10707. PMLR, 2022.
|
| 177 |
+
Khandelwal, U., Levy, O., Jurafsky, D., Zettlemoyer, L., and Lewis, M. Generalization through memorization: Nearest neighbor language models. arXiv preprint arXiv:1911.00172, 2019.
|
| 178 |
+
Kwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Devlin, J., Lee, K., et al. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453–466, 2019.
|
| 179 |
+
Lazaridou, A., Gribovskaya, E., Stokowiec, W., and Grigorev, N. Internet-augmented language models through few-shot prompting for open-domain question answering. arXiv preprint arXiv:2203.05115, 2022.
|
| 180 |
+
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W.-t., Rocktäschel, T., et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33:9459–9474, 2020.
|
| 181 |
+
Lin, X. V., Chen, X., Chen, M., Shi, W., Lomeli, M., James, R., Rodriguez, P., Kahn, J., Szilvasy, G., Lewis, M., et al. Ra-dit: Retrieval-augmented dual instruction tuning. arXiv preprint arXiv:2310.01352, 2023a.
|
| 182 |
+
Lin, X. V., Chen, X., Chen, M., Shi, W., Lomeli, M., James, R., Rodriguez, P., Kahn, J., Szilvasy, G., Lewis, M., et al. Ra-dit: Retrieval-augmented dual instruction tuning. arXiv preprint arXiv:2310.01352, 2023b.
|
| 183 |
+
Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., and Liang, P. Lost in the middle: How language models use long contexts. arXiv preprint arXiv:2307.03172, 2023.
|
| 184 |
+
Liu, Z., Kitouni, O., Nolte, N. S., Michaud, E., Tegmark, M., and Williams, M. Towards understanding grokking: An effective theory of representation learning. Advances in Neural Information Processing Systems, 35:34651–34663, 2022.
|
| 185 |
+
Liu, Z., Ping, W., Roy, R., Xu, P., Shoeybi, M., and Catanzaro, B. Chatqa: Building gpt-4 level conversational qa models. arXiv preprint arXiv:2401.10225, 2024.
|
| 186 |
+
Pan, X., Zhang, M., Ji, S., and Yang, M. Privacy risks of general-purpose language models. In 2020 IEEE Symposium on Security and Privacy (SP), pp. 1314–1331. IEEE, 2020.
|
| 187 |
+
Patil, S. G., Zhang, T., Wang, X., and Gonzalez, J. E. Gorilla: Large language model connected with massive apis. arXiv preprint arXiv:2305.15334, 2023.
|
| 188 |
+
Power, A., Burda, Y., Edwards, H., Babuschkin, I., and Misra, V. Grokking: Generalization beyond overfitting on small algorithmic datasets. arXiv preprint arXiv:2201.02177, 2022.
|
| 189 |
+
Ram, O., Levine, Y., Dalmedigos, I., Muhlgay, D., Shashua, A., Leyton-Brown, K., and Shoham, Y. In-context retrieval-augmented language models. arXiv preprint arXiv:2302.00083, 2023.
|
| 190 |
+
Shi, F., Chen, X., Misra, K., Scales, N., Dohan, D., Chi, E. H., Schärli, N., and Zhou, D. Large language models can be easily distracted by irrelevant context. In International Conference on Machine Learning, pp. 31210–31227. PMLR, 2023a.
|
| 191 |
+
Shi, W., Ajith, A., Xia, M., Huang, Y., Liu, D., Blevins, T., Chen, D., and Zettlemoyer, L. Detecting pretraining data from large language models. arXiv preprint arXiv:2310.16789, 2023b.
|
| 192 |
+
Shi, W., Min, S., Lomeli, M., Zhou, C., Li, M., Lin, V., Smith, N. A., Zettlemoyer, L., Yih, S., and Lewis, M. In-context pretraining: Language modeling beyond document boundaries. arXiv preprint arXiv:2310.10638, 2023c.
|
| 193 |
+
Shi, W., Min, S., Yasunaga, M., Seo, M., James, R., Lewis, M., Zettlemoyer, L., and Yih, W.-t. Replug: Retrieval-augmented black-box language models. arXiv preprint arXiv:2301.12652, 2023d.
|
| 194 |
+
Tänzer, M., Ruder, S., and Rei, M. Memorisation versus generalisation in pre-trained language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 7564–7578, 2022.
|
| 195 |
+
Vu, T., Iyyer, M., Wang, X., Constant, N., Wei, J., Wei, J., Tar, C., Sung, Y.-H., Zhou, D., Le, Q., et al. Freshllms: Refreshing large language models with search engine augmentation. arXiv preprint arXiv:2310.03214, 2023.
|
| 196 |
+
Wang, B., Ping, W., McAfee, L., Xu, P., Li, B., Shoeybi, M., and Catanzaro, B. Instructretro: Instruction tuning post retrieval-augmented pretraining. arXiv preprint arXiv:2310.07713, 2023.
|
| 197 |
+
Wang, Y., Kordi, Y., Mishra, S., Liu, A., Smith, N. A., Khashabi, D., and Hajishirzi, H. Self-instruct: Aligning language models with self-generated instructions. arXiv preprint arXiv:2212.10560, 2022.
|
| 198 |
+
Wei, J., Wang, X., Schuurmans, D., Bosma, M., Xia, F., Chi, E., Le, Q. V., Zhou, D., et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824–24837, 2022.
|
| 199 |
+
Weston, J. and Sukhbaatar, S. System 2 attention (is something you might need too). arXiv preprint arXiv:2311.11829, 2023.
|
| 200 |
+
Xiong, W., Liu, J., Molybog, I., Zhang, H., Bhargava, P., Hou, R., Martin, L., Rungta, R., Sankararaman, K. A., Oguz, B., et al. Effective long-context scaling of foundation models. arXiv preprint arXiv:2309.16039, 2023.
|
| 201 |
+
Xu, P., Ping, W., Wu, X., McAfee, L., Zhu, C., Liu, Z., Subramanian, S., Bakhturina, E., Shoeybi, M., and Catanzaro, B. Retrieval meets long context large language models. arXiv preprint arXiv:2310.03025, 2023.
|
| 202 |
+
Yang, Z., Qi, P., Zhang, S., Bengio, Y., Cohen, W. W., Salakhutdinov, R., and Manning, C. D. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. arXiv preprint arXiv:1809.09600, 2018.
|
| 203 |
+
Zhou, C., Liu, P., Xu, P., Iyer, S., Sun, J., Mao, Y., Ma, X., Efrat, A., Yu, P., Yu, L., et al. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206, 2023.
|
parse/test/rzQGHXNReU/rzQGHXNReU_content_list.json
ADDED
|
@@ -0,0 +1,428 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "RAFT: Adapting Language Model to Domain Specific RAG ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"page_idx": 0
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"type": "text",
|
| 10 |
+
"text": "Tianjun Zhang \\* \nDepartment of Computer Science \nUC Berkeley \nBerkeley, CA 94720, USA \n{tianjunz}@berkeley.edu \nShishir G. Patil, Naman Jain, Sheng Shen \nDepartment of Computer Science \nUC Berkeley \nBerkeley, CA 94720, USA \n{shishirpatil,naman_jain,sheng.s}@berkeley.edu \nMatei Zaharia, Ion Stoica, Joseph E. Gonzalez \nDepartment of Computer Science \nUC Berkeley \nBerkeley, CA 94720, USA \n{matei,istoica,jegonzal}@berkeley.edu ",
|
| 11 |
+
"page_idx": 0
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"type": "text",
|
| 15 |
+
"text": "",
|
| 16 |
+
"page_idx": 0
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"type": "text",
|
| 20 |
+
"text": "",
|
| 21 |
+
"page_idx": 0
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"type": "text",
|
| 25 |
+
"text": "Abstract ",
|
| 26 |
+
"text_level": 1,
|
| 27 |
+
"page_idx": 0
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"type": "text",
|
| 31 |
+
"text": "Pretraining Large Language Models (LLMs) on large corpora of textual data is now a standard paradigm. When using these LLMs for many downstream applications, it is common to additionally incorporate new information into the pretrained model either through RAG-based-prompting, or finetuning. However, the best methodology to incorporate information remains an open question. In this paper, we present Retrieval Augmented Fine Tuning (RAFT), a training recipe which improves the model’s ability to answer questions in \"open-book\" in-domain settings. In training RAFT, given a question, and a set of retrieved documents, we train the model to ignore those documents that don’t help in answering the question, which we call, distractor documents. RAFT accomplishes this by citing verbatim the right sequence from the relevant document to help answer the question. This coupled with RAFT’s chain-of-thought-style response helps improve the model’s ability to reason. In domain specific RAG, RAFT consistently improves the model’s performance across PubMed, HotpotQA, and Gorilla datasets, presenting a post-training recipe to improve pre-trained LLMs to in-domain RAG. ",
|
| 32 |
+
"page_idx": 0
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"type": "text",
|
| 36 |
+
"text": "1 Introduction ",
|
| 37 |
+
"text_level": 1,
|
| 38 |
+
"page_idx": 0
|
| 39 |
+
},
|
| 40 |
+
{
|
| 41 |
+
"type": "text",
|
| 42 |
+
"text": "Trained on vast quantities of public data, Large Language Models LLMs have achieved significant advances in a wide range of general knowledge reasoning tasks Brown et al. (2020); Wei et al. (2022). However, increasingly LLMs are being employed in specialized domains to support tasks ranging from code completion for specific software frameworks to question answering on specific document collections (e.g., legal or medical documents). In these settings, general knowledge reasoning is less critical and instead the primary goal is to maximize accuracy based on a given set of documents. Indeed, adapting LLMs to the specialized domains (e.g., recent news, enterprise private documents, or program resources constructed after the training cutoff) is essential to many emerging applications (Vu et al., 2023; Lazaridou et al., 2022) and is the focus of this work. ",
|
| 43 |
+
"page_idx": 0
|
| 44 |
+
},
|
| 45 |
+
{
|
| 46 |
+
"type": "text",
|
| 47 |
+
"text": "This paper studies the following question – How do we adapt pre-trained LLMs for Retrieval Augmented Generation (RAG) in specialized domains? ",
|
| 48 |
+
"page_idx": 0
|
| 49 |
+
},
|
| 50 |
+
{
|
| 51 |
+
"type": "text",
|
| 52 |
+
"text": "When it comes to adapting LLMs to specialized domains, we consider the following two candidates: in-context learning through Retrieval-Augmented Generation (RAG) and supervised fine-tuning. RAG based methods allow the LLM to reference the documents when answering questions. However, RAG based in-context learning methods fail to leverage the learning opportunity afforded by the fixed domain setting and early access to the test documents. Alternatively, supervised fine-tuning offers the opportunity to learn more general patterns in the documents and better align to end tasks and user preferences Zhou et al. (2023). However, existing fine-tuning based approaches either fail to leverage the documents at test time (don’t incorporate RAG) or fail to account for the imperfections in retrieval process during training. ",
|
| 53 |
+
"page_idx": 0
|
| 54 |
+
},
|
| 55 |
+
{
|
| 56 |
+
"type": "image",
|
| 57 |
+
"img_path": "images/f0db1ef1b057bc1bc9295a8166a6d296edcd745858acff236281a68693676d87.jpg",
|
| 58 |
+
"image_caption": [
|
| 59 |
+
"Figure 1: How best to prepare for an Exam?(a) Fine-tuning based approaches implement \"studying\" by either directly \"memorizing\" the input documents or answering practice QA without referencing the documents. (b) Alternatively, in-context retrieval methods fail to leverage the learning opportunity afforded by the fixed domain and are equivalent to taking an open-book exam without studying. In contrast, our approach (c) RAFT leverages fine-tuning with question-answer pairs while referencing the documents in a simulated imperfect retrieval setting — thereby effectively preparing for the open-book exam setting. "
|
| 60 |
+
],
|
| 61 |
+
"image_footnote": [],
|
| 62 |
+
"page_idx": 1
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"type": "text",
|
| 66 |
+
"text": "",
|
| 67 |
+
"page_idx": 1
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"type": "text",
|
| 71 |
+
"text": "We can draw an analogy to an open-book exam. Existing in-context retrieval methods are equivalent to taking an open-book exam without studying. Alternatively, existing finetuning based approaches implement “studying\" by either directly “memorizing\" Xiong et al. (2023) the input documents or answering practice questions Wang et al. (2022) without referencing the documents. While these approaches leverage in-domain learning they fail to prepare for the open-book nature of the test setting. ",
|
| 72 |
+
"page_idx": 1
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"type": "text",
|
| 76 |
+
"text": "In this paper, we study how to combine instruction fine-tuning (IFT) with retrieval augmented generation (RAG). We propose a novel adaptation strategy – Retrieval-Augmented Fine Tuning (RAFT). RAFT specifically addresses the challenge of fine-tuning LLMs to both incorporate domain knowledge while also improving in-domain RAG performance. RAFT aims to not only enable models to learn domain-specific knowledge through fine-tuning, but also to ensure robustness against distracting retrieved information. This is achieved by training the models to understand the dynamics between the question (prompt), the domain-specific documents retrieved, and the right answer. Going back to our analogy to the open book exam, our approach is analogous to studying for an open-book exam by recognizing relevant, and irrelevant retrieved documents. ",
|
| 77 |
+
"page_idx": 1
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"type": "text",
|
| 81 |
+
"text": "In RAFT, we train the model to answer the question (Q) from Document(s) $( \\mathrm { D ^ { * } } )$ to generate answer $( \\mathrm { A } ^ { * } )$ , where $\\mathsf { A } ^ { * }$ includes chain-of-thought reasoning Wei et al. (2022); Anthropic (2023), and in the presence of distractor documents $( D _ { k } )$ . We explain the methodology in Section 3 and analyze the sensitivity to the number of distractor documents $( k )$ at train- and test- time in Section 5. RAFT consistently outperforms Supervised-finetuning both withand without- RAG across PubMed Dernoncourt & Lee (2017), HotPot QA Yang et al. (2018), and HuggingFace Hub, Torch Hub, and Tensorflow Hub Gorilla datasets Patil et al. (2023), presenting a novel, yet simple technique to improve pre-trained LLMs for in-domain RAG. Our code is available at https://github.com/ShishirPatil/gorilla. ",
|
| 82 |
+
"page_idx": 1
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"type": "text",
|
| 86 |
+
"text": "2 LLMs for Open-Book Exam ",
|
| 87 |
+
"text_level": 1,
|
| 88 |
+
"page_idx": 1
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"type": "text",
|
| 92 |
+
"text": "To understand our goal better, we expand on our analogy between training an LLM with the real-world setting of prepararing for an exam. ",
|
| 93 |
+
"page_idx": 1
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"type": "text",
|
| 97 |
+
"text": "Closed-Book Exam A closed book exam often refers to the scenario where the LLMs do not have access to any additional documents or references to answer the questions during the exam. For LLMs, this is equivalent to the scenario, for example, in which the LLM is used as a chatbot. In this scenario the LLM draws from the knowledge baked in during pre-training and supervised-finetuning to respond to the users’ prompt. ",
|
| 98 |
+
"page_idx": 1
|
| 99 |
+
},
|
| 100 |
+
{
|
| 101 |
+
"type": "image",
|
| 102 |
+
"img_path": "images/d54b49279897f74e204c908fc173727448ff6a0c168d92f2063727d1a38456d9.jpg",
|
| 103 |
+
"image_caption": [
|
| 104 |
+
"Figure 2: Overview of our RAFT method. The top-left figure depicts our approach of adapting LLMs to reading solution from a set of positive and distractor documents in contrast to standard RAG setup where models are trained based on the retriever outputs, which is a mixture of both memorization and reading. At test time, all methods follow the standard RAG setting, provided with a top-k retrieved documents in the context. "
|
| 105 |
+
],
|
| 106 |
+
"image_footnote": [],
|
| 107 |
+
"page_idx": 2
|
| 108 |
+
},
|
| 109 |
+
{
|
| 110 |
+
"type": "text",
|
| 111 |
+
"text": "",
|
| 112 |
+
"page_idx": 2
|
| 113 |
+
},
|
| 114 |
+
{
|
| 115 |
+
"type": "text",
|
| 116 |
+
"text": "Open Book Exam In contrast, we liken the open-book exam setting to the scenario in which the LLM can refer to external sources of information (e.g., a website or a book chapter). In such scenarios, typically, the LLM is paired with retriever which retrieves $^ { \\prime } \\mathbf { k } ^ { \\prime }$ documents (or specific segments of the document) which are appended to the users’ prompt. It is only through these documents retrieved that the LLM gains access to “domain-specific information”. As a result, we argue that the LLM’s performance in these settings, where it is trained as a general-purpose LLM is largely dependent on the quality of the retriever and how accurately the retriever can identify the most relevant piece of information. ",
|
| 117 |
+
"page_idx": 2
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "Domain-Specific Open-Book Exam In this paper, we focus on the narrower but increasingly popular domain than the general open book exam, which we call the domain-specific open-book exam. Here, we know apriori the domain in which the LLM will be tested. The LLM can respond to the users’ prompt using use any and all information from this specific domain, which it has been fine-tuned on. Examples of domain specific examples include enterprise documents, code repositories belonging to an organization, etc. In all these scenarios, the LLM will be used to respond to the questions, whose answers can be found within a collection of documents. The retrieval technique itself has little to no-impact on the mechanism (though it may impact the accuracy). This paper studies the domain-specific open-book setting and how to adapt a pretrained LLM to this specific domain, including how to make it more robust to a varying number of retrieved documents and distractors. ",
|
| 122 |
+
"page_idx": 2
|
| 123 |
+
},
|
| 124 |
+
{
|
| 125 |
+
"type": "text",
|
| 126 |
+
"text": "3 RAFT ",
|
| 127 |
+
"text_level": 1,
|
| 128 |
+
"page_idx": 2
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "In this section, we present RAFT, a novel way of training LLMs for domain-specific openbook exams. We first introduce the classical technique of supervised fine-tuning, followed with the key takeaways from our experiments. Then, we introduce RAFT , a modified version of general instruction tuning. Lastly, we provide an overview of the experiments to expect in the later sections. ",
|
| 133 |
+
"page_idx": 2
|
| 134 |
+
},
|
| 135 |
+
{
|
| 136 |
+
"type": "text",
|
| 137 |
+
"text": "Supervised Finetuning ",
|
| 138 |
+
"text_level": 1,
|
| 139 |
+
"page_idx": 2
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "Consider the supervised fine-tuning (SFT) setting for a Question-Answer dataset. The formulation consists of the Dataset $( \\bar { D } )$ from which a set of Question (Q) and corresponding answer $( A )$ pairs are derived or already available. In the classical SFT setting, the model is trained to improve it’s ability to answer the questions based on it’s knowledge - obtained either during pre-training, or during the SFT training phase. The model so trained can also ",
|
| 144 |
+
"page_idx": 2
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"type": "text",
|
| 148 |
+
"text": "Figure 3: RAFT prompt to help LLM evaluate its own generated reasoning and answers, contrasting them with the correct reasoning and answers. The LLM is prompted to identify errors in its reasoning and extract key insights for improvement. This figure specifically represents the ‘GenerateExplanation‘ step in the RAFT algorithm (Section 3). ",
|
| 149 |
+
"page_idx": 3
|
| 150 |
+
},
|
| 151 |
+
{
|
| 152 |
+
"type": "text",
|
| 153 |
+
"text": "be used at test-time with Retrieval Augmented Generation (RAG) setting, where additional documents can be introduced in the prompt to help the model answer the question. This can be represented as follows: ",
|
| 154 |
+
"page_idx": 3
|
| 155 |
+
},
|
| 156 |
+
{
|
| 157 |
+
"type": "text",
|
| 158 |
+
"text": "{Train: $\\mathbf Q \\to \\mathbf A _ { \\mathrm { j } } ^ { \\prime }$ , {0-shot Inference: $\\mathbf Q \\to \\mathbf A \\}$ , {RAG Inference: $\\mathbf { Q } + \\mathbf { D } \\mathbf { A } \\}$ ",
|
| 159 |
+
"page_idx": 3
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"type": "text",
|
| 163 |
+
"text": "RAFT: Retrieval Augmented Fine-Tuning (RAFT), presents a novel recipe to prepare finetuning data to tailor the models for domain-specific open-book setting, equivalent to indomain RAG In RAFT, we prepare the training data such that each data point contains a question $( Q )$ , a set of documents $( D _ { k } )$ , and a corresponding Chain-of-though style answer $( \\hat { \\boldsymbol { A } } ^ { * } )$ generated from one of the document $( D ^ { * } )$ . We differentiate between two types of documents: ‘golden’ documents $( D * )$ i.e. the documents from which the answer to the question can be deduced, and ‘distractor’ documents $( D _ { i } )$ that do not contain answerrelevant information. As an implementation detail, the ‘golden’ document doesn’t need to be a single document, but can be more than one document, as is the case in HotpotQA Yang et al. (2018). Then, for $P$ fraction of the questions $( q _ { i } )$ in the dataset, we retain the golden document $( d _ { i } ^ { * } )$ along with distractor documents $( d _ { k - 1 } )$ . For $( 1 - P )$ fraction of the questions $( q _ { i } )$ in the dataset, we include no golden document and only include distractor documents $( d _ { k } )$ . We then fine-tune the language model using standard supervised training (SFT) technique, training it to generate answers from the provided documents and question. Fig. 2 illustrates the high-level design principal for RAFT . ",
|
| 164 |
+
"page_idx": 3
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"type": "text",
|
| 168 |
+
"text": "We demonstrate that our RAG approach trains the model to perform better RAG on the set of documents it is trained on i.e., in-domain. By removing the golden documents in some instances, we are compelling the model to memorize answers instead of deriving them from the context. The training data for RAFT is as follows, and an example training data can be seen in Fig. 3: ",
|
| 169 |
+
"page_idx": 3
|
| 170 |
+
},
|
| 171 |
+
{
|
| 172 |
+
"type": "text",
|
| 173 |
+
"text": "$\\mathbf { P } \\%$ of data: $\\mathbf { Q } + \\mathbf { D } ^ { * } + \\mathbf { D } _ { 1 } + \\mathbf { D } _ { 2 } + \\ldots + \\mathbf { D } _ { k } \\mathbf { A } *$ $( 1 - \\mathbf { P } ) \\%$ of data: $\\mathbf { Q } + \\mathbf { D } _ { 1 } + \\mathbf { D } _ { 2 } + \\ldots + \\mathbf { D } _ { k } \\mathbf { A } *$ ",
|
| 174 |
+
"page_idx": 3
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"type": "text",
|
| 178 |
+
"text": "Subsequently, for the test scenario, the model is provided with the Q and top-k documents retrieved by the RAG pipeline. Note that RAFT is independent of the retriever used. ",
|
| 179 |
+
"page_idx": 3
|
| 180 |
+
},
|
| 181 |
+
{
|
| 182 |
+
"type": "text",
|
| 183 |
+
"text": "A key factor in enhancing training quality is the generation of a reasoning process, such as Chain-of-Thought, to explain the provided answers. RAFT approach is similar: we demonstrate that creating a full reasoning chain and in-addition, clearly citing sources enhances the model’s accuracy in answering questions. In Fig. 3, we illustrate this setup. Generating the training data in this fashion, involves presenting the model with a question, context, and verified answers, and then requesting it to form a reasoning chain that appropriately references the original context. ",
|
| 184 |
+
"page_idx": 3
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "text",
|
| 188 |
+
"text": "For all the datasets in our experiments, we generate the answers using the technique described above. Note that the Gorilla APIBench dataset, already includes reasoning in the answers. We provide an example of the generation step in Fig. 3, the detailed reasoning answer includes a citation from the original context inside ##begin_quote## and ##end_quote## as well as the detailed explanation on how to reach the conclusion based on the citations. We demonstrate that adding detailed reasoning paragraphs can help boost the model’s performance in our experiment section. ",
|
| 189 |
+
"page_idx": 3
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"type": "table",
|
| 193 |
+
"img_path": "images/eabf5ecf2f67950e464b9edcd9f8c5d50f934120774dd57d884d10a27971c5e1.jpg",
|
| 194 |
+
"table_caption": [
|
| 195 |
+
"Table 1: RAFT improves RAG performance for all specialized domains: Across PubMed, HotPot, HuggingFace, Torch Hub, and Tensorflow Hub, we see that Domain-specific Finetuning improves significantly of the performance of the base model, RAFT consistently outperforms the existing domain-specific finetuning method with or without RAG. This suggests the need to train the model with context. We compare our model with LLaMA finetuning receipes, and provide GPT-3.5 for reference. "
|
| 196 |
+
],
|
| 197 |
+
"table_footnote": [],
|
| 198 |
+
"table_body": "<table><tr><td></td><td>PubMed</td><td>HotPot</td><td>HuggingFace</td><td>Torch Hub</td><td>TensorFlow</td></tr><tr><td>GPT-3.5 + RAG</td><td>71.60</td><td>41.5</td><td>29.08</td><td>60.21</td><td>65.59</td></tr><tr><td>LLaMA2-7B</td><td>56.5</td><td>0.54</td><td>0.22</td><td>0</td><td>0</td></tr><tr><td>LLaMA2-7B + RAG</td><td>58.8</td><td>0.03</td><td>26.43</td><td>08.60</td><td>43.06</td></tr><tr><td>DSF</td><td>59.7</td><td>6.38</td><td>61.06</td><td>84.94</td><td>86.56</td></tr><tr><td>DSF + RAG</td><td>71.6</td><td>4.41</td><td>42.59</td><td>82.80</td><td>60.29</td></tr><tr><td>RAFT (LLaMA2-7B)</td><td>73.30</td><td>35.28</td><td>74.00</td><td>84.95</td><td>86.86</td></tr></table>",
|
| 199 |
+
"page_idx": 4
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"type": "text",
|
| 203 |
+
"text": "4 Evaluation ",
|
| 204 |
+
"text_level": 1,
|
| 205 |
+
"page_idx": 4
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"type": "text",
|
| 209 |
+
"text": "We design our experiments to study how well RAFT performs compared to various baselines. We find that the RAFT-7B model (a finetuned version of LlaMA-2) is better at reading and extracting information from in-domain documents, than domain-specific finetuned model, and general-purpose model with RAG. As an ablation, we also demonstrate how important it is for the model to learn with Chain-of-Thought responses. In this section, we will first introduce all the datasets we used in the experiments, then all the baseline model/fine-tuning techniques that we benchmark against. ",
|
| 210 |
+
"page_idx": 4
|
| 211 |
+
},
|
| 212 |
+
{
|
| 213 |
+
"type": "text",
|
| 214 |
+
"text": "Datasets In our experiments, we use the following datasets to evaluate our model and all baselines. We selected these datasets to represent both popular and diverse domains including Wikipedia, Coding/API documents, and question-answering on medical documents. Natural Questions (NQ) Kwiatkowski et al. (2019), Trivia QA Joshi et al. (2017) and HotpotQA Yang et al. (2018) are the open-domain question-answers based on Wikipedia, mainly focused on common knowledge (e.g., movies, sports, etc). HuggingFace, Torch Hub, and TensorFlow Hub are from the APIBench Patil et al. (2023) proposed in the Gorilla paper. These benchmarks measure how to generate the correct, functional, and executable API calls based on the documentation. PubMed QA Jin et al. (2019) is a question-answering dataset tailored only for biomedical-research question-answering. It mainly focuses on answering medical and biology questions based on a given set of documents. We would like to highlight that $( \\mathrm { N Q } ,$ Trivia $\\{ \\hat { \\mathrm { Q A } } ,$ and HotpotQA) are relatively general domain whereas the latter two domains are on domain-specific documents. ",
|
| 215 |
+
"page_idx": 4
|
| 216 |
+
},
|
| 217 |
+
{
|
| 218 |
+
"type": "text",
|
| 219 |
+
"text": "Baselines We consider the following baselines for our experiments: ",
|
| 220 |
+
"page_idx": 4
|
| 221 |
+
},
|
| 222 |
+
{
|
| 223 |
+
"type": "text",
|
| 224 |
+
"text": "• LlaMA2-7B-chat model with 0-shot prompting: this is the commonly used instruction-finetuned model for QA tasks, where we provide clearly written instructions, but no reference documentation. \n• LlaMA2-7B-chat model with RAG (Llama2 $^ +$ RAG): similar to the previous setting, except here we include reference documents. This is a popular technique when dealing with domain-specific QA tasks. Domain-Specific Finetuning with 0-shot prompting (DSF): Standard supervisedfinetuning, without documents in context. We find that its mostly useful to align the answering style of the model as well as get familiar with the domain context. \nDomain-Specific Finetuning with RAG $( \\mathrm { D S F } + \\mathrm { R A G } )$ ): Equip a domain-specific finetuned-model with external knowledge using RAG. So, for the “knowledge” the model does not know, it can still refer to the context. ",
|
| 225 |
+
"page_idx": 4
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"type": "table",
|
| 229 |
+
"img_path": "images/19bf288f1875c260ddfbb6355555262c6edf9186b41d826d401d956d5d148e14.jpg",
|
| 230 |
+
"table_caption": [
|
| 231 |
+
"Table 2: Ablation on Chain-of-Thought: The numbers of RAFT and RAFT without CoT. Results on various datasets show that adding CoT can significantly improve the performance of the finetuned model. With a gains of $9 . 6 6 \\%$ and $1 \\bar { 4 } . 9 3 \\%$ in the Hotpot QA and HuggingFace datasets respectively. "
|
| 232 |
+
],
|
| 233 |
+
"table_footnote": [],
|
| 234 |
+
"table_body": "<table><tr><td></td><td>PubMed</td><td>HotpotQA</td><td>HuggingFace</td><td>Torch Hub</td><td>TensorFlow</td></tr><tr><td>RAFT w.0 CoT</td><td>68.30</td><td>25.62</td><td>59.07</td><td>86.56</td><td>83.21</td></tr><tr><td>RAFT</td><td>73.30</td><td>35.28</td><td>74.00</td><td>84.95</td><td>86.86</td></tr></table>",
|
| 235 |
+
"page_idx": 5
|
| 236 |
+
},
|
| 237 |
+
{
|
| 238 |
+
"type": "text",
|
| 239 |
+
"text": "4.1 Results ",
|
| 240 |
+
"text_level": 1,
|
| 241 |
+
"page_idx": 5
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"type": "text",
|
| 245 |
+
"text": "Using the above datasets and baselines, we evaluate our model RAFT and demonstrate the effectiveness of RAFT in Tab. 1. We see that RAFT consistently and significantly outperforms the baselines. Compared with the base Llama-2 instruction-tuned model, RAFT with RAG does much better in terms of extracting information as well as being robust towards distractors. The gain can be as big as $3 5 . 2 5 \\%$ on Hotpot QA and $7 6 . 3 5 \\%$ on Torch Hub evaluation. Compared with DSF on the specific dataset, our model does better at relying on the provided context to solve the problem. RAFT does much better on the tasks like Hotpot and HuggingFace datasets $( 3 0 . { \\bar { 8 } } 7 \\%$ on Hotpot and $3 1 . 4 1 \\%$ on HuggingFace). Note that for PubMed QA, since it is a binary yes/no question, we don’t observe significant gains when we compare our model with $\\mathrm { D } \\mathbf { \\dot { S } } \\mathbf { \\dot { F } } + \\mathbf { R } \\mathbf { A } \\mathbf { G }$ . Even compared with a much larger and better model GPT-3.5, RAFT demonstrates significant advantages. ",
|
| 246 |
+
"page_idx": 5
|
| 247 |
+
},
|
| 248 |
+
{
|
| 249 |
+
"type": "text",
|
| 250 |
+
"text": "Overall, the LLaMA-7B model, both with and without the RAG, performs poorly due to its answering style not aligning with the ground truth. By applying domain-specific tuning, we significantly enhance its performance. This process enables the model to learn and adopt the appropriate style of answering. However, introducing RAG to a domain-specifically fine-tuned (DSF) model doesn’t invariably lead to better outcomes. This might indicate that the model lacks training in context processing and extracting useful information from it. By incorporating our method, RAFT , we train the model not only to match its answering style with that required but also to improve its document processing capabilities. Consequently, our approach outperforms all others. ",
|
| 251 |
+
"page_idx": 5
|
| 252 |
+
},
|
| 253 |
+
{
|
| 254 |
+
"type": "text",
|
| 255 |
+
"text": "4.2 Effect of CoT ",
|
| 256 |
+
"text_level": 1,
|
| 257 |
+
"page_idx": 5
|
| 258 |
+
},
|
| 259 |
+
{
|
| 260 |
+
"type": "text",
|
| 261 |
+
"text": "We also conduct an analysis to evaluate the effectiveness of the Chain-of-Thought approach in enhancing the model���s performance. As indicated in Table 2, simply providing the answer to a question may not always be adequate. This approach can lead to a rapid decrease in loss, resulting in the model beginning to overfit. Incorporating a reasoning chain that not only guides the model to the answer but also enriches the model’s understanding can improve the overall accuracy and prevent overfitting to concise answers. In our experiments, integrating the Chain-of-Thought significantly enhances training robustness. We employ GPT-4-1106 to generate our Chain-of-Thought prompts and include an example of the prompt we used in Figure 3. ",
|
| 262 |
+
"page_idx": 5
|
| 263 |
+
},
|
| 264 |
+
{
|
| 265 |
+
"type": "text",
|
| 266 |
+
"text": "4.3 Qualitative Analysis ",
|
| 267 |
+
"text_level": 1,
|
| 268 |
+
"page_idx": 5
|
| 269 |
+
},
|
| 270 |
+
{
|
| 271 |
+
"type": "text",
|
| 272 |
+
"text": "To illustrate the potential advantages of RAFT over the domain-specifically fine-tuned (DSF) approach, we present a comparative example in Figure 4. This example qualitatively demonstrates a scenario where the DSF model becomes confused by a question asking for the identity of a screenwriter. Instead of providing the correct name, it mistakenly cites one of the films written by the screenwriter. In contrast, the RAFT model accurately answers the question. This discrepancy suggests that training a model solely with question-answer pairs may impair its ability to derive relevant context from provided documents. The comparison underscores the importance of incorporating both standard instructional tuning and context comprehension into the training dataset to preserve and enhance the model’s ability to process text effectively. ",
|
| 273 |
+
"page_idx": 5
|
| 274 |
+
},
|
| 275 |
+
{
|
| 276 |
+
"type": "text",
|
| 277 |
+
"text": "HotPot QA ",
|
| 278 |
+
"text_level": 1,
|
| 279 |
+
"page_idx": 6
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"type": "text",
|
| 283 |
+
"text": "Question: What screenwriter with credits for “Evolution”[0/1879]e a film starring Nicolas Cage and Téa Leoni? \nDocuments: . . . David Weissman is a screenwriter and director. His film credits include “The Family Man” (2000), “Evolution” (2001), and “When in Rome” (2010). The Family Man is a 2000 American romantic comedy-drama film directed by Brett Ratner, written by David Diamond and David Weissman, and starring Nicolas Cage and Téa Leoni. ",
|
| 284 |
+
"page_idx": 6
|
| 285 |
+
},
|
| 286 |
+
{
|
| 287 |
+
"type": "image",
|
| 288 |
+
"img_path": "images/0bcc3d38e5c0488526bd52fb267fd171f556aebd1617289e7668d2a9205a03f4.jpg",
|
| 289 |
+
"image_caption": [
|
| 290 |
+
"Figure 4: Comparison of RAFT and DSF: On the HotPot QA dataset, we can see that DSF model extracts the wrong information from the context when the question is asking who is the screen writer and it answers a film name. RAFT manages to get the accurate results . "
|
| 291 |
+
],
|
| 292 |
+
"image_footnote": [],
|
| 293 |
+
"page_idx": 6
|
| 294 |
+
},
|
| 295 |
+
{
|
| 296 |
+
"type": "text",
|
| 297 |
+
"text": "4.4 Should we train the LLM always with the golden context for RAG? ",
|
| 298 |
+
"page_idx": 6
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "text",
|
| 302 |
+
"text": "In our exploration of whether large language models (LLMs) should always be trained with the golden context for Retrieval-Augmented Generation (RAG), we address a key question: what proportion $( \\mathrm { p \\% ) }$ of the training data should include golden documents? Intuitively, one might assume that for effective training in reading and extracting information from context (e.g., RAG tasks), the golden document should always be included during training $\\mathrm { ( P = 1 0 0 \\% }$ ). However, our findings challenge this assumption: incorporating a portion of the training data without the golden document in the context $\\mathrm { ( P = 8 0 \\% }$ ) appears to enhance the model’s performance on RAG tasks. ",
|
| 303 |
+
"page_idx": 6
|
| 304 |
+
},
|
| 305 |
+
{
|
| 306 |
+
"type": "text",
|
| 307 |
+
"text": "Figure 5 presents our investigation into the hyperparameter $\\mathrm { P \\% }$ , which represents the percentage of training instances that should include golden documents. We find that the optimal proportion varies across datasets, with $\\mathrm { P \\% }$ ranging from $4 0 \\%$ , $6 0 \\% ,$ and $1 0 0 \\%$ . This indicates that training your LLM without the correct corresponding context at times can be beneficial for the downstream task of answering questions related to the documents. In our training setup, we include four distractor documents alongside the golden document, and at test time, we maintain this format by providing the golden document with four distractors. Our findings suggest that, for domain-specific RAG tasks, including a certain percentage of training data without the golden documents in the context proves to be advantageous. ",
|
| 308 |
+
"page_idx": 6
|
| 309 |
+
},
|
| 310 |
+
{
|
| 311 |
+
"type": "text",
|
| 312 |
+
"text": "5 RAFT Generalizes to Top-K RAG ",
|
| 313 |
+
"text_level": 1,
|
| 314 |
+
"page_idx": 6
|
| 315 |
+
},
|
| 316 |
+
{
|
| 317 |
+
"type": "text",
|
| 318 |
+
"text": "We now study another important problem: How does the number of distractor documents in RAFT affect the model’s performance when augmented with top-k RAG results during evaluation? Previous research has highlighted the vulnerability of LLMs to irrelevant text (see studies (Shi et al., 2023a; Weston & Sukhbaatar, 2023; Liu et al., 2023)). This issue is particularly critical for LLMs $^ +$ RAG since top-k RAG is frequently employed at test time to ensure high recall. Such a scenario necessitates the model to have the ability to discern and disregard irrelevant content, focusing solely on pertinent information. ",
|
| 319 |
+
"page_idx": 6
|
| 320 |
+
},
|
| 321 |
+
{
|
| 322 |
+
"type": "image",
|
| 323 |
+
"img_path": "images/8e086fb8cb885d22dfb048538cf47a1ac09dfb1873a60ba60c02530cd07d066d.jpg",
|
| 324 |
+
"image_caption": [
|
| 325 |
+
"Figure 5: How many golden documents to involve? We study the hyperparameter $\\mathrm { P \\% }$ where it indicates how much portion of training data is with golden document. Results on NQ, TQA and HotpotQA suggest that mixing some amount of data that the golden document is not put in the context is helpful for in-domain RAG. "
|
| 326 |
+
],
|
| 327 |
+
"image_footnote": [],
|
| 328 |
+
"page_idx": 7
|
| 329 |
+
},
|
| 330 |
+
{
|
| 331 |
+
"type": "text",
|
| 332 |
+
"text": "5.1 Making Model Robust to top-K RAG ",
|
| 333 |
+
"text_level": 1,
|
| 334 |
+
"page_idx": 7
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "text",
|
| 338 |
+
"text": "To tackle the challenge of enhancing large language models’ (LLMs) ability to sift through irrelevant text within the retrieval pipeline, our analysis revealed that training solely with golden (highly relevant) documents can inadvertently diminish the model’s ability to discern and disregard irrelevant information. To address this, our algorithm, RAFT , adopts a strategy that integrates golden documents with a mix of irrelevant ones. This methodology prompts us to investigate the ideal fraction of distractor (irrelevant) documents to incorporate throughout the training process and to assess how well this training approach adapts to different volumes of documents encountered by the Retrieval-Augmented Generation (RAG) during the test phase. Our aim is to refine the balance between relevant and irrelevant information to strenghten the model’s efficiency in identifying and utilizing pertinent content. Notice that Sec 4.4 looked what what $\\mathrm { P \\% }$ of training data should include distractors, while in this section, we study test-time scenarios. ",
|
| 339 |
+
"page_idx": 7
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"type": "text",
|
| 343 |
+
"text": "Training with Distractor Documents To enhance the robustness of LLMs against irrelevant text in retrieved documents, we adopted a finetuning approach that incorporates both golden (highly relevant) documents and distractor (irrelevant) documents. The model was trained with varying numbers of distractor documents, but consistently evaluated using the top-3 documents obtained from the retriever - not to be confused with $p$ . Our findings, detailed in Fig. 6, reveal that finetuning with only the golden document frequently results in inferior performance compared to configurations that include a greater number of distractor documents. As we can see in the figure, the better performance for Natural Questions is training with $D ^ { * } + 3 D$ and it is $D ^ { * } + 1 D$ documents with Hotpot QA. This insight has been particularly beneficial for our algorithm, RAFT . In our experiments, we consistently employ a training setup consisting of one golden document alongside four distractor documents. ",
|
| 344 |
+
"page_idx": 7
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "text",
|
| 348 |
+
"text": "Generalization to a variable number of test-time documents. We extended our research to examine the impact of different quantities of test-time documents on the model’s performance. Specifically, our experiments focused on assessing how models, trained with varying numbers of distractor documents, respond to changes in the number of documents presented at test time. The results, illustrated in Fig. 6, confirm that the inclusion of distractor documents during training indeed makes the model more resilient to fluctuations in the number of documents encountered during testing. This ability to maintain consistent performance despite variations in test-time document numbers further validates the robustness of our approach, RAFT . This finding underscores the importance of a well-calibrated training environment to prepare the model for a range of scenarios it may encounter in real-world. ",
|
| 349 |
+
"page_idx": 7
|
| 350 |
+
},
|
| 351 |
+
{
|
| 352 |
+
"type": "text",
|
| 353 |
+
"text": "6 Related Works ",
|
| 354 |
+
"text_level": 1,
|
| 355 |
+
"page_idx": 7
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"type": "text",
|
| 359 |
+
"text": "Retrieval-Augmented Language Models Retrieval-Augmented Language Models (RALMs) enhance LLMs by integrating a retrieval module that sources relevant information from external knowledge bases, significantly improving performance across various NLP tasks, including language modeling (Guu et al., 2020; Borgeaud et al., 2022; Khandelwal et al., ",
|
| 360 |
+
"page_idx": 7
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"type": "image",
|
| 364 |
+
"img_path": "images/12b8e955ae9a0307c0a7f13890daa53d74edc9d6d0f2d3be9e950103c883cfdd.jpg",
|
| 365 |
+
"image_caption": [
|
| 366 |
+
"Figure 6: Test-Time Documents Varying: To analyze how robust RAFT is to varying number of test-time documents, we study three domains – NQ, Trivia QA and HotPot QA. In ${ \\mathrm { N Q } } ,$ we find that training with 4 documents leads to optimal performance, and this changes to 3 and 2 for for Trivia QA and HotPot QA respectively. However, we see that training with only golden documents leads to poor performance. "
|
| 367 |
+
],
|
| 368 |
+
"image_footnote": [],
|
| 369 |
+
"page_idx": 8
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"type": "text",
|
| 373 |
+
"text": "2019; Shi et al., 2023d; Lin et al., 2023b; Shi et al., 2023c; Asai et al., 2023; Xu et al., 2023; Wang et al., 2023) and open-domain question answering (Izacard et al., 2023; Lewis et al., 2020). For instance, Atlas (Izacard et al., 2023) fine-tunes T5 models with the retriever, treating documents as latent variables, while RETRO (Borgeaud et al., 2022) modifies the decoder-only architecture to include retrieved texts and conducts pre-training from scratch. kNN-LM (Khandelwal et al., 2019) interpolates between the LM’s next token distribution and distributions computed from retrieved tokens at inference. (Shi et al., 2023d; Ram et al., 2023) assume black-box access to an LLM, combining it with either off-the-shelf or fine-tuned retriever. ",
|
| 374 |
+
"page_idx": 8
|
| 375 |
+
},
|
| 376 |
+
{
|
| 377 |
+
"type": "text",
|
| 378 |
+
"text": "Memorization A key question around large neural language models is whether they truly “understand” text (Feldman, 2020; Power et al., 2022) or simply rely on surface pattern memorization (Carlini et al., 2019; Tänzer et al., 2022). (Feldman, 2020; Carlini et al., 2019; 2022) develop methodologies to quantify the extent of memorization in neural models. (Brown et al., 2020; Power et al., 2022; Liu et al., 2022) further explored how memorization impacts the models’ generalization capabilities. (Carlini et al., 2021; Shi et al., 2023b) demonstrated the ability of language models to memorize and regurgitate training data, raising significant privacy concerns (Kandpal et al., 2022; Pan et al., 2020). ",
|
| 379 |
+
"page_idx": 8
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"type": "text",
|
| 383 |
+
"text": "Finetuning for RAG More recently, several papers have been exploring the idea of finetuning a pretrained LLM to be better at RAG tasks (Lin et al., 2023a; Wang et al., 2023; Xu et al., 2023; Liu et al., 2024). These works focus on constructing a combination of finetuning dataset for RAG and train a model to perform well on these tasks. In particular, in their settings, at test time, the domain or documents can be different than the training time; whereas our paper studies a slightly opposite scenario where we only care about testing the LLM on the same set of documents. ",
|
| 384 |
+
"page_idx": 8
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"type": "text",
|
| 388 |
+
"text": "7 Conclusion ",
|
| 389 |
+
"text_level": 1,
|
| 390 |
+
"page_idx": 8
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"type": "text",
|
| 394 |
+
"text": "RAFT is a training strategy designed to enhance the model’s performance in answering questions within a specific domain, in \"open-book\" settings. We highlight several crucial design decisions, such as training the model alongside distractor documents, organizing the dataset so a portion lacks golden documents in their context, and formulating answers in a chain-of-thought manner with direct quotations from the relevant text. Our evaluations on PubMed, HotpotQA, and Gorilla API Bench underline RAFT’s significant potential. ",
|
| 395 |
+
"page_idx": 8
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"type": "text",
|
| 399 |
+
"text": "References ",
|
| 400 |
+
"text_level": 1,
|
| 401 |
+
"page_idx": 8
|
| 402 |
+
},
|
| 403 |
+
{
|
| 404 |
+
"type": "text",
|
| 405 |
+
"text": "Anthropic. Prompt engineering for claude’s long context window. 2023. ",
|
| 406 |
+
"page_idx": 8
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"type": "text",
|
| 410 |
+
"text": "Asai, A., Wu, Z., Wang, Y., Sil, A., and Hajishirzi, H. Self-rag: Learning to retrieve, generate, and critique through self-reflection. arXiv preprint arXiv:2310.11511, 2023. ",
|
| 411 |
+
"page_idx": 9
|
| 412 |
+
},
|
| 413 |
+
{
|
| 414 |
+
"type": "text",
|
| 415 |
+
"text": "Borgeaud, S., Mensch, A., Hoffmann, J., Cai, T., Rutherford, E., Millican, K., Van Den Driessche, G. B., Lespiau, J.-B., Damoc, B., Clark, A., et al. Improving language models by retrieving from trillions of tokens. In International conference on machine learning, pp. 2206–2240. PMLR, 2022. \nBrown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020. \nCarlini, N., Liu, C., Erlingsson, Ú., Kos, J., and Song, D. The secret sharer: Evaluating and testing unintended memorization in neural networks. In 28th USENIX Security Symposium (USENIX Security 19), pp. 267–284, 2019. \nCarlini, N., Tramer, F., Wallace, E., Jagielski, M., Herbert-Voss, A., Lee, K., Roberts, A., Brown, T., Song, D., Erlingsson, U., et al. Extracting training data from large language models. In 30th USENIX Security Symposium (USENIX Security 21), pp. 2633–2650, 2021. \nCarlini, N., Ippolito, D., Jagielski, M., Lee, K., Tramer, F., and Zhang, C. Quantifying memorization across neural language models. In The Eleventh International Conference on Learning Representations, 2022. \nDernoncourt, F. and Lee, J. Y. Pubmed 200k rct: a dataset for sequential sentence classification in medical abstracts. arXiv preprint arXiv:1710.06071, 2017. \nFeldman, V. Does learning require memorization? a short tale about a long tail. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, pp. 954–959, 2020. \nGuu, K., Lee, K., Tung, Z., Pasupat, P., and Chang, M. Retrieval augmented language model pre-training. In International conference on machine learning, pp. 3929–3938. PMLR, 2020. \nIzacard, G., Lewis, P., Lomeli, M., Hosseini, L., Petroni, F., Schick, T., Dwivedi-Yu, J., Joulin, A., Riedel, S., and Grave, E. Atlas: Few-shot learning with retrieval augmented language models. Journal of Machine Learning Research, 24(251):1–43, 2023. URL http: //jmlr.org/papers/v24/23-0037.html. \nJin, Q., Dhingra, B., Liu, Z., Cohen, W. W., and Lu, X. Pubmedqa: A dataset for biomedical research question answering. arXiv preprint arXiv:1909.06146, 2019. \nJoshi, M., Choi, E., Weld, D. S., and Zettlemoyer, L. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. arXiv preprint arXiv:1705.03551, 2017. \nKandpal, N., Wallace, E., and Raffel, C. Deduplicating training data mitigates privacy risks in language models. In International Conference on Machine Learning, pp. 10697–10707. PMLR, 2022. \nKhandelwal, U., Levy, O., Jurafsky, D., Zettlemoyer, L., and Lewis, M. Generalization through memorization: Nearest neighbor language models. arXiv preprint arXiv:1911.00172, 2019. \nKwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Devlin, J., Lee, K., et al. Natural questions: a benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:453–466, 2019. \nLazaridou, A., Gribovskaya, E., Stokowiec, W., and Grigorev, N. Internet-augmented language models through few-shot prompting for open-domain question answering. arXiv preprint arXiv:2203.05115, 2022. \nLewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W.-t., Rocktäschel, T., et al. Retrieval-augmented generation for knowledge-intensive nlp tasks. Advances in Neural Information Processing Systems, 33:9459–9474, 2020. \nLin, X. V., Chen, X., Chen, M., Shi, W., Lomeli, M., James, R., Rodriguez, P., Kahn, J., Szilvasy, G., Lewis, M., et al. Ra-dit: Retrieval-augmented dual instruction tuning. arXiv preprint arXiv:2310.01352, 2023a. \nLin, X. V., Chen, X., Chen, M., Shi, W., Lomeli, M., James, R., Rodriguez, P., Kahn, J., Szilvasy, G., Lewis, M., et al. Ra-dit: Retrieval-augmented dual instruction tuning. arXiv preprint arXiv:2310.01352, 2023b. \nLiu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., and Liang, P. Lost in the middle: How language models use long contexts. arXiv preprint arXiv:2307.03172, 2023. \nLiu, Z., Kitouni, O., Nolte, N. S., Michaud, E., Tegmark, M., and Williams, M. Towards understanding grokking: An effective theory of representation learning. Advances in Neural Information Processing Systems, 35:34651–34663, 2022. \nLiu, Z., Ping, W., Roy, R., Xu, P., Shoeybi, M., and Catanzaro, B. Chatqa: Building gpt-4 level conversational qa models. arXiv preprint arXiv:2401.10225, 2024. \nPan, X., Zhang, M., Ji, S., and Yang, M. Privacy risks of general-purpose language models. In 2020 IEEE Symposium on Security and Privacy (SP), pp. 1314–1331. IEEE, 2020. \nPatil, S. G., Zhang, T., Wang, X., and Gonzalez, J. E. Gorilla: Large language model connected with massive apis. arXiv preprint arXiv:2305.15334, 2023. \nPower, A., Burda, Y., Edwards, H., Babuschkin, I., and Misra, V. Grokking: Generalization beyond overfitting on small algorithmic datasets. arXiv preprint arXiv:2201.02177, 2022. \nRam, O., Levine, Y., Dalmedigos, I., Muhlgay, D., Shashua, A., Leyton-Brown, K., and Shoham, Y. In-context retrieval-augmented language models. arXiv preprint arXiv:2302.00083, 2023. \nShi, F., Chen, X., Misra, K., Scales, N., Dohan, D., Chi, E. H., Schärli, N., and Zhou, D. Large language models can be easily distracted by irrelevant context. In International Conference on Machine Learning, pp. 31210–31227. PMLR, 2023a. \nShi, W., Ajith, A., Xia, M., Huang, Y., Liu, D., Blevins, T., Chen, D., and Zettlemoyer, L. Detecting pretraining data from large language models. arXiv preprint arXiv:2310.16789, 2023b. \nShi, W., Min, S., Lomeli, M., Zhou, C., Li, M., Lin, V., Smith, N. A., Zettlemoyer, L., Yih, S., and Lewis, M. In-context pretraining: Language modeling beyond document boundaries. arXiv preprint arXiv:2310.10638, 2023c. \nShi, W., Min, S., Yasunaga, M., Seo, M., James, R., Lewis, M., Zettlemoyer, L., and Yih, W.-t. Replug: Retrieval-augmented black-box language models. arXiv preprint arXiv:2301.12652, 2023d. \nTänzer, M., Ruder, S., and Rei, M. Memorisation versus generalisation in pre-trained language models. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 7564–7578, 2022. \nVu, T., Iyyer, M., Wang, X., Constant, N., Wei, J., Wei, J., Tar, C., Sung, Y.-H., Zhou, D., Le, Q., et al. Freshllms: Refreshing large language models with search engine augmentation. arXiv preprint arXiv:2310.03214, 2023. \nWang, B., Ping, W., McAfee, L., Xu, P., Li, B., Shoeybi, M., and Catanzaro, B. Instructretro: Instruction tuning post retrieval-augmented pretraining. arXiv preprint arXiv:2310.07713, 2023. \nWang, Y., Kordi, Y., Mishra, S., Liu, A., Smith, N. A., Khashabi, D., and Hajishirzi, H. Self-instruct: Aligning language models with self-generated instructions. arXiv preprint arXiv:2212.10560, 2022. \nWei, J., Wang, X., Schuurmans, D., Bosma, M., Xia, F., Chi, E., Le, Q. V., Zhou, D., et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in Neural Information Processing Systems, 35:24824–24837, 2022. \nWeston, J. and Sukhbaatar, S. System 2 attention (is something you might need too). arXiv preprint arXiv:2311.11829, 2023. \nXiong, W., Liu, J., Molybog, I., Zhang, H., Bhargava, P., Hou, R., Martin, L., Rungta, R., Sankararaman, K. A., Oguz, B., et al. Effective long-context scaling of foundation models. arXiv preprint arXiv:2309.16039, 2023. \nXu, P., Ping, W., Wu, X., McAfee, L., Zhu, C., Liu, Z., Subramanian, S., Bakhturina, E., Shoeybi, M., and Catanzaro, B. Retrieval meets long context large language models. arXiv preprint arXiv:2310.03025, 2023. \nYang, Z., Qi, P., Zhang, S., Bengio, Y., Cohen, W. W., Salakhutdinov, R., and Manning, C. D. Hotpotqa: A dataset for diverse, explainable multi-hop question answering. arXiv preprint arXiv:1809.09600, 2018. \nZhou, C., Liu, P., Xu, P., Iyer, S., Sun, J., Mao, Y., Ma, X., Efrat, A., Yu, P., Yu, L., et al. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206, 2023. ",
|
| 416 |
+
"page_idx": 9
|
| 417 |
+
},
|
| 418 |
+
{
|
| 419 |
+
"type": "text",
|
| 420 |
+
"text": "",
|
| 421 |
+
"page_idx": 10
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"type": "text",
|
| 425 |
+
"text": "",
|
| 426 |
+
"page_idx": 11
|
| 427 |
+
}
|
| 428 |
+
]
|
parse/test/rzQGHXNReU/rzQGHXNReU_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/rzQGHXNReU/rzQGHXNReU_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/y0GJXRungR/y0GJXRungR.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/y0GJXRungR/y0GJXRungR_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/y0GJXRungR/y0GJXRungR_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/y0GJXRungR/y0GJXRungR_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/zl16jLb91v/zl16jLb91v.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/zl16jLb91v/zl16jLb91v_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/test/zl16jLb91v/zl16jLb91v_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|