Continual learning in transformers is commonly addressed through parameter-efficient adaptation: prompts, adapters, or LoRA modules are specialized per task while the backbone remains frozen. Although effective in controlled multi-epoch settings, these approaches rely on gradual gradient-based specialization and struggle in Online Continual Learning (OCL), where data arrive as a non-stationary stream and each sample may be observed only once. We recast continual learning in transformers as a routing problem: under strict online constraints, the model must dynamically select the appropriate representational subspace for each input without explicit task identifiers or repeated optimization. We thus introduce Routing without Forgetting (RwF), a transformer architecture augmented with energy-based associative retrieval layers inspired by Modern Hopfield Networks. Instead of storing or merging task-specific prompts, RwF generates dynamic prompts through single-step associative retrieval over the transformer token embeddings at each layer. Retrieval corresponds to the closed-form minimization of a strictly convex free-energy functional, enabling input-conditioned routing within each forward pass, independently of iterative gradient refinement. Across challenging class-incremental benchmarks, RwF improves over existing prompt-based methods. On Split-ImageNet-R and Split-ImageNet-S, RwF outperforms prior prompt-based approaches by a large margin, even in few-shot learning regimes. These results indicate that embedding energy-based associative routing directly within the transformer backbone provides a principled and effective foundation for OCL.


翻译:在Transformer中,持续学习通常通过参数高效适应来解决:提示、适配器或LoRA模块针对每个任务专门化,而主干网络保持冻结。尽管在受控的多轮次设置中有效,但这些方法依赖于基于梯度的渐进专门化,并在在线持续学习(OCL)中遇到困难,其中数据以非平稳流的形式到达,每个样本可能仅被观察到一次。我们将Transformer中的持续学习重新表述为一个路由问题:在严格的在线约束下,模型必须为每个输入动态选择适当的表示子空间,而无需显式的任务标识符或重复优化。因此,我们引入了路由而不遗忘(RwF),这是一种通过受现代Hopfield网络启发的基于能量的关联检索层增强的Transformer架构。RwF不存储或合并任务特定的提示,而是通过在每个层的Transformer令牌嵌入上进行单步关联检索来生成动态提示。检索对应于严格凸自由能泛函的闭式最小化,使得在每个前向传播中能够进行输入条件路由,独立于迭代梯度优化。在具有挑战性的类增量基准测试中,RwF优于现有的基于提示的方法。在Split-ImageNet-R和Split-ImageNet-S上,RwF大幅领先于先前的基于提示的方法,即使在少样本学习机制下也是如此。这些结果表明,将基于能量的关联路由直接嵌入Transformer主干网络为OCL提供了一个原则性且有效的基础。

0
下载
关闭预览

相关内容

【CVPR2024】卷积提示"遇见了语言模型的持续学习
专知会员服务
18+阅读 · 2024年4月1日
【ICML2022】XAI for Transformers:通过保守传播更好的解释
专知会员服务
16+阅读 · 2022年7月19日
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
专知会员服务
33+阅读 · 2020年10月2日
【Uber AI新论文】持续元学习,Learning to Continually Learn
专知会员服务
37+阅读 · 2020年2月27日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
图上的归纳表示学习
科技创新与创业
23+阅读 · 2017年11月9日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月18日
VIP会员
最新内容
技术、多域威慑与海上战争(报告)
专知会员服务
3+阅读 · 今天15:04
“在云端防御”:提升北约数据韧性(报告)
专知会员服务
2+阅读 · 今天14:54
人工智能及其在海军行动中的整合(综述)
专知会员服务
2+阅读 · 今天14:07
美军MAVEN项目全面解析:算法战架构
专知会员服务
16+阅读 · 今天8:36
从俄乌战场看“马赛克战”(万字长文)
专知会员服务
10+阅读 · 今天8:19
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员