Introduction
Fine-tuning Large Language Models (LLMs) is computationally demanding, leading to the widespread adoption of Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA (Low-Rank Adaptation). LoRA freezes the original model weights and trains small, low-rank matrices in parallel. However, in deep architectures, gradients must traverse a long chain of frozen layers and non-linearities to reach early-layer LoRA weights. This "long calculation path" often results in gradient vanishing or explosion, slowing convergence and limiting performance.
Methodology: Residual Shortcuts for LoRA
To address this bottleneck, the authors introduce ResLoRA, a framework that adds identity residual mappings between LoRA blocks. By creating direct paths for gradients, ResLoRA ensures that adapter weights in early layers are updated as effectively as those in later layers.
The paper explores three primary structural variants:
- Input-shortcut (is): Adds the input vector of a previous LoRA block to the current one.
- Block-shortcut (bs): A dense-style connection allowing a layer to utilize weights from multiple previous blocks.
- Middle-shortcut (ms): Places shortcuts between the internal low-rank matrices ($A$ and $B$).
The Merging Advantage
A critical feature of ResLoRA is its merging approach. During inference, the residual training structure is mathematically "flattened" back into standard LoRA weights using Frobenius norm estimation. This allows the model to benefit from residual optimization during training while maintaining zero extra parameters and zero added latency during deployment.
Experimental Results
ResLoRA was evaluated across Natural Language Generation (NLG), Understanding (NLU), and Text-to-Image tasks. The results demonstrate significant improvements in both training efficiency and final model accuracy.
Key performance metrics include:
- Convergence Speed: On the SVAMP math reasoning dataset, ResLoRA achieved a 2.5x faster convergence rate compared to standard LoRA.
- Accuracy Gains: ResLoRA improved performance on SVAMP by 14.3% and on the HellaSwag benchmark by up to 36.85%.
- Image Synthesis: In Stable Diffusion v2 fine-tuning, ResLoRA generated high-quality stylized images in roughly 200 steps, whereas standard LoRA required significantly more training to achieve comparable results.
Conclusion
ResLoRA effectively bridges the gap between complex training architectures and efficient inference. By introducing residual paths that can be merged post-training, it overcomes the optimization hurdles of standard LoRA. Future work will focus on minimizing the minor "merging loss" (currently ~1%) and integrating ResLoRA with other PEFT techniques like QLoRA.
Summary updated