arXiv:2605.07191cs.CVcs.LG2026-05被引 2

发现视觉Transformer注意力迁移并非总有效,架构不匹配会导致性能下降。

Attention Transfer Is Not Universally Effective for Vision Transformers

  • 通过对比20个教师模型,发现4类ViT无法通过注意力迁移获益。
  • 部分模型迁移后比从零训练还差5.1%,且在多种条件下持续失败。
  • 问题根源是学生与教师架构不匹配,补上教师结构即可逆转失败。

近期研究指出,仅将预训练教师ViT的注意力模式迁移到随机初始化的学生ViT中,即可恢复教师权重的全部收益。我们在此对来自11个知名ViT家族的20个教师模型进行综合评估,发现注意力迁移并非普遍有效。其中7个家族成功迁移,而4个家族始终失败,性能最低比从零训练无迁移基线低5.1%。进一步分析表明,该失败具有家族一致性,且在延长训练、更换迁移数据集及分布外测试下仍持续存在。受控实验将问题定位至注意力路由通道,表明关键不在于能否匹配注意力模式,而在于匹配后的模式是否对学生仍具功能。我们发现,教师与学生间架构不匹配是主因。仅在随机初始化的学生中加入教师原生架构组件,即可完全逆转所有4个失败家族的表现。值得注意的是,这些组件本身无法提升从零训练效果,说明其作用仅在于激活教师注意力的可用性。我们进一步系统验证,失败非由损失函数选择或预训练方法差异导致。本研究重新定义了ViT表示中注意力的作用:注意力仅在学生架构与教师一致时才有效。

原文摘要 · Abstract (English)

A recent work shows that Attention Transfer, which transfers only the attention patterns from a pre-trained teacher Vision Transformer (ViT) to a randomly initialized standard student ViT, is sufficient to recover the full benefit of the teacher's pre-trained weights. We revisit this finding on a comprehensive benchmark of 20 teachers from 11 well-known ViT families and reveal that Attention Transfer is not universally effective. While 7 families transfer successfully, 4 consistently fail, falling up to 5.1\% below the from-scratch no-transfer baseline. Further results demonstrate that this failure is family-consistent across model sizes, and persists under extended training durations, different transfer datasets, and out-of-distribution evaluations. Controlled analyses then consistently localize the problem to the attention-routing channel, indicating that the key issue is not whether the student can match the teacher's attention patterns, but whether the matched patterns remain functional for the student. Crucially, we identify architectural mismatch between the pre-trained teacher and the standard student as the primary mechanism. By adding only the teacher's native architectural components to the student in a randomly initialized state, we completely reverse the failure for all 4 families. Notably, these components alone do not improve from-scratch training, confirming that they specifically unlock the usability of the teacher's attention. We further systematically show that this failure is not explained by the inadequate choice of transfer loss or by differences in pre-training recipes. Our findings refine the prevailing understanding of attention in ViT representations: attention is sufficient \textit{only} when the student architecture matches the teacher.

ViT注意力迁移架构匹配模型压缩

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。