发现预训练模型在持续学习中表现不佳的根源,并提出改进方法
Does RoBERTa Perform Better than BERT in Continual Learning: An Attention Sink Perspective
- 通过分析注意力分布,发现[SEP]等标记成'注意力陷阱'
- 引入预缩放机制,显著提升无经验回放的持续学习性能
- 适合研究持续学习与注意力机制的学者参考
持续学习(CL)旨在训练能顺序学习新任务而不遗忘旧知识的模型。尽管先前研究发现预训练有助于CL,但预训练模型下游能力越强是否在CL中表现越好仍不明确。本文观察到,预训练模型可能将高注意力分数分配给各类任务中普遍存在的'注意力陷阱'(如[SEP]标记),这会导致单任务学习时特征过度平滑,序列任务学习时产生干扰,从而损害模型在持续学习中的表现,即使其预训练能力很强。为此,我们提出一种预缩放机制,鼓励所有标记间的注意力多样性:首先在探测阶段对非陷阱标记的注意力进行缩放,再以缩放后的注意力进行微调。实验表明,该方法在无需经验回放或逐步存储历史参数的情况下,显著提升了持续学习性能。
原文摘要 · Abstract (English)
Continual learning (CL) aims to train models that can sequentially learn new tasks without forgetting previous tasks' knowledge. Although previous works observed that pre-training can benefit CL, it remains unclear whether a pre-trained model with higher downstream capacity also performs better in CL. In this paper, we observe that pre-trained models may allocate high attention scores to some 'sink' tokens, such as [SEP] tokens, which are ubiquitous across various tasks. Such attention sinks may lead to models' over-smoothing in single-task learning and interference in sequential tasks' learning, which may compromise the models' CL performance despite their high pre-trained capabilities. To reduce these effects, we propose a pre-scaling mechanism that encourages attention diversity across all tokens. Specifically, it first scales the task's attention to the non-sink tokens in a probing stage, and then fine-tunes the model with scaling. Experiments show that pre-scaling yields substantial improvements in CL without experience replay, or progressively storing parameters from previous tasks.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。