Abstract
Recent studies have observed that intermediate layers of foundation models often yield more discriminative representations than the final layer. While initially attributed to autoregressive pretraining, this phenomenon has also been identified in models trained via supervised and discriminative self-supervised objectives. In this paper, we conduct a comprehensive study to analyze the behavior of intermediate layers in pretrained vision transformers. Through extensive linear probing experiments across a diverse set of image classification benchmarks, we find that distribution shift between pretraining and downstream data is the primary cause of performance degradation in deeper layers. Furthermore, we perform a fine-grained analysis at the module level. Our findings reveal that standard probing of transformer block outputs is suboptimal; instead, probing the activation within the feedforward network yields the best performance under significant distribution shift, whereas the normalized output of the multi-head self-attention module is optimal when the shift is weak.
Abstract (translated)
最近的研究观察到,基础模型的中间层通常比最终层产生更具判别性的表示。这一现象最初被归因于自回归预训练,但也在通过监督和判别式自我监督目标进行训练的模型中被识别出来。在这篇论文中,我们进行了全面研究以分析预先训练的视觉变换器(vision transformers)中间层的行为。通过在一系列多样化的图像分类基准上进行广泛的线性探测实验,我们发现预训练数据与下游任务数据之间的分布偏移是深层性能下降的主要原因。 此外,我们在模块层面进行了细粒度分析。我们的研究结果表明,标准的探测变换器块输出方法效果不佳;相反,在显著的分布偏移情况下,对前馈网络中的激活进行探测可以取得最佳性能;而在轻微的分布偏移时,则探测多头自注意力模块的归一化输出可以获得最优结果。
URL
https://arxiv.org/abs/2603.05280