Papers
Topics
Authors
Recent
Search
2000 character limit reached

Key-Value Low-Rank Adaptation

Updated 4 July 2026
  • Key-Value Low-Rank Adaptation is a technique that modifies transformer key and value projections using low-rank updates to capture essential information in a reduced subspace.
  • It employs various methods such as adaptive rank allocation, spectral reparameterizations, and optimizer-aware updates to enhance model stability and performance.
  • This approach facilitates efficient transformer fine-tuning by enabling shared basis components, cross-layer adaptations, and tensorized factorization of attention mechanisms.

Key-Value Low-Rank Adaptation denotes a family of transformer adaptation techniques that modify the key and value projections with low-rank structure rather than full dense updates. In the standard LoRA-style PEFT setting, a frozen attention weight is replaced by W=W+ΔWW' = W + \Delta W, with ΔW\Delta W parameterized as a low-rank product; in this usage, “Key-Value Low-Rank Adaptation” usually means adding such adapters to the key and value matrices WkW_k and WvW_v in each layer independently (Zhong et al., 2024). The same label is also used more broadly for methods that vary rank across layers or modules, share low-rank components across depth or across Q/K/VQ/K/V, use tensorized or routed compositions, reparameterize updates spectrally, or alter the K/V parameterization itself during pretraining to reduce KV-cache cost (O'Neill et al., 16 Jan 2026).

1. Canonical formulation and transformer placement

The canonical formulation inherits directly from LoRA. For a linear weight matrix WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}, the adapted weight is written as

Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},

with ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}, BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}, and rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r. An equivalent notation writes

ΔW\Delta W0

with ΔW\Delta W1 and ΔW\Delta W2, where ΔW\Delta W3 (Zhong et al., 2024). In both notations, the central constraint is that the task-specific update lives in a low-dimensional subspace.

Within attention, the standard decomposition is

ΔW\Delta W4

Under standard K/V low-rank adaptation, one replaces ΔW\Delta W5 and ΔW\Delta W6 by ΔW\Delta W7 and ΔW\Delta W8, with each ΔW\Delta W9 low rank. The standard LoRA interpretation is per-layer and per-projection: each layer WkW_k0 has its own low-rank pair, and the LP/HP or WkW_k1 factors for that layer are paired only with the features of that layer (Zhong et al., 2024).

Placement conventions are not uniform across the literature. One line of work follows what it calls “the standard setting in LoRA” and inserts LoRA only on the query and value projection layers of each multi-head attention module; in that setting, keys and output projections remain frozen, giving 24 LoRA layers for RoBERTa-base and GPT2-medium and 48 for RoBERTa-large (Zhang et al., 2024). Another line applies adapters to all attention and MLP projections—query, key, value, output, plus gate, up, and down—throughout the backbone, while not adapting the final output head (Garg et al., 3 Jun 2026). A comprehensive account of Key-Value Low-Rank Adaptation therefore has to distinguish the core concept—low-rank modification of WkW_k2 and WkW_k3—from the broader design choice of which additional projections are co-adapted.

2. Module-specific behavior in attention blocks

A recurrent result is that attention projections do not exhibit a uniform preference for rank or placement. Methods that explicitly allocate rank across modules report different patterns depending on the task, model, and scoring rule.

ALoRA treats a LLaMA-2-style transformer block as seven distinct modules—Query, Key, Value, Output, Gate, Up, and Down—and reallocates LoRA rank among them under a fixed global budget. Its visualization on E2E reports that more LoRA rank budgets are put to adapt the query and key modules, while the value and output modules in the self-attention are less emphasized; it also reports that the feed-forward layer requires fewer LoRA ranks (Liu et al., 2024). By contrast, GoRA allocates ranks from gradient-derived importance scores and, on LLaMA3.1-8B fine-tuned for MetaMathQA, reports that most ranks are allocated to the WkW_k4 layers, while the WkW_k5 layers receive the fewest rank allocations (He et al., 13 Feb 2025).

This divergence is not merely anecdotal. It indicates that key and value adaptation cannot be reduced to a single universal heuristic such as “values matter most” or “keys matter most.” A plausible implication is that K/V low-rank adaptation is intrinsically task-dependent: for some objectives, adapting attention geometry through WkW_k6 is prioritized, whereas for others, modifying content transport through WkW_k7 dominates. The literature therefore increasingly replaces uniform per-matrix rank choices with allocation mechanisms that respond to validation loss, stable-rank priors, or gradient statistics.

A second module-level observation concerns the sufficiency of K/V-only or attention-only tuning. In LR-LoRA’s component ablation on Qwen2, “Q,K,V Only” is explicitly listed as a configuration and yields accuracy WkW_k8 versus 67.8 for the “no adaptation LoRA-equivalent baseline” in that table, whereas “All Components” reaches 71.4 (Garg et al., 3 Jun 2026). This does not negate the utility of K/V adaptation, but it does show that K/V-only designs can leave performance on the table when output projections or MLP blocks are also strongly task-relevant.

3. Rank, effective capacity, and adaptive allocation

The most persistent criticism of standard LoRA in this area is not merely that the nominal rank WkW_k9 is small, but that a fixed WvW_v0 imposes a fixed low-rank inductive bias on all adapter layers and modules. The literature distinguishes at least three quantities: the algebraic adapter rank WvW_v1, the realized rank of the update matrix, and the stable rank

WvW_v2

which acts as a continuous proxy for effective dimensionality (Garg et al., 3 Jun 2026).

"Learnable Rank LoRA" replaces the fixed-rank update WvW_v3 by WvW_v4, where WvW_v5 is a learned elementwise nonlinearity expressed as a sum of shifted sinc basis functions. Because WvW_v6 is not itself constrained to factor as WvW_v7, its stable rank can differ substantially from the nominal factorization rank. On Qwen2-0.5B at nominal WvW_v8, it reports stable rank WvW_v9 for LoRA attention updates and Q/K/VQ/K/V0 for LR-LoRA attention updates, with analogous increases for MLP layers (Garg et al., 3 Jun 2026). The same paper also shows depth-dependent stable-rank profiles in which early layers tend to lower stable rank and later layers higher, while attention and MLP layers exhibit distinct depth profiles.

AutoLoRA attacks the same problem by decomposing each low-rank update into explicit rank-1 terms,

Q/K/VQ/K/V1

with Q/K/VQ/K/V2 obtained by a softmax over trainable variables Q/K/VQ/K/V3. The effective rank of layer Q/K/VQ/K/V4 is then determined by thresholding the learned Q/K/VQ/K/V5 at Q/K/VQ/K/V6, after a bi-level meta-learning loop that updates LoRA weights on training loss and selection variables on validation loss (Zhang et al., 2024). In its experiments, this machinery is applied to query and value LoRA modules, and Figure 1 shows that different transformer layers receive different ranks and that Q and V layers need not share the same rank profile.

SR-LoRA substitutes a model prior for explicit search. It computes the stable rank of each pretrained weight,

Q/K/VQ/K/V7

and allocates adapter rank from that quantity, arguing that stable rank reflects the intrinsic dimensionality of the pretrained transformation. In its ViT-based experiments, this stable-rank-guided allocation outperforms fixed-rank LoRA and several adaptive baselines in few-shot, large-gap regimes; for MedFM 1-shot mean AUC, SR-LoRA reports 72.47 versus 64.09 for LoRA (Zhang et al., 30 Jun 2025). Although its reported placements are Q/K/VQ/K/V8, Q/K/VQ/K/V9, and WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}0, the construction applies equally to WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}1.

PoLAR exposes a more severe issue: the nominal rank supplied to LoRA can be largely unused. On Llama-2-7B with nominal rank WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}2, it reports many learned LoRA updates with stable rank near 1, in some cases as low as WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}3, and interprets the resulting geometry as directional diversity collapse (Lion et al., 3 Jun 2025). This result is important for K/V adaptation because it shows that the effective expressiveness of a K/V adapter can be far below its algebraic rank unless the parameterization or optimizer actively prevents collapse.

4. Cross-layer, cross-projection, and shared K/V structures

Beyond per-layer independent adapters, a substantial body of work introduces structured sharing across layers, across WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}4, or across heads.

Method K/V structure Representative result
Lily Local LPs WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}5, global HP experts WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}6, soft router WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}7 On ViT-B/16, Lily (kvffn) reaches 77.3 on VTAB-1K with 0.76M params, versus LoRA 76.4 with 1.17M
TensLoRA Tucker factorization of QKV or QKV_Depth tensors Under isorank, QKV uses 33.7% of LoRA parameters on ViT and achieves WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}8 on EuroSAT versus WRm×n\mathbf{W} \in \mathbb{R}^{m \times n}9 for Att
LRKV Shared full-rank Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},0 plus head-specific low-rank residuals Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},1 At 2.5B, LRKV with Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},2 uses 52.6% KV cache and reaches equivalent model quality with up to 20–25% less training compute

Lily generalizes LoRA across depth by keeping layer-specific low-dimension projectors Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},3 while sharing a pool of high-dimension projector experts Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},4 across all layers. A router maps the low-dimensional features to expert weights, producing a combined high-dimension projector

Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},5

When applied to attention, this yields interconnected K/V updates in which the HP side is shared across layers and recombined through data-dependent routing rather than learned independently per layer (Zhong et al., 2024). The paper explicitly identifies “Lily (kvffn)” as the configuration most closely aligned with Key-Value Low-Rank Adaptation.

TensLoRA moves from matrices to tensors. It stacks LoRA updates into tensors such as Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},6 for Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},7 within one layer or Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},8 for QKV across depth, and then constrains this tensor to a Tucker low-rank manifold (Marmoret et al., 22 Sep 2025). The QKV mode factor Weff=W+BA,\mathbf{W}_\text{eff} = \mathbf{W} + \mathbf{BA},9 explicitly couples Q, K, and V, while the depth factor ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}0 couples layers. This replaces independent per-projection adapters with a shared projection-type subspace and a shared depth subspace.

LRKV uses the phrase “low-rank KV adaptation” in a different but related sense. It is not a PEFT method over a frozen backbone but a replacement for standard multi-head attention during pretraining. Each head’s key and value projections are decomposed as

ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}1

with a shared full-rank base and head-specific low-rank residuals (O'Neill et al., 16 Jan 2026). This gives a continuous trade-off between complete sharing (ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}2, equivalent to MQA) and fully independent heads, while reducing KV-cache memory by exploiting redundancy across heads.

A more indirect extension is MoR. Its experiments replace only FFN linear layers with a mixture of transformed low-rank directions, but the formulation is generic: ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}3 The paper states that the same machinery could be applied to ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}4 and ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}5, yielding a task- and input-dependent mixture of low-rank key/value adapters (Tang et al., 2024). This extends the broader trend from fixed per-layer K/V updates toward shared bases and routed combinations.

5. Spectral, geometric, and optimizer-aware parameterizations

Another major axis of development reparameterizes the low-rank update itself rather than merely reallocating rank. These methods are especially relevant for K/V matrices because they target stability, spectrum preservation, or closer emulation of full fine-tuning.

DuDe combines magnitude–direction decomposition with SVD-based initialization. For a pretrained weight ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}6, it extracts the top-ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}7 singular component ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}8, freezes the residual ARr×n\mathbf{A} \in \mathbb{R}^{r \times n}9, initializes

BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}0

and adapts

BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}1

Its main instantiation is on BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}2 and BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}3, with a combined BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}4 case for Phi-4 small; on LLaMA2-13B, it reports average commonsense accuracy 63.74 versus 61.51 for LoRA and a HellaSwag improvement of +11.76 points (Han et al., 20 May 2025). Although the core experiments are query/value rather than key/value, the paper presents the construction as directly transferable to BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}5 and BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}6.

SALT operates in the singular-value basis. It performs SVD once per frozen weight, adapts the top BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}7 singular values through trainable scale and shift, and applies a low-rank correction in the residual singular-value subspace: BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}8 The updated matrix is then reconstructed as

BRm×r\mathbf{B} \in \mathbb{R}^{m \times r}9

On the SAM encoder, SALT rank-256 uses 3.9% trainable parameters and reports average Dice 0.74, compared with 0.70 for LoRA rank-256 at 14.08% trainable parameters (Elsayed et al., 20 Mar 2025). The paper explicitly proposes a SALT-style adaptation for rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r0 and rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r1 in transformers.

PoLAR replaces the standard LoRA update rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r2 by

rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r3

with rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r4, rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r5, and unconstrained rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r6, thereby separating orthonormal direction bases from scale and mixing (Lion et al., 3 Jun 2025). The paper argues that this counters LoRA’s low stable-rank pathology and proves an exponentially faster convergence rate on a canonical low-rank adaptation problem. On Llama-2-7B, PoLAR at rank 32 reports average commonsense accuracy 73.71 versus 72.18 for LoRA and 72.47 for DoRA.

LoFT keeps the conventional low-rank parameterization rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r7 but changes the optimizer geometry. It alternates updates of rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r8 and rank(BA)r\mathrm{rank}(\mathbf{BA}) \le r9, scales gradients by ΔW\Delta W00 or ΔW\Delta W01, and calibrates Adam’s first and second moments so that low-rank updates track full-model AdamW updates projected into the same subspace. The resulting projected gradient step is

ΔW\Delta W02

Applied to transformer attention ΔW\Delta W03 and FFN matrices, LoFT reports, on LLaMA-7B at rank 16, average commonsense accuracy 76.08 versus 73.57 for LoRA (Tastan et al., 27 May 2025). Its relevance to K/V adaptation is direct: one may adapt only ΔW\Delta W04 and ΔW\Delta W05 while preserving optimizer dynamics closer to full fine-tuning within the chosen low-rank subspaces.

6. Empirical regularities, misconceptions, and open problems

Several empirical regularities recur across these papers. First, key/value low-rank adaptation is effective, but it is not a guarantee that K/V-only placement is sufficient. LR-LoRA’s single-seed ablation shows that “Q,K,V Only” yields only a marginal change relative to the LoRA-equivalent baseline in that restricted setup, whereas “All Components” gives the best result; at the same time, its broader experiments show that adapting attention projections can improve structured tasks more than FFN-only adaptation (Garg et al., 3 Jun 2026). The literature therefore supports K/V adaptation as an important component, not as a universally complete substitute for broader attention or MLP adaptation.

Second, nominal rank and useful rank should not be conflated. PoLAR’s stable-rank analysis shows that a nominal rank-32 LoRA update can behave almost like a rank-1 perturbation (Lion et al., 3 Jun 2025). This undercuts the common assumption that simply increasing ΔW\Delta W06 reliably increases functional capacity. A related architectural result appears in LRKV: reducing K/V redundancy across heads need not degrade quality if the parameterization preserves enough head diversity; the paper’s operator-space analysis finds that LRKV with ΔW\Delta W07 preserves nearly all functional head diversity relative to standard multi-head attention (O'Neill et al., 16 Jan 2026).

Third, the term itself is overloaded. In PEFT, Key-Value Low-Rank Adaptation usually denotes low-rank updates attached to pretrained ΔW\Delta W08 and ΔW\Delta W09. In LRKV, it denotes a pretraining-time attention mechanism with a shared full-rank K/V basis and low-rank head-specific residuals (O'Neill et al., 16 Jan 2026). The conceptual overlap is real—both exploit low-rank structure in key/value projections—but the training regimes, objectives, and systems consequences differ.

Open questions remain substantial. Lily does not provide an explicit rank-theoretic analysis of how shared HP experts, layer-varying LPs, and routing change the span of achievable ΔW\Delta W10 for K/V, and it leaves language-model scaling to future work (Zhong et al., 2024). LR-LoRA reports attention-level stable-rank profiles but does not provide separate stable-rank curves for Q, K, V, and O (Garg et al., 3 Jun 2026). LRKV identifies adaptive rank allocation across layers or heads, long-context behavior, and combinations with GQA or FlashAttention-3 as future directions (O'Neill et al., 16 Jan 2026). Across the broader literature, a consistent unresolved issue is how to allocate K/V rank across depth, projection type, and heads without turning PEFT into an expensive search procedure.

Taken together, the field has moved from the original per-layer, independent low-rank perturbation of ΔW\Delta W11 and ΔW\Delta W12 toward a richer design space. Contemporary Key-Value Low-Rank Adaptation now encompasses fixed-rank adapters, learned effective rank, stable-rank-guided allocation, cross-layer expert sharing, tensor factorization across ΔW\Delta W13 and depth, spectral parameterizations, geometry-aware updates, and pretraining-time K/V reparameterizations for KV-cache efficiency. The unifying premise is unchanged: transformer attention contains substantial low-dimensional structure in the key and value pathways, but exploiting that structure well requires careful choices about where low rank is imposed, how rank is distributed, and what notion of rank is actually being optimized.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Key-Value Low-Rank Adaptation.