All Centers Are at most a Few Tokens Apart: Knowledge Distillation with Domain Invariant Prompt Tuning

Amir Mohammad Ezzati, Alireza Malekhosseini, Armin Khosravi, Mohammad Hossein Rohban
11/27/2025
cs.CVcs.AI

No official code found. Best implementation: amirezzati/dipt (0 stars, last commit 2025-11-27).

Abstract

Domain generalization is critical in computational pathology (CPath) due to inherent domain shifts caused by variations in staining protocols, scanner devices, and imaging settings across clinical centers. Vision-language models (VLMs), such as PLIP-a pathology-tuned CLIP-trained on image-text pairs across diverse domains, serve as strong knowledge distillation sources. However, their zero-shot performance with predefined prompts remains limited due to sensitivity to prompt variations. Moreover, unlike natural images, histopathology centers lack semantic descriptors (e.g., 'sketch'), making it difficult to define domain-specific prompts for clinical centers. This requires a data-driven approach for learning domain-specific and ultimately class-generic continuous prompts. We propose Domain Invariant Prompt Tuning (DIPT) for knowledge distillation process, a novel step that learns multiple input tokens for each domain. These tokens are trained separately for each domain and are averaged across domains, leading to domain-invariant prompts. Our student model then distills knowledge from PLIP's text encoder by leveraging the prompts learned by DIPT. This leads to alignment of visual features with domain-invariant embeddings, enhancing generalization by training on multiple domains. Our method adds a significant improvement in average F1-score to existing state-of-the-art (SOTA) knowledge distillation approaches in domain generalization with histopathology datasets. This work helps the way of deploying robust CPath models in real-world clinical problems with heterogeneous data sources.

View on arXivView PDF

Code Implementations(1)

amirezzati/diptCommunity74%

All Centers Are at most a Few Tokens Apart: Knowledge Distillation with Domain Invariant Prompt Tuning

00Shell, PythonFeb 28, 202510 months ago
domain-generalizationprompt-tuning

Similar Papers

Cite this paper

@article{ezzati2025centers,
  title  = {All Centers Are at most a Few Tokens Apart: Knowledge Distillation with Domain Invariant Prompt Tuning},
  author = {Amir Mohammad Ezzati and Alireza Malekhosseini and Armin Khosravi and Mohammad Hossein Rohban},
  year   = {2025},
  eprint = {2511.22739},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2511.22739v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2511.22739.svg)](https://codeofpaper.com/paper/2511.22739)

Discussion