Abstract
Parameter-efficient fine-tuning (PEFT) has become a popular way to adapt large pre-trained models to new tasks. Most PEFT methods update only a small subset of parameters while freezing the rest, avoiding redundant computation. As they maximize the absolute size of the updates without regard to the parameters' original scale, the resulting changes in model behavior can be minimal. In contrast, we maximize updates relative to each parameter's scale, yielding more meaningful downstream adaptation. We propose Gradient-to-Weight Ratio and Entropy-guided Masking (GEM), a parameter scale-aware, distribution-sensitive sparse fine-tuning framework. GEM prioritizes parameters whose updates are significant in proportion to their initial pre-trained values. It also adaptively determines how many parameters to tune at each layer based on the entropy of parameter values, thereby making the most effective use of the computational budget in PEFT. Our empirical study demonstrates the efficacy of GEM on both general-domain tasks (GLUE and SuperGLUE) and domain-specific tasks (GSM8k and MBPP), achieving up to a 1.6% improvement in fine-tuning accuracy over full fine-tuning while updating only 0.1% of model parameters.
Introduction
Adapting massive pre-trained models for specific tasks is computationally intensive. Parameter-Efficient Fine-Tuning (PEFT) methods like LoRA or sparse masking attempt to solve this by updating only a small subset of weights. However, existing approaches often suffer from two major flaws: Scale-Ignorance, where parameter selection is based on absolute gradient magnitude rather than relative change, and Uniform Allocation, where the same number of parameters are tuned in every layer regardless of their importance distribution.
Methodology
To overcome these limitations, we introduce GEM (Gradient-to-Weight Ratio and Entropy-guided Masking), which utilizes two key innovations to create a highly specialized binary mask for model updates.
Gradient-to-Weight Ratio (GWR)
Instead of prioritizing parameters based on the absolute gradient ($|\nabla w|$), GEM uses the ratio of the gradient to the weight's magnitude ($|\nabla w| / |w|$). This scale-invariant signal identifies parameters that will undergo the most significant proportional change, which serves as a better proxy for functional adaptation in downstream tasks.
Entropy-guided Layer Allocation
GEM adaptively distributes the tuning budget across layers by calculating the entropy of importance scores within each layer. Layers with high entropy (spread-out importance) receive a larger parameter allocation, while layers with low entropy (concentrated importance) receive a smaller, more targeted budget.
Key Results and Insights
We evaluated GEM across a wide range of benchmarks, including GLUE, SuperGLUE, and domain-specific tasks like GSM8k (math) and MBPP (coding).
- Superior Performance: On the Microsoft Phi-2 (2.7B) model, GEM achieved an average accuracy of 85.52% across seven tasks, surpassing full fine-tuning (85.27%) while updating only 0.1% of the parameters.
- Effective Adaptation: Empirical analysis shows that GWR-based masking leads to significantly higher total relative weight changes compared to standard gradient-magnitude or random selection methods, confirming that GEM identifies more impactful parameters for adaptation.
- Sparsity as a Regularizer: By freezing 99.9% of the model, GEM prevents the overfitting and catastrophic forgetting often associated with full fine-tuning on limited task data.
Conclusion and Future Work
GEM demonstrates that scale-awareness and distribution-sensitivity are critical for effective sparse fine-tuning. While the framework shows strong results on models up to 2.7B parameters, future research will focus on scaling GEM to frontier-scale models (70B+) and exploring dynamic masking strategies that evolve during the training process.
Summary updated