Abstract
Low-rank adaptation (LoRA) has become a standard for parameter-efficient fine-tuning (PEFT) of large language models (LLMs). However, as models scale, the memory overhead of even low-rank matrices becomes a bottleneck, and small downstream datasets often lead to overfitting. We introduce RLoRA (Randomized Low-Rank Adaptation), which utilizes the Randomized Walsh-Hadamard Transform (WHT) to drastically reduce trainable parameters while maintaining performance. By incorporating a PAC-Bayesian regularizer, RLoRA significantly improves generalization, particularly in few-shot settings. Our evaluations on RoBERTa, GPT-2, and LLaMA-7B demonstrate that RLoRA achieves state-of-the-art performance with up to 35x fewer trainable parameters than standard LoRA.
Introduction
As Pre-trained Language Models (PLMs) grow to hundreds of billions of parameters, fine-tuning them for specific tasks becomes increasingly expensive. LoRA addresses this by updating model weights through two small trainable matrices, $W_A$ and $W_B$. Despite its efficiency, LoRA still faces two primary challenges: the memory footprint required for backpropagation through these matrices on massive models, and the tendency to overfit when fine-tuning on limited data (few-shot learning).
RLoRA addresses these issues by rethinking the necessity of learning full low-rank directions. We propose that the scale of adaptation is often more critical than the specific direction, allowing us to replace trainable matrices with fixed, structured random projections.
Methodology: Randomized Projections and Regularization
RLoRA introduces two core innovations to the PEFT landscape:
1. Randomized Walsh-Hadamard Transform (WHT)
Instead of learning the full weights of the $W_A$ and $W_B$ matrices, RLoRA freezes them as randomized projections. We utilize the WHT, a structured random matrix that can be computed efficiently in $O(d \log d)$ time without being explicitly stored in memory. The only trainable components are two diagonal scaling vectors, $\alpha$ and $\beta$. This architectural shift reduces the parameter count from $r \times (d_{in} + d_{out})$ to just $d_{in} + d_{out}$.
2. PAC-Bayes Regularization
To combat overfitting in data-scarce environments, we incorporate a regularization term derived from PAC-Bayesian theory. This term encourages the model to remain close to a prior distribution informed by the data. To maintain computational efficiency, we use Group Influence Functions to estimate the Fisher Information Matrix, approximating the generalization bound without the need for expensive Hessian calculations.
Key Results and Discussion
Our experiments across NLU (GLUE), NLG (E2E), and arithmetic reasoning (LLaMA-7B) benchmarks reveal several key insights:
- Extreme Parameter Efficiency: In RoBERTa-base experiments, RLoRA required only 0.02% of the original model's parameters to be trainable, compared to 0.71% for standard LoRA—a 35x reduction.
- Superior Few-Shot Performance: On the GLUE benchmark with only 200 training samples, RLoRA achieved an average score of 76.18, significantly outperforming standard LoRA (72.88) and the recent VeRA baseline (74.98).
- The Impact of Regularization: As shown in Figure 1, the inclusion of PAC-Bayes regularization (PAC) provides a substantial accuracy boost, particularly when the percentage of tunable parameters is extremely low.
Conclusion
RLoRA demonstrates that high-performance fine-tuning does not require extensive parameter updates. By leveraging structured randomness through the Walsh-Hadamard Transform and theoretically grounded PAC-Bayes regularization, RLoRA provides a memory-efficient and robust alternative to standard LoRA. This approach is particularly valuable for deploying and adapting massive LLMs on hardware with limited memory and for tasks with sparse training data.
Summary updated