Vision Transformers (ViTs) have achieved strong performance across computer vision tasks, but the quality of their learned representations differs drastically depending on the training paradigm. While self-supervised ViTs often demonstrate emergent properties, such as object-aligned patch representations and attention maps, supervised ViTs typically lack these properties, even when trained with strong data augmentations. Understanding the origin of this difference is important for explaining and controlling the object-level structure. To investigate it, we perform a spectral analysis of supervised and self-supervised models, and identify a key distinction: MLP layers in supervised ViTs introduce high-frequency variations into patch representations, disrupting their spatial organization. Motivated by this finding, we propose Spec2R, a lightweight spectral regularization method that fine-tunes the MLP layers of pretrained supervised ViTs. Spec2R recovers object-aligned patch representations and attention maps, while improving adversarial robustness and preserving competitive classification accuracy.
Figures & tables
Figure 2: Evolution of spatial structure across ViT blocks. Patch representations from all 12 blocks are visualized as RGB projections onto the top three principal components of the final layer activation. DINO [ 3 ] (top) refines object-aligned structure with each layer, while DeiT-III [ 25 ] (middle) progressively introduces high-frequency spatial variations. Spec 2 R[DeiT-III] (bottom) restores object-aligned structure through MLP and classification head fine-tuning.
Figure 3: Radial moment dynamics across ViT blocks. Top: Radial moment trajectories averaged over the ImageNet-1K [ 21 ] validation set. Middle and bottom: Changes in radial moment induced by MLP and attention residual branches ( Fimlp and Fiattn ). DeiT-III [ 25 ] MLPs increase the radial moment (red region), producing the accumulating spatial variations.
Figure 4: Angular spectrum similarity across ViT blocks. Box plots of cosine similarity between normalized angular spectra before and after each transformer block, for DINO [ 3 ] and DeiT-III [ 25 ] . Despite contrasting radial dynamics (see Figure 3 ), both models maintain high angular similarity, motivating its preservation during spectral regularization.
Figure 5: Qualitative comparison of final-layer patch representations. RGB visualizations of the top three principal components of patch tokens on ImageNet-1K [ 21 ] images for DINO [ 3 ] , DeiT-III [ 25 ] , and Spec 2 R [DeiT-III]. Spec 2 R removes high-frequency artifacts from DeiT-III representations and improves object alignment, producing representations similar to DINO.
Figure 6: Qualitative comparison of final-layer CLS-token attention. CLS-token attention maps averaged across heads on ImageNet-1K [ 21 ] images for DINO [ 3 ] , DeiT-III [ 25 ] , and Spec 2 R [DeiT-III]. Despite keeping attention parameters frozen, Spec 2 R[DeiT-III] improves object-alignment of attention maps, allowing DeiT-III to produce more object-aligned attention maps than DINO.
ImageNet-1K (EPG)
PASCAL VOC (IoU)
Model
Last ↑
Best ↑
Best Block
Last ↑
Best ↑
Best Block
DINO-B/16
78.89
82.94
10
30.95
39.20
6
DeiT-III-B/16
66.09
78.19
9
17.04
43.84
8
+ Spec 2 R
85.84
85.84
12
40.16
46.11
8
Δ
+19.75
+7.65
+23.12
+2.27
DeiT-Distilled-B/16
64.15
76.89
9
14.65
35.71
6
Table 1: Object alignment of CLS-token attention. We evaluate the best attention head using Energy Pointing Game (EPG) [ 27 ] on ImageNet-1K [ 21 ] and foreground intersection-over-union (IoU) on PASCAL VOC [ 8 ] . We report performance at the final transformer block (Last), the highest performance across blocks (Best), and the corresponding block index (Best Block).
Semantic Correspondence
Temporal Tracking
Object Discovery
SPair-71k
PF-PASCAL
DAVIS
MOSE
TokenCut
Model
0.05 ↑
0.10 ↑
0.20 ↑
0.05 ↑
0.10 ↑
0.20 ↑
J↑
F↑
J&F↑
J↑
F↑
J&F↑
VOC07 ↑
VOC12 ↑
COCO20K ↑
DINO-B/16
11.81
26.99
46.21
28.58
51.41
69.51
60.69
63.86
62.28
31.63
38.43
35.03
57.37
62.54
48.20
DeiT-Distilled-B/16
11.31
27.37
48.16
27.17
49.63
68.68
59.79
62.19
60.99
30.23
37.05
33.64
52.62
56.22
45.72
+ Spec 2 R
11.72
28.39
50.06
29.08
53.77
72.29
60.60
62.85
61.73
31.67
38.36
35.01
54.44
59.35
46.12
Δ
+0.41
+1.02
+1.90
+1.91
+4.14
+3.61
+0.81
+0.66
+0.74
+1.44
+1.31
+1.37
+1.82
+3.13
+0.40
Table 2: Evaluation of patch representations across downstream tasks. Semantic correspondence is evaluated using PCK [ 31 ] at three thresholds on SPair-71k [ 15 ] and PF-PASCAL [ 9 ] . Temporal tracking is evaluated on DAVIS [ 17 ] and MOSE [ 6 ] using J , F , and their mean. Object discovery is evaluated using TokenCut [ 29 ] CorLoc on PASCAL VOC07, VOC12 [ 8 ] , and COCO20K [ 14 ] . Δ denotes the absolute improvement over the corresponding pretrained model in percentage points.
Figure 7: Classification accuracy preservation and adversarial robustness improvements with Spec 2 R. ImageNet-1K [ 21 ] validation top-1 accuracy (left) and robust accuracy under APGD-CE adversarial attacks [ 4 ] (right), before and after Spec 2 R fine-tuning. Spec 2 R preserves classification accuracy within approximately 0.4 percentage points while improving robust accuracy by 9.5 to 23.7 percentage points, with the largest gain observed for DeiT-III [ 25 ] .
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 8: Radial moment dynamics across ViT blocks. Top: Radial moment trajectories averaged over 10,000 randomly sampled images from the ImageNet-1K [ 21 ] validation set. Middle and bottom: Changes in radial moment induced by MLP and attention residual branches ( Fimlp and Fiattn ). For all considered models, MLP layers increase the radial moment (red region), producing the accumulating spatial variations.
Figure 9: Effect of angular regularization Lθ on DeiT-III [ 25 ] across loss-weight ratios . Performance differences between Spec 2 R with and without the angular loss, evaluated across three ratios of radial to KL regularization ( λr/λKL ). Positive values show improvements from angular regularization. We report ImageNet-1K [ 21 ] classification accuracy, attention alignment (EPG [ 27 ] and VOC foreground IoU [ 8 ] ), and unsupervised object discovery (TokenCut [ 29 ] CorLoc on VOC07 and VOC12 [ 8 ] ).
Accuracy
Attention Alignment
Object Discovery
λr/λKL
Lθ
IN-1K ACC ↑
IN-1K EPG ↑
VOC IoU ↑
TokenCut VOC07 ↑
TokenCut VOC12 ↑
1
×
83.51
67.84
17.07
31.61
34.58
✓
83.69
71.73
21.07
34.86
38.55
10
×
82.99
85.69
39.24
32.29
37.82
✓
83.36
85.84
40.16
35.66
40.35
100
×
70.93
80.39
40.81
17.54
21.00
Appendix
Table 3: Effect of angular regularization Lθ on DeiT-III [ 25 ] accuracy, attention alignment and object discovery. We evaluate radial non-expansion Lr at different regularization strengths relative to Kullback–Leibler distillation, comparing classification accuracy, attention alignment, and object discovery with and without angular regularization.
Figure 10: Best-head EPG [ 27 ] across transformer blocks on ImageNet-1K. Block-wise Energy Pointing Game (EPG) scores for DeiT-III [ 25 ] , DeiT-Distilled [ 24 ] , and FlexiViT [ 2 ] , comparing reference models (Original) with their Spec 2 R-regularized versions. For each block, we plot the highest EPG score across all attention heads. Spec 2 R improves attention alignment mostly in deeper blocks, mitigating the decline observed in reference models and shifting the highest EPG scores toward later blocks.
Figure 11: Best-head foreground IoU across transformer blocks on PASCAL VOC 2012 [ 8 ] . Block-wise foreground Intersection over Union (IoU) scores for DeiT-III [ 25 ] , DeiT-Distilled [ 24 ] , and FlexiViT [ 2 ] , comparing reference models (Original) with their Spec 2 R-regularized versions. For each block, we plot the highest foreground IoU score across all attention heads. Spec 2 R improves foreground alignment in deeper blocks, mitigating the decline observed in reference models. Unlike EPG (see Figure 10 ), the best-performing block index remains unchanged across all three architectures.
IN-1K Accuracy
Model
Top-1 ↑
Top-5 ↑
DeiT-III-B/16
83.79
96.59
+ Spec 2 R
83.36
96.48
DeiT-B/16 Distilled
83.39
96.49
+ Spec 2 R
83.27
96.47
FlexiViT-B/16
84.38
96.86
Appendix
Table 4: Classification performance preservation on ImageNet-1K [ 21 ] . Top-1 and Top-5 classification accuracy of DeiT-III [ 25 ] , DeiT-Distilled [ 24 ] , and FlexiViT [ 2 ] before and after Spec 2 R regularization. The highest score for each architecture is highlighted in bold, while the best overall results are additionally underlined.
Perturbation budget ϵ ( ×1/255 )
Model
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
AUC ↑
DeiT-III
Original
83.79
67.1
37.9
17.8
8.4
4.1
1.7
1.1
0.7
0.2
0.1
18.09
+ Spec 2 R
83.36
75.2
59.9
41.5
25.9
16.1
10.8
6.5
4.1
2.4
1.8
28.5
Δ
-0.43
+8.1
+22.0
+23.7
+17.5
+12.0
+9.1
+5.4
+3.4
+2.2
+1.7
+10.4
DeiT-Distilled
Appendix
Table 5: Adversarial robustness under APGD-CE [ 4 ] on ImageNet-1K [ 21 ] . Classification accuracy across increasing attack perturbation budget for DeiT-III [ 25 ] , DeiT-Distilled [ 24 ] , and FlexiViT [ 2 ] , before (Original) and after Spec 2 R regularization. Δ denotes the difference in percentage points. AUC is computed using trapezoidal integration over the evaluated attack perturbation budget ϵ .
Figure 12: Qualitative comparison of final-layer CLS-token attention. CLS-token attention maps averaged across heads on ImageNet-1K [ 21 ] images for six ViT-B16 variants: Spec 2 R[DeiT-III], Spec 2 R[DeiT-Distilled], Spec 2 R[FlexiViT], DeiT-III [ 25 ] , DeiT-Distilled [ 24 ] , FlexiViT [ 2 ] . Despite keeping attention parameters frozen, Spec 2 R largely improves object-alignment of attention maps for all baseline models.
Figure 13: Qualitative comparison of final-layer patch representations. RGB visualizations of the top three principal components of patch tokens on ImageNet-1K [ 21 ] images for six ViT-B16 variants: Spec 2 R[DeiT-III], Spec 2 R[DeiT-Distilled], Spec 2 R[FlexiViT], DeiT-III [ 25 ] , DeiT-Distilled [ 24 ] , FlexiViT [ 2 ] . Spec 2 R removes high-frequency artifacts and improves object alignment of patch representations for all baseline models.
Table 18
MOSE Evaluation Split (301 randomly selected video IDs)
0165667b
01e3cec8
028f6f64
02deca50
03e0f9b8
056e4786
05ed1023
0644075b
06772c9a
0770ad03
08a5c662
0ab68ba2
0be33bc1
0d1fe009
0e05fabe
0f3b1fcb
100edaef
103b3ca8
1106f3a7
110da3cf
111bb373
115da184
12099d59
1251a1c9
1291276c
14655f54
15654ee1
15a7f602
15c41c4b
15e7e4d1
16130bd3
1b6472c1
1b7eada8
1dbca5cc
1eac1aff
1f220f98
1f805416
1fc0e6a8
1feae28e
203733e7
22e8b380
23454d80
23b9a3ea
277ad883
2861dd53
29ff29f6
2f9e704c
305731ed
30e41f1e
31caacec
327cd258
330ac20d
342c0b2a
34a5f964
37af9ac1
38030c69
38568758
3a407bd9
3a6e6ace
3a739934
3afd02d7
3ba93641
3d9a7023
3e5ad020
3f003746
3f313a2f
405e3ee7
4190c83a
423a50e6
43030c4c
43199a98
43c04ad2
Appendix
Table 8: MOSE [ 6 ] evaluation video identifiers. Identifiers of the 301 videos selected from the fully annotated MOSE training split for temporal tracking evaluation. The subset was generated by sorting all video identifiers, shuffling them using Python’s random.Random with seed 42, and selecting the first 301 videos. The same subset is used for all evaluated models.