SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.17513 · 2023

The Expressive Power of Low-Rank Adaptation

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
uw-madison-lee-lab/expressive_power_of_lora canonical 5 of 5
FunctionStatusWhere it lives
generate_diag_matrix Ran uw-madison-lee-lab/expressive_power_of_lora/helper.py
pointer only (licence: NONE) · get_code("36b1a24d8c90e627")
get_rows Ran uw-madison-lee-lab/expressive_power_of_lora/configs/failed_config.py
pointer only (licence: NONE) · get_code("0145929644b22528")
lora_state_dict Ran uw-madison-lee-lab/expressive_power_of_lora/references/loralib/utils.py
pointer only (licence: NONE) · get_code("660073ae6862ac6e")
my_int Ran uw-madison-lee-lab/expressive_power_of_lora/helper.py
pointer only (licence: NONE) · get_code("85686a7f4d933809")
our_construction Ran uw-madison-lee-lab/expressive_power_of_lora/helper.py
pointer only (licence: NONE) · get_code("7055a012d343e45a")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Low-Rank Adaptation (LoRA), a parameter-efficient fine-tuning method that leverages low-rank adaptation of weight matrices, has emerged as a prevalent technique for fine-tuning pre-trained models such as large language models and diffusion models. Despite its huge success in practice, the theoretical underpinnings of LoRA have largely remained unexplored. This paper takes the first step to bridge this gap by theoretically analyzing the expressive power of LoRA. We prove that, for fully connected neural networks, LoRA can adapt any model $f$ to accurately represent any smaller target model $\overline{f}$ if LoRA-rank $\geq(\text{width of }f) \times \frac{\text{depth of }\overline{f}}{\text{depth of }f}$. We also quantify the approximation error when LoRA-rank is lower than the threshold. For Transformer networks, we show any model can be adapted to a target model of the same size with rank-$(\frac{\text{embedding size}}{2})$ LoRA adapters.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.17513")
get_code_for_paper("2310.17513")
have("2310.17513")

Connect an agent — have() is free.