Beyond Prototype: Meta-Promptable Mahalanobis Matching for Cross-Domain Few-Shot Learning
Abstract
Cross-domain few-shot learning (CD-FSL) aims to transfer knowledge from a label-rich source domain to novel target domains with only a few labeled examples. Across segmentation, classification, and detection, most existing methods still rely on prototype matching, where each class is represented by a single vector and queries are assigned by Euclidean or cosine distance. This paradigm implicitly treats class-conditional features as isotropic, an assumption that is often violated under severe domain shift: target-domain features commonly exhibit anisotropic covariance structures, large intra-class variation, and class-dependent uncertainty. As a result, nearest-prototype decision rules can produce poorly calibrated boundaries and limited cross-domain generalization. We propose a meta-promptable Mahalanobis matching framework that replaces isotropic prototypes with prompt-conditioned anisotropic Gaussian class models. Given a few support examples and class-specific instructions, large foundation models generate semantic prompts that summarize category concepts, domain context, and variation cues. Conditioned on these prompts and support features, an episodically trained meta-learner estimates class-wise means and covariance matrices, using a low-rank-plus-diagonal factorization to remain stable in the few-shot regime. Query assignment is then performed by Mahalanobis distance, enabling task-adaptive matching that accounts for both feature location and direction-dependent uncertainty. Theoretically, we show that the resulting hypothesis space strictly contains prototype matching as a special case and yields lower Bayes risk when target features are anisotropic. Empirically, our framework achieves consistent state-of-the-art performance on fourteen cross-domain few-shot benchmarks, including four segmentation datasets, four classification datasets, and six detection datasets, demonstrating that distribution-aware matching provides a unified and effective alternative to prototype-based CD-FSL. Code will be made publicly available.
Then back it, or bet against it.
Related papers
Open the market on this paper to see 7 more related papers.