LoRA Mathematics › Initialization Scheme
Language AI HandbookAll chapters LoRA Mathematics › Initialization SchemeOne section · Sections in this chapter5 / 12 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
LoRA's initialization is important for training stability and convergence. How you initialize matrices and determines the model's starting point and influences the entire training trajectory. An initialization that disrupts the pre-trained model's behavior forces training to first undo the damage before making progress on the task. The standard LoRA scheme is carefully designed to avoid this problem while still so proper gradient flow from the first training step.
The standard scheme is:
- Matrix : Initialized from (Gaussian with small variance) or Kaiming initialization
- Matrix : Initialized to zero
This asymmetric initialization, with random and zero, ensures that the product at the start of training. This means the model begins with its pre-trained behavior completely intact: the LoRA path contributes nothing to the output until training begins to modify the parameters. The model starts from a "clean" state that preserves all the hard-won knowledge from pre-training, and the LoRA path grows organically from zero as training proceeds.
Think of it as adding a second voice to a choir. At first, the second voice is silent, and the choir sounds exactly as it did before. Gradually, the second voice joins in, harmonizing with the original to create a richer sound tailored to the new piece. If the second voice started at full volume with random notes, it would disrupt the choir before anyone had a chance to coordinate. Starting from silence and growing gradually is far more conducive to good ensemble singing.
Rationale for Zero Initialization of B
Starting with has several important advantages that connect to basic principles of transfer learning and optimization:
-
Continuity from pretraining: The model's initial behavior exactly matches the pre-trained model. This is valuable because the pre-trained model already performs well on many tasks. No "warm-up" period is needed for the model to recover from a random perturbation. From the first training step, we are refining good behavior rather than recovering from a disrupted starting point. This continuity property is especially important for large models where random perturbations can cause catastrophic forgetting of capabilities that were not directly targeted by fine-tuning.
-
Stable training dynamics: Large random initializations of both and could produce values that significantly perturb the pre-trained representations. If the initial perturbation is large, early training might focus on undoing this damage rather than learning the task. By starting at zero, we ensure that the first training steps are devoted entirely to task-relevant adaptation, not error correction. This is particularly important because the pre-trained weights encode complex, interdependent representations that can be disrupted in unpredictable ways.
-
Gradient flow: A natural concern with zero initialization is whether gradients will flow properly. If initially, will the gradient with respect to also be zero, preventing any learning? Fortunately, this is not the case. The gradient with respect to depends on the input to the LoRA layer and the upstream gradient, not on the current value of . As we will derive in the gradient section below, receives non-zero gradients even when it equals zero, letting immediate learning from the first training step.
Variance Analysis
The initialization variance explains why the standard scheme works better than symmetric random initialization of both matrices. If we initialize both and randomly with entries drawn from , we can compute the expected magnitude of the product and see why this creates a problem.
For a single entry of the product, we can compute the expected squared value by expanding the matrix multiplication and using the independence of the random entries:
where:
- : element at row , column of the product matrix
- : elements of the random matrices at specific positions
- : variance of the initialization distribution
- : rank (the number of terms that sum in the matrix product)
The key observation is that this expected squared magnitude grows linearly with . This rank dependence creates a serious problem: if we use the same initialization variance and learning rate for different ranks, higher ranks will produce larger initial perturbations and larger gradients. This would require rank-dependent learning rate adjustment to maintain consistent training dynamics across different rank experiments. Zero-initializing sidesteps this issue entirely by so the initial perturbation is exactly zero regardless of rank, making experiments with different ranks directly comparable.


For matrix , the standard initialization uses variance that scales inversely with rank. This choice ensures that the intermediate representation has expected squared norm that does not grow with , giving consistent gradient magnitudes regardless of rank:
where:
- : element of matrix at row , column
- : normal distribution with mean and variance
- : rank of the adaptation
- : variance chosen so that the intermediate representation has unit-scale statistics
This scaling ensures that when gradients begin flowing and starts to move away from zero, the updates to have reasonable magnitude regardless of . The variance is chosen so that the projection has expected squared norm that does not grow with . Some implementations use Kaiming initialization instead, which was originally designed for rectified linear unit activations and sets:
where:
- : element of matrix
- : input dimension of the layer (the "fan-in" in Kaiming terminology)
Kaiming initialization is designed to preserve the variance of activations through deep networks and is a reasonable alternative that may be preferred when you want the initial projections to have activation-aware statistics.
Alternative Initializations
While zero-initialization of is standard and works well in most cases, researchers have explored alternatives that may offer advantages in certain scenarios. Understanding these alternatives helps you reason about when and why the standard scheme might be suboptimal.
- SVD initialization: Initialize as a low-rank approximation of from a reference full fine-tuning run. This requires running full fine-tuning once, but if you need to train many LoRA variants for different tasks or ranks, initializing from the SVD of a reference solution can accelerate convergence significantly. The idea is that the reference fine-tuning tells you roughly which directions matter, and you start LoRA already pointed in those directions rather than at zero.
- Symmetric initialization: Initialize both and with small random values, accepting the initial perturbation to pre-trained behavior. This may help when the pre-trained model's initial behavior is far from desired and you want both matrices to start adapting immediately, though it requires careful tuning of the initialization scale to avoid disrupting the pre-trained representations.
- Task-informed initialization: Use task-specific heuristics based on prior knowledge about the adaptation needed. For example, if adapting for a specific domain, initialize using SVD of domain-specific text representations. This approach requires domain knowledge but can dramatically reduce the number of gradient steps needed to reach good performance.
We will explore adaptive initialization strategies in the AdaLoRA chapter, where the initialization interacts with mechanisms that adjust rank during training based on gradient information.