[论文解读] Group Generalized Mean Pooling for Vision Transformer
本文提出用于视觉变换器(Vision Transformers)的组广义均值(GGeM)池化方法,通过将通道特征划分为多个组,并在每组内应用可学习的广义均值(GeM)池化,以更好地捕捉通道级别的重要性。GGeM在ImageNet-1K上将ViT的Top-1准确率提升了0.1–0.7%,并在ViT-Base和ViT-Large上取得了当前最优结果,同时在图像检索和多模态学习任务中也优于基线方法。
Vision Transformer (ViT) extracts the final representation from either class token or an average of all patch tokens, following the architecture of Transformer in Natural Language Processing (NLP) or Convolutional Neural Networks (CNNs) in computer vision. However, studies for the best way of aggregating the patch tokens are still limited to average pooling, while widely-used pooling strategies, such as max and GeM pooling, can be considered. Despite their effectiveness, the existing pooling strategies do not consider the architecture of ViT and the channel-wise difference in the activation maps, aggregating the crucial and trivial channels with the same importance. In this paper, we present Group Generalized Mean (GGeM) pooling as a simple yet powerful pooling strategy for ViT. GGeM divides the channels into groups and computes GeM pooling with a shared pooling parameter per group. As ViT groups the channels via a multi-head attention mechanism, grouping the channels by GGeM leads to lower head-wise dependence while amplifying important channels on the activation maps. Exploiting GGeM shows 0.1%p to 0.7%p performance boosts compared to the baselines and achieves state-of-the-art performance for ViT-Base and ViT-Large models in ImageNet-1K classification task. Moreover, GGeM outperforms the existing pooling strategies on image retrieval and multi-modal representation learning tasks, demonstrating the superiority of GGeM for a variety of tasks. GGeM is a simple algorithm in that only a few lines of code are necessary for implementation.
研究动机与目标
- 解决现有池化策略在视觉变换器中对所有通道一视同仁的问题,而忽略其激活模式的差异。
- 通过利用ViT激活图中通道级别的差异,改进特征表示,而标准的平均池化、最大池化或GeM池化均未考虑此类差异。
- 设计一种简单但高效的池化机制,兼容ViT的多头注意力架构,以减少头之间的依赖性并增强全局特征学习能力。
- 在多种视觉任务中验证GGeM池化的有效性,包括图像分类、图像检索和多模态表征学习。
- 通过极小的架构修改,在ImageNet-1K上为ViT-Base和ViT-Large建立新的最先进性能记录。
提出的方法
- 根据ViT编码器中的注意力头数量,将最终特征图的通道划分为多个组。
- 在每组内独立应用广义均值(GeM)池化,并为每组使用共享的可学习池化参数。
- 将GGeM操作定义为:$ y_g = \left( \frac{1}{N_g} \sum_{i \in G_g} x_i^p \right)^{1/p} $,其中$ G_g $表示第g组通道,$ p $为每组的可学习参数。
- 将GGeM作为分类标记或平均池化的替代方案,集成到ViT的最后层,支持端到端训练。
- 在每组内对所有空间位置使用相同的池化参数,以保留空间结构的同时突出重要通道。
- 在ImageNet-1K、CUB200、Cars196、SOP以及Flickr30k和MSCOCO等多模态基准上,对使用GGeM池化的ViT模型进行训练和微调。
实验结果
研究问题
- RQ1池化策略如何影响视觉变换器中的梯度集中现象以及注意力头的专门化?
- RQ2在池化操作中对通道进行分组是否能降低头间相似性,并提升ViT中特征的多样性?
- RQ3为每个通道组学习独立的池化参数,是否能带来优于全局共享池化参数的性能提升?
- RQ4在图像分类、检索和多模态任务中,GGeM池化与平均池化、最大池化及GeM池化相比,在准确率和泛化能力方面表现如何?
- RQ5GGeM池化是否能在视觉模型的预训练和微调设置中均有效应用?
主要发现
- GGeM池化在ImageNet-1K上为ViT-Base和ViT-Large分别实现了71.5%的全新最先进Top-1准确率,比基线池化方法高出0.1–0.7个百分点。
- 在CUB200数据集上,GGeM在图像检索任务中达到75.2% R@1、45.0% RP和34.6% mAP,优于GeM(75.0%、44.1%、34.1%)和最大池化(74.6%、43.6%、33.1%)。
- 在多模态零样本检索任务中,GGeM在Flickr30k上实现11.5% R@1和27.7% R@5,优于GeM(10.7%、26.9%)和最大池化(9.9%、25.7%)。
- 与分类标记基线相比,GGeM在14个基准上的零样本图像分类平均准确率提升了1.0%。
- 分析表明,随着池化参数$ p $的增加,GGeM能降低头间相似性,并增加聚焦于全局信息的注意力头数量。
- 该方法仅需少量代码即可实现,展现出高度的实用性与在现有ViT框架中的易集成性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。