[Paper Review] Generalizable Knowledge Distillation from Vision Foundation Models for Semantic Segmentation
GKD decouples representation learning from task learning and uses a query-based soft distillation to transfer the generalization of vision foundation models to lightweight segmentation models, achieving cross-domain gains.
Knowledge distillation (KD) has been widely applied in semantic segmentation to compress large models, but conventional approaches primarily preserve in-domain accuracy while neglecting out-of-domain generalization, which is essential under distribution shifts. This limitation becomes more severe with the emergence of vision foundation models (VFMs): although VFMs exhibit strong robustness on unseen data, distilling them with conventional KD often compromises this ability. We propose Generalizable Knowledge Distillation (GKD), a multi-stage framework that explicitly enhances generalization. GKD decouples representation learning from task learning. In the first stage, the student acquires domain-agnostic representations through selective feature distillation, and in the second stage, these representations are frozen for task adaptation, thereby mitigating overfitting to visible domains. To further support transfer, we introduce a query-based soft distillation mechanism, where student features act as queries to teacher representations to selectively retrieve transferable spatial knowledge from VFMs. Extensive experiments on five domain generalization benchmarks demonstrate that GKD consistently outperforms existing KD methods, achieving average gains of +1.9% in foundation-to-foundation (F2F) and +10.6% in foundation-to-local (F2L) distillation. The code will be available at https://github.com/Younger-hua/GKD.
Motivation & Objective
- Motivate and diagnose the generalization bottleneck of conventional KD in semantic segmentation under distribution shifts.
- Propose a two-stage, domain-generalizable distillation framework (GKD) that separates representation learning from task learning.
- Introduce a query-based soft distillation mechanism to selectively transfer transferable spatial knowledge from VFMs.
- Validate GKD on multiple domain generalization benchmarks under F2F and F2L settings and show state-of-the-art generalization gains.
Proposed method
- Two-stage distillation: first learn task-agnostic, domain-agnostic representations from vision foundation models (VFMs) using a proxy dataset, then freeze the encoder and train the task-specific decoder on source data.
- Domain-general distillation uses a proxy dataset (ImageNet) for task-agnostic transfer and then source-domain distillation to incorporate domain-relevant features.
- Query-based Soft Distillation (QSD) reconstructs student features via attention over teacher features using a learned projection to align spatial relations.
- QSD combines feature, mask, and CLS token distillation losses into L_QSD = α L_feat + β L_mask + γ L_cls.
- During task learning, only the decoder is trained on labeled data while the encoder is frozen to preserve general representations.
- Ablation and visualization show that multi-stage distillation with QSD yields better cross-domain alignment than single-stage KD.
Experimental results
Research questions
- RQ1Does conventional single-stage KD transfer improve cross-domain generalization of segmentation models distilling from VFMs?
- RQ2Can decoupling representation learning from task learning improve out-of-domain generalization in KD for semantic segmentation?
- RQ3Does a query-based soft distillation mechanism effectively transfer spatial and relational knowledge from VFMs to lightweight students?
- RQ4What are the cross-domain performance gains of GKD under F2F and F2L settings across diverse benchmarks?
- RQ5How does GKD perform with limited labeled data compared to traditional KD?
Key findings
- GKD consistently outperforms existing KD methods on five domain generalization benchmarks under both F2F and F2L settings.
- Average gains are +1.9% in foundation-to-foundation (F2F) and +10.6% in foundation-to-local (F2L) distillation.
- In label-scarce F2L settings, GKD substantially improves label efficiency and cross-domain generalization.
- GKD achieves substantial improvements when transferring from DINOv2-B to ViT-S (and other VFMs), and shows transferability to other VFMs like EVA02.
- Two-stage distillation with QSD yields smoother optimization and better cross-domain performance than one-stage KD.
- Visualization indicates closer feature distances and diagonal attention patterns, reflecting preserved spatial structure and selective knowledge transfer.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.