Attention Retention for Continual Learning with Vision Transformers

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Lu, Yue, Zhou, Xiangyu, Zhang, Shizhou, Xing, Yinghui, Liang, Guoqiang, Zhang, Wencong
Natura: Preprint
Pubblicazione: 2026
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866914307594256384
author Lu, Yue
Zhou, Xiangyu
Zhang, Shizhou
Xing, Yinghui
Liang, Guoqiang
Zhang, Wencong
author_facet Lu, Yue
Zhou, Xiangyu
Zhang, Shizhou
Xing, Yinghui
Liang, Guoqiang
Zhang, Wencong
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2602_05454
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Attention Retention for Continual Learning with Vision Transformers
Lu, Yue
Zhou, Xiangyu
Zhang, Shizhou
Xing, Yinghui
Liang, Guoqiang
Zhang, Wencong
Computer Vision and Pattern Recognition
Artificial Intelligence
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.
title Attention Retention for Continual Learning with Vision Transformers
topic Computer Vision and Pattern Recognition
Artificial Intelligence
url https://arxiv.org/abs/2602.05454