Chelsea707 commited on
Commit
9dfd13c
·
verified ·
1 Parent(s): efc73b8

Add Batch 35891ba2-1e99-40b9-89ee-826b3f09e88a data

Browse files
Files changed (49) hide show
  1. .gitattributes +8 -0
  2. 2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/7b0b68ac-f5c6-4674-acc8-4425712f7a19_content_list.json +0 -0
  3. 2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/7b0b68ac-f5c6-4674-acc8-4425712f7a19_model.json +0 -0
  4. 2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/7b0b68ac-f5c6-4674-acc8-4425712f7a19_origin.pdf +3 -0
  5. 2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/full.md +0 -0
  6. 2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/images.zip +3 -0
  7. 2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/layout.json +0 -0
  8. 2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/22c89e0b-1caf-4875-86e0-f3b9397a36cc_content_list.json +0 -0
  9. 2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/22c89e0b-1caf-4875-86e0-f3b9397a36cc_model.json +0 -0
  10. 2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/22c89e0b-1caf-4875-86e0-f3b9397a36cc_origin.pdf +3 -0
  11. 2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/full.md +442 -0
  12. 2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/images.zip +3 -0
  13. 2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/layout.json +0 -0
  14. 2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/9e8fce71-9845-4483-82b8-2e8fb64c4467_content_list.json +0 -0
  15. 2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/9e8fce71-9845-4483-82b8-2e8fb64c4467_model.json +0 -0
  16. 2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/9e8fce71-9845-4483-82b8-2e8fb64c4467_origin.pdf +3 -0
  17. 2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/full.md +0 -0
  18. 2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/images.zip +3 -0
  19. 2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/layout.json +0 -0
  20. 2024/Amortizing intractable inference in large language models/7ed5418b-3773-431a-ac5f-3cceb14f6956_content_list.json +0 -0
  21. 2024/Amortizing intractable inference in large language models/7ed5418b-3773-431a-ac5f-3cceb14f6956_model.json +0 -0
  22. 2024/Amortizing intractable inference in large language models/7ed5418b-3773-431a-ac5f-3cceb14f6956_origin.pdf +3 -0
  23. 2024/Amortizing intractable inference in large language models/full.md +0 -0
  24. 2024/Amortizing intractable inference in large language models/images.zip +3 -0
  25. 2024/Amortizing intractable inference in large language models/layout.json +0 -0
  26. 2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/1a6e78f9-a669-4d03-b852-34ab11b21b42_content_list.json +0 -0
  27. 2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/1a6e78f9-a669-4d03-b852-34ab11b21b42_model.json +0 -0
  28. 2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/1a6e78f9-a669-4d03-b852-34ab11b21b42_origin.pdf +3 -0
  29. 2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/full.md +513 -0
  30. 2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/images.zip +3 -0
  31. 2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/layout.json +0 -0
  32. 2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/6057db18-b37f-44dd-ad29-cdbda9e3f494_content_list.json +0 -0
  33. 2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/6057db18-b37f-44dd-ad29-cdbda9e3f494_model.json +0 -0
  34. 2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/6057db18-b37f-44dd-ad29-cdbda9e3f494_origin.pdf +3 -0
  35. 2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/full.md +0 -0
  36. 2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/images.zip +3 -0
  37. 2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/layout.json +0 -0
  38. 2024/Batched Low-Rank Adaptation of Foundation Models/698c37fd-a34d-43c4-aeed-9c12baba206a_content_list.json +1712 -0
  39. 2024/Batched Low-Rank Adaptation of Foundation Models/698c37fd-a34d-43c4-aeed-9c12baba206a_model.json +0 -0
  40. 2024/Batched Low-Rank Adaptation of Foundation Models/698c37fd-a34d-43c4-aeed-9c12baba206a_origin.pdf +3 -0
  41. 2024/Batched Low-Rank Adaptation of Foundation Models/full.md +281 -0
  42. 2024/Batched Low-Rank Adaptation of Foundation Models/images.zip +3 -0
  43. 2024/Batched Low-Rank Adaptation of Foundation Models/layout.json +0 -0
  44. 2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/fa29bbb1-c854-4aeb-a13c-5bf1509f8f38_content_list.json +0 -0
  45. 2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/fa29bbb1-c854-4aeb-a13c-5bf1509f8f38_model.json +0 -0
  46. 2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/fa29bbb1-c854-4aeb-a13c-5bf1509f8f38_origin.pdf +3 -0
  47. 2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/full.md +0 -0
  48. 2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/images.zip +3 -0
  49. 2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/layout.json +0 -0
.gitattributes CHANGED
@@ -3748,3 +3748,11 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
3748
  2025/To[[:space:]]CoT[[:space:]]or[[:space:]]not[[:space:]]to[[:space:]]CoT_[[:space:]]Chain-of-thought[[:space:]]helps[[:space:]]mainly[[:space:]]on[[:space:]]math[[:space:]]and[[:space:]]symbolic[[:space:]]reasoning/78080855-33d6-4037-9b8c-edc307a2e575_origin.pdf filter=lfs diff=lfs merge=lfs -text
3749
  2025/To[[:space:]]Code[[:space:]]or[[:space:]]Not[[:space:]]To[[:space:]]Code_[[:space:]]Exploring[[:space:]]Impact[[:space:]]of[[:space:]]Code[[:space:]]in[[:space:]]Pre-training/e6b439cb-3b05-45ee-8c52-561b8f255560_origin.pdf filter=lfs diff=lfs merge=lfs -text
3750
  2025/To[[:space:]]Tackle[[:space:]]Adversarial[[:space:]]Transferability_[[:space:]]A[[:space:]]Novel[[:space:]]Ensemble[[:space:]]Training[[:space:]]Method[[:space:]]with[[:space:]]Fourier[[:space:]]Transformation/11b8de53-d193-4b48-bf31-fc86f1bab485_origin.pdf filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
3748
  2025/To[[:space:]]CoT[[:space:]]or[[:space:]]not[[:space:]]to[[:space:]]CoT_[[:space:]]Chain-of-thought[[:space:]]helps[[:space:]]mainly[[:space:]]on[[:space:]]math[[:space:]]and[[:space:]]symbolic[[:space:]]reasoning/78080855-33d6-4037-9b8c-edc307a2e575_origin.pdf filter=lfs diff=lfs merge=lfs -text
3749
  2025/To[[:space:]]Code[[:space:]]or[[:space:]]Not[[:space:]]To[[:space:]]Code_[[:space:]]Exploring[[:space:]]Impact[[:space:]]of[[:space:]]Code[[:space:]]in[[:space:]]Pre-training/e6b439cb-3b05-45ee-8c52-561b8f255560_origin.pdf filter=lfs diff=lfs merge=lfs -text
3750
  2025/To[[:space:]]Tackle[[:space:]]Adversarial[[:space:]]Transferability_[[:space:]]A[[:space:]]Novel[[:space:]]Ensemble[[:space:]]Training[[:space:]]Method[[:space:]]with[[:space:]]Fourier[[:space:]]Transformation/11b8de53-d193-4b48-bf31-fc86f1bab485_origin.pdf filter=lfs diff=lfs merge=lfs -text
3751
+ 2024/A[[:space:]]Real-World[[:space:]]WebAgent[[:space:]]with[[:space:]]Planning,[[:space:]]Long[[:space:]]Context[[:space:]]Understanding,[[:space:]]and[[:space:]]Program[[:space:]]Synthesis/7b0b68ac-f5c6-4674-acc8-4425712f7a19_origin.pdf filter=lfs diff=lfs merge=lfs -text
3752
+ 2024/ASID_[[:space:]]Active[[:space:]]Exploration[[:space:]]for[[:space:]]System[[:space:]]Identification[[:space:]]in[[:space:]]Robotic[[:space:]]Manipulation/22c89e0b-1caf-4875-86e0-f3b9397a36cc_origin.pdf filter=lfs diff=lfs merge=lfs -text
3753
+ 2024/Accelerating[[:space:]]Distributed[[:space:]]Stochastic[[:space:]]Optimization[[:space:]]via[[:space:]]Self-Repellent[[:space:]]Random[[:space:]]Walks/9e8fce71-9845-4483-82b8-2e8fb64c4467_origin.pdf filter=lfs diff=lfs merge=lfs -text
3754
+ 2024/Amortizing[[:space:]]intractable[[:space:]]inference[[:space:]]in[[:space:]]large[[:space:]]language[[:space:]]models/7ed5418b-3773-431a-ac5f-3cceb14f6956_origin.pdf filter=lfs diff=lfs merge=lfs -text
3755
+ 2024/An[[:space:]]Analytical[[:space:]]Solution[[:space:]]to[[:space:]]Gauss-Newton[[:space:]]Loss[[:space:]]for[[:space:]]Direct[[:space:]]Image[[:space:]]Alignment/1a6e78f9-a669-4d03-b852-34ab11b21b42_origin.pdf filter=lfs diff=lfs merge=lfs -text
3756
+ 2024/Approximating[[:space:]]Nash[[:space:]]Equilibria[[:space:]]in[[:space:]]Normal-Form[[:space:]]Games[[:space:]]via[[:space:]]Stochastic[[:space:]]Optimization/6057db18-b37f-44dd-ad29-cdbda9e3f494_origin.pdf filter=lfs diff=lfs merge=lfs -text
3757
+ 2024/Batched[[:space:]]Low-Rank[[:space:]]Adaptation[[:space:]]of[[:space:]]Foundation[[:space:]]Models/698c37fd-a34d-43c4-aeed-9c12baba206a_origin.pdf filter=lfs diff=lfs merge=lfs -text
3758
+ 2024/Beyond[[:space:]]Weisfeiler-Lehman_[[:space:]]A[[:space:]]Quantitative[[:space:]]Framework[[:space:]]for[[:space:]]GNN[[:space:]]Expressiveness/fa29bbb1-c854-4aeb-a13c-5bf1509f8f38_origin.pdf filter=lfs diff=lfs merge=lfs -text
2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/7b0b68ac-f5c6-4674-acc8-4425712f7a19_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/7b0b68ac-f5c6-4674-acc8-4425712f7a19_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/7b0b68ac-f5c6-4674-acc8-4425712f7a19_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35ab2340d62a237f775375e3865e09b24ead2468a9319f386884508b995ab889
3
+ size 1908320
2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2def9633afbcf094a1337a340e71dcfdfdba62ebaa86489004794e0979220085
3
+ size 941740
2024/A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/22c89e0b-1caf-4875-86e0-f3b9397a36cc_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/22c89e0b-1caf-4875-86e0-f3b9397a36cc_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/22c89e0b-1caf-4875-86e0-f3b9397a36cc_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c769d864207a8c4da397cac488656b725bbf195979ebb534fd9f973c2fd96d1f
3
+ size 15880686
2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/full.md ADDED
@@ -0,0 +1,442 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ASID: ACTIVE EXPLORATION FOR SYSTEM IDENTIFICATION IN ROBOTIC MANIPULATION
2
+
3
+ Marius Memmel, Andrew Wagenvaker, Chuning Zhu, Dieter Fox, Abhishek Gupta
4
+
5
+ Paul G. Allen School of Computer Science & Engineering
6
+
7
+ University of Washington
8
+
9
+ Seattle, WA 98195, USA
10
+
11
+ {memmelma,ajwagen,zchuning,fox,abhgupta}@cs.washington.edu
12
+
13
+ # ABSTRACT
14
+
15
+ Model-free control strategies such as reinforcement learning have shown the ability to learn control strategies without requiring an accurate model or simulator of the world. While this is appealing due to the lack of modeling requirements, such methods can be sample inefficient, making them impractical in many real-world domains. On the other hand, model-based control techniques leveraging accurate simulators can circumvent these challenges and use a large amount of cheap simulation data to learn controllers that can effectively transfer to the real world. The challenge with such model-based techniques is the requirement for an extremely accurate simulation, requiring both the specification of appropriate simulation assets and physical parameters. This requires considerable human effort to design for every environment being considered. In this work, we propose a learning system that can leverage a small amount of real-world data to autonomously refine a simulation model and then plan an accurate control strategy that can be deployed in the real world. Our approach critically relies on utilizing an initial (possibly inaccurate) simulator to design effective exploration policies that, when deployed in the real world, collect high-quality data. We demonstrate the efficacy of this paradigm in identifying articulation, mass, and other physical parameters in several challenging robotic manipulation tasks, and illustrate that only a small amount of real-world data can allow for effective sim-to-real transfer. Project website at https://weirdlabuw.github.io/asid
16
+
17
+ # 1 INTRODUCTION
18
+
19
+ Controlling robots to perform dynamic, goal-directed behavior in the real world is challenging. Reinforcement Learning (RL) has emerged as a promising technique to learn such behaviors without requiring known models of the environment, instead relying on data sampled directly from the environment (Schulman et al., 2017a; Haarnoja et al., 2018). In principle, these techniques can be deployed in new environments with a minimal amount of human effort, and allow for continual improvement of behavior. Such techniques have been shown to successfully learn complex behaviors in a variety of scenarios, ranging from table-top manipulation (Yu et al., 2020) to locomotion (Hwangbo et al., 2019) and even dexterous manipulation (Zhu et al., 2019).
20
+
21
+ ![](images/51fb0e85ce1afcff040acbcb66b612d5ddd50ffe92b5f417ff20aac8a157502f.jpg)
22
+ Figure 1: ASD: A depiction of our proposed process of active exploration for system identification, from learning exploration policies to real-world deployment.
23
+
24
+ However, these capabilities come at a cost, requiring full access to the environment in order to design reset mechanisms and reward functions. Such requirements necessitate training these methods in carefully controlled and often curated environments, limiting their applicability. Moreover, de
25
+
26
+ ploying tabula-asa reinforcement learning methods in the real world often requires a prohibitively large number of samples, which may be impractical to collect.
27
+
28
+ One approach to circumvent these challenges is to rely on simulators to cheaply generate large amounts of data and use RL to train a policy. However, directly deploying policies trained in simulation in the real world is often ineffective due to the discrepancy between the simulation and the real world, the so-called sim2real gap. For example, the physical properties and parameters of the simulation might diverge from the real world, rendering a simulation-trained policy useless in reality.
29
+
30
+ Taking inspiration from system identification, we argue that the key to effective sim2real transfer is an initial round of exploration in the real world to learn an effective simulator. We propose a generic pipeline for sim2real transfer, Active Exploration for System IDentification (ASID), which decouples exploration and exploitation: (1) exploration in real to collect informative data of unknown parameters, (2) refinement of the simulation parameters using data collected in real, (3) policy training on the updated simulator to accomplish the goal tasks. Our exploration procedure is motivated by work in theoretical statistics and seeks to induce trajectories corresponding to large Fisher information, thereby providing maximally informative observations. By using our initial round of exploration to obtain accurate estimates of the parameters in the real world, we show that in many cases, the policies trained in step (3) successfully transfer to real in a zero-shot fashion, even in settings where training a policy in sim without additional knowledge of real would fail.
31
+
32
+ A key insight in our approach is that, while a policy trained in sim to accomplish the goal task may not effectively transfer, strategies that explore effectively in sim often also explore effectively in real. As an example, say our goal task is to hit a ball to a particular location with a robotic arm and assume the mass of the ball is unknown. If we train a policy in sim to hit the ball without knowledge of the mass, when deployed in real it will almost certainly fail, as the force at which it should strike the ball depends critically on the (unknown) mass. To learn the mass, however, essentially any contact between the ball and the arm suffices. Achieving some contact between the ball and the arm requires a significantly less precise motion, and indeed, does not require any prior knowledge of the mass. We can therefore train a policy in sim that learns to effectively explore—hit the ball in any direction—and deploy this in real to collect information on the true parameters, ultimately allowing us to obtain a higher-fidelity simulator that does allow sim2real transfer on the goal task.
33
+
34
+ We are particularly interested in the application of our pipeline to modern robotic settings and evaluate ASD on four tasks: sphere manipulation, laptop articulation, rod balancing, and shuffleboard. We show that in all settings, our approach is able to effectively identify unknown parameters of the real environment (e.g. geometry, articulation, center of mass, and physical parameters like mass, friction, or stiffness), and using this knowledge, learn a policy in sim for the goal task that successfully transfers to real. In all cases, by deploying effective exploration policies trained in simulation, we require only a very small amount of data from real—typically a single episode of data suffices.
35
+
36
+ # 2 RELATED WORK
37
+
38
+ System Identification: Our work is closely related to the field of system identification (Åström & Eykhoff, 1971; Söderström & Stoica, 1989; Ljung, 1998; Schon et al., 2011; Menda et al., 2020), which studies how to learn a model of the system dynamics efficiently. A large body of work, stretching back decades, has explored how inputs to a system should be chosen to most effectively learn the system's parameters (Mehra, 1974; 1976; Goodwin & Payne, 1977; Hjalmarsson et al., 1996; Lindqvist & Hjalmarsson, 2001; Gerencsér & Hjalmarsson, 2005; Rojas et al., 2007; Gevers et al., 2009; Gerencsér et al., 2009; Manchester, 2010; Rojas et al., 2011; Bombois et al., 2011; Hägg et al., 2013; Wagenmaker & Jamieson, 2020; Wagenmaker et al., 2021; Mania et al., 2022; Wagenmaker et al., 2023) or how to deal with partial observability (Schön et al., 2011; Menda et al., 2020). Similar to our exploration strategy, many of these works choose their inputs to maximize some function of the Fisher information matrix. A primary novelty of our approach is to use a simulator to learn effective exploration policies, and to apply our method to modern, real-world robotics tasks—indeed, our work can be seen as bridging the gap between classical work on system identification and modern sim2real techniques. While the aforementioned works are primarily theoretical, recent work has studied the application of such methods to a variety of real-world settings like active identification of physics parameters (Xu et al., 2019; Kumar et al., 2019; Mavrakis et al., 2020; Gao et al., 2020; 2022) or kinematic structure (Mo et al., 2021; Wang et al., 2022; Nie et al., 2022; Hsu
39
+
40
+ et al., 2023) through object-centric primitives. Another line of recent work aims to learn the parameters of the simulator to ultimately train a downstream policy on the learned parameters, and therefore apply task-specific policies for data collection (Zhu et al., 2018; Chebotar et al., 2019; Huang et al., 2023; Ren et al., 2023) or exploration policies that minimize its regret (Liang et al., 2020). The majority of these works, however, do not consider running an exploration policy that targets learning the unknown parameters, do not address solving downstream tasks, or rely on techniques that do not scale effectively to more complex tasks.
41
+
42
+ Simulation-to-Reality Transfer: Transferring learned policies from sim2real has shown to be successful in challenging tasks like dexterous manipulation (OpenAI et al., 2018; Handa et al., 2022; Chen et al., 2022), locomotion (Rudin et al., 2022), agile drone flight (Sadeghi & Levine, 2016) or contact rich assembly tasks Tang et al. (2023), yet challenges remain due to the sim2real gap. To deal with the gap, Domain Randomization (DR) (Tobin et al., 2017) trains policies over a distribution of environments in simulation, hoping for the real world to be represented among them. Subsequent works adaptively change the environment distribution (Muratore et al., 2019; Mehta et al., 2020) and incorporate real data (Chebotar et al., 2019; Ramos et al., 2019; Duan et al., 2023; Chen et al., 2023; Ma et al., 2023; Torne et al., 2024). While similar to our approach, these methods do not perform targeted exploration in real to update the simulator parameters. Other approaches seek to infer and adapt to simulation parameters during deployment (Kumar et al., 2021; Qi et al., 2023; Margolis et al., 2023), leverage offline data (Richards et al., 2021; Bose et al., 2024), or adapt online (Sinha et al., 2022); in contrast, we do not learn such an online adaptation strategy, but rather a better simulator. Finally, a commonly applied strategy is to train a policy in sim and then fine-tune in the real environment (Julian et al., 2021; Smith et al., 2022; Nakamoto et al., 2023); in contrast, we are interested in the (more challenging) regime where a direct transfer is not likely to give any learning signal to fine-tune from.
43
+
44
+ Model-Based RL: Model-based RL (MBRL) aims to solve the RL problem by learning a model of the dynamics, and using this model to either plan or solve a policy optimization problem (Deisenroth & Rasmussen, 2011; Williams et al., 2017; Nagabandi et al., 2018; Chua et al., 2018; Janner et al., 2019; Hafner et al., 2019; 2020; Janner et al., 2022; Zhu et al., 2023). While our approach is model-based in some sense, the majority of work in MBRL focuses on fully learned dynamic models; in contrast, our "model" is our simulator, and we aim to learn only a very small number of parameters, which can be much more sample-efficient. Furthermore, MBRL methods typically do not perform explicit exploration, while a key piece of our approach is a targeted exploration procedure. The MBRL works we are aware of which do rely on targeted exploration (Shyam et al., 2019; Pathak et al., 2019) typically rely on fully learned dynamic models and apply somewhat different exploration strategies, which we show in Appendix A.3.2 can perform significantly worse.
45
+
46
+ # 3 PRELIMINARIES
47
+
48
+ We formulate our decision-making setting as Markov Decision Processes (MDPs). An MDP is defined as a tuple $M^{\star} = (\mathcal{S},\mathcal{A},\{P_h^{\star}\}_{h = 1}^H,P_0,\{r_h\}_{h = 1}^H)$ , where $\mathcal{S}$ is the set of states, $\mathcal{A}$ the set of actions, $P_{h}:S\times \mathcal{A}\to \triangle_{\mathcal{S}}$ the transition kernel, $P_0\in \triangle_S$ the initial state distribution, and $r_h:\mathcal{S}\times \mathcal{A}\rightarrow \mathbb{R}$ the reward function. We consider the episodic setting. At the beginning of an episode, the environment samples a state $s_1\sim P_0$ . The agent observes this state, plays some action $a_1\in \mathcal{A}$ , and transitions to state $s_2\sim P_1(\cdot |s_1,a_1)$ , receiving reward $r_1(s_1,a_1)$ . After $H$ steps, the environment resets and the process repeats. Our primary goal is to learn a policy $\pi$ -a mapping from states to actions—that maximizes reward in the true environment. We denote the value of a policy by $V_0^\pi \coloneqq \mathbb{E}_{M^\star ,\pi}[\sum_{h = 1}^H r_h(s_h,a_h)]$ , where the expectation is over trajectories induced playing policy $\pi$ on MDP $M^{\star}$ . We think of the reward $r$ as encoding our downstream task, and our end goal is to find a policy that solves our task, maximizing $V_0^\pi$ . We denote such policies as $\pi_{\mathrm{task}}$ .
49
+
50
+ In the sim2real setting considered in this work, we assume that the reward is known, but that the dynamics of the real environment, $P^{\star} = \{P_h^{\star}\}_{h=1}^H$ , are initially unknown. However, we assume that they belong to some known parametric family $\mathcal{P} := \{P_{\theta} : \theta \in \Theta\}$ , so that there exists some $\theta^{\star} \in \Theta$ such that $P^{\star} = P_{\theta^{\star}}$ . Here we take $\theta$ to be some unknown parameter (for example, mass, friction, etc.), and $P_{\theta}$ the dynamics under parameter $\theta$ (which we might know from physics, first principles, etc.). For any $\theta$ and policy $\pi$ , the dynamics $P_{\theta}$ induce a distribution over state-action trajectories, $\tau = (s_1, a_1, s_2, \dots, s_H, a_H)$ , which we denote by $p_{\theta}(\cdot \mid \pi)$ . We can think of
51
+
52
+ ![](images/c7767ffb66fa23029347339202edfbbb03daee2f781f15b3ae65ee20aef2538a.jpg)
53
+ Figure 2: Overview of ASD: (1) Train an exploration policy $\pi_{\mathrm{exp}}$ that maximizes the Fisher information, leveraging the vast amount of cheap simulation data. (2) Roll out $\pi_{\mathrm{exp}}$ in real to collect informative data that can be used to (3) run system identification to identify physics parameters and reconstruct, e.g., geometric, collision, and kinematic properties. (4) Train a task-specific policy $\pi_{\mathrm{task}}$ in the updated simulator and (5) zero-shot transfer $\pi_{\mathrm{task}}$ to the real world.
54
+
55
+ our simulator as instantiating $p_{\theta}(\cdot \mid \pi)$ —we assume our simulator is able to accurately mimic the dynamics of an MDP with parameter $\pmb{\theta}$ under policy $\pi$ , generating samples $\pmb{\tau} \sim p_{\theta}(\cdot \mid \pi)$ .
56
+
57
+ In addition, we also assume that samples from our simulator are effectively "free"—for any $\theta$ and policy $\pi$ , we can generate as many trajectories $\tau \sim p_{\theta}(\cdot \mid \pi)$ as we wish. Given this, it is possible to find the optimal policy under $\theta$ by simply running any standard RL algorithm in simulation. With knowledge of the true parameters $\theta^{\star}$ , we can then easily find the optimal policy in real by sampling trajectories from the simulated environment with parameter $\theta^{\star}$ . It follows that, if we can identify the true parameter $\theta^{\star}$ in real, we can solve the goal task.
58
+
59
+ We consider the following learning protocol:
60
+
61
+ 1. Learner chooses exploration policy $\pi_{\mathrm{exp}}$ and plays it in real for a single episode, generating trajectory $\pmb{\tau}_{\mathrm{real}} \sim p_{\pmb{\theta}^*}(\cdot \mid \pi_{\mathrm{exp}})$ .
62
+ 2. Using $\pmb{\tau}_{\mathrm{real}}$ and the simulator in any way they wish, the learner obtains some policy $\pi_{\mathrm{task}}$ .
63
+ 3. Learner deploys $\pi_{\mathrm{task}}$ in real and suffers loss $\max_{\pi} V_0^{\pi} - V_0^{\pi_{\mathrm{task}}}$ .
64
+
65
+ The goal of the learner is then to learn as much useful information as possible about the real environment from a single episode of interaction and use this information to obtain a policy that can solve the task in real as effectively as possible.
66
+
67
+ Parameter Estimation and Fisher Information: The Fisher information matrix plays a key role in the choice of our exploration policy, $\pi_{\mathrm{exp}}$ . Recall that, for a distribution $p_{\theta}$ , satisfying certain regularity conditions, the Fisher information matrix is defined as:
68
+
69
+ $$
70
+ \mathcal {I} (\pmb {\theta}) := \mathbb {E} _ {\pmb {\tau} \sim p _ {\pmb {\theta}}} \left[ \nabla_ {\pmb {\theta}} \log p _ {\pmb {\theta}} (\pmb {\tau}) \cdot \nabla_ {\pmb {\theta}} \log p _ {\pmb {\theta}} (\pmb {\tau}) ^ {\top} \right].
71
+ $$
72
+
73
+ Assume that we have access to data $\mathfrak{D} = (\pmb{\tau}_t)_{t=1}^T$ , where $\pmb{\tau}_t \sim p_{\pmb{\theta}^\star}$ for $t = 1, \dots, T$ , and let $\widehat{\pmb{\theta}}(\mathfrak{D})$ denote some unbiased estimator of $\pmb{\theta}^\star$ . Then the Cramer-Rao lower bound (see e.g. Pronzato & Pázman (2013)) states that, under certain regularity conditions, the covariance of $\widehat{\pmb{\theta}}(\mathfrak{D})$ satisfies:
74
+
75
+ $$
76
+ \mathbb {E} _ {\mathfrak {D} \sim p _ {\theta^ {\star}}} [ (\widehat {\boldsymbol {\theta}} (\mathfrak {D}) - \boldsymbol {\theta} ^ {\star}) (\widehat {\boldsymbol {\theta}} (\mathfrak {D}) - \boldsymbol {\theta} ^ {\star}) ^ {\top} ] \succeq T ^ {- 1} \cdot \mathcal {I} (\boldsymbol {\theta} ^ {\star}) ^ {- 1}.
77
+ $$
78
+
79
+ From this it follows that the Fisher information serves as a lower bound on the mean-squared error:
80
+
81
+ $$
82
+ \mathbb {E} _ {\mathfrak {D} \sim p _ {\boldsymbol {\theta} ^ {\star}}} [ \| \widehat {\boldsymbol {\theta}} (\mathfrak {D}) - \boldsymbol {\theta} ^ {\star} \| _ {2} ^ {2} ] = \operatorname {t r} \left(\mathbb {E} _ {\mathfrak {D} \sim p _ {\boldsymbol {\theta} ^ {\star}}} \left[ \left(\widehat {\boldsymbol {\theta}} (\mathfrak {D}) - \boldsymbol {\theta} ^ {\star}\right) \left(\widehat {\boldsymbol {\theta}} (\mathfrak {D}) - \boldsymbol {\theta} ^ {\star}\right) ^ {\top} \right]\right) \geq T ^ {- 1} \cdot \operatorname {t r} \left(\mathcal {I} \left(\boldsymbol {\theta} ^ {\star}\right) ^ {- 1}\right). \tag {1}
83
+ $$
84
+
85
+ This is in general tight—for example, the maximum likelihood estimator satisfies (1) with equality as $T \to \infty$ (Van der Vaart, 2000). The Fisher information thus serves as a fundamental lower bound on parameter estimation error, a key motivation for our exploration procedure.
86
+
87
+ # 4 ASID: TARGETED EXPLORATION FOR TEST-TIME SIMULATION CONSTRUCTION, IDENTIFICATION, AND POLICY OPTIMIZATION
88
+
89
+ In this section, we present our proposed approach, ASD, a three-stage pipeline illustrated in Figure 2. We describe each component of ASD in the following.
90
+
91
+ # 4.1 EXPLORATION VIA FISHER INFORMATION MAXIMIZATION
92
+
93
+ As motivated in Section 3, to learn a policy effectively accomplishing our task, it suffices to accurately identify $\theta^{\star}$ . In the exploration phase, step 1 in our learning protocol, our goal is to then play an exploration policy $\pi_{\mathrm{exp}}$ which generates a trajectory on the real environment that provides as much information on $\theta^{\star}$ as possible. Following Section 3, the Fisher information gives a quantification of the usefulness of the data collected, which motivates our approach.
94
+
95
+ In our setting, the distribution over trajectories generated during exploration in real, $\pmb{\tau}_{\mathrm{real}} \sim p_{\pmb{\theta}^*}(\cdot \mid \pi_{\mathrm{exp}})$ , depends on the exploration policy, $\pi_{\mathrm{exp}}$ , being played. As the Fisher information depends on the data distribution, it too scales with the choice of exploration policy:
96
+
97
+ $$
98
+ \mathcal {I} \left(\boldsymbol {\theta} ^ {\star}, \pi_ {\exp}\right) := \mathbb {E} _ {\boldsymbol {\tau} \sim p _ {\boldsymbol {\theta} ^ {\star}} (\cdot | \pi_ {\exp})} \left[ \nabla_ {\boldsymbol {\theta}} \log p _ {\boldsymbol {\theta} ^ {\star}} (\boldsymbol {\tau} \mid \pi_ {\exp}) \cdot \nabla_ {\boldsymbol {\theta}} \log p _ {\boldsymbol {\theta} ^ {\star}} (\boldsymbol {\tau} \mid \pi_ {\exp}) ^ {\top} \right].
99
+ $$
100
+
101
+ Following (1), if we collect trajectories by playing $\pi_{\mathrm{exp}}$ and set $\widehat{\pmb{\theta}}$ to any unbiased estimator of $\pmb{\theta}^{\star}$ on these trajectories, the mean-squared error of $\widehat{\pmb{\theta}}$ will be lower bounded by $\operatorname{tr}(\mathcal{I}(\pmb{\theta}^{\star}, \pi_{\mathrm{exp}})^{-1})$ . The optimal exploration policy—the exploration policy which allows for the smallest estimation error—is, therefore, the policy which solves<sup>1</sup>
102
+
103
+ $$
104
+ \arg \min _ {\pi} \operatorname {t r} \left(\mathcal {I} \left(\boldsymbol {\theta} ^ {\star}, \pi\right) ^ {- 1}\right). \tag {2}
105
+ $$
106
+
107
+ As an intuitive justification for this choice of exploration policy, note that the Fisher information is defined in terms of the gradient of the log-likelihood with respect to the unknown parameter. Thus, if playing some $\pi_{\mathrm{exp}}$ makes the Fisher information "large", making $\operatorname{tr}(\mathcal{I}(\pmb{\theta}^{\star}, \pi_{\mathrm{exp}})^{-1})$ small, this suggests $\pi_{\mathrm{exp}}$ induces trajectories that are very sensitive to the unknown parameters, i.e., trajectory that are significantly more likely under one set of parameters than another. By exploring to maximize the Fisher information, we, therefore, will collect trajectories that are maximally informative about the unknown parameters, since we will observe trajectories much more likely under one set of parameters than another. Motivated by this, we therefore seek to play a policy during exploration that solves (2).
108
+
109
+ Implementing Fisher Information Maximization: In practice, several issues arise in solving (2), which we address here. First, the form of $\mathcal{I}(\theta, \pi)$ can be quite complicated, depending on the structure of $p_{\theta}(\cdot \mid \pi)$ , and it may not be possible to efficiently obtain a solution to (2). To address this, we make a simplifying assumption on the dynamics, that our next state, $s_{h+1}$ , evolves as:
110
+
111
+ $$
112
+ s _ {h + 1} = f _ {\boldsymbol {\theta}} \left(s _ {h}, a _ {h}\right) + w _ {h}, \tag {3}
113
+ $$
114
+
115
+ where $s_h$ and $a_h$ are the current state and action, $w_h \sim \mathcal{N}(0, \sigma_w^2 \cdot I)$ is Gaussian process noise, and $f_\theta$ are the nominal dynamics. Under these dynamics, the Fisher information matrix reduces to
116
+
117
+ $$
118
+ \mathcal {I} (\pmb {\theta}, \pi) = \sigma_ {w} ^ {- 2} \cdot \mathbb {E} _ {p _ {\pmb {\theta}} (\cdot | \pi)} \left[ \sum_ {h = 1} ^ {H} \nabla_ {\pmb {\theta}} f _ {\pmb {\theta}} (s _ {h}, a _ {h}) \cdot \nabla_ {\pmb {\theta}} f _ {\pmb {\theta}} (s _ {h}, a _ {h}) ^ {\top} \right].
119
+ $$
120
+
121
+ We argue that solving (2) with this form of $\mathcal{I}(\theta, \pi)$ is a very intuitive objective, even in cases when the dynamics may not follow (3) exactly. Indeed, this suggests that during exploration, we should aim to reach states for which the dynamics $f_{\theta}$ have a large gradient with respect to $\theta$ —states for which the next state predicted by the dynamics is very sensitive to $\theta$ . In such states, observing the next state gives us a significant amount of information on $\theta$ , allowing us to accurately identify $\theta^{\star}$ .
122
+
123
+ A second challenge in solving (2) is that we do not know the true parameter $\theta^{\star}$ , which the optimization (2) depends on. To circumvent this, we rely on domain randomization in choosing our exploration policy, solving instead:
124
+
125
+ $$
126
+ \pi_ {\exp} = \arg \min _ {\pi} \mathbb {E} _ {\boldsymbol {\theta} \sim q _ {0}} [ \operatorname {t r} (\mathcal {I} (\boldsymbol {\theta}, \pi) ^ {- 1}) ] \tag {4}
127
+ $$
128
+
129
+ for some distribution over parameters $q_0$ . While this is only an approximation of (2), in practice we find that this approximation yields effective exploration policies since, as described in Section 1, in many cases exploration policies require only a coarse model of the dynamics, and can therefore often be learned without precise knowledge of the unknown parameters.
130
+
131
+ A final challenge is that, in general, we may not have access to a differentiable simulator, and our dynamics themselves may not be differentiable. In such cases, $\nabla_{\theta}f_{\theta}(s_h,a_h)$ is unknown or
132
+
133
+ undefined, and the above approach cannot be applied. As a simple solution to this, we rely on a finite-differences approximation to the gradient, which still provides an effective measure of how sensitive the next state is to the unknown parameter. In practice, to solve (4) and obtain an exploration policy, we rely on standard policy optimization algorithms, such as PPO (Schulman et al., 2017b).
134
+
135
+ # 4.2 SYSTEM IDENTIFICATION
136
+
137
+ ASID runs the exploration policy $\pi_{\mathrm{exp}}$ (Section 4.1) in the real environment to generate a single trajectory $\pmb{\tau}_{\mathrm{real}} \sim p_{\pmb{\theta}^{\star}}(\cdot \mid \pi_{\mathrm{exp}})$ . In the system identification phase, ASID then updates the simulator parameters using the collected trajectory. The goal is to find a distribution over simulator parameters that yield trajectories that match $\pmb{\tau}_{\mathrm{real}}$ as closely as possible. In particular, we wish to find some distribution over simulation parameters, $q_{\phi}$ , which minimizes:
138
+
139
+ $$
140
+ \mathbb {E} _ {\boldsymbol {\theta} \sim q _ {\phi}} \big [ \mathbb {E} _ {\boldsymbol {\tau} _ {\mathrm {s i m}} \sim p _ {\boldsymbol {\theta}} (\cdot | \mathcal {A} (\boldsymbol {\tau} _ {\mathrm {r e a l}}))} \big [ \| \boldsymbol {\tau} _ {\mathrm {r e a l}} - \boldsymbol {\tau} _ {\mathrm {s i m}} \| _ {2} ^ {2} \big ] \big ]
141
+ $$
142
+
143
+ where $p_{\theta}(\cdot \mid \mathcal{A}(\tau_{\mathrm{real}}))$ denotes the distribution over trajectories generated by the simulator with parameter $\theta$ , and playing the same sequence of actions as were played in $\tau_{\mathrm{real}}$ . In practice, we apply REPS (Peters et al., 2010) for the simulation and Cross Entropy Method (CEM) for the real-world experiments. We stress that the ASD framework is generic, and other black-box optimization algorithms could be used instead.
144
+
145
+ # 4.3 SOLVING THE DOWNSTREAM TASK
146
+
147
+ After exploration and identification, the simulator can include information about the kinematic tree, position, orientation, or size of the object of interest, and the physical parameters of the real environment. With such a high-fidelity simulator, we aim to solve the downstream tasks entirely in simulation and transfer the learned policies $\pi_{\mathrm{task}}$ to the real world in a zero-shot fashion. As with the system identification stage, ASD does not assume a particular method for solving the downstream task and any policy optimization algorithm can be used.
148
+
149
+ # 5 EXPERIMENTAL EVALUATION
150
+
151
+ In our experimental evaluation, we aim to answer the following questions:
152
+
153
+ 1. Does ASD's exploration strategy yield sufficient information to identify unknown parameters?
154
+ 2. Are downstream task policies learned via ASD successful when using the identified parameters?
155
+ 3. Does the paradigm suggested by ASD transfer to performing tasks in the real world?
156
+
157
+ We conduct our experimental evaluation in two scenarios. First, we conduct empirical experiments entirely in simulation (Todorov et al., 2012) to validate the behavior of the exploration, system identification, and downstream task modules of ASD. This involves treating a true simulation environment as the real-world environment and then a reconstruction of this simulation environment as the approximate constructed simulation. Policies learned in this approximate simulation can then be evaluated back in the original simulation environment to judge efficacy. Second, we apply this to two real-world manipulation tasks that are inherently dependent on accurate parameter identification, showing the ability of ASD to function in the real world, using real-world data.
158
+
159
+ # 5.1 ABLATIONS AND BASELINE COMPARISONS
160
+
161
+ We compare ASD with several baselines and ablations for various portions of the pipeline.
162
+
163
+ Exploration: To understand the importance of targeted exploration via Fisher information maximization we compare with two baselines. First, we compare with the naive approach of using data from a random policy for system identification that is not performing any targeted exploration. Secondly, we compare with Kumar et al. (2019), which aims to generate exploration trajectories that maximize mutual information with the parameters of interest. This method essentially learns a parameter inference network and then rewards exploration policies for minimizing its error.
164
+
165
+ ![](images/e92362ec669732740f6b8e7db813ec48adedc8d75b7c3f174cf56f5f2a34fe8b.jpg)
166
+ (a) Rod balancing
167
+
168
+ ![](images/697374f7e8c5fa0ed31e21a4d9f836dc63132e30c3abc6213cfba7507e1b4b0e.jpg)
169
+ (b) Sphere manipulation
170
+
171
+ ![](images/41f14a30bb866aa5e82f7a4e9ceb5dd22fb75be525a1022560ec047bc20c27b2.jpg)
172
+ (c) Multi-friction
173
+ Figure 3: Depiction of environments in simulation
174
+
175
+ ![](images/e311c93d59e4a2efe58624d13a6fd03b5bc085ac31599cf8f90d3276d909b669.jpg)
176
+ (d) Articulation
177
+
178
+ System Identification: To evaluate the impact of system identification methods in this pipeline, we compare the effectiveness of using optimization-based system identification, e.g., (Peters et al., 2010; Memmel et al., 2022), with an end-to-end learned module (Kumar et al., 2019). This comparison shows the stability and extrapolation benefits of ASD over completely data-driven modeling techniques. In particular, we evaluate ASD with the optimization-based system identification replaced by the learned estimation module from Kumar et al. (2019) (ASID + estimator).
179
+
180
+ Downstream Policy Learning: Since the eventual goal is to solve the downstream task, we finally compare how effective it is to learn downstream policies in simulation as opposed to an uninformed Domain Randomization (DR) over the parameters, in contrast to the targeted and identified parameters that stem from the ASD pipeline.
181
+
182
+ # 5.2 SIMULATED TASK DESCRIPTIONS
183
+
184
+ Sphere Manipulation: We consider two sphere manipulation tasks where physical parameters like rolling friction, object stiffness, and tangential surface friction are unknown and make a significant impact on policy performance: 1) striking a golf ball to reach a goal with unknown system friction (Figure 3b), 2) striking a golf ball in an environment with multiple patches that experience different surface friction (Figure 3c). In each scenario, the position of objects and the physical parameters are varied across evaluations. In this setting, we train downstream tasks with PPO.
185
+
186
+ Rod Balancing: Balancing, or dynamic stacking of objects critically depends on an accurate estimate of the inertia parameters. We construct a rod balancing task where the agent can interact with a rod object (Figure 3a) to identify its physical parameters, in this case varying the distribution of mass along the rod. Once the parameters are identified, the rod must be balanced by placing it on a ledge (Figure 5 (left)). The error is measured by the tilting angle of the rod after placement, a task that requires accurate estimation of system parameters. In this case, we use the CEM to optimize downstream policies.
187
+
188
+ Articulation: To stress generality, we consider environments that don't simply identify physical parameters like mass or friction but also the structure of the kinematic tree such as articulation and joint positioning. We consider an environment involving an articulated laptop model with a binary environment parameter representing whether articulation is present or not (Figure 3d).
189
+
190
+ # 5.3 DOES ASID LEARN EFFECTIVE EXPLORATION BEHAVIOR?
191
+
192
+ To evaluate the exploration behavior quantitatively, we consider the case of multiple unknown parameters, where learning each parameter requires exploration in a different region. In particular, we compare the exploration policy learned by our method with the exploration method of Kumar et al. (2019), on the multi-friction sphere manipulation environment illustrated in Figure 3c where the surface exhibits three different friction parameters (indicated by the grass, sand, and gravel textures). We initialize the golf ball in the leftmost region (grass)—to explore, the arm must strike the ball to other regions to identify their friction parameters. We plot a heat map of the regions visited by the ball during exploration in Figure 4. As can be seen, our approach achieves roughly uniform coverage over the entire space, learning to strike the ball into each region, and illustrating that our method is able to effectively handle complex exploration tasks that involve exciting multiple parameters. In contrast, the approach of Kumar et al. (2019) does not effectively move the sphere to regions different from the starting region.
193
+
194
+ Table 1: Downstream task results in simulation: Random exploration fails in tasks where directed exploration is required, e.g., striking a sphere or finding the inertia of a rod. When placing the rod with a single action, domain randomization (DR) cannot solve the task without knowing the physical parameters. Learned system identification (Kumar et al. (2019) and $\mathrm{ASID} +$ estimator) doesn't generalize to unseen trajectories and becomes far less effective than optimization-based system identification (cf. $\mathrm{ASID} + \mathrm{SysID}$ ).
195
+
196
+ <table><tr><td>Task</td><td colspan="3">Rod Balancing</td><td>Sphere Striking</td></tr><tr><td>Metric</td><td colspan="3">Tilt angle in degree°</td><td>Success Rate in % ↑</td></tr><tr><td>Parameter</td><td>Inertia (left)</td><td>Inertia (middle)</td><td>Inertia (right)</td><td>Friction ~ [1.1, 1.5]</td></tr><tr><td>Random exploration</td><td>12.44 ± 19.6</td><td>4.20 ± 6.5</td><td>15.34 ± 15.9</td><td>10.62 ± 4.3</td></tr><tr><td>Kumar et al. (2019)</td><td>13.70 ± 9.3</td><td>2.82 ± 2.7</td><td>15.26 ± 9.8</td><td>9.50 ± 2.4</td></tr><tr><td>DR</td><td>26.69 ± 7.0</td><td>13.05 ± 7.3</td><td>1.13 ± 1.3</td><td>8.75 ± 1.5</td></tr><tr><td>ASID + estimator</td><td>17.73 ± 13.1</td><td>4.65 ± 5.1</td><td>9.99 ± 6.8</td><td>11.00 ± 5.2</td></tr><tr><td>ASID + SysID (ours)</td><td>0.00 ± 0.0</td><td>0.72 ± 1.0</td><td>0.00 ± 0.0</td><td>28.00 ± 9.7</td></tr></table>
197
+
198
+ We further analyze the exploration behavior in the articulation environment (Figure 3d). Here our exploration policy interacts with the laptop $80\%$ of the time as opposed to $20\%$ for naïve baselines. Appendix A.2.2 shows that models trained to predict articulation from interaction data, e.g., Ditto (Jiang et al., 2022), can infer joint and part-level geometry from the collected data.
199
+
200
+ # 5.4 HOW DOES ASID PERFORM
201
+
202
+ # QUANTITATIVELY IN SIMULATION ON DOWNSSTREAM TASKS?
203
+
204
+ To quantitatively assess the benefits of ASD over baselines and ablations, we evaluate the performance of ASD with respect to the baselines in simulation on downstream evaluation for the rod balancing (Figure 3a) and sphere manipulation (Figure 3c) task. Results are given in Table 1. Observing the performance on the rod environment, it becomes clear that previous methods struggle with one-shot tasks. When the inertia is not properly identified, CEM predicts the wrong action with high certainty, causing it to pick and place the rod at the wrong location. Domain randomization (DR) on the other hand tries to learn a policy over all possible mass distributions which in this case leads to a policy that always grasps the object at the center of the reference frame. The success here depends on "getting lucky" and sampling the correct action for the
205
+
206
+ ![](images/0c40718841ba689244bec07cb2924d2a4c39d4648a06a4c5472109abf931b90c.jpg)
207
+ (a) ASID
208
+
209
+ ![](images/8b6010dee3c3fba7b8e3ef7f5d25d11e90b565e5ce7dd628abb5d5afae3f9a63.jpg)
210
+ (b) Kumar et al. (2019)
211
+ Figure 4: Visitation frequency of the sphere when explored by different exploration policies on multi-friction (Figure 3c). ASD activates the sphere over a much larger area, thereby identifying parameters more accurately
212
+
213
+ In the sphere environment, the distance rolled and bounce of the sphere are critically dependent on parameters such as friction and stiffness, and misidentifying these parameters can lead to significantly different trajectories and unsuccessful downstream behavior. This is reflected in the significantly higher success rate of ASD as compared to baselines that are uninformed of parameters and simply optimize for robust policies (DR), those that try to use learned estimators for exploration (Kumar et al., 2019) or using random exploration.
214
+
215
+ # 5.5 DOES ASID ALLOW FOR REAL-WORLD CONTROLLER SYNTHESIS USING MINIMAL REAL-WORLD DATA?
216
+
217
+ We further evaluate ASD on real-world tasks, replicating the rod balancing task from simulation (Figure 5) and introducing a novel shuffleboard task (Figure 6). As in simulation, we use a Franka Emika Panda robot for exploration and task performance in the real world. We compute the object's position and orientation by color-threshold the pointclouds from two calibrated Intel RealSense D455 cameras—this approach could easily be replaced by a more sophisticated pose estimation system if desired.
218
+
219
+ Rod Balancing: The goal of this task is to properly balance a rod with an unknown mass distribution by informatively exploring the environment in the real world and using the resulting data to identify the appropriate physics parameters in simulation. The optimized controller in simulation is then deployed to perform the task in the real world. In this case, the downstream task is picking the rod at a certain point along its axis and balancing it on a perch (Figure 1, Figure 5).
220
+
221
+ The policy executes the downstream task by a pick and place primitive parameterized by the exact pick point. We deploy ASD fully autonomously, executing exploration, system identification, downstream task training, and execution in an end-to-end fashion.
222
+
223
+ The mass distribution in the rod is varied and both the inertia and the environment friction must be inferred. While ASD correctly identifies the inertia of the rod most of the time, we find that a center of mass close to the middle of the rod causes ambiguities that hurt our system identification process causing the simulation to not be accurate enough for zero-shot transfer. Overall, ASD solves the rod-balancing task 6/9 times across varying mass distribution and pose while a domain-randomization policy trained without any environment interaction fails to solve it at all (Table 2).
224
+
225
+ Shuffleboard: This task is a scaled-down version of the popular bar game tabletop shuffle-
226
+
227
+ ![](images/97ead37ff4566571d10a86f2f5d049351f0c7ce96358a8e6e13d9e8dd95e06bd.jpg)
228
+ Figure 5: Real-world Rod Balancing: Simulation setup for training exploration and downstream task policies (left). Successful execution of autonomous real-world rod balancing with skewed mass (right).
229
+
230
+ ![](images/54acf3f7512ce9d910ff1d6f7d25bdab059e9cc0eba7c237c035d191e8756879.jpg)
231
+
232
+ Table 2: Downstream task results in real: ASD successfully balances the rod while domain randomization (DR) fails catastrophically.
233
+
234
+ <table><tr><td>Task</td><td colspan="3">Rod Balancing</td></tr><tr><td>Inertia</td><td>left</td><td>middle</td><td>right</td></tr><tr><td>DR</td><td>0/3</td><td>0/3</td><td>0/3</td></tr><tr><td>ASID (ours)</td><td>2/3</td><td>1/3</td><td>3/3</td></tr></table>
235
+
236
+ board where a puck must be shot to a target area on a slippery board. We closely follow the original game and pour wax (sand) on the board to decrease the surface friction. This modification makes the task especially difficult as the surface friction on the board changes slightly after each shot since the puck displaces the wax. The goal is to strike the puck to one of the target regions—one closer (yellow) and one further (blue) away from the robot (Figure 2, Figure 6). After exploring the scene, ASD estimates the sliding and torsional friction of the puck to account for the changing surface friction of the board. For executing the downstream task, a primitive positions the endeffector at a fixed distance to the puck and a policy predicts a force value that parameterizes a shot attempt.
237
+
238
+ Due to the changing surface friction, the domain randomization baseline struggles to shoot the puck to the desired zone. While it succeeds 3/10 times—probably because the surface friction was part of its training distribution—the other attempts fall short or overshoot the target. With its dedicated exploration phase, ASD can accurately adapt the simulation to the current conditions and lands the puck in the desired zone 7/10 times (Table 3).
239
+
240
+ # 6 DISCUSSION
241
+
242
+ In this work, we introduced a novel pipeline for performing real-world control by autonomously exploring the environment, using the collected data for system identification, and the resulting identified system for downstream policy optimization. In essence, this sim-to-real-to-sim-to-real pipeline allows for targeted test-time construction of simulation environments in a way that enables the performance of downstream tasks. We demonstrate how this
243
+
244
+ ![](images/f9b8c663ae723771e27fc999493f3fe12a12c45a0f4dbe4e7fd23cb988daca86.jpg)
245
+ Figure 6: Real-world Shuffleboard: Simulation setup for training exploration and downstream task policies (left). Successful strike to the yellow zone (right).
246
+
247
+ ![](images/0e07bb54aaf6c5bdc8929af19ee9c0a283b511b7ec3610226617bc2a0d40ef50.jpg)
248
+
249
+ Table 3: Downstream task results in real: ASID outperforms domain randomization (DR) on shooting the puck to the desired zones.
250
+
251
+ <table><tr><td>Task</td><td colspan="2">Shuffleboard</td></tr><tr><td>Target zone</td><td>yellow (close)</td><td>blue (far)</td></tr><tr><td>DR</td><td>2/5</td><td>1/5</td></tr><tr><td>ASID (ours)</td><td>4/5</td><td>3/5</td></tr></table>
252
+
253
+ type of identification requires autonomous and carefully directed exploration, and introduce a novel algorithm based on Fisher information maximization that is able to accomplish this directed exploration. The autonomously collected trajectories can then be paired with downstream optimization-based system identification and reconstruction algorithms for accurate simulation construction and downstream policy learning. We show the efficacy of this paradigm on multiple environments in simulation, as well as on rod balancing and shuffleboard, two challenging real-world tasks.
254
+
255
+ # REFERENCES
256
+
257
+ Karl Johan Åström and Peter Eykhoff. System identification—a survey. Automatica, 1971.
258
+ Xavier Bombois, Michel Gevers, Roland Hildebrand, and Gabriel Solari. Optimal experiment design for open and closed-loop system identification. Communications in Information and Systems, 11 (3):197-224, 2011.
259
+ Avinandan Bose, Simon Shaolei Du, and Maryam Fazel. Offline multi-task transfer rl with representational penalization. arXiv preprint arXiv:2402.12570, 2024.
260
+ Yevgen Chebotar, Ankur Handa, Viktor Makoviychuk, Miles Macklin, Jan Issac, Nathan Ratliff, and Dieter Fox. Closing the sim-to-real loop: Adapting simulation randomization with real world experience. In ICRA, 2019.
261
+ Qiuyu Chen, Marius Memmel, Alex Fang, Aaron Walsman, Dieter Fox, and Abhishek Gupta. Urdformer: Constructing interactive realistic scenes from real images via simulation and generative modeling. In Towards Generalist Robots: Learning Paradigms for Scalable Skill Acquisition@ CoRL2023, 2023.
262
+ Tao Chen, Megha Tippur, Siyang Wu, Vikash Kumar, Edward Adelson, and Pulkit Agrawal. Visual dexterity: In-hand dexterous manipulation from depth. arXiv preprint arXiv:2211.11744, 2022.
263
+ Kurtland Chua, Roberto Calandra, Rowan McAllister, and Sergey Levine. Deep reinforcement learning in a handful of trials using probabilistic dynamics models. Advances in neural information processing systems, 31, 2018.
264
+ Marc Deisenroth and Carl E Rasmussen. Pilco: A model-based and data-efficient approach to policy search. In Proceedings of the 28th International Conference on machine learning (ICML-11), pp. 465-472, 2011.
265
+ Jiafei Duan, Yi Ru Wang, Mohit Shridhar, Dieter Fox, and Ranjay Krishna. Ar2-d2: Training a robot without a robot. In 7th Annual Conference on Robot Learning, 2023.
266
+ Ziyan Gao, Armagan Elibol, and Nak Young Chong. A 2-stage framework for learning to push unknown objects. In Joint IEEE 10th International Conference on Development and Learning and Epigenetic Robotics (ICDL-EpiRob), 2020.
267
+ Ziyan Gao, Armagan Elibol, and Nak Young Chong. Estimating the center of mass of an unknown object for nonprehensile manipulation. In IEEE International Conference on Mechatronics and Automation (ICMA), 2022.
268
+ Laszlo Gerencser and Håkan Hjalmarsson. Adaptive input design in system identification. In Proceedings of the 44th IEEE Conference on Decision and Control, pp. 4988-4993. IEEE, 2005.
269
+ László Gerencsér, Håkan Hjalmarsson, and Jonas Martensson. Identification of arx systems with non-stationary inputs—asymptotic analysis with application to adaptive input design. Automatica, 45(3):623-633, 2009.
270
+ Michel Gevers, Alexandre S Bazanella, Xavier Bombois, and Ljubisa Miskovic. Identification and the information matrix: how to get just sufficiently rich? IEEE Transactions on Automatic Control, 54(ArtICLE):2828-2840, 2009.
271
+ Graham Clifford Goodwin and Robert L Payne. Dynamic system identification: experiment design and data analysis. Academic press, 1977.
272
+ Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018.
273
+ Danijar Hafner, Timothy Lillicrap, Jimmy Ba, and Mohammad Norouzi. Dream to control: Learning behaviors by latent imagination. arXiv preprint arXiv:1912.01603, 2019.
274
+ Danijar Hafner, Timothy Lillicrap, Mohammad Norouzi, and Jimmy Ba. Mastering atari with discrete world models. arXiv preprint arXiv:2010.02193, 2020.
275
+
276
+ Per Hägg, Christian A Larsson, and Håkan Hjalmarsson. Robust and adaptive excitation signal generation for input and output constrained systems. In 2013 European Control Conference (ECC), pp. 1416-1421. IEEE, 2013.
277
+ Ankur Handa, Arthur Allshire, Viktor Makoviychuk, Aleksei Petrenko, Ritvik Singh, Jingzhou Liu, Denys Makoviichuk, Karl Van Wyk, Alexander Zhurkevich, Balakumar Sundaralingam, et al. Dextreme: Transfer of agile in-hand manipulation from simulation to reality. arXiv preprint arXiv:2210.13702, 2022.
278
+ Håkan Hjalmarsson, Michel Gevers, and Franky De Bruyne. For model-based control design, closed-loop identification gives better performance. Automatica, 32(12):1659-1673, 1996.
279
+ Cheng-Chun Hsu, Zhenyu Jiang, and Yuke Zhu. Ditto in the house: Building articulation models of indoor scenes through interactive perception. In ICRA, 2023.
280
+ Peide Huang, Xilun Zhang, Ziang Cao, Shiqi Liu, Mengdi Xu, Wenhao Ding, Jonathan Francis, Bingqing Chen, and Ding Zhao. What went wrong? closing the sim-to-real gap via differentiable causal discovery. In Conference on Robot Learning, pp. 734-760. PMLR, 2023.
281
+ Jemin Hwangbo, Joonho Lee, Alexey Dosovitskiy, Dario Bellicoso, Vassilios Tsounis, Vladlen Koltun, and Marco Hutter. Learning agile and dynamic motor skills for legged robots. Science Robotics, 2019.
282
+ Michael Janner, Justin Fu, Marvin Zhang, and Sergey Levine. When to trust your model: Model-based policy optimization. Advances in neural information processing systems, 32, 2019.
283
+ Michael Janner, Yilun Du, Joshua B Tenenbaum, and Sergey Levine. Planning with diffusion for flexible behavior synthesis. arXiv preprint arXiv:2205.09991, 2022.
284
+ Zhenyu Jiang, Cheng-Chun Hsu, and Yuke Zhu. Ditto: Building digital twins of articulated objects from interaction. In CVPR, 2022.
285
+ Ryan Julian, Benjamin Swanson, Gaurav Sukhatme, Sergey Levine, Chelsea Finn, and Karol Hausman. Never stop learning: The effectiveness of fine-tuning in robotic reinforcement learning. In CoRL, 2021.
286
+ Ashish Kumar, Zipeng Fu, Deepak Pathak, and Jitendra Malik. Rma: Rapid motor adaptation for legged robots. arXiv preprint arXiv:2107.04034, 2021.
287
+ K Niranjan Kumar, Irfan Essa, Sehoon Ha, and C Karen Liu. Estimating mass distribution of articulated objects using non-prehensile manipulation. arXiv preprint arXiv:1907.03964, 2019.
288
+ Jacky Liang, Saumya Saxena, and Oliver Kroemer. Learning active task-oriented exploration policies for bridging the sim-to-real gap. Robotics science and systems, 2020.
289
+ Kristian Lindqvist and Håkan Hjalmarsson. Identification for control: Adaptive input design using convex optimization. In Proceedings of the 40th IEEE Conference on Decision and Control (Cat. No. 01CH37228), volume 5, pp. 4326-4331. IEEE, 2001.
290
+ Lennart Ljung. System identification. Springer, 1998.
291
+ Liqian Ma, Jiaojiao Meng, Shuntao Liu, Weihang Chen, Jing Xu, and Rui Chen. Sim2real: Actively building explicit physics model for precise articulated object manipulation. In ICRA, 2023.
292
+ Ian R Manchester. Input design for system identification via convex relaxation. In 49th IEEE Conference on Decision and Control (CDC), pp. 2041-2046. IEEE, 2010.
293
+ Horia Mania, Michael I Jordan, and Benjamin Recht. Active learning for nonlinear system identification with guarantees. J. Mach. Learn. Res., 23:32-1, 2022.
294
+ Gabriel B Margolis, Xiang Fu, Yandong Ji, and Pulkit Agrawal. Learning physically grounded robot vision with active sensing motor policies. In CoRL, 2023.
295
+ Nikos Mavrakis, Rustam Stolkin, et al. Estimating an object's inertial parameters by robotic pushing: a data-driven approach. In IROS, 2020.
296
+
297
+ Raman Mehra. Optimal input signals for parameter estimation in dynamic systems-survey and new results. IEEE Transactions on Automatic Control, 19(6):753-768, 1974.
298
+ Raman K Mehra. Synthesis of optimal inputs for multiinput-multioutput (mimo) systems with process noise part i: Frequenc y-domain synthesis part ii: Time-domain synthesis. In Mathematics in Science and Engineering, volume 126, pp. 211-249. Elsevier, 1976.
299
+ Bhairav Mehta, Manfred Diaz, Florian Golemo, Christopher J Pal, and Liam Paull. Active domain randomization. In CoRL, 2020.
300
+ Marius Memmel, Puze Liu, Davide Tateo, and Jan Peters. Dimensionality reduction and prioritized exploration for policy search. In International Conference on Artificial Intelligence and Statistics, 2022.
301
+ Kunal Menda, Jean De Becdelievre, Jayesh Gupta, Ilan Kroo, Mykel Kochenderfer, and Zachary Manchester. Scalable identification of partially observed systems with certainty-equivalent em. In ICML. PMLR, 2020.
302
+ Kaichun Mo, Leonidas J Guibas, Mustafa Mukadam, Abhinav Gupta, and Shubham Tulsiani. Where2act: From pixels to actions for articulated 3d objects. In CVPR, 2021.
303
+ Fabio Muratore, Michael Gienger, and Jan Peters. Assessing transferability from simulation to reality for reinforcement learning. IEEE transactions on pattern analysis and machine intelligence, 2019.
304
+ Anusha Nagabandi, Gregory Kahn, Ronald S Fearing, and Sergey Levine. Neural network dynamics for model-based deep reinforcement learning with model-free fine-tuning. In 2018 IEEE international conference on robotics and automation (ICRA), pp. 7559-7566. IEEE, 2018.
305
+ Mitsuhiko Nakamoto, Yuexiang Zhai, Anikait Singh, Yi Ma, Chelsea Finn, Aviral Kumar, and Sergey Levine. Cal-QL: Calibrated offline RL pre-training for efficient online fine-tuning. In Workshop on Reincarnating Reinforcement Learning at ICLR, 2023.
306
+ Neil Nie, Samir Yitzhak Gadre, Kiana Ehsani, and Shuran Song. Structure from action: Learning interactions for articulated object 3d structure discovery. arXiv preprint arXiv:2207.08997, 2022.
307
+ Marcin Andrychowicz OpenAI, Bowen Baker, Maciek Chociej, Rafal Jozefowicz, Bob McGrew, Jakub W Pachocki, Jakub Pachocki, Arthur Petron, Matthias Plappert, Glenn Powell, et al. Learning dexterous in-hand manipulation. arXiv preprint arXiv:1808.00177, 2018.
308
+ Deepak Pathak, Dhiraj Gandhi, and Abhinav Gupta. Self-supervised exploration via disagreement. In International conference on machine learning, pp. 5062-5071. PMLR, 2019.
309
+ Jan Peters, Katharina Mulling, and Yasemin Altun. Relative entropy policy search. In AAAI, 2010.
310
+ Luc Pronzato and Andrej Pázman. Design of experiments in nonlinear models. Lecture notes in statistics, 212(1), 2013.
311
+ Friedrich Pukelsheim. Optimal design of experiments. SIAM, 2006.
312
+ Haozhi Qi, Ashish Kumar, Roberto Calandra, Yi Ma, and Jitendra Malik. In-hand object rotation via rapid motor adaptation. In CoRL, 2023.
313
+ Fabio Ramos, Rafael Carvalhaes Possas, and Dieter Fox. Bayessim: adaptive domain randomization via probabilistic inference for robotics simulators. arXiv preprint arXiv:1906.01728, 2019.
314
+ Allen Z Ren, Hongkai Dai, Benjamin Burchfiel, and Anirudha Majumdar. Adaptsim: Task-driven simulation adaptation for sim-to-real transfer. arXiv preprint arXiv:2302.04903, 2023.
315
+ SM Richards, N Azizan, J-JE Slotine, and M Pavone. Adaptive-control-oriented meta-learning for nonlinear systems. In Robotics science and systems, 2021.
316
+ Cristian R Rojas, James S Welsh, Graham C Goodwin, and Arie Feuer. Robust optimal experiment design for system identification. Automatica, 43(6):993-1008, 2007.
317
+
318
+ Cristian R Rojas, Juan-Carlos Aguero, James S Welsh, Graham C Goodwin, and Arie Feuer. Robustness in experiment design. IEEE Transactions on Automatic Control, 57(4):860-874, 2011.
319
+ Nikita Rudin, David Hoeller, Philipp Reist, and Marco Hutter. Learning to walk in minutes using massively parallel deep reinforcement learning. In CoRL, 2022.
320
+ Fereshteh Sadeghi and Sergey Levine. Cad2rl: Real single-image flight without a single real image. arXiv preprint arXiv:1611.04201, 2016.
321
+ Thomas B Schon, Adrian Wills, and Brett Ninness. System identification of nonlinear state-space models. Automatica, 2011.
322
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. CoRR, abs/1707.06347, 2017a. URL http://arxiv.org/abs/1707.06347.
323
+ John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017b.
324
+ Pranav Shyam, Wojciech Jaskowski, and Faustino Gomez. Model-based active exploration. In ICML, 2019.
325
+ Rohan Sinha, James Harrison, Spencer M Richards, and Marco Pavone. Adaptive robust model predictive control with matched and unmatched uncertainty. In 2022 American Control Conference (ACC), 2022.
326
+ Laura Smith, J Chase Kew, Xue Bin Peng, Sehoon Ha, Jie Tan, and Sergey Levine. Legged robots that keep on learning: Fine-tuning locomotion policies in the real world. In 2022 International Conference on Robotics and Automation (ICRA), pp. 1593-1599. IEEE, 2022.
327
+ Torsten Soderström and Petre Stoica. System identification. Prentice-Hall International, 1989.
328
+ Bingjie Tang, Michael A Lin, Iretiayo Akinola, Ankur Handa, Gaurav S Sukhatme, Fabio Ramos, Dieter Fox, and Yashraj Narang. Industreal: Transferring contact-rich assembly tasks from simulation to reality. arXiv preprint arXiv:2305.17110, 2023.
329
+ Josh Tobin, Rachel Fong, Alex Ray, Jonas Schneider, Wojciech Zaremba, and Pieter Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In IROS, 2017.
330
+ Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ international conference on intelligent robots and systems, 2012.
331
+ Marcel Torne, Anthony Simeonov, Zechu Li, April Chan, Tao Chen, Abhishek Gupta, and Pulkit Agrawal. Reconciling reality through simulation: A real-to-sim-to-real approach for robust manipulation. Arxiv, 2024.
332
+ Aad W Van der Vaart. Asymptotic statistics, volume 3. Cambridge university press, 2000.
333
+ Andrew Wagenmaker and Kevin Jamieson. Active learning for identification of linear dynamical systems. In Conference on Learning Theory, pp. 3487-3582. PMLR, 2020.
334
+ Andrew Wagenmaker, Guanya Shi, and Kevin Jamieson. Optimal exploration for model-based rl in nonlinear systems. arXiv preprint arXiv:2306.09210, 2023.
335
+ Andrew J. Wagenmaker, Max Simchowitz, and Kevin Jamieson. Task-optimal exploration in linear dynamical systems. In International Conference on Machine Learning, pp. 10641-10652. PMLR, 2021.
336
+ Yian Wang, Ruihai Wu, Kaichun Mo, Jiaqi Ke, Qingnan Fan, Leonidas J Guibas, and Hao Dong. Adaafford: Learning to adapt manipulation affordance for 3d articulated objects via few-shot interactions. In ECCV, 2022.
337
+
338
+ Grady Williams, Nolan Wagener, Brian Goldfain, Paul Drews, James M Rehg, Byron Boots, and Evangelos A Theodorou. Information theoretic mpc for model-based reinforcement learning. In 2017 IEEE international conference on robotics and automation (ICRA), pp. 1714-1721. IEEE, 2017.
339
+ Zhenjia Xu, Jiajun Wu, Andy Zeng, Joshua B Tenenbaum, and Shuran Song. Densephysnet: Learning dense physical object representations via multi-step dynamic interactions. In RSS, 2019.
340
+ 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, pp. 1094-1100. PMLR, 2020.
341
+ Chuning Zhu, Max Simchowitz, Siri Gadipudi, and Abhishek Gupta. Repo: Resilient model-based reinforcement learning by regularizing posterior predictability. In Thirty-seventh Conference on Neural Information Processing Systems, 2023. URL https://openreview.net/forum?id=OIJ3VXDy6s.
342
+ Henry Zhu, Abhishek Gupta, Aravind Rajeswaran, Sergey Levine, and Vikash Kumar. Dexterous manipulation with deep reinforcement learning: Efficient, general, and low-cost. In 2019 International Conference on Robotics and Automation (ICRA), pp. 3651-3657. IEEE, 2019.
343
+ Shaojun Zhu, Andrew Kimmel, Kostas Bekris, and Abdeslam Boullarias. Fast model identification via physics engines for data-efficient policy search. In *IJCAI*, 2018.
344
+
345
+ # A APPENDIX
346
+
347
+ # A.1 TASKDETAILS
348
+
349
+ # A.1.1 SPHERE MANIPULATION
350
+
351
+ In the sphere manipulation tasks, the observation space consists of endeffector position, sphere position, and robot joint angles. During the training of the exploration policy, we randomize the location of a sphere with $r = 0.03$ to be between $x \in [0.430, 0.65]$ , $y \in [-0.2, 0.23]$ for training and $x \in [0.55, 0.65]$ , $y \in [-0.2, 0.23]$ for evaluation. Parameter ranges for training are 1) friction $\theta \in [1e - 3, 5e - 3]$ and 2) patch friction $\theta_0, \theta_1, \theta_2 \in [1e - 5, 1e - 3]$ and set fixed sphere and goal locations as well as parameters for the downstream task. For 1) we attach a paddle and limit the endeffector position such that the robot has to strike the sphere to the goal.
352
+
353
+ # A.1.2 ARTICULATION
354
+
355
+ In the case of the articulation environment, the parameter is binary and indicates whether articulation is present or not. During evaluation, articulation is always turned on and success is indicated by $\delta \beta > 1e - 2$ . The initial laptop state is randomized over position $x \in [0.45, 0.65]$ , $y \in [-0.1, 0.1]$ , $yaw \in [0.00, 3.14]$ and lid angle $\beta \in [1.2, 2.5]$ . The observation space contains the endeffector position, joint angles, position, orientation, and joint angle of the laptop.
356
+
357
+ # A.1.3 ROD BALANCING
358
+
359
+ Similar to the sphere manipulation, we restrict the exploration policy to endeffector control with $\delta x, \delta y$ and attach a peg to the Franka. The rod has dimensions $0.04 \times 0.3 \times 0.04$ and initializes as $x \in [0.5, 0.6], y \in [-0.2, 0.2], yaw \in [0.00, 3.14]$
360
+
361
+ # A.2 QUALITATIVE RESULTS
362
+
363
+ # A.2.1 EXPLORATION STRATEGIES LEARNED BY THE AGENT
364
+
365
+ We evaluate the exploration behavior qualitatively across multiple environments to understand whether the exploration behavior is meaningful. In the sphere environment, we observe the agent hitting the sphere multiple times when it bounces off the walls or stays within reach. The other environments also experience emergent behavior, as the agent executes a horizontal motion towards the top of the lid if the laptop is mostly open while an almost closed laptop causes it to push from top to bottom instead. Finally, when determining the rod's inertia, the policy pushes both sides to gain maximum information about the center of mass through the rotation motions in both directions. See Figure 7 for a visualization of the exploration for the sphere environment.
366
+
367
+ ![](images/88e67f76b3dcac6ed7fe3a4e058f7ddf1cb022d93485399766847d94e4a9b17c.jpg)
368
+ (a)
369
+
370
+ ![](images/b2c8249d46910b95a810fa027d282907f3608060d880abc644df4e85f57cd571.jpg)
371
+ (b)
372
+ Figure 7: Absolute sphere displacement for different sphere starting locations. Zero means the sphere didn't get hit, higher numbers denote larger displacements. Initial endeffector position marked in red a) Random Coverage, b) PPO Coverage, c) Fisher Coverage, d) Legend.
373
+
374
+ ![](images/a7a7ff719430050f1d379aa117982acee7b77226230dc727ec36f90e676311ed.jpg)
375
+ (c)
376
+ (d)
377
+
378
+ # A.2.2 RECONSTRUCTING ARTICULATION FROM INTERACTION DATA
379
+
380
+ ![](images/d86c3bd2c58a00e28a097c6008a5bfa708613a3ce450ddb9d779b82c8ca39d2e.jpg)
381
+ Figure 8: Articulated object: before (left) and after (middle) exploration with ASD and part-level reconstruction with Ditto (Jiang et al., 2022): articulated $\blacksquare$ and static part $\blacksquare$ (right).
382
+
383
+ ![](images/cc025e6a51187e73099ace305b85fbec9d46d5e729ea1d9f081f1e292970d4cf.jpg)
384
+
385
+ ![](images/b6ddffa2c57a5a4ae9f1223409d84cefbe36df9300c3304b72f3d0d3d5aa3c05.jpg)
386
+
387
+ # A.3 COMPARISON TO MODEL-BASED APPROACHES
388
+
389
+ # A.3.1 ENVIRONMENT SETUP
390
+
391
+ ![](images/c7328bb6cec3777cc27662812a4da8d072f749241e6a6bd00ee4d48a9f238ff0.jpg)
392
+ Figure 9: Environment with multiple spheres. The single red sphere is subject to changing friction values while the three blue spheres act as distractors.
393
+
394
+ # A.3.2 MODEL-BASED EXPLORATION
395
+
396
+ In this section, Figure 10, we compare the performance of our algorithm to that of the MAX algorithm (Shyam et al., 2019).
397
+
398
+ MAX aims to cover the state space through multiple policies throughout training. Since it uses the disagreement between fully learned dynamics models, it gets distracted by novel states induced by the movement of all spheres (red and blue). In contrast, our method based on the Fisher information yields a single policy that seeks out the sphere affected by the changing physics parameters (red) and ignores the irrelevant spheres (blue) even if they lead to novel states.
399
+
400
+ ![](images/42cc6b51bf4a68edaf9d18fcb55084cd20c81045542b5b0c2f6c2edd500418d3.jpg)
401
+ (a) MAX (checkpoints throughout training)
402
+
403
+ ![](images/28e5f461d8253e375093814e1f8991e08e868d30966e6170ba0cb4c6957de18a.jpg)
404
+ (b) MAX (last checkpoints)
405
+
406
+ ![](images/d15278b0ba3718195425ac294d65e03120c64ef996de0ca1902a4da193d430b2.jpg)
407
+ (c) Fisher information (checkpoints throughout training)
408
+
409
+ ![](images/124b7c407801a03b46742668c6e148ce184a9ac8dadf85813748a1b9cd5cc427.jpg)
410
+ (d) Fisher information (last checkpoint)
411
+ Figure 10: Exploration MAX vs. Fisher information: Trajectories collected (30) from policy checkpoints throughout training or from the last policy checkpoint. While Model-based Active Exploration (MAX) (Shyam et al., 2019) explores the state space over the course of training, getting distracted by the novel states induced by the blue spheres $\blacksquare$ (c.f. fig. 10a), Fisher information-based exploration (ours) shows directed exploration (c.f. fig. 10d), moving towards the sphere with changing parameters (red $\blacksquare$ ) and yielding a single exploration policy.
412
+
413
+ # A.3.3 LEARNED STATE-TRANSITION MODELS VS. SIMULATORS
414
+
415
+ We next illustrate the improvement using a simulator vs a fully learned dynamics model can give. We train a forward dynamics model (three layer MLP) on data generated both from MAX and our exploration procedure. When evaluated on out-of-distribution trajectories, i.e., trajectories not included in the training data, we find the model to be extremely inaccurate (see Figure 11). While the simulator extrapolates to unseen states and correctly predicts the movement of the sphere, the model hallucinates movement even when the end-effector does not interact with it at all! These findings make ASID preferable to a purely model-based approach.
416
+
417
+ ![](images/bfd00204d235cf2a3c9177a6a5c7a944551fcf20cb315ae56cf35d87e36cc208.jpg)
418
+ (a) MAX (pushing actions)
419
+
420
+ ![](images/dfcecb9588b5fee519beeeaba891b25e722176fe38ca51c1775889130449ef55.jpg)
421
+ (b) MAX (zero actions)
422
+
423
+ ![](images/64d2a64cfab890a9bb5440d13cf2b56bce855742c7e4e10b5e4b4363f7a13fce.jpg)
424
+ (c) Fisher information (pushing actions)
425
+
426
+ ![](images/c90f5215d9859b8479126a23a040eb3c982b0408e8f6bba1c854e99bb458604e.jpg)
427
+ (d) Fisher information (zero actions)
428
+ Figure 11: Learned models vs. simulator: Evaluation of a forward model trained on trajectories (30) from MAX (Shyam et al., 2019) (checkpoints throughout training) and Fisher information (last checkpoint). In contrast to our simulator, the learned model fails to predict the red sphere's trajectory accurately even under no contact scenarios (c.f. fig. 11b, fig. 11d).
429
+
430
+ # A.4 POLICY GENERALIZATION
431
+
432
+ We evaluate the generalization capabilities of our exploration policy for different sphere locations and parameter combinations seen and unseen during training (Figure 13). Since we train the policies using an arena setup, we remove the arena during this evaluation to be able to query sphere locations outside of it (Figure 12).
433
+
434
+ ![](images/0a66e7e74d783e56c6e303d23d942a3a67b0149d34f3648708a61fbd50b31157.jpg)
435
+ Figure 12: Environment with free space. The red sphere is subject to changing parameter values and position is randomized.
436
+
437
+ ![](images/0be412378c5a9e3a00a2a7339350ce0bc846481b2cf693a9e11d163976eddfe3.jpg)
438
+ (a) Changing friction parameters (in distribution)
439
+
440
+ ![](images/582062e3989358cdc7aa689d662b78257d4bac60b320c6b11641ce8c93a6c47e.jpg)
441
+ (b) Changing mass parameter (out of distribution)
442
+ Figure 13: Generalization capabilities of an exploration policy trained on sphere friction for different sphere starting locations. The plot shows the success rate of pushing the sphere spawned at the corresponding x-y-location and evaluated over 5 different seeds, i.e., different physics parameter values. Initial endeffector position marked in red. Boxes denote sphere locations seen during training (purple box) and reachable area of the endeffector (orange box). Our policies experience surprising generalization capabilities to unseen sphere locations as long as they can be reached by the robot (cf.fig. 13a). Furthermore, the actions extrapolate to unseen physics parameters as long as they can be uncovered with similar interactions, e.g., pushing (cf.fig. 13b). This is the case because the policy does not have any information about the underlying physics parameters until it hits the sphere.
2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d0ba97993967f8f9128be5b3c4a7e7e24701297424342a5836b4da11c9023cbc
3
+ size 550431
2024/ASID_ Active Exploration for System Identification in Robotic Manipulation/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/9e8fce71-9845-4483-82b8-2e8fb64c4467_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/9e8fce71-9845-4483-82b8-2e8fb64c4467_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/9e8fce71-9845-4483-82b8-2e8fb64c4467_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ab315d9bb4b6e7cb84053fe158d69668c849c101d2ab0818a5b8b0cfa9f7740
3
+ size 1881594
2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aad6b1c7ff3fad4cc4552b906619e250c832b1bcfd024ae4c8d8ba687f4e75f0
3
+ size 2702403
2024/Accelerating Distributed Stochastic Optimization via Self-Repellent Random Walks/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Amortizing intractable inference in large language models/7ed5418b-3773-431a-ac5f-3cceb14f6956_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Amortizing intractable inference in large language models/7ed5418b-3773-431a-ac5f-3cceb14f6956_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Amortizing intractable inference in large language models/7ed5418b-3773-431a-ac5f-3cceb14f6956_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d08861c19ee7459e920d74719d5816f5fdeb1e02c3807c079bf0bc6999feb418
3
+ size 739651
2024/Amortizing intractable inference in large language models/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Amortizing intractable inference in large language models/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b8973e2d73ac7138740b9b6760d4543feaf36023238d2857c6005849a01a2d1
3
+ size 2041029
2024/Amortizing intractable inference in large language models/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/1a6e78f9-a669-4d03-b852-34ab11b21b42_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/1a6e78f9-a669-4d03-b852-34ab11b21b42_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/1a6e78f9-a669-4d03-b852-34ab11b21b42_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:771db9441807f568fc26757dc685bbff1918ed5afdd0b061075b041393801910
3
+ size 28640525
2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/full.md ADDED
@@ -0,0 +1,513 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AN ANALYTICAL SOLUTION TO GAUSS-NEWTON LOSS FOR DIRECT IMAGE ALIGNMENT
2
+
3
+ Sergei Solonets $^{1,2,*}$ Daniil Sinitsyn $^{1,2,*}$
4
+
5
+ Lukas von Stumberg $^{3,\dagger}$ Nikita Araslanov $^{1,2}$ Daniel Cremers $^{1,2}$
6
+
7
+ <sup>1</sup> Technical University of Munich
8
+ 2 Munich Center for Machine Learning
9
+ 3 Valve Software
10
+
11
+ ![](images/45ed605ea8fc0824ef2dac048c5d768f6e8e7ce2fe3fe94355da849bc9204e14.jpg)
12
+ Figure 1: Direct image alignment is a technique for aligning scenes based on image intensities. Recent learning-based methods seek to improve its success rate by increasing the convergence basin. We derive an analytical solution to the core idea of such methods, the Gauss-Newton loss, enabling fine-grained control over the basin of convergence. As a result, we can successfully align two scenes despite a highly imprecise initialization. From left to right, the example above illustrates the convergence of the reprojected keypoints (red) to the ground truth (green) by optimizing the SE(3) camera pose with our analytical solution. The blue color is the re-projection in the first iteration.
13
+
14
+ ![](images/eae3db6aee13ba2c8ff208b0c14ec4553a4a5e31b812be8896bd3841ed9f0658.jpg)
15
+
16
+ ![](images/35752841c5a829c17a1c6f48b0342e06ec16d815c6e46982b27bd0ed82a52af5.jpg)
17
+
18
+ # ABSTRACT
19
+
20
+ Direct image alignment is a widely used technique for relative 6DoF pose estimation between two images, but its accuracy strongly depends on pose initialization. Therefore, recent end-to-end frameworks increase the convergence basin of the learned feature descriptors with special training objectives, such as the Gauss-Newton loss. However, the training data may exhibit bias toward a specific type of motion and pose initialization, thus limiting the generalization of these methods. In this work, we derive a closed-form solution to the expected optimum of the Gauss-Newton loss. The solution is agnostic to the underlying feature representation and allows us to dynamically adjust the basin of convergence according to our assumptions about the uncertainty in the current estimates. These properties allow for effective control over the convergence in the alignment process. Despite using self-supervised feature embeddings, our solution achieves compelling accuracy w.r.t. the state-of-the-art direct image alignment methods trained end-to-end with pose supervision, and demonstrates improved robustness to pose initialization. Our analytical solution exposes some inherent limitations of end-to-end learning with the Gauss-Newton loss, and establishes an intriguing connection between direct image alignment and feature-matching approaches.
21
+
22
+ # 1 INTRODUCTION
23
+
24
+ Visual localization refers to estimating the camera pose of a query image w.r.t. a reference image where the underlying 3D structure (e.g. a point cloud) is available. Traditionally, solutions to visual localization primarily relied on estimating correspondences between 2D features in the query image and 3D features in the reference point cloud (Liu et al., 2017; Sarlin et al., 2019; Sattler et al., 2017;
25
+
26
+ Svarm et al., 2017; Toft et al., 2018). Challenging this approach, recent deep learning frameworks implement direct image alignment by re-projecting the 3D points onto the feature map (Sarlin et al., 2021; von Stumberg et al., 2020a;b). Using end-to-end training, deep networks learn dense feature maps suitable for regressing the pose between an image and a point cloud. In analogy to photometric image alignment (Delaunoy and Pollefeys, 2014; Engel et al., 2016), this family of methods is referred to as feature metric image alignment (von Stumberg et al., 2020b).
27
+
28
+ The feature representation learned by feature metric image alignment is not only discriminative, but is also spatially smooth for improved convergence (von Stumberg et al., 2020a). A training process enforces the smoothness either explicitly through a specific loss, such as the Gauss-Newton loss (von Stumberg et al., 2020a), or implicitly, by backpropagating through an optimization algorithm, such as Levenberg-Marquardt (Sarlin et al., 2021). In both cases, the resulting feature map embeds the bias of the initial poses in the training data. This may lead to poor generalization, since the training poses can differ substantially from the test scenario. We here take a less bias-prone approach: we use generic feature descriptors (e.g. obtained with self-supervision) and instead control the smoothness of the feature map dynamically at test time.
29
+
30
+ This work investigates the connection between feature descriptor networks and feature metric image alignment. The main contribution is the analytical (closed-form) solution to the Gauss-Newton loss. On the one hand, this leads to a novel technique, which can utilize any feature descriptor to generate a dense feature map suitable for direct image alignment. Importantly, it allows us to dynamically adjust the smoothness of the feature map, which effectively controls the trade-off between the basin of convergence and the alignment accuracy. We empirically verify our derivation using self-supervised feature descriptors, such as SuperPoint (DeTone et al., 2018), and demonstrate on-par or even superior alignment accuracy compared to supervised frameworks. On the other hand, the analysis of our closed-form solution reveals inherent limitations of feature learning with backpropagation through Gauss-Newton optimization: feature metric alignment merely learns a form of interpolation between feature descriptors in the points of interest. Although we demonstrate this in the context of direct image alignment, a similar argument extends to other methods, even beyond computer vision, which backpropagate through Gauss-Newton or Levenberg-Marquardt optimization.
31
+
32
+ # 2 PRELIMINARIES
33
+
34
+ Image Alignment. Given two images (reference $I_r$ and query $I_q$ ) with known camera models and an overlapping field of view, and a 3D point cloud $\{\pmb{p}^{(i)}\}$ in the coordinate system of $I_r$ , the problem of image alignment is to estimate the relative camera pose $T \in \mathbf{SE}(3)$ .
35
+
36
+ Gauss-Newton Optimization. Given a set of functions $\{r^{(1)}(\pmb {x}),\dots,r^{(m)}(\pmb {x})\}$ called residuals, Gauss-Newton (GN) optimization finds the parameters minimizing the sum of squared residuals:
37
+
38
+ $$
39
+ f (\boldsymbol {x}) = \sum_ {i} \| r ^ {(i)} (\boldsymbol {x}) \| _ {2} ^ {2}. \tag {1}
40
+ $$
41
+
42
+ Each residual $r^{(i)}(\pmb{x})$ could either be a vector or a single-valued function. In both scenarios, the total residual $r(\pmb{x})$ is a stacked vector of $m$ residuals. The Gauss-Newton method seeks to minimize $f(\pmb{x})$ by iteratively updating the parameter estimate $\tilde{\pmb{x}}$ . Each iteration linearizes the residuals around the current estimate and computes an update step $\Delta_{GN}(r(\tilde{\pmb{x}}))$ :
43
+
44
+ $$
45
+ \Delta_ {\mathrm {G N}} [ r (\tilde {\boldsymbol {x}}) ] = \left(\boldsymbol {J} ^ {\intercal} \boldsymbol {J}\right) ^ {- 1} \boldsymbol {J} ^ {\intercal} r (\tilde {\boldsymbol {x}}), \quad \boldsymbol {J} := \left. \frac {\partial r}{\partial \boldsymbol {x}} \right| _ {\boldsymbol {x} = \tilde {\boldsymbol {x}}}, \tag {2}
46
+ $$
47
+
48
+ where $J$ is the Jacobian matrix. The estimate $\tilde{\pmb{x}}$ evolves until convergence as
49
+
50
+ $$
51
+ \tilde {\boldsymbol {x}} \leftarrow \tilde {\boldsymbol {x}} \boxminus \Delta_ {\mathrm {G N}} [ r (\tilde {\boldsymbol {x}}) ]. \tag {3}
52
+ $$
53
+
54
+ Here, the operator $\square$ denotes a specific update procedure, which depends on the nature of the optimization space. For linear spaces, $\square$ simplifies to the standard subtraction operation; in the context of a rigid-body transformation $\mathbf{SE}(3)$ , operator $\square$ applies a tangential update.
55
+
56
+ Photometric and feature metric image alignment. Photometric image alignment estimates the relative 6DoF pose by minimizing the difference between pixel intensities of points in $I_{r}$ and the
57
+
58
+ corresponding points in $I_q$ . Recalling $\pmb{p}^{(i)}$ as a 3D point in the coordinate frame of the reference image, we seek a transformation $\pmb{T} \in \mathbf{SE}(3)$ minimizing the following residuals:
59
+
60
+ $$
61
+ r ^ {(i)} (\boldsymbol {T}) = I _ {r} \left(\langle \boldsymbol {p} ^ {(i)} \rangle\right) - I _ {q} \left(\langle \boldsymbol {T} \boldsymbol {p} ^ {(i)} \rangle\right). \tag {4}
62
+ $$
63
+
64
+ Here, $\langle \cdot \rangle$ is a 2D projection operator of a 3D point onto the image plane. The projection implicitly uses the corresponding camera intrinsic parameters, assumed to be available for both $I_{r}$ and $I_{q}$ . We omit them in the notation for clarity. Comprising rotation $\mathbf{R} \in \mathbf{SO}(3)$ and translation $\pmb{t} \in \mathbb{R}^3$ , the target transformation $\pmb{T}$ is typically found by minimizing Eq. (4) with non-linear least-squares optimization, such as Gauss-Newton or Levenberg-Marquardt (LM) methods (Levenberg, 1944; Marquardt, 1963; Nocedal and Wright, 1999).
65
+
66
+ The success of photometric image alignment critically depends on a favorable initialization of the pose, especially in the conditions of varying illumination and occlusion. As a partial remedy, feature metric image alignment (Tang and Tan, 2019) uses feature maps instead of pixel intensities. Obtained with deep learning, such feature maps have increased convergence basin compared to that derived from image intensities, which improves robustness to pose initialization.
67
+
68
+ # 3 RELATED WORK
69
+
70
+ Direct and indirect image alignment. Estimating the relative camera pose from two images is a fundamental problem in computer vision, with applications in structure from motion (SfM) (Schönberger and Frahm, 2016), SLAM and relocalization. To address this problem, indirect (feature-based) approaches detect and match interest points (Bay et al., 2006; Lowe, 2004) in both images, and then estimate the pose using PnP (Persson and Nordberg, 2018) or by minimizing the reprojection errors (Triggs et al., 1999). In contrast, direct methods sidestep the matching process and minimize the photometric error instead (Horn and Jr., 1988; Irani and Anandan, 1999). This means that they can leverage the entire image (Kerl et al., 2013; Newcombe et al., 2011), or focus on pixels with sufficient gradient (Engel et al., 2014; 2016). The foundation behind these approaches is Lucas-Kanade tracking (Baker and Matthews, 2004; Lucas and Kanade, 1981). However, direct methods, which are central to this work, optimize for a 6DoF pose instead of individual pixel displacements (i.e. optical flow).
71
+
72
+ Pose estimation with deep learning. The advent of deep learning revitalized interest in improving pose estimation with deep networks. While some approaches are holistic (Jatavallabhula et al., 2020), there are broadly three categories of learning-based methods. i) Fully end-to-end pose estimation methods (Kendall et al., 2016; Ummenhofer et al., 2017; Zhou et al., 2017) directly regress pose estimates with deep neural networks, instead of test-time optimization. ii) Learning-based indirect methods (DeTone et al., 2018; Dusmanu et al., 2019; Revaud et al., 2019; Yi et al., 2016) replace handcrafted detectors and descriptors with deep representations in an indirect pipeline. Some approaches further extend the traditional way of obtaining correspondences. SuperGlue (Sarlin et al., 2020) learns feature matching with a graph neural network. LoFTR (Sun et al., 2021) directly regresses correspondences instead of relying on separate feature detection and matching. Similar to indirect methods, iii) learning-based direct image alignment enhances classical direct methods with deep features. This category is the most similar to our work and we discuss it in more detail next.
73
+
74
+ Learned features for direct image alignment. Previous work differs in their approach to model training and in the final task. For example, Czarnowski et al. (2017) leverage off-the-shelf CNN features to improve optical flow tracking. A number of methods (Han et al., 2018; Lv et al., 2019; Sarlin et al., 2021; Tang and Tan, 2019; Xu et al., 2021) train feature descriptors end-to-end with ground-truth poses and backpropagate the gradient through a non-linear optimization process. At test time, these methods employ a feature pyramid and refine the initial camera pose in a coarse-to-fine fashion using GN or LM optimization. In addition to the feature pyramid, some methods predict additional properties for image alignment, such as uncertainty (Xu et al., 2021) (Sarlin et al., 2021), Jacobians (Han et al., 2018), or optimization parameters (e.g. damping factors (Lv et al., 2019; Sarlin et al., 2021)). In the same spirit, our formulation leads to a continuous image pyramid, where each level of the pyramid can be generated on-the-fly based on the input level of uncertainty.
75
+
76
+ Another line of work (von Stumberg et al., 2020a;b) trains a deep network directly on the ground-truth pixel correspondences. GN-Net (von Stumberg et al., 2020a) minimizes two loss functions. The first is a contrastive loss (Schmidt et al., 2017) facilitating discriminative properties of the
77
+
78
+ feature representation. The second loss function accounts for a likely displacement in the initial correspondence, implemented by adding random 2D offsets to the ground-truth correspondences at training time. By learning to minimize the feature discrepancy after a Gauss-Newton step, the model learns to cope with the initially noisy estimates. We revisit this work in detail in the Sec. 4.
79
+
80
+ The learning-based approaches (e.g. (Germain et al., 2021; Sarlin et al., 2021; von Stumberg et al., 2020a)) achieve impressive accuracy of pose estimation. Nevertheless, they require pose supervision for training and struggle in scenarios of large-baseline localization. Indeed, GN-Net (von Stumberg et al., 2020a) and PixLoc (Sarlin et al., 2021) tend to exhibit a strong bias toward the noise assumptions of the training process, which cannot be easily reversed. For example, PixLoc trained on the CMU dataset exhibits a strong bias toward horizontal movement as illustrated in Appendix A.
81
+
82
+ Our work takes a different approach. We rely on existing feature descriptors obtained with self-supervision, which contribute no explicit motion bias to the alignment process. We next derive a closed-form solution to the Gauss-Newton loss (von Stumberg et al., 2020a) as a functional of a probability density governing the noise assumptions of the current pose estimate. This allows us to adjust the noise assumptions in the alignment process, thus effectively controlling the convergence basin at test time, much akin to the coarse-to-fine strategy, exemplified by Fig. 2.
83
+
84
+ # 4 THE GAUSS-NEWTON LOSS
85
+
86
+ In this section, we recap the GN-Net (von Stumberg et al., 2020a) and introduce the notation. GN-Net is a convolutional neural network $E(\cdot ;\pmb {\theta})$ trained on a sparse set of ground-truth correspondences. Given coordinates on the image plane, let $f:\mathbb{R}\times \mathbb{R}\to \mathbb{R}^d$ continuously map those coordinates to a descriptor from a feature grid $\mathbb{R}^{d\times w\times h}$ produced by $E(\cdot ;\pmb {\theta})$ , e.g. using bilinear interpolation. We define $f_{r}\coloneqq E(I_{r};\pmb {\theta})$ and $f_{q}\coloneqq E(I_{q};\pmb{\theta})$ to denote feature representations of reference and query images. GN-Net learns parameters $\pmb{\theta}$ to minimize the expected value of the following loss function,
87
+
88
+ $$
89
+ \mathcal {L} _ {\mathrm {G N} - \text {N e t}} \left(I _ {r}, I _ {q}\right) = \mathcal {L} _ {\text {c o n t r a s t i v e}} \left(f _ {r}, f _ {q}\right) + \mathcal {L} _ {\mathrm {G N}} \left(f _ {r}, f _ {q}\right), \tag {5}
90
+ $$
91
+
92
+ which comprises a contrastive loss, $\mathcal{L}_{\mathrm{contrastive}}(\cdot ,\cdot)$ , and the Gauss-Newton loss, $\mathcal{L}_{\mathrm{GN}}(\cdot ,\cdot)$ . The contrastive loss minimizes the distance between the features of two corresponding points while maximizing the distance between non-corresponding pairs (Schmidt et al., 2017). The contrastive loss facilitates spatially discriminative features, and its particular instantiation has little significance for the following discussion (e. g. GN-Net uses the triplet loss).
93
+
94
+ The Gauss-Newton loss $\mathcal{L}_{\mathrm{GN}}$ ensures that the feature map is sufficiently smooth for direct image alignment, thus enlarging the convergence basin. GN-Net implements this by adding a random offset to the ground-truth correspondences and encouraging a single Gauss-Newton step to recover the original location. Let us formalize this process.
95
+
96
+ Given a ground-truth correspondence $(\pmb{x}^{(i)},\pmb{y}^{(i)})$ between images $I_{r}$ and $I_{q}$ , the assumption behind the Gauss-Newton loss is that the initial estimate $\tilde{\pmb{x}}^{(i)}$ at test time falls in the vicinity of the ground truth $\pmb{x}^{(i)}$ , i.e. $\tilde{\pmb{x}}^{(i)} = \pmb{x}^{(i)} + \pmb{\epsilon}$ , where $\pmb{\epsilon}$ follows some predefined distribution $p(\pmb{\epsilon})$ , such as a Gaussian with zero mean. At training time, the Gauss-Newton loss aims at recovering the ground-truth location $\pmb{x}^{(i)}$ from a noisy initial location $\tilde{\pmb{x}}^{(i)}$ by minimizing the residual w.r.t. $\pmb{x}$ :
97
+
98
+ $$
99
+ r ^ {(i)} \left(\tilde {\boldsymbol {x}} ^ {(i)}\right) := f _ {r} \left(\tilde {\boldsymbol {x}} ^ {(i)}\right) - f _ {q} \left(\boldsymbol {y} ^ {(i)}\right), \tag {6}
100
+ $$
101
+
102
+ The original Gauss-Newton loss for one point $\pmb{x}^{(i)}$ , as introduced by von Stumberg et al. (2020a), is
103
+
104
+ $$
105
+ \mathcal {L} _ {\mathrm {G N} _ {o}} ^ {(i)} \left(f _ {r}, f _ {q}, \epsilon\right) := \| J (\epsilon - \Delta_ {\mathrm {G N}} [ r ^ {(i)} \left(\boldsymbol {x} ^ {(i)} + \epsilon\right) ]) \| _ {2} ^ {2} - \log \det \boldsymbol {J} ^ {\intercal} \boldsymbol {J}. \tag {7}
106
+ $$
107
+
108
+ From a probabilistic standpoint (von Stumberg et al., 2020a), the loss balances between the accuracy of the Gauss-Newton step and the direction uncertainty. Here, $J^{\mathsf{T}}J$ represents the inverse covariance matrix propagated through the photometric residuals. The loss function corresponds to the negative log-likelihood of residuals distributed as $\mathcal{N}\left(0,\left(\mathbf{J}^{\mathsf{T}}\mathbf{J}\right)^{-1}\right)$ . In this work, we consider a variant of the Gauss-Newton loss, in which the covariance matrix is assumed to be identity. Thus, Eq. (7) becomes
109
+
110
+ $$
111
+ \mathcal {L} _ {\mathrm {G N}} ^ {(i)} \left(f _ {r}, f _ {q}, \boldsymbol {\epsilon}\right) = \| \boldsymbol {\epsilon} - \Delta_ {\mathrm {G N}} \left[ r ^ {(i)} \left(\boldsymbol {x} ^ {(i)} + \boldsymbol {\epsilon}\right) \right] \| _ {2} ^ {2}. \tag {8}
112
+ $$
113
+
114
+ Although this simplified version does not account for the trade-off between uncertainty and accuracy of the prediction, it admits a closed-form minimizer of the expected value, as we show in Sec. 5. We also find that the simplified version does not differ from the original one empirically in a significant way (see Appendix C). Henceforth, we will refer to the simplified version as the Gauss-Newton loss.
115
+
116
+ The training process calculates the Gauss-Newton loss stochastically by sampling $\epsilon$ from $p(\epsilon)$ . Therefore, it minimizes a Monte-Carlo approximation to the expected value of $\mathcal{L}_{\mathrm{GN}}^{(i)}$ summed over all ground-truth correspondences,
117
+
118
+ $$
119
+ \mathcal {L} _ {\mathrm {G N}} \left(f _ {r}, f _ {q}; p\right) = \mathbb {E} _ {\epsilon \sim p} \left[ \sum_ {i} \mathcal {L} _ {\mathrm {G N}} ^ {(i)} \left(f _ {r}, f _ {q}, \epsilon\right) \right]. \tag {9}
120
+ $$
121
+
122
+ Hereafter, we use the notation $\mathcal{L}_{\mathrm{GN}}(f_r,f_q;p)$ to emphasize the dependence of the Gauss-Newton loss on the noise distribution $p$ , and omit this parametarization otherwise to avoid clutter.
123
+
124
+ Note that the GN-Net's training stage addresses the problem of optical flow, not pose estimation. The underlying assumption is that accurate optical flow facilitates pose estimation, as each pixel will contribute to the final pose estimate. At test time, the pose is determined by solving the featuremetric image alignment problem (equivalent to Eq. (4)) using Gauss-Newton optimization in SE(3).
125
+
126
+ # 5 CLOSED-FORM GAUSS-NEWTON STEP
127
+
128
+ Decoupling the contrastive and Gauss-Newton losses. The contrastive loss provides a sparse constraint on the feature embeddings, since we can only use sparse ground-truth correspondences, the interest points, for supervision. By contrast, the Gauss-Newton loss enforces a pre-defined basin of convergence around each interest point (modeled by $p(\epsilon)$ ) with little effect on the feature descriptors in the interest points. This is because the residual in Eq. (6) between the corresponding interest points will be negligible, if the contrastive loss for those points is minimized. It follows that the contrastive and the Gauss-Newton loss essentially optimize over a disjoint set of feature locations. Therefore, we can decouple the Gauss-Newton loss from the joint optimization objective in Eq. (5). Let us formalize this reasoning. We aim to solve:
129
+
130
+ $$
131
+ f _ {q} ^ {*} = \underset {f _ {q}} {\arg \min } \left[ \mathcal {L} _ {\text {c o n t r a s t i v e}} \left(f _ {r}, f _ {q}\right) + \mathcal {L} _ {\mathrm {G N}} \left(f _ {r}, f _ {q}\right) \right]. \tag {10}
132
+ $$
133
+
134
+ We denote the values of $f_{r}$ , $f_{q}$ in the interest points as $F_{r}$ , $F_{q}$ : $F_{r}^{(i)} := f_{r}(\pmb{x}^{(i)})$ , $F_{q}^{(i)} := f_{q}(\pmb{y}^{(i)})$ . The contrastive loss only depends on $F_{r}$ and $F_{q}$ , while the Gauss-Newton loss depends on all the query feature values $f_{q}$ and the interest points in the reference map $F_{r}$ . By eliminating unused parts, we introduce an equivalent problem:
135
+
136
+ $$
137
+ \left\{F _ {q} ^ {*}, f _ {q} ^ {*} \right\} = \underset {F _ {q}, f _ {q}} {\arg \min } \left[ \mathcal {L} _ {\text {c o n t r a s t i v e}} \left(F _ {r}, F _ {q}\right) + \mathcal {L} _ {\mathrm {G N}} \left(F _ {r}, f _ {q}\right) \right]. \tag {11}
138
+ $$
139
+
140
+ Next, we approximate $F_{r}$ with $F_{q}$ in the second term. This is permissible as the contrastive loss acts as a soft constraint, ensuring that $F_{r}$ and $F_{q}$ are close at the optimum of the joint loss function. This allows us to decouple the minimization problem as follows:
141
+
142
+ $$
143
+ F _ {q} ^ {*} = \underset {F _ {q}} {\arg \min } \left[ \mathcal {L} _ {\text {c o n t r a s t i v e}} \left(F _ {r}, F _ {q}\right) + \underset {f _ {q}} {\min } \mathcal {L} _ {\mathrm {G N}} \left(F _ {q}, f _ {q}\right) \right], \tag {12}
144
+ $$
145
+
146
+ $$
147
+ f_{q}^{*} = \operatorname *{arg min}_{f_{q}}\mathcal{L}_{\mathrm{GN}}(F_{q}^{*},f_{q}).
148
+ $$
149
+
150
+ We denote
151
+
152
+ $$
153
+ G(F_{q};p):= \operatorname *{arg min}_{f_{q}}\mathcal{L}_{\mathrm{GN}}(F_{q},f_{q};p),
154
+ $$
155
+
156
+ $$
157
+ \mathcal {L} _ {\mathrm {G N}} ^ {*} (F _ {q}; p) := \min _ {f _ {q}} \mathcal {L} _ {\mathrm {G N}} (F _ {q}, f _ {q}; p) = \mathcal {L} _ {\mathrm {G N}} (F _ {q}, G (F _ {q}; p); p). \tag {15}
158
+ $$
159
+
160
+ ![](images/826e241123540c27976e7973fa798f729216c0e1cfe8f9f04f0420c3578f2cb0.jpg)
161
+ Figure 2: Controlling the basin of convergence. Image samples and the corresponding feature maps $\tilde{f}_q$ (PCA) for different values of $\sigma$ and isotropic Gaussian distribution $p$ .
162
+
163
+ $G(F_{q};p)$ is the optimal reconstruction of a feature map under sparse feature descriptors $F_{q}$ and noise density $p(\epsilon)$ . $\mathcal{L}_{\mathrm{GN}}^{*}(F_{q};p)$ is the corresponding value of the Gauss-Newton loss under $F_{q}$ . We will refer to $G(F_{q};p)$ as $f_{q}$ to denote an optimal reconstruction under an arbitrary sparse input $F_{q}$ . Note the difference to $f_{q}^{*}$ , which is an optimal reconstruction under the joint loss, i.e. $G(F_{q}^{*};p)$ . Our main contribution, detailed shortly, is a closed-form solution for both $G(F_{q};p)$ and $\mathcal{L}_{\mathrm{GN}}^{*}(F_{q};p)$ . It reveals that the original problem in Eq. (10) actually depends only on the feature values in the interest points:
164
+
165
+ $$
166
+ F _ {q} ^ {*} = \underset {F _ {q}} {\arg \min } \left[ \mathcal {L} _ {\text {c o n t r a s t i v e}} \left(F _ {r}, F _ {q}\right) + \mathcal {L} _ {\mathrm {G N}} ^ {*} \left(F _ {q}; p\right) \right]. \tag {14}
167
+ $$
168
+
169
+ This means that in training a feature extractor only the features of interest points matter, while the representation of other pixels approximates our analytical solution. As the empirical validation, we demonstrate compelling results in our experiments by using feature descriptors for the interest points from a self-supervised method, while employing our analytical solution for the remaining pixels.
170
+
171
+ An analytical solution to the Gauss-Newton loss. We propose to calculate the expectation of the Gauss-Newton loss in Eq. (9) as a functional of $f_{q}$ , and analytically find its closed-form minimizer.
172
+
173
+ Consider the query image $I_{q}$ as a set $\{(\pmb{x}^{(j)}, F_{q}^{(j)})\}$ containing locations of interest points $\pmb{x}^{(j)}$ and the corresponding feature descriptors $F_{q}^{(j)} \coloneqq f_{q}(\pmb{x}^{(j)})$ . The locations $\pmb{x}^{(j)}$ can be extracted by an off-the-shelf feature detector (e.g. SuperPoint (DeTone et al., 2018)), while a network trained with the contrastive loss in Eq. (5) can produce the corresponding descriptors $F_{q}^{(j)}$ .
174
+
175
+ Let us first re-write the expectation in Eq. (9) using Eq. (8) and Eq. (2) in the decoupled formulation of the Gauss-Newton loss (cf. Eq. (12)):
176
+
177
+ $$
178
+ \mathcal {L} _ {\mathrm {G N}} \left(F _ {q}, f _ {q}; p\right) = \sum_ {j} \int_ {\Omega} \left\| \boldsymbol {\epsilon} - \left(\boldsymbol {J} ^ {\intercal} \boldsymbol {J}\right) ^ {- 1} \boldsymbol {J} ^ {\intercal} \left(f _ {q} \left(\boldsymbol {x} ^ {(j)} + \boldsymbol {\epsilon}\right) - F _ {q} ^ {(j)}\right) \right\| _ {2} ^ {2} p (\boldsymbol {\epsilon}) d \boldsymbol {\epsilon}. \tag {15}
179
+ $$
180
+
181
+ Substituting $\pmb {\epsilon} = \tilde{\pmb{x}} -\pmb{x}^{(j)}$ , we obtain
182
+
183
+ $$
184
+ \mathcal {L} _ {\mathrm {G N}} \left(F _ {q}, f _ {q}; p\right) = \sum_ {j} \int_ {\Omega} \left\| \tilde {\boldsymbol {x}} - \left(\boldsymbol {J} ^ {\intercal} \boldsymbol {J}\right) ^ {- 1} \boldsymbol {J} ^ {\intercal} \left(f _ {q} (\tilde {\boldsymbol {x}}) - F _ {q} ^ {(j)}\right) - \boldsymbol {x} ^ {(j)} \right\| _ {2} ^ {2} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right) d \tilde {\boldsymbol {x}}. \tag {16}
185
+ $$
186
+
187
+ We first consider all $\tilde{\pmb{x}}\in \Omega$ independently and relax the problem by eliminating the constraint $J = \frac{\partial f_q}{\partial\tilde{\pmb{x}}}$ . This allows us to derive analytical solutions for minimizers $\tilde{f}_q(\cdot)$ and $\tilde{J}_q(\cdot)$ as functions
188
+
189
+ ![](images/51567faa20beee434f4e3537a45a5498ca3a8c44185318e8178f84be77c1745e.jpg)
190
+ Figure 3: Image alignment with continuous probabilistic feature pyramids. Given reference image with a 3D point cloud and a query image paired with an initial coarse pose, we start by estimating interest points and their features on the query image, along with features from the projections of the 3D point cloud onto the reference image. Next, we perform feature metric alignment between the 3D point features and derived analytical continuous image pyramid.
191
+
192
+ of $\tilde{\pmb{x}}$ . We then observe that $\frac{\partial}{\partial\tilde{\pmb{x}}}\tilde{f}_q(\cdot)$ coincides with $\tilde{J}_q(\cdot)$ for a uniform distribution, which confirms that in this case, our derived solution is the solution to the original problem. As a side note, in the context of direct image alignment, it has been suggested that decoupling and predicting the Jacobian independently from the function value may yield superior convergence and results (Han et al., 2018). Appendix B provides the full derivation. Below, we summarize the closed-form minimizer to Eq. (16):
193
+
194
+ $$
195
+ \tilde {f} _ {q} (\tilde {\boldsymbol {x}}) = \tilde {J} _ {q} (\tilde {\boldsymbol {x}}) \left(\tilde {\boldsymbol {x}} - \mathbf {x} _ {m} (\tilde {\boldsymbol {x}})\right) + \mathbf {y} _ {m} (\tilde {\boldsymbol {x}}), \tag {17}
196
+ $$
197
+
198
+ $$
199
+ \tilde {J} _ {q} (\tilde {\boldsymbol {x}}) = \left(\operatorname {C o v} _ {\mathbf {x y}} (\tilde {\boldsymbol {x}}) \operatorname {C o v} _ {\mathbf {y}} (\tilde {\boldsymbol {x}}) ^ {- 1}\right) ^ {+}, \tag {18}
200
+ $$
201
+
202
+ $$
203
+ \mathbf {y} _ {m} (\tilde {\boldsymbol {x}}) = \sum_ {j} F _ {q} ^ {(j)} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right) / \sum_ {j} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right), \tag {19}
204
+ $$
205
+
206
+ $$
207
+ \mathbf {x} _ {m} (\tilde {\boldsymbol {x}}) = \sum_ {j} \boldsymbol {x} ^ {(j)} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right) / \sum_ {j} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right), \tag {20}
208
+ $$
209
+
210
+ $$
211
+ \operatorname {C o v} _ {\mathbf {x y}} (\tilde {\boldsymbol {x}}) = \sum_ {j} \left(\boldsymbol {x} ^ {(j)} - \mathbf {x} _ {m} (\tilde {\boldsymbol {x}})\right) \left(F _ {q} ^ {(j)} - \mathbf {y} _ {m} (\tilde {\boldsymbol {x}})\right) ^ {\intercal} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}), \tag {21}
212
+ $$
213
+
214
+ $$
215
+ \operatorname {C o v} _ {\mathbf {y}} (\tilde {\boldsymbol {x}}) = \sum_ {j} \left(F _ {q} ^ {(j)} - \mathbf {y} _ {m} (\tilde {\boldsymbol {x}})\right) \left(F _ {q} ^ {(j)} - \mathbf {y} _ {m} (\tilde {\boldsymbol {x}})\right) ^ {\intercal} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}), \tag {22}
216
+ $$
217
+
218
+ where $(^{+})$ denotes the Moore-Penrose pseudo-inverse operator. The optimal point is $G(F_{q};p)\coloneqq \tilde{f}_{q}$ and the loss value at this point (cf. Eq. (13)) is
219
+
220
+ $$
221
+ \mathcal {L} _ {G N} ^ {*} (F _ {q}) = \int_ {\Omega} \frac {1}{2} \operatorname {T r} \left[ \operatorname {C o v} _ {\mathbf {x}} (\tilde {\boldsymbol {x}}) - \operatorname {C o v} _ {\mathbf {x y}} (\tilde {\boldsymbol {x}}) \operatorname {C o v} _ {\mathbf {y}} (\tilde {\boldsymbol {x}}) ^ {- 1} \operatorname {C o v} _ {\mathbf {y x}} (\tilde {\boldsymbol {x}}) \right] d \tilde {\boldsymbol {x}}. \tag {23}
222
+ $$
223
+
224
+ Our derivation of the optimal embeddings $G(F_{q};p)$ using fixed interest points $F_{q}$ provides an interesting insight into end-to-end learning frameworks. Jointly training both losses requires inverting a high-dimensional matrix $\mathrm{Cov}_{\mathbf{y}}(\tilde{\boldsymbol{x}})$ in Eq. (23), which poses high numerical instability and discontinuities. Since previous work (von Stumberg et al., 2020a) can be seen as stochastic approximations to our solution, this may explain the reported training instability and divergence in those works. Additionally, the form of $\tilde{f}_q$ in Eq. (17) suggests that end-to-end pipelines may not necessarily yield any sophisticated representation, as they merely interpolate between features in the interest points.
225
+
226
+ FeatureMetric Image Alignment. As a case study, we employ the analytical form of $\tilde{f}_q$ and $\tilde{J}_q$ for feature metric image alignment. Algorithm 1 and Fig. 3 provide an overview. Fig. 1 illustrates stages of direct alignment using our probabilistically reconstructed feature maps. We first extract the interest points $\{\pmb{x}^{(j)}\}$ and the corresponding feature descriptors $\{F_q^{(j)}\}$ from $I_{q}$ to reconstruct $\tilde{f}_q$ and
227
+
228
+ Require: $I_r, I_q, \{\pmb{p}^{(i)}\}, \pmb{T}^{(0)}$
229
+
230
+ 1: $\{\pmb{x}^{(j)}\} \gets$ InterestPoints $(I_q)$
231
+ 2: $\{F_q^{(j)}\} \gets E(I_q;\pmb {\theta})\circ \{\pmb{x}^{(j)}\}$
232
+ 3: $\{\pmb{o}^{(i)}\} \gets E(I_r;\pmb {\theta})\circ \{\langle \pmb{p}^{(i)}\rangle \}$
233
+ 4: $\pmb{T} \gets \pmb{T}^{(0)}$
234
+ 5: for $n$ from 0 to $N_{\mathrm{max}}$ do
235
+ 6: $p\gets \mathrm{Schedule}(n)$
236
+ 7: $\tilde{f}_q\gets G(\{F_q^{(j)}\} ;p)$
237
+ 8: $\{\tilde{\pmb{p}}^{(i)}\} \gets \{\pmb {T}\pmb{p}^{(i)}\}$
238
+ 9: $\pmb{\delta} \gets \Delta_{GN}(\tilde{f}_q \circ \{\langle \tilde{\pmb{p}}^{(i)}\rangle\} - \{\pmb{o}^{(i)}\})$
239
+ 0: $\pmb{T}\gets \pmb{T}\boxminus \pmb{\delta}$
240
+
241
+ 11: end for
242
+ 12: return T
243
+
244
+ $\langle \cdot \rangle$ denotes 2D projection.
245
+
246
+ Algorithm 1: Image alignment.
247
+
248
+ ![](images/b1d8d6315ec75466d97ddac206aa02c2a3166ccf6d617791a310cf5e9a3c44d8.jpg)
249
+ Figure 4: Robustness to initialization. Our closed-form solution exhibits significantly greater robustness compared to PixLoc.
250
+
251
+ $\tilde{J}_q$ using Eqs. (17) and (18). The sparse set of 3D points $\{\pmb{p}^{(i)}\}$ is projected onto the reference image to obtain reference descriptors. We obtain feature descriptors for these points using the same feature embedding network $E(\cdot ;\theta)$ . Starting with the initial camera pose $\pmb{T}^{(0)}\in \mathbf{S}\mathbf{E}(3)$ , at every iteration we perform Gauss-Newton steps minimizing the residuals $r^{(i)}$ , w.r.t. the camera transform $\pmb{T}$ :
252
+
253
+ $$
254
+ r ^ {(i)} (\boldsymbol {T}) := F _ {r} ^ {(i)} - \tilde {f} _ {q} \left(\left\langle \boldsymbol {T} \boldsymbol {p} ^ {(i)} \right\rangle\right). \tag {24}
255
+ $$
256
+
257
+ $p(\epsilon)$ explicitly controls the basin of convergence. In practice, we can use any distribution with high initial variance based on the inaccuracy assumed in the initial point projections. As our estimates improve over the course of optimization, we gradually decrease the variance. Notably, the choice of $p(\epsilon)$ lets us define values for points outside of the image boundaries. Fig. 2 illustrates examples of the feature maps $\tilde{f}_q$ with $p$ following a Gaussian distribution of increasing variance.
258
+
259
+ Comparison to previous work. Our derivation is agnostic to the underlying feature extractor and can operate with off-the-shelf feature descriptors. An interesting property of the derived $\tilde{f}_q$ is that it enables continuous coarse-to-fine alignment. By adjusting the noise prior $p$ in the scheduler (cf. Algorithm 1), we can control the basin of convergence dynamically at runtime. We can adjust the distribution $p$ either by choosing a different parameter set of a pre-defined distribution, or by changing the distribution itself to another family. In practice, we start the optimization with a uniform distribution and then switch to the Gaussian distribution with a slowly decreasing variance.
260
+
261
+ A uniform distribution with a wide support offers a large basin of convergence, which sacrifices accuracy for robustness. The ensuing Gaussian distribution with decreasing variance refines the pose and leads to a more accurate solution. Appendix E provides implementation details of the scheduler.
262
+
263
+ Connection between feature matching and feature metric image alignment. Note that the computation of $\tilde{f}_q$ using Eq. (17) only depends on the feature descriptors of the interest points in the query image. This observation suggests an interesting interpretation of minimizing the residual in Eq. (24) using $\tilde{f}_q$ with Gauss-Newton optimization as feature matching. The Gauss-Newton step is fully determined by the neighboring points of interest. Consequently, it implies that the effectiveness of such optimization-based methods may be limited in comparison to alternative optimization-inspired approaches, which learn the optimization step (Teed and Deng, 2020).
264
+
265
+ # 6 EXPERIMENTS
266
+
267
+ Datasets. We evaluate our approach on two most popular datasets for large-scale image localization, namely the Aachen Day-Night dataset (Sattler et al., 2018), extended CMU seasons (Toft et al., 2022) and 7Scenes dataset (Shotton et al., 2013). Aachen Day-Night consists of 98 night and 824 day query
268
+
269
+ Table 1: Camera localization on Aachen Day-Night and CMU Seasons. Our evaluation shows an overall improved accuracy in diverse scenarios despite using self-supervised SuperPoint descriptors. We compare to the state-of-the-art methods supervised with pose: GN-Net (von Stumberg et al., 2020a), LM-Reloc (von Stumberg et al., 2020b) and PixLoc (Sarlin et al., 2021).
270
+
271
+ <table><tr><td rowspan="2">Method</td><td colspan="2">Aachen</td><td colspan="3">CMU Seasons</td></tr><tr><td>Day</td><td>Night</td><td>Urban</td><td>Suburban</td><td>Park</td></tr><tr><td>GN-Net</td><td>62.4/69.4/76.9</td><td>49.0/58.2/66.3</td><td>75.4/79.9/92.6</td><td>64.7/67.0/81.4</td><td>46.7/48.3/65.3</td></tr><tr><td>LM-Reloc</td><td>60.4/68.0/76.3</td><td>37.8/46.9/59.2</td><td>76.6/82.5/93.4</td><td>67.3/72.0/82.8</td><td>49.1/53.4/66.9</td></tr><tr><td>PixLoc</td><td>64.3/69.3/77.4</td><td>51.0/55.1/67.3</td><td>88.3/90.4/93.7</td><td>79.6/81.1/85.2</td><td>61.0/62.5/69.4</td></tr><tr><td>Ours (SuperPoint)</td><td>66.3/72.5/78.8</td><td>43.9/50.0/56.1</td><td>86.0/90.6/95.2</td><td>79.8/85.0/92.4</td><td>63.4/67.9/77.5</td></tr></table>
272
+
273
+ images. Extended CMU seasons consists of 14 slices, 5 for urban environment, 5 for suburban and 4 for park. Each slice contains between 3000 and 5000 query images. The 7Scenes dataset comprises seven distinct scenes, each containing multiple sequences of 500 to 1000 frames. For our ablation study in Appendix D we used Cambridge Landmarks dataset (Kendall et al., 2016).
274
+
275
+ Results. Table 1 presents the results for camera localization on Aachen Day-Night (Sattler et al., 2018) and the extended CMU Seasons (Toft et al., 2022). We use SuperPoint (DeTone et al., 2018) as the feature descriptor in these experiments. In each setting (Day/Night for Aachen; Urban/Suburban/Park for CMU Seasons), we report three numbers, which indicate the percentage of the query images that were successfully localized within the specified translation and rotation thresholds. We adopt the standard threshold values defined by the benchmarks (translation, rotation): $(0.25\mathrm{m}, 2^{\circ}) / (0.5\mathrm{m}, 5^{\circ}) / (5\mathrm{m}, 10^{\circ})$ . We adopted the implementation from PixLoc (Sarlin et al., 2021) to run these benchmarks. A comparison with PixLoc on the 7Scenes dataset is presented in Appendix F.
276
+
277
+ We observe that our solution, despite using self-supervised descriptors from SuperPoint (DeTone et al., 2018), achieves an overall strong localization accuracy across diverse settings in comparison to supervised frameworks. Aachen Day-Night has significant occlusions, hence many outliers. Since the Gauss-Newton loss does not incorporate any outlier filtering, we do not expect high accuracy for our approach on this dataset. Nevertheless, we were surprised to find that on Aachen Day our approach even slightly surpassed previous state of the art. On Aachen Night, our accuracy is inferior to previous work, however. This is somewhat expected, since SuperPoint feature descriptors were not directly trained on day-night correspondences. By contrast, PixLoc was trained with supervision on day-night image pairs, which provides an obvious advantage. On CMU Seasons, our approach demonstrates a clear improvement over previous feature metric alignment methods.
278
+
279
+ The proposed approach demonstrates notable robustness to initialization noise. We compared the proposed scheme and PixLoc on the Cambridge Landmarks dataset, varying the levels of random noise applied to the ground-truth pose as illustrated in Fig. 4 and Appendix G.
280
+
281
+ Overall, these results empirically confirm the validity of our closed-form derivation. Furthermore, the comparison suggests a limited benefit of end-to-end learning with the Gauss-Newton loss. By contrast, a dynamic convergence basin offered by our analytical solution provides versatility w.r.t. the underlying feature descriptors and improves robustness to pose initialization, as a result.
282
+
283
+ # 7 CONCLUSION
284
+
285
+ We derived a closed-form solution to the Gauss-Newton loss in the context of direct image alignment, which offers two main advantages. First, it allows for dynamic control of the convergence basin, which improves robustness of the alignment to pose initialization. Furthermore, despite using self-supervised descriptors, such control leads to compelling accuracy of pose estimates in comparison to supervised pipelines on established benchmarks. Second, our derivation exposes intrinsic limitations of employing the Gauss-Newton loss in deep learning, as it only leads to a form of interpolation between the feature descriptors in the interest points. This insight offers an interesting connection between direct image alignment and feature matching, and leads to a novel perspective on learning robust features end-to-end, which we will investigate in future work.
286
+
287
+ # ACKNOWLEDGMENTS
288
+
289
+ This work was supported by the ERC Advanced Grant SIMULACRON and by TUM Georg Nemetschek Institute under the project AI4TWINNING. We thank Linus Harenstam-Nielsen for helpful discussions and proofreading.
290
+
291
+ # REPRODUCIBILITY STATEMENT
292
+
293
+ The main contribution of this work is the derivation of the closed-form solution to the Gauss-Newton loss. We provide details of this derivation in Appendix B. To reproduce our experimental results, we elaborate on the implementation details Appendix E. To facilitate reproducibility in future research, we also publicly release our code.
294
+
295
+ # REFERENCES
296
+
297
+ S. Baker and I. A. Matthews. Lucas-Kanade 20 years on: A unifying framework. Int. J. Comput. Vis., 56(3): 221-255, 2004.
298
+ H. Bay, T. Tuytelaars, and L. Van Gool. SURF: Speeded up robust features. In ECCV, pages 404-417, 2006.
299
+ J. Czarnowski, S. Leutenegger, and A. J. Davison. Semantic texture for robust dense tracking. In ICCV Workshops, pages 851-859, 2017.
300
+ A. Delaunoy and M. Pollefeys. Photometric bundle adjustment for dense multi-view 3D modeling. In CVPR, pages 1486-1493, 2014.
301
+ D. DeTone, T. Malisiewicz, and A. Rabinovich. SuperPoint: Self-supervised interest point detection and description. In CVPR Workshops, pages 224-236, 2018.
302
+ M. Dusmanu, I. Rocco, T. Pajdla, M. Pollefeys, J. Sivic, A. Torii, and T. Sattler. D2-Net: A trainable CNN for joint description and detection of local features. In CVPR, pages 8092-8101, 2019.
303
+ J. Engel, T. Schöps, and D. Cremers. LSD-SLAM: large-scale direct monocular SLAM. In D. J. Fleet, T. Pajdla, B. Schiele, and T. Tuytelaars, editors, ECCV, volume 8690, pages 834-849, 2014.
304
+ J. Engel, V. Koltun, and D. Cremers. Direct sparse odometry. [cs.CV] arXiv:1607.02565, 2016.
305
+ H. Germain, V. Lepetit, and G. Bourmaud. Neural reprojection error: Merging feature learning and camera pose estimation, 2021.
306
+ P. Gleize, W. Wang, and M. Feiszli. SiLK - Simple Learned Keypoints. [cs.CV] arXiv:2304.06194, 2023.
307
+ L. Han, M. Ji, L. Fang, and M. Nießner. RegNet: Learning the optimization of direct image-to-image pose registration. [cs.CV] arXiv:1812.10212, 2018.
308
+ B. K. P. Horn and E. J. W. Jr. Direct methods for recovering motion. Int. J. Comput. Vis., 2(1):51-76, 1988.
309
+ M. Irani and P. Anandan. A unified approach to moving object detection in 2D and 3D scenes. In ICCV Workshops, volume 1883, pages 267-277. Springer, 1999.
310
+ K. M. Jatavallabhula, G. Iyer, and L. Paull. $\nabla$ SLAM: Dense SLAM meets automatic differentiation. In ICRA, pages 2130-2137, 2020.
311
+ A. Kendall, M. Grimes, and R. Cipolla. PoseNet: A convolutional network for real-time 6-DoF camera relocalization. [cs.CV] arXiv:1505.07427, 2016.
312
+ C. Kerl, J. Sturm, and D. Cremers. Dense visual SLAM for RGB-D cameras. In IROS, pages 2100-2106, 2013.
313
+ K. Levenberg. A method for the solution of certain non-linear problems in least squares. Quarterly of Applied Mathematics, 2(2):164-168, 1944.
314
+ L. Liu, H. Li, and Y. Dai. Efficient global 2D-3D matching for camera localization in a large-scale 3D map. In ICCV, pages 2391–2400, 2017.
315
+ D. G. Lowe. Distinctive image features from scale-invariant keypoints. Int. J. Comput. Vision, 60(2):91-110, 2004.
316
+
317
+ B. Lucas and T. Kanade. An iterative image registration technique with an application to stereo vision. In *IJCAI*, volume 81, 1981.
318
+ Z. Lv, F. Dellaert, J. M. Rehg, and A. Geiger. Taking a deeper look at the inverse compositional algorithm. In CVPR, pages 4581-4590, 2019.
319
+ D. W. Marquardt. An algorithm for least-squares estimation of nonlinear parameters. Journal of the Society for Industrial and Applied Mathematics, 11(2):431-441, 1963.
320
+ R. Newcombe, S. Lovegrove, and A. Davison. DTAM: Dense tracking and mapping in real-time. In ICCV, pages 2320-2327, 2011.
321
+ J. Nocedal and S. J. Wright. Numerical Optimization. Springer, 1999.
322
+ A. Paszke, S. Gross, F. Massa, A. Lerer, et al. PyTorch: An imperative style, high-performance deep learning library. In NeurIPS, pages 8024-8035, 2019.
323
+ R. Pautrat, J. Lin, V. Larsson, M. R. Oswald, and M. Pollefeys. SOLD2: Self-supervised occlusion-aware line description and detection. In CVPR, pages 11368-11378, 2021.
324
+ M. Persson and K. Nordberg. Lambda twist: An accurate fast robust perspective three point (P3P) solver. In ECCV, volume 11208, pages 334-349, 2018.
325
+ J. Revaud, P. Weinzaepfel, C. R. de Souza, and M. Humenberger. R2D2: Repeating and reliable detector and descriptor. In NeurIPS, 2019.
326
+ P. Sarlin, C. Cadena, R. Siegwart, and M. Dymczyk. From coarse to fine: Robust hierarchical localization at large scale. In CVPR, pages 12716-12725, 2019.
327
+ P. Sarlin, D. DeTone, T. Malisiewicz, and A. Rabinovich. SuperGlue: Learning feature matching with graph neural networks. In CVPR, pages 4937-4946, 2020.
328
+ P. Sarlin, A. Unagar, M. Larsson, et al. Back to the feature: Learning robust camera localization from pixels to pose. In CVPR, pages 3247-3257, 2021.
329
+ T. Sattler, B. Leibe, and L. Kobbelt. Efficient & effective prioritized matching for large-scale image-based localization. IEEE T. Pattern Anal. Mach. Intell., 39(9):1744-1756, 2017.
330
+ T. Sattler, W. Maddern, C. Toft, et al. Benchmarking 6DOF outdoor visual localization in changing conditions. In CVPR, pages 8601-8610, 2018.
331
+ T. Schmidt, R. A. Newcombe, and D. Fox. Self-supervised visual descriptor learning for dense correspondence. In IEEE Robotics Autom. Lett., volume 2, pages 420-427, 2017.
332
+ J. L. Schonberger and J. Frahm. Structure-from-motion revisited. In CVPR, pages 4104-4113, 2016.
333
+ J. Shotton, B. Glocker, C. Zach, S. Izadi, A. Criminisi, and A. Fitzgibbon. Scene coordinate regression forests for camera relocalization in RGB-D images. In CVPR, pages 2930-2937, 2013.
334
+ J. Sun, Z. Shen, Y. Wang, H. Bao, and X. Zhou. LoFTR: Detector-free local feature matching with transformers. In CVPR, pages 8922-8931, 2021.
335
+ L. Svarm, O. Enqvist, F. Kahl, and M. Oskarsson. City-scale localization for cameras with known vertical direction. IEEE T. Pattern Anal. Mach. Intell., 39(7):1455-1461, 2017.
336
+ C. Tang and P. Tan. BA-Net: Dense bundle adjustment networks. In ICLR, 2019.
337
+ Z. Teed and J. Deng. RAFT: Recurrent all-pairs field transforms for optical flow. In ECCV, volume 12347, pages 402-419, 2020.
338
+ C. Toft, E. Stenberg, L. Hammarstrand, L. Brynte, M. Pollefeys, T. Sattler, and F. Kahl. Semantic match consistency for long-term visual localization. In ECCV, volume 11206, pages 391-408, 2018.
339
+ C. Toft, W. Maddern, A. Torii, et al. Long-term visual localization revisited. IEEE T. Pattern Anal. Mach. Intell., 44(4):2074-2088, 2022.
340
+ B. Triggs, P. F. McLauchlan, R. I. Hartley, and A. W. Fitzgibbon. Bundle adjustment - A modern synthesis. In ICCV Workshops, volume 1883, pages 298-372, 1999.
341
+ B. Ummenhofer, H. Zhou, J. Uhrig, N. Mayer, E. Ilg, A. Dosovitskiy, and T. Brox. DeMon: Depth and motion network for learning monocular stereo. In CVPR, pages 5038-5047, 2017.
342
+
343
+ L. von Stumberg, P. Wenzel, Q. Khan, and D. Cremers. GN-Net: The Gauss-Newton loss for multi-weather relocalization. IEEE Robotics Autom. Lett., 5(2):890–897, 2020a.
344
+ L. von Stumberg, P. Wenzel, N. Yang, and D. Cremers. LM-Reloc: Levenberg-Marquardt based direct visual relocalization. In 3DV, pages 968–977, 2020b.
345
+ B. Xu, A. J. Davison, and S. Leutenegger. Deep probabilistic feature-metric tracking. IEEE Robotics Autom. Lett., 6(1):223-230, 2021.
346
+ K. M. Yi, E. Trulls, V. Lepetit, and P. Fua. LIFT: Learned invariant feature transform. In ECCV, volume 9910, pages 467-483, 2016.
347
+ T. Zhou, M. Brown, N. Snavely, and D. G. Lowe. Unsupervised learning of depth and ego-motion from video. In CVPR, pages 6612-6619, 2017.
348
+
349
+ # A OPTICAL FLOW BIAS
350
+
351
+ We demonstrate that PixLoc exhibits bias inherited from the training dataset. Fig. 5 illustrates the average translation error after optimization when evaluated on the Cambridge dataset, highlighting the impact of different initial displacements along the image axes. To solely evaluate the bias learned by the feature maps, we disabled dataset-specific learned movement priors denoted as $\lambda$ in PixLoc (Sarlin et al., 2021). Our results demonstrate that when trained on the CMU dataset, the network predicts optical flow along the X axis more accurately. This increased accuracy is directly linked to the structure of the CMU dataset. Specifically, the dataset comprises image pairs captured by a camera inside a moving car, pointed towards the side of the road. Consequently, this positioning results in the network predominantly learning horizontal optical flow patterns, reflecting the lateral movement observed in the images of the training dataset.
352
+
353
+ ![](images/5a280a00dfe2fc2939830a6e761e02fd0b13169e9961761b13fb7f9bb0a85a77.jpg)
354
+ Figure 5: The final error of the PixLoc solution along $X / Y$ -axes w.r.t. the initial error. PixLoc remains accurate only along $X$ -axis on CMU, reflecting the dominant motion in the training set.
355
+
356
+ # B DERIVATION OF THE ANALYTICAL SOLUTION
357
+
358
+ In this section, we provide a solution to minimizing Eq. (16) from the main text. Let $\Omega$ be the coordinate domain of an image plane $[0,1] \times [0,1]$ , and let $E \subseteq \mathbb{R}^d$ define the feature space. We aim to find $\tilde{f}: \Omega \to E$ :
359
+
360
+ $$
361
+ \tilde {f} = \arg \min _ {f} \sum_ {j} \int_ {\Omega} \left\| \tilde {\boldsymbol {x}} - (J (\tilde {\boldsymbol {x}}) ^ {\intercal} J (\tilde {\boldsymbol {x}})) ^ {- 1} J (\tilde {\boldsymbol {x}}) ^ {\intercal} (f (\tilde {\boldsymbol {x}}) - F _ {q} ^ {(j)}) - \boldsymbol {x} ^ {(j)} \right\| _ {2} ^ {2} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}) d \tilde {\boldsymbol {x}}. \tag {25}
362
+ $$
363
+
364
+ We start by relaxing the constraint $\nabla f(\pmb{x}) = J(\pmb{x})$ . This makes every value of $f(\pmb{x})$ and $J(\pmb{x})$ locally independent and, therefore, the minimum is achieved by minimizing Eq. (25) independently over every point in $\Omega$ :
365
+
366
+ $$
367
+ \{\tilde {f} (\tilde {\boldsymbol {x}}), \tilde {J} (\tilde {\boldsymbol {x}}) \} = \underset {\hat {\boldsymbol {f}}, \hat {\boldsymbol {J}}} {\arg \min } \sum_ {j} \left\| \tilde {\boldsymbol {x}} - \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} \left(\hat {\boldsymbol {f}} - F _ {q} ^ {(j)}\right) - \boldsymbol {x} ^ {(j)} \right\| _ {2} ^ {2} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}). \tag {26}
368
+ $$
369
+
370
+ Note that the only significant part of $\hat{\pmb{f}}$ is a part which is spanned by columns of $\hat{\pmb{J}}$ . This can be easily seen by observing that $\hat{\pmb{J}}^{\mathrm{T}}\hat{\pmb{f}}$ is a non-normalized projection onto $\hat{\pmb{J}}$ . More formally, let us find $\hat{\pmb{f}}$ as
371
+
372
+ $\hat{J}a + \hat{J}^\perp b$ , where $\hat{J}^\perp$ is a basis for an orthogonal complement for $\operatorname{span}(\hat{J})$ . By substituting this into Eq. (26), we obtain:
373
+
374
+ $$
375
+ \{\tilde {a} (\tilde {\boldsymbol {x}}), \tilde {J} (\tilde {\boldsymbol {x}}) \} = \underset {\boldsymbol {a}, \hat {\boldsymbol {J}}} {\arg \min } \sum_ {j} \left\| \tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)} - \boldsymbol {a} + \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} F _ {q} ^ {(j)} \right\| _ {2} ^ {2} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}), \tag {27}
376
+ $$
377
+
378
+ $$
379
+ \tilde {f} (\tilde {\boldsymbol {x}}) \in \left\{\tilde {J} (\tilde {\boldsymbol {x}}) \tilde {a} (\tilde {\boldsymbol {x}}) + \tilde {J} (\tilde {\boldsymbol {x}}) ^ {\perp} \boldsymbol {b} \mid \boldsymbol {b} \in \mathbb {R} ^ {d - 2} \right\}.
380
+ $$
381
+
382
+ Observe that this problem is a linear least squares in $\pmb{a}$ and $\left(\hat{\boldsymbol{J}}^{\intercal}\hat{\boldsymbol{J}}\right)^{-1}\hat{\boldsymbol{J}}^{\intercal}$ and recall that $p(\cdot)\geq 0$ (by definition), hence the problem is convex. Minimality conditions for Eq. (27) for $\pmb{a}$ and $\left(\hat{\boldsymbol{J}}^{\intercal}\hat{\boldsymbol{J}}\right)^{-1}\hat{\boldsymbol{J}}^{\intercal}$ are:
383
+
384
+ $$
385
+ \frac {d}{d \boldsymbol {a}}: \quad \sum_ {j} \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)} - \boldsymbol {a} + \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} F _ {q} ^ {(j)}\right) p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}) = 0, \tag {28}
386
+ $$
387
+
388
+ $$
389
+ \frac {d}{d \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal}}: \quad \sum_ {j} \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)} - \boldsymbol {a} + \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} F _ {q} ^ {(j)}\right) F _ {q} ^ {(j) \intercal} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right) = 0. \tag {29}
390
+ $$
391
+
392
+ From Eq. (28), we have:
393
+
394
+ $$
395
+ \boldsymbol {a} = \tilde {\boldsymbol {x}} - \mathbf {x} _ {m} (\tilde {\boldsymbol {x}}) + \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} \mathbf {y} _ {m} (\tilde {\boldsymbol {x}}), \tag {30}
396
+ $$
397
+
398
+ where
399
+
400
+ $$
401
+ \mathbf {y} _ {m} (\tilde {\boldsymbol {x}}) := \sum_ {j} F _ {q} ^ {(j)} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right) / \sum_ {j} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right), \tag {31}
402
+ $$
403
+
404
+ $$
405
+ \mathbf {x} _ {m} (\tilde {\boldsymbol {x}}) := \sum_ {j} \boldsymbol {x} ^ {(j)} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}) / \sum_ {j} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}).
406
+ $$
407
+
408
+ Substituting $\pmb{a}$ into Eq. (29), we obtain
409
+
410
+ $$
411
+ \sum_ {j} \left(\mathbf {x} _ {m} (\tilde {\boldsymbol {x}}) - \boldsymbol {x} ^ {(j)} + \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} \left(F _ {q} ^ {(j)} - \mathbf {y} _ {m} (\tilde {\boldsymbol {x}})\right)\right) F _ {q} ^ {(j) \intercal} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right) = 0, \tag {32}
412
+ $$
413
+
414
+ $$
415
+ - \sum_ {j} \left(\boldsymbol {x} ^ {(j)} - \mathbf {x} _ {m} (\tilde {\boldsymbol {x}})\right) F _ {q} ^ {(j) \intercal} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}) +
416
+ $$
417
+
418
+ $$
419
+ \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} \sum_ {i} \left(F _ {q} ^ {(j)} - \mathbf {y} _ {m} (\tilde {\boldsymbol {x}})\right) F _ {q} ^ {(j) \intercal} p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right) = 0, \tag {33}
420
+ $$
421
+
422
+ $$
423
+ - \operatorname {C o v} _ {\mathbf {x y}} (\tilde {\boldsymbol {x}}) + \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} \operatorname {C o v} _ {\mathbf {y}} (\tilde {\boldsymbol {x}}) = 0, \tag {34}
424
+ $$
425
+
426
+ where
427
+
428
+ $$
429
+ \operatorname {C o v} _ {\mathbf {x y}} (\tilde {\boldsymbol {x}}) := \sum_ {j} \left(\boldsymbol {x} ^ {(j)} - \mathbf {x} _ {m} (\tilde {\boldsymbol {x}})\right) \left(F _ {q} ^ {(j)} - \mathbf {y} _ {m} (\tilde {\boldsymbol {x}})\right) ^ {\intercal} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}), \tag {35}
430
+ $$
431
+
432
+ $$
433
+ \operatorname {C o v} _ {\mathbf {y}} (\tilde {\boldsymbol {x}}) := \sum_ {j} \left(F _ {q} ^ {(j)} - \mathbf {y} _ {m} (\tilde {\boldsymbol {x}})\right) \left(F _ {q} ^ {(j)} - \mathbf {y} _ {m} (\tilde {\boldsymbol {x}})\right) ^ {\intercal} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}). \tag {36}
434
+ $$
435
+
436
+ Solving Eq. (34) for $J$ and substituting the solution into Eq. (27) results in
437
+
438
+ $$
439
+ \tilde {J} (\tilde {\boldsymbol {x}}) = \left(\operatorname {C o v} _ {\mathbf {x y}} (\tilde {\boldsymbol {x}}) \operatorname {C o v} _ {\mathbf {y}} (\tilde {\boldsymbol {x}}) ^ {- 1}\right) ^ {\dagger}, \tag {37}
440
+ $$
441
+
442
+ ![](images/d412210a2a978a178e742f9fe1f64233bc326303b34641ab01d95fed24968989.jpg)
443
+ Figure 6: Comparison of rotation and translation recalls for our simplified version of GN-loss and probabilistic one
444
+
445
+ ![](images/1c7bf869c947ac562c24b1af137e85b4fbb4042c99ddf07d99863b671a717ddf.jpg)
446
+
447
+ $$
448
+ \tilde {f} (\tilde {\boldsymbol {x}}) = \tilde {J} (\tilde {\boldsymbol {x}}) \boldsymbol {a} = \tilde {J} (\tilde {\boldsymbol {x}}) \left(\tilde {\boldsymbol {x}} - \mathbf {x} _ {m} (\tilde {\boldsymbol {x}})\right) + \tilde {J} (\tilde {\boldsymbol {x}}) \left(\tilde {J} (\tilde {\boldsymbol {x}}) ^ {\intercal} \tilde {J} (\tilde {\boldsymbol {x}})\right) ^ {- 1} \tilde {J} (\tilde {\boldsymbol {x}}) ^ {\intercal} \mathbf {y} _ {m} (\tilde {\boldsymbol {x}}). \tag {38}
449
+ $$
450
+
451
+ $\tilde{J} (\tilde{\pmb{x}})\left(\tilde{J} (\tilde{\pmb{x}})^{\intercal}\tilde{J} (\tilde{\pmb{x}})\right)^{-1}\tilde{J} (\tilde{\pmb{x}})^{\intercal}{\bf y}_m(\tilde{\pmb{x}})$ can be simplified. Note that in the Gauss-Newton step we are projecting $\tilde{f} (\tilde{\pmb{x}})$ onto $\tilde{J} (\tilde{\pmb{x}})$ . $\tilde{J} (\tilde{\pmb{x}})\left(\tilde{J} (\tilde{\pmb{x}})^{\intercal}\tilde{J} (\tilde{\pmb{x}})\right)^{-1}\tilde{J} (\tilde{\pmb{x}})^{\intercal}$ is a projection operator, so we are projecting two times. Therefore, there is another equivalent solution which we will further use for the sake of simplicity:
452
+
453
+ $$
454
+ \tilde {f} (\tilde {\boldsymbol {x}}) = \tilde {J} (\tilde {\boldsymbol {x}}) \left(\tilde {\boldsymbol {x}} - \mathbf {x} _ {m} (\tilde {\boldsymbol {x}})\right) + \mathbf {y} _ {m} (\tilde {\boldsymbol {x}}). \tag {39}
455
+ $$
456
+
457
+ Observe that substituting $\tilde{f}$ from Eq. (39) and Eq. (38) into Eq. (26) yields the same loss value.
458
+
459
+ Notably, $\nabla \tilde{f} (\tilde{\pmb{x}}) = \tilde{J} (\tilde{\pmb{x}})$ for a uniform distribution $p(\cdot)$ .
460
+
461
+ # C PROBABILISTIC vs. SIMPLIFIED GAUSS-NEWTON LOSS
462
+
463
+ In this section, we compare our simplified Gauss-Newton loss formulation,
464
+
465
+ $$
466
+ \underset {\hat {\boldsymbol {f}}, \hat {\boldsymbol {J}}} {\arg \min } \sum_ {j} \left\| \tilde {\boldsymbol {x}} - \left(\hat {\boldsymbol {J}} ^ {\intercal} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\intercal} \left(\hat {\boldsymbol {f}} - F _ {q} ^ {(j)}\right) - \boldsymbol {x} ^ {(j)} \right\| _ {2} ^ {2} p (\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}), \tag {40}
467
+ $$
468
+
469
+ to the original loss, which was derived through the maximum likelihood estimation (MLE),
470
+
471
+ $$
472
+ \underset {\hat {\boldsymbol {f}}, \hat {\boldsymbol {J}}} {\arg \min } \sum_ {j} \left(\left\| \hat {\boldsymbol {J}} \left(\tilde {\boldsymbol {x}} - \left(\hat {\boldsymbol {J}} ^ {\mathrm {T}} \hat {\boldsymbol {J}}\right) ^ {- 1} \hat {\boldsymbol {J}} ^ {\mathrm {T}} \left(\hat {\boldsymbol {f}} - F _ {q} ^ {(j)}\right) - \boldsymbol {x} ^ {(j)}\right) \right\| _ {2} ^ {2} - \log \det (\hat {\boldsymbol {J}} ^ {\mathrm {T}} \hat {\boldsymbol {J}})\right) p \left(\tilde {\boldsymbol {x}} - \boldsymbol {x} ^ {(j)}\right). \tag {41}
473
+ $$
474
+
475
+ We note that the solution to the probabilistic loss is much more complicated and computationally expensive. Derivatives for this formulation are high-order polynomials in elements of $\hat{\pmb{f}}$ and $\hat{\pmb{J}}$ . It could be solved by general methods of algebraic geometry like Gröbner basis or Homotopy continuation, but the existence of a closed-form solution is not guaranteed, and we were not able to find one.
476
+
477
+ Nevertheless, in order to compare the two formulations, we approached the problem numerically. Fig. 6 presents the results. We used the Aachen dataset with hloc poses to plot the recall of query
478
+
479
+ images as a function of rotation and translation errors. We observe that the accuracy difference between these two formulations is negligible in practice. However, the simplified version admits a closed-form solution and can be computed several orders of magnitudes more efficiently.
480
+
481
+ # D A STUDY OF FEATURE DESCRIPTORS
482
+
483
+ We show that our approach is agnostic to the choice of the underlying feature descriptor. To analyze the accuracy of our algorithm in terms of the localization error, we use Cambridge Landmarks (Kendall et al., 2016), which provides ground-truth poses.
484
+
485
+ We experiment with four popular feature descriptors: SIFT (Lowe, 2004), SOLD2 (Pau-trat et al., 2021), SuperPoint (DeTone et al., 2018) and the recent SiLK (Gleize et al., 2023). We plug them in as the embeddings for interest points detected by SuperPoint. Fig. 7 plots recall (the percentage of successfully localized queries) as a function of the tolerated translation error.
486
+
487
+ We observe that SuperPoint outperforms all other feature descriptors. SOLD2 (Pautrat et al., 2021) is substantially more inferior in terms of accuracy of the pose estimates. Since it is designed to be a line descriptor, its representation of non-linear structures is not well-defined, thus such outcome is somewhat expected. Interestingly, SuperPoint and SIFT both surpass the more recent SiLK on this benchmark. In comparison to SuperPoint, SiLK has 128-D descrip
488
+
489
+ tor, which suggests that it may be less expressive than the 256- $D$ SuperPoint descriptors.
490
+
491
+ ![](images/b8e0fb26806c5bac90e295b1be48088253a34441dee7c04d809eabe9864177d8.jpg)
492
+ Figure 7: We study our approach with different feature descriptors on Cambridge Landmarks.
493
+
494
+ # E IMPLEMENTATION DETAILS.
495
+
496
+ We implement our approach in PyTorch (Paszke et al., 2019). The primary focus of our implementation is the experimental validation of our derived results. Therefore, we did not optimize the runtime performance, which heavily depends on the number of interest points and 3D points involved in the computation. On average, the code takes approximately 6 seconds and 10 seconds per alignment on CMU and Aachen, respectively, on a single NVIDIA A4000. The scheduler in Algorithm 1 adapts the distribution $p(\cdot)$ as follows. We initialize $p(\cdot)$ with a truncated uniform distribution of a fixed radius around all interest points. The radius decreases from $50\%$ of the image diagonal to $5\%$ in the first 30 iterations. Afterward, the scheduler switches to the normal distribution around each interest point with standard deviation $\sigma$ . Initially, we define $\sigma$ such that $99\%$ of the distribution covers $10\%$ of the image around the point, and we decrease the coverage ratio to $1\%$ .
497
+
498
+ Since our formulation does not have any outlier removal, we adopt the cut-off from the coarse tracker of DSO (Engel et al., 2016). The idea is to define a threshold that discards all but $20\%$ of the residuals with the lowest norm. In our experiments with SuperPoint, we set the threshold value to 0.4.
499
+
500
+ # F EVALUATION ON 7SCENES
501
+
502
+ Here, we complement our evaluation with the 7Scenes dataset. This dataset features substantial blur and distortions in some scenes, as it was captured with a rolling-shutter Kinect camera. Although SuperPoint features were not trained with such distortions, direct alignment with our closed-form solution remains competitive with PixLoc, both in terms of the median error and the recall Table 2.
503
+
504
+ Table 2: 7Scenes (Shotton et al., 2013) evaluation and comparison to PixLoc. We report the median rotation and translation errors, as well as recall values at the specified thresholds of translation and rotation.
505
+
506
+ <table><tr><td rowspan="2">Scene</td><td rowspan="2">Method</td><td rowspan="2">Median error</td><td colspan="4">Recall</td></tr><tr><td>(1cm,1°)</td><td>(5cm,5°)</td><td>(25cm,2°)</td><td>(50cm,5°)</td></tr><tr><td rowspan="2">Heads</td><td>Ours</td><td>0.013m, 1.006°</td><td>24.80%</td><td>93.0%</td><td>86.30%</td><td>92.0%</td></tr><tr><td>Pixloc</td><td>0.013m, 0.863°</td><td>36.40%</td><td>85.60 %</td><td>84.00%</td><td>85.90%</td></tr><tr><td rowspan="2">Office</td><td>Ours</td><td>0.028m, 0.941°</td><td>6.12 %</td><td>80.25%</td><td>92.55%</td><td>99.00%</td></tr><tr><td>Pixloc</td><td>0.026m, 0.792°</td><td>7.95%</td><td>80.70 %</td><td>93.12 %</td><td>96.85%</td></tr><tr><td rowspan="2">Redkitchen</td><td>Ours</td><td>0.037m, 1.444°</td><td>1.56 %</td><td>64.42%</td><td>71.88%</td><td>90.16%</td></tr><tr><td>Pixloc</td><td>0.034m, 1.217°</td><td>3.74%</td><td>67.78 %</td><td>76.56 %</td><td>89.48%</td></tr><tr><td rowspan="2">Pumpkin</td><td>Ours</td><td>0.049m, 1.555°</td><td>1.60 %</td><td>51.65%</td><td>62.65%</td><td>85.35%</td></tr><tr><td>Pixloc</td><td>0.041m, 1.173°</td><td>2.80%</td><td>59.75 %</td><td>71.00 %</td><td>84.40%</td></tr><tr><td rowspan="2">Stairs</td><td>Ours</td><td>0.154m, 3.685°</td><td>1.90 %</td><td>19.90 %</td><td>25.60 %</td><td>60.50 %</td></tr><tr><td>Pixloc</td><td>0.048m, 1.268°</td><td>2.60%</td><td>51.10 %</td><td>59.10 %</td><td>74.70%</td></tr><tr><td rowspan="2">Chess</td><td>Ours</td><td>0.026m, 0.904°</td><td>5.50 %</td><td>91.95%</td><td>95.45%</td><td>98.45%</td></tr><tr><td>Pixloc</td><td>0.024m, 0.812°</td><td>7.75%</td><td>90.75 %</td><td>94.95%</td><td>96.15%</td></tr><tr><td rowspan="2">Fire</td><td>Ours</td><td>0.021m, 0.978°</td><td>10.40 %</td><td>90.65%</td><td>94.05%</td><td>98.45%</td></tr><tr><td>Pixloc</td><td>0.019m, 0.781°</td><td>15.85%</td><td>87.50 %</td><td>87.20%</td><td>90.10%</td></tr></table>
507
+
508
+ # G QUALITATIVE EXAMPLES
509
+
510
+ Fig. 8 visualizes convergence examples of one scene with different pose initializations. The examples consistently demonstrate successful alignment despite suboptimal initialization of varying degree.
511
+
512
+ ![](images/c980c871e37d2586de9c72c848c094ef39349877409313a22f28b077fa752e49.jpg)
513
+ Figure 8: Examples of convergence from random initial poses. The green points are projections of 3D points using the current pose estimate; the red points are projections of the 3D points with the initial pose, and the yellow points denote the locations of interest points. It can be seen that despite these highly inaccurate initial poses, our approach converges to the correct solution.
2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f1341ddfb4eada27f6dcce09a73322d7ef3fa32ae46f0f1cf38d8d7a0a28e91
3
+ size 1725337
2024/An Analytical Solution to Gauss-Newton Loss for Direct Image Alignment/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/6057db18-b37f-44dd-ad29-cdbda9e3f494_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/6057db18-b37f-44dd-ad29-cdbda9e3f494_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/6057db18-b37f-44dd-ad29-cdbda9e3f494_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f85842cb79bdc153bf0d935e4b7d650df03a02c38c4dc65445180d318f08433
3
+ size 11984242
2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ce2943bf8978c59f928005ababe09e8caeee05d0897a5e2d291a4caa712ead8
3
+ size 2644285
2024/Approximating Nash Equilibria in Normal-Form Games via Stochastic Optimization/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Batched Low-Rank Adaptation of Foundation Models/698c37fd-a34d-43c4-aeed-9c12baba206a_content_list.json ADDED
@@ -0,0 +1,1712 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "BATCHED LOW-RANK ADAPTATION OF FOUNDATION MODELS",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 171,
8
+ 99,
9
+ 643,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Yeming Wen & Swarat Chaudhuri*",
17
+ "bbox": [
18
+ 181,
19
+ 170,
20
+ 433,
21
+ 184
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Department of Computer Science",
28
+ "bbox": [
29
+ 181,
30
+ 185,
31
+ 405,
32
+ 198
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "The University of Texas at Austin",
39
+ "bbox": [
40
+ 181,
41
+ 198,
42
+ 405,
43
+ 212
44
+ ],
45
+ "page_idx": 0
46
+ },
47
+ {
48
+ "type": "text",
49
+ "text": "ABSTRACT",
50
+ "text_level": 1,
51
+ "bbox": [
52
+ 450,
53
+ 250,
54
+ 547,
55
+ 263
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "Low-Rank Adaptation (LoRA) has recently gained attention for fine-tuning foundation models by incorporating trainable low-rank matrices, thereby reducing the number of trainable parameters. While LoRA offers numerous advantages, its applicability for real-time serving to a diverse and global user base is constrained by its incapability to handle multiple task-specific adapters efficiently. This imposes a performance bottleneck in scenarios requiring personalized, task-specific adaptations for each incoming request.",
62
+ "bbox": [
63
+ 228,
64
+ 280,
65
+ 766,
66
+ 378
67
+ ],
68
+ "page_idx": 0
69
+ },
70
+ {
71
+ "type": "text",
72
+ "text": "To mitigate this constraint, we introduce Fast LoRA (FLORA), a framework in which each input example in a minibatch can be associated with its unique low-rank adaptation weights, allowing for efficient batching of heterogeneous requests. We empirically demonstrate that FLORA retains the performance merits of LoRA, showcasing competitive results on the MultiPL-E code generation benchmark spanning over 8 languages and a multilingual speech recognition task across 6 languages.",
73
+ "bbox": [
74
+ 228,
75
+ 380,
76
+ 766,
77
+ 477
78
+ ],
79
+ "page_idx": 0
80
+ },
81
+ {
82
+ "type": "text",
83
+ "text": "1 INTRODUCTION",
84
+ "text_level": 1,
85
+ "bbox": [
86
+ 171,
87
+ 503,
88
+ 336,
89
+ 518
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Transformer-based foundation models have showcased remarkable performance across various natural language processing tasks, as evidenced by the successes of ChatGPT (OpenAI, 2023), GitHub Copilot (Chen et al., 2021) and Speech Recognition (Radford et al., 2022) among others. The practice of fine-tuning these models for specific domains or specialized needs, such as instruction-tuning, has become increasingly prevalent (Wang et al., 2022c; Honovich et al., 2022; Taori et al., 2023; Chiang et al., 2023). This is driven by the requirements of real-world applications, which often demand models tailored to specific domains, tasks, or even individual user preferences (Ouyang et al., 2022). However, the extensive number of parameters in foundation models poses computational and memory challenges for task-specific fine-tuning.",
96
+ "bbox": [
97
+ 169,
98
+ 535,
99
+ 826,
100
+ 662
101
+ ],
102
+ "page_idx": 0
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "Low-Rank Adaptation (LORA) emerged as a solution to this challenge by incorporating trainable low-rank matrices (Hu et al., 2021) which significantly reduces the number of trainable parameters during fine-tuning. LoRA's success stems from its ability to achieve domain adaptation without retraining the entire model (Taori et al., 2023; Dettmers et al., 2023; Lee et al., 2023). However, a practical challenge arises in real-time serving scenarios. Batching is the practice of aggregating multiple data points into a single computation. It is a common technique to leverage parallel processing capabilities in GPUs, ensuring higher throughput and lower serving cost. It becomes especially crucial when serving world-wide users where many requests could flood in every second. The intrinsic design of LoRA dictates that every example within a batch shares the same adapter, which is suboptimal for real-world serving scenarios where each request may require a unique adapter.",
107
+ "bbox": [
108
+ 169,
109
+ 667,
110
+ 826,
111
+ 808
112
+ ],
113
+ "page_idx": 0
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Consider a scenario where users from various locations and professions demand different language and occupation adapters as illustrated in Fig. 1. With LoRA, the batch processing would either force all these diverse requests to share the same adapter or process them sequentially, both of which are impractical. These limitations emphasize the need for a solution that can not only utilize the advantages of LoRA but also serve multiple adapters in parallel, catering to the diverse and simultaneous requests encountered in reality.",
118
+ "bbox": [
119
+ 169,
120
+ 813,
121
+ 828,
122
+ 898
123
+ ],
124
+ "page_idx": 0
125
+ },
126
+ {
127
+ "type": "header",
128
+ "text": "Published as a conference paper at ICLR 2024",
129
+ "bbox": [
130
+ 171,
131
+ 32,
132
+ 478,
133
+ 47
134
+ ],
135
+ "page_idx": 0
136
+ },
137
+ {
138
+ "type": "page_footnote",
139
+ "text": "$^{*}$ ywen@utexas.edu, swarat@cs.utexas.edu",
140
+ "bbox": [
141
+ 189,
142
+ 910,
143
+ 517,
144
+ 924
145
+ ],
146
+ "page_idx": 0
147
+ },
148
+ {
149
+ "type": "page_number",
150
+ "text": "1",
151
+ "bbox": [
152
+ 493,
153
+ 948,
154
+ 504,
155
+ 959
156
+ ],
157
+ "page_idx": 0
158
+ },
159
+ {
160
+ "type": "image",
161
+ "img_path": "images/320d41ac7fa023cfe4d8924c9dbfc31f82c620dfe92ae5454aab3fa9f52061c6.jpg",
162
+ "image_caption": [
163
+ "Figure 1: This shows a pragmatic scenario where a foundation model in production receives four incoming requests, each requiring distinct adapters. Omitting two adapters in step 2 & 3 for presentation simplicity. FLORA facilitates batching in such serving circumstances, provided the adapters are of low rank, thereby sustaining high throughput and low latency. Detailed discussion on vectorization is provided in §3.2."
164
+ ],
165
+ "image_footnote": [],
166
+ "bbox": [
167
+ 192,
168
+ 104,
169
+ 821,
170
+ 410
171
+ ],
172
+ "page_idx": 1
173
+ },
174
+ {
175
+ "type": "text",
176
+ "text": "We posit that it is critical to develop a more flexible adaptation mechanism that is compatible with diverse real-world user queries. We introduce fast LORA (FLORA), a modification of LORA, enabling individual examples in a minibatch to be associated with distinct low-rank weights without compromising the expressive power. This modification promises the benefits of domain adaptation, as heralded by LORA, but without the batching limitation.",
177
+ "bbox": [
178
+ 169,
179
+ 512,
180
+ 823,
181
+ 583
182
+ ],
183
+ "page_idx": 1
184
+ },
185
+ {
186
+ "type": "text",
187
+ "text": "Our contributions can be summarized as follows:",
188
+ "bbox": [
189
+ 171,
190
+ 589,
191
+ 495,
192
+ 604
193
+ ],
194
+ "page_idx": 1
195
+ },
196
+ {
197
+ "type": "list",
198
+ "sub_type": "text",
199
+ "list_items": [
200
+ "1. We propose FLORA, a framework that augments LoRA by allowing each example in a minibatch to have its unique low-rank adapters, facilitating efficient batching.",
201
+ "2. We provided an analytical analysis describing the scenarios where FLORA would be preferred over LoRA in practical applications. This analysis is further substantiated by the empirical evidence where FLORA achieves a 2X throughput improvement on the state-of-the-art code LLM StarCoder 15B in the low-rank setting when diverse adapters are required for incoming examples. Additionally, FLORA reduces the latency by half under the same low-rank setting.",
202
+ "3. We demonstrate that FLORA does not sacrifice accuracy compared to LORA on a multilingual code generation task across 8 programming languages, and maintains accuracy in speech recognition tasks over five languages."
203
+ ],
204
+ "bbox": [
205
+ 210,
206
+ 617,
207
+ 823,
208
+ 789
209
+ ],
210
+ "page_idx": 1
211
+ },
212
+ {
213
+ "type": "text",
214
+ "text": "2 PROBLEM FORMULATION",
215
+ "text_level": 1,
216
+ "bbox": [
217
+ 171,
218
+ 820,
219
+ 418,
220
+ 834
221
+ ],
222
+ "page_idx": 1
223
+ },
224
+ {
225
+ "type": "text",
226
+ "text": "In this section, we outline the problem tackled in this work, illustrating the constraints and objectives that drive the development of the proposed FLORA methodology. Let $\\mathcal{M}$ denote a foundation model parameterized by $\\theta$ , with a total number of parameters $N$ . The common practice is to fine-tune this foundational model for various specific tasks, ranging from multilingual code generation to speech recognition as demonstrated in §4.2 and §4.3.",
227
+ "bbox": [
228
+ 169,
229
+ 854,
230
+ 823,
231
+ 925
232
+ ],
233
+ "page_idx": 1
234
+ },
235
+ {
236
+ "type": "header",
237
+ "text": "Published as a conference paper at ICLR 2024",
238
+ "bbox": [
239
+ 171,
240
+ 32,
241
+ 478,
242
+ 47
243
+ ],
244
+ "page_idx": 1
245
+ },
246
+ {
247
+ "type": "page_number",
248
+ "text": "2",
249
+ "bbox": [
250
+ 493,
251
+ 948,
252
+ 503,
253
+ 959
254
+ ],
255
+ "page_idx": 1
256
+ },
257
+ {
258
+ "type": "text",
259
+ "text": "2.1 LORA ADAPTERS",
260
+ "text_level": 1,
261
+ "bbox": [
262
+ 171,
263
+ 103,
264
+ 341,
265
+ 118
266
+ ],
267
+ "page_idx": 2
268
+ },
269
+ {
270
+ "type": "text",
271
+ "text": "Fine-tuning the entire model $\\mathcal{M}$ for a specific task is usually computationally expensive due to the massive parameter count. LoRA (Low-rank Adaptation, (Hu et al., 2021)) was introduced to facilitate domain-specific adaptations with a significantly reduced parameter footprint, with the hypothesis that low-rank adaptation is sufficient for fine-tuning domain specific foundation models.",
272
+ "bbox": [
273
+ 169,
274
+ 130,
275
+ 823,
276
+ 186
277
+ ],
278
+ "page_idx": 2
279
+ },
280
+ {
281
+ "type": "text",
282
+ "text": "Given the pre-trained weight matrix $W_0 \\in \\mathbb{R}^{d \\times k}$ , LoRA posits that the weight matrix of the adapted foundation model can be expressed as $W_0 + \\Delta W = W_0 + BA$ , where $\\Delta W$ has a low-rank structure. This matrix $\\Delta W$ is factorized into two smaller, trainable matrices: $B \\in \\mathbb{R}^{d \\times r}$ and $A \\in \\mathbb{R}^{r \\times k}$ , such that $\\Delta W = BA$ where $r$ stands for the rank. For a given input $\\mathbf{x}_i$ , the output $\\mathbf{y}_i$ is given by:",
283
+ "bbox": [
284
+ 169,
285
+ 191,
286
+ 825,
287
+ 250
288
+ ],
289
+ "page_idx": 2
290
+ },
291
+ {
292
+ "type": "equation",
293
+ "text": "\n$$\n\\mathbf {y} _ {i} = \\mathcal {M} \\left(\\mathbf {x} _ {i} \\mid \\Delta W, W _ {0}, \\theta\\right) \\tag {1}\n$$\n",
294
+ "text_format": "latex",
295
+ "bbox": [
296
+ 411,
297
+ 268,
298
+ 825,
299
+ 287
300
+ ],
301
+ "page_idx": 2
302
+ },
303
+ {
304
+ "type": "text",
305
+ "text": "2.2 Batching & THROUGHPUT",
306
+ "text_level": 1,
307
+ "bbox": [
308
+ 171,
309
+ 303,
310
+ 408,
311
+ 316
312
+ ],
313
+ "page_idx": 2
314
+ },
315
+ {
316
+ "type": "text",
317
+ "text": "Batching is a common practice where multiple data points $(\\mathbf{x}_1, \\mathbf{x}_2, \\ldots, \\mathbf{x}_m)$ are aggregated into a single batch $\\mathcal{B}$ . Consequently, the forward passes of these data points are processed concurrently rather than individually. This practice leverages the parallel processing capability of a modern GPU, thereby significantly improving the throughput $T$ , i.e., the number of data points processed per unit of time. In the context of foundation models, throughput of a batch $\\mathcal{B}$ can be defined as $T = \\sum_{i=1}^{m} |\\mathbf{y}_i| / \\Delta t$ , where $|\\mathbf{y}_i|$ is the number of tokens generated for each example $\\mathbf{x}_i$ in the batch, $\\Delta t$ is the total time taken to process the batch, and $m$ is the number of examples in the batch. Note that batching incurs minimal latency penalties. However, given its substantial increase in throughput, batching and its variants are widely used in the state-of-the-art foundation models serving framework such as vLLM (Kwon et al., 2023) to achieve the best balance between throughput and latency.",
318
+ "bbox": [
319
+ 169,
320
+ 329,
321
+ 826,
322
+ 470
323
+ ],
324
+ "page_idx": 2
325
+ },
326
+ {
327
+ "type": "text",
328
+ "text": "2.3 OBJECTIVE",
329
+ "text_level": 1,
330
+ "bbox": [
331
+ 171,
332
+ 486,
333
+ 294,
334
+ 500
335
+ ],
336
+ "page_idx": 2
337
+ },
338
+ {
339
+ "type": "text",
340
+ "text": "Batching typically assumes the same model parameters are utilized for every input example within a minibatch. Hence, a straightforward application of batching in LoRA requires that the adapter matrix $\\Delta W$ be shared across all inputs in the batch $\\mathcal{B}$ . The challenge arises when considering a scenario where each input example in the batch might originate from a different task. Sharing the same $\\Delta W$ for all $\\mathbf{x}_i$ in $\\mathcal{B}$ becomes suboptimal where each input potentially demands a unique adapter. The limitation is particularly acute when the model is expected to serve a world-wide user base with diverse incoming requests.",
341
+ "bbox": [
342
+ 169,
343
+ 512,
344
+ 823,
345
+ 611
346
+ ],
347
+ "page_idx": 2
348
+ },
349
+ {
350
+ "type": "text",
351
+ "text": "Given the limitations of LORA in batching, our objective is to maximize the throughput $T$ in global user serving scenarios by maintaining the batching mechanism. Formally, for each $\\mathbf{x}_i \\in \\mathcal{B}$ , we aim to compute $\\mathbf{y}_i = \\mathcal{M}(\\mathbf{x}_i | \\Delta W_i, W_0, \\theta)$ , where $\\Delta W_i$ is the adapter matrix corresponding to the input example $x_i$ . Therefore, $\\Delta W_i$ can be unique across $\\mathcal{B}$ and specific to a domain or user preference.",
352
+ "bbox": [
353
+ 169,
354
+ 616,
355
+ 825,
356
+ 674
357
+ ],
358
+ "page_idx": 2
359
+ },
360
+ {
361
+ "type": "text",
362
+ "text": "3 FLORA: FAST LOW RANK ADAPTATION",
363
+ "text_level": 1,
364
+ "bbox": [
365
+ 171,
366
+ 695,
367
+ 522,
368
+ 709
369
+ ],
370
+ "page_idx": 2
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "As shown in §2.3, adapter sharing is often impractical in real-world serving scenarios. The innovation of FLORA is the introduction of example-specific adapter $\\Delta W_{i}$ for each $\\mathbf{x}_i$ in a minibatch. In FLORA, the weight matrix $W_{i}$ for each example $\\mathbf{x}_i$ in the minibatch is calculated as $W_{i} = \\Delta W_{i} \\circ W_{0}$ , where $\\circ$ denotes element-wise multiplication, $W_{0}$ is the pre-trained weight matrix and $\\Delta W_{i}$ is a low-rank adaptation specifically designed for $\\mathbf{x}_i$ . Similar to Hu et al. (2021), $\\Delta W_{i}$ is decomposed into two trainable matrices: $B_{i} \\in \\mathbb{R}^{d \\times r}$ and $A_{i} \\in \\mathbb{R}^{r \\times k}$ , such that $\\Delta W_{i} = B_{i} A_{i}$ , as shown in Fig. 1. Note that FLORA has the same expressive power as LORA by its construction.",
375
+ "bbox": [
376
+ 169,
377
+ 726,
378
+ 823,
379
+ 825
380
+ ],
381
+ "page_idx": 2
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "3.1 FORWARD PASS",
386
+ "text_level": 1,
387
+ "bbox": [
388
+ 171,
389
+ 840,
390
+ 326,
391
+ 854
392
+ ],
393
+ "page_idx": 2
394
+ },
395
+ {
396
+ "type": "text",
397
+ "text": "The advantage of FLORA is that computations on a minibatch can be written in terms of matrix multiplications. This enables efficient batched implementations on modern accelerators such as GPUs. Let $x_{i}$ denote the activations in one layer of a neural net, which is a vertical vector of length $d$ . The next layer's activations are given by",
398
+ "bbox": [
399
+ 169,
400
+ 867,
401
+ 823,
402
+ 925
403
+ ],
404
+ "page_idx": 2
405
+ },
406
+ {
407
+ "type": "header",
408
+ "text": "Published as a conference paper at ICLR 2024",
409
+ "bbox": [
410
+ 171,
411
+ 32,
412
+ 478,
413
+ 47
414
+ ],
415
+ "page_idx": 2
416
+ },
417
+ {
418
+ "type": "page_number",
419
+ "text": "3",
420
+ "bbox": [
421
+ 493,
422
+ 948,
423
+ 504,
424
+ 959
425
+ ],
426
+ "page_idx": 2
427
+ },
428
+ {
429
+ "type": "equation",
430
+ "text": "\n$$\n\\begin{array}{l} y _ {i} = \\phi \\left(W _ {i} ^ {T} x _ {i}\\right) (2) \\\\ = \\phi \\left(\\left(W _ {0} ^ {T} \\circ \\Delta W _ {i} ^ {T}\\right) x _ {i}\\right) (3) \\\\ = \\phi \\left(\\left(W _ {0} ^ {T} \\circ \\left(B _ {i} A _ {i}\\right) ^ {T}\\right) x _ {i}\\right) (4) \\\\ = \\phi \\left(A _ {i} \\circ \\left(W _ {0} ^ {T} \\left(B _ {i} \\circ x _ {i}\\right)\\right)\\right) (5) \\\\ \\end{array}\n$$\n",
431
+ "text_format": "latex",
432
+ "bbox": [
433
+ 395,
434
+ 125,
435
+ 823,
436
+ 213
437
+ ],
438
+ "page_idx": 3
439
+ },
440
+ {
441
+ "type": "text",
442
+ "text": "When the rank is greater than one, we extend the use of the symbol “o” to denote potential broadcasting. Additionally, a dimension reduction operation such as torch.mean is required prior to applying the activation function $\\phi$ .",
443
+ "bbox": [
444
+ 169,
445
+ 227,
446
+ 823,
447
+ 268
448
+ ],
449
+ "page_idx": 3
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "The key to FLORA's flexibility lies in the low rank decomposition enables the incorporation of example-specific adapters directly into the forward pass, as demonstrated in the equations above. Crucially, each of these operations—the element-wise multiplication between $A_{i}$ and $x_{i}$ , and between $B_{i}$ and $y_{i}$ — is inherently batch-friendly. Consequently, FLORA allows for simultaneous processing of multiple requests, each requiring its own adapter, within a single minibatch. To vectorize all adapters in the minibatch, we define matrices $\\mathbf{A}$ and $\\mathbf{B}$ whose rows correspond to the adapters $A_{i}$ and $B_{i}$ for all examples in the minibatch. The above equation is vectorized as:",
454
+ "bbox": [
455
+ 169,
456
+ 275,
457
+ 826,
458
+ 376
459
+ ],
460
+ "page_idx": 3
461
+ },
462
+ {
463
+ "type": "equation",
464
+ "text": "\n$$\n\\mathbf {Y} = \\phi \\left(\\mathbf {A} \\circ \\left((\\mathbf {B} \\circ \\mathbf {X}) W _ {0}\\right)\\right) \\tag {6}\n$$\n",
465
+ "text_format": "latex",
466
+ "bbox": [
467
+ 401,
468
+ 392,
469
+ 823,
470
+ 417
471
+ ],
472
+ "page_idx": 3
473
+ },
474
+ {
475
+ "type": "text",
476
+ "text": "3.2 COMPUTATIONAL EFFICIENCY",
477
+ "text_level": 1,
478
+ "bbox": [
479
+ 171,
480
+ 433,
481
+ 426,
482
+ 448
483
+ ],
484
+ "page_idx": 3
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "The computational analysis primarily concentrates on the examination of fully connected layers within a transformer architecture, given that LoRA is specifically applied to these layers, such as query and key projections. To begin, we analyze a baseline that leverages batch matrix multiplication to facilitate the serving of LoRA with multiple adapters. This operation is possible under the assumption that every adapter required by the input examples in the minibatch shares the same shape, specifically, the same rank. The batch matrix multiplication (BMM) can be implemented using the torch.bmm operator in deep learning frameworks such as PyTorch (Paszke et al., 2019). Note that the BMM operator is typically unfavorable in practical settings due to the significant overhead it introduces (Abdelfattah et al., 2016). This overhead diminishes the throughput and increases latency, which is detrimental in serving scenarios where response times are crucial for maintaining a good user experience.",
489
+ "bbox": [
490
+ 169,
491
+ 459,
492
+ 826,
493
+ 616
494
+ ],
495
+ "page_idx": 3
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "Let $b$ and $l$ denote the batch size and the maximum sequence length in the input batch $\\mathcal{B}$ . Revisiting the notation introduced in §3, where $W_0 \\in \\mathbb{R}^{d \\times k}$ , $B_i \\in \\mathbb{R}^{d \\times r}$ and $A_i \\in \\mathbb{R}^{r \\times k}$ , the operations required to compute the pre-activation for an input batch $\\mathcal{B}$ with dimensions $[b, l, d]$ consist of one matrix multiplication and two BMMs. The matrix multiplication occurs between the input batch $\\mathbf{X}$ and the pre-trained weight $W_0$ . The two BMM operations are conducted firstly between the input batch $\\mathbf{X}$ and $\\mathbf{B}$ , and secondly between the result of the prior computation and $\\mathbf{A}$ , where $\\mathbf{A}$ and $\\mathbf{B}$ are matrices whose rows correspond to the adapters $A_i$ and $B_i$ for all examples in the minibatch respectively. Assuming for simplicity that the layer neither upscales nor downscales the hidden dimension (i.e. $d = k$ ), the upper bound complexity of this layer is discerned as $2c_1(dblr) + c_2(bld^2)$ , with $c_1$ and $c_2$ representing the computational coefficients of BMM and matrix multiplication respectively. Note that $c_1 >> c_2$ because the BMM operator is more expensive than matrix multiplication.",
500
+ "bbox": [
501
+ 169,
502
+ 619,
503
+ 826,
504
+ 773
505
+ ],
506
+ "page_idx": 3
507
+ },
508
+ {
509
+ "type": "text",
510
+ "text": "For FLORA, the cost is one matrix multiplication which is $c_{2}(rbld^{2})$ where $r$ denotes the rank of the adapters. We omit the cost of element-wise multiplication in this analysis because it is negligible to the matrix multiplication cost. Comparing the computational cost of FLORA and LORA boils down to the following inequality",
511
+ "bbox": [
512
+ 169,
513
+ 779,
514
+ 826,
515
+ 837
516
+ ],
517
+ "page_idx": 3
518
+ },
519
+ {
520
+ "type": "equation",
521
+ "text": "\n$$\n\\frac {2 c _ {1}}{d c _ {2}} + \\frac {1}{r} \\geq 1 \\tag {7}\n$$\n",
522
+ "text_format": "latex",
523
+ "bbox": [
524
+ 450,
525
+ 853,
526
+ 823,
527
+ 885
528
+ ],
529
+ "page_idx": 3
530
+ },
531
+ {
532
+ "type": "text",
533
+ "text": "FLORA exhibits a lower computational cost than bmm LoRA whenever the above inequality holds true. The benefit of FLORA over LoRA is notably pronounced when $r = 1$ . As the rank increases,",
534
+ "bbox": [
535
+ 169,
536
+ 895,
537
+ 823,
538
+ 925
539
+ ],
540
+ "page_idx": 3
541
+ },
542
+ {
543
+ "type": "header",
544
+ "text": "Published as a conference paper at ICLR 2024",
545
+ "bbox": [
546
+ 171,
547
+ 32,
548
+ 478,
549
+ 47
550
+ ],
551
+ "page_idx": 3
552
+ },
553
+ {
554
+ "type": "page_number",
555
+ "text": "4",
556
+ "bbox": [
557
+ 493,
558
+ 948,
559
+ 504,
560
+ 959
561
+ ],
562
+ "page_idx": 3
563
+ },
564
+ {
565
+ "type": "text",
566
+ "text": "LORA gradually becomes less costly. From the established inequality, a variety of scenarios can be inferred where FLORA has an advantage over LORA. Firstly, the advantage of FLORA is significantly apparent when the rank of adapters is small. Secondly, in configurations where the model has fewer hidden units but an increased number of layers, FLORA tends to outperform LORA due to the smaller value of $d$ in the denominator of Eq. (7).",
567
+ "bbox": [
568
+ 169,
569
+ 103,
570
+ 823,
571
+ 175
572
+ ],
573
+ "page_idx": 4
574
+ },
575
+ {
576
+ "type": "text",
577
+ "text": "Another advantage of FLORA is the cost remains invariant to the number of adapters required by the input batch. While the preceding analysis assumes that every token in an example $x_{i}$ shares the same adapter, it is possible to apply multiple adapters to a single example by dividing the example into chunks, and then applying different adapters to each chunk. This approach is commonly observed in the Mixture of Experts framework (Fedus et al., 2021; Lepikhin et al., 2020; Puigcerver et al., 2023). Incorporating several adapters in an input example notably amplifies the ratio $c_{1} / c_{2}$ in Eq. (7), thereby significantly increasing LORA's cost.",
578
+ "bbox": [
579
+ 169,
580
+ 180,
581
+ 826,
582
+ 280
583
+ ],
584
+ "page_idx": 4
585
+ },
586
+ {
587
+ "type": "text",
588
+ "text": "The ratio $c_{1} / c_{2}$ might not be the same across different transformer architectures. §4.1 is designed to provide a deeper insight into how comparative serving efficiency of FLORA and LORA changes under various architectures. Additionally, it's worth noting that LORA does not apply to the self-attention layers, which constitute a non-trivial portion of the computational cost, thereby overshadowing the advantage of FLORA. However, as efficient self-attention mechanisms such as flash attention (Dao et al., 2022) get adopted, the advantage of FLORA over LORA is likely to get larger.",
589
+ "bbox": [
590
+ 169,
591
+ 285,
592
+ 823,
593
+ 371
594
+ ],
595
+ "page_idx": 4
596
+ },
597
+ {
598
+ "type": "text",
599
+ "text": "Connection to IA3. IA3 was proposed in Liu et al. (2022a) featuring fast adaptation of LLM. It introduces a learned vector $l$ which re-scales the activation by $y_{i} = l\\circ \\phi (W_{0}^{T}x_{i}) = \\phi \\bigl (l\\circ (W_{0}^{T}x_{i})\\bigr)$ . This can be viewed as a special case of FLORA - a rank 0.5 variant - which only re-scales the columns instead of the entire pre-trained weights. It has a limited expressive power compared to FLORA and LoRA.",
600
+ "bbox": [
601
+ 169,
602
+ 375,
603
+ 826,
604
+ 446
605
+ ],
606
+ "page_idx": 4
607
+ },
608
+ {
609
+ "type": "text",
610
+ "text": "4 EXPERIMENTS",
611
+ "text_level": 1,
612
+ "bbox": [
613
+ 171,
614
+ 465,
615
+ 328,
616
+ 482
617
+ ],
618
+ "page_idx": 4
619
+ },
620
+ {
621
+ "type": "text",
622
+ "text": "In this section, we compare FLORA to LoRA and other notable baselines across various metrics and tasks. To begin with, we delve into a computational analysis to substantiate the enhanced throughput and the reduced latency achieved by FLORA in the case of low rank. Subsequently, we pivot towards analyzing the accuracy of FLORA in multilingual code generation tasks spanning across different languages. The goal is to discern the proficiency of FLORA in maintaining, if not enhancing, the model's accuracy as compared to LoRA. Progressing further, we replicate a similar analysis but in the domain of multilingual speech recognition.",
623
+ "bbox": [
624
+ 169,
625
+ 497,
626
+ 823,
627
+ 597
628
+ ],
629
+ "page_idx": 4
630
+ },
631
+ {
632
+ "type": "text",
633
+ "text": "4.1 SERVING ANALYSIS",
634
+ "text_level": 1,
635
+ "bbox": [
636
+ 171,
637
+ 612,
638
+ 354,
639
+ 626
640
+ ],
641
+ "page_idx": 4
642
+ },
643
+ {
644
+ "type": "text",
645
+ "text": "The primary objective of this serving analysis is to measure the maximum throughput both FLORA and LoRA can attain under varied rank configurations. We carried out this exploration on the state-of-the-art code Large Language Model (LLM) StarCoder (Li et al., 2023), evaluating models of different number of parameters namely 1B, 3B, and 15B. The dataset facilitating this analysis has been sourced from the vLLM throughput benchmark. Noteworthy, this dataset was previously used to fine-tune the English Vicuna model, a state-of-the-art chat LLMs (Chiang et al., 2023). To expedite the benchmarking process, we extracted a subset of 1,000 samples from the original dataset, ensuring a diverse range of sample lengths varying from 50 to 2,000 tokens.",
646
+ "bbox": [
647
+ 169,
648
+ 637,
649
+ 825,
650
+ 750
651
+ ],
652
+ "page_idx": 4
653
+ },
654
+ {
655
+ "type": "text",
656
+ "text": "In setting up the computational analysis, our primary intent is to compare FLORA and LoRA in the real-world serving scenario. See Appendix B.1 on how bmm LoRA is implemented. The vLLM framework (Kwon et al., 2023) $^{2}$ , with its implementation of continuous batching, presents an ideal setup for this analysis. The continuous batching mechanism in vLLM, as inspired by the principles delineated in Orca (Yu & Jeong, 2022), facilitates a more efficient utilization of GPU resource by allowing new sequence to be inserted immediately once any sequence in the current batch is completed. This continuous flow significantly enhances GPU utilization as compared to static batching, where the GPU awaits the completion of all sequences in a batch before initiating a new batch processing. The comparison of FLORA and LoRA within this setup offers a compelling evidence of",
657
+ "bbox": [
658
+ 169,
659
+ 756,
660
+ 826,
661
+ 883
662
+ ],
663
+ "page_idx": 4
664
+ },
665
+ {
666
+ "type": "header",
667
+ "text": "Published as a conference paper at ICLR 2024",
668
+ "bbox": [
669
+ 171,
670
+ 32,
671
+ 478,
672
+ 47
673
+ ],
674
+ "page_idx": 4
675
+ },
676
+ {
677
+ "type": "page_footnote",
678
+ "text": "<sup>1</sup>The batch size in BMM operator increases from $b$ to $b \\times m$ where $m$ is the number of adapters per example.",
679
+ "bbox": [
680
+ 194,
681
+ 896,
682
+ 823,
683
+ 910
684
+ ],
685
+ "page_idx": 4
686
+ },
687
+ {
688
+ "type": "page_footnote",
689
+ "text": "2The version is 0.1.3.",
690
+ "bbox": [
691
+ 196,
692
+ 910,
693
+ 326,
694
+ 922
695
+ ],
696
+ "page_idx": 4
697
+ },
698
+ {
699
+ "type": "page_number",
700
+ "text": "5",
701
+ "bbox": [
702
+ 493,
703
+ 946,
704
+ 504,
705
+ 959
706
+ ],
707
+ "page_idx": 4
708
+ },
709
+ {
710
+ "type": "image",
711
+ "img_path": "images/ed93ba9b562aa6fa23d4c29067f423da49c97808341cacf67371ac664858c667.jpg",
712
+ "image_caption": [
713
+ "Figure 2: Left: Generation throughput vs. rank for FLORA and torch.bmm implementation of LORA, measured in tokens per second (token/s). The experiments were conducted on three star-coder models: StarCoder 15B, StarCoderbase 3B and StarCoderbase 1B. FLORA has great throughput advantage over LoRA when the rank is small. As the rank increases, the torch.bmm implementation of LoRA finally has a better throughput. Right: Latency vs. rank on StarCoder-15B. Requests are coming at the speed of 8 requests per second."
714
+ ],
715
+ "image_footnote": [],
716
+ "bbox": [
717
+ 181,
718
+ 104,
719
+ 488,
720
+ 339
721
+ ],
722
+ "page_idx": 5
723
+ },
724
+ {
725
+ "type": "image",
726
+ "img_path": "images/3c18fccff2618301be1b089888cfaea229f6dbe29568ccba3a1feab2c51d877a.jpg",
727
+ "image_caption": [],
728
+ "image_footnote": [],
729
+ "bbox": [
730
+ 501,
731
+ 104,
732
+ 812,
733
+ 340
734
+ ],
735
+ "page_idx": 5
736
+ },
737
+ {
738
+ "type": "text",
739
+ "text": "their respective throughput and latency in the real-world serving scenario. It is worth noting that the experiments were conducted without Flash-attention (Dao et al., 2022).",
740
+ "bbox": [
741
+ 169,
742
+ 444,
743
+ 823,
744
+ 472
745
+ ],
746
+ "page_idx": 5
747
+ },
748
+ {
749
+ "type": "text",
750
+ "text": "Throughput experiment. In Fig. 2, the throughput results for both FLORA and bmm LORA are illustrated across different rank configurations on three StarCoder models with different number of parameters, namely 1B, 3B and 15B. All experiments were conducted on an NVIDIA H100 GPU with a float16 precision<sup>3</sup>. The maximum number of batched tokens is 8,192, which is the same as the model context length. Evidently, FLORA shows a superior throughput over LORA in the lower rank configurations. At rank 1, the throughput of FLORA is more than threefold higher than that of LORA, thereby highlighting the considerable serving performance boost FLORA provides. The advantage of FLORA continues as the rank increases, albeit with a diminishing rate. For instance, at rank 2, FLORA's throughput is around 2.5 times higher, and this multiplicative advantage decreases as the rank increases further. This performance advantage continues up until the rank of 8 in the StarCoder 15B model, where LoRA starts to outperform FLORA. This inflection point suggests that the advantages of FLORA in terms of throughput are more pronounced in lower rank.",
751
+ "bbox": [
752
+ 169,
753
+ 479,
754
+ 826,
755
+ 647
756
+ ],
757
+ "page_idx": 5
758
+ },
759
+ {
760
+ "type": "text",
761
+ "text": "Notice that the inflection points occurred at a higher rank when serving a smaller LLM as illustrated in (Fig. 2, left). This demonstrates a significant potential of FLORA, especially when considering future applications of quantization techniques to serving LLMs. By applying quantization, such as 8-bit or 4-bit inference, the effective size of the model is reduced, akin to serving a smaller LLM thus potentially extending the rank at which FLORA maintains a throughput advantage over LORA.",
762
+ "bbox": [
763
+ 169,
764
+ 652,
765
+ 823,
766
+ 724
767
+ ],
768
+ "page_idx": 5
769
+ },
770
+ {
771
+ "type": "text",
772
+ "text": "Latency experiment. We assessed the latency-versus-rank performance on the Starcoder 15B model, using the same dataset as the throughput experiment. This evaluation was conducted under the conditions where requests arrive at a rate of 8 per second. The default maximum number of batched tokens in vLLM serving launcher is 2,560. The results, as shown in (Fig. 2, right), measure latency in terms of seconds per output token. Remarkably, in the lower rank regime (ranging from rank 1 to rank 4), FLORA exhibited a 2-5X reduction in latency compared to LoRA. Notably, the latency for LoRA stood at approximately 2.3 seconds per output token, is impractical for serving due to the poor user experience it would cause. This experiment further highlights the superior capabilities of FLORA in efficiently catering to diverse incoming user requests.",
773
+ "bbox": [
774
+ 169,
775
+ 729,
776
+ 826,
777
+ 857
778
+ ],
779
+ "page_idx": 5
780
+ },
781
+ {
782
+ "type": "text",
783
+ "text": "These findings validate the theoretical analysis in §4.1, confirming that FLORA provides significant throughput advantages, particularly in settings with lower to moderate ranks. This positions FLORA",
784
+ "bbox": [
785
+ 169,
786
+ 862,
787
+ 823,
788
+ 892
789
+ ],
790
+ "page_idx": 5
791
+ },
792
+ {
793
+ "type": "header",
794
+ "text": "Published as a conference paper at ICLR 2024",
795
+ "bbox": [
796
+ 173,
797
+ 32,
798
+ 478,
799
+ 47
800
+ ],
801
+ "page_idx": 5
802
+ },
803
+ {
804
+ "type": "page_footnote",
805
+ "text": "3The quantization in vLLM is still under development.",
806
+ "bbox": [
807
+ 194,
808
+ 909,
809
+ 519,
810
+ 922
811
+ ],
812
+ "page_idx": 5
813
+ },
814
+ {
815
+ "type": "page_number",
816
+ "text": "6",
817
+ "bbox": [
818
+ 493,
819
+ 948,
820
+ 503,
821
+ 959
822
+ ],
823
+ "page_idx": 5
824
+ },
825
+ {
826
+ "type": "table",
827
+ "img_path": "images/63fb72defddfc43c9382e9d77680467431d34217ddf999542abbee004b482e82.jpg",
828
+ "table_caption": [],
829
+ "table_footnote": [],
830
+ "table_body": "<table><tr><td rowspan=\"2\">Language</td><td rowspan=\"2\">Base Model</td><td colspan=\"3\">pass@1 (Relative Improvement)</td></tr><tr><td>FLORA</td><td>IA3</td><td>LoRA</td></tr><tr><td></td><td colspan=\"4\">StarCoder 15B</td></tr><tr><td>Dlang</td><td>14.13</td><td>17.26 (22.14%)</td><td>15.26 (7.99%)</td><td>17.15 (21.37%)</td></tr><tr><td>Perl</td><td>17.05</td><td>21.44 (25.76%)</td><td>17.71 (3.90%)</td><td>21.46 (25.76%)</td></tr><tr><td>Ruby</td><td>1.39</td><td>24.94 (1692.86%)</td><td>20.80 (1394.64%)</td><td>23.76 (1608.04%)</td></tr><tr><td>Rust</td><td>22.40</td><td>26.24 (17.14%)</td><td>23.53 (5.04%)</td><td>26.87 (19.95%)</td></tr><tr><td>Racket</td><td>10.20</td><td>12.41 (21.61%)</td><td>11.53 (12.96%)</td><td>12.51 (22.58%)</td></tr><tr><td>Swift</td><td>16.91</td><td>20.38 (20.51%)</td><td>18.13 (7.19%)</td><td>20.35 (20.36%)</td></tr><tr><td></td><td colspan=\"4\">StarCoderBase 3B</td></tr><tr><td>Dlang</td><td>5.65</td><td>5.72 (1.20%)</td><td>5.72 (1.20%)</td><td>6.97 (23.34%)</td></tr><tr><td>Perl</td><td>10.73</td><td>13.01 (21.25%)</td><td>11.46 (6.83%)</td><td>13.31 (27.51%)</td></tr><tr><td>Ruby</td><td>5.33</td><td>14.48 (171.68%)</td><td>7.88 (47.90%)</td><td>13.89 (160.68%)</td></tr><tr><td>Rust</td><td>17.18</td><td>21.00 (22.24%)</td><td>17.28 (0.60%)</td><td>20.67 (20.31%)</td></tr><tr><td>Racket</td><td>8.04</td><td>9.16 (13.99%)</td><td>8.40 (4.48%)</td><td>8.80 (9.48%)</td></tr><tr><td>Swift</td><td>10.04</td><td>15.69 (56.21%)</td><td>12.54 (24.83%)</td><td>15.04 (49.76%)</td></tr></table>",
831
+ "bbox": [
832
+ 215,
833
+ 99,
834
+ 782,
835
+ 390
836
+ ],
837
+ "page_idx": 6
838
+ },
839
+ {
840
+ "type": "text",
841
+ "text": "Table 1: Comparison of three fine-tuning methods FLORA, IA3, and LORA on StarCoder 15B and StarCoderBase 3B across various low-resource programming languages in the MultiPL-E benchmark. The table presents Pass@1 accuracy of each method alongside the relative improvement over the baseline. The standard errors are less than $0.3\\%$ in all cells in the table, therefore we exclude that for clear presentation.",
842
+ "bbox": [
843
+ 169,
844
+ 398,
845
+ 823,
846
+ 470
847
+ ],
848
+ "page_idx": 6
849
+ },
850
+ {
851
+ "type": "text",
852
+ "text": "as a compelling alternative for efficiently serving adapted foundation models, especially in scenarios where lower ranks suffice the desired model accuracy, as further demonstrated in the subsequent accuracy analysis sections. Moreover, if an enterprise chooses to serve foundation models with a substantial number of diverse adapters, for instance, a personalized LLM, then a low rank or even a rank one is imperative to avoid excessive storage costs.",
853
+ "bbox": [
854
+ 169,
855
+ 489,
856
+ 823,
857
+ 561
858
+ ],
859
+ "page_idx": 6
860
+ },
861
+ {
862
+ "type": "text",
863
+ "text": "4.2 MULTILINGUAL CODE GENERATION",
864
+ "text_level": 1,
865
+ "bbox": [
866
+ 171,
867
+ 577,
868
+ 467,
869
+ 590
870
+ ],
871
+ "page_idx": 6
872
+ },
873
+ {
874
+ "type": "text",
875
+ "text": "A key aspect to examine before applying FLORA in real-world LLM serving is to scrutinize any potential degradation in performance. In this section, we consider multilingual code generation as the testbed for comparing FLORA and LoRA due to its alignment with real-world applications, where the necessity to cater to diverse programming languages is paramount. Low-resource languages, as referred to in this context, are languages that appear much less frequently than other languages in the pre-training data. Orlanski et al. (2023) showed that the performance of code LLMs can be notably enhanced on low-resource programming languages such as PERL by recalibrating the language distribution in the pre-training data. This suggests that fine-tuning a trained LLM on such low-resource languages could potentially boost its performance on the same language. Hence, by employing multilingual code generation as a benchmark, we can make an informed evaluation of adaptability and performance enhancements that FLORA and LoRA can achieve.",
876
+ "bbox": [
877
+ 169,
878
+ 603,
879
+ 826,
880
+ 757
881
+ ],
882
+ "page_idx": 6
883
+ },
884
+ {
885
+ "type": "text",
886
+ "text": "Additionally, a comparison is made against a third baseline, IA3, which can be considered as a special case of FLORA. Essentially, IA3 can be seen as a rank 0.5 variant of FLORA, thereby facing a constrained expressive power in comparison to both FLORA and LoRA. For FLORA and LoRA, we conducted fine-tuning across a range of rank choices, spanning from 1 to 8. It emerges that within the scope of this multilingual code generation task, a rank of one typically suffices to achieve optimal results, with the exception of Racket and Lua. Consequently, the results shown in §4.2 are predominantly at rank 1, barring Racket and Lua, which are presented at rank 4.",
887
+ "bbox": [
888
+ 169,
889
+ 763,
890
+ 826,
891
+ 863
892
+ ],
893
+ "page_idx": 6
894
+ },
895
+ {
896
+ "type": "text",
897
+ "text": "Fine-tuning. In our effort to evaluate the performance of FLORA, LORA, and IA3 on the multilingual code generation task, we fine-tuned these models on state-of-the-art multilingual code LLMs, StarCoder 15B and StarCoderBase 3B as introduced in (Li et al., 2023). A pivotal aspect of our fine-tuning process was the utilization of existing data, negating the need for creating new data for",
898
+ "bbox": [
899
+ 169,
900
+ 867,
901
+ 826,
902
+ 925
903
+ ],
904
+ "page_idx": 6
905
+ },
906
+ {
907
+ "type": "header",
908
+ "text": "Published as a conference paper at ICLR 2024",
909
+ "bbox": [
910
+ 173,
911
+ 32,
912
+ 478,
913
+ 47
914
+ ],
915
+ "page_idx": 6
916
+ },
917
+ {
918
+ "type": "page_number",
919
+ "text": "7",
920
+ "bbox": [
921
+ 493,
922
+ 948,
923
+ 504,
924
+ 959
925
+ ],
926
+ "page_idx": 6
927
+ },
928
+ {
929
+ "type": "table",
930
+ "img_path": "images/e5e12cbc36ea7108dc7b0c49f35badf93c2d636539ec51664adf097b4e0e4e16.jpg",
931
+ "table_caption": [],
932
+ "table_footnote": [],
933
+ "table_body": "<table><tr><td>Model</td><td>Arabic</td><td>Czech</td><td>Lithuanian</td><td>Marathi</td><td>Mongolian</td><td>Hindi</td></tr><tr><td>Whisper</td><td>46.03</td><td>23.19</td><td>46.09</td><td>84.84</td><td>115.20</td><td>43.41</td></tr><tr><td>FLORA</td><td>30.21 ± 0.25</td><td>10.76 ± 0.22</td><td>20.39 ± 0.32</td><td>33.17 ± 0.17</td><td>42.12 ± 0.63</td><td>23.58 ± 0.65</td></tr><tr><td>IA3</td><td>30.48 ± 0.22</td><td>11.61 ± 0.33</td><td>21.41 ± 0.20</td><td>35.03 ± 0.61</td><td>46.47 ± 0.53</td><td>25.64 ± 0.78</td></tr><tr><td>LORA</td><td>30.18 ± 0.21</td><td>10.77 ± 0.38</td><td>20.50 ± 0.21</td><td>31.94 ± 0.33</td><td>41.57 ± 0.69</td><td>23.82 ± 0.74</td></tr></table>",
934
+ "bbox": [
935
+ 176,
936
+ 101,
937
+ 823,
938
+ 200
939
+ ],
940
+ "page_idx": 7
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "Table 2: Mean WER with standard deviation for different models and languages. The WER is calculated with respect to the unnormalized tokenizer. The base model here is Whisper-1.5B.",
945
+ "bbox": [
946
+ 169,
947
+ 210,
948
+ 823,
949
+ 239
950
+ ],
951
+ "page_idx": 7
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "low-resource programming languages. We leveraged the same pre-training data that was used for pre-training StarCoder, specifically, the Stack dataset, which contains over 6TB of permissively-licensed source code files covering 358 programming languages. For each low-resource language in our experiment, we fine-tuned on its corresponding split from the Stack dataset for a total of 1,500 steps, along with batch size 8. More fine-tuning details are given in Appendix A.",
956
+ "bbox": [
957
+ 169,
958
+ 258,
959
+ 823,
960
+ 329
961
+ ],
962
+ "page_idx": 7
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "Evaluation. The evaluation of FLORA, LORA, and IA3 was conducted on the MultiPL-E benchmark (Cassano et al., 2023), which contains the translation of two unit-test driven Python benchmarks (HumanEval and MBPP) to 18 other programming languages. We used the HumanEval split of the benchmark to evaluate the fine-tuned models. As for the metrics, We adopted the $pass@k$ metrics from Chen et al. (2021); Austin et al. (2021), which is calculated as the fraction of problems with at least one correct sample given $k$ samples. Similar to Chen et al. (2021), we drew 100 samples for computing $pass@1$ , with a sampling temperature set at 0.1.",
967
+ "bbox": [
968
+ 169,
969
+ 334,
970
+ 826,
971
+ 434
972
+ ],
973
+ "page_idx": 7
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "Main results. The result in §4.2 exhibits the performance of three methods across various programming languages on both StarCoder 15B and StarCoderBase 3B models. The average relative improvement achieved by FLORA and LoRA is roughly $20\\%$ in the selected low-resource programming languages. FLORA consistently outperforms IA3 on all languages, especially on StarCoder 15B, denoting its efficiency in leveraging the model expressive power to improve multilingual code generation. It is notable that StarCoder 15B has an unforeseen issue regarding Ruby generation, where it yields lower accuracy compared to the 3B model. However, all methods are able to fix its abnormal performance.",
978
+ "bbox": [
979
+ 169,
980
+ 439,
981
+ 825,
982
+ 551
983
+ ],
984
+ "page_idx": 7
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "On StarCoderBase 3B, a smaller model, it is evident that the baseline performance drops, yet FLoRA and LoRA still manage to exhibit substantial relative improvement over the baseline, especially in languages like Swift and Ruby. This suggests that both methods benefit from continuous training on the low-resource language split of the pre-training data, although the advantages may diminish with a reduction in model size. While the absolute performance (pass@1 accuracy) varies among languages, the relative improvements highlight the effectiveness of the tested methods in enhancing multilingual code generation.",
989
+ "bbox": [
990
+ 169,
991
+ 556,
992
+ 826,
993
+ 656
994
+ ],
995
+ "page_idx": 7
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "4.3 MULTILINGUAL SPEECH RECOGNITION",
1000
+ "text_level": 1,
1001
+ "bbox": [
1002
+ 171,
1003
+ 672,
1004
+ 488,
1005
+ 686
1006
+ ],
1007
+ "page_idx": 7
1008
+ },
1009
+ {
1010
+ "type": "text",
1011
+ "text": "Following our analysis in multilingual code generation, we shift our focus to another substantial application of large language models — multilingual speech recognition (MSR). This domain has seen increasing demand due to the necessity of serving various linguistic interfaces. The capabilities of FLORA and LORA to adapt to multiple languages in code generation presents a tempting premise to investigate their effectiveness in the MSR domain.",
1012
+ "bbox": [
1013
+ 169,
1014
+ 698,
1015
+ 823,
1016
+ 768
1017
+ ],
1018
+ "page_idx": 7
1019
+ },
1020
+ {
1021
+ "type": "text",
1022
+ "text": "Fine-tuning. A crucial aspect of our analysis involves fine-tuning the foundation model on a multilingual speech recognition dataset. We selected the Whisper large 1.5B (Radford et al., 2022) as our base model to conduct the subsequent analysis. Whisper is an encoder-decoder transformer model trained on 680k hours of labeled speech data through large-scale weak supervision. Despite being pre-trained on a multilingual speech corpus, the model's predictive capabilities can be improved further for certain languages and tasks through fine-tuning. We use the Common Voice benchmark (Ardila et al., 2020) — containing a total of 38 languages and 2,500 hours of collected audio — for the fine-tuning process, with a particular focus on low-resource languages. For each low-resource language enumerated in §4.2, we fine-tuned on its training split within the Common",
1023
+ "bbox": [
1024
+ 169,
1025
+ 773,
1026
+ 826,
1027
+ 902
1028
+ ],
1029
+ "page_idx": 7
1030
+ },
1031
+ {
1032
+ "type": "header",
1033
+ "text": "Published as a conference paper at ICLR 2024",
1034
+ "bbox": [
1035
+ 173,
1036
+ 32,
1037
+ 478,
1038
+ 47
1039
+ ],
1040
+ "page_idx": 7
1041
+ },
1042
+ {
1043
+ "type": "page_footnote",
1044
+ "text": "Dataset statistics can be found here https://commonvoice.—.org/en/datasets.",
1045
+ "bbox": [
1046
+ 194,
1047
+ 909,
1048
+ 797,
1049
+ 924
1050
+ ],
1051
+ "page_idx": 7
1052
+ },
1053
+ {
1054
+ "type": "page_number",
1055
+ "text": "8",
1056
+ "bbox": [
1057
+ 493,
1058
+ 948,
1059
+ 504,
1060
+ 959
1061
+ ],
1062
+ "page_idx": 7
1063
+ },
1064
+ {
1065
+ "type": "text",
1066
+ "text": "Voice dataset for approximately 5,000 steps, with a batch size of 6. More fine-tuning details are given in Appendix A. Similar to §4.2, we found that rank one is sufficient to achieve the best result in most cases, with the exception of Marathi, which requires a rank of 4.",
1067
+ "bbox": [
1068
+ 169,
1069
+ 103,
1070
+ 823,
1071
+ 147
1072
+ ],
1073
+ "page_idx": 8
1074
+ },
1075
+ {
1076
+ "type": "text",
1077
+ "text": "Main results. We present the main results on the MSR task in §4.2. Notice that the evaluation is conducted with the unnormalized tokenizer.<sup>5</sup> The Whisper model exhibited a relatively higher Word Error Rate (WER) across all low-resource languages when compared to FLORA, LORA and IA3 models, reflecting a significant room for enhancement in its multilingual speech recognition capabilities. Particularly, its performance was found to be subpar for the Marathi and Mongolian languages, with WERs of 84.84 and 115.20 respectively. All examined models significantly outperform the base Whisper model by a wide margin across all languages, highlighting the effective fine-tuning of FLORA, LORA and IA3 models. For instance, in Arabic, FLORA reduces the WER to 30.21 from Whisper's 46.03, showcasing a significant enhancement in speech recognition accuracy. Particularly, FLORA and LORA consistently outperform IA3, indicating a better expressive power for multilingual speech recognition tasks. For example, in Czech, FLORA has a mean WER of 10.76, which is slightly better compared to IA3's 11.61 and LORA's 11.47. A similar trend is observed in Lithuanian and Hindi. In summary, this table shows the superior performance of FLORA and LORA over IA3 in the speech recognition task across diverse languages. The consistent low WERs attained by FLORA demonstrates its potential as a viable model for MSR tasks.",
1078
+ "bbox": [
1079
+ 169,
1080
+ 152,
1081
+ 826,
1082
+ 363
1083
+ ],
1084
+ "page_idx": 8
1085
+ },
1086
+ {
1087
+ "type": "text",
1088
+ "text": "5 RELATED WORK",
1089
+ "text_level": 1,
1090
+ "bbox": [
1091
+ 171,
1092
+ 380,
1093
+ 346,
1094
+ 396
1095
+ ],
1096
+ "page_idx": 8
1097
+ },
1098
+ {
1099
+ "type": "text",
1100
+ "text": "Parameter-Efficient Fine-Tuning (PEFT) methods are broadly partitioned into two categories: weight-based and non-weight-based approaches. MC-dropout (Lakshminarayanan et al., 2016) stands as an early example for the non-weight-based approach, where distinct dropout masks are allocated to various tasks. Recently, prompt tuning techniques have emerged as a prevalent stream within this category (Li & Liang, 2021; Lester et al., 2021), facilitating efficient adaptation with minimal modifications to models. Successive endeavors aimed to enhance this class of methods, delving into aspects such as optimization (Mao et al., 2021; Diao et al., 2022), transferability (Wang et al., 2021; Vu et al., 2021; He et al., 2022b), and the usage of discrete prompts (Schick & Schütze, 2020a;b; Gao et al., 2021; Malkin et al., 2021), among others (Liu et al., 2022b; 2021).",
1101
+ "bbox": [
1102
+ 169,
1103
+ 412,
1104
+ 823,
1105
+ 539
1106
+ ],
1107
+ "page_idx": 8
1108
+ },
1109
+ {
1110
+ "type": "text",
1111
+ "text": "We focus on weight-based approaches in this work, which has a weight interpretation as exemplified by LoRA (Hu et al., 2021). This line of research can be traced back to Progressive Network (Rusu et al., 2016), which inserts a sub-network when a new task arrives. This principle was later adapted widely in foundation models as represented by adapter based methods (Houlsby et al., 2019; Mahabadi et al., 2021; Davison, 2021; Ding et al., 2022; Wang et al., 2022b). In particular, BitFit (BenZaken et al., 2021) was introduced to solely update the bias parameters, while IA3 (Liu et al., 2022a) was proposed to rescale the activations. Additionally, approaches such Fish (Sung et al., 2021) and Diff-pruning (Guo et al., 2020) leverage sparsity to facilitate efficient adaptation of foundation models. A separate vein of research aims to improve LoRA by reducing its computational and memory costs (Zhang et al., 2023b;a; Malladi et al., 2023). He et al. (2022a) explored how to unify different PEFT methods. Dettmers et al. (2023) quantized LoRA to reduce memory footprint. Chavan et al. (2023) generalized LoRA by learning individual adapters in each layer. Several other works focus on building mixture of adapters (Wang et al., 2022a; Diao et al., 2023).",
1112
+ "bbox": [
1113
+ 169,
1114
+ 544,
1115
+ 826,
1116
+ 727
1117
+ ],
1118
+ "page_idx": 8
1119
+ },
1120
+ {
1121
+ "type": "text",
1122
+ "text": "6 CONCLUSION",
1123
+ "text_level": 1,
1124
+ "bbox": [
1125
+ 171,
1126
+ 746,
1127
+ 316,
1128
+ 760
1129
+ ],
1130
+ "page_idx": 8
1131
+ },
1132
+ {
1133
+ "type": "text",
1134
+ "text": "We introduced FLORA, an extension of LORA, facilitating efficient batching. Empirical evaluations demonstrated that FLORA enhances throughput and latency in practical serving scenarios, all while preserving the accuracy of LORA. Through FLORA, we aim to facilitate a more efficient adaptation of large language models to diverse and real-world user requests.",
1135
+ "bbox": [
1136
+ 169,
1137
+ 777,
1138
+ 823,
1139
+ 834
1140
+ ],
1141
+ "page_idx": 8
1142
+ },
1143
+ {
1144
+ "type": "text",
1145
+ "text": "Limitations. Despite its parameter efficiency, FLORA still requires fine-tuning. A promising future work could be to derive FLORA weights from a trained LoRA model, given that LORA remains",
1146
+ "bbox": [
1147
+ 169,
1148
+ 839,
1149
+ 823,
1150
+ 869
1151
+ ],
1152
+ "page_idx": 8
1153
+ },
1154
+ {
1155
+ "type": "header",
1156
+ "text": "Published as a conference paper at ICLR 2024",
1157
+ "bbox": [
1158
+ 171,
1159
+ 32,
1160
+ 478,
1161
+ 47
1162
+ ],
1163
+ "page_idx": 8
1164
+ },
1165
+ {
1166
+ "type": "page_footnote",
1167
+ "text": "This is because the normalized tokenizer has a bug in the official leaderboard implementation at the time of submission.",
1168
+ "bbox": [
1169
+ 169,
1170
+ 897,
1171
+ 823,
1172
+ 924
1173
+ ],
1174
+ "page_idx": 8
1175
+ },
1176
+ {
1177
+ "type": "page_number",
1178
+ "text": "9",
1179
+ "bbox": [
1180
+ 493,
1181
+ 948,
1182
+ 504,
1183
+ 959
1184
+ ],
1185
+ "page_idx": 8
1186
+ },
1187
+ {
1188
+ "type": "ref_text",
1189
+ "text": "the most prevalent type of adapter as per (Huang et al., 2023). This adaptation could potentially obviate the requirement for fine-tuning, thereby accelerating the process of model adaptation.",
1190
+ "bbox": [
1191
+ 171,
1192
+ 103,
1193
+ 823,
1194
+ 133
1195
+ ],
1196
+ "page_idx": 9
1197
+ },
1198
+ {
1199
+ "type": "text",
1200
+ "text": "REFERENCES",
1201
+ "text_level": 1,
1202
+ "bbox": [
1203
+ 173,
1204
+ 152,
1205
+ 287,
1206
+ 167
1207
+ ],
1208
+ "page_idx": 9
1209
+ },
1210
+ {
1211
+ "type": "list",
1212
+ "sub_type": "ref_text",
1213
+ "list_items": [
1214
+ "Ahmad Abdelfattah, Azzam Haidar, Stanimire Tomov, and Jack J. Dongarra. Performance, design, and autotuning of batched gemm for gpus. In Information Security Conference, 2016. URL https://api-semanticscholar.org/CorpusID:2559252.",
1215
+ "R. Ardila, M. Branson, K. Davis, M. Henretty, M. Kohler, J. Meyer, R. Morais, L. Saunders, F. M. Tyers, and G. Weber. Common voice: A massively-multilingual speech corpus. In Proceedings of the 12th Conference on Language Resources and Evaluation (LREC 2020), pp. 4211-4215, 2020.",
1216
+ "Jacob 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.",
1217
+ "Elad Ben-Zaken, Shauli Ravfogel, and Yoav Goldberg. Bitfit: Simple parameter-efficient fine-tuning for transformer-based masked language-models. ArXiv, abs/2106.10199, 2021. URL https://api-semanticscholar.org/CorpusID:231672601.",
1218
+ "Federico Cassano, John Gouwar, Daniel Nguyen, Sy Duy Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q. Feldman, Arjun Guha, Michael Greenberg, and Abhinav Jangda. Multipl-e: A scalable and polyglot approach to benchmarking neural code generation. IEEE Transactions on Software Engineering, 49:3675-3691, 2023. URL https://api-semanticscholar.org/CorpusID:258205341.",
1219
+ "Arnav Chavan, Zhuang Liu, Deepak K. Gupta, Eric P. Xing, and Zhiqiang Shen. One-for-all: Generalized lora for parameter-efficient fine-tuning. ArXiv, abs/2306.07967, 2023. URL https://api.sementicscholar.org/CorpusID:259144860.",
1220
+ "Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde, Jared Kaplan, Harrison Edwards, Yura 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, David W. Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William H. Guss, Alex Nichol, Igor Babuschkin, S. Arun Balaji, Shantanu Jain, Andrew Carr, Jan Leike, Joshua Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew M. 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. ArXiv, abs/2107.03374, 2021.",
1221
+ "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 $90\\%$ * chatgpt quality, March 2023. URL https://lmsys.org/blog/2023-03-30-vicuna/.",
1222
+ "Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher R'e. Flashattention: Fast and memory-efficient exact attention with io-awareness. ArXiv, abs/2205.14135, 2022. URL https://api-semanticscholar.org/CorpusID:249151871.",
1223
+ "Joe Davison. Compacter: Efficient low-rank hypercomplex adapter layers. In Neural Information Processing Systems, 2021. URL https://api_semanticscholar.org/CorpusID: 235356070.",
1224
+ "Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. ArXiv, abs/2305.14314, 2023. URL https://api-semanticscholar.org/CorpusID:258841328.",
1225
+ "Shizhe Diao, Xuechun Li, Yong Lin, Zhichao Huang, Xiao Zhou, and Tong Zhang. Black-box prompt learning for pre-trained language models. ArXiv, abs/2201.08531, 2022. URL https://api-semanticscholar.org/CorpusID:246210164."
1226
+ ],
1227
+ "bbox": [
1228
+ 171,
1229
+ 174,
1230
+ 825,
1231
+ 924
1232
+ ],
1233
+ "page_idx": 9
1234
+ },
1235
+ {
1236
+ "type": "header",
1237
+ "text": "Published as a conference paper at ICLR 2024",
1238
+ "bbox": [
1239
+ 171,
1240
+ 32,
1241
+ 478,
1242
+ 47
1243
+ ],
1244
+ "page_idx": 9
1245
+ },
1246
+ {
1247
+ "type": "page_number",
1248
+ "text": "10",
1249
+ "bbox": [
1250
+ 490,
1251
+ 946,
1252
+ 509,
1253
+ 960
1254
+ ],
1255
+ "page_idx": 9
1256
+ },
1257
+ {
1258
+ "type": "list",
1259
+ "sub_type": "ref_text",
1260
+ "list_items": [
1261
+ "Shizhe Diao, Tianyang Xu, Ruijia Xu, Jiawei Wang, and T. Zhang. Mixture-of-domain-adapters: Decoupling and injecting domain knowledge to pre-trained language models' memories. In Annual Meeting of the Association for Computational Linguistics, 2023. URL https://apisemantic scholar.org/CorpusID:259108831.",
1262
+ "Ning Ding, Yujia Qin, Guang Yang, Fu Wei, Zonghan Yang, Yusheng Su, Shengding Hu, Yulin Chen, Chi-Min Chan, Weize Chen, Jing Yi, Weilin Zhao, Xiaozhi Wang, Zhiyuan Liu, Haitao Zheng, Jianfei Chen, Yang Liu, Jie Tang, Juan Li, and Maosong Sun. Delta tuning: A comprehensive study of parameter efficient methods for pre-trained language models. ArXiv, abs/2203.06904, 2022. URL https://api_semanticscholar.org/CorpusID:247446969.",
1263
+ "William Fedus, Barret Zoph, and Noam M. Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. J. Mach. Learn. Res., 23:120:1-120:39, 2021. URL https://api-semanticscholar.org/CorpusID:231573431.",
1264
+ "Tianyu Gao, Adam Fisch, and Danqi Chen. Making pre-trained language models better few-shot learners. ArXiv, abs/2012.15723, 2021. URL https://api_semanticscholar.org/CorpusID:229923710.",
1265
+ "Demi Guo, Alexander M. Rush, and Yoon Kim. Parameter-efficient transfer learning with diff pruning. In Annual Meeting of the Association for Computational Linguistics, 2020. URL https://apisemantic scholar.org/CorpusID:229152766.",
1266
+ "Junxian He, Chunting Zhou, Xuezhe Ma, Taylor Berg-Kirkpatrick, and Graham Neubig. Towards a unified view of parameter-efficient transfer learning. In International Conference on Learning Representations, 2022a. URL https://openreview.net/forum?id=ORDcd5Axok.",
1267
+ "Yun He, Huaixiu Steven Zheng, Yi Tay, Jai Gupta, Yu Du, V. Aribandi, Zhe Zhao, Yaguang Li, Zhaoji Chen, Donald Metzler, Heng-Tze Cheng, and Ed H. Chi. Hyperprompt: Prompt-based task-conditioning of transformers. ArXiv, abs/2203.00759, 2022b. URL https://api.sementicscholar.org/CorpusID:247218062.",
1268
+ "Or Honovich, Thomas Scialom, Omer Levy, and Timo Schick. Unnatural instructions: Tuning language models with (almost) no human labor. ArXiv, abs/2212.09689, 2022.",
1269
+ "Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin de Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. Parameter-efficient transfer learning for nlp. In International Conference on Machine Learning, 2019. URL https://api.sementicscholar.org/CorpusID:59599816.",
1270
+ "J. Edward Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuzhhi Li, Shean Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. ArXiv, abs/2106.09685, 2021. URL https://api(semanticscholar.org/CorpusID:235458009.",
1271
+ "Chengsong Huang, Qian Liu, Bill Yuchen Lin, Tianyu Pang, Chao Du, and Min Lin. Lorahub: Efficient cross-task generalization via dynamic lora composition. ArXiv, abs/2307.13269, 2023. URL https://api.sementicscholar.org/CorpusID:260155012.",
1272
+ "Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles, 2023.",
1273
+ "Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In NIPS, 2016. URL https://api.sementicscholar.org/CorpusID:6294674.",
1274
+ "Ariel N. Lee, Cole J. Hunter, and Nataniel Ruiz. Platypus: Quick, cheap, and powerful refinement of llms. ArXiv, abs/2308.07317, 2023. URL https://api_semanticscholar.org/CorpusID:260886870."
1275
+ ],
1276
+ "bbox": [
1277
+ 171,
1278
+ 102,
1279
+ 825,
1280
+ 924
1281
+ ],
1282
+ "page_idx": 10
1283
+ },
1284
+ {
1285
+ "type": "header",
1286
+ "text": "Published as a conference paper at ICLR 2024",
1287
+ "bbox": [
1288
+ 171,
1289
+ 32,
1290
+ 478,
1291
+ 47
1292
+ ],
1293
+ "page_idx": 10
1294
+ },
1295
+ {
1296
+ "type": "page_number",
1297
+ "text": "11",
1298
+ "bbox": [
1299
+ 490,
1300
+ 948,
1301
+ 506,
1302
+ 959
1303
+ ],
1304
+ "page_idx": 10
1305
+ },
1306
+ {
1307
+ "type": "list",
1308
+ "sub_type": "ref_text",
1309
+ "list_items": [
1310
+ "Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan First, Yanping Huang, Maxim Krikun, Noam M. Shazeer, and Z. Chen. Gshard: Scaling giant models with conditional computation and automatic sharding. ArXiv, abs/2006.16668, 2020. URL https://api.sementicscholar.org/CorpusID:220265858.",
1311
+ "Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In Conference on Empirical Methods in Natural Language Processing, 2021. URL https://api-semanticscholar.org/CorpusID:233296808.",
1312
+ "Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, Qian Liu, Evgenii Zheltonozhkii, Terry Yue Zhuo, Thomas Wang, Olivier Dehaene, Mishig Davaadorj, Joel Lamy-Poirier, João Monteiro, Oleh Shliazhko, Nicolas Gontier, Nicholas Meade, Armel Zebaze, Ming-Ho Yee, Logesh Kumar Umapathi, Jian Zhu, Benjamin Lipkin, Muhtasham Oblokulov, Zhiruo Wang, Rudra Murthy, Jason Stillerman, Siva Sankalp Patel, Dmitry Abulkhanov, Marco Zocca, Manan Dey, Zhihan Zhang, Nourhan Fahmy, Urvashi Bhattacharyya, W. Yu, Swayam Singh, Sasha Luccioni, Paulo Villegas, Maxim Kunakov, Fedor Zhdanov, Manuel Romero, Tony Lee, Nadav Timor, Jennifer Ding, Claire Schlesinger, Hailey Schoelkopf, Jana Ebert, Tri Dao, Mayank Mishra, Alexander Gu, Jennifer Robinson, Carolyn Jane Anderson, Brendan Dolan-Gavitt, Danish Contractor, Siva Reddy, Daniel Fried, Dzmitry Bahdanau, Yacine Jernite, Carlos Munoz Ferrandis, Sean M. Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder: may the source be with you! ArXiv, abs/2305.06161, 2023. URL https://api-semanticscholar.org/CorpusID:258588247.",
1313
+ "Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), abs/2101.00190, 2021. URL https://api_semanticscholar.org/CorpusID:230433941.",
1314
+ "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 in-context learning. ArXiv, abs/2205.05638, 2022a. URL https://api(semanticscholar.org/ CorpusID:248693283.",
1315
+ "Xiao Liu, Kaixuan Ji, Yicheng Fu, Zhengxiao Du, Zhilin Yang, and Jie Tang. P-tuning v2: Prompt tuning can be comparable to fine-tuning universally across scales and tasks. ArXiv, abs/2110.07602, 2021. URL https://api_semanticscholar.org/CorpusID:238857040.",
1316
+ "Xiao Liu, Kaixuan Ji, Yicheng Fu, Weng Lam Tam, Zhengxiao Du, Zhilin Yang, and Jie Tang. P-tuning: Prompt tuning can be comparable to fine-tuning across scales and tasks. In Annual Meeting of the Association for Computational Linguistics, 2022b. URL https://api.sementicscholar.org/CorpusID:248780177.",
1317
+ "Rabeeh Karimi Mahabadi, Sebastian Ruder, Mostafa Dehghani, and James Henderson. Parameter-efficient multi-task fine-tuning for transformers via shared hypernetworks. ArXiv, abs/2106.04489, 2021. URL https://api-semanticscholar.org/CorpusID:235309789.",
1318
+ "Nikolay Malkin, Zhen Wang, and Nebojsa Jojic. Coherence boosting: When your pretrained language model is not paying enough attention. In Annual Meeting of the Association for Computational Linguistics, 2021. URL https://api_semanticscholar.org/CorpusID:247476407.",
1319
+ "Sadhika Malladi, Tianyu Gao, Eshaan Nichani, Alexandru Damian, Jason D. Lee, Danqi Chen, and Sanjeev Arora. Fine-tuning language models with just forward passes. ArXiv, abs/2305.17333, 2023. URL https://api-semanticscholar.org/CorpusID:258959274.",
1320
+ "Yuning Mao, Lambert Mathias, Rui Hou, Amjad Almahairi, Hao Ma, Jiawei Han, Wen tau Yih, and Madian Khabsa. Unipelt: A unified framework for parameter-efficient language model tuning. In Annual Meeting of the Association for Computational Linguistics, 2021. URL https://apisemantic scholar.org/CorpusID:238857301."
1321
+ ],
1322
+ "bbox": [
1323
+ 171,
1324
+ 102,
1325
+ 826,
1326
+ 924
1327
+ ],
1328
+ "page_idx": 11
1329
+ },
1330
+ {
1331
+ "type": "header",
1332
+ "text": "Published as a conference paper at ICLR 2024",
1333
+ "bbox": [
1334
+ 171,
1335
+ 32,
1336
+ 478,
1337
+ 47
1338
+ ],
1339
+ "page_idx": 11
1340
+ },
1341
+ {
1342
+ "type": "page_number",
1343
+ "text": "12",
1344
+ "bbox": [
1345
+ 490,
1346
+ 946,
1347
+ 508,
1348
+ 959
1349
+ ],
1350
+ "page_idx": 11
1351
+ },
1352
+ {
1353
+ "type": "list",
1354
+ "sub_type": "ref_text",
1355
+ "list_items": [
1356
+ "OpenAI. Gpt-4 technical report. ArXiv, abs/2303.08774, 2023. URL https://api.sementicscholar.org/CorpusID:257532815.",
1357
+ "Gabriel Orlanski, Kefan Xiao, Xavier García, Jeffrey Hui, Joshua Howland, Jonathan Malmaud, Jacob Austin, Rishah Singh, and Michele Catasta. Measuring the impact of programming language distribution. In International Conference on Machine Learning, 2023. URL https://api-semanticscholar.org/CorpusID:256615914.",
1358
+ "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, abs/2203.02155, 2022.",
1359
+ "Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32, pp. 8024-8035. Curran Associates, Inc., 2019. URL http://papers.neurips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library.pdf.",
1360
+ "Joan Puigcerver, Carlos Riquelme, Basil Mustafa, and Neil Houlsby. From sparse to soft mixtures of experts. ArXiv, abs/2308.00951, 2023. URL https://api(semanticscholar.org/ CorpusID:260378993.",
1361
+ "Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever. Robust speech recognition via large-scale weak supervision, 2022. URL https://arxiv.org/abs/2212.04356.",
1362
+ "Andrei A. Rusu, Neil C. Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. ArXiv, abs/1606.04671, 2016. URL https://api_semanticscholar.org/CorpusID:15350923.",
1363
+ "Timo Schick and Hinrich Schütze. Exploiting cloze-questions for few-shot text classification and natural language inference. In Conference of the European Chapter of the Association for Computational Linguistics, 2020a. URL https://api_semanticscholar.org/CorpusID:210838924.",
1364
+ "Timo Schick and Hinrich Schütze. It's not just size that matters: Small language models are also few-shot learners. ArXiv, abs/2009.07118, 2020b. URL https://api_semanticscholar.org/CorpusID:221703107.",
1365
+ "Yi-Lin Sung, Varun Nair, and Colin Raffel. Training neural networks with fixed sparse masks. ArXiv, abs/2111.09839, 2021. URL https://api_semanticscholar.org/CorpusID:244345839.",
1366
+ "Rohan 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.",
1367
+ "Hugo Touvron, Louis Martin, Kevin R. Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajwal Bhargava, Shruti Bhosale, Daniel M. Bikel, Lukas Blecher, Cristian Cantón Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony S. Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel M. Kloumann, A. V. 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, R. Subramanian, Xia"
1368
+ ],
1369
+ "bbox": [
1370
+ 171,
1371
+ 102,
1372
+ 900,
1373
+ 924
1374
+ ],
1375
+ "page_idx": 12
1376
+ },
1377
+ {
1378
+ "type": "header",
1379
+ "text": "Published as a conference paper at ICLR 2024",
1380
+ "bbox": [
1381
+ 171,
1382
+ 32,
1383
+ 478,
1384
+ 47
1385
+ ],
1386
+ "page_idx": 12
1387
+ },
1388
+ {
1389
+ "type": "page_number",
1390
+ "text": "13",
1391
+ "bbox": [
1392
+ 490,
1393
+ 946,
1394
+ 508,
1395
+ 959
1396
+ ],
1397
+ "page_idx": 12
1398
+ },
1399
+ {
1400
+ "type": "list",
1401
+ "sub_type": "ref_text",
1402
+ "list_items": [
1403
+ "Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zhengxu 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. ArXiv, abs/2307.09288, 2023. URL https://api_semanticscholar.org/CorpusID:259950998.",
1404
+ "Tu Vu, Brian Lester, Noah Constant, Rami Al-Rfou, and Daniel Matthew Cer. Spot: Better frozen model adaptation through soft prompt transfer. ArXiv, abs/2110.07904, 2021. URL https://api-semanticscholar.org/CorpusID:239009558.",
1405
+ "Chengyu Wang, J. Wang, Minghui Qiu, Jun Huang, and Ming Gao. Transprompt: Towards an automatic transferable prompting framework for few-shot text classification. In Conference on Empirical Methods in Natural Language Processing, 2021. URL https://apisemantic scholar.org/CorpusID:243865402.",
1406
+ "Yaqing Wang, Subhabrata Mukherjee, Xiaodong Liu, Jing Gao, Ahmed Hassan Awadallah, and Jianfeng Gao. Adamix: Mixture-of-adapter for parameter-efficient tuning of large language models. ArXiv, abs/2205.12410, 2022a. URL https://api_semanticscholar.org/ CorpusID:249063002.",
1407
+ "Yaqing Wang, Subhabrata Mukherjee, Xiaodong Liu, Jing Gao, Ahmed Hassan Awadallah, and Jianfeng Gao. Parameter-efficient tuning of large language models. 2022b. URL https:// api.sementicscholar.org/CorpusID:249536106.",
1408
+ "Yizhong 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, abs/2212.10560, 2022c.",
1409
+ "Gyeong-In Yu and Joo Seong Jeong. Orca: A distributed serving system for transformer-based generative models. In USENIX Symposium on Operating Systems Design and Implementation, 2022. URL https://api-semanticscholar.org/CorpusID:251734964.",
1410
+ "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, 2023a. URL https://api-semanticscholar.org/CorpusID:260683267.",
1411
+ "Qingru Zhang, Minshuo Chen, Alexander W. Bukharin, Pengcheng He, Yu Cheng, Weizhu Chen, and Tuo Zhao. Adaptive budget allocation for parameter-efficient fine-tuning. ArXiv, abs/2303.10512, 2023b. URL https://api_semanticscholar.org/CorpusID: 257631760."
1412
+ ],
1413
+ "bbox": [
1414
+ 171,
1415
+ 102,
1416
+ 825,
1417
+ 626
1418
+ ],
1419
+ "page_idx": 13
1420
+ },
1421
+ {
1422
+ "type": "text",
1423
+ "text": "A ADDITIONAL TRAINING DETAILS",
1424
+ "text_level": 1,
1425
+ "bbox": [
1426
+ 171,
1427
+ 652,
1428
+ 483,
1429
+ 669
1430
+ ],
1431
+ "page_idx": 13
1432
+ },
1433
+ {
1434
+ "type": "text",
1435
+ "text": "We delve into additional details regarding the models used in §4.2. We conducted fine-tuning on two StarCoder models (Li et al., 2023), specifically the 15B and 3B models. For both models, we employed LoRA (Hu et al., 2021) on the default layers within the Parameter Efficient Fine-Tuning (PEFT) library $^6$ , targeting only the key and query projections in the self-attention layers. This incurs roughly $0.03\\%$ number of training parameters in the rank 1 setting. For a fair comparison, we applied FLORA to the same layers where LoRA was applied. Regarding the other baseline IA3 (Liu et al., 2022a), we executed the fine-tuning in two distinct settings: one with the default configuration in PEFT, applying IA3 to the key projection layers and the first fully-connected layer in the feedforward layers; and another aligning with the LoRA setting, restricting application to the key and query projection layers. The latter setup proved to be less effective than the default setting, thus the results presented in §4.2 adhere to the default configuration.",
1436
+ "bbox": [
1437
+ 169,
1438
+ 683,
1439
+ 826,
1440
+ 839
1441
+ ],
1442
+ "page_idx": 13
1443
+ },
1444
+ {
1445
+ "type": "text",
1446
+ "text": "Despite StarCoder's pre-training on the Stack dataset, which contains over 6TB of source code files covering 358 programming languages, we still fine-tuned all methods on this dataset for the low-resource programming languages. This eliminates the time-consuming process to create new data. Our observations revealed that both IA3 and FLORA require a higher learning rate compared to",
1447
+ "bbox": [
1448
+ 169,
1449
+ 844,
1450
+ 825,
1451
+ 902
1452
+ ],
1453
+ "page_idx": 13
1454
+ },
1455
+ {
1456
+ "type": "header",
1457
+ "text": "Published as a conference paper at ICLR 2024",
1458
+ "bbox": [
1459
+ 171,
1460
+ 32,
1461
+ 478,
1462
+ 47
1463
+ ],
1464
+ "page_idx": 13
1465
+ },
1466
+ {
1467
+ "type": "page_footnote",
1468
+ "text": "$^{6}$ https://github.com/huggingface/peft/tree/main",
1469
+ "bbox": [
1470
+ 192,
1471
+ 909,
1472
+ 602,
1473
+ 924
1474
+ ],
1475
+ "page_idx": 13
1476
+ },
1477
+ {
1478
+ "type": "page_number",
1479
+ "text": "14",
1480
+ "bbox": [
1481
+ 490,
1482
+ 946,
1483
+ 508,
1484
+ 959
1485
+ ],
1486
+ "page_idx": 13
1487
+ },
1488
+ {
1489
+ "type": "table",
1490
+ "img_path": "images/4b7844a51e05ee1d97b5c69628a9146f68ff4ce5a083447a1174d49c029a81da.jpg",
1491
+ "table_caption": [],
1492
+ "table_footnote": [],
1493
+ "table_body": "<table><tr><td rowspan=\"2\">Language</td><td rowspan=\"2\">Base Model</td><td colspan=\"3\">pass@1 (Relative Improvement)</td></tr><tr><td>FLORA</td><td>IA3</td><td>LORA</td></tr><tr><td></td><td colspan=\"4\">StarCoder 15B</td></tr><tr><td>Julia</td><td>23.31</td><td>26.56 (13.92%)</td><td>23.90 (2.51%)</td><td>25.62 (10.45%)</td></tr><tr><td>Lua</td><td>26.60</td><td>30.20 (13.57%)</td><td>28.40 (6.77%)</td><td>29.04 (9.18%)</td></tr><tr><td>R</td><td>16.07</td><td>17.55 (9.24%)</td><td>16.65 (3.59%)</td><td>18.60 (15.8%)</td></tr><tr><td></td><td colspan=\"4\">StarCoderBase 3B</td></tr><tr><td>Julia</td><td>15.62</td><td>19.11 (22.39%)</td><td>16.72 (7.05%)</td><td>19.77 (26.59%)</td></tr><tr><td>Lua</td><td>17.63</td><td>19.46 (10.39%)</td><td>18.04 (2.33%)</td><td>20.23 (14.75%)</td></tr><tr><td>R</td><td>10.00</td><td>10.70 (7.02%)</td><td>9.98 (-0.25%)</td><td>10.06 (0.62%)</td></tr></table>",
1494
+ "bbox": [
1495
+ 243,
1496
+ 99,
1497
+ 754,
1498
+ 291
1499
+ ],
1500
+ "page_idx": 14
1501
+ },
1502
+ {
1503
+ "type": "text",
1504
+ "text": "Table 3: Comparison of three fine-tuning methods FLORA, IA3, and LoRA on StarCoder 15B and StarCoderBase 3B across additional low-resource programming languages in the MultiPL-E benchmark.",
1505
+ "bbox": [
1506
+ 169,
1507
+ 299,
1508
+ 823,
1509
+ 340
1510
+ ],
1511
+ "page_idx": 14
1512
+ },
1513
+ {
1514
+ "type": "text",
1515
+ "text": "LORA. For LORA, a learning rate of $1\\mathrm{e} - 4$ sufficed, whereas IA3 required $5\\mathrm{e} - 3$ , and FLORA demanded an even higher rate of $8\\mathrm{e} - 3$ . We conjecture that this stems from FLORA and IA3 incorporating multiplicative weight perturbation, which typically requires a larger learning rate. All models were fine-tuned using 8 bit quantization featuring lower training memory cost.",
1516
+ "bbox": [
1517
+ 169,
1518
+ 369,
1519
+ 823,
1520
+ 426
1521
+ ],
1522
+ "page_idx": 14
1523
+ },
1524
+ {
1525
+ "type": "text",
1526
+ "text": "We present results for additional low-resource languages in Appendix A. The improvements provided by PEFT methods are less pronounced in these languages compared to those documented in §4.2. Nevertheless, it can be observed that LORA and FLORA still outperform IA3, despite the limited room for enhancement in these languages.",
1527
+ "bbox": [
1528
+ 169,
1529
+ 431,
1530
+ 823,
1531
+ 491
1532
+ ],
1533
+ "page_idx": 14
1534
+ },
1535
+ {
1536
+ "type": "text",
1537
+ "text": "Next, we discuss further details concerning the models used in §4.3. We performed fine-tuning on the Whisper large model (Radford et al., 2022), which consists of 1.5 billion parameters. Unlike the code generation task, we discovered that using the default modules in the PEFT library does not yield the best performance. Instead, we applied FLORA, LoRA, and IA3 to every fully-connected layer in the Whisper transformer. We fine-tuned all methods on the Common Voice benchmark (Ardila et al., 2020) for each low-resource language showcased in §4.2. We continued to employ larger learning rates for FLORA and IA3. Specifically, we maintained a learning rate of $2\\mathrm{e} - 4$ for LORA, while using $4\\mathrm{e} - 3$ and $6\\mathrm{e} - 3$ for IA3 and FLORA respectively. Additionally, we utilized 8-bit quantization during training to minimize the GPU memory requirement.",
1538
+ "bbox": [
1539
+ 169,
1540
+ 494,
1541
+ 826,
1542
+ 623
1543
+ ],
1544
+ "page_idx": 14
1545
+ },
1546
+ {
1547
+ "type": "text",
1548
+ "text": "B ADDITIONAL SERVING RESULTS",
1549
+ "text_level": 1,
1550
+ "bbox": [
1551
+ 171,
1552
+ 642,
1553
+ 475,
1554
+ 657
1555
+ ],
1556
+ "page_idx": 14
1557
+ },
1558
+ {
1559
+ "type": "text",
1560
+ "text": "B.1 BMM IMPLEMENTATION",
1561
+ "text_level": 1,
1562
+ "bbox": [
1563
+ 171,
1564
+ 672,
1565
+ 390,
1566
+ 686
1567
+ ],
1568
+ "page_idx": 14
1569
+ },
1570
+ {
1571
+ "type": "text",
1572
+ "text": "We provide further details concerning the experiments in §4.1. To begin, we illustrate the implementation of \"torch.bmm\" as follows. Upon computing the adaptersout, it can be added to the output of the standard LLM layer. This method facilitates the computation of diverse adapters' outputs within a batch.",
1573
+ "bbox": [
1574
+ 169,
1575
+ 699,
1576
+ 823,
1577
+ 756
1578
+ ],
1579
+ "page_idx": 14
1580
+ },
1581
+ {
1582
+ "type": "code",
1583
+ "sub_type": "code",
1584
+ "code_caption": [],
1585
+ "code_body": "inputs = torch Randn(batch, seq_length, d_model) \nadapter_b # shape of (batch, d_model, rank) \nadapter_a # shape of (batch, rank, d_model) \nhidden = torch.bmm(inputs, adapter_b) \nadaptersout = torch.bmm(hidden, adapter_a)",
1586
+ "guess_lang": "julia",
1587
+ "bbox": [
1588
+ 169,
1589
+ 768,
1590
+ 640,
1591
+ 839
1592
+ ],
1593
+ "page_idx": 14
1594
+ },
1595
+ {
1596
+ "type": "text",
1597
+ "text": "B.2 ADDITIONAL RESULTS",
1598
+ "text_level": 1,
1599
+ "bbox": [
1600
+ 171,
1601
+ 854,
1602
+ 375,
1603
+ 869
1604
+ ],
1605
+ "page_idx": 14
1606
+ },
1607
+ {
1608
+ "type": "text",
1609
+ "text": "We further conducted a throughput experiment, employing a setup similar to the one described in §4.1, on the newly proposed Llama-2 foundation models (Touvron et al., 2023). The results for both the 13B and 7B models are illustrated in Fig. 3 (left). When compared against the plot in",
1610
+ "bbox": [
1611
+ 169,
1612
+ 881,
1613
+ 823,
1614
+ 925
1615
+ ],
1616
+ "page_idx": 14
1617
+ },
1618
+ {
1619
+ "type": "header",
1620
+ "text": "Published as a conference paper at ICLR 2024",
1621
+ "bbox": [
1622
+ 171,
1623
+ 32,
1624
+ 478,
1625
+ 47
1626
+ ],
1627
+ "page_idx": 14
1628
+ },
1629
+ {
1630
+ "type": "page_number",
1631
+ "text": "15",
1632
+ "bbox": [
1633
+ 490,
1634
+ 946,
1635
+ 508,
1636
+ 959
1637
+ ],
1638
+ "page_idx": 14
1639
+ },
1640
+ {
1641
+ "type": "text",
1642
+ "text": "Fig. 2 (left), it is evident that the inflection rank at which LoRA begins to outperform FLORA is lower for the Llama-2 models than for the StarCoder 15B. This shows that the ratio $c_{1} / c_{2}$ from Eq. (7) varies across different architectures. One plausible explanation could be that, being a recent architecture, the Llama-2 model has not yet been fully optimized within the vLLM framework, potentially impacting throughput performance.",
1643
+ "bbox": [
1644
+ 169,
1645
+ 103,
1646
+ 823,
1647
+ 175
1648
+ ],
1649
+ "page_idx": 15
1650
+ },
1651
+ {
1652
+ "type": "text",
1653
+ "text": "The right panel of Fig. 3 presents the serving results concerning StarCoder-3B. Notably, the inflection rank at which LORA begins to outperform FLORA is lower here as compared to the one observed in StarCoder 15B, as seen in Fig. 2 (right). This is attributed to the relatively low latency on StarCoder-3B, which implies that a request rate of 8 requests per second fails to saturate the LLM server, thereby diminishing the advantage of FLORA. Upon escalating the request rate to 15 requests per second, the inflection rank correspondingly increases to around 12. This illustrates that the latency improvement exhibited in Fig. 2 (left) represents a theoretical enhancement. The actual improvement in serving depends on model architectures, request rates, and other practical considerations.",
1654
+ "bbox": [
1655
+ 169,
1656
+ 180,
1657
+ 826,
1658
+ 305
1659
+ ],
1660
+ "page_idx": 15
1661
+ },
1662
+ {
1663
+ "type": "image",
1664
+ "img_path": "images/1aeccb6df31c6f2249796b5ddbff36f5f1fddab42a39da232b9d477586f581d6.jpg",
1665
+ "image_caption": [
1666
+ "Figure 3: Left: Generation throughput vs. rank for FLORA and torch.bmm implementation of LORA, measured in tokens per second (token/s). The experiments were conducted on two Llama-2 models: 13B and 7B (Touvron et al., 2023). FLORA has great throughput advantage over LORA when the rank is small. As the rank increases, the torch.bmm implementation of LORA finally has a better throughput. Right: Latency vs. rank on StarCoder-3B. Requests are coming at the speed of 8 requests per second and 15 requests per second."
1667
+ ],
1668
+ "image_footnote": [],
1669
+ "bbox": [
1670
+ 181,
1671
+ 321,
1672
+ 488,
1673
+ 555
1674
+ ],
1675
+ "page_idx": 15
1676
+ },
1677
+ {
1678
+ "type": "image",
1679
+ "img_path": "images/8fbba7a8dc39dc3f748d891d8ece27df4f5a63831bf343d85289781bbe3847d7.jpg",
1680
+ "image_caption": [],
1681
+ "image_footnote": [],
1682
+ "bbox": [
1683
+ 503,
1684
+ 321,
1685
+ 815,
1686
+ 555
1687
+ ],
1688
+ "page_idx": 15
1689
+ },
1690
+ {
1691
+ "type": "header",
1692
+ "text": "Published as a conference paper at ICLR 2024",
1693
+ "bbox": [
1694
+ 171,
1695
+ 32,
1696
+ 478,
1697
+ 47
1698
+ ],
1699
+ "page_idx": 15
1700
+ },
1701
+ {
1702
+ "type": "page_number",
1703
+ "text": "16",
1704
+ "bbox": [
1705
+ 490,
1706
+ 946,
1707
+ 509,
1708
+ 959
1709
+ ],
1710
+ "page_idx": 15
1711
+ }
1712
+ ]
2024/Batched Low-Rank Adaptation of Foundation Models/698c37fd-a34d-43c4-aeed-9c12baba206a_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Batched Low-Rank Adaptation of Foundation Models/698c37fd-a34d-43c4-aeed-9c12baba206a_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84ef8c5aa27311a2a91d4ff872afcc7b5d05dd86b7c45c9461be8ec478f70e8b
3
+ size 571116
2024/Batched Low-Rank Adaptation of Foundation Models/full.md ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BATCHED LOW-RANK ADAPTATION OF FOUNDATION MODELS
2
+
3
+ Yeming Wen & Swarat Chaudhuri*
4
+
5
+ Department of Computer Science
6
+
7
+ The University of Texas at Austin
8
+
9
+ # ABSTRACT
10
+
11
+ Low-Rank Adaptation (LoRA) has recently gained attention for fine-tuning foundation models by incorporating trainable low-rank matrices, thereby reducing the number of trainable parameters. While LoRA offers numerous advantages, its applicability for real-time serving to a diverse and global user base is constrained by its incapability to handle multiple task-specific adapters efficiently. This imposes a performance bottleneck in scenarios requiring personalized, task-specific adaptations for each incoming request.
12
+
13
+ To mitigate this constraint, we introduce Fast LoRA (FLORA), a framework in which each input example in a minibatch can be associated with its unique low-rank adaptation weights, allowing for efficient batching of heterogeneous requests. We empirically demonstrate that FLORA retains the performance merits of LoRA, showcasing competitive results on the MultiPL-E code generation benchmark spanning over 8 languages and a multilingual speech recognition task across 6 languages.
14
+
15
+ # 1 INTRODUCTION
16
+
17
+ Transformer-based foundation models have showcased remarkable performance across various natural language processing tasks, as evidenced by the successes of ChatGPT (OpenAI, 2023), GitHub Copilot (Chen et al., 2021) and Speech Recognition (Radford et al., 2022) among others. The practice of fine-tuning these models for specific domains or specialized needs, such as instruction-tuning, has become increasingly prevalent (Wang et al., 2022c; Honovich et al., 2022; Taori et al., 2023; Chiang et al., 2023). This is driven by the requirements of real-world applications, which often demand models tailored to specific domains, tasks, or even individual user preferences (Ouyang et al., 2022). However, the extensive number of parameters in foundation models poses computational and memory challenges for task-specific fine-tuning.
18
+
19
+ Low-Rank Adaptation (LORA) emerged as a solution to this challenge by incorporating trainable low-rank matrices (Hu et al., 2021) which significantly reduces the number of trainable parameters during fine-tuning. LoRA's success stems from its ability to achieve domain adaptation without retraining the entire model (Taori et al., 2023; Dettmers et al., 2023; Lee et al., 2023). However, a practical challenge arises in real-time serving scenarios. Batching is the practice of aggregating multiple data points into a single computation. It is a common technique to leverage parallel processing capabilities in GPUs, ensuring higher throughput and lower serving cost. It becomes especially crucial when serving world-wide users where many requests could flood in every second. The intrinsic design of LoRA dictates that every example within a batch shares the same adapter, which is suboptimal for real-world serving scenarios where each request may require a unique adapter.
20
+
21
+ Consider a scenario where users from various locations and professions demand different language and occupation adapters as illustrated in Fig. 1. With LoRA, the batch processing would either force all these diverse requests to share the same adapter or process them sequentially, both of which are impractical. These limitations emphasize the need for a solution that can not only utilize the advantages of LoRA but also serve multiple adapters in parallel, catering to the diverse and simultaneous requests encountered in reality.
22
+
23
+ ![](images/320d41ac7fa023cfe4d8924c9dbfc31f82c620dfe92ae5454aab3fa9f52061c6.jpg)
24
+ Figure 1: This shows a pragmatic scenario where a foundation model in production receives four incoming requests, each requiring distinct adapters. Omitting two adapters in step 2 & 3 for presentation simplicity. FLORA facilitates batching in such serving circumstances, provided the adapters are of low rank, thereby sustaining high throughput and low latency. Detailed discussion on vectorization is provided in §3.2.
25
+
26
+ We posit that it is critical to develop a more flexible adaptation mechanism that is compatible with diverse real-world user queries. We introduce fast LORA (FLORA), a modification of LORA, enabling individual examples in a minibatch to be associated with distinct low-rank weights without compromising the expressive power. This modification promises the benefits of domain adaptation, as heralded by LORA, but without the batching limitation.
27
+
28
+ Our contributions can be summarized as follows:
29
+
30
+ 1. We propose FLORA, a framework that augments LoRA by allowing each example in a minibatch to have its unique low-rank adapters, facilitating efficient batching.
31
+ 2. We provided an analytical analysis describing the scenarios where FLORA would be preferred over LoRA in practical applications. This analysis is further substantiated by the empirical evidence where FLORA achieves a 2X throughput improvement on the state-of-the-art code LLM StarCoder 15B in the low-rank setting when diverse adapters are required for incoming examples. Additionally, FLORA reduces the latency by half under the same low-rank setting.
32
+ 3. We demonstrate that FLORA does not sacrifice accuracy compared to LORA on a multilingual code generation task across 8 programming languages, and maintains accuracy in speech recognition tasks over five languages.
33
+
34
+ # 2 PROBLEM FORMULATION
35
+
36
+ In this section, we outline the problem tackled in this work, illustrating the constraints and objectives that drive the development of the proposed FLORA methodology. Let $\mathcal{M}$ denote a foundation model parameterized by $\theta$ , with a total number of parameters $N$ . The common practice is to fine-tune this foundational model for various specific tasks, ranging from multilingual code generation to speech recognition as demonstrated in §4.2 and §4.3.
37
+
38
+ # 2.1 LORA ADAPTERS
39
+
40
+ Fine-tuning the entire model $\mathcal{M}$ for a specific task is usually computationally expensive due to the massive parameter count. LoRA (Low-rank Adaptation, (Hu et al., 2021)) was introduced to facilitate domain-specific adaptations with a significantly reduced parameter footprint, with the hypothesis that low-rank adaptation is sufficient for fine-tuning domain specific foundation models.
41
+
42
+ Given the pre-trained weight matrix $W_0 \in \mathbb{R}^{d \times k}$ , LoRA posits that the weight matrix of the adapted foundation model can be expressed as $W_0 + \Delta W = W_0 + BA$ , where $\Delta W$ has a low-rank structure. This matrix $\Delta W$ is factorized into two smaller, trainable matrices: $B \in \mathbb{R}^{d \times r}$ and $A \in \mathbb{R}^{r \times k}$ , such that $\Delta W = BA$ where $r$ stands for the rank. For a given input $\mathbf{x}_i$ , the output $\mathbf{y}_i$ is given by:
43
+
44
+ $$
45
+ \mathbf {y} _ {i} = \mathcal {M} \left(\mathbf {x} _ {i} \mid \Delta W, W _ {0}, \theta\right) \tag {1}
46
+ $$
47
+
48
+ # 2.2 Batching & THROUGHPUT
49
+
50
+ Batching is a common practice where multiple data points $(\mathbf{x}_1, \mathbf{x}_2, \ldots, \mathbf{x}_m)$ are aggregated into a single batch $\mathcal{B}$ . Consequently, the forward passes of these data points are processed concurrently rather than individually. This practice leverages the parallel processing capability of a modern GPU, thereby significantly improving the throughput $T$ , i.e., the number of data points processed per unit of time. In the context of foundation models, throughput of a batch $\mathcal{B}$ can be defined as $T = \sum_{i=1}^{m} |\mathbf{y}_i| / \Delta t$ , where $|\mathbf{y}_i|$ is the number of tokens generated for each example $\mathbf{x}_i$ in the batch, $\Delta t$ is the total time taken to process the batch, and $m$ is the number of examples in the batch. Note that batching incurs minimal latency penalties. However, given its substantial increase in throughput, batching and its variants are widely used in the state-of-the-art foundation models serving framework such as vLLM (Kwon et al., 2023) to achieve the best balance between throughput and latency.
51
+
52
+ # 2.3 OBJECTIVE
53
+
54
+ Batching typically assumes the same model parameters are utilized for every input example within a minibatch. Hence, a straightforward application of batching in LoRA requires that the adapter matrix $\Delta W$ be shared across all inputs in the batch $\mathcal{B}$ . The challenge arises when considering a scenario where each input example in the batch might originate from a different task. Sharing the same $\Delta W$ for all $\mathbf{x}_i$ in $\mathcal{B}$ becomes suboptimal where each input potentially demands a unique adapter. The limitation is particularly acute when the model is expected to serve a world-wide user base with diverse incoming requests.
55
+
56
+ Given the limitations of LORA in batching, our objective is to maximize the throughput $T$ in global user serving scenarios by maintaining the batching mechanism. Formally, for each $\mathbf{x}_i \in \mathcal{B}$ , we aim to compute $\mathbf{y}_i = \mathcal{M}(\mathbf{x}_i | \Delta W_i, W_0, \theta)$ , where $\Delta W_i$ is the adapter matrix corresponding to the input example $x_i$ . Therefore, $\Delta W_i$ can be unique across $\mathcal{B}$ and specific to a domain or user preference.
57
+
58
+ # 3 FLORA: FAST LOW RANK ADAPTATION
59
+
60
+ As shown in §2.3, adapter sharing is often impractical in real-world serving scenarios. The innovation of FLORA is the introduction of example-specific adapter $\Delta W_{i}$ for each $\mathbf{x}_i$ in a minibatch. In FLORA, the weight matrix $W_{i}$ for each example $\mathbf{x}_i$ in the minibatch is calculated as $W_{i} = \Delta W_{i} \circ W_{0}$ , where $\circ$ denotes element-wise multiplication, $W_{0}$ is the pre-trained weight matrix and $\Delta W_{i}$ is a low-rank adaptation specifically designed for $\mathbf{x}_i$ . Similar to Hu et al. (2021), $\Delta W_{i}$ is decomposed into two trainable matrices: $B_{i} \in \mathbb{R}^{d \times r}$ and $A_{i} \in \mathbb{R}^{r \times k}$ , such that $\Delta W_{i} = B_{i} A_{i}$ , as shown in Fig. 1. Note that FLORA has the same expressive power as LORA by its construction.
61
+
62
+ # 3.1 FORWARD PASS
63
+
64
+ The advantage of FLORA is that computations on a minibatch can be written in terms of matrix multiplications. This enables efficient batched implementations on modern accelerators such as GPUs. Let $x_{i}$ denote the activations in one layer of a neural net, which is a vertical vector of length $d$ . The next layer's activations are given by
65
+
66
+ $$
67
+ \begin{array}{l} y _ {i} = \phi \left(W _ {i} ^ {T} x _ {i}\right) (2) \\ = \phi \left(\left(W _ {0} ^ {T} \circ \Delta W _ {i} ^ {T}\right) x _ {i}\right) (3) \\ = \phi \left(\left(W _ {0} ^ {T} \circ \left(B _ {i} A _ {i}\right) ^ {T}\right) x _ {i}\right) (4) \\ = \phi \left(A _ {i} \circ \left(W _ {0} ^ {T} \left(B _ {i} \circ x _ {i}\right)\right)\right) (5) \\ \end{array}
68
+ $$
69
+
70
+ When the rank is greater than one, we extend the use of the symbol “o” to denote potential broadcasting. Additionally, a dimension reduction operation such as torch.mean is required prior to applying the activation function $\phi$ .
71
+
72
+ The key to FLORA's flexibility lies in the low rank decomposition enables the incorporation of example-specific adapters directly into the forward pass, as demonstrated in the equations above. Crucially, each of these operations—the element-wise multiplication between $A_{i}$ and $x_{i}$ , and between $B_{i}$ and $y_{i}$ — is inherently batch-friendly. Consequently, FLORA allows for simultaneous processing of multiple requests, each requiring its own adapter, within a single minibatch. To vectorize all adapters in the minibatch, we define matrices $\mathbf{A}$ and $\mathbf{B}$ whose rows correspond to the adapters $A_{i}$ and $B_{i}$ for all examples in the minibatch. The above equation is vectorized as:
73
+
74
+ $$
75
+ \mathbf {Y} = \phi \left(\mathbf {A} \circ \left((\mathbf {B} \circ \mathbf {X}) W _ {0}\right)\right) \tag {6}
76
+ $$
77
+
78
+ # 3.2 COMPUTATIONAL EFFICIENCY
79
+
80
+ The computational analysis primarily concentrates on the examination of fully connected layers within a transformer architecture, given that LoRA is specifically applied to these layers, such as query and key projections. To begin, we analyze a baseline that leverages batch matrix multiplication to facilitate the serving of LoRA with multiple adapters. This operation is possible under the assumption that every adapter required by the input examples in the minibatch shares the same shape, specifically, the same rank. The batch matrix multiplication (BMM) can be implemented using the torch.bmm operator in deep learning frameworks such as PyTorch (Paszke et al., 2019). Note that the BMM operator is typically unfavorable in practical settings due to the significant overhead it introduces (Abdelfattah et al., 2016). This overhead diminishes the throughput and increases latency, which is detrimental in serving scenarios where response times are crucial for maintaining a good user experience.
81
+
82
+ Let $b$ and $l$ denote the batch size and the maximum sequence length in the input batch $\mathcal{B}$ . Revisiting the notation introduced in §3, where $W_0 \in \mathbb{R}^{d \times k}$ , $B_i \in \mathbb{R}^{d \times r}$ and $A_i \in \mathbb{R}^{r \times k}$ , the operations required to compute the pre-activation for an input batch $\mathcal{B}$ with dimensions $[b, l, d]$ consist of one matrix multiplication and two BMMs. The matrix multiplication occurs between the input batch $\mathbf{X}$ and the pre-trained weight $W_0$ . The two BMM operations are conducted firstly between the input batch $\mathbf{X}$ and $\mathbf{B}$ , and secondly between the result of the prior computation and $\mathbf{A}$ , where $\mathbf{A}$ and $\mathbf{B}$ are matrices whose rows correspond to the adapters $A_i$ and $B_i$ for all examples in the minibatch respectively. Assuming for simplicity that the layer neither upscales nor downscales the hidden dimension (i.e. $d = k$ ), the upper bound complexity of this layer is discerned as $2c_1(dblr) + c_2(bld^2)$ , with $c_1$ and $c_2$ representing the computational coefficients of BMM and matrix multiplication respectively. Note that $c_1 >> c_2$ because the BMM operator is more expensive than matrix multiplication.
83
+
84
+ For FLORA, the cost is one matrix multiplication which is $c_{2}(rbld^{2})$ where $r$ denotes the rank of the adapters. We omit the cost of element-wise multiplication in this analysis because it is negligible to the matrix multiplication cost. Comparing the computational cost of FLORA and LORA boils down to the following inequality
85
+
86
+ $$
87
+ \frac {2 c _ {1}}{d c _ {2}} + \frac {1}{r} \geq 1 \tag {7}
88
+ $$
89
+
90
+ FLORA exhibits a lower computational cost than bmm LoRA whenever the above inequality holds true. The benefit of FLORA over LoRA is notably pronounced when $r = 1$ . As the rank increases,
91
+
92
+ LORA gradually becomes less costly. From the established inequality, a variety of scenarios can be inferred where FLORA has an advantage over LORA. Firstly, the advantage of FLORA is significantly apparent when the rank of adapters is small. Secondly, in configurations where the model has fewer hidden units but an increased number of layers, FLORA tends to outperform LORA due to the smaller value of $d$ in the denominator of Eq. (7).
93
+
94
+ Another advantage of FLORA is the cost remains invariant to the number of adapters required by the input batch. While the preceding analysis assumes that every token in an example $x_{i}$ shares the same adapter, it is possible to apply multiple adapters to a single example by dividing the example into chunks, and then applying different adapters to each chunk. This approach is commonly observed in the Mixture of Experts framework (Fedus et al., 2021; Lepikhin et al., 2020; Puigcerver et al., 2023). Incorporating several adapters in an input example notably amplifies the ratio $c_{1} / c_{2}$ in Eq. (7), thereby significantly increasing LORA's cost.
95
+
96
+ The ratio $c_{1} / c_{2}$ might not be the same across different transformer architectures. §4.1 is designed to provide a deeper insight into how comparative serving efficiency of FLORA and LORA changes under various architectures. Additionally, it's worth noting that LORA does not apply to the self-attention layers, which constitute a non-trivial portion of the computational cost, thereby overshadowing the advantage of FLORA. However, as efficient self-attention mechanisms such as flash attention (Dao et al., 2022) get adopted, the advantage of FLORA over LORA is likely to get larger.
97
+
98
+ Connection to IA3. IA3 was proposed in Liu et al. (2022a) featuring fast adaptation of LLM. It introduces a learned vector $l$ which re-scales the activation by $y_{i} = l\circ \phi (W_{0}^{T}x_{i}) = \phi \bigl (l\circ (W_{0}^{T}x_{i})\bigr)$ . This can be viewed as a special case of FLORA - a rank 0.5 variant - which only re-scales the columns instead of the entire pre-trained weights. It has a limited expressive power compared to FLORA and LoRA.
99
+
100
+ # 4 EXPERIMENTS
101
+
102
+ In this section, we compare FLORA to LoRA and other notable baselines across various metrics and tasks. To begin with, we delve into a computational analysis to substantiate the enhanced throughput and the reduced latency achieved by FLORA in the case of low rank. Subsequently, we pivot towards analyzing the accuracy of FLORA in multilingual code generation tasks spanning across different languages. The goal is to discern the proficiency of FLORA in maintaining, if not enhancing, the model's accuracy as compared to LoRA. Progressing further, we replicate a similar analysis but in the domain of multilingual speech recognition.
103
+
104
+ # 4.1 SERVING ANALYSIS
105
+
106
+ The primary objective of this serving analysis is to measure the maximum throughput both FLORA and LoRA can attain under varied rank configurations. We carried out this exploration on the state-of-the-art code Large Language Model (LLM) StarCoder (Li et al., 2023), evaluating models of different number of parameters namely 1B, 3B, and 15B. The dataset facilitating this analysis has been sourced from the vLLM throughput benchmark. Noteworthy, this dataset was previously used to fine-tune the English Vicuna model, a state-of-the-art chat LLMs (Chiang et al., 2023). To expedite the benchmarking process, we extracted a subset of 1,000 samples from the original dataset, ensuring a diverse range of sample lengths varying from 50 to 2,000 tokens.
107
+
108
+ In setting up the computational analysis, our primary intent is to compare FLORA and LoRA in the real-world serving scenario. See Appendix B.1 on how bmm LoRA is implemented. The vLLM framework (Kwon et al., 2023) $^{2}$ , with its implementation of continuous batching, presents an ideal setup for this analysis. The continuous batching mechanism in vLLM, as inspired by the principles delineated in Orca (Yu & Jeong, 2022), facilitates a more efficient utilization of GPU resource by allowing new sequence to be inserted immediately once any sequence in the current batch is completed. This continuous flow significantly enhances GPU utilization as compared to static batching, where the GPU awaits the completion of all sequences in a batch before initiating a new batch processing. The comparison of FLORA and LoRA within this setup offers a compelling evidence of
109
+
110
+ ![](images/ed93ba9b562aa6fa23d4c29067f423da49c97808341cacf67371ac664858c667.jpg)
111
+ Figure 2: Left: Generation throughput vs. rank for FLORA and torch.bmm implementation of LORA, measured in tokens per second (token/s). The experiments were conducted on three star-coder models: StarCoder 15B, StarCoderbase 3B and StarCoderbase 1B. FLORA has great throughput advantage over LoRA when the rank is small. As the rank increases, the torch.bmm implementation of LoRA finally has a better throughput. Right: Latency vs. rank on StarCoder-15B. Requests are coming at the speed of 8 requests per second.
112
+
113
+ ![](images/3c18fccff2618301be1b089888cfaea229f6dbe29568ccba3a1feab2c51d877a.jpg)
114
+
115
+ their respective throughput and latency in the real-world serving scenario. It is worth noting that the experiments were conducted without Flash-attention (Dao et al., 2022).
116
+
117
+ Throughput experiment. In Fig. 2, the throughput results for both FLORA and bmm LORA are illustrated across different rank configurations on three StarCoder models with different number of parameters, namely 1B, 3B and 15B. All experiments were conducted on an NVIDIA H100 GPU with a float16 precision<sup>3</sup>. The maximum number of batched tokens is 8,192, which is the same as the model context length. Evidently, FLORA shows a superior throughput over LORA in the lower rank configurations. At rank 1, the throughput of FLORA is more than threefold higher than that of LORA, thereby highlighting the considerable serving performance boost FLORA provides. The advantage of FLORA continues as the rank increases, albeit with a diminishing rate. For instance, at rank 2, FLORA's throughput is around 2.5 times higher, and this multiplicative advantage decreases as the rank increases further. This performance advantage continues up until the rank of 8 in the StarCoder 15B model, where LoRA starts to outperform FLORA. This inflection point suggests that the advantages of FLORA in terms of throughput are more pronounced in lower rank.
118
+
119
+ Notice that the inflection points occurred at a higher rank when serving a smaller LLM as illustrated in (Fig. 2, left). This demonstrates a significant potential of FLORA, especially when considering future applications of quantization techniques to serving LLMs. By applying quantization, such as 8-bit or 4-bit inference, the effective size of the model is reduced, akin to serving a smaller LLM thus potentially extending the rank at which FLORA maintains a throughput advantage over LORA.
120
+
121
+ Latency experiment. We assessed the latency-versus-rank performance on the Starcoder 15B model, using the same dataset as the throughput experiment. This evaluation was conducted under the conditions where requests arrive at a rate of 8 per second. The default maximum number of batched tokens in vLLM serving launcher is 2,560. The results, as shown in (Fig. 2, right), measure latency in terms of seconds per output token. Remarkably, in the lower rank regime (ranging from rank 1 to rank 4), FLORA exhibited a 2-5X reduction in latency compared to LoRA. Notably, the latency for LoRA stood at approximately 2.3 seconds per output token, is impractical for serving due to the poor user experience it would cause. This experiment further highlights the superior capabilities of FLORA in efficiently catering to diverse incoming user requests.
122
+
123
+ These findings validate the theoretical analysis in §4.1, confirming that FLORA provides significant throughput advantages, particularly in settings with lower to moderate ranks. This positions FLORA
124
+
125
+ <table><tr><td rowspan="2">Language</td><td rowspan="2">Base Model</td><td colspan="3">pass@1 (Relative Improvement)</td></tr><tr><td>FLORA</td><td>IA3</td><td>LoRA</td></tr><tr><td></td><td colspan="4">StarCoder 15B</td></tr><tr><td>Dlang</td><td>14.13</td><td>17.26 (22.14%)</td><td>15.26 (7.99%)</td><td>17.15 (21.37%)</td></tr><tr><td>Perl</td><td>17.05</td><td>21.44 (25.76%)</td><td>17.71 (3.90%)</td><td>21.46 (25.76%)</td></tr><tr><td>Ruby</td><td>1.39</td><td>24.94 (1692.86%)</td><td>20.80 (1394.64%)</td><td>23.76 (1608.04%)</td></tr><tr><td>Rust</td><td>22.40</td><td>26.24 (17.14%)</td><td>23.53 (5.04%)</td><td>26.87 (19.95%)</td></tr><tr><td>Racket</td><td>10.20</td><td>12.41 (21.61%)</td><td>11.53 (12.96%)</td><td>12.51 (22.58%)</td></tr><tr><td>Swift</td><td>16.91</td><td>20.38 (20.51%)</td><td>18.13 (7.19%)</td><td>20.35 (20.36%)</td></tr><tr><td></td><td colspan="4">StarCoderBase 3B</td></tr><tr><td>Dlang</td><td>5.65</td><td>5.72 (1.20%)</td><td>5.72 (1.20%)</td><td>6.97 (23.34%)</td></tr><tr><td>Perl</td><td>10.73</td><td>13.01 (21.25%)</td><td>11.46 (6.83%)</td><td>13.31 (27.51%)</td></tr><tr><td>Ruby</td><td>5.33</td><td>14.48 (171.68%)</td><td>7.88 (47.90%)</td><td>13.89 (160.68%)</td></tr><tr><td>Rust</td><td>17.18</td><td>21.00 (22.24%)</td><td>17.28 (0.60%)</td><td>20.67 (20.31%)</td></tr><tr><td>Racket</td><td>8.04</td><td>9.16 (13.99%)</td><td>8.40 (4.48%)</td><td>8.80 (9.48%)</td></tr><tr><td>Swift</td><td>10.04</td><td>15.69 (56.21%)</td><td>12.54 (24.83%)</td><td>15.04 (49.76%)</td></tr></table>
126
+
127
+ Table 1: Comparison of three fine-tuning methods FLORA, IA3, and LORA on StarCoder 15B and StarCoderBase 3B across various low-resource programming languages in the MultiPL-E benchmark. The table presents Pass@1 accuracy of each method alongside the relative improvement over the baseline. The standard errors are less than $0.3\%$ in all cells in the table, therefore we exclude that for clear presentation.
128
+
129
+ as a compelling alternative for efficiently serving adapted foundation models, especially in scenarios where lower ranks suffice the desired model accuracy, as further demonstrated in the subsequent accuracy analysis sections. Moreover, if an enterprise chooses to serve foundation models with a substantial number of diverse adapters, for instance, a personalized LLM, then a low rank or even a rank one is imperative to avoid excessive storage costs.
130
+
131
+ # 4.2 MULTILINGUAL CODE GENERATION
132
+
133
+ A key aspect to examine before applying FLORA in real-world LLM serving is to scrutinize any potential degradation in performance. In this section, we consider multilingual code generation as the testbed for comparing FLORA and LoRA due to its alignment with real-world applications, where the necessity to cater to diverse programming languages is paramount. Low-resource languages, as referred to in this context, are languages that appear much less frequently than other languages in the pre-training data. Orlanski et al. (2023) showed that the performance of code LLMs can be notably enhanced on low-resource programming languages such as PERL by recalibrating the language distribution in the pre-training data. This suggests that fine-tuning a trained LLM on such low-resource languages could potentially boost its performance on the same language. Hence, by employing multilingual code generation as a benchmark, we can make an informed evaluation of adaptability and performance enhancements that FLORA and LoRA can achieve.
134
+
135
+ Additionally, a comparison is made against a third baseline, IA3, which can be considered as a special case of FLORA. Essentially, IA3 can be seen as a rank 0.5 variant of FLORA, thereby facing a constrained expressive power in comparison to both FLORA and LoRA. For FLORA and LoRA, we conducted fine-tuning across a range of rank choices, spanning from 1 to 8. It emerges that within the scope of this multilingual code generation task, a rank of one typically suffices to achieve optimal results, with the exception of Racket and Lua. Consequently, the results shown in §4.2 are predominantly at rank 1, barring Racket and Lua, which are presented at rank 4.
136
+
137
+ Fine-tuning. In our effort to evaluate the performance of FLORA, LORA, and IA3 on the multilingual code generation task, we fine-tuned these models on state-of-the-art multilingual code LLMs, StarCoder 15B and StarCoderBase 3B as introduced in (Li et al., 2023). A pivotal aspect of our fine-tuning process was the utilization of existing data, negating the need for creating new data for
138
+
139
+ <table><tr><td>Model</td><td>Arabic</td><td>Czech</td><td>Lithuanian</td><td>Marathi</td><td>Mongolian</td><td>Hindi</td></tr><tr><td>Whisper</td><td>46.03</td><td>23.19</td><td>46.09</td><td>84.84</td><td>115.20</td><td>43.41</td></tr><tr><td>FLORA</td><td>30.21 ± 0.25</td><td>10.76 ± 0.22</td><td>20.39 ± 0.32</td><td>33.17 ± 0.17</td><td>42.12 ± 0.63</td><td>23.58 ± 0.65</td></tr><tr><td>IA3</td><td>30.48 ± 0.22</td><td>11.61 ± 0.33</td><td>21.41 ± 0.20</td><td>35.03 ± 0.61</td><td>46.47 ± 0.53</td><td>25.64 ± 0.78</td></tr><tr><td>LORA</td><td>30.18 ± 0.21</td><td>10.77 ± 0.38</td><td>20.50 ± 0.21</td><td>31.94 ± 0.33</td><td>41.57 ± 0.69</td><td>23.82 ± 0.74</td></tr></table>
140
+
141
+ Table 2: Mean WER with standard deviation for different models and languages. The WER is calculated with respect to the unnormalized tokenizer. The base model here is Whisper-1.5B.
142
+
143
+ low-resource programming languages. We leveraged the same pre-training data that was used for pre-training StarCoder, specifically, the Stack dataset, which contains over 6TB of permissively-licensed source code files covering 358 programming languages. For each low-resource language in our experiment, we fine-tuned on its corresponding split from the Stack dataset for a total of 1,500 steps, along with batch size 8. More fine-tuning details are given in Appendix A.
144
+
145
+ Evaluation. The evaluation of FLORA, LORA, and IA3 was conducted on the MultiPL-E benchmark (Cassano et al., 2023), which contains the translation of two unit-test driven Python benchmarks (HumanEval and MBPP) to 18 other programming languages. We used the HumanEval split of the benchmark to evaluate the fine-tuned models. As for the metrics, We adopted the $pass@k$ metrics from Chen et al. (2021); Austin et al. (2021), which is calculated as the fraction of problems with at least one correct sample given $k$ samples. Similar to Chen et al. (2021), we drew 100 samples for computing $pass@1$ , with a sampling temperature set at 0.1.
146
+
147
+ Main results. The result in §4.2 exhibits the performance of three methods across various programming languages on both StarCoder 15B and StarCoderBase 3B models. The average relative improvement achieved by FLORA and LoRA is roughly $20\%$ in the selected low-resource programming languages. FLORA consistently outperforms IA3 on all languages, especially on StarCoder 15B, denoting its efficiency in leveraging the model expressive power to improve multilingual code generation. It is notable that StarCoder 15B has an unforeseen issue regarding Ruby generation, where it yields lower accuracy compared to the 3B model. However, all methods are able to fix its abnormal performance.
148
+
149
+ On StarCoderBase 3B, a smaller model, it is evident that the baseline performance drops, yet FLoRA and LoRA still manage to exhibit substantial relative improvement over the baseline, especially in languages like Swift and Ruby. This suggests that both methods benefit from continuous training on the low-resource language split of the pre-training data, although the advantages may diminish with a reduction in model size. While the absolute performance (pass@1 accuracy) varies among languages, the relative improvements highlight the effectiveness of the tested methods in enhancing multilingual code generation.
150
+
151
+ # 4.3 MULTILINGUAL SPEECH RECOGNITION
152
+
153
+ Following our analysis in multilingual code generation, we shift our focus to another substantial application of large language models — multilingual speech recognition (MSR). This domain has seen increasing demand due to the necessity of serving various linguistic interfaces. The capabilities of FLORA and LORA to adapt to multiple languages in code generation presents a tempting premise to investigate their effectiveness in the MSR domain.
154
+
155
+ Fine-tuning. A crucial aspect of our analysis involves fine-tuning the foundation model on a multilingual speech recognition dataset. We selected the Whisper large 1.5B (Radford et al., 2022) as our base model to conduct the subsequent analysis. Whisper is an encoder-decoder transformer model trained on 680k hours of labeled speech data through large-scale weak supervision. Despite being pre-trained on a multilingual speech corpus, the model's predictive capabilities can be improved further for certain languages and tasks through fine-tuning. We use the Common Voice benchmark (Ardila et al., 2020) — containing a total of 38 languages and 2,500 hours of collected audio — for the fine-tuning process, with a particular focus on low-resource languages. For each low-resource language enumerated in §4.2, we fine-tuned on its training split within the Common
156
+
157
+ Voice dataset for approximately 5,000 steps, with a batch size of 6. More fine-tuning details are given in Appendix A. Similar to §4.2, we found that rank one is sufficient to achieve the best result in most cases, with the exception of Marathi, which requires a rank of 4.
158
+
159
+ Main results. We present the main results on the MSR task in §4.2. Notice that the evaluation is conducted with the unnormalized tokenizer.<sup>5</sup> The Whisper model exhibited a relatively higher Word Error Rate (WER) across all low-resource languages when compared to FLORA, LORA and IA3 models, reflecting a significant room for enhancement in its multilingual speech recognition capabilities. Particularly, its performance was found to be subpar for the Marathi and Mongolian languages, with WERs of 84.84 and 115.20 respectively. All examined models significantly outperform the base Whisper model by a wide margin across all languages, highlighting the effective fine-tuning of FLORA, LORA and IA3 models. For instance, in Arabic, FLORA reduces the WER to 30.21 from Whisper's 46.03, showcasing a significant enhancement in speech recognition accuracy. Particularly, FLORA and LORA consistently outperform IA3, indicating a better expressive power for multilingual speech recognition tasks. For example, in Czech, FLORA has a mean WER of 10.76, which is slightly better compared to IA3's 11.61 and LORA's 11.47. A similar trend is observed in Lithuanian and Hindi. In summary, this table shows the superior performance of FLORA and LORA over IA3 in the speech recognition task across diverse languages. The consistent low WERs attained by FLORA demonstrates its potential as a viable model for MSR tasks.
160
+
161
+ # 5 RELATED WORK
162
+
163
+ Parameter-Efficient Fine-Tuning (PEFT) methods are broadly partitioned into two categories: weight-based and non-weight-based approaches. MC-dropout (Lakshminarayanan et al., 2016) stands as an early example for the non-weight-based approach, where distinct dropout masks are allocated to various tasks. Recently, prompt tuning techniques have emerged as a prevalent stream within this category (Li & Liang, 2021; Lester et al., 2021), facilitating efficient adaptation with minimal modifications to models. Successive endeavors aimed to enhance this class of methods, delving into aspects such as optimization (Mao et al., 2021; Diao et al., 2022), transferability (Wang et al., 2021; Vu et al., 2021; He et al., 2022b), and the usage of discrete prompts (Schick & Schütze, 2020a;b; Gao et al., 2021; Malkin et al., 2021), among others (Liu et al., 2022b; 2021).
164
+
165
+ We focus on weight-based approaches in this work, which has a weight interpretation as exemplified by LoRA (Hu et al., 2021). This line of research can be traced back to Progressive Network (Rusu et al., 2016), which inserts a sub-network when a new task arrives. This principle was later adapted widely in foundation models as represented by adapter based methods (Houlsby et al., 2019; Mahabadi et al., 2021; Davison, 2021; Ding et al., 2022; Wang et al., 2022b). In particular, BitFit (BenZaken et al., 2021) was introduced to solely update the bias parameters, while IA3 (Liu et al., 2022a) was proposed to rescale the activations. Additionally, approaches such Fish (Sung et al., 2021) and Diff-pruning (Guo et al., 2020) leverage sparsity to facilitate efficient adaptation of foundation models. A separate vein of research aims to improve LoRA by reducing its computational and memory costs (Zhang et al., 2023b;a; Malladi et al., 2023). He et al. (2022a) explored how to unify different PEFT methods. Dettmers et al. (2023) quantized LoRA to reduce memory footprint. Chavan et al. (2023) generalized LoRA by learning individual adapters in each layer. Several other works focus on building mixture of adapters (Wang et al., 2022a; Diao et al., 2023).
166
+
167
+ # 6 CONCLUSION
168
+
169
+ We introduced FLORA, an extension of LORA, facilitating efficient batching. Empirical evaluations demonstrated that FLORA enhances throughput and latency in practical serving scenarios, all while preserving the accuracy of LORA. Through FLORA, we aim to facilitate a more efficient adaptation of large language models to diverse and real-world user requests.
170
+
171
+ Limitations. Despite its parameter efficiency, FLORA still requires fine-tuning. A promising future work could be to derive FLORA weights from a trained LoRA model, given that LORA remains
172
+
173
+ the most prevalent type of adapter as per (Huang et al., 2023). This adaptation could potentially obviate the requirement for fine-tuning, thereby accelerating the process of model adaptation.
174
+
175
+ # REFERENCES
176
+
177
+ Ahmad Abdelfattah, Azzam Haidar, Stanimire Tomov, and Jack J. Dongarra. Performance, design, and autotuning of batched gemm for gpus. In Information Security Conference, 2016. URL https://api-semanticscholar.org/CorpusID:2559252.
178
+ R. Ardila, M. Branson, K. Davis, M. Henretty, M. Kohler, J. Meyer, R. Morais, L. Saunders, F. M. Tyers, and G. Weber. Common voice: A massively-multilingual speech corpus. In Proceedings of the 12th Conference on Language Resources and Evaluation (LREC 2020), pp. 4211-4215, 2020.
179
+ Jacob 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.
180
+ Elad Ben-Zaken, Shauli Ravfogel, and Yoav Goldberg. Bitfit: Simple parameter-efficient fine-tuning for transformer-based masked language-models. ArXiv, abs/2106.10199, 2021. URL https://api-semanticscholar.org/CorpusID:231672601.
181
+ Federico Cassano, John Gouwar, Daniel Nguyen, Sy Duy Nguyen, Luna Phipps-Costin, Donald Pinckney, Ming-Ho Yee, Yangtian Zi, Carolyn Jane Anderson, Molly Q. Feldman, Arjun Guha, Michael Greenberg, and Abhinav Jangda. Multipl-e: A scalable and polyglot approach to benchmarking neural code generation. IEEE Transactions on Software Engineering, 49:3675-3691, 2023. URL https://api-semanticscholar.org/CorpusID:258205341.
182
+ Arnav Chavan, Zhuang Liu, Deepak K. Gupta, Eric P. Xing, and Zhiqiang Shen. One-for-all: Generalized lora for parameter-efficient fine-tuning. ArXiv, abs/2306.07967, 2023. URL https://api.sementicscholar.org/CorpusID:259144860.
183
+ Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde, Jared Kaplan, Harrison Edwards, Yura 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, David W. Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William H. Guss, Alex Nichol, Igor Babuschkin, S. Arun Balaji, Shantanu Jain, Andrew Carr, Jan Leike, Joshua Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew M. 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. ArXiv, abs/2107.03374, 2021.
184
+ 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 $90\%$ * chatgpt quality, March 2023. URL https://lmsys.org/blog/2023-03-30-vicuna/.
185
+ Tri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra, and Christopher R'e. Flashattention: Fast and memory-efficient exact attention with io-awareness. ArXiv, abs/2205.14135, 2022. URL https://api-semanticscholar.org/CorpusID:249151871.
186
+ Joe Davison. Compacter: Efficient low-rank hypercomplex adapter layers. In Neural Information Processing Systems, 2021. URL https://api_semanticscholar.org/CorpusID: 235356070.
187
+ Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. ArXiv, abs/2305.14314, 2023. URL https://api-semanticscholar.org/CorpusID:258841328.
188
+ Shizhe Diao, Xuechun Li, Yong Lin, Zhichao Huang, Xiao Zhou, and Tong Zhang. Black-box prompt learning for pre-trained language models. ArXiv, abs/2201.08531, 2022. URL https://api-semanticscholar.org/CorpusID:246210164.
189
+
190
+ Shizhe Diao, Tianyang Xu, Ruijia Xu, Jiawei Wang, and T. Zhang. Mixture-of-domain-adapters: Decoupling and injecting domain knowledge to pre-trained language models' memories. In Annual Meeting of the Association for Computational Linguistics, 2023. URL https://apisemantic scholar.org/CorpusID:259108831.
191
+ Ning Ding, Yujia Qin, Guang Yang, Fu Wei, Zonghan Yang, Yusheng Su, Shengding Hu, Yulin Chen, Chi-Min Chan, Weize Chen, Jing Yi, Weilin Zhao, Xiaozhi Wang, Zhiyuan Liu, Haitao Zheng, Jianfei Chen, Yang Liu, Jie Tang, Juan Li, and Maosong Sun. Delta tuning: A comprehensive study of parameter efficient methods for pre-trained language models. ArXiv, abs/2203.06904, 2022. URL https://api_semanticscholar.org/CorpusID:247446969.
192
+ William Fedus, Barret Zoph, and Noam M. Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity. J. Mach. Learn. Res., 23:120:1-120:39, 2021. URL https://api-semanticscholar.org/CorpusID:231573431.
193
+ Tianyu Gao, Adam Fisch, and Danqi Chen. Making pre-trained language models better few-shot learners. ArXiv, abs/2012.15723, 2021. URL https://api_semanticscholar.org/CorpusID:229923710.
194
+ Demi Guo, Alexander M. Rush, and Yoon Kim. Parameter-efficient transfer learning with diff pruning. In Annual Meeting of the Association for Computational Linguistics, 2020. URL https://apisemantic scholar.org/CorpusID:229152766.
195
+ Junxian He, Chunting Zhou, Xuezhe Ma, Taylor Berg-Kirkpatrick, and Graham Neubig. Towards a unified view of parameter-efficient transfer learning. In International Conference on Learning Representations, 2022a. URL https://openreview.net/forum?id=ORDcd5Axok.
196
+ Yun He, Huaixiu Steven Zheng, Yi Tay, Jai Gupta, Yu Du, V. Aribandi, Zhe Zhao, Yaguang Li, Zhaoji Chen, Donald Metzler, Heng-Tze Cheng, and Ed H. Chi. Hyperprompt: Prompt-based task-conditioning of transformers. ArXiv, abs/2203.00759, 2022b. URL https://api.sementicscholar.org/CorpusID:247218062.
197
+ Or Honovich, Thomas Scialom, Omer Levy, and Timo Schick. Unnatural instructions: Tuning language models with (almost) no human labor. ArXiv, abs/2212.09689, 2022.
198
+ Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin de Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. Parameter-efficient transfer learning for nlp. In International Conference on Machine Learning, 2019. URL https://api.sementicscholar.org/CorpusID:59599816.
199
+ J. Edward Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuzhhi Li, Shean Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. ArXiv, abs/2106.09685, 2021. URL https://api(semanticscholar.org/CorpusID:235458009.
200
+ Chengsong Huang, Qian Liu, Bill Yuchen Lin, Tianyu Pang, Chao Du, and Min Lin. Lorahub: Efficient cross-task generalization via dynamic lora composition. ArXiv, abs/2307.13269, 2023. URL https://api.sementicscholar.org/CorpusID:260155012.
201
+ Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph E. Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In Proceedings of the ACM SIGOPS 29th Symposium on Operating Systems Principles, 2023.
202
+ Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. In NIPS, 2016. URL https://api.sementicscholar.org/CorpusID:6294674.
203
+ Ariel N. Lee, Cole J. Hunter, and Nataniel Ruiz. Platypus: Quick, cheap, and powerful refinement of llms. ArXiv, abs/2308.07317, 2023. URL https://api_semanticscholar.org/CorpusID:260886870.
204
+
205
+ Dmitry Lepikhin, HyoukJoong Lee, Yuanzhong Xu, Dehao Chen, Orhan First, Yanping Huang, Maxim Krikun, Noam M. Shazeer, and Z. Chen. Gshard: Scaling giant models with conditional computation and automatic sharding. ArXiv, abs/2006.16668, 2020. URL https://api.sementicscholar.org/CorpusID:220265858.
206
+ Brian Lester, Rami Al-Rfou, and Noah Constant. The power of scale for parameter-efficient prompt tuning. In Conference on Empirical Methods in Natural Language Processing, 2021. URL https://api-semanticscholar.org/CorpusID:233296808.
207
+ Raymond Li, Loubna Ben Allal, Yangtian Zi, Niklas Muennighoff, Denis Kocetkov, Chenghao Mou, Marc Marone, Christopher Akiki, Jia Li, Jenny Chim, Qian Liu, Evgenii Zheltonozhkii, Terry Yue Zhuo, Thomas Wang, Olivier Dehaene, Mishig Davaadorj, Joel Lamy-Poirier, João Monteiro, Oleh Shliazhko, Nicolas Gontier, Nicholas Meade, Armel Zebaze, Ming-Ho Yee, Logesh Kumar Umapathi, Jian Zhu, Benjamin Lipkin, Muhtasham Oblokulov, Zhiruo Wang, Rudra Murthy, Jason Stillerman, Siva Sankalp Patel, Dmitry Abulkhanov, Marco Zocca, Manan Dey, Zhihan Zhang, Nourhan Fahmy, Urvashi Bhattacharyya, W. Yu, Swayam Singh, Sasha Luccioni, Paulo Villegas, Maxim Kunakov, Fedor Zhdanov, Manuel Romero, Tony Lee, Nadav Timor, Jennifer Ding, Claire Schlesinger, Hailey Schoelkopf, Jana Ebert, Tri Dao, Mayank Mishra, Alexander Gu, Jennifer Robinson, Carolyn Jane Anderson, Brendan Dolan-Gavitt, Danish Contractor, Siva Reddy, Daniel Fried, Dzmitry Bahdanau, Yacine Jernite, Carlos Munoz Ferrandis, Sean M. Hughes, Thomas Wolf, Arjun Guha, Leandro von Werra, and Harm de Vries. Starcoder: may the source be with you! ArXiv, abs/2305.06161, 2023. URL https://api-semanticscholar.org/CorpusID:258588247.
208
+ Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), abs/2101.00190, 2021. URL https://api_semanticscholar.org/CorpusID:230433941.
209
+ 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 in-context learning. ArXiv, abs/2205.05638, 2022a. URL https://api(semanticscholar.org/ CorpusID:248693283.
210
+ Xiao Liu, Kaixuan Ji, Yicheng Fu, Zhengxiao Du, Zhilin Yang, and Jie Tang. P-tuning v2: Prompt tuning can be comparable to fine-tuning universally across scales and tasks. ArXiv, abs/2110.07602, 2021. URL https://api_semanticscholar.org/CorpusID:238857040.
211
+ Xiao Liu, Kaixuan Ji, Yicheng Fu, Weng Lam Tam, Zhengxiao Du, Zhilin Yang, and Jie Tang. P-tuning: Prompt tuning can be comparable to fine-tuning across scales and tasks. In Annual Meeting of the Association for Computational Linguistics, 2022b. URL https://api.sementicscholar.org/CorpusID:248780177.
212
+ Rabeeh Karimi Mahabadi, Sebastian Ruder, Mostafa Dehghani, and James Henderson. Parameter-efficient multi-task fine-tuning for transformers via shared hypernetworks. ArXiv, abs/2106.04489, 2021. URL https://api-semanticscholar.org/CorpusID:235309789.
213
+ Nikolay Malkin, Zhen Wang, and Nebojsa Jojic. Coherence boosting: When your pretrained language model is not paying enough attention. In Annual Meeting of the Association for Computational Linguistics, 2021. URL https://api_semanticscholar.org/CorpusID:247476407.
214
+ Sadhika Malladi, Tianyu Gao, Eshaan Nichani, Alexandru Damian, Jason D. Lee, Danqi Chen, and Sanjeev Arora. Fine-tuning language models with just forward passes. ArXiv, abs/2305.17333, 2023. URL https://api-semanticscholar.org/CorpusID:258959274.
215
+ Yuning Mao, Lambert Mathias, Rui Hou, Amjad Almahairi, Hao Ma, Jiawei Han, Wen tau Yih, and Madian Khabsa. Unipelt: A unified framework for parameter-efficient language model tuning. In Annual Meeting of the Association for Computational Linguistics, 2021. URL https://apisemantic scholar.org/CorpusID:238857301.
216
+
217
+ OpenAI. Gpt-4 technical report. ArXiv, abs/2303.08774, 2023. URL https://api.sementicscholar.org/CorpusID:257532815.
218
+ Gabriel Orlanski, Kefan Xiao, Xavier García, Jeffrey Hui, Joshua Howland, Jonathan Malmaud, Jacob Austin, Rishah Singh, and Michele Catasta. Measuring the impact of programming language distribution. In International Conference on Machine Learning, 2023. URL https://api-semanticscholar.org/CorpusID:256615914.
219
+ 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, abs/2203.02155, 2022.
220
+ Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems 32, pp. 8024-8035. Curran Associates, Inc., 2019. URL http://papers.neurips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library.pdf.
221
+ Joan Puigcerver, Carlos Riquelme, Basil Mustafa, and Neil Houlsby. From sparse to soft mixtures of experts. ArXiv, abs/2308.00951, 2023. URL https://api(semanticscholar.org/ CorpusID:260378993.
222
+ Alec Radford, Jong Wook Kim, Tao Xu, Greg Brockman, Christine McLeavey, and Ilya Sutskever. Robust speech recognition via large-scale weak supervision, 2022. URL https://arxiv.org/abs/2212.04356.
223
+ Andrei A. Rusu, Neil C. Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. ArXiv, abs/1606.04671, 2016. URL https://api_semanticscholar.org/CorpusID:15350923.
224
+ Timo Schick and Hinrich Schütze. Exploiting cloze-questions for few-shot text classification and natural language inference. In Conference of the European Chapter of the Association for Computational Linguistics, 2020a. URL https://api_semanticscholar.org/CorpusID:210838924.
225
+ Timo Schick and Hinrich Schütze. It's not just size that matters: Small language models are also few-shot learners. ArXiv, abs/2009.07118, 2020b. URL https://api_semanticscholar.org/CorpusID:221703107.
226
+ Yi-Lin Sung, Varun Nair, and Colin Raffel. Training neural networks with fixed sparse masks. ArXiv, abs/2111.09839, 2021. URL https://api_semanticscholar.org/CorpusID:244345839.
227
+ Rohan 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.
228
+ Hugo Touvron, Louis Martin, Kevin R. Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajwal Bhargava, Shruti Bhosale, Daniel M. Bikel, Lukas Blecher, Cristian Cantón Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller, Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony S. Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez, Madian Khabsa, Isabel M. Kloumann, A. V. 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, R. Subramanian, Xia
229
+
230
+ Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu, Zhengxu 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. ArXiv, abs/2307.09288, 2023. URL https://api_semanticscholar.org/CorpusID:259950998.
231
+ Tu Vu, Brian Lester, Noah Constant, Rami Al-Rfou, and Daniel Matthew Cer. Spot: Better frozen model adaptation through soft prompt transfer. ArXiv, abs/2110.07904, 2021. URL https://api-semanticscholar.org/CorpusID:239009558.
232
+ Chengyu Wang, J. Wang, Minghui Qiu, Jun Huang, and Ming Gao. Transprompt: Towards an automatic transferable prompting framework for few-shot text classification. In Conference on Empirical Methods in Natural Language Processing, 2021. URL https://apisemantic scholar.org/CorpusID:243865402.
233
+ Yaqing Wang, Subhabrata Mukherjee, Xiaodong Liu, Jing Gao, Ahmed Hassan Awadallah, and Jianfeng Gao. Adamix: Mixture-of-adapter for parameter-efficient tuning of large language models. ArXiv, abs/2205.12410, 2022a. URL https://api_semanticscholar.org/ CorpusID:249063002.
234
+ Yaqing Wang, Subhabrata Mukherjee, Xiaodong Liu, Jing Gao, Ahmed Hassan Awadallah, and Jianfeng Gao. Parameter-efficient tuning of large language models. 2022b. URL https:// api.sementicscholar.org/CorpusID:249536106.
235
+ Yizhong 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, abs/2212.10560, 2022c.
236
+ Gyeong-In Yu and Joo Seong Jeong. Orca: A distributed serving system for transformer-based generative models. In USENIX Symposium on Operating Systems Design and Implementation, 2022. URL https://api-semanticscholar.org/CorpusID:251734964.
237
+ 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, 2023a. URL https://api-semanticscholar.org/CorpusID:260683267.
238
+ Qingru Zhang, Minshuo Chen, Alexander W. Bukharin, Pengcheng He, Yu Cheng, Weizhu Chen, and Tuo Zhao. Adaptive budget allocation for parameter-efficient fine-tuning. ArXiv, abs/2303.10512, 2023b. URL https://api_semanticscholar.org/CorpusID: 257631760.
239
+
240
+ # A ADDITIONAL TRAINING DETAILS
241
+
242
+ We delve into additional details regarding the models used in §4.2. We conducted fine-tuning on two StarCoder models (Li et al., 2023), specifically the 15B and 3B models. For both models, we employed LoRA (Hu et al., 2021) on the default layers within the Parameter Efficient Fine-Tuning (PEFT) library $^6$ , targeting only the key and query projections in the self-attention layers. This incurs roughly $0.03\%$ number of training parameters in the rank 1 setting. For a fair comparison, we applied FLORA to the same layers where LoRA was applied. Regarding the other baseline IA3 (Liu et al., 2022a), we executed the fine-tuning in two distinct settings: one with the default configuration in PEFT, applying IA3 to the key projection layers and the first fully-connected layer in the feedforward layers; and another aligning with the LoRA setting, restricting application to the key and query projection layers. The latter setup proved to be less effective than the default setting, thus the results presented in §4.2 adhere to the default configuration.
243
+
244
+ Despite StarCoder's pre-training on the Stack dataset, which contains over 6TB of source code files covering 358 programming languages, we still fine-tuned all methods on this dataset for the low-resource programming languages. This eliminates the time-consuming process to create new data. Our observations revealed that both IA3 and FLORA require a higher learning rate compared to
245
+
246
+ <table><tr><td rowspan="2">Language</td><td rowspan="2">Base Model</td><td colspan="3">pass@1 (Relative Improvement)</td></tr><tr><td>FLORA</td><td>IA3</td><td>LORA</td></tr><tr><td></td><td colspan="4">StarCoder 15B</td></tr><tr><td>Julia</td><td>23.31</td><td>26.56 (13.92%)</td><td>23.90 (2.51%)</td><td>25.62 (10.45%)</td></tr><tr><td>Lua</td><td>26.60</td><td>30.20 (13.57%)</td><td>28.40 (6.77%)</td><td>29.04 (9.18%)</td></tr><tr><td>R</td><td>16.07</td><td>17.55 (9.24%)</td><td>16.65 (3.59%)</td><td>18.60 (15.8%)</td></tr><tr><td></td><td colspan="4">StarCoderBase 3B</td></tr><tr><td>Julia</td><td>15.62</td><td>19.11 (22.39%)</td><td>16.72 (7.05%)</td><td>19.77 (26.59%)</td></tr><tr><td>Lua</td><td>17.63</td><td>19.46 (10.39%)</td><td>18.04 (2.33%)</td><td>20.23 (14.75%)</td></tr><tr><td>R</td><td>10.00</td><td>10.70 (7.02%)</td><td>9.98 (-0.25%)</td><td>10.06 (0.62%)</td></tr></table>
247
+
248
+ Table 3: Comparison of three fine-tuning methods FLORA, IA3, and LoRA on StarCoder 15B and StarCoderBase 3B across additional low-resource programming languages in the MultiPL-E benchmark.
249
+
250
+ LORA. For LORA, a learning rate of $1\mathrm{e} - 4$ sufficed, whereas IA3 required $5\mathrm{e} - 3$ , and FLORA demanded an even higher rate of $8\mathrm{e} - 3$ . We conjecture that this stems from FLORA and IA3 incorporating multiplicative weight perturbation, which typically requires a larger learning rate. All models were fine-tuned using 8 bit quantization featuring lower training memory cost.
251
+
252
+ We present results for additional low-resource languages in Appendix A. The improvements provided by PEFT methods are less pronounced in these languages compared to those documented in §4.2. Nevertheless, it can be observed that LORA and FLORA still outperform IA3, despite the limited room for enhancement in these languages.
253
+
254
+ Next, we discuss further details concerning the models used in §4.3. We performed fine-tuning on the Whisper large model (Radford et al., 2022), which consists of 1.5 billion parameters. Unlike the code generation task, we discovered that using the default modules in the PEFT library does not yield the best performance. Instead, we applied FLORA, LoRA, and IA3 to every fully-connected layer in the Whisper transformer. We fine-tuned all methods on the Common Voice benchmark (Ardila et al., 2020) for each low-resource language showcased in §4.2. We continued to employ larger learning rates for FLORA and IA3. Specifically, we maintained a learning rate of $2\mathrm{e} - 4$ for LORA, while using $4\mathrm{e} - 3$ and $6\mathrm{e} - 3$ for IA3 and FLORA respectively. Additionally, we utilized 8-bit quantization during training to minimize the GPU memory requirement.
255
+
256
+ # B ADDITIONAL SERVING RESULTS
257
+
258
+ # B.1 BMM IMPLEMENTATION
259
+
260
+ We provide further details concerning the experiments in §4.1. To begin, we illustrate the implementation of "torch.bmm" as follows. Upon computing the adaptersout, it can be added to the output of the standard LLM layer. This method facilitates the computation of diverse adapters' outputs within a batch.
261
+
262
+ ```julia
263
+ inputs = torch Randn(batch, seq_length, d_model)
264
+ adapter_b # shape of (batch, d_model, rank)
265
+ adapter_a # shape of (batch, rank, d_model)
266
+ hidden = torch.bmm(inputs, adapter_b)
267
+ adaptersout = torch.bmm(hidden, adapter_a)
268
+ ```
269
+
270
+ # B.2 ADDITIONAL RESULTS
271
+
272
+ We further conducted a throughput experiment, employing a setup similar to the one described in §4.1, on the newly proposed Llama-2 foundation models (Touvron et al., 2023). The results for both the 13B and 7B models are illustrated in Fig. 3 (left). When compared against the plot in
273
+
274
+ Fig. 2 (left), it is evident that the inflection rank at which LoRA begins to outperform FLORA is lower for the Llama-2 models than for the StarCoder 15B. This shows that the ratio $c_{1} / c_{2}$ from Eq. (7) varies across different architectures. One plausible explanation could be that, being a recent architecture, the Llama-2 model has not yet been fully optimized within the vLLM framework, potentially impacting throughput performance.
275
+
276
+ The right panel of Fig. 3 presents the serving results concerning StarCoder-3B. Notably, the inflection rank at which LORA begins to outperform FLORA is lower here as compared to the one observed in StarCoder 15B, as seen in Fig. 2 (right). This is attributed to the relatively low latency on StarCoder-3B, which implies that a request rate of 8 requests per second fails to saturate the LLM server, thereby diminishing the advantage of FLORA. Upon escalating the request rate to 15 requests per second, the inflection rank correspondingly increases to around 12. This illustrates that the latency improvement exhibited in Fig. 2 (left) represents a theoretical enhancement. The actual improvement in serving depends on model architectures, request rates, and other practical considerations.
277
+
278
+ ![](images/1aeccb6df31c6f2249796b5ddbff36f5f1fddab42a39da232b9d477586f581d6.jpg)
279
+ Figure 3: Left: Generation throughput vs. rank for FLORA and torch.bmm implementation of LORA, measured in tokens per second (token/s). The experiments were conducted on two Llama-2 models: 13B and 7B (Touvron et al., 2023). FLORA has great throughput advantage over LORA when the rank is small. As the rank increases, the torch.bmm implementation of LORA finally has a better throughput. Right: Latency vs. rank on StarCoder-3B. Requests are coming at the speed of 8 requests per second and 15 requests per second.
280
+
281
+ ![](images/8fbba7a8dc39dc3f748d891d8ece27df4f5a63831bf343d85289781bbe3847d7.jpg)
2024/Batched Low-Rank Adaptation of Foundation Models/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54175d68a3b24d9f05f49fe89d05a73a373560385457f817915c0a0e9fc99284
3
+ size 416298
2024/Batched Low-Rank Adaptation of Foundation Models/layout.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/fa29bbb1-c854-4aeb-a13c-5bf1509f8f38_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/fa29bbb1-c854-4aeb-a13c-5bf1509f8f38_model.json ADDED
The diff for this file is too large to render. See raw diff
 
2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/fa29bbb1-c854-4aeb-a13c-5bf1509f8f38_origin.pdf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15f8b704703441cb472f9ea095221c542f9a57a2da64ae6e740e39b1151b9ce8
3
+ size 2590750
2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/full.md ADDED
The diff for this file is too large to render. See raw diff
 
2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/images.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6339b850972366f2a77a01d66e0a021a07daa9a9260f1576299a459baaf1fe44
3
+ size 3686850
2024/Beyond Weisfeiler-Lehman_ A Quantitative Framework for GNN Expressiveness/layout.json ADDED
The diff for this file is too large to render. See raw diff