Zenaique

What does DoRA decompose, and why does it beat LoRA at the same rank?

Short answer·Hard·4.0 · 0·~3 min·Asked atAutodeskTogether AiWriter·Relevant atCohereDatabricksMetaMicrosoft
Attempt it

DoRA (Weight-Decomposed Low Rank Adaptation, Liu et al. 2024) decomposes each weight matrix before applying LoRA. What does it decompose into, what does LoRA's update get applied to, and why does this close the gap to full FT: especially at low ranks?

Free · 2 AI evals / day
TL;DR

DoRA splits each weight column into magnitude and direction. It trains magnitude directly and LoRA-tunes only the direction, matching full fine-tuning more closely, especially at low rank.

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Picture an arrow drawn on paper. An arrow has two facts: how long it is, and which way it points. The plain method tries to relearn both facts using one small, cramped notepad, so it wastes scarce space recording length when length is just a single number. The smarter method writes the length down separately on a sticky note, one number per arrow, adjusted directly, and saves the whole notepad for the harder job of steering which way the arrow points. Because length now has its own dedicated slot, the small notepad can spend all its room on direction. The result behaves much more like redoing the drawing from scratch, and the biggest gains show up exactly when the notepad is tiniest.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

DoRA, Weight-Decomposed Low-Rank Adaptation, is one of the cleaner ideas in parameter-efficient fine-tuning. It takes vanilla LoRA, asks a sharp question about WHY LoRA falls short of full fine-tuning at low rank, and answers it with a decomposition that costs almost nothing to add.

The setup you need to carry through the whole explanation is geometric. A weight matrix is a stack of columns, and every column is a vector. A vector carries exactly two kinds of information: its length, which is a single number, and its direction, which is a high-dimensional unit vector. These are independent. You can change a column's length without rotating it, and you can rotate it without changing its length.

Vanilla LoRA does not respect that independence. It adds one low-rank term to the weight, and that single term has to express any change to length and direction jointly. When the rank is small, the term is starved for degrees of freedom, and it ends up spending some of them on the one-dimensional length information. DoRA's whole contribution is to peel length off into its own explicit parameter so the scarce low-rank budget goes entirely to direction. This deep dive builds that picture from the formula up, walks through the empirical evidence the authors used, and explains exactly why the advantage is largest at the smallest ranks.

The decomposition, column by column

Take a pretrained weight matrix and look at one output column. DoRA writes that column as a scalar magnitude times a unit-norm direction vector. Stacked across all columns, the decomposition reads:

W=mVVW = m \cdot \frac{V}{\lVert V \rVert}

Here the magnitude is a vector of scalars, one entry per output column, and the direction is the matrix V with each column normalised to length one. The norm in the denominator is taken column-wise. This is not an approximation; it is an exact rewrite of any weight matrix, because every nonzero vector equals its length times its unit direction.

The two pieces are then trained very differently. The magnitudes are learned directly as a small parameter vector, because each is just one number and there is no reason to compress it. The direction is where LoRA lives. DoRA keeps the original direction and adds a low-rank update to it, exactly the product LoRA always used, then renormalises. So LoRA's expressive power is aimed entirely at the high-dimensional direction, and magnitude is handled by a dedicated, trivially small knob.

It helps to be precise about shapes. For a weight mapping an input of size d_in to an output of size d_out, the magnitude is a vector of length d_out, one entry per output column. The direction matrix has the same shape as the original weight, and the low-rank update is the usual pair of thin matrices whose product has rank r. At initialisation the magnitudes are set to the column norms of the pretrained weight and the low-rank update starts at zero, so DoRA begins life numerically identical to the base model. Training then nudges both factors away from that starting point, but along the two separate axes the decomposition exposes.

What LoRA's update actually touches in DoRA
The empirical motivation from full fine-tuning
Why the win concentrates at low rank
Costs, serving, and where it sits among PEFT methods
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.
AspectVanilla LoRADoRA
What the update targetsThe whole weight via one BA termDirection only; magnitude is separate
Magnitude handlingEncoded implicitly inside BALearned directly, one scalar per column
Match to full fine-tuningDifferent magnitude-direction correlationRecovers the full-FT correlation pattern
Where it winsAdequate at higher rankLargest gain at low rank (r=4, r=8)
Extra costNone beyond base LoRAOne scalar per column, forward-pass normalisation

Real products, models, and research that use this idea.

  • Hugging Face PEFT ships DoRA as use_dora=True on a standard LoraConfig, so teams fine-tuning Llama 4 or Qwen variants flip it on without rewriting training code.
  • Unsloth enables DoRA for memory-tight single-GPU fine-tunes of Mistral and Llama 3.1 8B, where low ranks like four to eight are common and DoRA's low-rank edge matters.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QWhat specifically did the DoRA authors measure about full FT versus LoRA to justify the split?
A

Talk about decomposing each update into a magnitude change and a direction change, then studying their correlation. Full fine-tuning shows a negative correlation; LoRA shows a positive one, a different learning signature.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Saying DoRA just adds a learnable scalar to LoRA without naming WHAT it scales. The point is the magnitude versus direction split, with LoRA confined to the direction component only.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • The magnitude versus direction decomposition of a weight column

  • Why magnitude is one scalar per output column

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
What is RLHF, and why is it used after pretraining?
MCQ·Easy