arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2405.13901cs.CVcs.LGeess.SP

基于离散余弦变换的去相关注意力机制用于视觉Transformer

Discrete Cosine Transform Based Decorrelated Attention for Vision Transformers

Machine and Hybrid Intelligence Lab, Northwestern University(机器与混合智能实验室,西北大学);Department of Electrical and Computer Engineering, University of Illinois Chicago(电气与计算机工程系,伊利诺伊大学香槟分校)

Hongyi Pan, Emadeldeen Hamdan, Xin Zhu, Ahmet Enis Cetin, Ulas Bagci

AI总结:

本文提出基于DCT的去相关注意力机制,通过改进初始化策略和压缩技术提升视觉Transformer的效率和性能,实验表明在Swin Transformer上显著降低计算开销且保持性能。

摘要:

自注意力机制是Transformer架构成功的关键,但学习查询、键和值投影仍具挑战性且计算成本高。本文提出两种互补方法,利用离散余弦变换(DCT)提升视觉Transformer的效率和性能。首先,引入基于DCT的初始化策略,通过DCT系数初始化投影权重,提升CIFAR-10和ImageNet-1K的分类精度。其次,提出基于DCT的注意力压缩技术,利用频域的去相关特性,通过截断高频成分减少查询、键和值投影的维度,不牺牲精度。实验表明,该压缩方法在Swin Transformer上显著降低计算开销,同时保持性能。

英文摘要:

Self-attention is central to the success of Transformer architectures; however, learning the query, key, and value projections from random initialization remains challenging and computationally expensive. In this paper, we propose two complementary methods that leverage the Discrete Cosine Transform (DCT) to enhance the efficiency and performance of Vision Transformers. First, we address the initialization problem by introducing a simple yet effective DCT-based initialization strategy for self-attention, where projection weights are initialized using DCT coefficients. This structure-preserving approach consistently improves classification accuracy on the CIFAR-10 and ImageNet-1K benchmarks. Second, we propose a DCT-based attention compression technique that exploits the decorrelation properties of the frequency domain. By observing that high-frequency DCT coefficients typically correspond to noise, we truncate high-frequency components of the input patches, thereby reducing the dimensionality of the query, key, and value projections without sacrificing accuracy. Experiments on Swin Transformer models demonstrate that the proposed compression method achieves a substantial reduction in computational overhead while maintaining comparable performance.

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

↑