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.
翻译:预训练语言模型可通过微调解决多样化的自然语言处理任务,包括在少样本场景下。微调使模型能够快速习得任务特定的"技能",然而这些新习得技能在庞大模型中的存储位置鲜有研究。本文针对该问题提出"技能定位"(skill localization)这一术语并给出解决方案。给定下游任务及其微调后的模型,我们通过简单优化识别出极少量参数子集(约占模型参数的$\sim0.01$%),这些参数承担了模型性能的$>95$%——将仅此子集的微调参数移植至预训练模型,即可获得与完整微调模型几乎相当的性能。尽管此项工作与近期参数高效微调研究存在相似性,其创新之处在于:(i)无需对参数子集进行额外再训练(不同于彩票假设等方法);(ii)在分布内预测校准(误差降低$40$-$90$%)及分布外预测质量方面,较传统微调方法均取得显著提升。在多任务训练模型中,我们观察到更强的技能定位特性:不同任务对应的稀疏参数区域几乎不重叠,而重叠发生时可作为任务相似性的代理指标。实验表明,通过参数移植实现的定位方法能够辅助特定类型的持续学习。