Pre-trained language models can be fine-tuned to solve diverse NLP tasks, including in few-shot settings. Thus fine-tuning allows the model to quickly pick up task-specific ``skills,'' but there has been limited study of where these newly-learnt skills reside inside the massive model. This paper introduces the term skill localization for this problem and proposes a solution. Given the downstream task and a model fine-tuned on that task, a simple optimization is used to identify a very small subset of parameters ($\sim0.01$% of model parameters) responsible for ($>95$%) of the model's performance, in the sense that grafting the fine-tuned values for just this tiny subset onto the pre-trained model gives performance almost as well as the fine-tuned model. While reminiscent of recent works on parameter-efficient fine-tuning, the novel aspects here are that: (i) No further re-training is needed on the subset (unlike, say, with lottery tickets). (ii) Notable improvements are seen over vanilla fine-tuning with respect to calibration of predictions in-distribution ($40$-$90$% error reduction) as well as the quality of predictions out-of-distribution (OOD). In models trained on multiple tasks, a stronger notion of skill localization is observed, where the sparse regions corresponding to different tasks are almost disjoint, and their overlap (when it happens) is a proxy for task similarity. Experiments suggest that localization via grafting can assist certain forms of continual learning.
翻译:预训练语言模型可以通过微调来解决多种自然语言处理任务,包括少样本场景下的任务。因此,微调使模型能够快速掌握任务特定的“技能”,但关于这些新习得技能在大规模模型中的存储位置,现有研究尚有限。本文针对该问题提出“技能定位”这一术语,并给出一种解决方案。给定下游任务及在该任务上微调后的模型,通过简单优化即可识别出极少数参数子集(约占模型参数的0.01%),该子集对模型性能的贡献超过95%。其原理在于:仅将此微小子集对应的微调参数值移植到预训练模型中,即可获得接近完整微调模型的性能。尽管该方法与近期参数高效微调研究有相似之处,但其核心创新在于:(i)无需对子集进行额外重训练(与“彩票假说”等方法不同);(ii)在分布内预测的校准性(错误率降低40%-90%)及分布外预测质量上,相比传统微调均有显著提升。在多任务训练模型中,技能定位呈现出更强特性:不同任务对应的稀疏参数区域几乎互不重叠,而当区域重叠发生时,其重叠程度可作为任务相似性的代理指标。实验表明,基于参数移植的定位方法有助于特定形式的持续学习。