提出注意力保留机制,缓解视觉变压器在持续学习中的遗忘问题。
Attention Retention for Continual Learning with Vision Transformers
- 通过梯度掩码抑制注意力漂移,保持旧任务的视觉概念
- 在多个数据集上达到当前最优性能,显著减少遗忘
- 适合研究持续学习与视觉变压器的学者参考
持续学习(CL)使AI系统能够从非平稳数据流中逐步获取知识,但灾难性遗忘仍是关键挑战。本文识别出视觉变压器中的注意力漂移是导致遗忘的主要原因:学习新任务后,对已有视觉概念的注意力显著转移。受人类视觉系统选择性注意的神经科学启发,我们提出一种新型注意力保留框架,通过两步反向传播梯度约束机制来缓解遗忘:首先使用逐层展开法提取前序任务的注意力图,并生成实例自适应的二值掩码;其次,在学习新任务时,用这些掩码将旧注意力区域对应的梯度置零,从而保护已学视觉概念。为兼容现代优化器,进一步按比例缩放参数更新以维持相对大小。实验与可视化表明,该方法有效缓解遗忘,保持视觉概念,性能达当前最优,且在多种持续学习场景中表现出强泛化能力。
原文摘要 · Abstract (English)
Continual learning (CL) empowers AI systems to progressively acquire knowledge from non-stationary data streams. However, catastrophic forgetting remains a critical challenge. In this work, we identify attention drift in Vision Transformers as a primary source of catastrophic forgetting, where the attention to previously learned visual concepts shifts significantly after learning new tasks. Inspired by neuroscientific insights into the selective attention in the human visual system, we propose a novel attention-retaining framework to mitigate forgetting in CL. Our method constrains attention drift by explicitly modifying gradients during backpropagation through a two-step process: 1) extracting attention maps of the previous task using a layer-wise rollout mechanism and generating instance-adaptive binary masks, and 2) when learning a new task, applying these masks to zero out gradients associated with previous attention regions, thereby preventing disruption of learned visual concepts. For compatibility with modern optimizers, the gradient masking process is further enhanced by scaling parameter updates proportionally to maintain their relative magnitudes. Experiments and visualizations demonstrate the effectiveness of our method in mitigating catastrophic forgetting and preserving visual concepts. It achieves state-of-the-art performance and exhibits robust generalizability across diverse CL scenarios.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。