Abstract
Fine-tuning large-scale pre-trained models is computationally intensive. While Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA reduce the number of trainable parameters, they often introduce inference latency or memory overhead. This paper presents Gradient-based and Regularized Fine-Tuning (GRFT), a method that updates a structured subset of existing model weights (rows or columns) based on gradient magnitudes. By incorporating $L_2$ regularization and a supervised contrastive learning loss for parameter selection, GRFT achieves state-of-the-art performance on vision and language benchmarks while updating less than 1.5% of parameters and maintaining high memory efficiency.
Introduction
The rapid growth of model sizes in Vision Transformers and Large Language Models (LLMs) has made full fine-tuning increasingly impractical for downstream tasks. Parameter-Efficient Fine-Tuning (PEFT) has emerged as a solution, typically by adding small modules (Adapters) or low-rank matrices (LoRA). However, these can alter model architecture or increase inference time.
An alternative is selecting a subset of existing parameters to tune. Previous methods like Gradient-based Parameter Selection (GPS) use unstructured sparsity, which requires storing a binary mask the size of the original weight matrix. This creates a massive storage bottleneck and is inefficient for modern GPUs. GRFT addresses these issues by shifting to structured selection—tuning entire rows or columns—and utilizing regularization to maintain the integrity of pre-trained knowledge.
Methodology: The GRFT Framework
GRFT operates through a two-step process: Gradient Selection and Masked Tuning.
1. Structured Gradient Selection
Instead of selecting individual weights, GRFT calculates the sum of squared gradients for entire rows or columns. It selects the top-$k$ rows or columns to be trainable. This structured approach allows the model to store only a small list of indices rather than a full-sized binary mask, significantly reducing memory overhead and aligning with dense matrix operations on GPUs.
2. Supervised Contrastive Learning (SCL) Loss
To ensure the gradient selection is not biased by a randomly initialized classification head, GRFT uses SCL loss to compute the initial gradients for the mask. This provides a more stable signal for identifying which parameters are most relevant to the new task.
3. Model Regularization
To prevent "catastrophic forgetting" and overfitting when tuning a very small sub-network, GRFT adds an $L_2$ regularization term to the final loss. This "anchors" the updated weights to their pre-trained values, preserving generalizable features learned during pre-training.
Experimental Results
The authors evaluated GRFT across diverse benchmarks, demonstrating its superiority in both accuracy and efficiency.
Vision Benchmarks
On the Fine-Grained Visual Classification (FGVC) suite, GRFT achieved a mean accuracy of 91.33%, surpassing full fine-tuning (89.44%) and LoRA (84.78%) while updating only 1.22% of parameters. On VTAB-1k, it reached 74.38% accuracy with only 0.30% parameters updated.
Language Benchmarks
Using LLaMA3-1B on the GLUE benchmark, GRFT outperformed LoRA (0.8511 vs 0.8425 mean accuracy) using a mere 0.08% of parameters. Crucially, GRFT succeeded where previous gradient-based methods (GPS) failed due to Out-of-Memory (OOM) errors on single GPUs.
Ablation Studies and Sensitivity Analysis
The performance of GRFT is robust across various hyperparameter settings, as shown in the ablation studies.
Key findings include:
- Regularization ($\lambda$): The $L_2$ penalty is critical. As $\lambda$ increases, accuracy generally improves or stabilizes before dropping off at very high values, confirming the anchoring effect.
- Data Subsetting: Using a subset of training data to compute the gradient mask is sufficient for high-quality parameter selection, further improving efficiency.
Conclusion
GRFT provides a highly efficient and hardware-friendly approach to PEFT. By combining structured parameter selection with $L_2$ regularization, it achieves state-of-the-art results while drastically reducing memory requirements. Future work may explore optimal heuristics for row versus column selection and the application of GRFT in continual learning scenarios.
Summary updated