cs.CVMar 5, 2026

Layer by layer, module by module: Choose both for optimal OOD probing of ViT

Authors: Ambroise Odonnat, Vasilii Feofanov, Laetitia Chapel, Romain Tavenard, Ievgen Redko

Organizations: Noah’s Ark Lab, Inria · L’Institut Agro, IRISA · Univ. Rennes 2, IRISA · Noah’s Ark Lab

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.

Figures & tables

Appendix figures & tables5 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Attentive multilayer fusion for vision transformers

    Jan 14, 2026Laure Ciernik, Marco Morik, Lukas Thede +4Linear ProbingVision Transformer

  2. Pre-PEFT Probing: Weight Statistics and Perturbation Robustness for Layer Selection in VLM Vision Encoders

    Sep 14, 2026Qingtao Xia, Jiahua Bao, Siyao Cheng +1VLM AdaptationParameter-Efficient Fine-Tuning

  3. Vertical Fusion: Condensing Internal Representations for Robust ViT Classification

    Jul 11, 2026Francesco Di Salvo, Shyam Nandan Rai, Hamed Damirchi +4Vision TransformerImage Classification