🤖 AI Summary
To address weak task adaptability and training instability in few-shot (1–32 examples) fine-tuning of large language models (LLMs), this paper proposes Structured Gradient-Guided Fine-Tuning (SGGFT). SGGFT introduces a synergistic regularization framework that jointly enforces gradient direction consistency and magnitude constraints, coupled with a learnable gradient alignment mechanism between source and target tasks to explicitly optimize parameter update trajectories and enhance cross-task generalization. Compared to state-of-the-art methods, SGGFT achieves significant average accuracy gains across diverse natural language understanding (NLU) benchmarks, improves gradient update stability, and maintains robust performance under low-resource and cross-domain settings. Its core innovations include: (i) the first joint regularization of gradient direction and magnitude in few-shot LLM adaptation; and (ii) a novel learnable cross-task gradient alignment module. Collectively, these contributions establish a new paradigm for efficient, stable, and generalizable few-shot adaptation of LLMs.
📝 Abstract
This paper presents a gradient-informed fine-tuning method for large language models under few-shot conditions. The goal is to enhance task adaptability and training stability when data is limited. The method builds on a base loss function and introduces two gradient-related regularization terms. The first enforces gradient direction consistency to guide parameter updates along task-relevant directions and prevent drift. The second controls gradient magnitude to avoid abnormal updates. Together, these components support a more efficient and stable optimization path. To further improve cross-task generalization, the method incorporates a gradient alignment mechanism. This mechanism measures the consistency between optimization directions of the source and target tasks. It enhances fine-tuning performance in multi-task and cross-domain scenarios. Across various natural language understanding tasks, the method outperforms existing fine-tuning strategies in average accuracy, gradient stability, and directional alignment. Empirical evaluations under different sample sizes and domain-specific tasks confirm the method's robustness and broad applicability in low-resource environments. In particular, the method shows clear advantages in controlling parameter update paths. The results demonstrate that a gradient-based fine-tuning framework can effectively leverage the representational power of large language models. It ensures training stability while reducing dependence on large volumes of labeled data.