Skip to Content
Applied SciencesApplied Sciences
  • Article
  • Open Access

23 September 2026

18 Pages

CASR: Correlation-Aware Support Resampling for Few-Shot Learning with Prototypical Networks

,
,
and
1
DigiNova Information Technologies Inc., Kocaeli University Technopark, 41275 Kocaeli, Türkiye
2
Department of Software Engineering, Kocaeli University, 41001 Kocaeli, Türkiye
3
Department of Computer Engineering, Kocaeli University, 41001 Kocaeli, Türkiye
*
Author to whom correspondence should be addressed.
This article belongs to the Section Computing and Artificial Intelligence

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 T m a x 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 62.28 % with τ = 0.25 compared to 61.62 % for the baseline. At 1750 episodes, CASR achieves 66.2 % with τ = 0.25 —the recommended setting offering the best trade-off between accuracy and computational cost—compared to 65.45 % for the baseline, while τ = 0.28 reaches 66.5 % at 1750 episodes at the cost of approximately 14.6 × higher training time. On Omniglot, where intra-class variance is inherently low, CASR achieves 99.56 % at 1000 episodes and 99.66 % at 1500 episodes with τ = 0.30 , compared to 99.54 % and 99.60 % 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.

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 S k = { ( x i , y i ) } i = 1 K for class k, the class prototype is computed as
c k = 1 K ∑ i = 1 K f φ ( x i )
where f φ denotes the embedding function parameterized by φ . A query sample x ^ is then classified by finding the nearest prototype:
y ^ = arg min k d f φ ( x ^ ) , c k
where d ( · , · ) denotes the squared Euclidean distance. It follows that the quality of c k is directly determined by the composition of S k . 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 f ∈ R 1280 . The model weights are frozen throughout the training process, and no parameters are updated.
Accordingly, for each support sample x i , a feature vector f i ∈ R 1280 is extracted using MobileNetV2. The feature vectors obtained for all K support samples form a feature matrix F ∈ R K × d . 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 F ∈ R K × d has been obtained, the features are centered column-wise by subtracting the mean of each column (Equation (4)):
F ˜ = F − 1 K ∑ i = 1 K f i
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)):
Cov = F ˜ F ˜ ⊤ K − 1
Note that Cov ∈ R K × K 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).
Corr [ i , j ] = Cov [ i , j ] σ i · σ j , σ i = Cov [ i , i ] , i , j ∈ { 1 , … , K }
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)):
ρ ¯ = 2 K ( K − 1 ) ∑ i , j = 1 i < j K Corr [ i , j ]
Since the absolute value of the Pearson correlation coefficient is taken, each element | Corr [ i , j ] | lies in the range [ 0 , 1 ] , and consequently ρ ¯ ∈ [ 0 , 1 ] . The threshold value τ is defined in the interval ( 0 , 1 ) 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 ( ρ ¯ ≈ 0 ), 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 ρ ¯ → 1 , 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 D k , shot number K, threshold τ , maximum number of trials T m a x
Ensure: Optimized support set S ^ k
  1:
for each class k do
  2:
S ^ k ← random_sampling ( D k , K )                         ▹ initial support set
  3:
for  t = 1  to  T m a x  do
  4:
S ← random_sampling ( D k , K )
  5:
F ← MobileNetV2 ( S )
  6:
ρ ¯ ← compute_correlation ( F )
  7:
if  ρ ¯ > τ  then
  8:
S ^ k ← S
  9:
break
10:
end if
11:
end for
12:
end for
13:
return  S ^ k
Once the iterative process is completed, the first configuration satisfying the threshold condition ρ ¯ ( S ) > τ is selected as the final support set, and the search is terminated. If no configuration satisfying the threshold condition is found within T m a x 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 28 × 28 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 84 × 84 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 3 × 3 convolutional layer, batch normalization, and a ReLU activation function, followed by 2 × 2 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 T m a x =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, τ ∈ { 0.30 , 0.35 , 0.40 } is evaluated. In contrast, the greater visual diversity in MiniImageNet, which consists of natural images, results in relatively lower correlation values. Accordingly, τ ∈ { 0.18 , 0.20 , 0.22 , 0.24 , 0.25 , 0.26 , 0.28 } 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 60.00 % and 65.32 % , respectively, as reported in their original publications. Our implementation of ProtoNet achieved 61.62 % at 1000 training episodes and 65.45 % at 1750 episodes. The proposed CASR mechanism consistently outperforms the ProtoNet baseline across training episodes. With τ = 0.25 , CASR achieves 62.28 % at 1000 episodes and 66.2 % at 1750 episodes, requiring only 1.5 × the computational cost of ProtoNet at the same episode count. With τ = 0.28 , the highest accuracy of 66.5 % is achieved at 1750 episodes; however, the training time increases to 449.89 min, approximately 14.6 × that of the baseline. These results indicate that τ = 0.25 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 98.90 % and 99.80 % , respectively, as reported in their original publications. Our implementation of ProtoNet achieves 99.54 % at 1000 training episodes and 99.60 % at 1500 episodes. The proposed CASR mechanism with τ = 0.30 achieves 99.56 % at 1000 episodes and 99.66 % 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 99 % . 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 ( τ ∈ { 0.18 , 0.20 , 0.22 , 0.24 , 0.25 , 0.26 , 0.28 } ) 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 τ ∈ { 0.30 , 0.35 , 0.40 } .
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 τ ∈ { 0.18 , 0.20 , 0.22 , 0.24 , 0.25 , 0.26 , 0.28 } . 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 τ = 0.28 ; however, τ = 0.25 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 ( τ ≤ 0.26 ), the training time remains comparable to that of the baseline method. However, at τ = 0.28 , 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 τ = 0.25 , 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, τ = 0.28 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 66.2 % with τ = 0.25 at 1750 episodes, compared to 65.45 % 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 ( 99.66 % at 1500 episodes vs. 99.60 % for the baseline, and 99.56 % at 1000 episodes vs. 99.54 % 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 τ = 0.28 achieves the highest accuracy ( 66.5 % ), it requires approximately 14.6 × more training time than the baseline. In contrast, τ = 0.25 offers a more practical configuration, achieving 66.2 % accuracy with 1.5 × 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 τ = 0.28 , whereas τ = 0.25 provided an accuracy of 66.2% at 1750 episodes compared to 65.45 % 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.

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

  1. 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]
  2. 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]
  3. 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]
  4. 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]
  5. Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar]
  6. 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]
  7. 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]
  8. 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]
  9. 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]
  10. 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]
  11. 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]
  12. 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]
  13. 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]
  14. 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]
  15. 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]
  16. 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]
  17. 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]
  18. 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]
  19. 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]
  20. 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]
  21. 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]
  22. 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]
  23. 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]
  24. 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]
  25. 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]
  26. 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]
  27. 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]
  28. 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]
  29. 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]
  30. 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]
  31. 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]
  32. 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]
  33. Huang, Y.; Wang, Z. Prototype-Driven Adaptation for Few-Shot Object Detection. arXiv 2025, arXiv:2510.25318. [Google Scholar] [CrossRef] [Scilit]
  34. 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]
  35. 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]
  36. 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]
  37. 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]
  38. 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.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.