LoRA computes , where is initialised to zero and is random. How do you show that at initialisation the model equals the pre-trained one, what are the gradients and at the start, and what is the factor for?
Sequence models and transformers, Parameter-efficient fine-tuning
Level L3 Intermediate. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can derive the gradients of a factorised update and explain why one factor must start at zero while the other must not.
Key idea
With : and . At the second is zero, but the first is not, so training can start.
Steps
- At initialisation , so and . Fine-tuning starts exactly from the pre-trained function.
- Let be the loss and . Write with .
- Gradient for : , an outer product of size . It is non-zero when .
- Gradient for : . At it is , so does not move at step one. After becomes non-zero, starts to learn.
- Why not both zero: then too and nothing would ever move. So is random (for example Gaussian) and is zero.
- Scaling: with random , the size of grows with rank . Dividing by is the original LoRA heuristic for keeping the update size similar when changes, so can stay fixed. Kalajdzievski (2023) shows that actually shrinks the updates at large ranks, and that keeps them stable.
Common mistakes
- Initialising both and to random values, which perturbs the pre-trained model at step zero.
- Saying gets no gradient ever; it is zero only at step one.
- Treating as a learning rate; it is a fixed scale on the update.
How long your answer should be
Half a page; 5–6 minutes.
Last checked on 4 December 2026.
Read this
Previous in Sequence models and transformers: A corpus has the words low (), lower (), newest () and widest (), each split into characters. BPE merges the most frequent adjacent pair. WordPiece merges the pair with the highest score . Which pair does each choose first, and why do they differ?
Next in Sequence models and transformers: For a vanilla RNN with , show that , where is the largest singular value. What does this say for and over steps? How does gradient-norm clipping help, for example when the gradient norm is and the threshold is ?