The Devil is in the Spectrum Bias: Spectrum-Balanced Feature Matching for Robust Representation Distillation
Organizations: OMRON SINIC X Corporation
Abstract
Large visual foundation models have demonstrated remarkable transferability across a wide range of downstream tasks. To deploy such models efficiently, feature matching has become a popular knowledge distillation approach that transfers teacher representations to smaller student models without requiring labeled data. However, we show that the conventional feature matching objective with L2-distance is inherently biased toward reconstructing dominant spectral directions of the teacher representation, while under-optimizing low-variance directions that often contain task-relevant information. To address this, we propose Spectrum-Balanced Feature Matching, SpecMatch, a simple objective that adaptively emphasizes under-optimized spectral directions while preserving the relative importance of dominant directions. SpecMatch is easy to implement and introduces negligible computational overhead. Extensive experiments on image recognition demonstrate that SpecMatch consistently improves downstream adaptation across diverse tasks, including image classification, anomaly detection, medical image analysis, and domain generalization. In particular, SpecMatch outperforms conventional feature matching in 40 of 42 teacher--student and training-setting combinations, while consistently improving over the original student model in all settings. We further demonstrate that the proposed objective generalizes beyond vision, improving downstream performance across six protein understanding tasks.
Figures & tables
| General | OCR | Fine | Remote | Medical | Anomaly | Generalization | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Average | CIFAR100 | CIFAR10 | SVHN | GTSRB | NABirds | CUB | Resisc | Eurosat | OrganCMNIST | Camelyon17 | VisA | MVTec | iWildCam | FmoW | |
| # classes | 100 | 10 | 10 | 43 | 555 | 200 | 45 | 10 | 11 | 2 | 2 | 2 | 186 | 62 | |
| PE-Core-Large PE-Core-Tiny | |||||||||||||||
| Teacher | 86.5 | 93.1 | 99.4 | 73.6 | 93.7 | 87.3 | 90.6 | 96.1 | 97.4 | 82.9 | 90.1 | 81.9 | 96.3 | 79.2 | 50.1 |
| Student | 76.0 | 76.2 | 92.1 | 57.7 | 81.5 | 59.7 | 71.1 | 88.9 | 94.6 | 82.9 | 89.0 | 75.8 | 86.3 | 71.0 | 36.5 |
| Logits-KD ( Hinton et al., 2015 ) | 80.9 | 79.5 | 95.1 | 82.2 | 96.8 | 69.9 | 71.6 | 93.2 | 98.4 | 92.4 | 88.8 | 69.2 | 71.9 | 74.1 | 45.3 |
| Teacher | Student | Params | Initialization | Method | 5-shot | 10-shot | Full-shot |
|---|---|---|---|---|---|---|---|
| PE-Core-G14 | ViT-Tiny | 5.5M | Scratch | DINO | 31.3 | 37.2 | 54.6 |
| FM | 48.4 | 51.6 | 57.6 | ||||
| SpecMatch | 50.2 | 52.7 | 58.4 | ||||
| ConvNEXT-XLarge | ConvNEXT-Tiny | 27.8M | Scratch | DINO | 36.4 | 42.9 | 54.7 |
| FM | 57.6 | 60.6 | 67.1 | ||||
| SpecMatch | 61.2 | 63.9 | 70.0 |
| ImageNet | NAB | CIF100 | SVHN | |
|---|---|---|---|---|
| 1 (FM) | 72.1 | 60.7 | 76.2 | 87.2 |
| 2 | 72.7 | 62.3 | 77.5 | 89.4 |
| 3 | 73.1 | 64.2 | 77.6 | 89.5 |
| 4 | 72.9 | 64.9 | 77.8 | 89.9 |
| 5 | 72.9 | 64.9 | 78.2 | 89.4 |
| Method | ViSA # Anomaly Samples | |||
|---|---|---|---|---|
| 100 | 200 | 500 | 1000 | |
| Teacher | 0.898 | |||
| Student | 0.825 | |||
| FM | 0.835 | 0.851 | 0.863 | 0.880 |
| SpecMatch | 0.851 | 0.867 | 0.873 | 0.896 |
| Fold: 1195 classes | GO-MF: 489 classes | GO-CC: 320 classes | EC: 585 classes | Cat. Eff. : regression | DeepLoc2: 10 classes | |||||||
| Method | Val | Test | Val | Test | Val | Test | Val | Test | Val | Test | Val | Test |
| Teacher (ESM-2 650M) | ||||||||||||
| Student (ESM-2 6M) | ||||||||||||
| L1 | ||||||||||||
| L2 | ||||||||||||
| SpecMatch | ||||||||||||
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Train | Test | # Classes |
|---|---|---|---|
| CIFAR-100 | 50,000 | 10,000 | 100 |
| CIFAR-10 | 50,000 | 10,000 | 10 |
| SVHN | 73,257 | 26,032 | 10 |
| GTSRB | 26,640 | 12,630 | 43 |
| RESISC45 | 18,900 | 6,300 | 45 |
| EuroSAT | 21,600 | 5,400 | 10 |
| Dataset | Task | Classes | Train | Val | Test | Epochs |
|---|---|---|---|---|---|---|
| Fold prediction | classification | 1195 | 13034 | 1628 | 1630 | 20 |
| GO molecular function | multi labels classification | 489 | 22291 | 2785 | 2787 | 20 |
| GO cellular component | multi labels classification | 320 | 11196 | 1398 | 1400 | 20 |
| Enzyme commission number | multi labels classification | 585 | 12928 | 1615 | 1616 | 60 |
| Enzyme catalytic efficiency | regression | - | 10363 | 1290 | 1298 | 60 |
| DeepLoc2Multi | multi labels classification | 10 | 21949 | 2743 | 2744 | 50 |
| Role | Model | Source | Pre-training | Input | Params. |
| Teacher | DINOv2 ViT-g/14 | DINOv2 | DINOv2 | 518 | 1.1B |
| PE-Core-G14-448 | Meta PE | Perception Encoder | 448 | 1.9B | |
| CLIP ConvNeXt-XXLarge | OpenCLIP | LAION-2B | 256 | 846.5M | |
| Student | MobileNetV3-Small | timm | IN-1K | 224 | 1.5M |
| PE-Core-T16-384 | Meta PE | Perception Encoder | 384 | 10M | |
| ConvNeXt-Tiny | timm | Scratch | 224 | 27.8M |
| Method | CIFAR100 | CIFAR10 | SVHN | GTSRB | NABirds | CUB | RESISC | EuroSAT | OrganCMNIST | Camelyon17 | iWildCam | FMoW |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Supervised FT | 76.5 | 93.8 | 95.2 | 95.4 | 50.1 | 55.8 | 93.0 | 98.4 | 93.4 | 90.1 | 58.5 | 41.0 |
| SpecMatch ( : PE-Core) | 77.6 | 95.2 | 89.5 | 94.6 | 64.2 | 72.5 | 93.6 | 98.2 | 90.7 | 93.9 | 62.4 | 42.1 |
| +1.1 | +1.5 | -5.7 | -0.8 | +14.1 | +16.7 | +0.6 | -0.2 | -2.7 | +3.8 | +3.9 | +1.1 | |
| SpecMatch ( : DINOv2) | 78.1 | 95.5 | 82.3 | 88.1 | 56.8 | 69.0 | 92.8 | 98.0 | 91.0 | 93.4 | 61.1 | 39.5 |
| +1.6 | +1.8 | -12.9 | -7.3 | +6.7 | +13.2 | -0.2 | -0.4 | -2.4 | +3.3 | +2.6 | -1.5 |
| Method | Oxford | Paris | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Easy | Medium | Hard | Easy | Medium | Hard | |||||||||||||
| mAP | P@1 | P@10 | mAP | P@1 | P@10 | mAP | P@1 | P@10 | mAP | P@1 | P@10 | mAP | P@1 | P@10 | mAP | P@1 | P@10 | |
| ConvNEXT-XXlarge ConvNEXT-Tiny | ||||||||||||||||||
| DINO | 21.9 | 41.2 | 27.7 | 15.0 | 45.7 | 27.3 | 3.4 | 17.1 | 5.3 | 64.8 | 95.7 | 87.7 | 49.9 | 97.1 | 91.3 | 24.7 | 68.6 | 56.0 |
| FM | 17.6 | 29.4 | 20.9 | 13.8 | 30.0 | 18.7 | 3.7 | 10.0 | 7.0 | 53.4 | 87.1 | 81.0 | 40.5 | 88.6 | 82.7 | 17.4 | 54.3 | 41.6 |
| SpecMatch | 19.7 | 30.9 | 22.4 | 15.7 | 38.6 | 22.3 | 4.9 | 18.6 | 8.6 | 55.5 | 87.1 | 81.6 | 43.7 | 88.6 | 84.4 | 21.5 | 67.1 | 49.9 |
| Method | CIFAR-10 | SVHN | NABirds | CUB | RESISC | ImageNet |
|---|---|---|---|---|---|---|
| FM | 94.8 | 87.6 | 62.6 | 71.3 | 92.6 | 72.1 |
| Static | 95.0 | 88.3 | 63.7 | 71.7 | 93.6 | 73.2 |
| Dynamic | 95.2 | 89.5 | 64.2 | 72.5 | 93.6 | 73.1 |