Attention Prompt Tuning: Parameter-efficient Adaptation of Pre-trained Models for Spatiotemporal Modeling
作者: Wele Gedara Chaminda Bandara, Vishal M. Patel
分类: cs.CV
发布日期: 2024-03-11
备注: Accepted at 18th IEEE International Conference on Automatic Face and Gesture Recognition (FG'24) Code available at: https://github.com/wgcban/apt 12 pages, 8 figures, 6 tables
🔗 代码/项目: GITHUB
💡 一句话要点
提出注意力提示调优以解决视频建模中的参数效率问题
🎯 匹配领域: 支柱八:物理动画 (Physics-based Animation)
关键词: 视频建模 动作识别 参数高效调优 非局部注意力 提示重参数化
📋 核心要点
- 现有的提示调优方法在处理视频数据时需要大量可调参数,导致参数效率低下和推理延迟增加。
- 本文提出的APT方法通过将提示直接注入到非局部注意力机制中,显著提高了参数效率和推理速度。
- 实验结果显示,APT在多个数据集上相较于现有方法有显著的性能提升,同时减少了计算资源的消耗。
📝 摘要(中文)
本文介绍了一种计算效率高的提示调优变体——注意力提示调优(APT),旨在视频应用(如动作识别)中进行参数高效的模型适应。提示调优方法通过在微调过程中注入一组可学习的提示,同时保持主干网络不变,从而显著减少可学习参数的数量。然而,视频数据的复杂时空信息需要数百个可调提示,导致参数效率降低,并显著增加推理时的延迟和浮点运算量(FLOPs)。为了解决这些问题,APT直接将提示注入到变换器块的非局部注意力机制的键和值中。此外,本文还提出了一种新颖的提示重参数化技术,使APT在超参数选择上更具鲁棒性。实验结果表明,APT在UCF101、HMDB51和SSv2数据集上显著提升了性能,同时减少了FLOPs和延迟。
🔬 方法详解
问题定义:本文旨在解决视频建模中现有提示调优方法的参数效率低和推理延迟高的问题。现有方法在视频数据中需要数百个可调提示,导致计算资源浪费。
核心思路:APT通过将可学习的提示直接注入到变换器的非局部注意力机制的键和值中,从而减少了对大量可调参数的需求,提高了推理效率。
技术框架:APT的整体架构包括数据输入、提示注入、非局部注意力计算和输出阶段。提示在数据传递过程中直接与注意力机制结合,形成高效的特征提取流程。
关键创新:APT的主要创新在于其提示重参数化技术,使得模型在超参数选择上更具鲁棒性,并且通过优化注意力机制的结构,显著减少了FLOPs和延迟。
关键设计:在APT中,提示的数量和结构经过精心设计,以确保在保持高效性的同时,能够捕捉到视频中的复杂时空信息。损失函数和网络结构的选择也经过优化,以提升整体性能。
🖼️ 关键图片
📊 实验亮点
实验结果表明,APT在UCF101、HMDB51和SSv2数据集上相较于现有的参数高效调优方法,FLOPs减少显著,推理延迟降低,同时在动作识别任务上性能提升达到了X%(具体数据待补充)。
🎯 应用场景
该研究的潜在应用领域包括视频监控、体育分析和人机交互等场景,能够在实时动作识别和视频理解中发挥重要作用。APT的高效性使其在资源受限的环境中也能有效应用,具有广泛的实际价值和未来影响。
📄 摘要(原文)
In this paper, we introduce Attention Prompt Tuning (APT) - a computationally efficient variant of prompt tuning for video-based applications such as action recognition. Prompt tuning approaches involve injecting a set of learnable prompts along with data tokens during fine-tuning while keeping the backbone frozen. This approach greatly reduces the number of learnable parameters compared to full tuning. For image-based downstream tasks, normally a couple of learnable prompts achieve results close to those of full tuning. However, videos, which contain more complex spatiotemporal information, require hundreds of tunable prompts to achieve reasonably good results. This reduces the parameter efficiency observed in images and significantly increases latency and the number of floating-point operations (FLOPs) during inference. To tackle these issues, we directly inject the prompts into the keys and values of the non-local attention mechanism within the transformer block. Additionally, we introduce a novel prompt reparameterization technique to make APT more robust against hyperparameter selection. The proposed APT approach greatly reduces the number of FLOPs and latency while achieving a significant performance boost over the existing parameter-efficient tuning methods on UCF101, HMDB51, and SSv2 datasets for action recognition. The code and pre-trained models are available at https://github.com/wgcban/apt