Manuscript Offprint
arXiv:2610.28856Depth-guided Geometric Adaptation for Few-shot Image Classification
Abstract
Few-shot image classification (FSIC) frequently suffers from visual ambiguity, where background clutter and RGB appearance similarities hinder discriminative feature matching in data-scarce settings. To mitigate this, we propose DAFIC, a geometry-guided framework that incorporates monocular depth into representation learning, episodic adaptation, and dense support-query matching. DAFIC first learns geometry-aware token representations through RGB-D self-supervised pre-training. Subsequently, the Depth-guided Geometric Adaptation (DGA) module uses depth-derived geometry to refine patch representations with geometry-enriched class context while suppressing background interference. Spatial Bidirectional Patch Matching (SBiM) then performs bidirectional dense matching on the refined features, reducing sensitivity to spurious correspondences and background clutter. Extensive experiments on four benchmarks show that DAFIC achieves strong performance against existing methods, with ablation and robustness analyses supporting the effectiveness of coupling geometry-conditioned episodic adaptation with bidirectional matching for few-shot visual recognition. Code is available at DAFIC.
1. Introduction
Few-Shot Learning (FSL) aims to achieve human-like generalization from limited examples. Within this paradigm, Few-Shot Image Classification (FSIC) needs to recognize novel classes during inference that are disjoint from those seen during training, given only one or a few labeled samples per class [34, 60]. A critical challenge in this setting is that images in real-world scenarios and common benchmarks (e.g., ImageNet [51]) often contain multiple entities but are assigned a single image-level label. Conventional large-scale models mitigate this by relying on abundant training data to implicitly learn to isolate class-relevant entities [20, 23]. However, this strategy often fails in FSIC, where extreme data scarcity prevents the model from inherently suppressing background clutter and ambiguity.

Figure 1. Patch-to-class similarity maps on a MiniImageNet [57] example. In comparison, DAFIC leverages estimated depth priors to produce more target-focused similarities and suppress responses to background distractors (e.g., leaves/branch/fence).
Motivated by this challenge, many recent metric-based FSIC approaches [10, 11, 13, 20, 23, 25] have shifted from image-level to patch-level representations. This transition facilitates fine-grained local comparisons across images. While pioneering works refine patch embeddings to highlight class-discriminative regions via online optimization [23], global context adaptation [10, 20, 25], or masked knowledge distillation [36], they share a common limitation: they primarily rely on RGB appearances (e.g., texture, color, and illumination), without explicit geometric cues (see Fig. 1). This reliance leads to three major issues in cluttered scenes: (1) appearance shifts create false similarities between target entities and background distractors; (2) lacking geometric constraints, feature aggregation becomes noisy as it mixes salient object regions with surrounding clutter; and (3) the model struggles to align local patch features with global semantic context. Crucially, these effects are further amplified in episodic FSIC, resulting in class-inconsistent matching.
Furthermore, even with well-refined patch embeddings, establishing reliable image-to-class matching remains challenging. Existing methods typically employ either global spatial aggregation [20, 23, 36], which discards critical patch-to-patch local correspondence, or flattening dense similarity matrices into fixed parametric heads (e.g., linear layers or MLPs) [10, 20, 25], which destroys the 2D layout. While non-parametric dense matching offers an in-tuitive alternative, it faces practical challenges in cluttered scenes. Relying solely on unidirectional matching (e.g., query-to-support) [33] can lead to redundant assignments, where multiple query patches repeatedly match to the most salient support patch, ignoring the overall object structure. In contrast, symmetric bidirectional matching encourages better coverage and structural consistency, but it can be sensitive to unaligned background clutter; when background patches fail to find meaningful matches, they often suppress the overall image similarity score.
In this paper, we present DAFIC, a framework that addresses these challenges by systematically incorporating monocular geometry into few-shot image classification. Our core insight is that monocular depth can be exploited as a geometric prior through learnable adaptation, reducing patch-level semantic ambiguity and improving support-query correspondence under background clutter. Specifically, DAFIC first employs an RGB-D self-supervised pre-training scheme to learn geometry-aware token embeddings. We then introduce the Depth-guided Geometric Adaptation (DGA) module, which transforms depth maps into geometry-salient patch attention and further aligns patch representations with a geometry-enriched class embedding. Importantly, DGA encourages geometry-salient patches to preserve fine-grained local cues while injecting geometry-enriched class-level context, and steers low-attention (often background) regions toward more consistent global descriptors. Building on these refined embeddings, we adopt a non-parametric Spatial Bidirectional Patch Matching (SBiM) classifier to perform bidirectional dense patch matching, improving correspondence coverage and reducing sensitivity to spurious matches. Extensive experiments on four benchmarks demonstrate that DAFIC achieves strong performance against existing methods, with ablations and robustness analyses validating the designs.
2.1. Few-shot Image Classification
Few-shot Image Classification (FSIC) aims to recognize novel query samples given only a few support samples. Existing FSIC approaches broadly fall into three paradigms: optimization-based methods [2, 17, 41, 42, 52, 77] that meta-learn an initialization and an update rule for rapid adaptation, transfer learning-based methods [5, 37, 40, 47, 74] that rely on powerful base-class pre-training followed by fine-tuning (or adaptation) on novel classes, and metric-based methods [32, 33, 53, 57, 70]. Among these, metric-based learning has emerged as an intuitive and effective solution by comparing query and support samples in a high-dimensional representation space. Recent metric-based frameworks have achieved noticeable success by integrating the powerful pre-training and episodic meta-learning strategies from the other two paradigms [9, 13, 24, 63, 65, 68, 70].
Building upon these, the focus of metric-based FSIC has increasingly shifted from image-level representations towards leveraging Vision Transformers (ViTs) [15] to establish fine-grained, patch-level correspondences [10, 11, 13, 20, 23, 25, 36]. These approaches typically employ advanced pre-training paradigms followed by various feature adaptation strategies to emphasize semantically relevant regions. For instance, FewTURE [23] determines patch importance via online optimization to re-weight correspondences. SMKD [36] employs supervised masked knowledge distillation to force patch embeddings to capture discriminative local semantics. Another line of work explicitly exploits class-aware embeddings: CPEA [20] uniformly broadcasts a global class embedding to all patches, while CPES [25] specifically selects a subset (e.g., top-k) of class-aware patch features. More recently, attention-driven filtering mechanisms have been explored, such as SAFF [10], which iteratively updates attention via slot-attention, and SPFF [11], which employs multinomial sampling to perform stochastic patch filtering.
Despite these advances in refining patch representations, a common limitation is that they primarily rely on 2D RGB appearance and a lack of explicit depth-derived geometric guidance. This makes them vulnerable to appearance shifts and background clutter. In comparison, DAFIC introduces monocular depth priors to learn geometry-salient patch embeddings and suppress distractors. Beyond feature refinement, prior FSIC methods explore different dense patch-matching methods, such as nearest-neighbor aggregation [33], optimal transport distance [70], and cross-attention mechanisms [13]. We adopt a lightweight symmetric patch-matching strategy, inspired by set matching [12, 21] and few-shot action recognition [58, 59], where geometry-aware representation and adaptation complement dense matching to improve robustness in cluttered scenes.
2.2. Geometric Priors and Depth Estimation
Depth for Scene Understanding. Depth serves as a critical bridge between 2D RGB appearances and the 3D scene geometry. This has motivated the rapid evolution of RGB-D architectures in general vision tasks, ranging from dual-branch networks to unified frameworks [61, 69, 72]. These models increasingly integrate depth priors into core components (e.g., self-attention mechanisms) to enhance geometry-enriched representation learning. Furthermore, recent breakthroughs in zero-shot monocular depth estimation (MDE), such as generative-based Marigold [27] and discriminative-based Depth Anything [66, 67], have made monocular depth a practical source of geometric cues. In particular, Depth Anything V2 leverages large-scale data (real and synthetic) to enable direct depth regression with strong open-world generalization, providing a practical source of geometric cues for downstream tasks.
Geometric Cues in FSIC. Despite its success in general vision, the potential of depth in FSIC remains relatively underexplored. Currently, a line of approaches rely on prompt-engineered language priors with Vision-Language Models (VLMs) [35, 38, 71] or frequency-domain cues [6, 9, 75]. However, these methods present their limitations: language priors often depend heavily on massive pre-trained backbones and intricate prompt engineering, while frequency cues discard spatial structure due to frequency-domain processing and can be sensitive to texture shifts. In a related setting, while prior work [18] explored depth for few-shot video recognition, it utilized depth as a parallel encoding stream with extra computational overhead.
In contrast, we propose a vision-based and structure-aware approach that prioritizes spatial geometric understanding over high-level semantic or frequency-based cues. This shift to depth priors offers two pivotal advantages for FSIC: (1) depth provides an annotation-free, relatively stable signal that captures explicit structural layouts (e.g., boundaries, layering, and occlusion), which can help alleviate RGB appearance ambiguity; and (2) these geometric cues can serve as an initial spatial prior, which can be optimized via episodic training to generate geometry-salient attention for isolating target entities. Therefore, our proposed DAFIC explicitly augments episodic learning with these geometric structures to obtain target-entity salient representations for few-shot similarity measurement, providing an effective alternative to existing paradigms.
3. Method
We begin by formulating the FSIC problem. We then introduce DAFIC, which consists of three components: (1) an RGB-D self-supervised pre-training scheme for geometry-aware token embeddings; (2) a Depth-guided Geometric Adaptation (DGA) module that converts depth priors into geometry-salient patch attention and injects a geometry-enriched class embedding, enriching salient patches with class-level context while steering low-attention (often background) patches toward more consistent global descriptors; and (3) a Spatial Bidirectional Patch Matching (SBiM) classifier for non-parametric bidirectional dense matching. In addition, we introduce an auxiliary global supervision signal via spatial average pooling over the refined patch embeddings. During episodic training, the local and global objectives are jointly optimized for few-shot classification.
Problem Formulation. Few-shot image classification aims to generalize well to novel classes with only a few labeled image samples. The FSIC setting commonly consists of two parts: a base set for training and a novel set for few-shot testing, where denotes the image and represents the label. Notably, their label spaces are strictly disjoint, i.e., . During the meta-testing phase, a support set is randomly sampled from , containing classes with labeled samples per class. The few-shot model is then required to correctly classify images from a query set into one of the support classes, where is the number of query samples per class. This evaluation protocol is referred to as an -way -shot classification task.
3.1. Self-supervised Pre-training with Depth Cues
Inspired by recent advances in self-supervised Vision Transformer training [4, 76], we adopt the teacher–student self-distillation pre-training framework with Masked Image Modeling (MIM) [1, 76] as the pretext task. This paradigm effectively alleviates the risk of supervision collapse and has been shown to be beneficial in recent FSIC studies [10, 20, 23, 36]. Building on this, we extend this pre-training framework with depth-aided cues.
Distinct from standard RGB pre-training, we augment the input image with a pixel-wise depth map , estimated via a zero-shot monocular estimator . The RGB and depth channels are individually normalized and concatenated to form the 4-channel input . To preserve geometric consistency, we implement a split augmentation strategy: spatial transformations (e.g., random crop, flip) are applied to both RGB and depth channels, whereas appearance transformations (e.g., color jitter) are applied exclusively to the RGB channels. This helps keep the structural depth cues consistent.
During pre-training, the student network is trained to align with the teacher's class-token predictions to capture global semantic consistency ( ), while simultaneously predicting masked patch representations by minimizing the divergence from the teacher's predictions computed on unmasked tokens ( ). Importantly, unlike standard MIM which can be biased toward appearance cues, predicting patch representations with depth information encourages the network to infer spatial layouts and object boundaries. Moreover, this structural understanding extends to the global level: via the self-attention mechanism, the [CLS] token integrates these geometric priors, thereby becoming a more geometry-aware global representation. The total objective aggregates this class-level self-distillation and the geometry-aware patch-level MIM loss:
where both terms minimize the cross-entropy between the student's and teacher's predictions. Optimizing this joint objective encourages the model to capture occlusion- and layout-related cues, potentially reducing visual ambiguity in downstream few-shot tasks.

Figure 2. Overview of our proposed DAFIC framework. The depth estimator first predicts a pixel-wise aligned depth map, which is concatenated with the RGB image to form an RGB-D input. The RGB-D pre-trained ViT backbone then extracts token embeddings, where the CLS token encodes geometry-enriched global semantic context. Next, the Depth-guided Geometric Adaptation (DGA) module refines the patch embeddings: Depth-guided Attention (DA) converts depth priors into geometry-salient patch attention (scaled by ); Geometry-aware Adaptation (GA) then integrates the enriched CLS (class) embedding (scaled by ). Finally, based on the refined patch embeddings, the non-parametric SBiM classifier performs query-to-support bidirectional dense matching, together with an auxiliary global similarity objective, for reliable FSIC.
3.2. Few-shot Learning with DGA Module
As shown in Fig. 2, given the input , the RGB-D pre-trained ViT backbone with projection head produces a d-dimensional token embedding sequence :
where is the geometry-enriched class embedding and denote the patch embeddings. However, raw patch embeddings often remain misaligned with global semantics and lack explicit guidance to separate target entities from background clutter. Therefore, we propose our depth-guided geometric adaptation module to address this via two sub-components: (1) depth-guided attention (DA) that transforms depth priors into geometry-salient patch attention, and (2) geometry-aware adaptation (GA) that integrates the geometry-enriched class embedding into the attention-modulated features to guide semantic alignment, thereby selectively enhancing the class relevance of geometry-salient patches for more reliable alignment.
Depth-guided attention. First, the depth map is processed using min-max normalization to mitigate absolute scale variations across scenes while preserving relative geometric structure. Then, the normalized depth map is encoded by a lightweight two-layer convolutional neural network (CNN) module , which is optimized by episodic training. To accommodate the diverse depth distributions, we employ SiLU activations [16] and Instance Normalization [56] in each layer, followed by a convolutional projection head. The resulting spatial feature map is then flattened to align with the sequence length of the ViT tokens, generating the geometry-salient patch attention scores :
which are then normalized via a patch-wise softmax operation to obtain the attention weights :
Next, each patch embedding is modulated by its corresponding attention weight and scaled by a learnable attention-strength parameter to obtain the geometry-salient patch embedding :
where . Here, acts as a gating mechanism to control the overall strength of the depth priors under the normalized softmax weighting. As a result, this modulation encourages emphasizing depth-inspired salient regions while suppressing the influence of background distractors.
Geometry-aware adaptation. To further align the local patches with the global semantics, we employ a global-to-local broadcasting mechanism. However, unlike prior methods [20, 25] that uniformly adapt all raw features, our method emphasizes geometry-salient patches via attention-modulated features from the preceding DA module. Moreover, unlike standard RGB models, our [CLS] token is derived from RGB-D MIM pre-training, serving as a geometry-enriched class embedding that encodes rich geometric cues. Consequently, this geometry-enriched global context is adapted to each geometry-salient patch embedding via:
where controls the magnitude of adaptation. Importantly, combined with the DA component, this operation improves local-to-global consistency: it encourages salient patches to preserve fine-grained local cues while injecting geometry-enriched class-level context, and steers low-attention (often background) patches toward a more consistent global representation dominated by . Finally, our DGA module produces refined patch embeddings for subsequent dense matching.
3.3. Few-shot Classification via Bidirectional Patch Matching
The next challenge is to establish reliable dense comparisons between images. Unlike previous methods that flatten the spatial dimensions of features and map them through fixed parametric heads (e.g., linear layers or MLPs) for similarity measurement [10, 20, 25], we adopt a nonparametric, symmetric patch-matching strategy, which retains patch-level correspondence without flattening patchwise relations and achieves effective matching by leveraging the geometry-salient and class-aware patch embeddings .
Let denote the refined feature representation of the -th query image. For an -way -shot task, rather than naively averaging the support features spatially, which inevitably discards fine-grained local correspondence [10, 20, 25], we construct a dense support patch super-set by aggregating all refined support patches belonging to class . Then, we compute the dense patch-to-patch cosine similarity matrix :
where and denote the -th query patch and the -th support patch in the support patch super-set, respectively.
To achieve reliable local matching in the few-shot scenario, we adopt a Spatial Bidirectional Patch Matching (SBiM) classifier. Specifically, we measure the bidirectional correspondence by computing the Query-to-Support and Support-to-Query similarities. For the forward matching, each query patch seeks its nearest neighbor (maximum similarity) in the entire support patch superset, followed by a spatial average over all n query patches:
Symmetrically, backward matching ensures that every support patch finds its most relevant counterpart in the query image, averaged over the support patches:
The final robust relation score between the q-th query and the c-th class is obtained by fusing the bidirectional matching scores:
By symmetrizing the matching scores (Eqs. 8 and 9), SBiM captures complementary patch-coverage information and helps mitigate spurious correspondences arising from one-way matching. More importantly, building on the frontend DGA module that highlights salient, class-aware entities and steers distractors toward more consistent global descriptors via geometric priors, SBiM further alleviates many-to-one matching issues. With Eq. 6, low-attention patches (small ) yield embeddings dominated by the global component . Since cosine similarity is scale-invariant, dense matching becomes less sensitive to feature magnitudes, making these contributions more consistent and less prone to clutter-induced spurious matches.
We further leverage the refined representations to introduce an auxiliary global loss, providing holistic image-level supervision. Specifically, we apply spatial average pooling over to derive -normalized global embeddings for the queries and global prototypes for the support classes. Then a global similarity score is calculated as:
Finally, all trainable DAFIC components are jointly optimized via episodic training. The overall objective jointly minimizes the local cross-entropy loss (derived from ) and the global cross-entropy loss (derived from ):
where and control the contribution of the local and global objectives. During inference, we use for prediction, and serves as an auxiliary training signal.
Table 1. Results (%) on MiniImageNet and TieredImageNet. The shows confidence intervals. The best and second-best results are shown in bold and underlined. A more comprehensive version of the table is shown in the supplementary materials.
| Method | Backbone | ≈ Params | MiniImageNet | TieredImageNet | ||
|---|---|---|---|---|---|---|
| 5-way 1-shot | 5-way 5-shot | 5-way 1-shot | 5-way 5-shot | |||
| ProtoNet [53] | ResNet-12 | 12.4M | 62.29±0.33 | 79.46±0.48 | 68.25±0.23 | 84.01±0.56 |
| CAN [24] | ResNet-12 | 12.4M | 63.85±0.48 | 79.44±0.34 | 69.89±0.51 | 84.23±0.37 |
| FEAT [68] | ResNet-12 | 12.4M | 66.78±0.20 | 82.05±0.14 | 70.80±0.23 | 84.79±0.16 |
| RENet [26] | ResNet-12 | 12.4M | 67.60±0.44 | 82.58±0.30 | 71.61±0.51 | 85.28±0.35 |
| SUN [14] | ViT | 12.5M | 67.80±0.45 | 83.25±0.30 | 72.99±0.50 | 86.74±0.33 |
| FewTURE [23] | Swin-T | 29M | 72.40±0.78 | 86.38±0.49 | 76.32±0.87 | 89.96±0.55 |
| CPEA [20] | ViT-S | 22M | 71.97±0.65 | 87.06±0.38 | 76.93±0.70 | 90.12±0.45 |
| SMKD [36] | ViT-S | 22M | 74.28±0.18 | 88.82±0.09 | 78.83±0.20 | 91.02±0.12 |
| SAFF [10] | ViT-S | 22M | 71.51±0.63 | 87.19±0.36 | 74.73±0.74 | 88.97±0.43 |
| DAFIC (Ours) | ViT-S | 22M | 77.71±0.44 | 90.35±0.51 | 80.10±0.40 | 91.05±0.51 |
Table 2. Results (%) on CIFAR-FS and FC100.
| Method | Backbone | ≈ Params | CIFAR-FS | FC100 | ||
|---|---|---|---|---|---|---|
| 5-way 1-shot | 5-way 5-shot | 5-way 1-shot | 5-way 5-shot | |||
| ProtoNet [53] | ResNet-12 | 12.4M | 72.20±0.70 | 83.50±0.50 | 41.54±0.76 | 57.08±0.76 |
| RFS [55] | ResNet-12 | 12.4M | 71.50±0.80 | 86.00±0.50 | 42.60±0.70 | 59.10±0.60 |
| SUN [14] | ViT | 12.5M | 78.37±0.46 | 88.84±0.32 | - | - |
| FewTURE [23] | Swin-T | 29M | 77.76±0.81 | 88.90±0.59 | 47.68±0.78 | 63.81±0.75 |
| CPEA [20] | ViT-S | 22M | 77.82±0.66 | 88.98±0.45 | 47.24±0.58 | 65.02±0.60 |
| SMKD [36] | ViT-S | 22M | 80.08±0.18 | 90.63±0.13 | 50.38±0.16 | 68.37±0.16 |
| SAFF [10] | ViT-S | 22M | 78.48±0.67 | 90.30±0.41 | 47.17±0.59 | 66.00±0.57 |
| DAFIC (Ours) | ViT-S | 22M | 84.30±0.44 | 92.53±0.29 | 50.52±0.46 | 69.42±0.44 |
4. Experiments
We first detail the experimental settings and then compare our method with state-of-the-art approaches. Finally, we ablate the key components of our DAFIC framework to validate its effectiveness in the FSIC scenario.
4.1. Experimental Settings
Datasets. We conduct extensive experiments on four popular FSIC benchmarks: MiniImageNet [57], TieredImageNet [48], CIFAR-FS [2], and FC100 [44]. We strictly follow the class splits of previous works [10, 20, 23, 25, 36] for training, validation, and testing: 64/16/20 for both MiniImageNet and CIFAR-FS, 351/97/160 for TieredImageNet, and 60/20/20 for FC100.
Depth Map Generation. We use the DepthAnything V2-base [67] as an off-the-shelf estimator to generate monocular depth maps via a single feed-forward inference pass. Since the benchmark image set is fixed, we precompute and cache depth maps for all images to avoid redundant computation during episodic training and evaluation. These depth maps serve as a task-agnostic geometric prior for DAFIC.
Backbone and Pre-training Setup. Following prior FSIC works [10, 20, 23], we adopt ViT-S/16 [15] as the back- bone, with inputs and 384-dimensional token embeddings. Our RGB-D pre-training generally converges faster and improves downstream few-shot classification performance over RGB-only pre-training [20, 23]. For pre-training, we use three NVIDIA A100-40GB GPUs, batch size 384, and 1,000 epochs, compared with four GPUs, batch size 512, and 1,600 epochs used by RGB-only counterparts [20, 23]. Detailed configurations and pre-training comparisons are provided in the supplementary materials.
Training and Implementation Details. Following the learning paradigm of most recent FSIC works [10, 20, 23, 36, 68], our training consists of two stages: we first pre-train the ViT-S/16 backbone from scratch using in Eq. (1), and then fine-tune the entire framework with episodic learning using in Eq. (12). Importantly, all learnable components of DAFIC in both stages are optimized exclusively on the meta-train split. For the second-stage FSL optimization, we adopt the Adam optimizer [28] with an initial learning rate of 0.001, which is halved every 1,000 episodes. The backbone is updated with a learning rate of and a weight decay of 0.01 over 10,000 training episodes. We set , initialize the learnable to 5.0 to provide sufficient early gate strength, and empirically set the fixed weights and .

Figure 3. Comparison of patch-to-class semantic alignment between baseline and DAFIC. The "Baseline" and "DAFIC" columns visualize the alignment after adaptation, where red indicates higher class relevance and blue indicates lower relevance.
Table 3. Controlled comparison of the reproduced CPEA baseline and DAFIC on four FSIC benchmarks. CPEA(DGA) and CPEA(DGA+SBiM) progressively incorporate DGA and SBiM into the baseline. Results are mean accuracy (%) over 1,000 meta-test episodes; ± denotes 95% confidence intervals.
| Dataset | Shot | CPEA | CPEA(DGA) | CPEA(DGA+SBiM) | DAFIC |
|---|---|---|---|---|---|
| MiniImageNet[57] | 1 | 72.25±0.65 | 73.26±0.60 | 74.02±0.46 | 77.71±0.44 |
| 5 | 87.24±0.38 | 87.82±0.33 | 88.12±0.27 | 90.35±0.51 | |
| TieredImageNet[48] | 1 | 77.12±0.70 | 78.30±0.70 | 78.86±0.51 | 80.10±0.40 |
| 5 | 90.12±0.45 | 90.65±0.41 | 90.61±0.32 | 91.05±0.51 | |
| CIFAR-FS[2] | 1 | 78.27±0.66 | 78.66±0.60 | 79.05±0.47 | 84.30±0.44 |
| 5 | 89.30±0.45 | 89.92±0.41 | 89.99±0.33 | 92.53±0.29 | |
| FC100[44] | 1 | 46.51±0.58 | 47.62±0.60 | 49.31±0.46 | 50.52±0.46 |
| 5 | 65.18±0.60 | 66.54±0.59 | 67.07±0.42 | 69.42±0.44 |
Evaluation Protocol. The performance evaluation follows the standard 5-way 1-shot and 5-shot FSIC protocols. We report mean accuracy across 1,000 random episodes (15 queries per class).
4.2. Comparison results
Tab. 1 and Tab. 2 compare DAFIC with recent state-of-the-art methods under 5-way 1-shot and 5-shot settings on four benchmark datasets. DAFIC achieves strong performance, especially in the data-scarce 1-shot setting. Compared with the CPEA baseline [20], DAFIC improves accuracy by +5.74% on MiniImageNet (77.71% vs. 71.97%) and +6.48% on CIFAR-FS (84.30% vs. 77.82%), showing the benefit of introducing geometric priors beyond RGB-only representations. DAFIC also outperforms the strongest recent competitor, SMKD [36], by +3.43%/+4.22% in the 1-shot setting and +1.53%/+1.90% in the 5-shot setting on MiniImageNet/CIFAR-FS.
Qualitatively, Fig. 3 visualizes the patch-to-class semantic alignment of our method against the baseline [20]. More visualizations are provided in the supplementary materials. DAFIC demonstrates advantages in localizing class-relevant regions while suppressing background noise. No- tably, even without any few-shot adaptation, the raw patch embeddings extracted directly from our RGB-D pre-trained backbone exhibit a stronger class-aware focus than the baseline. Building upon this strong initialization, the complete DAFIC framework further refines these representations to align with target object regions. Overall, both quantitative and qualitative results demonstrate that the design of DAFIC mitigates visual ambiguity in FSIC scenarios.

Figure 4. Comparison of RGB- and RGB-D-based pre-training on MiniImageNet. The bars show average test accuracies (%) under 5-way 1/5-shot settings, with a simple prototypical classifier.
Table 4. DAFIC components ablation on MiniImageNet (5-way) with mean accuracy (%) averaged over 1,000 meta-test episodes.
| Components | 1-shot | 5-shot |
|---|---|---|
| Non-pretrain | 30.49±0.35 | 41.23±0.38 |
| RGB-pretrain | 69.12±0.49 | 84.88±0.31 |
| RGBD-pretrain | 73.85±0.48 | 87.64±0.29 |
| + DA | 74.64±0.47 | 88.38±0.28 |
| + GA | 76.69±0.51 | 89.45±0.35 |
| + SBiM | 77.42±0.49 | 90.14±0.41 |
| + Global Sup | 77.71±0.44 | 90.35±0.51 |
4.3. Ablation Study
We assess the contributions of DAFIC components and the impact of monocular depth priors. Additional ablations are provided in Section D of the supplementary material.
Effect of depth on representation learning. As shown in Fig. 4, our RGB-D pre-training obtains gains of +3.25% and +2.48% on 1-shot and 5-shot tasks over RGB-only counterparts [20, 23], even when using a simple prototypical classifier. This demonstrates the effectiveness of integrating depth into self-supervised MIM to enrich the representation space and provide a strong initialization for the following few-shot learning.
Effectiveness of DGA and SBiM. Tab. 3 demonstrates the performance gains from integrating our proposed components. Incorporating CPEA with our DGA module yields consistent improvements across datasets (e.g., +1.18% on 1-shot TieredImageNet; +1.36% on 5-shot FC100). Further incorporating SBiM generally improves performance (+1.69% on 1-shot FC100; +0.76% on 1-shot MiniImageNet). Finally, our complete DAFIC framework with RGB-D initialization achieves the best performance, out-
Table 5. Computational complexity and performance comparison. FLOPs and inference latency are reported exclusively for the few-shot model, with latency averaged over 1800 query images on a single NVIDIA V100 GPU. Parameters (Params) correspond to the ViT-Small backbone. Performance is evaluated on CIFAR-FS.
| Model | Params (M) | FLOPs (G) | Time (ms) | 1-shot Acc. | 5-shot Acc. |
|---|---|---|---|---|---|
| SMKD [36] | 21.67 | 339.87 | 78.40 | 80.08±0.18 | 90.63±0.13 |
| CPEA [20] | 21.67 | 9.38 | 1.43 | 78.27±0.66 | 89.30±0.45 |
| DAFIC | 21.76 | 9.51 | 1.39 | 84.30±0.44 | 92.53±0.29 |
performing the DGA+SBiM variant (+3.69% on MiniImageNet; +5.25% on CIFAR-FS for 1-shot). Overall, these results across benchmarks support the effectiveness and complementarity of DGA, SBiM, and the overall framework.
Ablation of DAFIC components. Tab. 4 ablates DAFIC on MiniImageNet. Rows 1-5 use the same MLP dense matching classifier, with our components progressively added from Row 4. Without pre-training, the model performs poorly, highlighting the importance of ViT initialization in FSIC scenarios. Standard RGB pre-training improves the 1-shot accuracy to , while RGB-D pre-training further raises it to , confirming the value of depth cues in enriching feature representations. Building upon the RGB-D representation, we observe steady improvements as each module is sequentially introduced. Integrating the DA component improves results by by refining local depth-guided focus, and subsequently adding the GA component further enhances performance by adapting global geometry-enriched context, yielding a clear improvement (reaching ). Finally, incorporating SBiM and auxiliary Global Supervision (Global Sup) adds and respectively, completing our DAFIC architecture. Overall, the gain of DAFIC does not come solely from RGB-D pre-training; the subsequent DA, GA, SBiM, and Global Supervision modules further improve performance by , demonstrating that the proposed adaptation and matching components effectively transform depth-aware representations into more discriminative support-query matching.
Inference latency and FLOPs analysis. In Tab. 5, we evaluate the computational efficiency of DAFIC alongside its performance gains. DAFIC outperforms the baseline by (1-shot) and (5-shot) on CIFAR-FS, while maintaining comparable inference latency with negligible additional overhead under the cached-depth setting. Compared with SMKD, DAFIC also requires fewer FLOPs and achieves lower inference latency. As specified in the experimental setting, depth maps are precomputed offline and cached for episodic inference; thus, the latency reported in Tab. 5 corresponds to the cached-depth setting. We additionally report the full inference latency under both cached and on-the-fly depth estimation settings in Supp.Tab.18.
Robustness to Depth Corruptions. We acknowledge that monocular depth estimation can be unreliable in challeng- ing visual conditions. In Fig. 5 and Tab. 6, we perform depth corruption experiments on MiniImageNet to simulate missing or unreliable geometric cues. Background masking incurs only a minor performance change (e.g., a drop in 5-way 1-shot), suggesting that our depth-guided module is not overly sensitive to background depth. More importantly, under object-region occlusion or low-quality depth maps, DAFIC exhibits graceful degradation and still outperforms the CPEA baseline. For example, with object-region occlusion, DAFIC retains 1-shot accuracy, maintaining a margin over CPEA . With low-quality depth, it still achieves , surpassing CPEA by . Moreover, Supp.Tab.19 further evaluates DAFIC using the weaker depth prior consistently throughout training and evaluation, while still maintaining effective few-shot performance. Overall, these results suggest that DAFIC remains relatively robust to degraded geometric priors across the evaluated settings.

Figure 5. Example visualization of depth corruption strategies used during inference.
Table 6. Inference robustness to corrupted depth on MiniImageNet. The CPEA results are reproduced.
| Methods | 5-way 1-shot | 5-way 5-shot |
|---|---|---|
| CPEA | 72.25±0.65 | 87.24±0.38 |
| DAFIC | 77.71±0.44 | 90.35±0.51 |
| DAFIC ⇒ Object-region occlusions | 73.06±0.61 | 87.51±0.43 |
| DAFIC ⇒ Background occlusions | 77.10±0.64 | 89.81±0.36 |
| DAFIC ⇒ Low-quality depth map | 74.53±0.65 | 88.10±0.43 |
5. Conclusion
In this paper, we propose DAFIC, a geometry-guided FSIC framework that integrates monocular depth into representation learning, episodic adaptation, and dense support-query matching to mitigate appearance ambiguity and background clutter. DAFIC combines RGB-D self-supervised pre-training with Depth-guided Geometric Adaptation (DGA), which refines geometry-salient patches with geometry-enriched class context while suppressing background interference. Spatial Bidirectional Patch Matching (SBiM) then performs bidirectional support-query matching on the refined features to reduce spurious correspondences. Extensive experiments on four benchmarks show that DAFIC achieves strong performance against existing methods, highlighting the value of coupling geometry-conditioned episodic adaptation with bidirectional matching for few-shot visual recognition.
References
[1] Hangbo Bao, Li Dong, Songhao Piao, and Furu Wei. BEiT: BERT pre-training of image transformers. In International Conference on Learning Representations (ICLR), 2022. 3, 13
[2] Luca Bertinetto, Joao F. Henriques, Philip Torr, and Andrea Vedaldi. Meta-learning with differentiable closed-form solvers. In International Conference on Learning Representations (ICLR), 2019. 2, 6, 7, 13
[3] Nicolas Carion, Laura Gustafson, Yuan-Ting Hu, Shoubhik Debnath, Ronghang Hu, Didac Suris Coll-Vinent, Chaitanya Ryali, Kalyan Vasudev Alwala, Haitham Khedr, Andrew Huang, Jie Lei, Tengyu Ma, Baishan Guo, Arpit Kalla, Markus Marks, Joseph Greer, Meng Wang, Peize Sun, Roman Rädle, Triantafyllos Afouras, et al. Sam 3: Segment anything with concepts. In International Conference on Learning Representations (ICLR), 2026. 19
[4] Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 9650–9660, 2021. 3, 13
[5] Wei-Yu Chen, Yen-Cheng Liu, Zsolt Kira, Yu-Chiang Wang, and Jia-Bin Huang. A closer look at few-shot classification. In International Conference on Learning Representations (ICLR), 2019. 2
[6] Xiangyu Chen and Guanghui Wang. Few-shot learning by integrating spatial and frequency representation. In Proceedings of Conference on Robots and Vision (CRV), pages 49–56. IEEE, 2021. 3
[7] Yinbo Chen, Zhuang Liu, Huijuan Xu, Trevor Darrell, and Xiaolong Wang. Meta-baseline: Exploring simple meta-learning for few-shot learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 9062–9071, 2021. 16, 20
[8] Zhengyu Chen, Jixie Ge, Heshen Zhan, Siteng Huang, and Donglin Wang. Pareto self-supervised training for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 13663–13672, 2021. 16
[9] Hao Cheng, Siyuan Yang, Joey Tianyi Zhou, Lanqing Guo, and Bihan Wen. Frequency guidance matters in few-shot learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 11814–11824, 2023. 2, 3, 16
[10] Javier Ródenas Cumplido, Eduardo Aguilar, and Petia Radeva. Slot attention-based feature filtering for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pages 30–40, 2025. 1, 2, 3, 5, 6, 15, 16, 17
[11] Javier Ródenas Cumplido, Eduardo Aguilar, and Petia Radeva. Stochastic-based patch filtering for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pages 440–449, 2025. 1, 2
[12] Tali Dekel, Shaul Oron, Michael Rubinstein, Shai Avidan, and William T. Freeman. Best-buddies similarity for robust
template matching. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2015. 2
[13] Carl Doersch, Ankush Gupta, and Andrew Zisserman. Crosstransformers: spatially-aware few-shot transfer. Advances in Neural Information Processing Systems, 33:21981–21993, 2020. 1, 2
[14] Bowen Dong, Pan Zhou, Shuicheng Yan, and Wangmeng Zuo. Self-promoted supervision for few-shot transformer. In European Conference on Computer Vision (ECCV), pages 329–347. Springer, 2022. 6, 16, 20
[15] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth words: Transformers for image recognition at scale. In International Conference on Learning Representations (ICLR), 2021. 2, 6
[16] Stefan Elfwing, Eiji Uchibe, and Kenji Doya. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Networks, 107:3–11, 2018. 4
[17] Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In Proceedings of International Conference on Machine Learning (ICML), pages 1126–1135, 2017. 2, 16
[18] Yuqian Fu, Li Zhang, Junke Wang, Yanwei Fu, and Yu-Gang Jiang. Depth guided adaptive meta-fusion network for few-shot video recognition. In Proceedings of the ACM International Conference on Multimedia, pages 1142–1151, 2020. 3
[19] Spyros Gidaris, Andrei Bursuc, Nikos Komodakis, Patrick Pérez, and Matthieu Cord. Boosting few-shot visual learning with self-supervision. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 8059–8068, 2019. 16
[20] Fusheng Hao, Fengxiang He, Liu Liu, Fuxiang Wu, Dacheng Tao, and Jun Cheng. Class-aware patch embedding adaptation for few-shot image classification. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 18905–18915, 2023. 1, 2, 3, 5, 6, 7, 8, 13, 14, 15, 16, 17, 20, 21
[21] Stephen Hausler, Sourav Garg, Ming Xu, Michael Milford, and Tobias Fischer. Patch-netvlad: Multi-scale fusion of locally-global descriptors for place recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 14141–14152, 2021. 2
[22] Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, and Ross Girshick. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 16000–16009, 2022. 13
[23] Markus Hiller, Rongkai Ma, Mehrtash Harandi, and Tom Drummond. Rethinking generalization in few-shot classification. Advances in Neural Information Processing Systems, 35:3582–3595, 2022. 1, 2, 3, 6, 7, 13, 14, 15, 16, 20, 21
[24] Ruibing Hou, Hong Chang, Bingpeng Ma, Shiguang Shan, and Xilin Chen. Cross attention network for few-shot clas-sification. Advances in Neural Information Processing Systems, 32, 2019. 2, 6, 16, 20
[25] Weihao Jiang, Haoyang Cui, and Kun He. Class-relevant patch embedding selection for few-shot image classification. Image and Vision Computing, page 106031, 2026. 1, 2, 5, 6, 17
[26] Dahyun Kang, Heeseung Kwon, Juhong Min, and Minsu Cho. Relational embedding for few-shot classification. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 8822–8833, 2021. 6, 16, 20, 21
[27] Bingxin Ke, Anton Obukhov, Shengyu Huang, Nando Metzger, Rodrigo Caye Daudt, and Konrad Schindler. Repurposing diffusion-based image generators for monocular depth estimation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9492–9502, 2024. 2
[28] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015. 6
[29] Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C Berg, Wan-Yen Lo, et al. Segment anything. In Proceedings of the IEEE/CVF international conference on computer vision (ICCV), pages 4015–4026, 2023. 19
[30] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In Proceedings of the IEEE International Conference on Computer Vision Workshops (ICCVW), pages 554–561, 2013. 19
[31] Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 10657–10665, 2019. 16
[32] Hongyang Li, David Eigen, Samuel Dodge, Matthew Zeiler, and Xiaogang Wang. Finding task-relevant features for few-shot learning by category traversal. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 1–10, 2019. 2, 16
[33] Wenbin Li, Lei Wang, Jinglin Xu, Jing Huo, Yang Gao, and Jiebo Luo. Revisiting local descriptor based image-to-class measure for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7260–7268, 2019. 2, 16, 17, 20, 21
[34] Wenbin Li, Ziyi Wang, Xuesong Yang, Chuanqi Dong, Pinzhuo Tian, Tiexin Qin, Jing Huo, Yinghuan Shi, Lei Wang, Yang Gao, et al. Libfewshot: A comprehensive library for few-shot learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(12):14938–14955, 2023. 1
[35] Zhuoling Li, Yong Wang, and Kaitong Li. FewVS: A vision-semantics integration framework for few-shot image classification. In Proceedings of the ACM International Conference on Multimedia, pages 1341–1350, 2024. 3
[36] Han Lin, Guangxing Han, Jiawei Ma, Shiyuan Huang, Xudong Lin, and Shih-Fu Chang. Supervised masked knowl-
edge distillation for few-shot transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 19649–19659, 2023. 1, 2, 3, 6, 7, 8, 16, 20, 21
[37] Bin Liu, Yue Cao, Yutong Lin, Qi Li, Zheng Zhang, Mingsheng Long, and Han Hu. Negative margin matters: Understanding margin in few-shot classification. In European Conference on Computer Vision (ECCV), pages 438–455. Springer, 2020. 2
[38] Mushui Liu, Fangtai Wu, Bozheng Li, Ziqian Lu, Yunlong Yu, and Xi Li. Envisioning class entity reasoning by large language models for few-shot learning. In Proceedings of the AAAI Conference on Artificial Intelligence (AAAI), pages 18906–18914, 2025. 3
[39] Yang Liu, Tu Zheng, Jie Song, Deng Cai, and Xiaofei He. Dmn4: Few-shot learning via discriminative mutual nearest neighbor neural network. In Proceedings of the AAAI conference on artificial intelligence (AAAI), pages 1828–1836, 2022. 17
[40] Puneet Mangla, Nupur Kumari, Abhishek Sinha, Mayank Singh, Balaji Krishnamurthy, and Vineeth N Balasubramanian. Charting the right manifold: Manifold mixup for few-shot learning. In Proceedings of the IEEE Winter Conference on Applications of Computer Vision (WACV), pages 2218–2227, 2020. 2
[41] Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018. 2
[42] Jaehoon Oh, Hyungjun Yoo, ChangHwan Kim, and Seyoung Yun. Boil: Towards representation change for few-shot learning. In International Conference on Learning Representations (ICLR), 2021. 2
[43] Maxime Oquab, Timothée Darcet, Théo Moutakanni, Huy V. Vo, Marc Szafraniec, Vasil Khalidov, Pierre Fernandez, Daniel HAZIZA, Francisco Massa, Alaaeldin El-Nouby, Mido Assran, Nicolas Ballas, Wojciech Galuba, Russell Howes, Po-Yao Huang, Shang-Wen Li, Ishan Misra, Michael Rabbat, Vasu Sharma, Gabriel Synnaeve, Hu Xu, Herve Jegou, Julien Mairal, Patrick Labatut, Armand Joulin, and Piotr Bojanowski. DINOv2: Learning robust visual features without supervision. Transactions on Machine Learning Research, 2024. 18, 19
[44] Boris Oreshkin, Pau Rodríguez López, and Alexandre Lacoste. Tadam: Task-dependent adaptive metric for improved few-shot learning. Advances in Neural Information Processing Systems, 31, 2018. 6, 7, 13, 16
[45] Guodong Qi, Huimin Yu, Zhaohui Lu, and Shuzhao Li. Transductive few-shot classification on the oblique manifold. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 8412–8422, 2021. 16
[46] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. In Proceedings of International Conference on Machine Learning (ICML), pages 8748–8763, 2021. 19
[47] Jathushan Rajasegaran, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Mubarak Shah. Self-supervised knowledge distillation for few-shot learning. In Proceedings of British Machine Vision Conference (BMVC), 2021. 2
[48] Mengye Ren, Eleni Triantafillou, Sachin Ravi, Jake Snell, Kevin Swersky, Joshua B Tenenbaum, Hugo Larochelle, and Richard S Zemel. Meta-learning for semi-supervised few-shot classification. In International Conference on Learning Representations (ICLR), 2018. 6, 7, 13
[49] Tianhe Ren, Shilong Liu, Ailing Zeng, Jing Lin, Kunchang Li, He Cao, Jiayu Chen, Xinyu Huang, Yukang Chen, Feng Yan, et al. Grounded sam: Assembling open-world models for diverse visual tasks. arXiv preprint arXiv:2401.14159, 2024. 19
[50] Mamshad Nayeem Rizve, Salman Khan, Fahad Shahbaz Khan, and Mubarak Shah. Exploring complementary strengths of invariant and equivariant representations for few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 10836–10846, 2021. 16
[51] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. 1
[52] Andrei A. Rusu, Dushyant Rao, Jakub Sygnowski, Oriol Vinyals, Razvan Pascanu, Simon Osindero, and Raia Hadsell. Meta-learning with latent embedding optimization. In International Conference on Learning Representations (ICLR), 2019. 2, 16
[53] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. Advances in Neural Information Processing Systems, 30, 2017. 2, 6, 16, 20, 21
[54] Siyuan Sun and Hongyang Gao. Meta-adam: A meta-learned adaptive optimizer with momentum for few-shot learning. Advances in Neural Information Processing Systems, 36: 65441–65455, 2023. 16
[55] Yonglong Tian, Yue Wang, Dilip Krishnan, Joshua B Tenenbaum, and Phillip Isola. Rethinking few-shot image classification: a good embedding is all you need? In European Conference on Computer Vision (ECCV), pages 266–282. Springer, 2020. 6, 16, 20
[56] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Instance normalization: The missing ingredient for fast stylization. arXiv preprint arXiv:1607.08022, 2016. 4
[57] Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Koray Kavukcuoglu, and Daan Wierstra. Matching networks for one-shot learning. Advances in Neural Information Processing Systems, 29, 2016. 1, 2, 6, 7, 13, 16
[58] Xiang Wang, Shiwei Zhang, Zhiwu Qing, Mingqian Tang, Zhengrong Zuo, Changxin Gao, Rong Jin, and Nong Sang. Hybrid relation guided set matching for few-shot action recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 19948–19957, 2022. 2
[59] Xiang Wang, Shiwei Zhang, Zhiwu Qing, Changxin Gao, Yingya Zhang, Deli Zhao, and Nong Sang. Molo: Motion-augmented long-short contrastive learning for few-shot action recognition. In Proceedings of the IEEE/CVF Confer-
ence on Computer Vision and Pattern Recognition (CVPR), pages 18011–18021, 2023. 2
[60] Yaqing Wang, Quanming Yao, James T Kwok, and Lionel M Ni. Generalizing from a few examples: A survey on few-shot learning. ACM Computing Surveys, 53(3):1–34, 2020. 1
[61] Yikai Wang, Xinghao Chen, Lele Cao, Wenbing Huang, Fuchun Sun, and Yunhe Wang. Multimodal token fusion for vision transformers. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 12186–12195, 2022. 2
[62] Peter Welinder, Steve Branson, Takeshi Mita, Catherine Wah, Florian Schroff, Serge Belongie, and Pietro Perona. Caltech-ucsd birds 200. Technical Report CNS-TR-2010-001, California Institute of Technology, 2010. 19
[63] Davis Wertheimer, Luming Tang, and Bharath Hariharan. Few-shot classification with feature map reconstruction networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 8012–8021, 2021. 2, 16, 20
[64] Jiamin Wu, Tianzhu Zhang, Yongdong Zhang, and Feng Wu. Task-aware part mining network for few-shot learning. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 8433–8442, 2021. 16
[65] Jiangtao Xie, Fei Long, Jiaming Lv, Qilong Wang, and Peihua Li. Joint distribution matters: Deep brownian distance covariance for few-shot classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 7972–7981, 2022. 2, 16
[66] Lihe Yang, Bingyi Kang, Zilong Huang, Xiaogang Xu, Jiashi Feng, and Hengshuang Zhao. Depth anything: Unleashing the power of large-scale unlabeled data. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 10371–10381, 2024. 2
[67] Lihe Yang, Bingyi Kang, Zilong Huang, Zhen Zhao, Xiaogang Xu, Jiashi Feng, and Hengshuang Zhao. Depth anything v2. Advances in Neural Information Processing Systems, 37:21875–21911, 2024. 2, 6, 18
[68] Han-Jia Ye, Hexiang Hu, De-Chuan Zhan, and Fei Sha. Few-shot learning via embedding adaptation with set-to-set functions. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 8808–8817, 2020. 2, 6, 15, 16, 20, 21
[69] Bowen Yin, Xuying Zhang, Zhong-Yu Li, Li Liu, Ming-Ming Cheng, and Qibin Hou. Dformer: Rethinking rgbd representation learning for semantic segmentation. In International Conference on Learning Representations (ICLR), 2024. 2
[70] Chi Zhang, Yujun Cai, Guosheng Lin, and Chunhua Shen. Deepemd: Differentiable Earth mover's distance for few-shot learning. IEEE Transactions on Pattern Analysis and Machine Intelligence, 45(5):5632–5648, 2023. 2, 16
[71] Hai Zhang, Junzhe Xu, Shanlin Jiang, and Zhenan He. Simple semantic-aided few-shot learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 28588–28597, 2024. 3
[72] Jiaming Zhang, Huayao Liu, Kailun Yang, Xinxin Hu, Ruiping Liu, and Rainer Stiefelhagen. Cmx: Cross-modal fusion for rgb-x semantic segmentation with transformers. IEEE Transactions on Intelligent Transportation Systems, 24(12):14679–14694, 2023. 2
[73] Xueting Zhang, Debin Meng, Henry Gouk, and Timothy M Hospedales. Shallow bayesian meta learning for real-world few-shot recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 651–660, 2021. 16
[74] Kaipeng Zheng, Huishuai Zhang, and Weiran Huang. Dif-fkendall: A novel approach for few-shot learning with differentiable kendall's rank correlation. Advances in Neural Information Processing Systems, 36:49403–49415, 2023. 2
[75] Fei Zhou, Peng Wang, Lei Zhang, Zhenghua Chen, Wei Wei, Chen Ding, Guosheng Lin, and Yanning Zhang. Meta-exploiting frequency prior for cross-domain few-shot learning. Advances in Neural Information Processing Systems, 37:116783–116814, 2024. 3
[76] Jinghao Zhou, Chen Wei, Huiyu Wang, Wei Shen, Cihang Xie, Alan Yuille, and Tao Kong. ibot: Image bert pre-training with online tokenizer. In International Conference on Learning Representations (ICLR), 2022. 3, 13, 14
[77] Luisa Zintgraf, Kyriacos Shiarli, Vitaly Kurin, Katja Hofmann, and Shimon Whiteson. Fast context adaptation via meta-learning. In Proceedings of International Conference on Machine Learning (ICML), pages 7693–7702, 2019. 2
Depth-guided Geometric Adaptation for Few-shot Image Classification Supplementary Material
This document provides supplementary material for the main manuscript, organized as follows. Section A offers a brief recap of the evaluation datasets. Section B details the implementation and analysis of our RGB-D pretraining strategy. Section C presents additional quantitative and qualitative results in the few-shot learning stage. Section D includes more ablation studies absent from the main paper due to space constraints. Section E provides the discussion of DAFIC and future work. Finally, Section F investigates the integration of depth cues into several existing few-shot image classification (FSIC) methods, demonstrating the broader utility of depth priors for FSIC domain.
A. Dataset
All experiments are conducted on four standard FSIC benchmarks following most of the prior FSIC works: MiniImageNet [57], TieredImageNet [48], CIFAR-FS [2], and FC100 [44].
Table 7. Commonly adopted FSIC benchmark datasets in prior works.
| Dataset | # Images | Train/Val/Test |
|---|---|---|
| MiniImageNet [57] | ~60,000 | 64/16/20 |
| TieredImageNet [48] | ~779,165 | 351/97/160 |
| CIFAR-FS [2] | ~60,000 | 64/16/20 |
| FC100 [44] | ~60,000 | 60/20/20 |
B. Implementation Details for Pre-training
B.1. RGB-D Pre-training Setups
We pretrain the Vision Transformer (ViT) backbone and projection heads inspired by the prior works of Few-TURE [23] and CPEA [20]. Table 8 provides the configuration summary of our RGB-D pretraining. Specifically, we adopt a ViT-Small architecture with a patch size, using a shared 8192-dimensional projection head for both the class token and the patch tokens in the student and teacher networks, ensuring the global and local representations in a common embedding space. The model is optimized using the AdamW optimizer under a cosine learning-rate schedule, starting from and decaying to , while the weight decay increases from 0.04 to 0.4. A 10-epoch linear warm-up is applied at the beginning of training. The teacher network is updated with an exponential moving-average (EMA) momentum of 0.996, and its temperature is linearly increased from 0.04 to 0.07 during the first 30 epochs to stabilize optimization. For data augmentation, we employ the multi-crop strategy [4] in an RGB-D setting, generating two global crops (size , scale range [0.25, 1.0]) and ten local crops (size , scale range [0.05, 0.25]). We also apply jointly aligned RGB–depth cropping/flipping and separate normalization for each channel. Masked image modeling (MIM) [1, 22, 76] is applied to global crops in the student branch using block-wise masking, where the masking ratio is uniformly sampled from [0.0, 0.3] with a variance of [0.0, 0.2]. We pre-train the RGB-D model for 1600 epochs on MiniImageNet, CIFAR-FS, and FC100, and for 800 epochs on TieredImageNet. For downstream few-shot classification, we use the checkpoint at epoch 1000 for MiniImageNet, CIFAR-FS, and FC100, and at epoch 500 for TieredImageNet. For comparison, the baseline pre-training uses four A100 GPUs with a batch size of 512 and 1,600/800 epochs.
Table 8. Summary of the RGB-D Pre-training Configuration
| Category | Configuration |
|---|---|
| Backbone | ViT-Small with patches; 8192-d projection head shared by class and patch tokens (student/teacher). |
| Optimization | AdamW optimizer; cosine LR from to ; weight decay ; 10-epoch warm-up. |
| Teacher EMA | EMA momentum: 0.996; teacher temperature increases from 0.04 to 0.07 during the first 30 epochs. |
| Augmentation | RGB-D multi-crop strategy: 2 global crops (, scale [0.25,1.0]) and 10 local crops (, scale [0.05,0.25]); RGB-depth synchronized crop/flip; per-channel RGB and depth normalization. |
| MIM | Block-wise masking on global crops (student network); masking ratio sampled from [0.0, 0.3] with variance [0.0, 0.2]. |
| Computation | Distributed training with DDP; A100 (40GB) GPUs; batch size 384; pre-training for 1,600 epochs (800 for TieredImageNet); checkpoint selected at epoch 1,000 (500 for TieredImageNet). |
B.2. Pre-training Comparison Analysis
In Figure 6, we compare our RGB-D self-supervised pre-training with the RGB-only self-supervised pre-training

(a) MiniImageNet
(b) TieredImageNet

(c) CIFAR-FS
(d) FC100
Figure 6. Comparison between our RGB-D and RGB-only self-supervised pre-training across four datasets, using six metrics to monitor the training dynamics. RGB-D pre-training generally achieves lower total and class-level losses, converges faster, and yields higher training accuracy than RGB-only pre-training, while its clustering metrics (NMI and F-score) are generally lower. The yellow and red curves denote the training phases before and after the selected checkpoint used for downstream few-shot classification.
baselines [20, 23] across these four benchmarks using six monitoring metrics. Empirically, we observe that RGB-D pre-training converges faster and reaches lower total and class-level losses, with earlier stabilization in several metrics. Therefore, we (1) follow the baseline setup to pretrain for 1600 epochs on most datasets and 800 epochs on TieredImageNet, but with a smaller total batch size (384 vs. 512) due to our computational constraints, and (2) adopt the checkpoints from 1000 epochs of most datasets and 500 epochs of TieredImageNet as the RGB-D pretrained backbones for subsequent few-shot classification.
We follow [23, 76] to track the training dynamics throughout pre-training (up to 1600 epochs for MiniImageNet, CIFAR-FS, and FC100, and up to 800 epochs for TieredImageNet). The tracked metrics include:
(1) Optimization objectives. The total loss (train_loss), class-level distillation loss (train_cls), and patch-level MIM loss (train_patch) together characterize the overall training objective and the convergence behavior of both global (CLS-token) and local (patch-token) representations; (2) Cross-view consistency. The training accuracy (train_acc), reflecting the alignment stability between teacher and student predictions across different augmented views; (3) Global clustering quality. The normalized mutual information (train_nmi) and Fowlkes–Mallows score (train_fscore) are used to assess how well the learned representations are semantically clustered by comparing the teacher's codebook assignments with the ground-truth class labels.
Overall, RGB-D pre-training consistently yields faster convergence, lower train_loss and train_cls, and higher train_acc across the four benchmarks. These trends suggest that the additional depth signal facilitates teacher-student alignment during self-supervised MIM pre-training. For train_patch, RGB-D pretraining is generally competitive and often lower in the early stage, although the advantage is less consistent on TieredImageNet. In contrast, the clustering metrics (train_nmi and train_fscore) are generally lower than those of RGB-only pre-training. This indicates that RGB-D pre-training does not necessarily improve semantic clustering under these monitoring metrics, but instead appears to favor representations that are more effective for the downstream few-shot classification task, as evidenced by the final FSIC performance reported in the main paper, Table 9 and Table 10 in this document.
C. Few-shot Learning with DAFIC
After RGB-D pre-training, the original projection head with an output dimension of 8,192 is removed and replaced with a new projection head of dimension 384, matching the embedding size of the ViT-Small backbone used in our framework. The new projection head is implemented as a two-layer multi-layer perceptron (MLP) with linear layers and GELU activations. We then train the full DAFIC framework, including the Depth-guided Geometric Adaptation (DGA) module and the Spatial Bidirectional Patch Matching (SBiM) classifier, under a meta-training paradigm to promote cross-task generalization. This training protocol follows most prior metric-based FSIC methods [10, 20, 23, 68]. In this stage, both training and inference are conducted on a single NVIDIA V100 GPU.
For completeness, we briefly clarify why the bidirectional matching in SBiM is not redundant, although both directions are derived from the same similarity matrix. The query-to-support score performs row-wise max-pooling, measuring whether each query patch can find strong evidence in the support class, whereas the support-to-query score performs column-wise max-pooling, whether the support patches are sufficiently covered by the query image. Therefore, the two directions capture complementary aspects of dense correspondence. Using only the forward direction may lead to many-to-one matches, where multiple query patches repeatedly align with a few salient support patches and thus overestimate similarity. The backward direction helps alleviate this issue by encouraging more structurally consistent query-support alignment.
Quantitative Comparison with Prior FSIC Methods. DAFIC consistently outperforms the baseline and achieves strong performance compared with prior FSIC methods on both 5-way 1-shot and 5-way 5-shot tasks across all datasets, as summarized in Table 9 and Table 10.
Qualitative Visualizations Compared to the Baseline. Beyond the quantitative gains, DAFIC focuses on class-relevant regions more reliably than the baseline across diverse FSIC scenarios, including distracting backgrounds, multiple entities, and cluttered scenes. These visualizations suggest that our DAFIC alleviates the ambiguity introduced by relying solely on RGB appearance and encourages more class-focused attention, as shown in Figure 7.

Figure 7. More visualizations of patch-to-class semantic alignment between baseline CPEA [20] and DAFIC. Warmer colors (towards red) indicate stronger class relevance, whereas cooler colors (towards blue) denote weaker or non-relevant regions. As shown, the RGB-D ViT backbone alone already yields more class-consistent responses than the baseline. After applying the full DAFIC framework, the patch-to-class alignment is further improved and becomes more precise.
Table 9. More comprehensive results (%) on MiniImageNet and TieredImageNet. The ± shows 95% confidence intervals. The best and second-best results are shown in bold and underlined.
| Method | Venue | Backbone | ≈ # Params | MiniImageNet | TieredImageNet | ||
|---|---|---|---|---|---|---|---|
| 5-way 1-shot | 5-way 5-shot | 5-way 1-shot | 5-way 5-shot | ||||
| MatchNet [57] | NeurIPS'16 | ResNet-12 | 12.4M | 65.64 ± 0.20 | 78.72 ± 0.15 | 68.50 ± 0.92 | 80.60 ± 0.71 |
| ProtoNet [53] | NeurIPS'17 | ResNet-12 | 12.4M | 62.29 ± 0.33 | 79.46 ± 0.48 | 68.25 ± 0.23 | 84.01 ± 0.56 |
| MAML [17] | ICML'17 | ResNet-12 | 12.4M | 49.24 ± 0.21 | 58.05 ± 0.10 | 67.92 ± 0.17 | 72.41 ± 0.20 |
| TADAM [44] | NeurIPS'18 | ResNet-12 | 12.4M | 58.50 ± 0.30 | 76.70 ± 0.30 | 62.13 ± 0.31 | 81.92 ± 0.30 |
| LEO [52] | ICLR'19 | WRN-28-10 | 36.5M | 61.76 ± 0.08 | 77.59 ± 0.12 | 66.33 ± 0.05 | 81.44 ± 0.09 |
| DN4 [33] | CVPR'19 | ResNet-12 | 12.4M | 56.93 ± 0.62 | 73.97 ± 0.49 | 66.25 ± 0.75 | 82.62 ± 0.51 |
| CAN [24] | NeurIPS'19 | ResNet-12 | 12.4M | 63.85 ± 0.48 | 79.44 ± 0.34 | 69.89 ± 0.51 | 84.23 ± 0.37 |
| CTM [32] | CVPR'19 | ResNet-12 | 12.4M | 64.12 ± 0.82 | 80.51 ± 0.13 | 68.41 ± 0.39 | 84.28 ± 1.73 |
| RFS [55] | ECCV'20 | ResNet-12 | 12.4M | 62.02 ± 0.63 | 79.64 ± 0.44 | 69.74 ± 0.72 | 84.41 ± 0.55 |
| FEAT [68] | CVPR'20 | ResNet-12 | 12.4M | 66.78 ± 0.20 | 82.05 ± 0.14 | 70.80 ± 0.23 | 84.79 ± 0.16 |
| DeepEMD [70] | CVPR'20 | ResNet-12 | 12.4M | 65.91 ± 0.82 | 82.41 ± 0.56 | 71.16 ± 0.87 | 86.03 ± 0.58 |
| FRN [63] | CVPR'21 | ResNet-12 | 12.4M | 66.45 ± 0.19 | 82.83 ± 0.13 | 71.16 ± 0.22 | 86.01 ± 0.15 |
| RENet [26] | ICCV'21 | ResNet-12 | 12.4M | 67.60 ± 0.44 | 82.58 ± 0.30 | 71.61 ± 0.51 | 85.28 ± 0.35 |
| Meta-Baseline [7] | ICCV'21 | ResNet-12 | 12.4M | 63.17 ± 0.23 | 79.26 ± 0.17 | 68.62 ± 0.27 | 83.29 ± 0.18 |
| IE [50] | CVPR'21 | ResNet-12 | 12.4M | 67.28 ± 0.80 | 84.78 ± 0.52 | 72.21 ± 0.90 | 87.08 ± 0.58 |
| TPMN [64] | ICCV'21 | ResNet-12 | 12.4M | 67.64 ± 0.63 | 83.44 ± 0.43 | 72.24 ± 0.70 | 86.55 ± 0.63 |
| PSST [8] | CVPR'21 | WRN-28-10 | 36.5M | 74.51 ± 0.46 | 86.60 ± 0.32 | - | - |
| OM [45] | ICCV'21 | WRN-28-10 | 36.5M | 66.78 ± 0.30 | 85.29 ± 0.41 | 71.54 ± 0.29 | 87.79 ± 0.46 |
| Meta-QDA [73] | ICCV'21 | WRN-28-10 | 36.5M | 67.83 ± 0.64 | 84.28 ± 0.69 | 74.33 ± 0.65 | 89.56 ± 0.79 |
| DeepBDC [65] | CVPR'22 | ResNet-12 | 12.4M | 67.34 ± 0.43 | 84.46 ± 0.28 | 72.34 ± 0.49 | 87.31 ± 0.32 |
| SUN [14] | ECCV'22 | ViT | 12.5M | 67.80 ± 0.45 | 83.25 ± 0.30 | 72.99 ± 0.50 | 86.74 ± 0.33 |
| FewTURE [23] | NeurIPS'22 | Swin-T | 29M | 72.40 ± 0.78 | 86.38 ± 0.49 | 76.32 ± 0.87 | 89.96 ± 0.55 |
| FGFL [9] | ICCV'23 | ResNet-12 | 12.4M | 69.14 ± 0.80 | 86.01 ± 0.62 | 73.21 ± 0.88 | 87.21 ± 0.61 |
| CPEA [20] | ICCV'23 | ViT-S | 22M | 71.97 ± 0.65 | 87.06 ± 0.38 | 76.93 ± 0.70 | 90.12 ± 0.45 |
| Meta-AdaM [54] | NeurIPS'23 | ResNet-12 | 12.4M | 59.89 ± 0.49 | 77.92 ± 0.43 | 65.31 ± 0.48 | 85.24 ± 0.35 |
| SMKD [36] | CVPR'23 | ViT-S | 22M | 74.28 ± 0.18 | 88.82 ± 0.09 | 78.83 ± 0.20 | 91.02 ± 0.12 |
| SAFF [10] | CVPRW'25 | ViT-S | 22M | 71.51 ± 0.63 | 87.19 ± 0.36 | 74.73 ± 0.74 | 88.97 ± 0.43 |
| DAFIC (Ours) | WACV'27 | ViT-S | 22M | 77.71 ± 0.44 | 90.35 ± 0.51 | 80.10 ± 0.40 | 91.05 ± 0.51 |
Table 10. More comprehensive results (%) on CIFAR-FS and FC100. The ± shows 95% confidence intervals. The best and second-best results are shown in bold and underlined
| Method | Venue | Backbone | ≈ # Params | CIFAR-FS | FC100 | ||
|---|---|---|---|---|---|---|---|
| 5-way 1-shot | 5-way 5-shot | 5-way 1-shot | 5-way 5-shot | ||||
| ProtoNet [53] | NeurIPS'17 | ResNet-12 | 12.4M | 72.20 ± 0.70 | 83.50 ± 0.50 | 41.54 ± 0.76 | 57.08 ± 0.76 |
| TADAM [44] | NeurIPS'18 | ResNet-12 | 12.4M | - | - | 40.10 ± 0.40 | 56.10 ± 0.40 |
| MetaOptNet [31] | CVPR'19 | ResNet-12 | 12.4M | 72.80 ± 0.70 | 84.30 ± 0.50 | 47.20 ± 0.60 | 55.50 ± 0.60 |
| RFS [55] | ECCV'20 | ResNet-12 | 12.4M | 71.50 ± 0.80 | 86.00 ± 0.50 | 42.60 ± 0.70 | 59.10 ± 0.60 |
| DeepEMD [70] | CVPR'20 | ResNet-12 | 12.4M | - | - | 46.47 ± 0.78 | 63.22 ± 0.71 |
| RENet [26] | ICCV'21 | ResNet-12 | 12.4M | 74.51 ± 0.46 | 86.60 ± 0.32 | - | - |
| TPMN [64] | ICCV'21 | ResNet-12 | 12.4M | 75.50 ± 0.90 | 87.20 ± 0.60 | 46.93 ± 0.71 | 63.26 ± 0.74 |
| CC+rot [19] | ICCV'21 | WRN-28-10 | 36.5M | 73.62 ± 0.31 | 86.05 ± 0.22 | - | - |
| IE [50] | CVPR'21 | ResNet-12 | 12.4M | 77.87 ± 0.85 | 89.74 ± 0.57 | 47.76 ± 0.77 | 65.30 ± 0.76 |
| PSST [8] | CVPR'21 | WRN-28-10 | 36.5M | 77.02 ± 0.38 | 88.45 ± 0.35 | - | - |
| Meta-QDA [73] | ICCV'21 | WRN-28-10 | 36.5M | 75.83 ± 0.88 | 88.79 ± 0.75 | - | - |
| SUN [14] | ECCV'22 | ViT | 12.5M | 78.37 ± 0.46 | 88.84 ± 0.32 | - | - |
| FewTURE [23] | NeurIPS'22 | Swin-T | 29M | 77.76 ± 0.81 | 88.90 ± 0.59 | 47.68 ± 0.78 | 63.81 ± 0.75 |
| CPEA [20] | ICCV'23 | ViT-S | 22M | 77.82 ± 0.66 | 88.98 ± 0.45 | 47.24 ± 0.58 | 65.02 ± 0.60 |
| Meta-AdaM [54] | NeurIPS'23 | ResNet-12 | 12.4M | - | - | 41.12 ± 0.49 | 56.14 ± 0.49 |
| SMKD [36] | CVPR'23 | ViT-S | 22M | 80.08 ± 0.18 | 90.63 ± 0.13 | 50.38 ± 0.16 | 68.37 ± 0.16 |
| SAFF [10] | CVPRW'25 | ViT-S | 22M | 78.48 ± 0.67 | 90.30 ± 0.41 | 47.17 ± 0.59 | 66.00 ± 0.57 |
| DAFIC (Ours) | WACV'27 | ViT-S | 22M | 84.30 ± 0.44 | 92.53 ± 0.29 | 50.52 ± 0.46 | 69.42 ± 0.44 |
D. Additional Ablation Studies of DAFIC
Choices of Depth-guided Attention (DA). We explore three strategies for deriving depth-guided attention: (1) a patch-average method that uses the mean depth value within each patch as its attention weight; (2) an MLP-based method that applies a lightweight MLP to predict patch-wise attention independently; and (3) our CNN-based design. As shown in Tab. 11, the CNN-based design consistently achieves the best performance in both RGB and RGB-D settings. These results align with our design intuition: the patch-average approach produces fixed and coarse attention weights; the MLP-based method, while locally adaptive, is restricted within each patch; the CNN-based method effectively integrates both local and global geometric cues to generate geometry-salient attention.
Table 11. Accuracy (%) comparison between RGB and RGB-D initialization under different DA designs in the DGA module on the TieredImageNet (5-way 1-shot).
| DA Design | Initialization | |
|---|---|---|
| RGB | RGB-D | |
| Patch-average | ||
| MLP-based | ||
| CNN-based | ||
Importance of SBiM. Tab. 12 compares several matching strategies, with all other DAFIC components kept identical. We compare SBiM with its one-way and top-50% variants, mutual nearest-neighbor matching (MNN), which also performs bidirectional nearest-neighbor search but retains only reciprocal best-match pairs [39], CPEA-style MLP matching [20], and DN4 local nearest neighbor matching [33] (). Overall, SBiM achieves the best performance across all settings, supporting the effectiveness of its bidirectional query-to-support and support-to-query aggregation over one-way or hard reciprocal matching, as well as its complementarity with DGA and the overall DAFIC framework.
Table 12. Comparison of different matching strategies for the DAFIC framework on MiniImageNet and FC100 datasets.
| Matching Strategy | MiniImageNet | FC100 | ||
|---|---|---|---|---|
| 1-shot | 5-shot | 1-shot | 5-shot | |
| SBiM | ||||
| SBiM (top 50% patches) | ||||
| SBiM (one-way) | ||||
| Mutual-NN (MNN) | ||||
| MLP (CPEA) | ||||
| DN4 (k=3) | ||||
Ablation of in the DA component of DGA module. Tab. 13 investigates the attention-strength parameter within the depth-guided attention (DA) component of the DGA module on MiniImageNet. We compare fixed values of against making it a learnable parameter with different initializations. The results indicate that setting as a learnable parameter initialized at 5.0 achieves the best performance. These results suggest that a moderately larger initial attention scale is beneficial, whereas overly large scaling (e.g., ) slightly degrades accuracy. An evaluation of the initial scale value may be relevant due to its effect on the adaptive attention learning of our DAFIC framework.
Table 13. Ablation on the attention-strength parameter on Mini-ImageNet.
| β Setting | Learnable | 1-shot | 5-shot |
|---|---|---|---|
| Fixed β = 1.0 | No | 76.62±0.44 | 89.59±0.51 |
| Fixed β = 5.0 | No | 77.02±0.42 | 89.92±0.40 |
| Init β = 1.0 | Yes | 76.68±0.51 | 89.66±0.36 |
| Init β = 5.0 | Yes | 77.71±0.44 | 90.35±0.51 |
| Init β = 10.0 | Yes | 77.34±0.40 | 90.22±0.38 |
Ablation of in the GA component of DGA module. Tab. 14 ablates the magnitude parameter within the geometry-aware adaptation (GA) component of the DGA module on MiniImageNet. As mentioned in the main manuscript, we adopt following prior works [10, 20, 25]. Our empirical results also show that this setting gives the best performance among the values considered.
Table 14. Ablation on the magnitude on MiniImageNet.
| λ | 1-shot | 5-shot |
|---|---|---|
| 1 | 76.97±0.46 | 89.50±0.44 |
| 2 | 77.71±0.44 | 90.35±0.51 |
| 4 | 77.18±0.44 | 89.77±0.43 |
| 8 | 76.99±0.60 | 89.61±0.59 |
Ablation of and for the final loss. Tab. 15 investigates the loss weights (for local matching) and (for auxiliary global supervision) on MiniImageNet. By fixing the primary loss weight at 1.0, we evaluate the impact of the auxiliary weight . Empirical results show that setting yields the best performance, indicating that moderate auxiliary global supervision is beneficial for DAFIC.
Table 15. Ablation on loss weights for local matching and for auxiliary global supervision on MiniImageNet.
| α | γ | 1-shot | 5-shot |
|---|---|---|---|
| 1.0 | 0 | 77.42±0.49 | 90.14±0.41 |
| 1.0 | 0.5 | 77.71±0.41 | 90.35±0.51 |
| 1.0 | 1.0 | 77.60±0.44 | 90.24±0.46 |
Independent contributions of DGA and SBiM. Tab. 16 evaluates DGA and SBiM without RGB-D pre-training to isolate their contributions. Without FSL adaptation, SBiM already outperforms MLP, showing the benefit of bidirectional dense matching. Under CPEA-style adaptation, MLP performs better than SBiM, suggesting that uniform global-context adaptation is better aligned with the original CPEA classifier. In contrast, DGA consistently benefits both classifiers, and DGA+SBiM achieves the best per-formance. This supports our design in which DGA performs geometry-guided adaptation, while SBiM effectively exploits the refined features through bidirectional support-query matching.
Table 16. Effect of DGA and SBiM without RGB-D pre-training on MiniImageNet. Results are 5-way 1-/5-shot accuracies (%).
| FSL Adaptation | MLP | SBiM |
|---|---|---|
| None | 30.49 / 41.23 | 32.93 / 48.10 |
| CPEA-style | 31.01 / 46.66 | 29.73 / 44.78 |
| DGA | 32.61 / 49.67 | 34.36 / 52.81 |
Variance over multiple training runs. Table 17 reports DAFIC performance across three runs with different random seeds. Results are reported as mean ± standard deviation across runs, rather than episodic confidence intervals. This indicates relatively stable training across datasets and 5-way 1-/5-shot settings.
Table 17. Training stability of DAFIC across three runs with different random seeds. Results are reported as mean ± standard deviation (%) across runs.
| Dataset | 1-shot | 5-shot |
|---|---|---|
| MiniImageNet | 77.42 ± 0.26 | 90.29 ± 0.15 |
| TieredImageNet | 80.09 ± 0.17 | 90.94 ± 0.15 |
| CIFAR-FS | 84.45 ± 0.16 | 92.40 ± 0.16 |
| FC100 | 50.36 ± 0.21 | 69.37 ± 0.32 |
Latency comparison. Table 18 extends the latency analysis in Main Tab.5 by reporting the full inference latency with and without cached depth maps, comparing DAFIC with the CPEA baseline and SMKD, the strongest-performing competing method in our comparison. In our standard setting, depth maps are precomputed offline, so DAFIC introduces no online depth-estimation overhead and achieves a latency of only 1.39 ms per image, slightly lower than CPEA (1.43 ms). Even when depth is estimated on-the-fly using Depth Anything V2-ViT/B [67], the total latency is 74.02 ms per image, remaining lower than SMKD (78.40 ms). These results show that DAFIC preserves efficient inference with cached depth while remaining competitive in latency when online depth estimation is included.
Table 18. Inference latency with and without cached depth maps. Cached depth maps are precomputed offline, whereas on-the-fly inference includes Depth Anything V2-B.
| Method | FSIC Latency | Depth Latency | Total Latency |
|---|---|---|---|
| CPEA | 1.43 | - | 1.43 |
| DAFIC (cached) | 1.39 | - | 1.39 |
| DAFIC (on-the-fly) | 1.39 | 72.63 | 74.02 |
| SMKD | 78.40 | - | 78.40 |
Sensitivity to depth-prior quality. To further examine whether DAFIC depends on a specific external depth esti- mator, we replace Depth Anything V2 [67] with a weaker alternative depth prior generated by a DPT head with a DINO-v2 ViT-Small backbone [43]. Qualitative examples are shown in Fig. 8. The resulting depth maps are used consistently throughout RGB-D pre-training, episodic meta-training, and evaluation. As shown in Tab. 19, performance decreases from 77.71/90.35% to 76.16/89.05% on MiniImageNet for 5-way 1-/5- shot, while remaining above the CPEA baseline by 3.91/1.81%. This indicates that depth quality affects performance, while DAFIC remains effective with a weaker geometric prior, consistent with our design of using depth as a soft structural cue rather than relying on a specific depth estimator.
Table 19. Sensitivity of DAFIC to an alternative weaker depth prior throughout training and evaluation on MiniImageNet.
| Method | Depth Source | 1-shot | 5-shot |
|---|---|---|---|
| CPEA | - | 72.25±0.65 | 87.24±0.38 |
| DAFIC | Depth Anything V2 | 77.71±0.44 | 90.35±0.51 |
| DAFIC | DINOv2-S + DPT | 76.16±0.40 | 89.05±0.22 |

RGB inputs

Depth maps from Depth Anything V2

Depth maps from Dino-v2 ViT/S + DPT-head
Figure 8. Qualitative examples of depth maps generated by Depth Anything V2 (second row) and the weaker DINO-v2 ViT/S + DPT (third row) depth estimator.
E. Discussion of DAFIC
We provide additional discussions of DAFIC on its novelty, limitations, and potential future directions.
Innovation beyond existing patch-level FSIC methods. The novelty of DAFIC does not lie in the individual use of monocular depth estimation or bidirectional matching, nor simply in adding depth as an extra input modality. Instead, DAFIC introduces a unified geometry-guided FSIC formulation that integrates geometric information into representation learning, episodic patch adaptation, and dense support-query matching to address appearance ambiguity and background clutter from RGB-only FSIC scenarios.
This formulation differs from existing patch-level FSIC methods in three aspects: 1) Geometry-aware representation learning. RGB-D self-supervised pre-training incorporates frozen and task-agnostic monocular depth into the backbone, producing geometry-aware patch representations rather than relying solely on appearance-based features. 2) Geometry-conditioned episodic adaptation. Unlike CPEA-style adaptation that injects class-level information into patch representations without explicitly considering geometric relevance, DGA uses depth-derived geometry to selectively preserve local cues for geometry-salient patches while incorporating geometry-enriched class context, and steers background regions toward a global representation. This produces geometry-refined patch sets that are less sensitive to background-dominated or semantically misaligned regions. 3) Bidirectional matching of geometry-refined features. We regard FSIC as a patch-matching problem and design SBiM to perform bidirectional support-query matching on the DGA-refined features, reducing spurious correspondences during dense comparison.
These components form a coherent pipeline rather than independent additions. Thus, the contribution of DAFIC lies in this geometry-guided formulation and, in particular, the coupling of geometry-conditioned episodic adaptation mechanism with bidirectional set matching, rather than simply combining existing components.
Segmentation methods for future work. Segmentation-based methods, such as SAM [3, 29] and other open-world models [49], indeed provide a promising complementary direction for our future work. However, segmentation also has inherent limitations for FSIC that need to be systematically explored: 1) Segmentation-based approaches typically require an additional prompt or a mask-selection mechanism to identify which masks are class-relevant for each few-shot task; 2) Foreground segmentation can suppress or remove background, but it does not by itself resolve few-shot matching ambiguities, such as intra-object appearance similarity, part-level misalignment, and support-query patch correspondence. 3) In many FSIC cases, object parts, shape cues, and even surrounding regions can be informative, while a hard segmentation mask may inadvertently remove such useful cues. In comparison, depth provides a softer and task-agnostic alternative. Our DAFIC incorporates geometric cues into representation learning and leverages them as a soft attention prior, together with geometry-enriched class context, to improve local-to-global semantic alignment and support SBiM for robust patch matching. Therefore, how to effectively address the above concerns and explore segmentation-based paradigms for FSIC remains an important direction for future work.
Foundation models and the strict FSIC protocol. Modern foundation representations provide an important reference for FSIC. The key difference is how this external information enters the FSIC pipeline: foundation encoders directly provide externally pre-trained semantic representations, whereas DAFIC uses a learnable backbone whose parameters are optimized only on the standard metatrain split, with fixed, task-agnostic depth predictions serving as auxiliary geometric inputs. As a diagnostic, we evaluate frozen DINOv2 [43] and CLIP [46] visual representations under the same prototypical evaluation protocol. DINOv2 achieves 94.90/98.59% on MiniImageNet and 93.97/97.64% on TieredImageNet, while CLIP achieves 85.57/95.64% on MiniImageNet for 1-/5-shot. These results highlight the strong few-shot capability enabled by large-scale external semantic pre-training, even with frozen encoders and a simple prototypical classifier.
F. Effect of Depth Cues on FSIC Methods
To explicitly account for the external depth prior used by DAFIC, we construct matched-prior controls by augmenting representative FSIC methods with the same estimated depth maps. Specifically, depth is concatenated with RGB as an additional input channel, while the original backbone, training protocol, and evaluation setting of each method are otherwise kept unchanged. All depth maps are generated offline using the same fixed monocular depth estimator. Adding the depth channel changes only the input projection parameters marginally relative to the full model size.
As shown in Tables 20 and 21, providing the same depth prior improves most evaluated methods across MiniImageNet, TieredImageNet, CIFAR-FS, and FC100. This confirms that externally estimated depth itself provides a useful additional signal and accounts for part of the improvement observed in depth-assisted FSIC. Importantly, however, DAFIC remains above the directly matched CPEA+Depth baseline on all four benchmarks, by +2.51/+2.06, +2.06/+0.94, +2.65/+1.98, and +2.46/+2.77 percentage points on MiniImageNet, TieredImageNet, CIFAR-FS, and FC100, respectively, for 5-way 1-/5-shot classification. Thus, access to the same external depth prior alone does not explain the full performance gain of DAFIC.
Table 22 further extends this analysis to the fine-grained CUB [62] and StanfordCars [30] datasets. Depth again benefits many methods, although it is not uniformly advantageous in every setting. DAFIC achieves 85.94/93.67% on CUB and 93.52/96.85% on StanfordCars, remaining above CPEA+Depth by +2.83/+1.82 and +1.16/+1.01 percentage points, respectively. Overall, these matched controls show that depth is a valuable complementary cue for FSIC, while the remaining gains of DAFIC support the benefit of learning how to integrate and exploit this geometric prior rather than merely providing an additional depth channel.
Table 20. Results (%) of FSIC methods with RGB-D inputs on MiniImageNet and TieredImageNet. The denotes confidence intervals. Adding depth as an extra input channel only marginally increases the input projection parameters relative to the full model size. For FewTURE, which provides both Swin-T and ViT-S variants, we report the ViT-S results for a backbone-matched comparison.
| Method | Backbone | ≈ # Params | MiniImageNet | TieredImageNet | ||
|---|---|---|---|---|---|---|
| 5-way 1-shot | 5-way 5-shot | 5-way 1-shot | 5-way 5-shot | |||
| ProtoNet [53] | ResNet-12 | 12.4M | 62.29 ± 0.33 | 79.46 ± 0.48 | 68.25 ± 0.23 | 84.01 ± 0.56 |
| ProtoNet+Depth | ResNet-12 | 12.4M | 67.56 ± 0.21 | 84.11 ± 0.14 | 72.62 ± 0.42 | 86.88 ± 0.16 |
| DN4 [33] | ResNet-12 | 12.4M | 56.93 ± 0.62 | 73.97 ± 0.49 | 66.25 ± 0.75 | 82.62 ± 0.51 |
| DN4+Depth | ResNet-12 | 12.4M | 65.27 ± 0.64 | 82.33 ± 0.40 | 70.83 ± 0.73 | 86.67 ± 0.47 |
| CAN [24] | ResNet-12 | 12.4M | 63.85 ± 0.48 | 79.44 ± 0.34 | 69.89 ± 0.51 | 84.23 ± 0.37 |
| CAN+Depth | ResNet-12 | 12.4M | 70.85 ± 0.48 | 84.81 ± 0.32 | 75.77 ± 0.50 | 87.61 ± 0.37 |
| RFS [55] | ResNet-12 | 12.4M | 62.02 ± 0.63 | 79.64 ± 0.44 | 69.74 ± 0.72 | 84.41 ± 0.55 |
| RFS+Depth | ResNet-12 | 12.4M | 70.03 ± 0.60 | 85.22 ± 0.44 | 75.05 ± 0.72 | 87.98 ± 0.53 |
| FEAT [68] | ResNet-12 | 12.4M | 66.78 ± 0.20 | 82.05 ± 0.14 | 70.80 ± 0.23 | 84.79 ± 0.16 |
| FEAT+Depth | ResNet-12 | 12.4M | 70.92 ± 0.20 | 84.97 ± 0.13 | 73.81 ± 0.23 | 86.61 ± 0.15 |
| Meta-Baseline [7] | ResNet-12 | 12.4M | 63.17 ± 0.23 | 79.26 ± 0.17 | 68.62 ± 0.27 | 83.29 ± 0.18 |
| Meta-Baseline+Depth | ResNet-12 | 12.4M | 68.40 ± 0.52 | 84.10 ± 0.34 | 73.21 ± 0.49 | 87.66 ± 0.25 |
| FRN [63] | ResNet-12 | 12.4M | 66.45 ± 0.19 | 82.83 ± 0.13 | 71.16 ± 0.22 | 86.01 ± 0.15 |
| FRN+Depth | ResNet-12 | 12.4M | 71.61 ± 0.19 | 84.99 ± 0.13 | 75.36 ± 0.22 | 88.38 ± 0.15 |
| RENet [26] | ResNet-12 | 12.4M | 67.60 ± 0.44 | 82.58 ± 0.30 | 71.61 ± 0.51 | 85.28 ± 0.35 |
| RENet+Depth | ResNet-12 | 12.4M | 72.68 ± 0.44 | 86.82 ± 0.29 | 75.19 ± 0.46 | 88.96 ± 0.35 |
| SUN [14] | ViT-S | 22M | 67.80 ± 0.45 | 83.25 ± 0.30 | 72.99 ± 0.50 | 86.74 ± 0.33 |
| SUN+Depth | ViT-S | 22M | 72.08 ± 0.43 | 85.53 ± 0.30 | 75.81 ± 0.49 | 88.92 ± 0.35 |
| FewTURE [23] | ViT-S | 22M | 68.02 ± 0.88 | 84.51 ± 0.53 | 72.96 ± 0.92 | 86.43 ± 0.67 |
| FewTURE+Depth | ViT-S | 22M | 73.34 ± 0.81 | 86.55 ± 0.49 | 76.75 ± 0.92 | 88.78 ± 0.62 |
| SMKD [36] | ViT-S | 22M | 74.28 ± 0.18 | 88.82 ± 0.09 | 78.83 ± 0.20 | 91.02 ± 0.12 |
| SMKD+Depth | ViT-S | 22M | 75.87 ± 0.18 | 89.36 ± 0.10 | 79.52 ± 0.16 | 91.33 ± 0.20 |
| CPEA [20] | ViT-S | 22M | 72.25 ± 0.65 | 87.24 ± 0.38 | 77.12 ± 0.70 | 90.12 ± 0.45 |
| CPEA+Depth | ViT-S | 22M | 75.20 ± 0.41 | 88.29 ± 0.38 | 78.04 ± 0.70 | 90.11 ± 0.41 |
Table 21. FSIC method with RGB-D input results (%) on CIFAR-FS and FC100. The shows confidence intervals.
| Method | Backbone | ≈ # Params | CIFAR-FS | FC100 | ||
|---|---|---|---|---|---|---|
| 5-way 1-shot | 5-way 5-shot | 5-way 1-shot | 5-way 5-shot | |||
| ProtoNet [53] | ResNet-12 | 12.4M | 72.20 ± 0.70 | 83.50 ± 0.50 | 41.54 ± 0.76 | 57.08 ± 0.76 |
| ProtoNet+Depth | ResNet-12 | 12.4M | 76.17 ± 0.66 | 86.92 ± 0.44 | 43.77 ± 0.62 | 60.22 ± 0.74 |
| DN4 [33] | ResNet-12 | 12.4M | 71.88 ± 0.68 | 85.16 ± 0.49 | 39.56 ± 0.56 | 56.50 ± 0.54 |
| DN4+Depth | ResNet-12 | 12.4M | 76.23 ± 0.68 | 88.68 ± 0.41 | 41.47 ± 0.57 | 59.21 ± 0.55 |
| RFS [55] | ResNet-12 | 12.4M | 71.50 ± 0.80 | 86.00 ± 0.50 | 42.60 ± 0.70 | 59.10 ± 0.60 |
| RFS+Depth | ResNet-12 | 12.4M | 75.66 ± 0.74 | 87.94 ± 0.48 | 43.85 ± 0.61 | 60.78 ± 0.59 |
| RENet [26] | ResNet-12 | 12.4M | 74.51 ± 0.46 | 86.60 ± 0.32 | 44.61 ± 0.46 | 60.95 ± 0.41 |
| RENet+Depth | ResNet-12 | 12.4M | 78.57 ± 0.44 | 90.23 ± 0.28 | 45.26 ± 0.41 | 61.67 ± 0.39 |
| SUN [14] | ViT-S | 22M | 78.37 ± 0.46 | 88.84 ± 0.32 | 45.68 ± 0.52 | 61.45 ± 0.66 |
| SUN+Depth | ViT-S | 22M | 81.75 ± 0.49 | 91.25 ± 0.44 | 46.55 ± 0.58 | 62.31 ± 0.61 |
| FewTURE [23] | ViT-S | 22M | 76.10 ± 0.88 | 86.14 ± 0.64 | 46.20 ± 0.79 | 63.14 ± 0.73 |
| FewTURE+Depth | ViT-S | 22M | 80.27 ± 0.82 | 90.25 ± 0.58 | 47.42 ± 0.84 | 64.22 ± 0.73 |
| SMKD [36] | ViT-S | 22M | 80.08 ± 0.18 | 90.63 ± 0.13 | 50.38 ± 0.16 | 68.37 ± 0.16 |
| SMKD+Depth | ViT-S | 22M | 81.20 ± 0.18 | 91.21 ± 0.13 | 51.77 ± 0.17 | 69.63 ± 0.16 |
| CPEA [20] | ViT-S | 22M | 78.27 ± 0.66 | 89.30 ± 0.45 | 46.51 ± 0.58 | 65.18 ± 0.60 |
| CPEA+Depth | ViT-S | 22M | 81.65 ± 0.60 | 90.55 ± 0.41 | 48.06 ± 0.60 | 66.65 ± 0.59 |
Table 22. FSIC method with RGB-D input results (%) on CUB and StanfordCars. The shows confidence intervals.
| Method | Backbone | # Params | CUB | StanfordCars | ||
|---|---|---|---|---|---|---|
| 5-way 1-shot | 5-way 5-shot | 5-way 1-shot | 5-way 5-shot | |||
| ProtoNet [53] | ResNet-12 | 12.4M | ||||
| ProtoNet+Depth | ResNet-12 | 12.4M | ||||
| DN4 [33] | ResNet-12 | 12.4M | ||||
| DN4+Depth | ResNet-12 | 12.4M | ||||
| FEAT [68] | ResNet-12 | 12.4M | ||||
| FEAT+Depth | ResNet-12 | 12.4M | ||||
| RENet [26] | ResNet-12 | 12.4M | ||||
| RENet+Depth | ResNet-12 | 12.4M | ||||
| FewTURE [23] | ViT-S | 22M | ||||
| FewTURE+Depth | ViT-S | 22M | ||||
| SMKD [36] | ViT-S | 22M | ||||
| SMKD+Depth | ViT-S | 22M | ||||
| CPEA [20] | ViT-S | 22M | ||||
| CPEA+Depth | ViT-S | 22M | ||||
| DAFIC (Ours) | ViT-S | 22M | ||||