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

Factorization Vision Transformer:以局部窗口代价建模长程依赖

Factorization Vision Transformer: Modeling Long Range Dependency with Local Window Cost

Beijing Institute of Technology(北京理工大学);Beijing Institute of Technology Chongqing Innovation Center(北京理工大学重庆创新中心);ByteDance TikTok(字节跳动抖音);North China Research Institute of Electro-Optics(华北光电技术研究所)

Haolin Qin, Daquan Zhou, Tingfa Xu, Ziyang Bian, Jianan Li

AI总结:

针对Swin transformer局部窗口策略存在的全局依赖建模弱、鲁棒性差问题,提出因子分解自注意力机制FaSA及层级FaViT,以局部窗口级成本实现长程依赖建模,在分类和下游任务中性能、鲁棒性更优且参数量更低。

摘要:

Transformer 具有惊人的表征能力,但通常会消耗大量计算资源,其计算量与图像分辨率呈二次方关系。主流的 Swin transformer 通过局部窗口策略降低计算成本,但该策略不可避免地存在两个缺陷:(1)基于局部窗口的自注意力限制了全局依赖建模能力;(2)近期研究指出局部窗口会损害模型鲁棒性。为克服这些挑战,我们寻求在计算成本与性能之间实现更优权衡,据此提出一种新型因子分解自注意力机制(FaSA),该机制兼具局部窗口的低成本优势与长程依赖建模能力。通过将传统注意力矩阵分解为多个稀疏子注意力矩阵,FaSA 能够在捕获长程依赖的同时聚合多粒度信息,且计算成本与基于局部窗口的自注意力相当。基于 FaSA,我们提出了具有层级结构的因子分解视觉 Transformer(FaViT),其计算复杂度与输入图像的空间分辨率呈线性关系,兼具高性能与强鲁棒性。大量实验表明,FaViT 在图像分类及下游任务中均表现出先进性能;此外,它对损坏数据和有偏数据也展现出极强的模型鲁棒性,因此具备实际应用价值。与基线模型 Swin-T 相比,我们的 FaViT-B2 分类精度显著提升 1%,鲁棒性提升 7%,同时模型参数量减少 14%。我们的代码将很快在 https://github.com/q2479036243/FaViT 公开。

英文摘要:

Transformers have astounding representational power but typically consume considerable computation which is quadratic with image resolution. The prevailing Swin transformer reduces computational costs through a local window strategy. However, this strategy inevitably causes two drawbacks: (1) the local window-based self-attention hinders global dependency modeling capability; (2) recent studies point out that local windows impair robustness. To overcome these challenges, we pursue a preferable trade-off between computational cost and performance. Accordingly, we propose a novel factorization self-attention mechanism (FaSA) that enjoys both the advantages of local window cost and long-range dependency modeling capability. By factorizing the conventional attention matrix into sparse sub-attention matrices, FaSA captures long-range dependencies while aggregating mixed-grained information at a computational cost equivalent to the local window-based self-attention. Leveraging FaSA, we present the factorization vision transformer (FaViT) with a hierarchical structure. FaViT achieves high performance and robustness, with linear computational complexity concerning input image spatial resolution. Extensive experiments have shown FaViT's advanced performance in classification and downstream tasks. Furthermore, it also exhibits strong model robustness to corrupted and biased data and hence demonstrates benefits in favor of practical applications. In comparison to the baseline model Swin-T, our FaViT-B2 significantly improves classification accuracy by 1% and robustness by 7%, while reducing model parameters by 14%. Our code will soon be publicly available at https://github.com/q2479036243/FaViT.

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

↑