arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.15243cs.CV
收藏

基于可学习记忆的图像Transformers微调

Fine-tuning Image Transformers using Learnable Memory

Google Inc.(谷歌公司)

Mark Sandler, Andrey Zhmoginov, Max Vladymyrov, Andrew Jackson

摘要:

在本文中,我们提出了增强视觉Transformer模型与可学习的记忆令牌。我们的方法允许模型使用很少的参数来适应新的任务,同时可选地保留其在以前学习的任务上的能力。在每一层,我们引入了一组可学习的嵌入向量,这些向量提供了对特定数据集有用的上下文信息。我们称之为“记忆令牌”。我们发现,与传统的仅头部微调相比,每层仅用少数这样的令牌来增强模型可以显着提高准确性,并且仅略低于显着更昂贵的完全微调。然后,我们提出了一种注意力掩蔽方法,可以扩展到新的下游任务,并具有计算重用。在这种设置中,除了参数高效之外,模型还可以以较小的增量成本执行旧任务和新任务作为单个推理的一部分。

英文摘要:

In this paper we propose augmenting Vision Transformer models with learnable memory tokens. Our approach allows the model to adapt to new tasks, using few parameters, while optionally preserving its capabilities on previously learned tasks. At each layer we introduce a set of learnable embedding vectors that provide contextual information useful for specific datasets. We call these "memory tokens". We show that augmenting a model with just a handful of such tokens per layer significantly improves accuracy when compared to conventional head-only fine-tuning, and performs only slightly below the significantly more expensive full fine-tuning. We then propose an attention-masking approach that enables extension to new downstream tasks, with a computation reuse. In this setup in addition to being parameters efficient, models can execute both old and new tasks as a part of single inference at a small incremental cost.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑