超越孤立的注意力头:用于视觉Transformer的多重叠头自注意力
Beyond Isolated Heads: Multi-Overlapped-Head Self-Attention for Vision Transformers
AI总结:
针对标准视觉Transformer的多头自注意力头间信息隔离问题,提出多重叠头自注意力机制,经多数据集实验验证,其性能优于标准多头自注意力且计算开销可忽略。
摘要:
多头自注意力(MHSA)是视觉Transformer的基石,它通过将令牌投影到独立子空间,使模型能够捕获多样的特征表示。然而,标准MHSA严格隔离这些注意力头,导致注意力计算过程中无法进行任何信息交换。本文提出一种新机制——多重叠头自注意力(MOHSA),它用软的、重叠的注意力头划分取代硬划分,允许查询、键和值与相邻头的对应部分部分重叠,从而在注意力机制内部直接促进丰富的头间通信。我们广泛研究了多种重叠维度调度策略以确定最优配置,在多种Transformer架构上进行的综合实验表明,MOHSA在CIFAR-10、CIFAR-100、Tiny-ImageNet和ImageNet-1k数据集上的性能优于标准MHSA,在计算开销可忽略的情况下实现了显著的性能提升。代码链接:this https URL。
英文摘要:
Multi-Head Self-Attention (MHSA) is the cornerstone of Vision Transformers, allowing models to capture diverse feature representations by projecting tokens into independent subspaces. However, the standard MHSA strictly isolates these heads, preventing any information exchange during the attention computation itself. In this paper, we propose Multi-Overlapped-Head Self-Attention (MOHSA), a novel mechanism that replaces the hard division of attention heads with a soft, overlapping division. By allowing queries, keys, and values to partially overlap with those of adjacent heads, MOHSA fosters rich inter-head communication directly within the attention mechanism. We extensively investigate various overlap dimension scheduling strategies to identify optimal configurations. Comprehensive experiments in several Transformer architectures demonstrate that MOHSA outperforms standard MHSA on the CIFAR-10, CIFAR-100, Tiny-ImageNet, and ImageNet-1k datasets, offering a significant performance boost with negligible computational overhead. Code link: https://github.com/ZTX-100/MOHSA.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。