Abstract
The quality of support sets plays a critical role in few-shot learning. How well class prototypes represent their corresponding categories depends directly on the samples selected to construct these sets during episodic training. In standard implementations of Prototypical Networks, support samples are typically selected at random, which may result in support sets composed of highly similar or redundant samples in the feature space, particularly under limited-data scenarios. Such redundancy compromises prototype quality and may degrade classification performance. To address this issue, this study proposes a Correlation-Aware Support Resampling (CASR) mechanism. CASR evaluates the feature-space distributions of candidate support sets using an independent MobileNetV2 feature extractor and identifies the most suitable support configuration through the mean off-diagonal correlation metric derived from the covariance matrix, aiming to reduce redundancy among support samples while preserving within-class representativeness. Specifically, CASR operates in three steps: (i) candidate support sets are randomly sampled from the available class pool; (ii) feature vectors are extracted using a frozen MobileNetV2, and the mean off-diagonal correlation is computed from the resulting covariance matrix; and (iii) the first configuration satisfying is accepted as the support set, or the initial random set is retained if no valid configuration is found within attempts. The proposed approach is designed as a lightweight and architecture-independent support-set refinement mechanism that operates without modifying either the internal architecture or the learning procedure of Prototypical Networks. Experiments conducted on the MiniImageNet and Omniglot datasets demonstrate that CASR consistently improves performance compared with standard Prototypical Networks based on random support sampling. On MiniImageNet under five-way, five-shot settings, CASR consistently outperforms the ProtoNet baseline across training episodes. At 1000 episodes, CASR achieves with compared to for the baseline. At 1750 episodes, CASR achieves with —the recommended setting offering the best trade-off between accuracy and computational cost—compared to for the baseline, while reaches at 1750 episodes at the cost of approximately higher training time. On Omniglot, where intra-class variance is inherently low, CASR achieves at 1000 episodes and at 1500 episodes with , compared to and for the baseline, respectively. These results confirm that the proposed mechanism is most effective in visually complex datasets with high intra-class variation.
1. Introduction
1.1. Research Background and Existing Problems
Computer vision is a branch of artificial intelligence that focuses on processing and interpreting visual data, such as images and videos, to extract meaningful information. Its fundamental tasks—including image classification, object detection, and segmentation—form the basis of a wide range of applications, such as autonomous driving, industrial quality control, and medical imaging. Image classification is the process of assigning a specific, predefined class to an image based on the visual patterns [1]. Object detection is a task that aims to determine the categories of objects in an image, as well as their spatial positions within the image [2]. The segmentation approach addresses the pixel-level classification problem instead of image-level classification [3].
One of the main drivers of this progress is the widespread adoption of deep learning, particularly convolutional neural networks (CNNs), which have led to a series of landmark architectural advances [4,5,6,7,8,9,10,11]. These achievements were made possible not only by architectural innovations but also by large-scale annotated datasets such as ImageNet [12] and the rapid growth of computational resources.
Although significant progress has been made in deep learning-based image recognition methods, the high performance of these models depends largely on the availability of large-scale, labeled datasets. When applied to previously unseen data distributions or categories represented by a limited number of samples, significant drops in model performance can be observed [13]. In contrast, human visual cognition is highly successful at learning new concepts from a very small number of samples and generalizing these concepts to new situations [14]. This difference provides a strong motivation for developing methods capable of learning new classes using a limited number of samples.
1.2. Existing Solutions and Their Limitations
In this context, few-shot learning (FSL) has emerged as an important research area focused on developing models that can generalize to novel classes from only a small number of labeled samples [15]. The main approaches in this field include optimization-based methods, which aim to enable rapid adaptation to new tasks [16]; hallucination-based methods, which augment limited training data with generated samples or features [17]; and metric-based methods, which learn to measure similarities between samples in a learned representation space [18].
Metric-based few-shot learning methods classify query samples by measuring their similarity to support samples in a learned representation space [18,19,20,21,22]. Among these methods, Prototypical Networks [20] are notable for their conceptual simplicity and strong empirical performance. In this framework, each class is represented by a prototype computed as the mean of the embedding vectors corresponding to its support samples. Query samples are then classified according to their distance from the class prototypes. Consequently, the quality and representational capacity of the prototypes depend directly on the informativeness of the samples in the support set.
In Prototypical Networks and other metric-based few-shot learning methods, the composition of the support set directly affects the resulting class representation. In standard episodic learning schemes, support samples are typically sampled at random from the available samples of each class, without considering how those samples are distributed in the embedding space. When the selected support samples are concentrated in highly similar regions of the feature space—indicating strong intra-class correlation—the resulting prototype may fail to capture the underlying distribution of the class. This can reduce generalization performance on query samples.
1.3. Proposed Method and Contributions
This study addresses the following research question: Can systematic evaluation of intra-class correlation among support samples improve prototype quality and classification performance in few-shot learning, without modifying the underlying network architecture?
To address this issue, we propose a Correlation-Aware Support Resampling (CASR) approach that evaluates the relationships among support samples before prototype computation, thereby constructing a more representative support set without modifying the underlying network architecture.
The main contributions of this study are as follows:
- (i)
- We define a covariance-matrix-based quality metric () that summarizes the diversity and intra-class consistency of support-set samples in the feature space using a single scalar value;
- (ii)
- We develop an iterative Correlation-Based Support Resampling algorithm guided by this metric;
- (iii)
- Through experiments with Prototypical Networks on the Omniglot and MiniImageNet datasets, we demonstrate that the proposed mechanism can serve as an architecture-independent enhancement layer. The mechanism operates solely on the extracted feature vectors and does not require any modification to the underlying network architecture.
The remainder of the paper is organized as follows: Section 2 reviews the literature on FSL, metric-based methods, and existing work on support set selection. Section 3 presents the proposed CASR approach in detail. Section 4 reports on the experimental setup, the datasets used, comparative results, and ablation analyses. In Section 5, the findings are discussed, and the implications and limitations of the proposed approach are evaluated. Finally, in Section 6, the main results of the study are summarized, and research directions for future work are provided.
2. Related Works
This section reviews the existing literature on few-shot learning, metric-based methods, and support-set quality.
2.1. Few-Shot Learning
Traditional deep learning architectures are trained to assign data to predefined, fixed categories. Class-specific layers at the end of these architectures, such as Softmax, structurally couple feature extraction with the classification decision. Consequently, the model must discriminate each learned representation through a fixed weight matrix defined over N classes. As a result, the optimization process focuses primarily on learning decision boundaries that separate the existing N classes, rather than structuring the geometry of the latent space to preserve the intrinsic and morphological relationships within the data. This limits the generalizability of the feature space to novel classes. When presented with an -th class that was not observed during training, the model may incorrectly assign the input to one of the existing classes with high confidence; recognizing the new class typically requires restructuring the output layer and retraining the model with additional data.
Few-shot learning aims to overcome this limitation by modeling the semantic similarities and distances between samples rather than memorizing objects through absolute class labels. Through metric-based, class-agnostic representations, FSL methods can distinguish novel classes that were not observed during training using only one or a few reference samples, without modifying the architecture or retraining the model from scratch. This approach is closely related to the learning-to-learn paradigm, in which the model seeks to learn the structure shared across tasks rather than solving a single task, thereby enabling faster adaptation to new tasks [23].
The standard formulation of the few-shot learning problem is based on an N-way K-shot episodic setup. Each episode consists of a task involving N distinct classes. For each class, K labeled samples are selected to form the support set (), while the remaining samples constitute the query set () (Equation (1)):
Here, denotes the input samples; denotes its class label; and T represents the maximum number of query samples available for each class. Using the information obtained from the support set , the model learns to assign the samples in the query set () to their correct classes. When or , the model must classify query samples using only one or five support samples per class, respectively. These settings are referred to as one-shot and five-shot learning and represent the standard evaluation protocols in this field [18].
Let , , and denote the sets of classes used during training, validation, and testing, respectively. The disjointness conditions , , and are satisfied. This separation of classes makes it possible to evaluate the extent to which the model can generalize to classes that it has not encountered during training.
2.2. Metric-Based Methods
Metric-based FSL approaches are based on the learning of an embedding space in which similarities or distances between query samples and support samples are measured. Siamese Networks are proposed by Koch et al. [19], in which the distance between pairs of samples is modeled using twin networks with shared weights. This work is regarded as one of the foundational studies in metric-based FSL. Matching Networks are introduced by Vinyals et al. [18] through the systematic adaptation of the episodic training paradigm to few-shot learning. In this approach, query samples are associated with the support set through an attention mechanism, and consistency between the training and testing conditions is emphasized. Prototypical Networks are proposed by Snell et al. [20], in which each class is represented by a prototype computed as the mean of the embedding vectors of its support samples. Query samples are classified according to their squared Euclidean distances from these class prototypes. Owing to their conceptual simplicity and strong empirical performance, Prototypical Networks have been established as one of the most widely used baseline methods in metric-based few-shot learning. Relation Networks were subsequently developed by Sung et al. [21], in which a relation module is used to learn the relationships between query and support samples end-to-end instead of relying on a fixed distance function.
Subsequent studies have extended these baseline frameworks in terms of distance metrics and class representations. In this context, TADAM [24] demonstrated that metric scaling and task conditioning can substantially alter the optimization dynamics in FSL, and a task-dependent metric space is designed. In DeepEMD [25], structural matching between dense regional representations is formulated from an optimal-matching perspective, and the query–support relationship is modeled as a differentiable module through the Earth Mover’s Distance (EMD). To capture differences between distributions through higher-order statistical dependencies, Deep Brownian Distance Covariance (DeepBDC) [26] is integrated into few-shot classification by measuring, through characteristic functions, the discrepancy between the joint distribution of embedded features and the product of their marginal distributions. In AMMD [27], which focuses on the problem of selectivity, the distance between query samples and support classes is estimated using Attentive Maximum Mean Discrepancy. Greater emphasis on discriminative components in MMD estimation is intended through an attention-based distribution-generation component. In AdptGL-CA [28], global and local features are adaptively fused during similarity computation to enhance class separability, while improved generalization performance is pursued through attention-based and contrastive learning objectives.
2.3. Support Set Selection in Few-Shot Learning
In metric-based FSL, prototype quality is directly dependent on the distribution of the support set in the feature space. As emphasized by Snell et al. [20], a prototype vector is computed as the mean of the embedding vectors of the support samples. Therefore, the positions of support samples in the feature space are a key factor in determining class representation. However, in standard episodic training schemes, support samples are selected randomly without considering their distribution in the embedding space.
The adverse effect of intra-class variation on prototype quality has been addressed from several perspectives in the literature. In Han et al. [29], support samples were modeled as class distributions rather than point estimates through a variational autoencoder, thereby providing greater robustness to variation within the support set. LERENet was developed by Ding et al. [30] by combining graph convolution with a multi-prototype reasoning mechanism to reduce intra-class differences. Liu et al. [31] proposed KMIPMT, in which intermediate prototypes bridging the support and query sets were learned iteratively. While these studies aim to improve the quality of class representations at the architectural level, the proposed approach directly addresses the support-set sampling process and seeks to reduce correlation-induced bias through resampling.
Only a limited number of studies have directly addressed support-set diversity. Majee et al. [32] developed the SMILe framework, in which diversity among support samples was encouraged through submodular mutual-information functions. An improvement of up to 5.7% in novel-class performance was reported for the object-detection task. Huang et al. [33] proposed the PDA approach, in which the most informative support samples were selected through a best-of-K matching strategy.
Table 1 provides a structured comparison of the reviewed methods in terms of their support-set intervention strategy, selection criterion, use of an auxiliary model, and architectural modifications. Most existing studies address support-set quality at the architectural level through variational representations [29], multi-prototype mining [31], or the reduction of intra-class variation [30]. In contrast, CASR introduces a correlation-based resampling mechanism that operates via an independent auxiliary model without modifying the underlying network architecture, representing a complementary approach to existing methods.
Table 1.
Comparison of metric-based few-shot learning methods in terms of support-set intervention strategy.
3. Proposed Method
3.1. Problem Definition
In standard K-shot learning, K samples are selected from each class to form the support set. In existing implementations of Prototypical Networks, these samples are typically selected at random, and their distribution in the embedding space is not considered during the selection process. This approach can produce acceptable results on large-scale datasets where sufficient sample diversity can be obtained by chance. However, this assumption may no longer hold in few-shot learning scenarios, particularly for datasets with high visual complexity.
In handwritten-character datasets such as Omniglot, intra-class variation is naturally limited. Since the classes are visually well separated, random support-sample selection can often provide an adequate class representation. In contrast, the situation is substantially different for natural-image datasets such as MiniImageNet and TieredImageNet. These datasets exhibit high intra-class variation arising from differences in pose, background, and illumination, as well as high inter-class similarity between visually similar categories. These characteristics make such datasets qualitatively more challenging benchmarking environments [34,35].
Formally, given a support set for class k, the class prototype is computed as
where denotes the embedding function parameterized by . A query sample is then classified by finding the nearest prototype:
where denotes the squared Euclidean distance. It follows that the quality of is directly determined by the composition of . When support samples are concentrated in similar regions of the feature space—indicating high intra-class correlation— the prototype deviates from the true class center, increasing the risk of misclassification.
Under these conditions, randomly selected support samples are more likely to represent only a limited subregion of the class distribution. Consequently, the computed prototype may deviate from the underlying class center, thereby reducing the model’s generalization capacity. This observation suggests that support-set selection should not be left to random sampling alone; instead, it should be guided by a systematic mechanism based on distributional information in the feature space. Accordingly, the proposed CASR approach aims to improve prototype quality systematically by quantifying the diversity and intra-class consistency of support samples in the embedding space.
3.2. Feature Representation with MobileNetV2
To quantify support-set quality, the samples must be represented in a meaningful feature space. A critical design choice is to ensure that the feature extractor used for this purpose is independent of the training process of the Prototypical Network. Using ProtoNet’s own embedding function, Conv4, for quality assessment could affect the model’s gradient flow and training dynamics, making an objective evaluation more difficult. Therefore, a pretrained model that is completely independent of the training process was selected for quality assessment.
MobileNetV2 [36] is built upon inverted residual blocks with linear bottlenecks, which apply depthwise separable convolutions to substantially reduce the number of parameters and multiply-add operations compared to standard convolutional layers such as those used in ResNet or VGG. This design enables competitive feature extraction performance at a fraction of the computational cost, making it well-suited for the iterative resampling procedure employed in CASR.
MobileNetV2 is selected as the independent feature extractor for the following main reasons. Owing to its pretraining on ImageNet, MobileNetV2 can produce strong and generalizable visual features. Its lightweight architecture limits the additional computational cost introduced by the resampling procedure. The classification head is removed, and the output of the global average pooling layer is used as a feature vector of dimension . The model weights are frozen throughout the training process, and no parameters are updated.
Accordingly, for each support sample , a feature vector is extracted using MobileNetV2. The feature vectors obtained for all K support samples form a feature matrix . This matrix is used as the input for computing the correlation-based quality metric in the subsequent step.
3.3. Correlation-Based Quality Metric
An objective and computable quality measure is required to evaluate the distribution of the support set in the feature space. In this section, the proposed correlation-based quality metric is defined step by step. The computation consists of four consecutive stages: feature centering, covariance-matrix construction, conversion to a correlation matrix, and computation of the mean off-diagonal correlation.
After the feature matrix has been obtained, the features are centered column-wise by subtracting the mean of each column (Equation (4)):
This step allows the relative distributions of the feature vectors to be evaluated independently of their absolute magnitudes. The covariance matrix between the samples is computed using the centered feature matrix (Equation (5)):
Note that captures the co-variation between support samples rather than between feature dimensions. It is then converted into a correlation matrix by dividing each element by the product of the corresponding standard deviations, as given in Equation (6).
The scalar quality that characterizes the overall correlation level of the support set is defined as the mean of the absolute values of the off-diagonal elements of the correlation matrix (Equation (7)):
Since the absolute value of the Pearson correlation coefficient is taken, each element lies in the range , and consequently . The threshold value is defined in the interval and is determined empirically based on the correlation distribution of each dataset prior to training, as described in Section 4.
The value of admits the following interpretation. When is very low (), the support samples exhibit little mutual correlation, which may indicate that the selected samples are noisy or fail to collectively represent a coherent class distribution. When , the support samples share a sufficient degree of intra-class coherence to form a meaningful class representation. When , the support samples are highly similar to one another, indicating an overly homogeneous support set that captures only a narrow subregion of the class distribution. Accordingly, the threshold condition is designed to ensure a minimum level of intra-class consistency while avoiding the selection of maximally correlated configurations through the first-accepted strategy.
3.4. Proposed Resampling Algorithm
Once the correlation-based quality metric has been defined, an iterative resampling mechanism is required to optimize the support set using this metric. The algorithm operates independently for each class and searches for the best support-set configuration that satisfies the specified quality condition. During the resampling process, a support set is considered acceptable only if its calculated value exceeds the threshold defined in Equation (8):
The threshold condition serves two purposes. First, it eliminates configurations with very low correlation and, consequently, insufficient intra-class consistency. Second, it establishes a balance between intra-class consistency and feature diversity by selecting the first configuration that satisfies the threshold condition. The effect of the selected value on performance is examined in detail through the ablation studies presented in Section 4. The proposed resampling procedure is given in Algorithm 1.
| Algorithm 1 CASR |
| Require: Class samples , shot number K, threshold , maximum number of trials Ensure: Optimized support set
|
Once the iterative process is completed, the first configuration satisfying the threshold condition is selected as the final support set, and the search is terminated. If no configuration satisfying the threshold condition is found within trials, the algorithm falls back to the support set selected randomly at the beginning. This design ensures that the initial random support set is retained when the threshold condition cannot be satisfied.
3.5. Integration of the CASR Approach into Prototypical Networks
The proposed resampling mechanism is integrated as a preprocessing step that does not interfere with the standard episodic training loop of the Prototypical Network. As shown in Figure 1, Algorithm 1 is activated after the support set is determined at the beginning of each episode. Candidate support sets that do not meet the quality threshold are discarded and replaced through resampling until the first candidate satisfying the threshold condition is found. The resulting support set is then passed to the standard ProtoNet pipeline, while prototype computation and query classification proceed without modification. It is important to note that CASR is applied exclusively during episodic training. At test time, the standard K-shot evaluation protocol is followed: only K labeled support samples are provided per novel class, and no resampling is performed. The improvement in classification performance therefore reflects better generalization achieved through higher-quality training episodes.
Figure 1.
Overview of the proposed method and integration of the CASR approach into the Prototypical Network training loop.
The proposed integration approach offers three main advantages. First, it is architecture-independent: the resampling mechanism does not interfere with the internal structure of Prototypical Network and only optimizes the support-set input. Consequently, the approach can be readily adapted to other metric-based methods that use support sets. Second, it preserves training stability. Since the MobileNetV2 weights are frozen, quality assessment is performed outside Prototypical Network’s computational graph, and gradient flow remains unaffected. Third, it provides a fallback mechanism: when the threshold condition cannot be satisfied, the algorithm returns to the initially selected support set and preserves the standard Prototypical Network pipeline.
4. Experimental Results
For the experimental evaluation of the proposed CASR approach, the datasets and experimental setup are described, followed by a presentation of the comparative results.
4.1. Datasets
Omniglot [37] is a dataset comprising 1623 characters from 50 different alphabets, with 20 handwritten samples provided for each character. In accordance with the split commonly used in the literature, the dataset was divided into training, validation, and test subsets. The images were used as single-channel images with a resolution of pixels. For the Omniglot dataset, the standard split defined by Vinyals et al. [18] is adopted, which has become the de facto standard for few-shot learning experiments on this dataset. This split ensures that the reported results are directly comparable with prior few-shot learning methods that follow the same protocol, including Matching Networks and Prototypical Networks. Both Omniglot and MiniImageNet are well-established public benchmarks with verified ground-truth labels, ensuring the reliability of the experimental evaluation.
MiniImageNet is a 100-class subset derived from the ImageNet dataset. Each class contains 600 samples, and the classes are divided into 64 training, 16 validation, and 20 test classes [38]. The images were resized to a resolution of pixels.
4.2. Experimental Setup
All experiments, model training, and evaluations were conducted on a dedicated local workstation to ensure computational consistency. The hardware configuration of the system features a 5th-generation Intel processor (8 cores, 2.35 GHz base clock frequency) coupled with 32 GB of system memory (RAM), ensuring efficient handling of concurrent processing tasks. For data storage and rapid dataset retrieval, the system is equipped with a 1 TB SSD storage drive. To accelerate the computationally intensive tasks and model training, an NVIDIA RTX A4500 Graphics Processing Unit (GPU) is utilized. The software environment is established on the Ubuntu 22.04 LTS operating system. All learning models and algorithms are implemented using the PyTorch 2.0 framework, with GPU hardware acceleration facilitated by the CUDA 11.8 toolkit.
The standard Conv-4 architecture, consisting of four convolutional blocks, is used as the embedding function of the Prototypical Network [20]. Each convolutional block comprises a convolutional layer, batch normalization, and a ReLU activation function, followed by max pooling. ImageNet-pretrained MobileNetV2 [36] is used as the independent feature extractor, and its weights are frozen throughout training. The maximum number of trials in the resampling algorithm is set to =10,000. To evaluate the effectiveness of the proposed method, representative metric-based few-shot learning methods from the literature are included for comparison. Specifically, Matching Networks [18], Relation Networks [21], and standard Prototypical Networks with randomly selected support samples [20] are used as baseline methods.
The threshold value is determined by computing the mean correlation values of randomly sampled support sets for each dataset before training. This preliminary analysis provides a reference range for the overall correlation distribution of each dataset and guides the selection of an appropriate value. Since intra-class similarity is high in Omniglot, which consists of handwritten characters, the correlation values are naturally higher. Therefore, is evaluated. In contrast, the greater visual diversity in MiniImageNet, which consists of natural images, results in relatively lower correlation values. Accordingly, is used for this dataset.
4.3. Quantitative Results
The methods selected as baselines in this study can be described as follows. Matching Networks [18] classify query samples by computing weighted similarities to all support samples using an attention mechanism. Relation Networks [21] learn a non-linear similarity function via a dedicated relation module. ProtoNet [20] assigns each class a mean prototype and classifies queries by nearest-prototype distance.
To ensure a fair comparison, all methods are evaluated under identical conditions: the same Conv-4 backbone, the same dataset splits, the same five-way, five-shot episodic protocol, and the same evaluation metric (mean accuracy over 600 test episodes). Results for Matching Networks and Relation Networks are taken from their original papers under comparable settings.
The performance gain of CASR over baseline methods can be attributed to the quality of the support set used for prototype computation. While all baselines rely on randomly selected support samples, CASR systematically filters out configurations with insufficient intra-class coherence. This leads to more representative prototypes, which in turn reduces the distance between query samples and their true class centers.
The classification performance of the proposed method on the MiniImageNet dataset is given in Table 2. According to the comparative results, Matching Networks [18] and Relation Networks [21] achieved accuracies of and , respectively, as reported in their original publications. Our implementation of ProtoNet achieved at 1000 training episodes and at 1750 episodes. The proposed CASR mechanism consistently outperforms the ProtoNet baseline across training episodes. With , CASR achieves at 1000 episodes and at 1750 episodes, requiring only the computational cost of ProtoNet at the same episode count. With , the highest accuracy of is achieved at 1750 episodes; however, the training time increases to min, approximately that of the baseline. These results indicate that provides a more suitable balance between accuracy and computational cost.
Table 2.
Comparison of 5-way 5-shot classification accuracy and training time on the MiniImageNet dataset. Results for Matching Networks and Relation Networks are reported from their respective original publications. † denotes results obtained from our own implementation under identical experimental conditions.
The classification results on the Omniglot dataset are given in Table 3. Matching Networks [18] and Relation Networks [21] achieve accuracies of and , respectively, as reported in their original publications. Our implementation of ProtoNet achieves at 1000 training episodes and at 1500 episodes. The proposed CASR mechanism with achieves at 1000 episodes and at 1500 episodes, consistently outperforming the ProtoNet baseline. Since Omniglot consists of handwritten characters, intra-class variation is naturally low, and consequently all methods achieve accuracies above . The differences between methods remain relatively small, which supports the hypothesis that CASR provides more substantial benefits on datasets with higher intra-class variation such as MiniImageNet.
Table 3.
Comparison of 5-way 5-shot classification accuracy and training time on the Omniglot dataset. Results for Matching Networks and Relation Networks are reported from their respective original publications. † denotes results obtained from our own implementation under identical experimental conditions.
4.4. Qualitative Results
To visually evaluate the effectiveness of the proposed method, a comparative analysis is conducted on three episodes selected from different stages of training, using the baseline Prototypical Network as a reference. Figure 2, Figure 3, and Figure 4 highlight the support and query samples from Episodes 1, 350, and 538, respectively, along with the predictions obtained using the baseline and proposed methods. Each column in the figures represents one of the five classes selected for the episode. The support sample is shown in the top row, while the query sample is shown in the bottom row, together with their respective class indices. The values in parentheses indicate the softmax probability assigned to the predicted class. The symbols ✗ and ✓ denote incorrect and correct predictions, respectively.
Figure 2.
Qualitative comparison between the baseline ProtoNet and the proposed CASR method on Episode 1.
Figure 3.
Qualitative comparison between the baseline ProtoNet and the proposed CASR method on Episode 350.
Figure 4.
Qualitative comparison between the baseline ProtoNet and the proposed CASR method on Episode 538.
The results show that the baseline Prototypical Network can consistently assign query samples to incorrect classes because of the randomly selected support set. In particular, in Episode 350, all five query samples are predicted as belonging to Class 18 by the baseline method. This suggests that a homogeneous support set may bias the prototype toward a particular class. In contrast, the proposed CASR approach produces more diverse and representative support sets through correlation-based resampling. All query samples are correctly classified in the three episodes examined. This qualitative observation provides supporting evidence that CASR can remain effective at different stages of training.
4.5. Ablation Study
The threshold values used in the experiments were determined based on a preliminary empirical observation conducted before the main experiments. Specifically, support set candidates of size K were repeatedly sampled at random from the training classes of each dataset, and their mean off-diagonal correlation was computed using the same MobileNetV2-based method employed by CASR. This preliminary observation revealed that, under normal (unfiltered) random sampling, intra-class correlation values for MiniImageNet typically fluctuate in the range of approximately 0.20–0.25. This observation served as the reference point for defining a meaningful threshold sweep: values within and slightly above this natural range () were selected to ensure that the resampling approach has a realistic opportunity to provide a meaningful improvement over random sampling. Thresholds set well below the natural range would be trivially satisfied and offer no filtering benefit, while thresholds set well above it would rarely be met within a feasible number of attempts. For Omniglot, where intra-class similarity is inherently higher, the preliminary analysis indicated naturally higher correlation values, leading to the evaluation of .
An ablation study is conducted to investigate the role of the threshold value , the hyperparameter with the most critical effect on the performance of the proposed method. Separate training runs are conducted for each value of . For each training configuration, the model is evaluated on 600 test episodes after 250, 500, 750, …, 2000 training episodes, and the resulting accuracy values are recorded. As shown in Figure 5, all threshold values outperformed the baseline Prototypical Network. The highest accuracy, 66.5%, is obtained with ; however, is recommended as a better trade-off between accuracy and computational cost. At lower values, the algorithm was observed to approach standard random sampling, whereas at higher values, the probability of finding a support set that satisfies the threshold condition decreased. These findings highlight the importance of selecting an appropriate value of for the proposed method.
Figure 5.
Test accuracy of different threshold values () across training episodes on the MiniImageNet dataset.
4.6. Computational Cost Analysis
It is clear that the proposed resampling approach introduces additional computational overhead compared with standard Prototypical Network training. Table 4 reports the cumulative training times, in minutes, as a function of the number of episodes for different threshold values. For lower threshold values (), the training time remains comparable to that of the baseline method. However, at , the number of resampling attempts increases because finding a candidate support set that satisfies the threshold condition becomes more difficult, leading to a substantial increase in training time. With the proposed value of , training for 1750 episodes requires 47.39 min, corresponding to approximately 1.5 times the computational cost of the baseline method, which requires 30.88 min. In contrast, results in a training time of 449.89 min, corresponding to approximately 14.6 times the baseline cost. These findings show that the choice of the threshold value directly affects not only classification performance but also computational cost.
Table 4.
Training time (minutes) for different threshold values () across training episodes on MiniImageNet.
5. Discussion
The experimental results demonstrate that CASR consistently improves classification accuracy over the standard Prototypical Network baseline across both datasets. On MiniImageNet, where natural images exhibit high intra-class variance, the improvement is more pronounced—achieving with at 1750 episodes, compared to for the baseline at the same checkpoint. When support samples are highly correlated in the feature space, the original prototype fails to capture the true class distribution, and a correlation-aware resampling strategy can effectively handle this limitation.
On Omniglot, where handwritten characters exhibit inherently low intra-class variance, the improvement is marginal ( at 1500 episodes vs. for the baseline, and at 1000 episodes vs. for the baseline). Since support samples in this dataset are already relatively similar in the feature space, the resampling mechanism has limited room to improve prototype quality. CASR does not reduce performance on Omniglot because the initial support set is preserved whenever the resampling procedure fails to identify a valid configuration.
The ablation study on training time reveals an important trade-off between accuracy and computational cost. While achieves the highest accuracy (), it requires approximately more training time than the baseline. In contrast, offers a more practical configuration, achieving accuracy with the baseline training time. These findings suggest that the choice of threshold is critical not only for classification performance but also for the practical deployability of the method.
Some limitations of the proposed approach should be taken into account. First, the threshold value is determined empirically based on the correlation distribution of each dataset, which requires an additional preliminary analysis step. An adaptive threshold mechanism that automatically adjusts based on dataset statistics would enhance the generalizability of the method. Second, while MobileNetV2 provides generalizable features that are effective across datasets, exploring domain-specific or self-supervised feature extractors could further improve support-set quality assessment in specialized domains such as medical imaging or remote sensing, where visual characteristics differ substantially from natural images. It should be noted, however, that MobileNetV2 serves solely as a fixed correlation assessor with no role in classification. The fact that CASR maintains competitive performance on Omniglot—a dataset entirely unrelated to ImageNet—confirms that the observed gains reflect the effectiveness of the correlation-based assessment rather than ImageNet-specific knowledge.
The findings of this study highlight the importance of support set quality in episodic few-shot learning. While most existing approaches address this challenge at the architectural level—through multi-prototype representations, attention mechanisms, or distribution modeling—CASR targets the support selection stage directly, offering a perspective that complements rather than competes with existing methods. Since the mechanism does not modify the underlying network architecture, it can be applied to other metric-based few-shot learning methods beyond Prototypical Networks.
From a practical perspective, CASR is particularly relevant in episodic few-shot learning scenarios where the quality of the selected support samples directly determines prototype representativeness. Even when the same number of support samples is available, poorly selected configurations can lead to biased prototypes and degraded classification performance. In medical imaging, for instance, a support set consisting of visually similar samples of a rare condition may fail to capture the full intra-class variation, reducing diagnostic reliability. In industrial quality control, support samples of a defect category that are concentrated in a narrow region of the feature space may result in a prototype that misses atypical defect appearances. In agricultural applications, plant disease recognition from field samples faces the same challenge: support samples captured under similar lighting or growth conditions may produce an unrepresentative prototype, leading to misclassification of disease variants. In all these settings, CASR may help address this challenge by filtering out support configurations with insufficient intra-class diversity before prototype computation.
6. Conclusions
In this study, a Correlation-Aware Support Resampling (CASR) approach is proposed to mitigate the limitations caused by randomness in the support-set selection process of Prototypical Networks. The proposed approach evaluates the distribution of candidate support sets in the feature space using an independent MobileNetV2 feature extractor and aims to select more representative support sets. Experiments conducted on the MiniImageNet and Omniglot datasets under a five-way, five, -shot setup show that CASR can improve performance compared with the standard Prototypical Network. The highest accuracy, 66.5%, is achieved with a threshold of , whereas provided an accuracy of 66.2% at 1750 episodes compared to for the baseline, at a substantially lower computational cost, making it a more balanced option for practical use. The qualitative analyses indicate that the proposed method is effective at the different training stages examined and can reduce errors associated with homogeneous support sets observed in the baseline method.
These findings demonstrate that systematic evaluation of intra-class correlation among support samples can improve prototype quality and classification performance in few-shot learning, without requiring any modification to the underlying network architecture.
Several directions for future work follow directly from the limitations identified in this study. First, the current approach requires a preliminary empirical analysis to determine the threshold value for each dataset. Developing an adaptive threshold mechanism that automatically adjusts based on the statistical properties of the dataset would eliminate this manual step and improve the generalizability of the method. Second, the use of MobileNetV2 as an independent feature extractor introduces a dependency on ImageNet pre-training, which may limit performance in domains that differ significantly from natural images. Future work could explore domain-specific feature extractors or self-supervised alternatives for support-set quality assessment. Finally, extending CASR to other metric-based few-shot learning methods beyond Prototypical Networks—including Matching Networks, Relation Networks, and Siamese Networks—remains an important direction for future investigation.
Furthermore, a systematic comparison with simple diversity-based support-selection alternatives—such as max-min distance selection, k-medoids, and cosine-diversity selection—would further validate the contribution of the correlation-based criterion employed in CASR and is identified as an important direction for future investigation.
Author Contributions
Conceptualization, U.Y., O.A. and K.K.; methodology, U.Y. and O.A.; software, İ.K.Y.; validation, İ.K.Y. and U.Y.; formal analysis, U.Y. and O.A.; investigation, U.Y. and İ.K.Y.; resources, K.K. and O.A.; data curation, İ.K.Y.; writing—original draft preparation, U.Y.; writing—review and editing, O.A. and K.K.; visualization, U.Y. and İ.K.Y.; supervision, K.K. and O.A.; project administration, K.K. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The data used in this study are publicly available. The MiniImageNet dataset can be accessed through the original source [18] with the train/validation/test splits proposed by [38]. The source code and experimental results supporting the findings of this study are available from the corresponding author upon reasonable request.
Conflicts of Interest
U.Y. and O.A. are affiliated with both Kocaeli University and DigiNova Information Technologies Inc. The authors declare no conflicts of interest.
References
- Chen, L.; Li, S.; Bai, Q.; Yang, J.; Jiang, S.; Miao, Y. Review of Image Classification Algorithms Based on Convolutional Neural Networks. Remote Sens. 2021, 13, 4712. [Google Scholar] [CrossRef] [Scilit]
- Zou, Z.; Chen, K.; Shi, Z.; Guo, Y.; Ye, J. Object Detection in 20 Years: A Survey. Proc. IEEE 2023, 111, 257–276. [Google Scholar] [CrossRef] [Scilit]
- Minaee, S.; Boykov, Y.; Porikli, F.; Plaza, A.; Kehtarnavaz, N.; Terzopoulos, D. Image Segmentation Using Deep Learning: A Survey. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 44, 3523–3542. [Google Scholar] [CrossRef] [Scilit]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet Classification with Deep Convolutional Neural Networks. In Proceedings of the Advances in Neural Information Processing Systems 25 (NIPS 2012), Lake Tahoe, NV, USA, 3–6 December 2012. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 26 June–1 July 2016. [Google Scholar]
- Hu, J.; Shen, L.; Sun, G.; Samuel, A.; Enhua, W. Squeeze-and-Excitation Networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018; pp. 7132–7141. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. CBAM: Convolutional Block Attention Module. In Proceedings of the European Conference on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- Dosovitskiy, A.; Beyer, L.; Kolesnikov, A.; Weissenborn, D.; Zhai, X.; Unterthiner, T.; Dehghani, M.; Minderer, M.; Heigold, G.; Gelly, S.; et al. An Image Is Worth 16x16 Words: Transformers for Image Recognition at Scale. In Proceedings of the International Conference on Learning Representations (ICLR), Vienna, Austria, 3–7 May 2021. [Google Scholar]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), Montreal, QC, Canada, 11–17 October 2021; pp. 10012–10022. [Google Scholar]
- Liu, Z.; Mao, H.; Wu, C.-Y.; Feichtenhofer, C.; Darrell, T.; Xie, S. A ConvNet for the 2020s. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 19–20 June 2022; pp. 11976–11986. [Google Scholar]
- Deng, J.; Dong, W.; Socher, R.; Li, L.-J.; Li, K.; Li, F.F. ImageNet: A Large-Scale Hierarchical Image Database. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Miami Beach, FL, USA, 20–25 June 2009. [Google Scholar]
- Recht, B.; Roelofs, R.; Schmidt, L.; Shankar, V. Do ImageNet Classifiers Generalize to ImageNet? In Proceedings of the 36th International Conference on Machine Learning (ICML), Long Beach, CA, USA, 9–15 June 2019; PMLR: Cambridge, MA, USA, 2019; Volume 97, pp. 5389–5400. [Google Scholar]
- Lake, B.M.; Ullman, T.D.; Tenenbaum, J.B.; Gershman, S.J. Building machines that learn and think like people. Behav. Brain Sci. 2017, 40, e253. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Yao, Q.; Kwok, J.T.; Ni, L.M. Generalizing from a Few Examples: A Survey on Few-Shot Learning. ACM Comput. Surv. 2020, 53, 63. [Google Scholar]
- Finn, C.; Abbeel, P.; Levine, S. Model-Agnostic Meta-Learning for Fast Adaptation of Deep Networks. In Proceedings of the 34th International Conference on Machine Learning (ICML), Sydney, Australia, 6–11 August 2017; pp. 1126–1135. [Google Scholar]
- Hariharan, B.; Girshick, R. Low-Shot Visual Recognition by Shrinking and Hallucinating Features. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Venice, Italy, 22–29 October 2017; pp. 3018–3027. [Google Scholar]
- Vinyals, O.; Blundell, C.; Lillicrap, T.; Kavukcuoglu, K.; Wierstra, D. Matching Networks for One Shot Learning. In Proceedings of the Advances in Neural Information Processing Systems 29 (NIPS 2016), Barcelona, Spain, 5–10 December 2016; NeurIPS: San Diego, CA, USA, 2016; Volume 29, pp. 3630–3638. [Google Scholar]
- Koch, G.; Zemel, R.; Salakhutdinov, R. Siamese Neural Networks for One-Shot Image Recognition. In Proceedings of the ICML Deep Learning Workshop, Lille, France, 10–11 July 2015; JMLR: Brookline, MA, USA, 2015; Volume 2. [Google Scholar]
- Snell, J.; Swersky, K.; Zemel, R.S. Prototypical Networks for Few-Shot Learning. In Proceedings of the Advances in Neural Information Processing Systems 30 (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; NeurIPS: San Diego, CA, USA, 2017; Volume 30, pp. 4077–4087. [Google Scholar]
- Sung, F.; Yang, Y.; Zhang, L.; Xiang, T.; Torr, P.H.S.; Hospedales, T.M. Learning to Compare: Relation Network for Few-Shot Learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018; pp. 1199–1208. [Google Scholar]
- Garcia, V.; Bruna, J. Few-Shot Learning with Graph Neural Networks. In Proceedings of the International Conference on Learning Representations (ICLR), Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Hospedales, T.M.; Antoniou, A.; Micaelli, P.; Storkey, A.J. Meta-Learning in Neural Networks: A Survey. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 44, 5149–5169. [Google Scholar] [CrossRef] [Scilit]
- Oreshkin, B.N.; López, P.R.; Lacoste, A. TADAM: Task Dependent Adaptive Metric for Improved Few-Shot Learning. In Proceedings of the Advances in Neural Information Processing Systems 30 (NIPS 2017), Long Beach, CA, USA, 4–9 December 2017; pp. 721–731. [Google Scholar]
- Zhang, C.; Cai, Y.; Lin, G.; Shen, C. DeepEMD: Differentiable Earth Mover’s Distance for Few-Shot Learning. IEEE Trans. Pattern Anal. Mach. Intell. 2022, 45, 3632–3647. [Google Scholar] [CrossRef] [Scilit]
- Xie, J.; Long, F.; Lv, J.; Wang, Q.; Li, P. 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), New Orleans, LA, USA, 19–20 June 2022. [Google Scholar] [CrossRef] [Scilit]
- Wu, J.; Wang, S.; Sun, J. AMMD: Attentive Maximum Mean Discrepancy for Few-Shot Image Classification. Pattern Recognit. 2024, 155, 110680. [Google Scholar] [CrossRef] [Scilit]
- Song, Z.; Wang, P.; Wang, X.; Zheng, N. AdptGL-CA: Adaptive Global-Local Metric Fusion With Contrastive Attention for Few-Shot Learning. IEEE Trans. Emerg. Top. Comput. Intell. 2025, 9, 3598–3613. [Google Scholar] [CrossRef] [Scilit]
- Han, J.; Ren, Y.; Ding, J.; Yan, K.; Xia, G.-S. Few-Shot Object Detection via Variational Feature Aggregation. In Proceedings of the AAAI Conference on Artificial Intelligence, Washington, DC, USA, 7–14 February 2023. [Google Scholar] [CrossRef] [Scilit]
- Ding, H.; Wu, Z.; Zhang, J.; Ping, M.; Liu, Y. LERENet: Eliminating Intra-Class Differences for Metal Surface Defect Few-Shot Semantic Segmentation. arXiv 2024, arXiv:2403.11122. [Google Scholar] [CrossRef] [Scilit]
- Liu, Y.; Liu, N.; Jiang, T.; Han, J.; Yao, X.; Anwer, R.M.; Cholakkal, H.; Han, J. Bridge the Intra-Class Gap: K-Shot Multi-Scale Intermediate Prototype Mining Transformer for Few-Shot Semantic Segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 2025, 47, 11003–11021. [Google Scholar] [CrossRef] [Scilit]
- Majee, A.; Sharp, R.; Iyer, R. SMILe: Leveraging Submodular Mutual Information for Robust Few-Shot Object Detection. In Proceedings of the European Conference on Computer Vision (ECCV), Milan, Italy, 29 September–4 October 2024. [Google Scholar] [CrossRef] [Scilit]
- Huang, Y.; Wang, Z. Prototype-Driven Adaptation for Few-Shot Object Detection. arXiv 2025, arXiv:2510.25318. [Google Scholar] [CrossRef] [Scilit]
- Chen, W.-Y.; Liu, Y.-C.; Kira, Z.; Wang, Y.-C.F.; Huang, J.-B. A Closer Look at Few-Shot Classification. In Proceedings of the International Conference on Learning Representations (ICLR), New Orleans, LA, USA, 6–9 May 2019; pp. 6–9. [Google Scholar]
- Cao, T.; Law, M.T.; Fidler, S. A Theoretical Analysis of the Number of Shots in Few-Shot Learning. In Proceedings of the International Conference on Learning Representations (ICLR), Addis Ababa, Ethiopia, 26 April–1 May 2020; pp. 26–30. [Google Scholar]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.-C. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Lake City, UT, USA, 18–22 June 2018; pp. 4510–4520. [Google Scholar] [CrossRef] [Scilit]
- Lake, B.M.; Salakhutdinov, R.; Tenenbaum, J.B. Human-Level Concept Learning through Probabilistic Program Induction. Science 2015, 350, 1332–1338. [Google Scholar] [CrossRef] [Scilit]
- Ravi, S.; Larochelle, H. Optimization as a Model for Few-Shot Learning. In Proceedings of the International Conference on Learning Representations (ICLR), Toulon, France, 24–26 April 2017; pp. 24–26. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.




