# Mask Mixup Model: Enhanced Contrastive Learning for Few-Shot Learning
## 5 Experiments
### Ablation Study  
We conducted comparative ablation studies of M-Mix, CCS, and SF against the baseline [1]. As illustrated in Table 4, each component contributed to improvements. Specifically using the miniImageNet dataset for this analysis, we observed the significant impact of each component. Our M-Mix notably outperformed the baseline model. While individually adding CCS did not notably enhance the model, its combined utilization with M-Mix proved effective. Employing our proposed SF slightly improved the model's generalization. Figure 3: The heatmaps for image-spatial correspondence are displayed. We performed inner product calculations using features generated by the network for both support and query images, visualizing the outcomes as heatmaps. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Method**} & \multirow{2}{*}{**Backbone**} & \multicolumn{2}{c}{**CUB**} \\  & & **1-Shot** & **5-Shot** \\ \hline Robust-20 [22] & ResNet-18 & 58.67 \(\pm\) 0.7 & 75.62 \(\pm\) 0.5 \\ RelationNet [23] & ResNet-18 & 67.59 \(\pm\) 1.0 & 82.75 \(\pm\) 0.6 \\ MAML [18] & ResNet-18 & 68.42 \(\pm\) 1.0 & 83.47 \(\pm\) 0.6 \\ ProtoNet [4] & ResNet-18 & 71.88 \(\pm\) 0.9 & 86.64 \(\pm\) 0.5 \\ Baseline++[24] & ResNet-18 & 67.02 \(\pm\) 0.9 & 83.58 \(\pm\) 0.5 \\ S2M2R [25] & ResNet-34 & 72.92 \(\pm\) 0.83 & 86.55 \(\pm\) 0.67 \\ AA [26] & ResNet-18 & 74.22 \(\pm\) 1.09 & 88.65 \(\pm\) 0.55 \\ MixtFSL [27] & ResNet-18 & 73.94 \(\pm\) 1.1 & 86.01 \(\pm\) 0.5 \\ LaplacianShot [28] & ResNet-18 & 80.96 & 88.68 \\ RENet [11] & ResNet-12 & 79.49 \(\pm\) 0.44 & 91.11 \(\pm\) 0.24 \\ setfeat [29] & ResNet-12 & 79.60 \(\pm\) 0.80 & 90.48 \(\pm\) 0.44 \\ LRD [25] & ResNet-12 & 79.56 \(\pm\) 0.87 & 90.67 \(\pm\) 0.35 \\ \hline \hline ours & ResNet-12 & **81.33\(\pm\) 0.59** & **91.73\(\pm\) 0.37** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The table compares our method with other methods on the CUB dataset. The bold data indicates optimal performance. When constructing support images for contrastive learning, we divided the images into grids and applied masking to them. For the sake of experimentation, we exclusively conducted the analysis on the miniImageNet dataset. To ensure consistency in our experiments, we opted to divide the images into blocks with a number that corresponds to the square root of a natural number. We chose grid sizes of 8 \(\times\) 8, 10 \(\times\) 10, and 12 \(\times\) 12 to create blocks. Under the 8 \(\times\) 8 grid, we masked 10, 16, and 20 blocks; with the 10 \(\times\) 10 grid, we used 20, 25, and 30 blocks; and for the 12 \(\times\) 12 grid, we employed 30, 40, and 50 masked blocks. We utilized these synthetically created images for contrastive learning. As shown in Table 5, using larger grid sizes leads to superior results. Nevertheless, due to our input size being 84 \(\times\) 84, larger grid sizes might introduce more noise within the blocks. Thus, opting for moderately sized grids allows us to synthesize more information-rich samples, thereby enhancing performance. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**M-Mix** & **CCS** & **SF** & **5-Way 1-Shot** & **5-Way 5-Shot** \\ \hline  & & & & 63.17\% & 78.31\% \\ ✓ & & & & 67.33\% & 81.93\% \\  & ✓ & & & 64.07\% & 79.39\% \\  & & ✓ & & 65.21\% & 81.44\% \\ ✓ & ✓ & & 69.72\% & 83.47\% \\ ✓ & ✓ & ✓ & ✓ & **70.43\%** & **85.41**\% \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Ablation experiments on different modules of the entire model reveal the individual significance of each component. The ones without a check mark are baseline. Bold represents the best. Figure 4: We visualized tSNE plots of samples from the target classes. The upper plot represents the visualization for the baseline model, while the lower plot shows our model’s visualization. In the CCS module, we conducted ablation experiments on the number of random crops, specifically testing 4, 6, 8, 12, and 16 crops.